makechapterhead
对和的报告类定义的以下修改makeschapterhead
与 hyperref 包配合不佳。特别是,单击书签无法到达正确的位置。
\documentclass{report}
\usepackage{lipsum}
\usepackage{hyperref}
\makeatletter
\renewcommand{\@makechapterhead}[1]
{\vspace*{-40\p@}
{\parindent \z@ \raggedright \normalfont
\hrule
\vspace{5pt}
\ifnum \c@secnumdepth >\m@ne
\LARGE\scshape {{\bfseries\@chapapp\space \thechapter}
\par\nobreak
\vskip 5\p@
\fi
\interlinepenalty\@M
\Large\scshape #1\par
}
\vspace{5pt}
\hrule
\nobreak
\vskip 40\p@
}
}
\renewcommand{\@makeschapterhead}[1]
{\vspace*{-40\p@}
{\parindent \z@ \raggedright\normalfont
\hrule
\vspace{5pt}
\interlinepenalty\@M
\Large\scshape{#1\par}
\vspace{5pt}
\hrule
\nobreak
\vskip 40\p@
}
}
\makeatother
\begin{document}
\tableofcontents
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\protect\numberline{}Preamble}
\chapter*{Preamble}
\lipsum[1]
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\protect\numberline{}Preface}
\chapter*{Preface}
\lipsum[2]
\chapter{Introduction}
\end{document}
任何帮助,将不胜感激。