On Tue, Apr 11, 2017 at 8:46 AM, Arjan <[email protected]> wrote:

>
> I'm using Leo to organize sections like \chapter, \section and
> \subsection. Since I'm just writing latex in Leo, I need to keep track of
> the right hierarchies, so I can't freely move nodes around in the hierarchy
> or I end up with \subsection at the same level as \section, etc. It would
> be great to be able to let Leo handle this.
>

​This would be an interesting enhancement.

Leo's rst3 command does exactly this, but the code in leo/core/leoRst.py
might induce heart palpitations.  There are reasons for all that
complexity, and probably none of them relate to latex.

In fact, it should be relatively simple to write a script or plugin to do
something useful.  Define the *latex level* of a node p to be p.level() -
root.level(), where root is the root node of your hierarchy or latex
markup. Use this computed level to choose the latex markup.

HTH.  Feel free to ask questions or to create an enhancement request.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to