10

I’m trying to have all the math components of my table in \mathsf and \mathbf. I thought I’d use \everymath to set the \scriptscriptstyle, \mathbf and \mathsf, but I’m not able to figure it out.

\boldmath
\everymath{\scriptscriptstyle\mathsf}

Any ideas?

1

2 Answers 2

12

\mathsf takes an argument, it doesn't make the following expression sans serif. You can switch to math sans serif, then get the underlying \mathgroup (\fam) number and then set that for the entire math expression:

\documentclass{article}

\begin{document}
\boldmath
\everymath{\mathsf{\xdef\mysf{\mathgroup\the\mathgroup\relax}}\mysf}

$abc$


\end{document}
3
  • that works..thx.. But how can I at the same time apply the scriptscriptstyle?
    – Misha
    Commented Apr 1, 2012 at 11:50
  • oo I forgot that one just put \scriptscriptstyle before the last \mysf Commented Apr 1, 2012 at 12:03
  • Thx a million...
    – Misha
    Commented Apr 1, 2012 at 13:48
4

After a bit of trial and error, I've found that the following also seems to work:

\everymath\expandafter{\the\everymath\sf}
\everydisplay\expandafter{\the\everydisplay\sf}

You must log in to answer this question.

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