Hello,
Here is the progress of the LaTeX module (attached; I plan to clean it and
commit it this week-end):
- derivation of the TeX module is possible
(a LaTeX moduleis attached. It only contains definition of new
commands)
- the class file is read in order to parse "% po4a:" lines
(I only support "command1 alias command2" at this time, i.e.
specifying that a command should be handled the same way as another
one)
- file inclusion
I've been able to get po4a normalizing all the files of the book with
only this command:
po4a-normalize -f LaTeX data/bk2/bk2.tex
(only one chapter - ch05 - is ignored from the \include command,
because of a bug - see below)
I've done it in a quite different way than Sgml.pm because I wanted to
keep the line references, and I could not remove end of lines as
in Sgml.
In read, I'm calling parse_file. And in parse_file, I calling
again parse_file when a \include is encountered, so that files are
included at the right place. parse_file is quite equivalent to
Transtractor's parse (with the \include difference).
If this is not the right way to include files, please stop me
before this week-end.
Identified bugs
- a command argument can contain an empty line (chapter 5), the parse
function should make sure that after the separation in paragraphs, it
didn't break inside a command argument.
- I'm not really happy with the way I'm dealing with spaces (or tab or
newlines) between commands, or between commands and text. But it seems
necessary.
- I'm assuming the class file and included file will be found at the
right place
- some additional empty lines are added (this should not be an issue,
but I would like to understand where it happens)
- There's a small difference in the table of content (I need to analyze
this)
- Plenty other are lurking;)
Missing features
- a category for commands that can be separated from a paragraph when
located at its beginning or its end (at this time all are separated)
- more "% po4a:" stuff
- the class file will need to be translated
- many others
The only regression test I tried after the po4a-normalization is to display
both PDF superposed and switching from one to the other. Eyes are
usually very sensitive to small changes (even spacing changes). At
this time I only detected one small difference (in the table of content) up
to the 26th page.
--
Nekral