Skip to content

Commit

Permalink
Use hook arrow for hyphens in symbol names in the LaTeX output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Jan 12, 2014
1 parent 09a5fc1 commit ac81313
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/latexgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
" \\fontseries{bc}\\selectfont%\n"
" \\color{darkgray}%\n"
"}\n"
"\\newcommand{\\+}{\\discretionary{\\mbox{\\scriptsize$\\hookleftarrow$}}{}{}}\n"
"\n";

// Define page & text layout
Expand Down
6 changes: 3 additions & 3 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6527,9 +6527,9 @@ void filterLatexString(FTextStream &t,const char *str,
case '^': t << "$^\\wedge$"; break;
case '&': t << "\\&"; break;
case '*': t << "$\\ast$"; break;
case '_': if (!insideTabbing) t << "\\-";
case '_': if (!insideTabbing) t << "\\+";
t << "\\_";
if (!insideTabbing) t << "\\-";
if (!insideTabbing) t << "\\+";
break;
case '{': t << "\\{"; break;
case '}': t << "\\}"; break;
Expand Down Expand Up @@ -6566,7 +6566,7 @@ void filterLatexString(FTextStream &t,const char *str,
((c>='A' && c<='Z' && pc!=' ' && pc!='\0') || (c==':' && pc!=':') || (pc=='.' && isId(c)))
)
{
t << "\\-";
t << "\\+";
}
t << (char)c;
}
Expand Down

0 comments on commit ac81313

Please sign in to comment.