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.

Is there a way to disable old style numbering only for specific cases? Right now I have old style numbering enabled globally for my whole document via \usepackage[osf]{libertine}, but I want to disable it only for one block of text.

I am hoping there is a way to simply disable old style for that block of text (which has numbers scattered throughout it) rather than having to add \somecommand{123} for each number instance in the block of text.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Educated guess: enclose the text block in a group and switch to the fxl font.

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}

\begin{document}

\Large

Some text 0123 with some \emph{456 numbers \textbf{789}} in between.

\begingroup
\usefont{T1}{fxl}{m}{n}\selectfont

Some text 0123 with some \emph{456 numbers \textbf{789}} in between.

\endgroup

Some text 0123 with some \emph{456 numbers \textbf{789}} in between.

\end{document}
share|improve this answer
4  
This works; I'd probably just define a command \newcommand{\uprightnums}[1]{{\fontfamily{fxl}\selectfont #1}} and then use \uprightnums{123}. –  frabjous Jan 17 '11 at 18:40
    
Thanks! This is exactly what I was looking for. –  squidbear Jan 17 '11 at 19:05
    
This probably needs an update due to the new libertine version. –  mafp May 15 '13 at 15:25

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.