vo_latex? vo_tex?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vo_latex? vo_tex?

Steve Litt
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
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: vo_latex? vo_tex?

Ben Martin-5
On Feb 19, 2008 11:38 PM, Steve Litt <[hidden email]> 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
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: vo_latex? vo_tex?

Steve Litt
On Wednesday 20 February 2008 00:46, Ben Martin wrote:

> On Feb 19, 2008 11:38 PM, Steve Litt <[hidden email]> 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}
>
> -----------------------------------------

Here's another way it could be described:
example.otltex:
-----------------------------------
headers
        \documentclass{blah}
        \blah
        \begin{document}
intro
        : blah blah
        Summary of info
                : blah blah
conclusion
        : blah blah
        Feelgood subsection at end of conclusion
                : blah blah
footer
        \end{document}

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

Hierchical environments needn't have a begin or end, because the indentation
implies them, when crossreferenced to the documentclass. Other environments
can assume their own line and not have a colon. The conversion program will
assume that any line beginning with a backslash is an environment or a
command. Putting commands within text would be harder and might require a
special syntax.

What I think would be absolutely necessary for fast work would be a facility,
within Vim, to list all environments and have the user choose one. The same
should be true of commands. This implies vo_latex would be able to, to some
degree, parse the document preamble (headers) and any included layout files
or style files.

Or else make the user create files listing useable environments and character
style commands and have VO dropdown and select those. That would be much
easier, and I think would be acceptable for the first few versions.

Thanks

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner