4

Possible Duplicate:
Make mathfont respect the surrounding family

This question is similar to the Bold, italic math (\bm) and sansmath question, but with a few more requirements.

I am making a document in which most of the text is serif, but some paragraphs (and section headings) are completely formatted in sans-serif + bold. For consistency, I would like any formulas that are contained within these paragraphs to also be entirely (symbols, numerals, operators, everything) sans-serif + bold.

Here is a short example code of what I'm trying to do:

\documentclass{article} %compile with pdfLaTeX

\usepackage[T1]{fontenc}
\renewcommand\sfdefault{cmbr}
\usepackage{sansmath}

\begin{document}

\section{``Normal'' Computer Modern. This math is bold: \boldmath $x^2_i+2$. \unboldmath This math is not bold: $x^2_i+2$.}

This text is Computer Modern, serif, non bold. The following math is CM also. $$x^3 = \int\limits_0^t 3\log{u}\,\mathrm{d}u$$

\begin{sansmath}

\section{\sffamily Computer Modern Bright. This math should be bold \& sans: \boldmath $x^2_i+2$. \unboldmath This math is not bold: $x^2_i+2$.}

{\sffamily
This text is Computer Modern Bright, sans-serif, non bold. The following math is CM-Bright also. $$x^3 = \int\limits_0^t 3\log{u}\,\mathsf{d}u$$ }

{\sffamily \bfseries 
And I would like this text, and the section header, to be Computer Modern Bright, sans-serif, bold. As you can see, not all the math in the title of this section is formatted this way---the variables that should be bold are not bold (but are sans) and the numerals are not sans but are bold.  The following math should be CM-Bright bold and sans also (same problem as in section header---variables not bold, numbers not sans). \boldmath  $$x^3 = \int\limits_0^t 3\log{u}\,\mathsf{d}u$$ 

This is a little closer, but some things are still serif, and now the variables are bold but not italicized anymore: $\bf x^3 = \int\limits_0^t 3\log{u}\,\mathrm{d}u$. }

\end{sansmath}

\end{document}

Doing something similar to this didn't work for me (bolding resulted in reversion to serif math font for variables).

Is there a way to make all math elements bold (without changing font or italicization) within a sansmath environment? Any insights would be appreciated!

0

0

Browse other questions tagged .