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.

This is a follow-up to this question; I'd like also the tags (typeset by the \tag command) to be in lining numerals. However, inspecting the definition of \tag in amsmath didn't reveal too much to me - it is \let to different macros, depending on (I guess) which exactly environment is being used.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Here's how I would do it

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}
\newfontfamily{\tagfont}[Ligatures=TeX]{Linux Libertine O}

\makeatletter
\def\maketag@@@#1{\hbox{\m@th\normalfont\tagfont#1}}
\makeatother

\begin{document}
123
\begin{equation}
a+b=c\tag{1234567890}\label{x}
\end{equation}
\setcounter{equation}{455}
\begin{equation}
aaa
\end{equation}
456--\eqref{x}--456
\end{document}

The important macro is \maketag@@@; you can also use the \Lpnum method of the other answer, but I believe that this is cleaner.

enter image description here

share|improve this answer

If you don't want to change the internal macros directly, mathtools package is more friendly (c.f. egreg's solution):

\documentclass{article}
\usepackage{mathtools}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}
\newfontfamily\lining[Ligatures=TeX]{Linux Libertine O}

\newtagform{lining}{(\lining}{)}
\usetagform{lining}

\begin{document}
123
\begin{equation}
a+b=c\tag{1234567890}\label{x}
\end{equation}
\setcounter{equation}{455}
\begin{equation}
aaa
\end{equation}
456--\eqref{x}--456
\end{document}
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.