From 0cb39b4cf9f1e89720cb19f58158b90ecf0b75ef Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 27 Nov 2014 14:26:50 +0100 Subject: LaTeX problem with 2 consecutive single quotes In LaTeX 2 consecutive single quotes are joined to 1 double quote. This leads in texts where 2 single quotes are intended to a strange view. An example is the initial value for variables. E.g. in Fortran: character(len=10) :: A = '' (i.e an empty string which can either be defined as '' or as "") or in C: char *sq = "''". In the source listings this is OK but in the description text it was not OK. --- src/htmlentity.cpp | 2 +- src/util.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/htmlentity.cpp b/src/htmlentity.cpp index a4d5914..9327526 100644 --- a/src/htmlentity.cpp +++ b/src/htmlentity.cpp @@ -298,7 +298,7 @@ static struct htmlEntityInfo // doxygen extension to the HTML4 table of HTML entities { SYM(tm), "\xe2\x84\xa2", "™", "", "™", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }}, - { SYM(apos), "'", "'", "'", "'", "'", "'", "'", { "\\\'", DocSymbol::Perl_string }}, + { SYM(apos), "'", "'", "'", "'", "\\textquotesingle{}", "'", "'", { "\\\'", DocSymbol::Perl_string }}, // doxygen commands represented as HTML entities { SYM(BSlash), "\\", "\\", "\\", "\\", "\\textbackslash{}", "\\\\", "\\\\", { "\\\\", DocSymbol::Perl_string }}, diff --git a/src/util.cpp b/src/util.cpp index bc39cfb..d01126f 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6500,6 +6500,8 @@ void filterLatexString(FTextStream &t,const char *str, break; case '"': t << "\\char`\\\"{}"; break; + case '\'': t << "\\textquotesingle{}"; + break; default: //if (!insideTabbing && forceBreaks && c!=' ' && *p!=' ') -- cgit v0.12