10

I've spent most of my day trying to migrate a project from pdftex tolualatex. The experience has been mostly positive but there are a few gotchas I can't make heads or tails of.

Most recently I've just noticed that the standard texish ligatures for endash and emdash (i.e -- is typeset as – and --- becomes —) have gone A.W.O.L on me when located in small caps formatted references. This is unfortunate as I use endash in Bible verse references that are typeset in the margins using small-caps.

I have reviewed the info in How to enable ligatures for emdash/endash in LuaTeX ? but this seems to be a different issue.

Here is a MWE showing the issue (compile with lualatex):

\documentclass{scrartcl}
\usepackage{luatextra}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine}

\begin{document}
Test -- endash and --- emdash

{\scshape Test -- endash and --- emdash}
\end{document}

Which for me produces:

small cap dash ligatures missing

What is the culprit here and how do I fix it?

Caleb
  • 1,988
  • 1
    I can confirm it; and it doesn't happen with TeX Live 2012, so I think it's a bug in luaotfload – egreg May 10 '14 at 23:08
  • 1
    I do not have Linux Libertine installed. However I tested with Latin Modern and Minion Pro; it compiles and shows no problem. I suppose it's specifically a problem with Linux Libertine. – Bernard May 10 '14 at 23:13
  • Also tested here with Garamond Pro; no issues on MikTeX 2.9. I can reproduce the issue with Linux Libertine, though. So as @Bernard said, it seems to be specific to Libertine. – Paul Gessler May 10 '14 at 23:16
  • Indeed, I tried some other fonts and none seems to have the problem. – egreg May 10 '14 at 23:18
  • However (comment aside) I tried to test with Heuristica and … LuaLaTeX doesn't find the font, while XeLaTeX does! – Bernard May 10 '14 at 23:26
  • My tests suggested it is Libertine specific, too, and also Lua specific (no problem with XeLaTeX). Also, loading libertine does not work any magic although it does define endash etc. which seemed possibly promising. – cfr May 10 '14 at 23:36
  • 2
    using TL2014 it doesn't find the font under that name \setmainfont{LinLibertine_R}works but shows--as you report. However if you use{\scshape Test – endash and — emdash}` with the characters directly then it works. – David Carlisle May 11 '14 at 00:34
  • @DavidCarlisle Thanks, but I was aware entering the Unicode symbol directly would work. Unfortunately these ligatures are mostly found in a shared repository of snippets that I \input from and they need to continue working for some folks still compiling with non UTF8 savvy LaTeX engines so I cannot just replace them all. I need a solution that knows what to do with --. – Caleb May 11 '14 at 06:15
  • @Caleb yes I suspected so but just gave the comment as to the situation in texlive 2014 (ie the latest pre-release test of everything) to help anyone who knows more about the opentype font setup to find the problem – David Carlisle May 11 '14 at 09:13
  • 1
  • 2
    Hans fixed it. The new code will be part of the next version of Luaotfload. – Philipp Gesang May 12 '14 at 17:28
  • @phg Awesome, thanks for the news. Is there a place I can get a patch to tide me over until the next release? I looked a the Github repo for luaotfload but the latest commit is 3 weeks ago so obviously this code isn't there. – Caleb May 12 '14 at 18:02
  • @Caleb Since there’s a major subsystem rewrite underway I keep the changes in my repo until I’m confident they don’t break everything when merged into master. I haven’t checked whether the fix applies to older versions. – Philipp Gesang May 12 '14 at 18:17
  • Has the bug fix been released to the CTAN yet? I have version 2.4-4 of luaotfload, dated 2014/05/18, and the bug's still there. – Mico Jun 02 '14 at 20:58

1 Answers1

5

The bug fix has been released to CTAN as of the v2.5-1 release.

\documentclass{scrartcl}
\usepackage{luatextra}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine}

\begin{document}
Test -- endash and --- emdash

{\scshape Test -- endash and --- emdash}
\end{document}

with

luaotfload.sty 2014/07/16 v2.5-1 OpenType layout system

gives

enter image description here

Paul Gessler
  • 29,607