Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Maybe this question is interesting for you: tex.stackexchange.com/q/33165/4918 (no duplicate) –  Tobi Apr 1 '12 at 12:25

2 Answers 2

up vote 9 down vote accepted

\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}
share|improve this answer
    
that works..thx.. But how can I at the same time apply the scriptscriptstyle? –  Misha Apr 1 '12 at 11:50
    
oo I forgot that one just put \scriptscriptstyle before the last \mysf –  David Carlisle Apr 1 '12 at 12:03
    
Thx a million... –  Misha Apr 1 '12 at 13:48

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.