Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How I can define a new command to use the old-style numbers of the package gfsartemisia within the default font in pdflatex ?

I tried something like:

\newcommand{\oldnum}[1]{{\fontfamily{artemisia}\oldstylenums{#1} \selectfont}} 

in the preamble to use

Some text with default font \oldnum{123} more text with default font 

but doesn't work.

share|improve this question
add comment

1 Answer

The GFS Artemisia fonts have old style numbers in \scshape, so the solution should be

\newcommand{\oldnum}[1]{{\fontfamily{artemisia}\scshape #1}}

Each font choosing declaration has an implicit \selectfont.

In any case, \selectfont should go before the text that we want to be affected by the font selection. Notice also that \oldstylenums is an instruction that tells LaTeX to get the digits from a math font, so it doesn't obey \fontfamily settings.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.