Go to page:

Search:   Help



LyX documentation


Shared groups



Categories: Tool, Outline
<< | Page list | >>

Outline to LyX (otl2lyx.awk) converts a tabbed outline almost into a .lyx-file.


Long ago I made an otl2lyx.pl, but with the upgraded native LyX file format, it no longer worked. After viewing my Perl code, I opted to rewrite in awk (gawk, to be specific).

This program converts a tab indented outline (the native format of VimOutliner, http://www.vimoutliner.org) into LyX code. It DOES NOT create the document header or the \begin_body or \end_body or \end_document. I do that by creating an almost blank LyX document, with LyX, and then pasting in the results into the body of the almost blank LyX document.

This program requires a file representing the table between levels and LyX/LaTeX environments. Mine, for a book, looks like this:

1: Chapter       
2: Section             
3: Subsection    
4: Subsubsection 
5: Paragraph     
6: Subparagraph  
7: Garbage7 
bodytext: Standard

I called the preceding file envs.table. Then I run the program like this:

otl2lyx.awk    envs.table   mybook.otl  > junk.lyx
gvim   junk.lyx   mybook.lyx

It's undergone very little testing, and I'm sure you'll find glitches, but it did convert my outline into a book skelleton, and worked, including the body text, which has each line starting with a colon.

The otl2lyx.awk code, which is licensed GPL version 2, is attached to this email. Enjoy!

Link to the script

<start writing here....>

Category: Tool, Outline

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2007-04-23 21:05 CEST