The mathcomp package for using Text Companion fonts in math mode ^{∗}

Tilmann Böß

             tilmann@physik.uni-wuerzburg.de

1996/10/09

1 Purpose

It always bothered me that I had to write the unit ‘μm’ with an italic ‘μ’. There is a ‘µ’ in the Text Companion (TC) fonts, and it’s available in most of the font families, shapes and series. The textcomp package provides access to the TC fonts from L^{A}TEX 2ε. But I wanted to use some of these fonts in math mode, so I decided to write a package to achieve this goal. Most of the characters don’t make sense in math mode or they are already present in the CM fonts. The useful ones are:

         $\tcohm$  �  $\tcperthousand$  ‰
         $\tccentigrade$ �  $\tcpertenthousand$  �
         $\tcmu$  µ  $\tcdigitoldstyle{0}$ 0
         ...  . . .  $\tcdigitoldstyle{9}$ 9

The names for the symbols are the same as in the textcomp package except that you have to type \tcsymbol-name instead of \textsymbol-name . Only the oldstyle digits are defined in another way, see section 2. These fonts are available for math versions ‘normal’ and ‘bold’. The fonts used are TS1/cmr/m/n for ‘normal’ and TS1/cmr/bx/n for ‘bold’. The package is based on the textcomp package^{1} by Sebastian Rahtz. This package is required because I didn’t want to declare the font encoding TS1 again. The mathcomp package is preliminary because both the TS1 encoding and the textcomp package might change in the future.

2 The code

The code is quite simple, short and obvious so there is not much to say. The package is announced (but not too loudly):

 1 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 2 \ProvidesPackage{mathcomp}[\filedate\space\fileversion\space(TBo)]

∗Preliminary version 0.1c

1Ver. 1.4, 1995/12/11

The textcomp package is loaded to define the TS1 encoding:

3 \RequirePackage{textcomp}

The new symbol font TS1/cmr/m/n is declared under the name TC. It is the default font for all math versions. For the math version ‘bold’ TS1/cmr/bx/n is defined.

4 \DeclareSymbolFont{TC}{TS1}{cmr}{m}{n}
5 \SetSymbolFont{TC}{bold}{TS1}{cmr}{bx}{n}

The symbol alphabet for the oldstyle digits is declared:

6 \DeclareSymbolFontAlphabet{\tcdigitoldstyle}{TC}

Finally, the extra symbols are defined:

7 \DeclareMathSymbol{\tcohm}{\mathalpha}{TC}{'127}
8 \DeclareMathSymbol{\tcperthousand}{\mathalpha}{TC}{'207}
9 \DeclareMathSymbol{\tccentigrade}{\mathalpha}{TC}{'211}
10 \DeclareMathSymbol{\tcpertenthousand}{\mathalpha}{TC}{'230}
11 \DeclareMathSymbol{\tcmu}{\mathalpha}{TC}{'265}