2

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.

  • Why you don't use \mathit{}? \mathsf is for serifless letters (in math mode) – user31729 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? – user31729 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 – user31729 Jan 29 '16 at 17:57
5

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}
  • This seems very simple and straightforward. And it's exactly what I'm looking for. Thanks! – bluepole Jan 29 '16 at 18:06
  • @bluepole I added a different solution in case you run out of math groups. – egreg Jan 29 '16 at 18:39
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}
  • Thanks. Unfortunately I'd like to differentiate two notation styles, so cmbright would not work for me. – bluepole Jan 29 '16 at 17:58
  • @bluepole You can differentiate. It's just gonna take some code. See the linked question. – Alenanno Jan 29 '16 at 17:59

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.