3

I'd like to italicize the letter in the following code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\pmb{\mathsf{z}}$
\end{document}

I've already read the discussion in this thread, but it does not offer a solution for the \pmb command. Any help?

P.S. Since I've already used \boldsymbol, I would like to use a different notation style for the letter above.

bluepole
  • 529
  • Why you don't use \mathit{}? \mathsf is for serifless letters (in math mode) –  Jan 29 '16 at 17:44
  • @ChristianHupfer Thanks for the suggestion. The reason is that I want to differentiate two notation styles and \mathit{} has already been used. – bluepole Jan 29 '16 at 17:48
  • Well, this is confusing: You already have \mathit? –  Jan 29 '16 at 17:53
  • @ChristianHupfer Sorry, actually no, I didn't use \mathit. Instead I've already used boldsymbol{}. And now I want to use a different style for differentiation purpose. – bluepole Jan 29 '16 at 17:56
  • You wrote that \mathit is already been used. Your question does not show the slightest indication that sf is wanted too! Slanted sf is not possible with every font –  Jan 29 '16 at 17:57
  • @ChristianHupfer Sorry I misstated in my first comment above. – bluepole Jan 29 '16 at 18:00

2 Answers2

6

The Computer Modern fonts lack sans serif boldface slanted, but the Latin Modern fonts have it.

\documentclass{article}
\usepackage{amsmath}

\DeclareMathAlphabet{\mathsfit}{OT1}{lmss}{m}{sl}
\DeclareMathAlphabet{\mathsfbfit}{OT1}{lmss}{bx}{sl}

\begin{document}
$\mathsfit{z}\ne\mathsfbfit{z}$
\end{document}

enter image description here

A slightly different solution that avoids wasting a math group (useful if you happen to use up them all):

\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}

\DeclareMathAlphabet{\mathsfit}{OT1}{lmss}{m}{sl}
\SetMathAlphabet{\mathsfit}{bold}{OT1}{lmss}{bx}{sl}

\begin{document}
$\mathsfit{z}\ne\bm{\mathsfit{z}}$
\end{document}
egreg
  • 1,121,712
2

For making Math appear Sans Serif, you can load cmbright, but this will make all math like that. You can see this question for switching between it and none: Make mathfont respect the surrounding family

You can then use \boldsymbol{} for making it bold.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{cmbright}
\begin{document}
$\boldsymbol{z}$
\end{document}
Alenanno
  • 37,338