From 958e981c378665f6b2e48ed17af772f54e46f8be Mon Sep 17 00:00:00 2001 From: Meik Hellmund Date: Fri, 18 Jun 2021 16:29:04 +0200 Subject: [PATCH] options changed --- .gitignore | 5 +++-- beamerthemeleipzig.sty | 38 ++++++++++++++++++++------------------ tst.tex | 12 +++++------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index e0944cd..b14d65a 100644 --- a/.gitignore +++ b/.gitignore @@ -66,8 +66,9 @@ _minted* *~ .#* -# gnuplot +# gnuplot in this docu *.gnuplot -# tests + +# my tests tst*.pdf diff --git a/beamerthemeleipzig.sty b/beamerthemeleipzig.sty index d6f1e04..c6c19e1 100644 --- a/beamerthemeleipzig.sty +++ b/beamerthemeleipzig.sty @@ -76,13 +76,14 @@ %--------------------------------------------------------------------- \RequirePackage{tikz} \RequirePackage{eso-pic} +\RequirePackage{iftex} %--------------------------------------------------------------------- % Package Options %--------------------------------------------------------------------- \newif\if@doSans -\@doSansfalse -\DeclareOption{noserifmath}{\@doSanstrue} +\@doSanstrue +\DeclareOption{serifmath}{\@doSansfalse} \newif\if@doSectionPage \@doSectionPagefalse \DeclareOption{nosectionpages}{\@doSectionPagetrue} @@ -94,25 +95,26 @@ %--------------------------------------------------------------------- % Specification %--------------------------------------------------------------------- -% \if@doSans% -% % sans serif math % -% \usepackage[no-math]{fontspec}% -% \setmainfont{Arial}% -% \else% -% % serif math % -% \usepackage{fontspec}% -% \usefonttheme[onlymath]{serif}% -% \fi% -% \newfontfamily\Light{Arial}% -% \newfontfamily\Bold{Arial-Bold}% -% \setsansfont{Arial}% +\ifpdftex% + \RequirePackage[T1]{fontenc} +\else\ifxetex + \RequirePackage{fontspec} +\else\ifluatex + \RequirePackage{fontspec} +\fi\fi\fi + \RequirePackage[sfdefault,lining]{FiraSans} -%\RequirePackage[fakebold]{firamath-otf} -%\RequirePackage{newtxsf} -\RequirePackage[T1]{fontenc} \RequirePackage[nomap]{FiraMono} - + +\if@doSans% + % sans serif math % + \RequirePackage{newtxsf}% +\else% + % serif math % + \usefonttheme[onlymath]{serif}% +\fi% + \let\Bold\firasemibold% \let\Light\firalight% \let\Normal\firabook% diff --git a/tst.tex b/tst.tex index f4758a8..a8d4db0 100644 --- a/tst.tex +++ b/tst.tex @@ -1,4 +1,4 @@ -\documentclass[noserifmath,aspectratio=169]{beamer} +\documentclass[serifmath,aspectratio=169]{beamer} \usetheme{leipzig} @@ -9,12 +9,12 @@ \title[Leipzig]{Leipzig} \subtitle[Beamer Theme]{Beamer theme} \author{Author} -\institute{Institute} +\institute{Institute of Mathematics} \date{\today} \titlegraphic{} \location{Leipzig} \thankstitle{Thank You!} -\address{Beethovenstraße 15, 04107 Leipzig} +\address{Augustusplatz 10, 04109 Leipzig} \email{example@uni-leipzig.de} \phone{+49 1234 5678910} %\website{} @@ -39,13 +39,13 @@ Enable the theme by loading \usetheme{leipzig} \end{verbatim} -Note that this package only works with XeTeX/XeLaTeX, as it depends on \texttt{fontspec}. \end{frame} \section{Elements} \begin{frame}[fragile]{Package Options} \begin{description} -\item[\texttt{noserifmath}] displays math using Arial +\item[\texttt{serifmath}] displays math with serifs, using the + traditional CM fonts \item[\texttt{nosectionpages}] hides section pages. \item[\texttt{aspectratio=169}] to enable 16:9 aspect ratio (default is 4:3) \end{description} @@ -109,8 +109,6 @@ You can \emph{emphasize} text, \alert{accent} parts or show \textbf{bold} result \begin{enumerate} \item First \item Second \item Last \end{enumerate} - - $$ Y = X^3 =\int \alpha^2\log (aeqwvnm) $$ \column{0.33\textwidth} Descriptions \begin{description}