如何最好地管理多语言演示? [英] How to best manage multi-lingual presentations?
问题描述
我有一个使用Latex + Beamer(目前为法语)的演示文稿.我还需要用荷兰语进行相同的演示,使用相同的结构.我想将演示文稿保存在一个文件中,这样,如果我想更改其结构,则只需要在一个地方进行即可.将翻译内容放到演示文稿文件之外的最佳方法是什么?
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 only 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....
预先感谢
RAph
推荐答案
我只看到了一个解决方案(作为babel
包的一部分)—您可以使用以下命令将每个连续的文本单元包装起来:
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}
,然后在序言中定义\langswitcher
,以输出第一个或第二个参数.
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.
这篇关于如何最好地管理多语言演示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!