1

Consider the following LuaLaTeX document:

% arara: lualatex
\documentclass{article}

\usepackage{libertinus-otf}
\setmonofont{CascadiaCod3-Light.otf} % from cascadia-code package on CTAN

\begin{document}
\begin{verbatim}
  set(test "Test")
\end{verbatim}
\end{document}

Its output is

curly quotes

As can be seen there are curly quotes instead of straight quotes. The same would happen if one would not change the mono font, i.e. with Libertinus Mono. But there are straight quotes if one replaces \usepackage{libertinus-otf} by \usepackage{fontspec}.

Question: What does libertinus-otf change so that even other fonts' quotes are affected and how do I get straight quotes in mono fonts again?

2 Answers 2

1

Well, I do not really know why or where the package modifies defaults (an educational answer on that is still welcome) but it seems it enables Ligatures=TeX even for the mono font. Using the mono=false option of the package does not have any effect.

However, disabling the TeX ligatures on the mono font that is loaded later on helps out and even keeps coding ligatures intact.

% arara: lualatex
\documentclass{article}

\usepackage{libertinus-otf}
\setmonofont{CascadiaCod3-Light.otf}[Ligatures = TeXOff]

\begin{document}
\begin{verbatim}
"Test"

Coding ligatures: ^= 1 != 0
\end{verbatim}
\end{document}

ligatures

5
  • 2
    make a bug report, the package should restrict the default font features to rmfamily and sffamily. Jul 19, 2021 at 8:38
  • @UlrikeFischer Thanks for the suggestion but the package does not have an issue tracker as it seems and the author, Herbert Voß, did not mention any contact email address in the documentation or CTAN page either. It seems that there is no desire for bugs to be reported.
    – TeXnician
    Jul 19, 2021 at 9:03
  • 1
    The mail address is in the sty and I never had a problem to reach Herbert and get an answer. Jul 19, 2021 at 9:11
  • @UlrikeFischer Ah, thanks. Wouldn't have looked there for a mail address. I'll write him.
    – TeXnician
    Jul 19, 2021 at 9:17
  • For a long time it was quite common to put addresses (and sometimes even the documentation) into the sty. Jul 19, 2021 at 9:24
1
\documentclass{article}

\usepackage[defaultfeatures={Ligatures=TeXOff}]{libertinus-otf}

\begin{document}
\begin{verbatim}
"Test"

Coding ligatures: ^= 1 != 0
\end{verbatim}

\setmonofont{CascadiaCod3-Light.otf}
\begin{verbatim}
"Test"

Coding ligatures: ^= 1 != 0
\end{verbatim}

\end{document}

enter image description here

2
  • Many thanks. Just to confirm: This does also turn off the TeX ligatures for the roman and sans font, right?
    – TeXnician
    Jul 23, 2021 at 7:46
  • 1
    Right! I'll upload a new version of libertines-off which presets font features only to roman and sans serif.
    – user187802
    Jul 23, 2021 at 8:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .