Less vertical space in frac
The positioning of numerators and denominators is controlled by a font parameter that can easily be modified in LuaLaTeX:
\documentclass[pagesize=auto, version=last]{scrartcl}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{luacode}
\usepackage{luatexbase-mcb}
\setmathfont{Cambria Math}
\setmainfont{Cambria}
\begin{luacode*}
local function patch_cambria_frac(fontdata)
if fontdata.psname == "CambriaMath" then
local mc = fontdata.MathConstants
mc.FractionNumeratorShiftUp = 0.4 * mc.FractionNumeratorShiftUp
mc.FractionDenominatorShiftDown = 0.4 * mc.FractionDenominatorShiftDown
end
end
luatexbase.add_to_callback("luaotfload.patch_font", patch_cambria_frac, "cambria_frac")
\end{luacode*}
\begin{document}
$\frac{19}{30}$
\end{document}
Maybe this does help you
\usepackage{amsmath} % load before unicode-math
\def\superfrac#1#2{\raisebox{.3ex}{\ensuremath{\genfrac{}{}{}2{#1}{#2}}}}
In the document you can use it as \superfrac{19}{30}
.
The vertical alignment (.3ex
) may need to be adjusted.
The 2
denotes the scriptstyle
.
Todd Lehmann has created some interesting macros: Improved kerning in fractions?