Code

Implement proper multi-language support.
[tokkeebeamer.git] / example.tex
index fda75ea1d8ad71e674c26d1988d119ce6b00082d..5306ef6a18fc900f86ca2338a29cfba347a66a2e 100644 (file)
@@ -1,38 +1,98 @@
+%
+% Copyright (C) 2013-2016 Sebastian 'tokkee' Harl <sh@tokkee.org>
+% All rights reserved.
+%
+% Redistribution and use in source and binary forms, with or without
+% modification, are permitted provided that the following conditions
+% are met:
+% 1. Redistributions of source code must retain the above copyright
+%    notice, this list of conditions and the following disclaimer.
+% 2. Redistributions in binary form must reproduce the above copyright
+%    notice, this list of conditions and the following disclaimer in the
+%    documentation and/or other materials provided with the distribution.
+%
+% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+% ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+% TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+% PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+% CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+% EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+% OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+% WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+% ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%
 \documentclass{beamer}
+\uselanguage{German}
+
 \usetheme{tokkee}
 
-\usepackage[utf8]{inputenc}
+\usepackage{fontspec,xunicode,polyglossia}
+\setdefaultlanguage{english}
+\setotherlanguage[spelling=new]{german}
+
+\usepackage{xeCJK}
+\renewcommand\CJKfamilydefault{\CJKsfdefault}
+\setCJKsansfont{WenQuanYi Zen Hei}
 
-\title[Beamer-Vorlage]{Meine tolle Beamer-Vorlage}
-\subtitle{\LaTeX{} beamer für tokkee.net}
+\title[Beamer Template]{tokkee's \LaTeX{} Beamer Template}
+\subtitle{\LaTeX{} beamer for tokkee.net}
 \date{\today}
 \institute{tokkee.net}
 \author{Sebastian Harl\\ $<$sh@tokkee.org$>$}
-\copyrightinfo{\copyright{} 2013 Sebastian 'tokkee' Harl, All rights reserved.}
+\copyrightinfo{\copyright{} 2013-2016 Sebastian `tokkee' Harl, All rights reserved.}
+
+\AtBeginSection[]
+{
+       \begin{frame}
+               \begin{center}
+                       \Large
+                       \titlebox{\secname}
+               \end{center}
+       \end{frame}
+}
 
 \begin{document}
 \frame[plain]{\titlepage}
 
-\section{Beispiel}
+\begin{frame}{Hello 世界}
+       This is an example slide deck using tokkee's beamer templates.\\[5mm]
+
+       {\Large Hello 世界}
+\end{frame}
 
-\begin{frame}{Beispiel}
+\section{Example}
+
+\begin{frame}{Example}
        Text:
        \begin{itemize}
-               \item Stichpunkt
+               \item Bullet point
                        \begin{itemize}
-                               \item Unterpunkt
+                               \item sub item
                        \end{itemize}
-               \item Noch ein Stichpunkt
+               \item More bullet points
+               \item ...
        \end{itemize}
 \end{frame}
 
-\begin{frame}{Noch ein {\ttfamily frame}}{... mit Subtitel}
-       Mehr Text:
+\selectlanguage{german}
+\begin{frame}{Mehrere Sprachen}
+       Mehr Text (jetzt in Deutsch mit Umlauten und Sonderzeichen):
+
+       \begin{quote}
+               Franz jagt im komplett verwahrlosten Taxi quer durch Bayern. Stanleys
+               Expeditionszug quer durch Afrika wird von jedermann bewundert. Prall
+               vom Whisky flog Quax den Jet zu Bruch. Vogel Quax zwickt Johnys Pferd
+               Bim. Sylvia wagt quick den Jux bei Pforzheim.\\[2mm]
+
+               Vogt Nyx: »Büß du ja zwölf Qirsch, Kämpe!«
+       \end{quote}
+\end{frame}
 
-       Franz jagt im komplett verwahrlosten Taxi quer durch Bayern. Stanleys
-       Expeditionszug quer durch Afrika wird von jedermann bewundert. Prall vom
-       Whisky flog Quax den Jet zu Bruch. Vogel Quax zwickt Johnys Pferd Bim.
-       Sylvia wagt quick den Jux bei Pforzheim.
+\selectlanguage{english}
+\begin{frame}{Back to English}
+       Note how the slide numbering switched between ``Slide'' and ``Folie''.
 \end{frame}
 
 \end{document}