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’ve noticed during my XeLaTeX typesetting with hyperref package that since not so long ago, URLs (using \url) have been typed in lining figures (as opposed to the oldstyle figures) whatever my setting for default body font is.

I think that this was done for good reason to improve the readability of the URLs. Nevertheless, can this actually be easily changed if I want to have all figures in my text back to oldstyle, including those in the URLs?

share|improve this question
1  
Please provide a MWE which demonstrates your problem. –  canaaerus Jul 14 '12 at 7:33
add comment

1 Answer

You can use the command '\urlstyle`.

Compile the following with XeLaTeX:

\documentclass[11pt]{article}
\usepackage{fontspec}
\setmainfont[Numbers={Monospaced,OldStyle}]{Minion Pro}
\setmonofont[Scale=0.89]{DejaVu Sans Mono}
\usepackage{hyperref}
\begin{document}
\url{/the/path/to/my/File123/890}

\urlstyle{rm}
\url{/the/path/to/my/File123/890}
\end{document} 

You'll get:

enter image description here

share|improve this answer
add comment

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.