开发者

How to best manage multi-lingual presentations?

开发者 https://www.devze.com 2022-12-25 00:29 出处:网络
I have a presentation done in Latex+Beamer, currently in french. I also need to make the same presentation, with the same structure, in dutch. I\'d like to maintain the presentation in one file, so th

I have a presentation done in Latex+Beamer, currently in french. I also need to make the same presentation, with the same structure, in dutch. I'd like to maintain the presentation in one file, so that if I want to change the structure of it, I on开发者_运维技巧ly have to do it in one place. What's the best way to put the translations outside of the presentation file?

I thought of defining a command for each text element to be present in the slides, and having a different command definition for each language. But it seems quite heavy....

Thanks in advance

RAph


I've seen only one solution to this (as part of the babel package) — you wrap each contiguous unit of text in a command that looks like this:

\langswitcher{french text}{dutch text}

and then define \langswitcher in the preamble to output either the first or the second argument.

I know this does not put the translation into a separate file, but this is simple, fast, works for sure, and probably solves your problem.

To put a translation in a separate file, at the very least you'll have to identify each piece of text anyway.


I'd do

\newcommand{\en}{#1}
\newcommand{\de}{}

And in the text use:

\en{ my text in english }
\de{ german text }

And after I'd simply swap the commands. Be aware that result should be different only because the text should take more or less space. You can cheat a bit using \phantom command. This solution use only one file though.


keep each slide in its own file... then \input{dutch-file} \input{french-file}

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号