[pstricks] PSTricks and pdftricks

Herbert Voss LaTeX at zedat.fu-berlin.de
Mon Jul 4 18:27:58 CEST 2005


Tom Diamond wrote:

> I am using pdftricks to "marry" PSTricks with pdflatex. This works OK 
> for ordinary code. But what I want to do is redefine how chapters look 
> using pstricks. Something like:
> 
> \makeatletter
> \def\@makechapterhead#1{%
> \blah\blah\blah - nice pstricks code here
> \makeatother
> 
> The above works OK with latex - dvips. Using pdftricks and pdflatex, 
> however, exits with an error (and of course no output).
> Is there a way to use the above "code" with pdflatex?

Should also be possible with pdftricks, maybe other can say more.
I always use pst-pdf (http://perce.de/LaTeX/pst-pdf/

\documentclass{book}
\usepackage{pstricks}
\usepackage{pst-pdf}
\makeatletter
\def\@makechapterhead#1{%
\psshadowbox[fillstyle=solid,fillcolor=red!50,%
   shadow=true,shadowcolor=blue,linecolor=red!50]{\Huge\thechapter\ #1}}
\makeatother
\begin{document}

\chapter{foo}
\section{bar}
\newpage
\subsection{baz}
\chapter{and}
\section{bar}
\newpage
\subsection{baz}
\chapter{bar}
\section{bar}
\newpage
\subsection{baz}

\end{document}


with the script ps4pdf everything works fine and is easy to use.
However, the easiest way is to use ps2pdf.

Herbert





More information about the PSTricks mailing list