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 133418 - Things like <CODE>--prefix</CODE> do not work in LaTeX output
Things like <CODE>--prefix</CODE> do not work in LaTeX output
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2004-02-04 17:37 UTC by bagnara
Modified: 2009-08-25 11:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description bagnara 2004-02-04 17:37:31 UTC
If you use something like <CODE>--prefix</CODE> to document your code,
you will see in the LaTeX output (DVI, PostScript or PDF does not matter)
only one dash, i.e. "-prefix" instead of "--prefix".

Doxygen generates {\tt --prefix}, which would be OK, but it is not because
doxygen.sty contains the line "\usepackage[T1]{fontenc}", which screws
everything up.  To see what I meam, play with the following LaTeX source:

\documentclass{article}

%% Uncomment the following line to see the problem.
%\usepackage[T1]{fontenc}

\begin{document}
{\tt --prefix}
\end{document}
Comment 1 Dimitri van Heesch 2004-02-05 20:22:46 UTC
Do you know a solution that don't involve removing the fontenc package?
Comment 2 bagnara 2004-02-05 20:51:31 UTC
The only thing that comes to my mind is to never have two dashes in a
row when under the effect of \tt.  That is, generate {\tt
-{}-something} instead of {\tt --something}.  I have checked and it
works.  Smells like a horrible hack, of course.
Comment 3 André Klapper 2006-07-07 02:56:11 UTC
reopening as information has been provided.
Comment 4 m.geimer 2009-07-08 09:20:24 UTC
This does not only affect text inside a \tt environment, it is a general issue that always shows up when outside a 'verbatim' environment.

