[OS X TeX] problems with \pdfliteral

Ross Moore ross at ics.mq.edu.au
Sun Jul 23 03:14:06 CEST 2006


On 23/07/2006, at 12:24 AM, Stephen Moye wrote:

> No matter how I do it:
>
> \newtoks\colortoks
> \newcommand{\whatcolor}[1]{\colortoks={#1 }}
> \pdfliteral{\the colortoks k}

Don't you mean something like this ?

\newtoks\colortoks
\newcommand{\whatcolor}[1]{\colortoks={#1 }}
\whatcolor{0 0 0 1}
\pdfliteral{\the\colortoks k}


>
> or
>
> \newcommand{\whatcolor}[1]{\def\colorit{#1 }}
> \expandafter\pdfliteral\expandafter{\colorit k}

Here \colorit isn't defined until \whatcolor has been used.


>
> I end up with an error (and a blank page where \pdfliteral is used)  
> in Acrobat:
>
> "There were too many arguments."
>
> but no error at all in TeXShop or Preview.
>
> Could somebody enlighten me about what is happening, and a workaround?
>
> I'm glad I decided to try this in Acrobat, just as a test...
>
> Thanks for any help.
>
> SGM


Hope this helps,

	Ross

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


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list