0

The problem

I use unicode-math and lualatex and for beamer presentations, I want a fully compatible OTF sans serif font (that looks good with Myriad Pro unlike GFSNeohellenicMath). Kp-Math-Sans works and isn't lacking any symbols like Fira-Math. Sadly, parentheses and right brackets can't be scaled up (not even with \big) although it works fine with Kp-Math-Regular.

Using unicode-math:

With unicode-math

Using kp-fonts (which loads the T1 font and does too much):

With kp-fonts

However, these two packages are incompatible with each other.

I also tried loading only ranges, but this only caused problems with scaling: Only Neohellenic (\setmathfont[version=sf]{GFSNeohellenicMath}):

Neohellenic

Both ( \setmathfont[version=sf]{GFSNeohellenicMath} \setmathfont[ range={up, it, bb, frak, cal, scr, sfup, sfit, bfup,bfit, bfcal}, version=sf ]{KpMath-Sans}):

NeohellenicThenKpMathSans

In this case everything was taken from KpMath-Sans (the pdf didn't contain NeoHellenic)

I also tried different combinations with Fira-Math but that even introduced division by 0 errors because the sizes of characters probably got messed up.

The question

Is there a way to combine fonts such that I can get correctly scaling braces? It would be extremely impractical to change all scaling braces to the proposed solution in this old related post: unicode-math and braces scaling.

Also it seems that kp-math-Sans doesn't have the problem diagnosed there (not being a OTF-Math font).

Is there maybe a working version of the OTF file somewhere out there? Or can I load the T1 font in a way consistent with all the unicode-math stuff?

The minimal example from the pictures:

\documentclass{article}
\usepackage[nott, notext, notextcomp]{kpfonts}
% \usepackage{unicode-math}
% \setmathfont{Kp-Math-Regular}
% \setmathfont[version = sf]{KpMath-Sans}
\begin{document}
Normal:
$\left(\begin{matrix}
    ff\\gg\\gg\\hh
\end{matrix} \right)$ \quad
$\big(()\big)$ \quad
\mathversion{sf}
Sans Serif:
$\left[ \begin{matrix}
    ff\\gg\\gg\\hh
\end{matrix} \right]$ \quad 
$\left(\begin{matrix}
    ff\\gg\\gg\\hh
\end{matrix} \right)$ \quad
$\big(()\big)$
\end{document}

1 Answer 1

0

With LuaTeX or XeTeX you should use the OTF version of the kpfonts.

This works fine for me:

\documentclass{article}
\usepackage{kpfonts-otf}
\setmathfont{KpMath-Sans.otf}[version=sf]
\begin{document}
Normal:
$\left(\begin{matrix}
ff\\gg\\gg\\hh
\end{matrix} \right)$ \quad
$\big(()\big)$ \quad
\mathversion{sf}
Sans Serif:
$\left[ \begin{matrix}
ff\\gg\\gg\\hh
\end{matrix} \right]$ \quad
$\left(\begin{matrix}
ff\\gg\\gg\\hh
\end{matrix} \right)$ \quad
$\big(()\big)$

\end{document}

PDF output

2
  • Downloading the otf file from CTAN fixed it (it is 270 kB instead of 267 now). So maybe they fixed this issue since I first downloaded it. Jun 15, 2021 at 14:41
  • Yes, the issue has been fixed recently in version 0.36 of the kpfonts-otf. Jun 15, 2021 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.