Consider the following MWE:
Code: Select all
\documentclass{article}
\usepackage[colorlinks=true]{hyperref}
\usepackage{hypdvips}
\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\sffamily\raggedleft #2%
\markboth{}{}\par}%
\nobreak
\vskip 3ex
\@afterheading}
\makeatother
\begin{document}
\tableofcontents
\part{A long, non-sense title in order to illustrate my point regarding the problem}
\section{A long, non-sense title in order to illustrate my point regarding the problem}
\end{document}
Furthermore, is it possible to make ``I'' and the space between this number and the title non-interactive? (This is not as important as the other problem. Therefore, if you can only help with the first problem, please post your solution anyway.)
Thank you in advance!
P.S. The two loaded packages (among others) are used in my non-test document.