[Po4a-devel] Nested LaTeX commands

Tobias Germer tgermer at think-cell.com
Mon Mar 21 11:58:53 UTC 2011


Hi all,

I am currently evaluating po4a to see if it is suitable for translating
our documentation written in LaTeX. I found the problem that po4a
doesn't seem to parse commands recursively. For example, if I define
these two commands:

  % po4a: command -doTranslate {_}
  % po4a: command -doNotTranslate {}

and translate the following tex source:

  \doTranslate{
  test string 
  
  \doNotTranslate{test2}
  }

Then po4a produces:

  msgid "test string \\doNotTranslate{test2}"
  msgstr ""

I think \\doNotTranslate{test2} should not show up there. Indeed, when
you change the tex source to: 

  \doTranslate{
  test string 
  }
  
  \doNotTranslate{test2}

The output changes to the correct format:

  msgid "test string"
  msgstr ""

I think this is a severe limitation of po4a, since you can always define
nested commands in LaTeX, like "\textbf{This \emph{is} an {\huge
example} text.}"
Does the LaTeX module ignore this case or is it just bug? If yes, could
it be fixed easily?

Regards,
Tobias 



More information about the Po4a-devel mailing list