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.

I'm currently updating my CV and I am trying to mimic the CV found at

http://www.tedpavlic.com/post_resume_cv_latex_example.php

This particular example modifies the margins so that the section titles will go in the left margins.

Here is a minimal example that illustrates the problem that I am having:

\documentclass[11pt]{article}
\usepackage{calc}
\usepackage[breaklinks]{hyperref}

\usepackage{fancyhdr}

\reversemarginpar

\usepackage[paper=letterpaper,
            marginparwidth=1.2in, 
            marginparsep=.05in, 
            margin=1in,
            includemp]{geometry}

\setlength{\parindent}{0in}

\pagestyle{fancy}

\lhead{{\Large \textbf{Batman}}}

\renewcommand{\section}[2]%
        {\pagebreak[2]\vspace{1.3\baselineskip}%
         \phantomsection\addcontentsline{toc}{section}{#1}%
         \hspace{0in}%
         \marginpar{
         \raggedright \scshape #1}#2}

\begin{document}

\section{Contact Information}
Bat Cave, Gotham City

\newpage

\section{Favorite Buddies}
Robin and Batgirl

\end{document}

What I would like to have is for the fancy header to be as wide as the total width of both columns (which is something like \textwidth+\marginparwidth+\marginparsep).

The example that I started to mimic uses the following code to accomplish what I am looking for:

\newcommand{\makeheading}[1]%
        {\hspace*{-\marginparsep minus \marginparwidth}%
         \begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
                {\large \bfseries #1}\\[-0.15\baselineskip]%
                 \rule{\columnwidth}{1pt}%
         \end{minipage}}

The problem with this is that it only puts the header on the first page and I'd like to put it on every page. I'm hoping that I can modify the options for fancyhr to accomplish this.

I'm also open to other solutions that do not involve my approach. However, I'd rather not use specialized packages, like the res package.

Thanks in advance for any help!

share|improve this question

2 Answers 2

Use the titlesec package, then define your margins a bit narrower than normal, then use \hspace{-1in} in your titlesec macro (or however far you want the title to protrude into the margin.

share|improve this answer

The following minimal example achieves the output that I desired:

\documentclass{article}

\usepackage{calc}

\reversemarginpar
\usepackage[paper=letterpaper,
           marginparwidth=1.2in,     
           marginparsep=.05in,       
           hmargin={.75in,.75in},
           vmargin=1in,           
           includemp]{geometry}
\usepackage{fancyhdr}
\fancyheadoffset[LO,LE]{\marginparsep+\marginparwidth}
\fancyfootoffset[LO,LE]{\marginparsep+\marginparwidth}

\setlength{\parindent}{0in}

\pagestyle{fancy}

\lhead{{\Large \textbf{Batman}}}

\renewcommand{\section}[2]{\hspace{0in}\marginpar{\raggedright \scshape #1}#2}

\begin{document}

\section{Contact Information}
Bat Cave, Gotham City

\newpage

\section{Favorite Buddies}
Robin and Batgirl

\end{document}
share|improve this answer

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.