0

MWE:

\documentclass{book}
\usepackage[hmargin=0in,vmargin=0in,paperwidth=12in,paperheight=8.75in]{geometry}
\usepackage{pstricks-add}
\psset{unit=1in}

\definecolor{bulgarianrose}{rgb}{0.28, 0.02, 0.03}
\definecolor{flax}{rgb}{0.93, 0.86, 0.26}


%\pagecolor{bulgarianrose}

\begin{document}
    \thispagestyle{empty}

\begin{pspicture}(-3,0)(6,8.75)   
    \psframe*[linecolor=bulgarianrose](-3,0)(6,8.75)%
    \pstVerb{3 srand}% init random numbers
    \pscustom[fillstyle=solid,fillcolor=flax!75!black]{%   
        \psline(-3,0)(-6,0)
        \pslineByHand[VarStepEpsilon=8,varsteptol=5](-3,0)(6,2.5)
        \psline(6,2.5)(6,0)
        \psline(-3,0)
    }
    \pstVerb{3 srand}
    \pslineByHand[linecolor=white,linewidth=1.5pt,VarStepEpsilon=8,varsteptol=5](-3,0)(6,2.5)
\end{pspicture}%
\end{document}

with the output

enter image description here

I would like shift the red and flax portion of the picture all the way over to the right of the 12" x 8.5" white rectangle. However, \hskip or hspace does not seem to work.

I have also tried generating the colored portions of the box directly where I want, but I have not been able to do that successfully either.

How may I position the red and flax content of the pspicture flush against the right hand side of the 12" x 8.5" white rectangle? I compile the code with xelatex.

2
  • 1
    \hfill\begin{pspicture}
    – Sandy G
    Commented Apr 4 at 3:17
  • @SandyG Thank you for your comment. I had been on a computer which uses an older version of Latex; as a result, this did not work. However, such is not the case with my updated version. Thanks again.
    – Jethro
    Commented Apr 4 at 13:46

1 Answer 1

1
\rput[rt](\textwidth,\baselineskip){%
\begin{pspicture}(-3,0)(6,8.75)   
  \psframe*[linecolor=bulgarianrose](-3,0)(6,8.75)%
  \pstVerb{3 srand}% init random numbers
  \pscustom[fillstyle=solid,fillcolor=flax!75!black]{%   
    \psline(-3,0)(-6,0)%
    \pslineByHand[VarStepEpsilon=8,varsteptol=5](-3,0)(6,2.5)%
    \psline(6,2.5)(6,0)%
    \psline(-3,0)%
  }%
  \pstVerb{3 srand}%
  \pslineByHand[linecolor=white,linewidth=1.5pt,VarStepEpsilon=8,varsteptol=5](-3,0)(6,2.5)%
\end{pspicture}′
}

or simply the '\hfill` from Sandy G

1
  • Thank you for posting this alternative to the comment.
    – Jethro
    Commented Apr 4 at 13:47

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.