[pracjourn-forum] A weird error

Peter Flynn pflynn at ucc.ie
Fri May 6 16:04:18 CEST 2005


On Thu, 2005-05-05 at 18:20, Peter Flom wrote:
> I asked a question on the TeXHax list, and got the following suggested
> code
> 
> <<<<<<BEGIN CODE   >>>>>
> 
> \documentclass{article}
> \usepackage{amsmath}
> \usepackage{pstricks,pst-node}
> \usepackage{fancyvrb}
> 
> \begin{document}
> 
> \begin{minipage}{0.45\textwidth}
> \begin{Verbatim}[commandchars=\|\[\]]
> We use the symbol |rnode[i1][$\sqrt]{x}$ to denote the
> |rnode[i2][\emph]{positive} square root
> \end{Verbatim}
> \end{minipage}
> \hfill
> \begin{minipage}{0.45\textwidth}
>   We use the symbol \rnode{o1}{$\sqrt{x}$}
>   to denote the  \rnode{o2}{\emph{positive}} square root
>   \ncbar[linestyle=dotted,dotsep=1pt,nodesep=3pt,angle=90]{->}{i1}{o1}
>  
> \ncbar[linestyle=dotted,dotsep=1pt,nodesep=3pt,angle=-90]{->}{i2}{o2}
> \end{minipage}
> 
> \end{document}
> 
> <<<<<<                 END CODE   >>>>>>>>>>>>>>>>>
> 
> this yielded the following error
> 
> 
> <<<<             SNIPPET  FROM LOG FILE  >>>>>>
> 
> ! Undefined control sequence.
> <recently read> \c at lor@to at ps
> 
> l.18 ...tsep=1pt,nodesep=3pt,angle=90]{->}{i1}{o1}
> 
> <<<<       END SNIPPET>>>>

That file processes without error on my system (attached).

> at this point, I say to myself "Huh?"    where is \c at lor@to at ps  ?

The @ signs indicate that this is an internal command, one used in the
internal controls of LaTeX or a package, and one that users (we) are not
ever meant to see :-)

>From the name it looks like it's doing something with color to ps
(PostScript?), so my guess is it's in one of the packages...but

$ for f in amsmath pstricks pst-node fancyvrb; do grep -H c at lor@to at ps
`dirname \`kpsewhich $f.sty\``*; done

produces no output, so it's elsewhere. A small steam-hammer like this

$ find /usr/TeX/texmf/tex/latex -name '*.sty' -exec grep -H c at lor@to at ps
{} \;

soon turns up:

/usr/TeX/texmf/tex/latex/changebar/changebar.sty: 
\def\cb at ps@color{\expandafter\c at lor@to at ps\cb at current@color\@@}}
/usr/TeX/texmf/tex/latex/graphics/pstcol.sty:        
\c at lor@to at ps\csname\string\color @#1\endcsname\@@}}}
/usr/TeX/texmf/tex/latex/texpower/tppstcol.sty: 
\c at lor@to at ps\csname\string\color @#1\endcsname\@@\space%
/usr/TeX/texmf/tex/latex/xcolor/xcolor.sty:    
{\noexpand\edef\noexpand#2{\noexpand\expandafter\noexpand\c at lor@to at ps
/usr/TeX/texmf/tex/latex/xcolor/xcolor.sty:           
\c at lor@to at ps\csname\string\color @#1\endcsname\@@}}}

of which pstcol.sty looks the most possible for your case, and at a
guess I'd say you may have an out-of-date copy of pstricks.

> I looked for this error in the LaTeX companion, and it certainly has a
> bit on undefined control sequence errors (on p. 912)  but I am mystified
> how this paragraph helps me.....that command isn't in the .tex file!

No, those internal-only commands can't be used in ordinary LaTeX files
because "@" isn't allowed in control sequences except within packages
(or between \makeatletter and \makeatother).

> While the above is on a .tex file that someone else sent me, this sort
> of thing happens to me a lot, with undeifined control sequences for
> things I never typed....
> 
> What am I missing?

Almost every command invokes other commands, which invoke other 
commands, and so on, and many of them go deep into the bowels of LaTeX,
using commands which you (and I) certainly never come across in a 
lifetime of LaTeXing.

LaTeX is not a flat control surface, it has many dimensions :-)

///Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text.tex
Type: text/x-tex
Size: 627 bytes
Desc: not available
Url : http://tug.org/pipermail/pracjourn-forum/attachments/20050506/55e0ad0f/text-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text.dvi
Type: application/x-dvi
Size: 2212 bytes
Desc: not available
Url : http://tug.org/pipermail/pracjourn-forum/attachments/20050506/55e0ad0f/text-0001.dvi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text.pdf
Type: application/pdf
Size: 30909 bytes
Desc: not available
Url : http://tug.org/pipermail/pracjourn-forum/attachments/20050506/55e0ad0f/text-0001.pdf


More information about the pracjourn-forum mailing list