Today's Random Photos:
René van Bevern
view out of a train window


Using the LaTeX package times can be used apply the narrow Times font. This helps in getting more content on fewer pages. Because the letters in the Times font are bolder than the letters of the default Computer Modern font, the combination of Times in text and Computer Modern in formulas looks strange. There are basically two usable times packages with math support in LaTeX. Unfortunately, each has its own deficiencies, which I try to circumvent in this article. The package txfonts produces nice calligraphic characters using \mathcal (the G below) and nice summation signs, but it's spacing after the italic S is awkward:

The mathptmx package does not have this problem, but its summation sign and the calligraphic letters produced by \mathcal look over-the-top (left) and we would rather have the default Computer Modern sumbols for these (right):

mathptmx package with bold summation sign and over-the-top mathcalsmathptmx with mathcals and summation sign from Computer Modern

Fixing txfonts

Basically, we just load txfonts but use the mathematic latin letters from the mathptmx package, which provides better font metrics that does not show the strange spacing after the italic S. This can be done using the following preamble lines:

\usepackage{txfonts}
\let\mathbb=\varmathbb
\DeclareSymbolFont{letters}{OML}{ztmcm}{m}{it}

Fixing mathptmx

Here, we load mathptmx but load the big operators and calligraphic characters from Computer Modern. The calligraphic characters of Computer Modern are not as thin as the other types from the font. Still, it does not look absolutely right. So, I prefer to fix the txfonts package. To achieve the above right result, you can use the following preamble lines to use mathptmx with calligraphic characters and big operators from Computer Modern:

\documentclass[12pt]{article}
\usepackage{mathptmx}
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}

\begin{document}
For each $H\in\mathcal H$, one has \[ \sum_{h\in H}c=1. \]
\end{document}

© 2010 René van Bevern. Last modified 2010-03-23.