I am trying to generate PDF documentation out of Pandoc Markdown README document. Here is MWE:
\documentclass[english,]{article}
\usepackage[T1]{fontenc}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[utf8]{inputenc}
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
\usepackage{xltxtra,xunicode}
\else
\usepackage{fontspec}
\fi
\fi
\defaultfontfeatures{Ligatures=TeX}
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
\begin{document}
\texttt{-{}-enable-debugging}
\end{document}
When I generate a PDF using lualatex
(beta-0.76.0-2013070111 (TeX Live 2013/Debian) (rev 4627)) it creates a en-dash instead of typesetting --
:
The en-dash is unwanted. XeLaTeX does not do that. I want two dashes.
UPDATE
In the end, I have created a patch that makes Pandoc use -\/-
instead of -{}-
to avoid the ligature.
\defaultfontfeatures{Ligatures=TeX}
before declaring the mono font.{}
, i.e., an "empty TeX group", does not work as a ligature-suppressing method under Lua(La)TeX, though it does so under Xe(La)TeX and pdf(La)TeX.english
orngerman
option to load language-specific selective ligature suppression rules, or provide your own homemade ligature suppression rules -- say,\nolig{--}{-|-}
-- to suppress certain ligatures on a document-wide basis. To suppress a single instance of a ligature, one could issue the command\breaklig
, e.g.,\breaklig{pdf|latex}
.