Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a pretty weird problem. If I use multiple pspicture environments in the same document, the first one gets rendered, but the other breaks. For example,

\begin{pspicture}(-3,-3)(3,3)
    \pstGeonode[PointName=none](0, 0){O}
    \pstGeonode[PointSymbol=none, PointName=N](1, 0.66){N}  
    \pstGeonode[PointSymbol=none, PointName=B](-1, 1){B}
    \pstGeonode[PointSymbol=none, PointName=W](0, -2){W}

    \pstLineAB[linecolor=black]{O}{N}
    \pstLineAB[linecolor=black]{O}{B}
    \pstLineAB[linecolor=black]{O}{W}

    \pstMarkAngle[linecolor=black, Mark=none]{N}{O}{B}{}
\end{pspicture}

followed by something ala'

\begin{pspicture}(3,5)
    \pstTriangle[PointSymbol=none, linecolor=black, linewidth=1.5\pslinewidth](0,4){A}(0,0){B}(3,0){C}
\end{pspicture}

makes the second element break, however, if i have just two of the second element there is no problem. Taking out the \pstMarkAngle line of the first enviroment seems to fix the problem.

So, my question in all its simplicity, how do I use pstMarkAngle without breaking subsequent pspicture environments?

EDIT: complete example

\documentclass{article}
\usepackage{pst-eucl}
\begin{document}
\begin{enumerate}[(a)]
    \item
    \begin{enumerate}[(i)]
        \item
        \begin{center}
        \begin{pspicture}(-3,-3)(3,3)
            \pstGeonode[PointName=none](0, 0){O}
            \pstGeonode[PointSymbol=none, PointName=N](1, 0.66){N}  
            \pstGeonode[PointSymbol=none, PointName=B](-1, 1){B}
            \pstGeonode[PointSymbol=none, PointName=W](0, -2){W}
            \pstLineAB[linecolor=black]{O}{N}
            \pstLineAB[linecolor=black]{O}{B}
            \pstLineAB[linecolor=black]{O}{W}
            \pstMarkAngle[Mark=none]{N}{O}{B}{}
        \end{pspicture}
        \end{center}
     \item
        \begin{center}
        \begin{pspicture}(3,5)
            \pstTriangle[PointSymbol=none, linecolor=black, linewidth=1.5\pslinewidth]
            (0,4){A}(0,0){B}(3,0){C}
        \end{pspicture}
        \end{center}    
    \end{enumerate}
\end{enumerate}
\end{document}

gives the following error:

GPL Ghostscript 9.05: Unrecoverable error, exit code 1

** WARNING ** Filtering file via command -->rungs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='/var/folders/ry/zcbxz44d46j7w58g2cvh8vf40000gp/T//dvipdfmx.NEz14AXD' '/var/folders/ry/zcbxz44d46j7w58g2cvh8vf40000gp/T//dvipdfmx.EXaHSm0G' -c quit<-- failed.
** WARNING ** Image format conversion for PSTricks failed.
** WARNING ** Interpreting special command pst: (ps:) failed.
** WARNING ** >> at page="1" position="(275.731, 343.294)" (in PDF)
** WARNING ** >> xxx "pst:  tx@Dict begin STP newpath /ArrowA { moveto } def /ArrowB "
** WARNING ** 7 memory objects still allocated
You may want to report this to tex-k@tug.org

and the second pspicture does not get rendered. Removing the \pstMarkAngle element resolves the problem.

UPDATE: using latex instead of XeLaTeX works. I suppose my installation of XeLaTeX (which came with TeXLive 2012) is buggy.

share|improve this question
    
I cannot see any problem with current TL 2012. Create a complete example which shows your problem. –  Herbert Feb 3 '13 at 17:36
    
I tried adding the full document. –  JustDanyul Feb 3 '13 at 17:44
    
@JustDanyul: A complete document starts with \documentclass and ends in \end{document}. Remove whatever is unnecessary while still being able to re-produce the problem. See how to create a minimal working example (MWE). –  Werner Feb 3 '13 at 17:45
    
You need to let us know what packages you're using. If I load article class and the packages enumitem and pst-eucl, I get a working document with everything marked up as expected. –  A.Ellett Feb 3 '13 at 18:13
    
@JustDanyul: No, I also have xelatex from TL 2012 and it works well. The problem is your missing complete example then we can say what's going wrong. With a \listfiles one can compare versions between different machines –  Herbert Feb 3 '13 at 20:32
show 2 more comments

1 Answer

Here's a document that works as expected and produces no error messages:

\documentclass{article}
\usepackage{enumitem}
\usepackage{pst-eucl}
\begin{document}
\begin{enumerate}[label=(\alph*)]
    \item
    \begin{enumerate}[label=(\roman*)]
        \item First diagram
        \hspace*{\fill}
        \begin{pspicture}[shift=-3,showgrid=true](-3,-3)(3,3)
            \pstGeonode[PointName=none](0, 0){O}
            \pstGeonode[PointSymbol=none, PointName=N](1, 0.66){N}  
            \pstGeonode[PointSymbol=none, PointName=B](-1, 1){B}
            \pstGeonode[PointSymbol=none, PointName=W](0, -2){W}
            \pstLineAB[linecolor=black]{O}{N}
            \pstLineAB[linecolor=black]{O}{B}
            \pstLineAB[linecolor=black]{O}{W}
            \pstMarkAngle[Mark=none]{N}{O}{B}{}
        \end{pspicture}
        \hspace*{\fill}
     \item Second diagram
        \hspace*{\fill}
        \begin{pspicture}[shift=-2,showgrid=true](3,5)
            \pstTriangle[PointSymbol=none, linecolor=black, linewidth=1.5\pslinewidth]
            (0,4){A}(0,0){B}(3,0){C}
        \end{pspicture} 
        \hspace*{\fill}
    \end{enumerate}
\end{enumerate}
\end{document}

I've changed a couple of things.

  1. I got rid of the centering. That creates extra vertical space that you probably really don't want or need. pstricks comes with a shift=<num> key that will allow you to reset the baseline for the pspicture.
  2. If you want to center the picture on the page, I'd just use \hspace*{\fill} on either side. Though technically, this is centered within the current \linewidth which has been shifted to the right by the indentation of created by the enumeration environments.
  3. I prefer the package enumitem to whatever you were using. The keys are more explicit and meaningful.
  4. I've also used showgrid=true to help illustrate the positioning of everything in the picture.

Here's what this looks like:

enter image description here

share|improve this answer
    
thank you for taking the time, unfortunately, this gives the same error as my initial version on my machine. I suspect the problem is with XELATEX –  JustDanyul Feb 3 '13 at 20:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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