First of all, consider the following MWE:
Code: Select all
\documentclass{article}
\usepackage[danish]{babel}
\usepackage{pstricks-add}
\usepackage{hyperref}
\makeatletter
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
{\parindent \z@
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >\m@ne
\Large\bfseries\hfil\partname~\thepart\hfil
\par\nobreak
\fi
\huge \bfseries #2%
\markboth{}{}\par}%
\nobreak
\vskip 3ex
\@afterheading}
\makeatother
\begin{document}
\tableofcontents
\part{A very long title; longer than the width of the page, which gives me some problems}
\label{del1}
\begin{figure}[htbp]
\centering
\begin{pspicture}(1,1)
\psline(0,0)(1,1)
\end{pspicture}
\end{figure}
\end{document}
- I have PS figures in my real document so I have one in my example as well.
- The code part in the preamble is taken from here (which is taken from the article class).
If I use pdflatex there is no problems, but I cannot do that because of the PS graphics (as fare as I know); I use latex+dvipdf instead. Furthermore, there is no problem if I remove the hyperref package.
Thank you in advance!