GNOME Bugzilla – Bug 133418
Things like <CODE>--prefix</CODE> do not work in LaTeX output
Last modified: 2009-08-25 11:52:52 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}
Do you know a solution that don't involve removing the fontenc package?
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.
reopening as information has been provided.
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 – or — 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).
Ok, I'll use the italic correction then. Should be fixed in the next subversion update.
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).
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
+ Trace 217035
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.
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?
$ 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
+ Trace 217040
Cannot access memory at address 0x0 (gdb) print str $1 = 0x7708a2 "" (gdb)
I was using the SVN version. Do you want me to download a tarball instead?
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).
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.
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?
/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'.
Could it be related to the \extref command? How is that command defined?
Depending on the output kind we have either ALIASES = "extref{2}=\ref \1 \"\2\"" or ALIASES = "extref{2}=<EM>\2</EM>"
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.
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).