When I compile with LaTeX + dvips, I get the following warning message:

Package hyperref Warning: You have enabled option breaklinks'.
(hyperref)                But driver hdvips.def' does not suppport this.


Right now, I am using the report document class and call the hyperref package with the following commands (I am using MikTeX 2.9 and WinEdt 7.0 on Windows 7)

\usepackage[breaklinks]{hyperref}
\usepackage[hyphenbreaks]{breakurl}


The document compiles (using LaTeX+dvips) and the links spanning two lines appear to break correctly, but I receive the warning message. Is this a problem? How can I fix it? I tried to add the following package and compile using pdflatex (instead of LaTeX + dvips)

 \usepackage[pdf]{pstricks}


but it produced the following warning message:

 >>> Loading package auto-pst-pdf <<<

Package pstricks Warning: ************************************
(pstricks)                Option pdf needs a "pdflatex -shell-escape <file>"
(pstricks)                or a "pdflatex -enable-write18 <file>"
(pstricks)                (if you are using MikTeX)
(pstricks)                ************************************.


I also get the following error, which prevented me from being able to compile with pdflatex:

 Package ifplatform Warning:
shell escape is disabled, so I can only detect \ifwindows

! Package auto-pst-pdf Error:
"shell escape" (or "write18") is not enabled:
auto-pst-pdf will not work!


Alternatively, I tried using the epstopdf package (and compiled with pdflatex), but that package is not compatible with the psfrag package. I am looking for a way to fix the breaklinks warning message (see above), without losing the ability to use eps figures and the psfrag package.

-
You need to compile using pdflatex, otherwise this won't work (see Hyperref link spanning two lines and Link text doesn’t break at end line). Is there a reason (or requirement) for using dvips? –  Werner Apr 2 '12 at 18:52
I use eps figures. –  richtera Apr 2 '12 at 18:58
use pdflatex, and eps-figures-with-pdflatex –  cmhughes Apr 2 '12 at 19:44
You're using conflicting declarations: if you use latex+dvips you mustn't load pstricks with the pdf option. Load the package breakurl after hyperref for being able to break URLs. However, switching to pdflatex by converting EPS files to PDF (which can be done automatically with the epstopdf package and the option --shell-escape to pdflatex) is better. –  egreg Apr 3 '12 at 12:16
My understanding is that epstopdf can not handle psfrag –  richtera Apr 3 '12 at 12:19

As you load the breakurl package you can safely ignore the warning message issued by the hyperref package. It’s the dedicated purpose of the breakurl package to enable breakable URL links in case of the traditional DVI→PS→PDF document generation path supported by the hdvips output driver. If you want to get rid of the redundant hyperref warning message omit the breaklinks option, i.e.,

\usepackage{hyperref}
\usepackage[hyphenbreaks]{breakurl}


or use the silence package:

\usepackage{silence}

\WarningFilter{hyperref}{You have enabled option breaklinks'.}

\usepackage[hyphenbreaks]{breakurl}


If you choose to switch from the DVI mode to the PDF mode of pdfTeX there will be no hyperref warning message and you won’t need the breakurl package since the hpdftex output driver is capable of breaking URL links itself. In this case, however, you additionally have to load a support package such as the pstool package facilitating the usage of psfrag features in the PDF mode of pdfTeX. Moreover, you probably have to enable the \write18{...} construct, e.g. by passing the appropriate command-line option (-shell-escape in TeX Live/Linux) to the pdflatex program. A little example (You need an EPS file pi.eps containing the tag pi):

%% LaTeX master file test.tex: Process with pdflatex -shell-escape test.tex.

\documentclass{article}

\usepackage{pstool}

\usepackage{hyperref}

\begin{document}

\begin{figure}
\centering
%% Include pi.eps and replace the tag ‘pi’ with π.
\pstool{pi}{\psfrag{pi}{$$\pi$$}}
\end{figure}

\noindent
\parbox{3cm}{\raggedright\url{http://tex.stackexchange.com}}

\end{document}

-
Can you please post a working example of the packages/options that are needed for pdf mode with the psfrag package? –  richtera Apr 11 '12 at 11:59
Can you also explain why the warning message is issued and how the breakurl fixes the problem? This would be helpful for others who run into the same problem. –  richtera Apr 11 '12 at 12:01
@richtera: I’ve upgraded my answer. –  mhp Apr 11 '12 at 22:13
I tried using the silence package and the warning filter you suggested, but it did not work. –  richtera Apr 12 '12 at 14:36
@richtera: With the TeX Live 2009 and current versions of the hyperref and silence` packages, it works at least. –  mhp Apr 13 '12 at 6:12