After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583526 - Using mscgen diagrams causes LaTeX error if the file path includes spaces.
Using mscgen diagrams causes LaTeX error if the file path includes spaces.
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.5.9
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2009-05-22 07:55 UTC by Graham Hanson
Modified: 2010-06-15 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Graham Hanson 2009-05-22 07:55:58 UTC
My working directory includes spaces -
c:/Documents and Settings/grh/workspace/Locking [Eclipse workspace]

When I include mscgen diagrams in the documentation, the .tex files generate errors.  I have traced this to the location where the generated image in included in the document.

A sample fragment of the .tex file as generated is -

\begin{center}
\begin{ImageNoCaption}\mbox{\includegraphics{C:/Documents and Settings/grh/workspace/Locking/latex/inline_mscgraph_1}}
\end{ImageNoCaption}
\end{center}

The actual PDFLaTeX error message is uninformative as to the cause of the error (as usual) but does indicate the line number.

By quoting the path PDFLaTeX is happy to process the document!

\begin{center}
\begin{ImageNoCaption}\mbox{\includegraphics{"C:/Documents and Settings/grh/workspace/Locking/latex/inline_mscgraph_1"}}
\end{ImageNoCaption}
\end{center}

I also noticed that other images (generated by Dot) are included just using their filename without any path - this works since everythiung is in the latex directory. 

Thus the generation of the LaTeX source to include mscgen diagrams should either quote the full file path OR just use the filename without any path.
Comment 1 Michael Stockman 2010-01-22 09:06:38 UTC
I do also see this problem with 1.6.1.
Comment 2 Michael Stockman 2010-03-16 12:57:45 UTC
It would seem the following would be an appropriate fix (compared to startDotFile() in the same file). I haven't configured doxygen to build on my machine so this is somewhat speculative...

latexdocvisitor.cpp:
void LatexDocVisitor::writeMscFile(const QString &baseName)
{
  QString outDir = Config_getString("LATEX_OUTPUT");
  QString shortName = baseName;
  int i;

  if ((i = shortName.findRev('/')) != -1)
  {
    shortName = shortName.right(shortName.length() - i - 1);
  } 

  writeMscGraphFromFile(baseName, outDir, shortName, MSC_EPS);
  m_t << "\n\\begin{DoxyImageNoCaption}"
         "  \\mbox{\\includegraphics";
  //if (!width.isEmpty())
  //{
  //  m_t << "[width=" << width << "]";
  //}
  //else if (!height.isEmpty())
  //{
  //  m_t << "[height=" << height << "]";
  //}
  m_t << "{" << shortName << "}";

  m_t << "}\n"; // end mbox
  m_t << "\\end{DoxyImageNoCaption}\n";
}
Comment 3 Dimitri van Heesch 2010-03-20 15:22:21 UTC
Thanks, I'll include the patch.
Comment 4 Dimitri van Heesch 2010-06-15 11:21:48 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.0. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.