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 626172 - Latex $projectname with "&" gets no escaped
Latex $projectname with "&" gets no escaped
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: build
1.7.1
Other Windows
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2010-08-06 09:32 UTC by Axel Heider
Modified: 2014-04-21 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Axel Heider 2010-08-06 09:32:45 UTC
doxyfile sets 
PROJECT_NAME = "Foo&Bar Project"
LATEX_HEADER = "mySpecialheader.tex"

mySpecialheader.tex uses "$projectname" somewhere. Latex complains "! Misplaced alignment tab character &.", because the "&" from the project name, does nor get translated to "\&".
Comment 1 Axel Heider 2010-08-09 09:02:34 UTC
using "\verb+$projectname+" is a work around. But it does no look very nice when the typewriter font is used.
Comment 2 Anne 2010-08-11 12:30:47 UTC
Axel, have you tried writing PROJECT_NAME = "Foo&Bar Project"?
Within XML comments, that works for me. I've never had to name a project with an ampersand though.
Comment 3 Axel Heider 2010-08-11 12:40:46 UTC
I gave it a try, but it does no work. And "&" is just valid XML, but no valid latex code. So if doxygen does not detect and replace it, it wont work. 
The Error is again:

! Misplaced alignment tab character &.
l.81 Foo&
         amp;Bar Project }\\
!  ==> Fatal error occurred, no output PDF file produced!

It apears that doxygen has to apply some translation on the internal variables for latex output. Maybe for RTF and other targets as well.
Comment 4 Gary 2010-10-28 18:33:22 UTC
I get something similar in 1.7.2: However, dealing with the following doxygen generated Latex output:

\begin{DoxyParams}{Parameters}
{\em param1} & description1 \\
\hline
{\em param2} & description2 \\
\hline
\end{DoxyParams}



The error generated is the same:
Doxygen/latex/group__FILE.tex:46: Misplaced alignment tab character &.
Comment 5 Gary 2010-10-28 20:23:54 UTC
(In reply to comment #4)
> I get something similar in 1.7.2: However, dealing with the following doxygen
> generated Latex output:
> 
> \begin{DoxyParams}{Parameters}
> {\em param1} & description1 \\
> \hline
> {\em param2} & description2 \\
> \hline
> \end{DoxyParams}
> 
> 
> 
> The error generated is the same:
> Doxygen/latex/group__FILE.tex:46: Misplaced alignment tab character &.

Opened up a different bug report for this issue in particular:

#633397
Comment 6 albert 2014-01-04 14:42:59 UTC
Ive just pushed a solution to github (pull request 79)
Comment 7 Dimitri van Heesch 2014-01-05 18:09:05 UTC
Thanks, I've merged the pull request.
Comment 8 Dimitri van Heesch 2014-04-21 10:09:22 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.7. 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 (preferrably in the form of a self-contained example).