![如何使用 Beamer 中的双语翻译器](https://linux22.com/image/418264/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20Beamer%20%E4%B8%AD%E7%9A%84%E5%8F%8C%E8%AF%AD%E7%BF%BB%E8%AF%91%E5%99%A8.png)
使用translator
beamer 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}