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

Things like <CODE>--prefix</CODE> do not work in LaTeX output (Origin: bugzilla #133418) #966

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

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 1, 2018

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

On 2004-02-04 17:37:31 +0000, bagnara@cs.unipr.it wrote:

If you use something like --prefix 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}

On 2004-02-05 20:22:46 +0000, Dimitri van Heesch wrote:

Do you know a solution that don't involve removing the fontenc package?

On 2004-02-05 20:51:31 +0000, bagnara@cs.unipr.it wrote:

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.

On 2006-07-07 02:56:11 +0000, André Klapper wrote:

reopening as information has been provided.

On 2009-07-08 09:20:24 +0000, m.geimer@fz-juelich.de wrote:

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).

On 2009-07-18 21:17:23 +0000, Dimitri van Heesch wrote:

Ok, I'll use the italic correction then. Should be fixed in the next subversion update.

On 2009-08-20 10:12:51 +0000, Dimitri van Heesch wrote:

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).

On 2009-08-20 12:00:50 +0000, bagnara@cs.unipr.it wrote:

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 0x00000000005936a0 in getCanonicalTypeForIdentifier ()

1 0x0000000000592dfa in extractCanonicalType ()

2 0x00000000005939b4 in extractCanonicalArgType ()

3 0x0000000000593f46 in matchArguments2 ()

4 0x000000000041fa01 in findMember ()

5 0x00000000004225e4 in filterMemberDocumentation ()

6 0x0000000000422677 in findMemberDocumentation ()

7 0x00000000004226bd in findMemberDocumentation ()

8 0x00000000004226bd in findMemberDocumentation ()

9 0x00000000004226bd in findMemberDocumentation ()

10 0x0000000000429217 in parseInput ()

11 0x0000000000402655 in main ()

(gdb)

On 2009-08-20 12:08:25 +0000, Dimitri van Heesch wrote:

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.

On 2009-08-20 14:12:57 +0000, Dimitri van Heesch wrote:

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?

On 2009-08-20 14:40:02 +0000, bagnara@cs.unipr.it wrote:

$ 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 0x0000000000430005 in QCString::duplicate (this=0x0, str=0x7708a2 "")

at qcstring.h:298

1 0x0000000000430077 in QCString::operator= (this=0x0, str=0x7708a2 "")

at qcstring.h:320

2 0x0000000000588dd1 in getCanonicalTypeForIdentifier (d=0x111bda0, fs=0x0,

word=@0x7fffffffc960, tSpec=0x0) at util.cpp:3140

3 0x000000000058959c in extractCanonicalType (d=0x111bda0, fs=0x0, type=

  {m_data = 0x2052e40 "std::vector< Parma_Polyhedra_Library::Row >::iterator"}) at util.cpp:3262

4 0x00000000005899ba in extractCanonicalArgType (d=0x111bda0, fs=0x0,

arg=0x204fd60) at util.cpp:3292

5 0x0000000000589be2 in matchArgument2 (srcScope=0x111bda0,

srcFileScope=0x0, srcA=0x204fd60, dstScope=0x1117050, 
dstFileScope=0xca5810, dstA=0x2051e20) at util.cpp:3334

6 0x0000000000589f8c in matchArguments2 (srcScope=0x111bda0,

srcFileScope=0x0, srcAl=0x204e150, dstScope=0x1117050, 
dstFileScope=0xca5810, dstAl=0x2052010, checkCV=true) at util.cpp:3426

7 0x0000000000416b2c in findMember (rootNav=0x114f1c0, funcDecl=

  {m_data = 0x2050610 "void iter_swap"}, overloaded=false, isFunc=true)
at doxygen.cpp:5818

8 0x00000000004183be in filterMemberDocumentation (rootNav=0x114f1c0)

at doxygen.cpp:6150

9 0x000000000041860c in findMemberDocumentation (rootNav=0x114f1c0)

---Type to continue, or q to quit---
at doxygen.cpp:6191

10 0x000000000041865d in findMemberDocumentation (rootNav=0x13450b0)

at doxygen.cpp:6201

11 0x000000000041865d in findMemberDocumentation (rootNav=0x104ed90)

at doxygen.cpp:6201

12 0x000000000041865d in findMemberDocumentation (rootNav=0xca3780)

at doxygen.cpp:6201

13 0x0000000000427ced in parseInput () at doxygen.cpp:10119

14 0x000000000040271b in main (argc=2, argv=0x7fffffffdbf8) at main.cpp:37

(gdb) frame 0

0 0x0000000000430005 in QCString::duplicate (this=0x0, str=0x7708a2 "")

at qcstring.h:298

298 if (m_data==str) return *this;
(gdb) print m_data
Cannot access memory at address 0x0
(gdb) print str
$1 = 0x7708a2 ""
(gdb)

On 2009-08-20 14:40:31 +0000, bagnara@cs.unipr.it wrote:

I was using the SVN version. Do you want me to download a tarball instead?

On 2009-08-20 14:48:31 +0000, Dimitri van Heesch wrote:

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).

On 2009-08-20 19:08:33 +0000, bagnara@cs.unipr.it wrote:

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.

On 2009-08-21 08:06:38 +0000, Dimitri van Heesch wrote:

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?

On 2009-08-21 08:18:20 +0000, bagnara@cs.unipr.it wrote:

/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 i
if i < n and maps[i] != ppl_not_a_dimension;
otherwise it is undefined on dimension i.
If the function is defined on dimension i, then dimension
i is mapped onto dimension maps[i].

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'.

On 2009-08-21 08:33:55 +0000, Dimitri van Heesch wrote:

Could it be related to the \extref command?
How is that command defined?

On 2009-08-21 09:49:30 +0000, bagnara@cs.unipr.it wrote:

Depending on the output kind we have either

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

or

ALIASES = "extref{2}=\2"

On 2009-08-24 09:30:09 +0000, Dimitri van Heesch wrote:

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.

On 2009-08-25 11:52:52 +0000, Dimitri van Heesch wrote:

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).

@doxygen doxygen closed this Jul 1, 2018

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