Commit a7c7f36e authored by Dimitri van Heesch's avatar Dimitri van Heesch

Improve rendering of sub and superscripts in LaTeX

parent 7e719d1a
......@@ -199,10 +199,10 @@ void LatexDocVisitor::visit(DocStyleChange *s)
if (s->enable()) m_t << "{\\ttfamily "; else m_t << "}";
break;
case DocStyleChange::Subscript:
if (s->enable()) m_t << "$_{\\mbox{"; else m_t << "}}$ ";
if (s->enable()) m_t << "\\textsubscript{"; else m_t << "}";
break;
case DocStyleChange::Superscript:
if (s->enable()) m_t << "$^{\\mbox{"; else m_t << "}}$ ";
if (s->enable()) m_t << "\\textsuperscript{"; else m_t << "}";
break;
case DocStyleChange::Center:
if (s->enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
......
......@@ -293,6 +293,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\usepackage{makeidx}\n"
"\\usepackage{multicol}\n"
"\\usepackage{multirow}\n"
"\\usepackage{fixltx2e}\n" // for \textsubscript
"\\PassOptionsToPackage{warn}{textcomp}\n"
"\\usepackage{textcomp}\n"
"\\usepackage[nointegrals]{wasysym}\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment