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

Latex formulas are not stripped of /// style comments (Origin: bugzilla #487871) #2669

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.5.3 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2007-10-18 11:58:20 +0000, James French wrote:

Please describe the problem:
/// \f{eqnarray*}
/// N_{i,1}(x) & = & \left{
/// \begin{array}{ll}
/// 1 & \mbox{if $t_i \le x < t_{i+1}$ (inclusive on end knot)} \
/// 0 & \mbox{otherwise}
/// \end{array}
/// \right. \[8pt]
///
/// N_{i,k}(x) & = &
/// \frac{x - t_i}{t_{i+k-1} - t_{i}} N_{i,k-1}(x) +
/// \frac{t_{i+k} - x}{t_{i+k} - t_{i+1}} N_{i+1,k-1}(x)
/// \f}

The generated formula for this fragment still contains the /// comment markup. Using /** */ style comments works.

I tried with a few different versions of doxygen. It worked in 1.4.2. It's been broken since 1.4.7 (1.4.6 screwed up Latex in a big way). Didn't try any other versions.

Steps to reproduce:
1.
2.
3.

Actual results:

Expected results:

Does this happen every time?
Yes

Other information:

On 2007-10-23 19:21:45 +0000, Dimitri van Heesch wrote:

I haven't been able to reproduce the problem given your example.

If you run doxygen with the -d commentcnv option it gives the result after replacing the /// comments with a /../ internally. Maybe this helps you to debug the problem. I get:

/** \f{eqnarray*}
N_{i,1}(x) & = & \left{
\begin{array}{ll}
1 & \mbox{if $t_i \le x < t_{i+1}$ (inclusive on end knot)} \
0 & \mbox{otherwise}
\end{array}
\right. \[8pt]

N_{i,k}(x) & = &
  \frac{x - t_i}{t_{i+k-1} - t_{i}} N_{i,k-1}(x) +
  \frac{t_{i+k} - x}{t_{i+k} - t_{i+1}} N_{i+1,k-1}(x)
\f} */

which is what I would expect.

On 2008-09-24 12:44:46 +0000, Sven Fischer wrote:

Here's another example using doxygen 1.5.6 with the -d commentcnv command line parameter. The first formula still contains the "///" marks, whereas the second one is prefixed by "*/ /**". However, the third version seems to work just fine.

/// \brief Generate a symmetric Hann window.
///
/// Generate the \a iSize point symmetric Hann window \a ptArrayOut.
/// The window is defined as
/// \f[
/// w[n] = a - \left(1-a\right) \cos\left( 2 \pi \frac{n}{N-1} \right)
/// \quad \mathrm{with} \quad a = 0.50
/// \f]
/// \f[
/// w[n] = a - \left(1-a\right) \cos\left( 2 \pi \frac{n}{N-1} \right)
/// \quad \mathrm{with} \quad a = 0.50
/// \f]
/// \f[
/// w[n] = a - \left(1-a\right) \cos\left( 2 \pi \frac{n}{N-1} \right)
/// \quad \mathrm{with} \quad a = 0.50
/// \f]
/// for \f$ 0 \leq n \leq N-1 \f$, otherwise zero.
template inline
T *genWindowHann(T *ptArrayOut, int iSize);

Maybe this helps a bit. It would be nice if someone could fix this bug before it gets a chance to celebrate its anniversiry. ;-)

On 2009-02-23 19:42:36 +0000, Tobias Mueller wrote:

Hey Dimitri, there is a new example in comment # 2. I am thus reopening. However, feel free to ask any further question.

On 2009-03-16 14:28:16 +0000, Matthias Heil wrote:

Created attachment 130749
sample code

Try running this through doxygen to confirm that "///" are incorporated
into the latex equation if the latex source spans several lines.

On 2009-03-16 14:46:58 +0000, Matthias Heil wrote:

Hi,

I can confirm this problem which has been annoying
me for a while. The bug must have crept in sometime
between version 1.4.4 and 1.4.7 (and it's still in
1.5.8, the latest version I have installed).

(I've just submitted sample code as an attachment
and that seems to have sent itself off without returning
me to this page, so I'm including the sample code again here.)
The key thing is that the "///" gets included as soon
as the latex source code spans more than one line.

Here is the html created when this file is processed
with doxygen version 1.3.9.1:

http://www.maths.manchester.ac.uk/~mheil/DUMP/doxygen_bug/html_version1.3.9.1/classJunk.html

and this is what it looks like when version 1.4.7
is used:

http://www.maths.manchester.ac.uk/~mheil/DUMP/doxygen_bug/html_version1.4.7/classJunk.html

Here's the example code:

//=============================================
/// This is a class that does stuff.
/// It solves the equation \f$ y'' + y = 0 \f$
/// or even
/// \f[
/// y'' + y' = f(x)
/// \f]
/// or
/// \f[ y'' + y' = f(x) \f]
/// Pretty good or what?
//==============================================
class Junk
{
public:

Junk(){}

};

(In reply to comment # 0)

Please describe the problem:
/// \f{eqnarray*}
/// N_{i,1}(x) & = & \left{
/// \begin{array}{ll}
/// 1 & \mbox{if $t_i \le x < t_{i+1}$ (inclusive on end knot)} \
/// 0 & \mbox{otherwise}
/// \end{array}
/// \right. \[8pt]
///
/// N_{i,k}(x) & = &
/// \frac{x - t_i}{t_{i+k-1} - t_{i}} N_{i,k-1}(x) +
/// \frac{t_{i+k} - x}{t_{i+k} - t_{i+1}} N_{i+1,k-1}(x)
/// \f}

The generated formula for this fragment still contains the /// comment markup.
Using /** */ style comments works.

I tried with a few different versions of doxygen. It worked in 1.4.2. It's been
broken since 1.4.7 (1.4.6 screwed up Latex in a big way). Didn't try any other
versions.

Steps to reproduce:
1.
2.
3.

Actual results:

Expected results:

Does this happen every time?
Yes

Other information:

On 2009-03-16 15:12:56 +0000, Tobias Mueller wrote:

Matthias, thank you very much for your input! Let's hope, Dimitri can have a look at it soon :)

Yes, the bugzilla is slow some times and doesn't return any pages. The actions, though, are performed most of the time.

On 2010-08-22 18:06:53 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2010-08-22 18:09:18 +0000, Dimitri van Heesch wrote:

*** This bug has been marked as a duplicate of bug 336053 ***

@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