New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using mscgen diagrams causes LaTeX error if the file path includes spaces. (Origin: bugzilla #583526) #3401

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.5.9 on platform Other
Assigned to: Dimitri van Heesch

On 2009-05-22 07:55:58 +0000, Graham Hanson wrote:

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.

On 2010-01-22 09:06:38 +0000, Michael Stockman wrote:

I do also see this problem with 1.6.1.

On 2010-03-16 12:57:45 +0000, Michael Stockman wrote:

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";
}

On 2010-03-20 15:22:21 +0000, Dimitri van Heesch wrote:

Thanks, I'll include the patch.

On 2010-06-15 11:21:48 +0000, Dimitri van Heesch wrote:

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.

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment