# Problem with sans serif using LibertinusT1math

I like to use the text font Libertine and math font LibertinusT1Math.

Is there a way to setup the math font LibertinusT1Math globally to sans serif?

In my example I tried out a local switch

\begin{equation*}
\sf  3^{x^2}-\ln(x)+\sqrt[5]{x\cdot 6-3}=\ell_{av}
\end{equation*}


However the "x" within the root isn't sans serif and the operator "ln" neither.

Any ideas how to correct that and set this mathfont globally to sans serif?

Any help appreciated.

Kind regards,

Thomas

\documentclass{article}
\usepackage[sb,sfdefault]{libertine} % use sb in place of bold
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertinust1math}

\thickmuskip 2.5mu plus 2mu minus 0.5mu \thinmuskip 2mu \medmuskip 2.5mu plus 1.5mu minus 0.5mu\relax

\begin{document}

Dies ist ein kleiner Test zur Schrift LibertinusT1Math,

\begin{equation*}
\sf  3^{x^2}-\ln(x)+\sqrt[5]{x\cdot 6-3}=\ell_{av}
\end{equation*}

\begin{equation*}
\mathsf{ 3^{x^2}-\ln(x)+\sqrt[6]{x\cdot 6-3}=\ell_{av}}
\end{equation*}

\end{document}

• \sf is 20+ years obsolete. It ought not be used in LaTeX, even in text mode. – cfr Jul 24 '17 at 13:20
• You cannot use the sans font here without rewriting large chunks of the style file by redeclaring everything. Even if you do that, it won't look good because you'll not have the symbols and so on designed to complement the serif maths. If you must have sans maths, pick a different font. If you must use this font family, stick with serif maths. It is not a good idea to use sans for the body of your document text, either, unless you are preparing a poster, presentation or similar. – cfr Jul 24 '17 at 13:50

The package has a sansmath option which seems to work ok:

\documentclass{article}
\usepackage[sb,sfdefault]{libertine} % use sb in place of bold
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[sansmath]{libertinust1math}

\thickmuskip 2.5mu plus 2mu minus 0.5mu \thinmuskip 2mu \medmuskip 2.5mu plus 1.5mu minus 0.5mu\relax

\begin{document}

Dies ist ein kleiner Test zur Schrift LibertinusT1Math,

\begin{equation*}
3^{x^2}-\ln(x)+\sqrt[5]{x\cdot 6-3}=\ell_{av}
\end{equation*}

\begin{equation*}
3^{x^2}-\ln(x)+\sqrt[6]{x\cdot 6-3}=\ell_{av}
\end{equation*}

\end{document}


• that is new integrated in september from Michael Sharp. The date I asked my question it was not possible. Thanks for this information. – user139826 Oct 31 '17 at 14:51