[texhax] \newcommand

Phil Parker phil at math.twsu.edu
Thu Sep 25 16:21:30 CEST 2003

On 09/25/2003 at 03:42 PM, Barbara Beeton <bnb at ams.org> wrote:

>control sequences containing @ signs are "internal" ones,
>and must be given special attention.  the fix, fortunately,
>is simple.  two possibilities:

> - put your new command in a file named whatever.sty and
>   then \usepackage{whatever}

> - leave the definition in the preamble of your document
>   and surround it by the commands
>     \makeatletter
>     ...
>     \makeatother

in reference to the following command which does not work as-is in a

>  \setlength{\unitlength}{1pt}
>  \makeatletter
>  \begin{picture}(\strip at pt\linewidth,#1)
>    \put(0,0){\framebox(\strip at pt\linewidth,#1)[tl]{#2}}
>  \end{picture}
>  \makeatother}

If the entire thing is enclosed in \makeatletter...\makeatother (or
equivalently put in a style file), then the \makeatletter...\makeatother
inside the command (lines 3 and 7 above) is not necessary, correct?

    Phil Parker
URL http://www.math.twsu.edu/Faculty/Parker/
Random quote:
  Don't be humble; you're not that great.---Golda Meir

More information about the texhax mailing list