如何使用 Beamer 中的双语翻译器

如何使用 Beamer 中的双语翻译器

使用translatorbeamer presentation 中的包将字符串翻译theorem成单一语言简单明了,那么两种语言呢?

\documentclass{beamer}
\usepackage[spanish,french]{babel}

\uselanguage{french}
\languagepath{french}

\begin{document}
\begin{frame}
\today
\begin{theorem}
I will translate \structure{\translate[to=french]{theorem}} but not theorem
\end{theorem}
\end{frame}

\selectlanguage{spanish}

%\uselanguage{spanish}
%\languagepath{spanish}

\begin{frame}
\today
\begin{theorem}
I will translate \structure{\translate[to=spanish]{theorem}} but not theorem
\end{theorem}
\end{frame}

\end{document}

答案1

\documentclass您应该在之前babel以相同的顺序加载语言,因此最后一种语言,即法语是默认语言。

\documentclass[spanish,french]{beamer}
\usepackage{babel}

\begin{document}
\begin{frame}
\today
\begin{theorem}
I will translate \structure{\translate[to=french]{theorem}} but not theorem
\end{theorem}
\end{frame}

\selectlanguage{spanish}

\begin{frame}
\today
\begin{theorem}
I will translate \structure{\translate[to=spanish]{theorem}} but not theorem
\end{theorem}
\end{frame}

\end{document}

在此处输入图片描述

相关内容