summaryrefslogtreecommitdiffstats
path: root/src/htmldocvisitor.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-10-09 08:04:33 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-10-09 08:04:33 (GMT)
commita32c2461bfbe6705159abfcae92fb11f1309b37c (patch)
treefac3e1fdcea37381cbfa5042e20155883cf97372 /src/htmldocvisitor.cpp
parenta80f9320bf9fdd879869cee2cea1ec3f9af822f8 (diff)
downloadDoxygen-a32c2461bfbe6705159abfcae92fb11f1309b37c.zip
Doxygen-a32c2461bfbe6705159abfcae92fb11f1309b37c.tar.gz
Doxygen-a32c2461bfbe6705159abfcae92fb11f1309b37c.tar.bz2
Release-1.7.2
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r--src/htmldocvisitor.cpp36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 7de6e52..cfe229e 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -490,14 +490,36 @@ void HtmlDocVisitor::visit(DocFormula *f)
forceEndParagraph(f);
m_t << "<p class=\"formulaDsp\">" << endl;
}
- m_t << "<img class=\"formula"
+
+ if (Config_getBool("USE_MATHJAX"))
+ {
+ QCString text = f->text();
+ bool closeInline = FALSE;
+ if (!bDisplay && !text.isEmpty() && text.at(0)=='$' &&
+ text.at(text.length()-1)=='$')
+ {
+ closeInline=TRUE;
+ text = text.mid(1,text.length()-2);
+ m_t << "\\(";
+ }
+ m_t << convertToHtml(text);
+ if (closeInline)
+ {
+ m_t << "\\)";
+ }
+ }
+ else
+ {
+ m_t << "<img class=\"formula"
<< (bDisplay ? "Dsp" : "Inl");
- m_t << "\" alt=\"";
- filterQuotedCdataAttr(f->text());
- m_t << "\"";
- /// @todo cache image dimensions on formula generation and give height/width
- /// for faster preloading and better rendering of the page
- m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";
+ m_t << "\" alt=\"";
+ filterQuotedCdataAttr(f->text());
+ m_t << "\"";
+ /// @todo cache image dimensions on formula generation and give height/width
+ /// for faster preloading and better rendering of the page
+ m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";
+
+ }
if (bDisplay)
{
m_t << endl << "</p>" << endl;