The following trivial example illustrates my objective to create a converting operator ptcm (pt to cm). Unfortunately, it produces errors in TeX world as opposed to PS world.



\pstVerb{/ptcm {\pst@number\psunit\space div} bind def}
\psline(!4 12 ptcm sub 0)

The error messages are:

! Undefined control sequence.
<argument> /ptcm {\pst 
                       @number\psunit \space div} bind def
l.17 \end{frame}

! Emergency stop.
<argument> /ptcm {\pst 
                       @number\psunit \space div} bind def
l.17 \end{frame}

How to create a new converting operator?

<argument> /ptcm {\pst 
                       @number\psunit \space div} bind def

shows you that \pst@number has been parsed as \pst @number because @ is not a letter.

Beamer reads frame bodies as a macro argument so you need to put \makeatletter before the frame.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.