summaryrefslogtreecommitdiffstats
path: root/src/htmldocvisitor.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2003-04-30 19:40:09 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2003-04-30 19:40:09 (GMT)
commitea4b32cb910635a50467b02f36b5521337451cf0 (patch)
tree88964bce49d3ab4b0f329d945d43a87b443ed019 /src/htmldocvisitor.cpp
parent2eef94da7bc476987b1a46690bbdaeb76a05dd82 (diff)
downloadDoxygen-ea4b32cb910635a50467b02f36b5521337451cf0.zip
Doxygen-ea4b32cb910635a50467b02f36b5521337451cf0.tar.gz
Doxygen-ea4b32cb910635a50467b02f36b5521337451cf0.tar.bz2
Release-1.3-20030430
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r--src/htmldocvisitor.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 353194b..c234a8a 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -263,23 +263,18 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
void HtmlDocVisitor::visit(DocFormula *f)
{
if (m_hide) return;
- if (f->text().at(0)=='\\') m_t << "<p><center>" << endl;
- m_t << "<img align=";
-#if !defined(_WIN32)
- m_t << "\"top\""; // assume Unix users use Netscape 4.x which does
- // not seem to support align == "middle" :-((
-#else
- m_t << "\"middle\""; // assume Windows users use IE or HtmlHelp which on
- // displays formulas nicely with align == "middle"
-#endif
+ bool bDisplay = f->text().at(0)=='\\';
+ if (bDisplay) m_t << "<p class=formulaDsp>" << endl;
+ 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->name() << ".png\">";
- if (f->text().at(0)=='\\')
- m_t << endl << "</center><p>" << endl;
+ if (bDisplay)
+ m_t << endl << "<p>" << endl;
else
m_t << " ";
}