[Po4a-devel]Design of the (La)TeX module

Denis Barbier barbier@linuxfr.org
Sat, 11 Dec 2004 14:47:51 +0100


On Sat, Dec 11, 2004 at 12:15:29PM +0100, Nicolas Fran=E7ois wrote:
[...]
> Here is what I'm doing when I encounter the following block:
>=20
> foo
> bar %baz
> qux
> %quux
> corge
> grault
>=20
> I first remove the %baz comment, and store it a table. This comment wil=
l
> disappear from the final document, but I will show it in the PO (possib=
ly
> at a wrong place) because it may help the translation.
> Then, for the %quux comment, I consider that this comment separate two
> paragraphs, which will be translated separately.

But this is wrong, in LaTeX this comment is ignored and there is only
one paragraph in your example above.

[...]
> Here is a Python paragraph:
> A Python program is read by a \emph{parser}.  Input to the parser is a
> stream of \emph{tokens}, generated by the \emph{lexical analyzer}.  Thi=
s
> chapter describes how the lexical analyzer breaks a file into tokens.
> \index{lexical analysis}
> \index{parser}
> \index{token}
>=20
> The indexes here are trailing commands. They are translated separately
> from the paragraph (in this case, they are maybe untranslated)

Okay, I see, but I wonder whether this is the right way to go.
IMO you should first try to have a working implementation, then people
use it in ways you did not imagine, and you then have to fix/extend it.
Sometimes authors put \label at the beginning of paragraphs, maybe it
is similar with \index.

Denis