TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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.