# How do I get the concrete font for math only?

Is there a package that loads the concrete font, but only for the math, not for the normal text?

-
Please have a look at this site: tug.dk/FontCatalogue/math.html –  Marco Daniel Dec 30 '11 at 23:20

## 3 Answers

Using How To Change Math Font Only? as a guide, here's what you can do:

\documentclass{article}
\usepackage{amsmath}% http;//ctan.org/pkg/amsmath
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{ccfonts}% http://ctan.org/pkg/{ccfonts}
\usepackage[T1]{fontenc}% http://ctan.or/pkg/fontenc
\renewcommand{\rmdefault}{cmr}% cmr = Computer Modern Roman
\begin{document}
\lipsum[1]
$$\frac{1}{2\pi}\int_\gamma f=\sum_{k=1}^m n(\gamma;a_k)\mathrm{Res}(f;a_k) \label{eq}$$
Take a look at $n(\gamma;a_k)$ in~\eqref{eq}.
\end{document}


Note that inline (or text style) and display math both use Concrete, while the equation numbers are set in Computer Modern.

The idea is, as mentioned in the linked post, you set the entire font change, and revert \rmdefault back to the font of your choice - cmr (or Computer Modern Roman) in this case.

If you're using other type face families, like \textsf and \texttt, these have to be modified (reverted as well):

\renewcommand{\ttdefault}{cmtt}% cmtt = Computer Modern Typewriter
\renewcommand{\sfdefault}{cmss}% cmss = Computer Modern Sans-Serif

-

You can save the default font families before loading ccfonts and then restore them; load any other font package before the code marked "save defaults". In this way you don't need to know what names have the three main font families.

\documentclass[a4paper]{article}

%%% save defaults
\edef\keptrmdefault{\rmdefault}
\edef\keptsfdefault{\sfdefault}
\edef\keptttdefault{\ttdefault}

\usepackage{ccfonts}

%%% restore defaults
\edef\rmdefault{\keptrmdefault}
\edef\sfdefault{\keptsfdefault}
\edef\ttdefault{\keptttdefault}

\usepackage{kantlipsum}
\begin{document}
\kant*[1]
$a+b=\sin\alpha+e^{\beta}-\sum_{i=1}^n x_i$
\kant[2]
\end{document}


-

The Concrete Roman font is a pure text font; unlike Computer Modern, there's no built-in math font in this family. The textbook Concrete Mathematics authored by Graham, Knuth, and Patashnik used (unsurprisingly) the Concrete Roman text font along with the Euler math font family.

To employ the Euler math font family, you could load the eulervm package.

-