"--" and "---" are LaTeX commands that are equivalent to &ndash; or &mdash; in HTML, respectively. You can either insert the curly braces (as mentioned in comment #2) or use the so-called "italic correction" (i.e., insert "\/" between the dashes).
Comment 5 Dimitri van Heesch 2009-07-18 21:17:23 UTC
Ok, I'll use the italic correction then. Should be fixed in the next subversion update.
Comment 6 Dimitri van Heesch 2009-08-20 10:12:51 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.6.0. Please verify if this is indeed the case and reopen the
bug if you think it is not fixed (include any additional information that you
think can be relevant).
Comment 7 bagnara 2009-08-20 12:00:50 UTC
I have tried, but immediately got in trouble:

$ gdb /usr/local/bin/doxygen 
GNU gdb Fedora (6.8-32.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(no debugging symbols found)
(gdb) r  user.doxyconf-html
Starting program: /usr/local/bin/doxygen user.doxyconf-html
Warning: Tag `SHOW_USED_FILES' at line 68 of file user.doxyconf-html has become obsolete.
To avoid this warning please update your configuration file using "doxygen -u"

Program received signal SIGSEGV, Segmentation fault.
0x00000000005936a0 in getCanonicalTypeForIdentifier ()
(gdb) info stack
  • #0 getCanonicalTypeForIdentifier
  • #1 extractCanonicalType
  • #2 extractCanonicalArgType
  • #3 matchArguments2
  • #4 findMember
  • #5 filterMemberDocumentation
  • #6 findMemberDocumentation
  • #7 findMemberDocumentation
  • #8 findMemberDocumentation
  • #9 findMemberDocumentation
  • #10 parseInput
  • #11 main

Comment 8 Dimitri van Heesch 2009-08-20 12:08:25 UTC
Ok, that's not good :-(

Can you help me a bit more, by compiling doxygen yourself with debug symbols, i.e.

make clean
./configure --debug
make

and then rerun it from the debugger?

Thanks in advance.
Comment 9 Dimitri van Heesch 2009-08-20 14:12:57 UTC
I the meantime I think I found the problem and put a fixed version on the website
(with the same name). Can you download the new version and let me know if that
makes a difference?
Comment 10 bagnara 2009-08-20 14:40:02 UTC
$ gdb /usr/local/bin/doxygen 
GNU gdb Fedora (6.8-32.fc10)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(gdb) run user.doxyconf-html
Starting program: /usr/local/bin/doxygen user.doxyconf-html
Warning: Tag `SHOW_USED_FILES' at line 68 of file user.doxyconf-html has become obsolete.
To avoid this warning please update your configuration file using "doxygen -u"

Program received signal SIGSEGV, Segmentation fault.
0x0000000000430005 in QCString::duplicate (this=0x0, str=0x7708a2 "")
    at qcstring.h:298
298	  if (m_data==str) return *this;
(gdb) info stack
  • #0 QCString::duplicate
    at qcstring.h line 298
  • #1 QCString::operator=
    at qcstring.h line 320
  • #2 getCanonicalTypeForIdentifier
    at util.cpp line 3140
  • #3 extractCanonicalType
    at util.cpp line 3262
  • #4 extractCanonicalArgType
    at util.cpp line 3292
  • #5 matchArgument2
    at util.cpp line 3334
  • #6 matchArguments2
    at util.cpp line 3426
  • #7 findMember
    at doxygen.cpp line 5818
  • #8 filterMemberDocumentation
    at doxygen.cpp line 6150
  • #9 findMemberDocumentation
  • #10 findMemberDocumentation
    at doxygen.cpp line 6201
  • #11 findMemberDocumentation
    at doxygen.cpp line 6201
  • #12 findMemberDocumentation
    at doxygen.cpp line 6201
  • #13 parseInput
    at doxygen.cpp line 10119
  • #14 main
    at main.cpp line 37
  • #0 QCString::duplicate
    at qcstring.h line 298
Cannot access memory at address 0x0
(gdb) print str
$1 = 0x7708a2 ""
(gdb)
Comment 11 bagnara 2009-08-20 14:40:31 UTC
I was using the SVN version.  Do you want me to download a tarball instead?
Comment 12 Dimitri van Heesch 2009-08-20 14:48:31 UTC
You can also update SVN to the latest version. I think the fix I made is indeed the correct one (at line 3140 in util.cpp a guard was missing).
Comment 13 bagnara 2009-08-20 19:08:33 UTC
The segmentation fault has gone and this issue seems solved.  However, with the new version dozens of spurious errors have appeared:

/home/roberto/tppl/interfaces/C/ppl_c.h:684: Error: Unexpected character `"'
/home/roberto/tppl/interfaces/C/ppl_c.h:624: Error: Unexpected character `"'
/home/roberto/tppl/interfaces/C/ppl_c.h:654: Error: Unexpected character `"'
/home/roberto/tppl/interfaces/C/ppl_c.h:715: Error: Unexpected character `"'
/home/roberto/tppl/interfaces/C/ppl_c.h:704: Error: Unexpected character `"'
/home/roberto/tppl/interfaces/C/ppl_c.h:3480: Error: Unexpected character `"'

Actually, in none of these lines there is a double quote.
Comment 14 Dimitri van Heesch 2009-08-21 08:06:38 UTC
There is now a requirement that quoted text has to have an open and a closing quote (since quoted text is treated in a special way).

Note that the actual line number could be off by a couple of lines.

Can you share a comment block for which such an error occurs?
Comment 15 bagnara 2009-08-21 08:18:20 UTC
/home/roberto/ppl/ppl/interfaces/C/ppl_c_header.h:641: Error: Unexpected character `"'

Line 641 is the blank one in the following block:

/*! \interface ppl_Congruence_System_const_iterator_tag
  \brief
  Types and functions for iterating on congruence systems.

  The types and functions for congruence systems iterators provide
  read-only access to the elements of a congruence system by interfacing
  \extref{Parma_Polyhedra_Library::Congruence_System::const_iterator,
  Congruence_System::const_iterator}.
*/

The same pattern is repeated several times:

/home/roberto/ppl/ppl/interfaces/C/ppl_c_header.h:581: Error: Unexpected character `"'
/home/roberto/ppl/ppl/interfaces/C/ppl_c_header.h:611: Error: Unexpected character `"'
/home/roberto/ppl/ppl/interfaces/C/ppl_c_header.h:672: Error: Unexpected character `"'
/home/roberto/ppl/ppl/interfaces/C/ppl_c_header.h:661: Error: Unexpected character `"'

But the following is a bit different:

/home/roberto/ppl/ppl/interfaces/C/C_interface.dox:1037: Error: Unexpected character `"'

/*! \relates ppl_Polyhedron_tag \brief
  Remaps the dimensions of the vector space according to a
  \extref{Mapping_the_Dimensions_of_the_Vector_Space, partial function}.
  This function is specified by means of the \p maps array,
  which has \p n entries.

  The partial function is defined on dimension <CODE>i</CODE>
  if <CODE>i < n</CODE> and <CODE>maps[i] != ppl_not_a_dimension</CODE>;
  otherwise it is undefined on dimension <CODE>i</CODE>.
  If the function is defined on dimension <CODE>i</CODE>, then dimension
  <CODE>i</CODE> is mapped onto dimension <CODE>maps[i]</CODE>.

  The result is undefined if \p maps does not encode a partial
  function with the properties described in the
  \extref{Mapping_the_Dimensions_of_the_Vector_Space,
          specification of the mapping operator}.
*/

Here line 1037 is the one beginning with `otherwise'.
Comment 16 Dimitri van Heesch 2009-08-21 08:33:55 UTC
Could it be related to the \extref command?
How is that command defined?
Comment 17 bagnara 2009-08-21 09:49:30 UTC
Depending on the output kind we have either

ALIASES                = "extref{2}=\ref \1 \"\2\""

or

ALIASES                = "extref{2}=<EM>\2</EM>"
Comment 18 Dimitri van Heesch 2009-08-24 09:30:09 UTC
The warning is coming from the new line inside the argument list of \extref, causing a newline inside the quoted argument of the \ref command. I'll adjust the parser so it can handle this.
Comment 19 Dimitri van Heesch 2009-08-25 11:52:52 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.6.1. Please verify if this is indeed the case and reopen the
bug if you think it is not fixed (include any additional information that you
think can be relevant).