From d852bbd5d927eb32b697227b28995eafda33164e Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Milde?= Date: Tue, 2 Jan 2018 09:28:04 +0100 Subject: [PATCH] Fix a comment. Ligating of -- to en dashes occure also in teletype fonts. With some 8-bit fonts, em and en dashes are not copied exported from the PDF (but this is not limited to dashes in teletype). With LatinModern, PDF export works fine MWE: \documentclass[]{article} %\usepackage{lmodern} \usepackage[T1]{fontenc} \begin{document} Hallo \texttt{Welt --Welt ---Welt} Hallo Welt --Welt ---Welt --- src/Paragraph.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index abb2768d75..55896c9a86 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1238,10 +1238,8 @@ void Paragraph::Private::latexSpecialChar(otexstream & os, if (i + 1 < static_cast(text_.size()) && (end_pos == -1 || i + 1 < end_pos) && text_[i+1] == '-') { - // Prevent "--" becoming an endash and "---" becoming - // an emdash. - // Within \ttfamily, "--" is merged to "-" (no endash) - // so we avoid this rather irritating ligature as well + // Prevent "--" becoming an en dash and "---" an em dash. + // (Within \ttfamily, "---" is merged to en dash + hyphen.) os << "{}"; column += 2; } -- 2.39.2