summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-01-14 23:37:42 +0000
committerKarl Berry <karl@freefriends.org>2016-01-14 23:37:42 +0000
commit338f63473fbeea9db3535fa4cc5bccac6534d0a6 (patch)
treed5f34bd91f4ed7de0cc3bf029bfc0bda6f853773 /Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx
parent1aaff69b163f17e171b76384ab08c866b825e5a9 (diff)
fibeamer (14jan16)
git-svn-id: svn://tug.org/texlive/trunk@39386 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx')
-rw-r--r--Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx134
1 files changed, 112 insertions, 22 deletions
diff --git a/Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx b/Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx
index 2724352873f..2c7cadf7bef 100644
--- a/Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx
+++ b/Master/texmf-dist/source/latex/fibeamer/fibeamer.dtx
@@ -39,6 +39,7 @@
\begin{document}
\RecordChanges
\DocInput{fibeamer.dtx}
+ \newpage
\PrintIndex
\RaggedRight
\PrintChanges
@@ -48,14 +49,27 @@
% \end{macrocode}
%<*class>
\NeedsTeXFormat{LaTeX2e}
+%
% Define `\fibeamer@version` and store it in the `VERSION.tex` file \fi
-\def\fibeamer@version{2015/11/21 v1.0.4 fibeamer MU beamer theme}
+\def\fibeamer@version{2016/01/13 v1.1.0 fibeamer MU beamer theme}
% {\newwrite\f\openout\f=VERSION\write\f{\fibeamer@version}\closeout\f}
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \iffalse Use `\fibeamer@version` as the PDF creator key.
+\hypersetup{pdfcreator=\fibeamer@version}
+% \fi
%
-% \changes{v1.0.4} {2015/11/21}{Updated the user guide. [VN]}
-% \changes{v1.0.3} {2015/11/20}{The example documents from the
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \changes{v1.1.0:7} {2016/01/12}{Updated the example documents to
+% showcase the use of \cs{alert}. [VN]}
+% \changes{v1.1.0:6} {2016/01/11}{Updated the example documents to
+% showcase the use of the \cs{tableofcontents}. [VN]}
+% \changes{v1.1.0:1} {2015/11/24}{Added the new logo files for the
+% faculties of the Masaryk University in Brno and removed the old
+% logo files. [VN]}
+% \changes{v1.0.4} {2015/11/21}{Updated the user guide of the
+% Masaryk University in Brno. [VN]}
+% \changes{v1.0.3} {2015/11/20}{The example documents from the
% \texttt{example} directory and the user guide from the
% \texttt{guide} directory are now a part of the CTAN archive.
% [VN]}
@@ -107,11 +121,11 @@
% \end{macrocode}
% \subsection{The \texttt{microtype} option}
% \changes{v1.0.2}{2015/11/18}{Added the opt-out \texttt{microtype
-% option}. [VN]}
+% option}. [VN]}
% \begin{macro}{\iffibeamer@microtype}
% The |microtype| option instructs the package to use the
% microtypographic extensions of modern \TeX\ engines, such as
-% \hologo{pdfTeX}, \Hologo{LuaTeX}, and (partially)
+% \hologo{pdfTeX}, \Hologo{LuaTeX}, and (with only partial support)
% \Hologo{XeLaTeX}. This option is enabled by default.
% \begin{macrocode}
\newif\iffibeamer@microtype
@@ -164,6 +178,42 @@
\ExecuteOptionsBeamer{faculty=fi}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\fibeamer@locale}
+% \subsection{The \texttt{locale} option}
+% \changes{v1.1.0:1}{2015/11/24}{Added the \texttt{locale} option
+% and the \cs{fibeamer@locale} macro. [VN]}
+% The \marg{\texttt{locale}=name} pair sets the name of the main
+% locale to \textit{name}. The \textit{name} is stored within the
+% |\fibeamer@locale| macro, whose implicit value is the main
+% language of either the \textsf{babel} or the \textsf{polyglossia}
+% package, or \texttt{english}, when undefined.
+%
+% With regards to the themes of the Masaryk University in Brno, the
+% |\fibeamer@locale| macro is not used; it only provides the
+% default value to the |\fibeamer@logoLocale| macro.
+% \begin{macrocode}
+\def\fibeamer@locale{%
+ % Babel / polyglossia detection
+ \ifx\languagename\undefined%
+ english\else\languagename\fi}
+\DeclareOptionBeamer{locale}{%
+ \def\fibeamer@locale{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\fibeamer@logoLocale}
+% \subsection{The \texttt{logoLocale} option}
+% The \marg{\texttt{logoLocale}=name} pair sets the logo file
+% locale to \textit{name}. The \textit{name} is stored within the
+% |\fibeamer@logoLocale| macro, whose implicit value is
+% |\fibeamer@locale|.
+% \changes{v1.1.0:2}{2016/01/11}{Added the \texttt{logoLocale}
+% option and the \cs{fibeamer@logoLocale} macro. [VN]}
+% \begin{macrocode}
+\def\fibeamer@logoLocale{\fibeamer@locale}
+\DeclareOptionBeamer{logoLocale}{%
+ \def\fibeamer@logoLocale{#1}}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\fibeamer@basePath}
% \subsection{The \texttt{basePath} option}
% The \marg{\texttt{basePath}=path} pair sets the \textit{path}
@@ -202,7 +252,7 @@
\else% /<path> -> /<path>/
#1#2#3#4/%
\fi
- \else%
+ \else
\if#1.%
\ifx#2\empty% . -> ./
./%
@@ -228,7 +278,7 @@
\else
\fibeamer@basePath#1#2#3#4/%
\fi
- \fi%
+ \fi
\fi}
% \end{macrocode}
% \end{macro}
@@ -238,7 +288,7 @@
% containing the theme files. The \textit{path} is normalized using
% the |\fibeamer@subdir| macro and stored within the
% |\fibeamer@stylePath| macro, whose implicit value is
-% |\fibeamer@basepath theme/|. By default, this expands to
+% |\fibeamer@basePath theme/|. By default, this expands to
% \texttt{fibeamer/theme/}.
% \begin{macrocode}
\DeclareOptionBeamer{themePath}{%
@@ -251,10 +301,10 @@
% \subsection{The \texttt{logoPath} option}
% The \marg{\texttt{logoPath}=path} pair sets the \textit{path}
% containing the logo files, which is used by the outer themes to
-% load the faculty logos. The \textit{path} is
-% normalized using the |\fibeamer@subdir| macro and stored
-% within the |\fibeamer@logoPath| macro, whose implicit value
-% is |\fibeamer@basePath| followed by |logo/\fibeamer@university/|. By
+% load the main logo. The \textit{path} is normalized using the
+% |\fibeamer@subdir| macro and stored within the
+% |\fibeamer@logoPath| macro, whose implicit value is
+% |\fibeamer@basePath| followed by |logo/\fibeamer@university|. By
% default, this expands to \texttt{fibeamer/logo/mu/}.
% \begin{macrocode}
\DeclareOptionBeamer{logoPath}{%
@@ -266,18 +316,37 @@
% \begin{macro}{\fibeamer@logo}
% \subsection{The \texttt{logo} option}
% The \marg{\texttt{logo}=filename} pair sets the prefix of the
-% filename of the logo file to be used as the faculty logo to
-% \textit{filename}. The \textit{filename} is stored within the
-% |\fibeamer@logo| macro, whose implicit value is
-% |\fibeamer@logoPath| \texttt{fibeamer-}|\fibeamer@university|%
-% \texttt{-}|\fibeamer@faculty|. By default, this expands to
-% \texttt{fibeamer/logo/mu/fibeamer-mu-fi}. The filenames of the
-% actual files are |\fibeamer@logo|-light and |\fibeamer@logo|-dark,
-% and correspond to the light and dark versions of the given logo.
+% filename of the main logo to \textit{filename}. The
+% \textit{filename} is stored within the |\fibeamer@logo| macro,
+% whose implicit value is
+% \changes{v1.1.0:1}{2015/11/24}{Changed the implicit value of the
+% \cs{fibeamer@logo} macro. [VN]}
+% |\fibeamer@logoPath| followed by
+% \texttt{fibeamer-}|\fibeamer@university|\texttt{^^A
+% \discretionary{-}{-}{-}}|\fibeamer@faculty|\texttt{-}^^A
+% |\fibeamer@logoLocale|. By default, this expands to
+% \texttt{fibeamer\discretionary{/}{/}{/}logo/fibeamer-mu-fi^^A
+% -english}.
+%
+% \changes{v1.1.0:3}{2016/01/11}{Added the \cs{fibeamer@fallbackLogo}
+% macro. [VN]}
+% The \DescribeMacro{\fibeamer@fallbackLogo}
+% |\fibeamer@fallbackLogo| macro contains the filename of the logo
+% file to be used, if |\fibeamer@logo| doesn't exist. The implicit
+% value of the |\fibeamer@fall|\discretionary{-}{}{}|backLogo| macro
+% is |\fibeamer@logoPath| followed by \texttt{fibeamer-}^^A
+% |\fibeamer@uni|\texttt{\discretionary{-}{}{}}|versity|^^A
+% |\fibeamer@faculty|\texttt{-english}. By default, this expands to
+% \texttt{fibeamer/logo\discretionary{/}{/}{/}fi\-beamer-mu-fi-^^A
+% english}.
% \begin{macrocode}
\DeclareOptionBeamer{logo}{\def\fibeamer@logo{#1}}
\ExecuteOptionsBeamer{%
- logo=\fibeamer@logoPath fibeamer-\fibeamer@university-\fibeamer@faculty}
+ logo=\fibeamer@logoPath fibeamer-\fibeamer@university-%
+ \fibeamer@faculty-\fibeamer@logoLocale}
+\def\fibeamer@fallbackLogo{%
+ \fibeamer@logoPath fibeamer-\fibeamer@university-%
+ \fibeamer@faculty-english}
% \end{macrocode}
% \end{macro}
% \section{Logic}
@@ -322,6 +391,27 @@
/beamer#1themefibeamer-\fibeamer@university-\fibeamer@faculty}}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\fibeamer@includeLogo}
+% \changes{v1.1.0:5}{2016/01/11}{Added the
+% \cs{fibeamer@includeLogo} macro. [VN]}
+% The |\fibeamer@includeLogo|\oarg{options} macro includes the
+% main logo into the document. If specified, the \textit{options}
+% are passed to the |\includegraphics| macro. The
+% |\fibeamer@includeLogo| macro requires the \textsf{etoolbox}
+% package to function.
+% \begin{macrocode}
+\fibeamer@require{etoolbox}
+\newcommand\fibeamer@includeLogo[1][]{{
+ % See <http://tex.stackexchange.com/a/39987/70941>.
+ \patchcmd{\Gin@ii}% Make `\includegraphics` use `@fallbackLogo`.
+ {\begingroup}% <search>
+ {\begingroup\renewcommand{\@latex@error}[2]{%
+ \includegraphics[#1]\fibeamer@fallbackLogo}}% <replace>
+ {}% <success>
+ {}% <failure>
+ \includegraphics[#1]\fibeamer@logo}}
+% \end{macrocode}
+% \end{macro}
% \subsection{Main routine}
% First, the theme processes the options.
% \begin{macrocode}