1

I'm using LaTeX Beamer for preparing teaching slides; since I'm teaching courses in several languages, I was wondering whether there is an easy way of displaying only specific slides of a specific language by help of a simple command.

What I do NOT want to use are packages like comment since important features of editing are lost (jumping back and forth between source and pdf does not work in TeXWorks, TeXMaker, TeXShop, etc.).

Basically, I would like to work with beamer modes. The idea would be to select a specific language mode while loading a document class and then prepare for all languages slides as, e.g.:

\documentclass[modelangenglish]{beamer}
\begin{document}

\begin{frame}[modelangenglish]
English Slide
\pause
tba
\end{frame}
%
\begin{frame}[modelanggerman]
German Slide
\pause
tba
\end{frame}
%
\begin{frame}[modelangspanish]
Spanish Slide
\pause
tba
\end{frame}
\end{document}

It should be also compatible with handout mode (nice would be something like \documentclass[handout,modelangenglish]{beamer}).

I would also like to avoid using different source files for different languages, because making changes synchronously within one file is much easier.

Are there any solutions? Can such beamer modes be defined? I know, there is a ready made translation mode, but I would need a solution for several languages (and one screen).

Thanks a lot and all the best, Christian

  • Maybe the https://ctan.org/pkg/beameraudience?lang=en package can help. – user36296 Oct 10 '18 at 16:17
  • see tex.stackexchange.com/a/449134/36296 for an example – user36296 Oct 10 '18 at 16:22
  • If you don't use overlays, you can give ConTeXt a try. You can define mode and compile the same file with --mode=english, --mode=french and so an. Anything between \startmode[english] and \stopmode[english] will be visible only when compiled with --mode=english. – sztruks Oct 10 '18 at 16:26
  • Thanks a lot! beameraudience perfectly does the job! Thanks also a lot for the tip on using ConTeXt! – Christian Oct 11 '18 at 8:36
0

This problem seems like a good use-case for the beameraudience package:

\documentclass{beamer}

\usepackage[
%    audience=english
%    audience=spanish
    audience=german
]{beameraudience}


\begin{document}

\begin{frame}{Title}
 all version
\end{frame}

\justfor{english}{
    \begin{frame}
    English Slide
    \pause
    tba
    \end{frame}
}

\justfor{spanish}{
    \begin{frame}
    Spanish Slide
    \pause
    tba
    \end{frame}
}

\justfor{german}{
    \begin{frame}
    Deutcher Text
    \pause
    wird noch angekündigt
    \end{frame}
}

\end{document}
  • Perfect -- that was exactly what I was looking for! Thanks a lot! – Christian Oct 11 '18 at 8:34
  • @Christian You're welcome! – user36296 Oct 11 '18 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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