2

I'm using XeLaTeX with Linux Libertine (using fontspec) and oldstyle numbers. I'd like, however, to set equation numbers (using amsmath's \eqref) in lining numbers. This does not work:

\renewcommand{\eqref}[1]{\textup{\Lpnum{\tagform@{\ref{#1}}}}}
\def\Lpnum#1{{\addfontfeatures{RawFeature=+lnum;+pnum;-tnum;-onum}#1}}

In other circumstances, the \Lpnum macro does work. Any ideas?

mbork
  • 13,385

1 Answers1

6
\tagform@=macro:
#1->\maketag@@@ {(\ignorespaces #1\unskip \@@italiccorr )}.
l.5 \show\tagform@

? > \maketag@@@=macro:
#1->\hbox {\m@th \normalfont #1}.
l.6 \show\maketag@@@

so you probably want to invert the order of

 \Lpnum{\tagform@{

to

 \tagform@{\Lpnum{

so that you get choose the font actually used.

David Carlisle
  • 757,742