diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2007-03-15 10:14:23 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2007-03-15 10:14:23 (GMT) |
commit | cc52853c15833c9a18be11c140b99d94d9e06e9e (patch) | |
tree | 5300b179faf00eea740dda6ee3be5343c70b1c79 /src/latexdocvisitor.cpp | |
parent | eb591296685b8268427173e0a24f74abd987170d (diff) | |
download | Doxygen-cc52853c15833c9a18be11c140b99d94d9e06e9e.zip Doxygen-cc52853c15833c9a18be11c140b99d94d9e06e9e.tar.gz Doxygen-cc52853c15833c9a18be11c140b99d94d9e06e9e.tar.bz2 |
Release-1.5.1-20070315
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r-- | src/latexdocvisitor.cpp | 48 |
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; +} + |