Uwe Siart <
use...@siart.de> writes:
> then how come that in this example (without \tracingall)
> [...]
> I can use many, many \sfracs and processing is still fast? It slows down
> as soon as "the fractions go through the throat of siunitx".
Hello Joseph,
I hope you are not huffy after my second question. I never meant to
affront you in any way. Maybe I could not express intelligibly what I
mean. After your explanation and your example I'm just wondering why
using \sfrac directly is so much faster than doing it through siunitx.
In the example below I got the sequentially elapsed times 40960, 45088
and 218103. So the first block took 4128, the second block took 173015
which is about 40 times longer. But I also see that the typographic
quality of the \si result is _a good deal_ better than what comes from
\sfrac directly.
% ---------------------------------------------------------------
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{xfrac}
\usepackage{siunitx}
\sisetup{
fraction-function = \sfrac,
per-mode = fraction,
}
\begin{document}
\the\pdfelapsedtime
\sfrac{kg}{m\textsuperscript{3}} \sfrac{kg}{m\textsuperscript{3}}
\sfrac{kg}{m\textsuperscript{3}} \sfrac{kg}{m\textsuperscript{3}}
\sfrac{kg}{m\textsuperscript{3}} \sfrac{kg}{m\textsuperscript{3}}
\sfrac{kg}{m\textsuperscript{3}} \sfrac{kg}{m\textsuperscript{3}}
\sfrac{kg}{m\textsuperscript{3}} \sfrac{kg}{m\textsuperscript{3}}
\the\pdfelapsedtime
\si{\kg\per\cubic\meter} \si{\kg\per\cubic\meter}
\si{\kg\per\cubic\meter} \si{\kg\per\cubic\meter}
\si{\kg\per\cubic\meter} \si{\kg\per\cubic\meter}
\si{\kg\per\cubic\meter} \si{\kg\per\cubic\meter}
\si{\kg\per\cubic\meter} \si{\kg\per\cubic\meter}
\the\pdfelapsedtime
\end{document}
% ---------------------------------------------------------------
--
Uwe