texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

transforming texinfo sources


From: Patrice Dumas
Subject: transforming texinfo sources
Date: Fri, 9 Dec 2011 01:05:53 +0100
User-agent: Mutt/1.4.2.2i

Hello,

With the parser, it is possible to do some transformation on the tree before
outputting the result.  When converting to a format this may simply be done
on the whole document tree, no problem.  But it may also be handy to do
that for the original Texinfo code.  The example I have in mind is the 
automatic addition of nodes and corresponding menu entries starting with
sectioning commands only.  They can be generated when converting, but it
would also be interesting to be able to output Texinfo code with the menus, 
such that the user may further edit them.  I think that this is something
present in Texinfo emacs mode.

This, however, opens the issue of user defined @-macros, @value and @include
files expansion.  How is it possible to transform Texinfo code while still
keeping this information, and do we want to do that?

One possibility I can think of would be 
* take an directory as argument, to put results in
* consider user defined @-macros as commands line @footnote that can take 
  anything as argument except for @node and sectioning commands
* follow @include, but keep the information about them in the tree, and also
  maybe information about end of included files
* don't expand @value.

Obviously it won't work everytime, only when the user defined @-macros
do not break the tree structure of the Texinfo document.  But I think this 
could be useful sometime.  Is it worth toying with that idea?

How does emacs Texinfo mode handle those complications and still helps
automating document menus and nodes structure generation?

PS: irrespective of what is decided, I think that adding elements in the tree
when entering or leaving an @include file, which would be ignored by all 
the output formats is an interesting idea.

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]