[Vimoutliner] otl2lyx.awk
Steve Litt
slitt at troubleshooters.com
Mon Apr 23 00:33:41 EDT 2007
Hi all,
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!
SteveT
Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: otl2lyx.awk
Type: application/octet-stream
Size: 2408 bytes
Desc: not available
Url : http://lists.vimoutliner.org/pipermail/vimoutliner/attachments/20070423/ff7855c5/otl2lyx.obj
More information about the VimOutliner
mailing list