diff --git a/CHANGELOG b/CHANGELOG index 1693a7c..777fdd4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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. diff --git a/examples/template-es.pdf b/examples/template-es.pdf index 9534082..3c03ff6 100644 Binary files a/examples/template-es.pdf and b/examples/template-es.pdf differ diff --git a/examples/template-es.tex b/examples/template-es.tex index 8b0f833..357230d 100644 --- a/examples/template-es.tex +++ b/examples/template-es.tex @@ -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 diff --git a/examples/template-zh.pdf b/examples/template-zh.pdf index 591b370..b8bd21b 100644 Binary files a/examples/template-zh.pdf and b/examples/template-zh.pdf differ diff --git a/examples/template.pdf b/examples/template.pdf index 2c79e2e..a8ab00e 100644 Binary files a/examples/template.pdf and b/examples/template.pdf differ diff --git a/examples/template.tex b/examples/template.tex index c835c0a..857528d 100644 --- a/examples/template.tex +++ b/examples/template.tex @@ -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 diff --git a/examples/template_casual_orange.pdf b/examples/template_casual_orange.pdf index b4b68f0..9bad8d2 100644 Binary files a/examples/template_casual_orange.pdf and b/examples/template_casual_orange.pdf differ diff --git a/examples/template_classic_green.pdf b/examples/template_classic_green.pdf index 50751c7..824ec51 100644 Binary files a/examples/template_classic_green.pdf and b/examples/template_classic_green.pdf differ diff --git a/examples/template_multibib.pdf b/examples/template_multibib.pdf index 9e8e1e4..65f0efe 100644 Binary files a/examples/template_multibib.pdf and b/examples/template_multibib.pdf differ diff --git a/moderncv.cls b/moderncv.cls index 824847c..4e0a568 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -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} diff --git a/moderncvstyleclassic.sty b/moderncvstyleclassic.sty index 359f990..bce1ca9 100644 --- a/moderncvstyleclassic.sty +++ b/moderncvstyleclassic.sty @@ -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}@{}}% diff --git a/moderncvstyleoldstyle.sty b/moderncvstyleoldstyle.sty index 6ce1bc0..e23cb43 100644 --- a/moderncvstyleoldstyle.sty +++ b/moderncvstyleoldstyle.sty @@ -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]}