5

Is it possible to use unicode-math to fake sans serif Greek math letters? I use \symsfit{x}(f) for the Fourier transform of x(t). I would like it to work for Greek function variables too. Can I, for example, use one standard font and let Greek sans serif letters, eg \symsfit{\phi}, be set in a different font, so that it can be told apart from its transform \phi?

2
  • 1
    There is only bold sans-serif greek in Unicode. I have no idea why. You can access it via \symbfsfit{\phi}. Jul 28, 2016 at 18:13
  • @HenriMenke That works but is not the prettiest solution, the bold font can be too heavy.
    – MunHo
    Jul 28, 2016 at 18:58

2 Answers 2

2
\documentclass{article}
\usepackage{amsmath}
\usepackage[math-style=literal]{unicode-math}
\setmathfont{XITSMath}
\setmathfont[range=up/{greek,Greek}]{FiraMath-Regular.otf}    
\begin{document}

\[ \mupGamma(\mupvarphi,\muptheta)=\mupbeta \]
\[ \Gamma(\varphi,\theta) =\beta \]

\end{document}

enter image description here

1

Old question, but it deserves an answer.

One way to get sans-serif medium-weight Greek letters is to load a Greek font as a math font face, and select that. Unless the font has mathematical alphanumeric symbols, you must use the upright characters for this to work:

\tracinglostchars=2
\documentclass{article}
\usepackage{unicode-math}

\pagestyle{empty} % Remove the page number from the MWE.

\defaultfontfeatures{ Scale = MatchLowercase, Ligatures = TeX }
\setmainfont{CMU Serif}[Scale=1.0]
\setmathfont{Latin Modern Math}
%% Available from:
%% https://www.greekfontsociety-gfs.gr/typefaces/20th_21st_century
\setmathfontface\greeksfup{GFS Orpheus Sans}

\begin{document}
\[ \greeksfup{\mupGamma}( \greeksfup{\mupvarphi}, \greeksfup{\muptheta} ) =
   \greeksfup{\mupbeta} \]
\end{document}

GFS Orpheus Sans font sample

Note that you can load an italic font face; however, you must use the Unicode Basic Mulitlingual Plane codepoints. You could instead declare \msfalpha, etc. and type those.

Another approach is to load a sans-serif font as a math version. Here, I define \sansmath and \sanssymbol commands analogous to \boldmath and \boldsymbol:

\tracinglostchars=2
\documentclass{article}
\usepackage[math-style=ISO]{unicode-math}

\pagestyle{empty} % Remove the page number from the MWE.

\defaultfontfeatures{ Scale = MatchLowercase, Ligatures = TeX }
\setmainfont{CMU Serif}[Scale=1.0]
\setmathfont{Latin Modern Math}
\setmathfont[version=sans]{Fira Math}

\makeatletter
\newcommand\sansmath{\mathversion{sans}}
%% Based on the definition of \boldsymbol from amsbsy.sty"
\DeclareRobustCommand{\sanssymbol}[1]{%
  \begingroup%
  \let\@nomath\@gobble \mathversion{sans}%
  \math@atom{#1}{%
  \mathchoice%
    {\hbox{$\m@th\displaystyle#1$}}%
    {\hbox{$\m@th\textstyle#1$}}%
    {\hbox{$\m@th\scriptstyle#1$}}%
    {\hbox{$\m@th\scriptscriptstyle#1$}}}%
  \endgroup}
\makeatother

\begin{document}
\[ \sanssymbol{\Gamma}( \sanssymbol{\varphi}, \sanssymbol{\theta} ) =
   \sanssymbol{\beta} \]
\end{document}

Fira Math font sample

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .