Discussion:
numerals in small caps font?
(too old to reply)
Dan Lenski
2005-12-07 05:10:52 UTC
Permalink
Hi,
I am using pdflatex to write an electronics project report, with the
Times package.

I am using the small caps font to denote the name of a pin on an
integrated circuit, e.g.
____
RB6 or INIT

The problem I have is that in the small caps font, numerals are the same
height as *big* capital letters, whereas I would like them to appear the
same size as the *small* capital letters. Does anyone know of a Latex
package that will make the numerals the same size as the *small* capitals?

Thanks in advance!

Dan Lenski
Will Robertson
2005-12-07 07:01:51 UTC
Permalink
Post by Dan Lenski
The problem I have is that in the small caps font, numerals are the same
height as *big* capital letters, whereas I would like them to appear the
same size as the *small* capital letters. Does anyone know of a Latex
package that will make the numerals the same size as the *small* capitals?
You need old-style figures, which the free Times fonts don't have.
Either use Palatino, which does it easily, like so:

\documentclass[12pt]{article}
\usepackage[osf]{mathpazo}
\begin{document}
\textsc{123abc}
\end{document}

Or use the FPL-Neu fonts, available on CTAN, which are an improved
version of Palatino.

Computer Modern does have old-style numbers, but they're a bit ugly in
my eyes. They must also be selected specifically, which actually may be
a good thing depending on your needs.

\documentclass[12pt]{article}
\begin{document}
\scshape\oldstylenums{123}abc
\end{document}

Also look at the eco and oldstyle packages (something similar needs to
be done for Latin Modern).

Hope this helps,

Will
Dan Lenski
2005-12-07 08:07:37 UTC
Permalink
Post by Will Robertson
Post by Dan Lenski
The problem I have is that in the small caps font, numerals are the same
height as *big* capital letters, whereas I would like them to appear the
same size as the *small* capital letters. Does anyone know of a Latex
package that will make the numerals the same size as the *small* capitals?
You need old-style figures, which the free Times fonts don't have.
\documentclass[12pt]{article}
\usepackage[osf]{mathpazo}
\begin{document}
\textsc{123abc}
\end{document}
Thanks, Will!

I tried just the \oldstylenumbers{} trick, and that
seems to work fine, even though I'm using the Times package. I've never
been able to wrap my head around the way that LaTeX deals with fonts, so
I'm not sure why it works.

The old style numbers look a little funny because they are shifted
downwards, but it's way better than how it was before. I'll try those
packages you mentioned.

Dan Lenski
Will Robertson
2005-12-07 09:18:00 UTC
Permalink
Post by Dan Lenski
I tried just the \oldstylenumbers{} trick, and that
seems to work fine, even though I'm using the Times package. I've never
been able to wrap my head around the way that LaTeX deals with fonts, so
I'm not sure why it works.
If you look closer, you'll find that the numbers you're getting are
actually the Computer Modern numbers, not those of Times. This is
because \oldstylenums{} is pretty much hard-coded into LaTeX to give
you CM numbers, which is quite unfortunate. Robin Fairbairn's oldstyle
package puts the pieces into place for other fonts as well, but as I
mentioned, the free Times fonts don't have lowercase numbers.

There's a package I forgot: cmolddig. This'll let you choose to have
old-style figures the whole way through your document, and I believe is
a more modern solution than the eco package. (Does anyone use the EC
fonts any more now that Latin Modern's around? I never worked out the
ranges of the two...)
Post by Dan Lenski
The old style numbers look a little funny because they are shifted
downwards, but it's way better than how it was before. I'll try those
packages you mentioned.
You'll find it a little tricky to find real small caps numerals, but
they do exist in some fonts. It is quite accepted practise to use
old-style figures (which do extend below the baseline) with small caps
letters.

Will
Jellby
2005-12-10 09:00:42 UTC
Permalink
Post by Dan Lenski
I am using the small caps font to denote the name of a pin on an
integrated circuit, e.g.
____
RB6 or INIT
The problem I have is that in the small caps font, numerals are the same
height as *big* capital letters, whereas I would like them to appear the
same size as the *small* capital letters. Does anyone know of a Latex
package that will make the numerals the same size as the *small* capitals?
I have sometimes used the ugly hack of using regular caps sized down... that
way I can have "small caps" with numbers or italic shape. The package
"relsize" was useful for this.

\documentclass{article}
\usepackage{relsize,amsmath}
\newcommand{\acro}[1]{\ifmmode\mathsmaller{#1}\else\textsmaller{#1}\fi}
\begin{document}
You can write \acro{RB6} or $\overline{\text{\acro{INIT}}}$ or even
$\hat{H}_\text{\acro{QM/MM}}$.
\end{document}

Having a shortcut for \text{\acro{#1}} was also convenient.
--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com
Continue reading on narkive:
Loading...