0

I've tried the obvious, a .po4a.conf file like this:

[po4a_langs] it
[po4a_paths] l10n/$master/master.pot $lang:l10n/$master/$lang.po

[type: latex] slides.en.tex            it:slides.it.tex

But when I run po4a .po4a.conf, I get a complaint that "frame" is an unknown environment:

slides.en.tex:80: (po4a::tex)
               unknown environment: 'frame'

The trivial work-around is to treat the LaTeX/Beamer document as a plain text file, but that means that every single line of the document gets pushed to the translation file (in blocks of paragraphs).

closed as off-topic by Schweinebacke, egreg, Stefan Pinnow, Joseph Wright Oct 26 '17 at 9:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Schweinebacke, egreg, Stefan Pinnow, Joseph Wright
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I don't know how this works, so this may be idiotic: I see from po4a.alioth.debian.org/man/man3/Locale::Po4a::TeX.3pm.php that there is the possibility of adding some sort of customization in the .tex file, e.g. % po4a: environment frame. Is this only to customize environments that are already known to the program, or to register new ones as well? – Torbjørn T. Oct 26 '17 at 8:32
  • Thanks. I should have found that myself. I've managed to hack the "LaTex.pm" file enough to make things work reasonably with my current Beamer document. – Jacob Sparre Andersen Oct 26 '17 at 9:22
  • Nevertheless this is a question to po4a not to TeX. – Schweinebacke Oct 26 '17 at 9:27
  • Agreed. But I couldn't find "po4a.stackexchange.com". – Jacob Sparre Andersen Oct 26 '17 at 10:27
2

This is how I've modified /usr/share/perl5/Locale/Po4a/LaTeX.pm to support (a subset of) Beamer:

--- LaTeX.pm.bak    2013-08-21 22:54:06.000000000 +0200
+++ LaTeX.pm    2017-10-26 11:23:02.295980826 +0200
@@ -148,6 +148,7 @@
 register_generic_command("closing,{_}");
 register_generic_command("dashbox,{}");            # followed by a (w,h) argument
 register_generic_command("date,{_}");
+register_generic_command("institute,{_}");
 register_generic_command("*enlargethispage,{}");
 register_generic_command("ensuremath,{_}");
 register_generic_command("*fbox,{_}");
@@ -357,6 +358,7 @@
             eqnarray eqnarray* equation equation* flushleft flushright footnotesize itemize
             letter lrbox multline multline* proof quotation quote
             sloppypar tabbing theorem titlepage
+            frame
             trivlist verbatim verbatim* verse wrapfigure)) {
     register_generic_environment("$_,");
 }
@@ -396,6 +398,8 @@
   $env_separators{'flushright'} =
   $env_separators{'center'} =
   $env_separators{'author{#1}'} =
+  $env_separators{'institute{#1}'} =
+  $env_separators{'date{#1}'} =
   $env_separators{'title{#1}'} = "\\\\\\\\";

 # tabbing

Not the answer you're looking for? Browse other questions tagged or ask your own question.