Skip to content

Commit e51f8c3

Browse files
committed
Unnecessary line break signs in LaTeX
For the doxygen documentation (internationalization table) some code is generated like: ``` <tr bgcolor="#ffffff"> <td bgcolor="#ff5555">Serbian</td> <td>Dejan Milosavljevic</td> <td><span style="color: brown">[unreachable]</span></td> <td bgcolor="#ff5555">1\.6\.0</td> </tr> ``` in LaTeX this results in: ``` Serbian&Dejan Milosavljevic&\+[unreachable]\+&1.6.0\\ ``` and in the resulting pdf file we see some strange line-break signs (due to the `\+`). The `\+` at the end of the string does not really make sense, so removed (with the `\_` command also the `\+` had to be removed).
1 parent bea822c commit e51f8c3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/latexgen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,9 +2450,9 @@ void filterLatexString(TextStream &t,const QCString &str,
24502450
}
24512451
break;
24522452
case '*': processEntity(t,pdfHyperlinks,"$\\ast$","*"); break;
2453-
case '_': if (!insideTabbing) t << "\\+";
2453+
case '_': if (!insideTabbing && *p) t << "\\+";
24542454
t << "\\_";
2455-
if (!insideTabbing) t << "\\+";
2455+
if (!insideTabbing && *p) t << "\\+";
24562456
break;
24572457
case '{': t << "\\{"; break;
24582458
case '}': t << "\\}"; break;
@@ -2466,7 +2466,7 @@ void filterLatexString(TextStream &t,const QCString &str,
24662466
t << "[";
24672467
break;
24682468
case ']': if (pc=='[') t << "$\\,$";
2469-
if (Config_getBool(PDF_HYPERLINKS) || insideItem)
2469+
if ((Config_getBool(PDF_HYPERLINKS) || insideItem) && *p)
24702470
t << "]\\+";
24712471
else
24722472
t << "]";
@@ -2510,7 +2510,7 @@ void filterLatexString(TextStream &t,const QCString &str,
25102510
{
25112511
t << static_cast<char>(c);
25122512
}
2513-
if (!insideTabbing && ((c==':' && *p!=':') || c=='/'))
2513+
if (!insideTabbing && *p && ((c==':' && *p!=':') || c=='/'))
25142514
{
25152515
t << "\\+";
25162516
}

0 commit comments

Comments
 (0)