retitle 361989 cxref-cpp wipes out the whole file
thanks
On Tue, 2006-04-11 at 12:28 -0400, Adam C Powell IV wrote:
> When a +latex+ line within a comment ends in \\ e.g. in an array or
> eqnarray environment, cxref thinks it's a line continuation, includes
> the next line, but then skips all of the remaining text in that section.
> Here's an example function comment which triggers the problem:
>
> /*++++++++++++++++++++++++++++++++++++++
> +latex+\begin{eqnarray}
> +latex+ \label{eq:kwc2eta_t}
> +latex+ \tau_\phi\phi_t = A &=& \frac{\delta\cal F}{\delta\phi} =
> +latex+ \nu^2\nabla^2\phi + f'(\phi) + s\mu'(\phi)|\nabla\theta|,\\\
> +latex+ \label{eq:kwc2theta_t}
> +latex+ \tau_\theta\mu(\phi)\theta_t = B\mu(\phi) &=&
> +latex+ \frac{\delta\cal F}{\delta\theta} =
> +latex+ s\nabla\cdot\left[\mu(\phi)\frac{\nabla\theta}{|\nabla\theta|} +
> +latex+ \right] + \epsilon^2\nabla^2\theta,
> +latex+\end{eqnarray}\par
>
> int vectorphase_interior_line_function Returns zero (or an error code).
>
> etc.
> ++++++++++++++++++++++++++++++++++++++*/
>
> And the output:
>
> \subsubsection{Global Function vectorphase\_interior\_line\_function()}
> \label{func_vectorphase_interior_line_function_vectorphase.c}
>
> \begin{eqnarray}
> \label{eq:kwc2eta_t}
> \tau_\phi\phi_t = A &=& \frac{\delta\cal F}{\delta\phi} =
> \nu^2\nabla^2\phi + f'(\phi) + s\mu'(\phi)|\nabla\theta|,\\ +latex+
> \label{eq:kwc2theta_t}
>
> \smallskip
> {\stt int vectorphase\_interior\_line\_function ( PetscScalar* x,
> PetscScalar* func, PetscScalar* temp, PetscTruth** mixed\_constraints, int
> points, int gxm, int gym, PetscScalar xmin, PetscScalar xmax, PetscScalar
> ycoord, PetscScalar zcoord, PetscScalar time, AppCtx* data )}
>
> So you see, it turned the \\\ into \\ (it turns \\ into \), appended the
> next line onto that one, and then skipped the remaining material in that
> section. And of course Latex throws an error.
>
> I know that cxref did not behave this way in the past, for I have used
> it before for the exact same source file. (The September 2004 date of
> the output file indicates I was probably using woody, so the woody
> version probably worked, the new one doesn't.) This is run using:
> cpp -CPP 'gcc -E -C -dD -dI' -latex
> Could the -CPP option used here be causing this problem? (The internal
> cxref pre-processor causes other problems...)
Indeed, this pre-processor is the problem. It not only concatenates the
lines, it puts a lone } on the line after, compounding the breakage.
The workaround is to make sure backslashes are not ending lines, e.g.
+latex+ s\mu'(\phi)|\nabla\theta|,\\ \label{eq:kwc2theta_t}
Tried the cxref C pre-processor, it left me with an empty file, hence
the bug re-title. :-(
-Adam
--
GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6
Welcome to the best software in the world today cafe!
http://www.take6.com/albums/greatesthits.html
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]