[Vimoutliner] vo_latex? vo_tex?

Ben Martin ben_martin at alumni.hmc.edu
Wed Feb 20 00:46:02 EST 2008


On Feb 19, 2008 11:38 PM, Steve Litt <slitt at troubleshooters.com> wrote:
> Hi all,
>
> LyX isn't floating my boat the way it used to.
>
> Anyone use LaTeX or TeX? Would a VO front end for LaTeX (and therefore TeX) be
> something you might find interesting?
>
> Thanks
>
> SteveT

Hi,

I'm currently writing my dissertation in LaTeX using vimlatex and
vimoutliner.  I manually edit the outline while editing the chapter
files in another window.  I thought about writing a quick script to
translate back and forth, but the complications stopped me.  I just
joined the list, so I apologize if I repeat something.

I've been using vimlatex for a while now, but it's mainly useful for
the syntax highlighting and semi-automatic folding.  I don't tend to
make much use of it's advanced features because they don't quite fit
with how I use LaTeX or vim (except for ",rf", which is needed with
their funky folding).  Vimlatex is so smart that it's a real pain to
just get it behave.  It took me over an hour to figure out how to make
it use my Makefile by default.

I thought of two ways to implemented a scheme for automating the translation:

1. otl file as master document
All editing would happen in an otl file (prehaps .otltex or something?).
My makefile would run a script that removed initial colons from the
file and possibly added % in place of non comment lines to get the tex
file.

example.otltex:
-----------------------------------
headers
  : \documentclass{blah}
  : \blah
  : \begin{document}
intro
  : \section{blah}
  : blah blah
conclusion
  : \section{blah}
  : blah blah
footer
 : \end{document}
-----------------------------------------
derived example.tex:
-----------------------------------
% headers {{{1
  \documentclass{blah}
  \blah
  \begin{document}
% }}}1
% intro {{{1
  \section{blah}
  blah blah
% }}}1
% conclusion {{{1
  \section{blah}
  blah blah
% }}}1
% footer {{{1
  \end{document}
% }}}1
-----------------------------------------

This solution has some obvious shortcomings.  The biggest of which is
the lack of syntax highlighting.  That's a real deal-breaker for me
since I use a lot of math and balancing $'s are always an issue.  It
would be easy to implement, however.

2. .tex file is the master
The outline could be automatically extracted from a tex file based on
chapters, sections, etc.  Non-section entries could be denoted with a
special syntax in a tex comment.  For example, perhaps lines that
start with %_ are interpreted as children of the current section.

Propagating changes back to the .tex file could be tricky.  Perhaps
this could happen like hoisting?

------------------------------------------

I think it's better to have one master file, so that there is no
possibility of the versions getting out of sync.  Of course, I don't
really understand the workings of Vim, so there is probably a much
better way to approach all this.  I look forward to what you come up
with.  I'd be happy to beta test any solution.

Regards,
Ben


More information about the VimOutliner mailing list