[tldoc] en-dash and em-dash ligatures in \texttt

Denis Bitouzé denis.bitouze at univ-littoral.fr
Thu Mar 7 12:15:56 CET 2024


Le 01/03/24 à 08h59, Karl Berry a écrit :

>     about `--` versus `-{}-`, the English version still have the
>     former, e.g. `\code{mtxrun --script pstopdf}`.
>
> What I don't understand is why the dash ligatures are happening at all,
> since \texttt{en--dash em---dash} in bare LaTeX doesn't create
> them. Evidently some one of the many loaded packages must be changing
> it, but I can't investigate in depth right now. If anyone feels like
> casting their eyes over tex-live.sty

The culprit is not `tex-live.sty` but the `fontenc` package. See:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\texttt{en--dash em---dash}
\end{document}
--8<---------------cut here---------------end--------------->8---

and:

  ┌────
  │ https://github.com/latex3/latex3/issues/756
  └────

> and see if anything jumps out, or doing test runs, that would be
> great.

Maybe relying on `\verb`:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\texttt{en--dash em---dash}

\verb|en--dash em---dash|
\end{document}
--8<---------------cut here---------------end--------------->8---
-- 
Denis



More information about the tldoc mailing list.