From ross at biostat.ucsf.edu  Fri Nov 18 18:32:54 2005
From: ross at biostat.ucsf.edu (Ross Boylan)
Date: Fri, 18 Nov 2005 09:32:54 -0800
Subject: [Rd] problem with \eqn (PR#8322)
In-Reply-To: <437E0384.604@cimr.cam.ac.uk>
References: <20051117215558.33EB422485@slim.kubism.ku.dk>
	<437E0384.604@cimr.cam.ac.uk>
Message-ID: <20051118173254.GU17336@wheat.betterworld.us>

I put a response into the bug tracker, but I don't think it took.  So
I'm sending this; apologies if it's a duplicate.

On Fri, Nov 18, 2005 at 04:38:28PM +0000, Hin-Tak Leung wrote:
> Your own fault. 

Not on the evidence you presented.  line 1.7 below is in error, but
that's not my input.  My input was 
\eqn{{\bf\beta}_j}{b(j)}

The process of reading the .Rd file and generating the file for LaTeX
to process somehow doubles the initial LaTeX part, which is
{{\bf\beta}_j}  (and the ascii part is {b(j)}).

I suspect that the nested {} is causing trouble.

>See below. It is basic LaTeX and any LaTeX person
> can tell you the answer...(most probably haven't bothered...)
> 
> ross at biostat.ucsf.edu wrote:
> >Full_Name: Ross Boylan
> >Version: 2.2.0
> >OS: Linux
> >Submission from: (NULL) (65.175.48.58)
> >
> >
> >  \eqn{{\bf\beta}_j}{b(j)} in my .Rd file produces this error
> 
> 
> >--------------------------------------------
> >! Missing $ inserted.
> ><inserted text> 
> >                $
> >l.7 \eqn{{\bf\beta}_j}{\bf\beta}_
> >                                 jnormal-bracket5bracket-normal{b(j)}
> 
> \eqn{{\bf\beta}_j} is already syntactically complete, so latex
> complains the next "_" is not in maths mode, and automatically
> switch into maths mode for you (the $ inserted message) You have
> to match all the braces - you need 3 right-braces after \eqn,
> like this, at least:
> 
> \eqn{  {  {\bf\beta
>           }_j
>        }
>        {\bf\beta
>        }_ ....
>        {b(j)
>        }
>     }
> 
The nesting of braces above seems to have only the LaTeX part, i.e, at
top level it is \eqn{} not \eqn{}{}.  My intent was the latter.



[Rd] problem with \eqn (PR#8322)
Ross Boylan