Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I open my CV/Cover letter in Adobe Reader I see that the \sections and \subsections are in that internal bookmarks. But is it possible to add the cover letter in there, because now it seems like my CV ends after my last \section entry on the CV part, but there is still the cover letter on the next page and I also added 2 full page pdf:s as attachments.

MWE:

\documentclass[11pt,a4paper,sans]{moderncv} 


\moderncvstyle{classic}                           
\moderncvcolor{blue}                               

\usepackage[scale=0.75]{geometry}
\title{Curriculum vitae}
\name{John}{Doe}


\begin{document}
\thispagestyle{empty}
\pagestyle{empty}
\makecvtitle
\section{Stuff 1} %this is on the table of contents
\section{Stuff 2} %this is on the table of contents
\subsection{Minor stuff 2} %this is on the table of contents

\clearpage
\title{Cover letter} %This is not
\recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State} 
\date{\today} 
\opening{Dear Sir or Madam,} 
\closing{Sincerely yours,}

\enclosure[Attached]{few pdfs} 

\makelettertitle

\newpage
\clearpage
\includepdf{pdf1} %This is not
\newpage
\clearpage
\includepdf{pdf2} %This is not
\end{document}

Id like to add the cover letter and the 2 attached full page pdf:s to the same bookmarks.

share|improve this question
    
Which Table of Contents? –  karlkoeller Mar 30 at 9:36
    
Are you talking about the bookmarks in the PDF view? –  egreg Mar 30 at 9:37
    
Ahh yeah the bookmarks. Sorry didn't know the correct word! –  wefwefwe Mar 30 at 9:45
add comment

2 Answers 2

up vote 4 down vote accepted

You can use the command \pdfbookmark provided by hyperref (loaded by moderncv) and add the bookmarks manually.

For example, just before

\makelettertitle

put

\pdfbookmark{Cover Letter}{Cover}

The same can be done before each included pdf file.

MWE (I've removed \newpages before \clearpages because have no sense):

\documentclass[11pt,a4paper,sans]{moderncv}

\usepackage{pdfpages}

\moderncvstyle{classic}
\moderncvcolor{blue}

\usepackage[scale=0.75]{geometry}
\title{Curriculum vitae}
\name{John}{Doe}


\begin{document}
\thispagestyle{empty}
\pagestyle{empty}
\makecvtitle
\section{Stuff 1} %this is on the table of contents
\section{Stuff 2} %this is on the table of contents
\subsection{Minor stuff 2} %this is on the table of contents

\clearpage
\title{Cover letter} %This is not
\recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State}
\date{\today}
\opening{Dear Sir or Madam,}
\closing{Sincerely yours,}

\enclosure[Attached]{few pdfs}

\pdfbookmark{Cover Letter}{Cover}
\makelettertitle

\clearpage
\pdfbookmark{First PDF}{PDF1}
\includepdf{pdf1} %This is not

\clearpage
\pdfbookmark{Second PDF}{PDF2}
\includepdf{pdf2} %This is not
\end{document} 

Output

enter image description here

share|improve this answer
add comment

Just add

\pdfbookmark[0]{Cover Letter}{CoverLetter}

after \clearpage:

\clearpage
\pdfbookmark[0]{Cover Letter}{CoverLetter}
\title{Cover letter} %This is not

Here's what I get in the bookmarks

enter image description here

The second argument is just a symbolic name, which should be unique.

If you want to add bookmarks for the enclosures, a level under the cover letter,

\clearpage
\pdfbookmark[1]{Enclosure 1}{Encl1}
\includepdf{pdf1} %This is not

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.