Let me state my "problem" first. When using PdfLateX my .tex
file compiles rather swiftly and all is fine. I use TeXStudio and make use of the PDF preview feature. Since my LaTeX fu isn't the strongest, I compile quite often (to see if I broke something recently; and yes I make use of a version control system as well).
Now using PdfLaTeX we're talking about 3 to 3.5 seconds for it to compile.
Recently I added \usepackage{fontawesome}
which apparently requires XeLaTex or LuaLaTex. Trying out the two options only LuaLaTeX was left, as the other one errored out.
I use the fontawesome
package to get a symbol for external links onto each \href
for which I define my own command, though (see below).
Now what I noticed once I switched to LuaLaTeX was that it takes considerably longer to compile the document: 10 seconds.
So my thought process was the following: if I could detect the presence of LuaLaTeX, I could conditionally include the parts that are "offending" to PdfLaTeX.
Is it possible to do that, i.e. distinguish between PdfLaTeX and LuaLaTeX?
Without fontawesome
\documentclass[12pt,a4paper,oneside]{book}
% ... a bunch of packages, including hyperref
% define \linkclr
\newcommand{\extlink}[2]{\href{#1}{\linkclr{#2}}}
% ... actual document
With fontawesome
\documentclass[12pt,a4paper,oneside]{book}
% ... a bunch of packages
\usepackage{fontawesome}
% ... more packages, including hyperref
% define \linkclr
\newcommand{\extlink}[2]{\href{#1}{\linkclr{#2}\,{\small\faExternalLink}}}
% ... actual document
Yes, I realize that this "complaint" about speed is laughable with respect to the speeds from some years ago. But if not for the speed, please consider answering it to satisfy my curiosity.