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

@ -1,3 +1,7 @@
version 0.18 (xx Feb 2012)
- corrects the handling of pdf bookmarks, as suggested on stackexchange by
U. Fischer.
version 0.17 (25 Jan 2012)
- changed the footer algorithm of style casual to avoid starting lines with
the footer symbol.

Binary file not shown.

View File

@ -15,7 +15,7 @@
%\nopagenumbers{} % elimine el comentario para suprimir la numeracion automatica de las paginas para CVs mayores a una pagina
% codificacion de caracteres
\usepackage[utf8]{inputenc} % reemplace con su codificacion
%\usepackage[utf8]{inputenc} % reemplace con su codificacion
%\usepackage{CJKutf8} % si necesita usa CJK para redactar su CV en chino, japones o coreano
% ajustes para los margenes de pagina

Binary file not shown.

Binary file not shown.

View File

@ -15,7 +15,7 @@
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
% character encoding
\usepackage[utf8]{inputenc} % replace by the encoding you are using
%\usepackage[utf8]{inputenc} % if you are not using xelatex ou lualatex, replace by the encoding you are using
%\usepackage{CJKutf8} % if you need to use CJK to typeset your resume in Chinese, Japanese or Korean
% adjust the page margins

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -114,6 +114,7 @@
pdfcreator = \LaTeX{} with `moderncv' package,
pdfproducer = \LaTeX{},
bookmarksopen = true,
bookmarksdepth= 2,% to show sections and subsections
pdfauthor = \@firstname~\@familyname,
pdftitle = \@title,
pdfsubject = \@firstname~\@familyname,
@ -278,8 +279,8 @@
\newcommand*{\cvlistdoubleitem}[3][\listitemsymbol]{}
% makes a typical cv job / education entry
% usage: \cventry{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}
\newcommand*{\cventry}[6]{}
% usage: \cventry[spacing]{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}
\newcommand*{\cventry}[7][.25em]{}
% makes a cv entry with a proficiency comment
% usage: \cvitemwithcomment[spacing]{header}{text}{comment}

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}@{}}%

View File

@ -139,18 +139,19 @@
\ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}}}
\renewcommand*{\section}[1]{%
\vspace*{2.5ex}%
\par\vspace{2.5ex}%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{part}{#1}%
\addcontentsline{toc}{section}{#1}%
\parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}%
\par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading
% starred variant, which is identical but defined to allow its use (e.g. for natbib compatibility, who uses \section*{} for the bibliography header)
\newif\@if
\renewcommand*{\subsection}[1]{%
\par%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{subsection}{#1}%
\subsectionstyle{#1}%
\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]{%
\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }{#3}\\[#1]}