mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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
This commit is contained in:
parent
9428ad56b9
commit
d852bbd5d9
@ -1238,10 +1238,8 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
|
|||||||
if (i + 1 < static_cast<pos_type>(text_.size()) &&
|
if (i + 1 < static_cast<pos_type>(text_.size()) &&
|
||||||
(end_pos == -1 || i + 1 < end_pos) &&
|
(end_pos == -1 || i + 1 < end_pos) &&
|
||||||
text_[i+1] == '-') {
|
text_[i+1] == '-') {
|
||||||
// Prevent "--" becoming an endash and "---" becoming
|
// Prevent "--" becoming an en dash and "---" an em dash.
|
||||||
// an emdash.
|
// (Within \ttfamily, "---" is merged to en dash + hyphen.)
|
||||||
// Within \ttfamily, "--" is merged to "-" (no endash)
|
|
||||||
// so we avoid this rather irritating ligature as well
|
|
||||||
os << "{}";
|
os << "{}";
|
||||||
column += 2;
|
column += 2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user