[comp.text.tex] PiCTeX under LaTeX: problem with $

young@emx.utexas.edu (Young U. Ryu) (10/02/90)

I have been trying to use PiCTeX with LaTeX.
Because sometimes LaTeX + PiCTeX causes troubles
in TeX memory capacity, I frequently use
BTeX or BTex286 version of emTeX.

However, my problem has nothing to do with such
TeX memory capacity proubems.

The following is an example of PiCTeX manual. Surely
it works perfectly under TeX + PiCTeX.

   \beginpicture
   \setcoordinatesystem units <40pt,80pt>
   \setplotarea x from -2 to 2, y from 0 to 1
   %\ninepoint
   \axis bottom ticks
         numbered from -2 to 2 by 1
         length <0pt> withvalues $\alpha^2$ $\beta^2$ /
            at -.5 .5 /  /
   \axis top ticks
         length <8pt> width <.2pt> numbered from -1.5 to 1.5 by 1.0
         length <4pt> unlabeled from -2.00 to 2.00 by .25 /
   \axis left label {\stack {I,N,C,O,M,E}} ticks
         withvalues \$0 \$10,000 \$20,000 \$30,000 \$40,000 /  % <-- LOOK
         quantity 5 /
   \axis right label {\lines {Value\cr of $A_n$\cr}} ticks
         withvalues {$1/1$} {$1/2$} {$1/3$} {$1/n$} /
           at 1 .5 .33333 .123 /
         unlabeled at .25 .2 .16667 .14286 / /
   \endpicture

When I ran it with LaTeX as follows

   \documentstyle[12pt]{article}
   \input prepictex
   \input pictex
   \input postpictex

   \begin{document}
   \beginpicture
      ... ...
   \endpicture
   \end{document}

I have the following error message:

   ! TeX capacity exceed, sorry [input stack size = 200]
   \pdollar ...imen \@ne\font >\z@ \sl \fi \char `\$
                                                  }

In case of BTeX or BTeX286 version of emtex, the input stack
size = 300 in the error message.

Anyway, in order to solve the problem, I have defined

   \def\mydollar{{\rm\char'44}}

and used \mydollar instead of \$:

     ...
     withvalues \mydollar 0 \mydollar 10,000 ... ...  /  % <-- LOOK
     ...

Now, it worked perfectly even with the regular version
(i.e. small TeX) of LaTeX.

I guess the trouble is that PiCTeX under LaTeX does not
like the way \$ is defined in lplain.tex or latex.tex.

Can anybody give me some words of wisdom?
Or does anybody havs suggestions about repairing
this problem so that one may use \$
instead of defining and using \mydollar?

Thanks in advance ...

Young (Univ of Texas at Austin)
young@emx.utexas.edu

mattes@azu.informatik.uni-stuttgart.de (Eberhard Mattes) (10/02/90)

>    ! TeX capacity exceed, sorry [input stack size = 200]
>    \pdollar ...imen \@ne\font >\z@ \sl \fi \char `\$
>                                                   }
That's a very obscure incompatibility between LaTeX and PiCTeX.
Just create and use a document style option (dollar.sty, e.g.) containing

\def\pdollar{{\ifdim \fontdimen\@ne\font >\z@ \sl \fi\char36}}

(replacing `\$ with 36.) Maybe a PiCTeX expert can give more
details about this bug...

--
       Eberhard Mattes   (mattes@azu.informatik.uni-stuttgart.de)