The package \nicefrac
is a very useful tool for small fractions. In the documentation, it says that a font command optional argument can be given, but no example is provided. Specification:
\nicefrac[<fontcmd>]{<num>}{<denom>}
we only have a reference to fntguide.dvi
. However, that guide is a bit cryptic.
Is it possible to have a few examples how fontcmd
can be specified? Let's say I would want (a) a fraction using slightly bigger font; (b) a fraction using roman font numbers; (c) a fraction using bold numbers; (d) a fraction using something wild (to your appreciation ;-).
\nicefrac[\texttt]{1}{2}
or$\nicefrac[\mathcal]{A}{B}$
\nicefrac[\LARGE]{a}{b}
but then alignments are wrong. I though with finer adjustments to the fontcmd, I would get properly aligned components.{\LARGE\nicefrac{a}{b}}
. However I think the result withxfrac
looks better:{\LARGE\sfrac{a}{b}}
\texttt
or\mathcal
) and does not change the size, since making a size change there won't change the size of the solidus. Hence the size change before\nicefrac