gnu-music-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: latex units


From: Arjen Bax
Subject: RE: latex units
Date: Fri, 22 Sep 2000 09:24:12 +0200

Aloha,

On Thursday, September 21, 2000 10:39 PM, Tom Cato Amundsen
[mailto:address@hidden writes:

> Does anyone know how to find out how big 1em and 1ex are in 10, 11
> and 12pt fonts in latex?
>   em = approximately the width of an "M" in the current font
>   ex = approximately the height of an "x" in the current font

The size of the units em and ex is dependent of the font in use and
defined by the font designer. They are in principle arbitrary, but
usually in a X pt font, 1em is X pt.

TeX the following (note: tex not latex, but the principle is the same)
and read the dvi-output:

%%%% start here

\newdimen\testem
\newdimen\testex

{\font\testfont=cmr10\relax \testfont
\global\testem = 1em \relax
\global\testex = 1ex \relax}%
cmr10: 1em = \the\testem, 1ex = \the\testex

{\font\testfont=cmr12\relax \testfont
\global\testem = 1em \relax
\global\testex = 1ex \relax}%
cmr12: 1em = \the\testem, 1ex = \the\testex

{\font\testfont=feta20\relax \testfont
\global\testem = 1em \relax
\global\testex = 1ex \relax}%
feta20: 1em = \the\testem, 1ex = \the\testex

\bye
%%%% end here

Prepare for some roundoff errors.

Arjen Bax

P.S. Why do I get most (not all) e-mails twice from
address@hidden

-- 
CMG Noord-Nederland B.V.
Sector Telecommunications & Utilities
Postbus 70237, 9704 AE  Groningen
Tel. (050)52 19 500, Fax (050)52 19 503

The first myth of management is that it exists.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]