fontspec
fontspec copied to clipboard
URLs do not use OpenType features under LuaLaTeX
Description
When writing a URL that includes numbers, these will appear as lining figures regardless of which OpenType features are enabled. This is a very old bug, previously filed under Luaotfload, but the issue was determined not to rest there and it appears to have dropped off the radar.
Check/indicate
- [X] Relevant for LuaTeX
- [X] Issue tracker has been searched for similar issues?
- [X] Links to <tex.stackexchange.com> discussion if appropriate
Minimal example demonstrating the issue
\documentclass{article}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}[Numbers = {Lowercase, Proportional}]
\usepackage{url}
\urlstyle{same}
\begin{document}
1234567890
\url{http://example.com/1234567890}
\end{document}
Further details
There is a workaround on StackExchange ~~but it no longer works with newer versions of LuaLaTeX~~.
There was a workaround on StackExchange, but it no longer works with newer versions of LuaLaTeX.
Sverre's answer works fine for me (but you have to change the font name, Libertine Serif imho no longer works.)
Sverre's answer works fine for me
Quite right, thank you – I've found the problem there, at least!
I don’t see a fontspec issue here, it seems to be bad interaction between url package (that uses math mode) and luaotfload’s node mode (that does not work in math mode).
Where then would one file a report on this? In spite of it providing core functionality, url appears to be unmaintained.