[OS X TeX] Missing $ inserted in a "variations" environment

Ross Moore ross at ics.mq.edu.au
Sun Mar 15 22:13:11 CET 2009


Hi Alain,

On 16/03/2009, at 7:56 AM, Alain Schremmer wrote:

> On Mar 15, 2009, at 4:24 PM, Peter Dyballa wrote:
>
>>  discipline like you demonstrated
>
> You really ought NOT to make fun of your elders.
>
>> or uses GNU Emacs, which in AUCTeX mode colourizes the & in red.
>
> Forget THAT.

I think we need a few smileys here.
  :-)


What Peter was saying, and Jonathan has implied, is that if
you use the coding:

%\noindent \makebox[\textwidth][c]{
  \begin{variations}
    x  & \mI  &   & \alpha& & & 1 & & \beta&  & & 2 & & \pI & \\
    \filet
  f'(x) & \bg & + & \bb&  & + & \z & -& \bb & & - &\z& + & &\bd \\
  \filet
   \m{f(x)} & \bg \mI &  \c \h{\pI} & \bb& \mI & \c & \h{-1} & \d \mI  
& \bb
& \h{\pI}& \d &\frac{3}{2}& \c
   & \h{\pI} & \bd \\
\end{variations}
%}

then error messages become more meaningful.
Note the comment characters before the \noindent and '}'.
These are essential.

The reason is that \makebox reads its full argument; ie. down to '}'
before processing any of the commands it contains.
Thus if an error or warning occurs, then TeX reports it as
occurring at the line number where it has read to --- namely
at the end, where '}' occurred.

By removing that \makebox (using comments, since presumably
we'll need it back again after having debugged the problem)
then TeX is reading and interpreting contiguously.
Hence when an error occurs, the messages will identify the
correct place within this tabular material.


This is generally a better debugging technique than inserting
extra stuff within the output, using iXXXX as has been suggested.
The latter works here, but only because TeX isn't too confused
by the particular error. In other circumstances you may get
no output at all, so  iXXXX  would leave you none the wiser.


>
> Best regards
> --schremmer
> -----------


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------






More information about the macostex-archives mailing list