[Po4a-devel] Another issue with po4a-gettextsize: verbatim environments are mangled

Nicolas François nicolas.francois at centraliens.net
Thu Aug 17 21:28:54 UTC 2006


On Thu, Aug 17, 2006 at 10:24:00PM +0200, David MENTRE wrote:
> 
> While trying po4a on a more complex Latex document, I faced following
> issue.
> 
> In my master document ../en/hoo.tex, I have:
> % po4a: environment codesample2 
> % po4a: environment codesample4 
> 
> 
> In my document hook.tex, I have verbatim-like environments like that :
> \begin{codesample2}
>   [hooks]
>   commit.example = python:mymodule.submodule.myhook
> \end{codesample2}
> 
> However, after applying po4a-gettextize:
>  po4a-gettextize -f latex -m ../en/hook.tex -M utf8 -l hook.tex -L utf8 \
>            -p hook.po -o verbatim=codesample2 -o verbatim=codesample4

You cannot use an option twice. You must specify both environment this way.
-o verbatim=codesample2,codesample4
(I've added this in my TODO, or at least to raise a warning)

Another solution is to indicate:
% po4a: verbatim codesample2
% po4a: verbatim codesample4
(in addition to the '% po4a: environment codesample4 ' line)

Note:
  * The verbatim line is now sufficient (no need for the additional
    '% po4a: environment xxx ' lines) in po4a 0.28;
  * These verbatim lines are documented in the Locale::Po4a::TeX man page
    since 0.28, but they were valid in earlier releases


I mostly tested the LaTeX module with inline (% po4a:) commands, because
it's very common to have newly defined / not-standard commands in LaTeX,
so the inline commands probably provide a better interface. Do not hesitate
to mention the list if an option is missing.

BTW, if modifying the original file is a problem, you can also add these
commands in a separate file, and specify this file with the
'-o definitions=' option.

Kind Regards,
-- 
Nekral



More information about the Po4a-devel mailing list