[texhax] Cannot use \makeindex and pst-pdf

George N. White III gnwiii at gmail.com
Sat Sep 22 16:33:18 CEST 2007


On Thu, 20 Sep 2007, Bart Wise wrote:

> I have been trying to get pst-pdf to work with makeindex with no success.  I
> am using ps4pdf to compile and I get the following error:
>
> ! LaTeX Error: Missing \begin{document}.
>
> This occurs with the first LaTeX run.  If I remove either the pst-pdf package
> or all of the indexing commands, it works; however, together I cannot get it
> to compile.
>
> How do I get pst-pdf and indexing to work?

You need to hide things that don't work in the latex portion of the
processing:

\usepackage{ifpdf}
\ifpdf
   \usepackage{index}
\else % provide dummy replacements
   \let\index=\relax
   \let\printindex=\relax
   \let\makeindex=\relax
\fi

> Code snippet:
>
> \documentclass[10pt,twoside]{book}
>
> \usepackage{pst-pdf}
> \usepackage{pst-blur}
> \usepackage{float}
> \usepackage{index}
> \makeindex
>
> \begin{document}
>
> Here's an image:
> \begin{figure}[H]
> \begin{postscript}[frame=false,showname=false]  % must have
>    \psblurbox[framearc=0.25,framesep=10pt]{%
>      \includegraphics[bb=0 0 73 51]{images/image-1.eps}
>    }
> \end{postscript}
> \end{figure}
>
> Here's some text.
> Here's \index{some}some \index{more}more \index{text}text.
>
> \printindex
>
> \end{document}
>

-- 
George N. White III  <aa056 at chebucto.ns.ca>


More information about the texhax mailing list