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.

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?

share|improve this question

1 Answer 1

\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.

share|improve this answer
    
I'm impressed, both by the accuracy and speed of your answer! Thanks, it works! –  mbork Apr 4 '12 at 15:48
    
ah that was a good guess, I didn't test as I don't know enough about xelatex to load up the fonts:-) –  David Carlisle Apr 4 '12 at 16:07

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.