fontspec icon indicating copy to clipboard operation
fontspec copied to clipboard

URLs do not use OpenType features under LuaLaTeX

Open adunning opened this issue 3 years ago • 2 comments

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}
Screenshot 2022-08-29 at 19 44 06

Further details

There is a workaround on StackExchange ~~but it no longer works with newer versions of LuaLaTeX~~.

adunning avatar Aug 29 '22 18:08 adunning

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

u-fischer avatar Aug 29 '22 19:08 u-fischer

Sverre's answer works fine for me

Quite right, thank you – I've found the problem there, at least!

adunning avatar Aug 29 '22 20:08 adunning

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

khaledhosny avatar Feb 21 '24 23:02 khaledhosny

Where then would one file a report on this? In spite of it providing core functionality, url appears to be unmaintained.

adunning avatar Feb 22 '24 09:02 adunning