[pstricks] pstricks in addtocontents

Christopher Ellison chris_ellison at hotmail.com
Mon Sep 26 04:27:47 CEST 2005


I'm trying to add some pstricks to my table of contents using 
\addtocontents.

If I manually edit the toc file and then recompile it works fine.  However, 
I am having trouble using \addtocontents.  I have tried this along with many 
variants:

\addtocontents{toc}{\protect{\psframe(2,2)(4,4)}}

The error I get is this:

Runaway argument?
{problemlistiv}{\@startrue \def \next *{\@ifnextchar [{\pst@@object {\ETC.
! Paragraph ended before \@newctr was complete.
<to be read again>
                   \par
l.73 \addtocontents{toc}{\psframe(0,0)(1,1)\par}

As you can see, this error was caused when I tried the psframe without 
\protect. \problemlistiv is something I've defined but I believe it is 
unrelated to this error.

Any ideas?





More information about the PSTricks mailing list