summaryrefslogtreecommitdiffstats
path: root/src/latexdocvisitor.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-03-15 10:14:23 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2007-03-15 10:14:23 (GMT)
commit97a3911e2682bfebeebbb8999c9e3844c414c3e0 (patch)
tree5300b179faf00eea740dda6ee3be5343c70b1c79 /src/latexdocvisitor.cpp
parentf7f03d9491454ddc9b855b8637d482df6bd622c2 (diff)
downloadDoxygen-97a3911e2682bfebeebbb8999c9e3844c414c3e0.zip
Doxygen-97a3911e2682bfebeebbb8999c9e3844c414c3e0.tar.gz
Doxygen-97a3911e2682bfebeebbb8999c9e3844c414c3e0.tar.bz2
Release-1.5.1-20070315
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r--src/latexdocvisitor.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 9426a1e..76bff77 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -25,6 +25,7 @@
#include "util.h"
#include "message.h"
#include "parserintf.h"
+#include "msc.h"
static QString escapeLabelName(const char *s)
{
@@ -302,6 +303,33 @@ void LatexDocVisitor::visit(DocVerbatim *s)
if (Config_getBool("DOT_CLEANUP")) file.remove();
}
break;
+ case DocVerbatim::Msc:
+ {
+ static int mscindex = 1;
+ QCString baseName(4096);
+
+ baseName.sprintf("%s%d",
+ (Config_getString("LATEX_OUTPUT")+"/inline_mscgraph_").data(),
+ mscindex++
+ );
+ QFile file(baseName+".msc");
+ if (!file.open(IO_WriteOnly))
+ {
+ err("Could not open file %s.msc for writing\n",baseName.data());
+ }
+ QCString text = "msc {";
+ text+=s->text();
+ text+="}";
+ file.writeBlock( text, text.length() );
+ file.close();
+
+ m_t << "\\begin{center}\n";
+ writeMscFile(baseName);
+ m_t << "\\end{center}\n";
+
+ if (Config_getBool("DOT_CLEANUP")) file.remove();
+ }
+ break;
}
}
@@ -1141,3 +1169,23 @@ void LatexDocVisitor::endDotFile(bool hasCaption)
}
}
+void LatexDocVisitor::writeMscFile(const QString &baseName)
+{
+ QString outDir = Config_getString("LATEX_OUTPUT");
+ writeMscGraphFromFile(baseName,outDir,baseName,MSC_EPS);
+ m_t << "\\begin{ImageNoCaption}\\mbox{";
+ m_t << "\\includegraphics";
+ //if (!width.isEmpty())
+ //{
+ // m_t << "[width=" << width << "]";
+ //}
+ //else if (!height.isEmpty())
+ //{
+ // m_t << "[height=" << height << "]";
+ //}
+ m_t << "{" << baseName << "}";
+
+ m_t << "}" << endl; // end mbox
+ m_t << "\\end{ImageNoCaption}" << endl;
+}
+