Corrects the handling of pdf bookmarks, as suggested on stackexchange by

U. Fischer
This commit is contained in:
Xavier Danaux
2012-02-04 16:14:01 +01:00
parent e89b996e21
commit e8eda4b3f0
12 changed files with 21 additions and 14 deletions

View File

@ -129,21 +129,22 @@
\settoheight{\baseletterheight}{\sectionstyle{o}}
\setlength{\baseletterheight}{\baseletterheight-0.95ex}
\renewcommand*{\section}[1]{%
\vspace*{2.5ex}%
\parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
\par\vspace{2.5ex}%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{part}{#1}%
\addcontentsline{toc}{section}{#1}%
\parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
\hspace{\separatorcolumnwidth}%
\parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}%
\par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading
\renewcommand*{\subsection}[1]{%
\par%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{subsection}{#1}%
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
\raggedleft\hintfont{} &{\subsectionstyle{#1}}%
\end{tabular}%
\par\nobreak\vskip 0.5ex\@afterheading}% to avoid a pagebreak after the heading
% \phantomsection{}% reset the anchor for hyperrefs
% \addcontentsline{toc}{chapter}{#1}% does not work, the bookmark is placed at the same level as sections (placed themselves at part level to be visible, as hyperref does not allow sections without parents...)
\renewcommand*{\cvitem}[3][.25em]{%
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%