Skip to content

Commit

Permalink
add LuaTeX support and use it as the default engine
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelroland committed Oct 17, 2024
1 parent d945c75 commit 5059735
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
25 changes: 16 additions & 9 deletions beamerfontthemejku.sty
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@
\RequirePackage{etoolbox}
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{ifxetex}
\RequirePackage{iftex}
% legacy packages prior to merge into iftex; still relevant?
\@ifundefined{ifluatex}{%
\RequirePackage{ifluatex}
}{}
\@ifundefined{ifxetex}{%
\RequirePackage{ifxetex}
}{}
\RequirePackage{listings}
\RequirePackage{verbatim}

Expand Down Expand Up @@ -97,29 +104,29 @@

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Fancy fonts with XeTeX
%% Fancy fonts with LuaTeX/XeTeX
%%

\RequirePackage{lmodern}
\RequirePackage{inconsolata}
\RequirePackage{helvet}
\ifxetex\else%
\ifluatex\else\ifxetex\else%
\RequirePackage{euler}
\fi
\fi\fi
\RequirePackage{fontawesome5}
\ifxetex\else%
\ifluatex\else\ifxetex\else%
% fix potentially mis-packaged FA5 in TeX Live 2017, see https://tex.stackexchange.com/q/497792/290236
\pdfmapfile{=fontawesome5.map}%
\fi
\fi\fi
%\usefonttheme{serif}
\usefonttheme{professionalfonts}

\ifxetex\else%
\ifluatex\else\ifxetex\else%
\ifbool{jkubeamer@xetexfonts}{%
\PackageWarning{beamerfontthemejku}{True-type fonts are only supported on XeLaTeX. Please consider switching to XeLaTeX to get the full look and feel of this beamer template. Note that you can silence this warning with the `nofancyfonts' option.}%
\PackageWarning{beamerfontthemejku}{True-type fonts are only supported on LuaLaTeX/XeLaTeX. Please consider switching to LuaLaTeX (or XeLaTex) to get the full look and feel of this beamer template. Note that you can silence this warning with the `nofancyfonts' option.}%
}{}%
\boolfalse{jkubeamer@xetexfonts}%
\fi
\fi\fi

\ifbool{jkubeamer@xetexfonts}{%
\ifbool{jkubeamer@eulermath}{
Expand Down
16 changes: 9 additions & 7 deletions main.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% !TeX program = xelatex
% !TeX program = lualatex
% !TeX encoding = UTF-8
% !TeX spellcheck = en_US
% !BIB program = biber
Expand All @@ -7,9 +7,11 @@
%% to compile your LaTeX source file. If your tool does not support these magic comments,
%% you will need to make appropriate manual choices.
%%
%% You can safely use "pdflatex" instead of "xelatex" if you prefer the pdfLaTeX toolchain.
%% You can safely use "pdflatex" instead of "lualatex" if you prefer the pdfLaTeX toolchain.
%% However, pdfLaTeX will not be able to deliver the professional font experience that you
%% will get with XeLaTeX.
%% will get with LuaLaTeX. You can also safely use "xelatex" instead of "lualatex" while
%% preserving the professional font experience if you prefer the XeLaTeX toolchain (or if
%% LuaLaTeX does not work for you for whatever reasons).
%%
%% _Important_: These magic comments should be on the first lines of your source file.
%%
Expand Down Expand Up @@ -274,7 +276,7 @@ \section{Prerequisites}
\item Download the latest version of the theme package from \url{https://github.com/michaelroland/jku-templates-presentation-latex}.
\item Extract its contents (unzip) and move the files to a location on your computer where {\LaTeX} will find them. The most portable choice is the folder of your main presentation file.
\item Use \texttt{main.tex} (the source of this presentation) as a starting point for building your own presentation. It contains detailed guides about the various package options.
\item Use \texttt{xelatex} as the {\LaTeX} typesetting engine (because it includes enhanced font support). \texttt{pdflatex} is also supported but does not deliver the full theme experience.
\item Use \texttt{lualatex} (or \texttt{xelatex}) as the {\LaTeX} typesetting engine (because it includes enhanced font support). \texttt{pdflatex} is also supported but does not deliver the full theme experience.
\end{itemize}
\end{frame}

Expand All @@ -292,24 +294,24 @@ \section{Prerequisites}
\item \texttt{datetime2}
\item \texttt{etoolbox}
\item \texttt{fontawesome5}
\item \texttt{fontspec} (only with XeTeX)
\item \texttt{hyperref}
\item \texttt{fontspec} (only with LuaLaTeX/XeTeX)
\end{itemize}

\column{0.4\textwidth}
\begin{itemize}
\item \texttt{hyperref}
\item \texttt{iftex}
\item \texttt{inconsolata}
\item \texttt{listings}
\item \texttt{lm}
\item \texttt{pgf}
\item \texttt{psnfss}
\item \texttt{translations}
\item \texttt{xkeyval}
\end{itemize}

\column{0.2\textwidth}
\begin{itemize}
\item \texttt{xkeyval}
\item \texttt{xcolor}
\end{itemize}
\end{columns}
Expand Down

0 comments on commit 5059735

Please sign in to comment.