1

I'm working on a résumé which places section headers in a widened left margin. I'd like to use a fullwidth environment for the heading at the top of the page. Formally speaking, this would extend into the left margin to line up with the section headers. However, I can only get the heading to extend about two-thirds of the way to the right margin:

Observed vs desired

I added a leftmargin=-1in to the fullwidth package declaration to get the proper left-alignment, but even without it, the heading doesn't stretch the whole way to the right margin, as defined. Why is this, and how can I correct it?

(I also get a warning on the \hline about a "misplaced \noalign", which may be related.)

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=0.75in, left=1.5in]{geometry}

% Section headers in margins
% https://tex.stackexchange.com/a/1315/10906
\usepackage{titlesec}
\titleformat{\section}[leftmargin]
{\sffamily}
{}{0pt}{}
\titlespacing{\section}
{4pc}{1.5ex plus .1ex minus .2ex}{2pc}

\setlength\parindent{0pt}
\usepackage[leftmargin=-1in]{fullwidth}


\begin{document}

\begin{fullwidth}
\textsf{\Huge{John Q Doe}} \hfill johndoe@example.com
\hline
\end{fullwidth}

\section{Foo}
This is some brief free-form text about some stuff that I can do.  Did you know I do Thing~3 and Thing~4?  It's pretty cool; I know.

\section{Bar and Baz}
\ldots

\end{document}
1

Use adjustwidth from changepage instead. It allows you to adjust the margin widths for a specific piece of text (left and/or right; into/from the margins):

enter image description here

\documentclass{article}
\usepackage[margin=0.75in, left=1.5in]{geometry}

% Section headers in margins
% http://tex.stackexchange.com/a/1315/5764
\usepackage{titlesec}
\titleformat{\section}[leftmargin]
  {\sffamily}
  {}{0pt}{}
  \titlespacing{\section}
  {4pc}{1.5ex plus .1ex minus .2ex}{2pc}

\setlength\parindent{0pt}
\usepackage{changepage}

\begin{document}

\begin{adjustwidth}{-1in}{0pt}
  \textsf{\Huge John Q Doe} \hfill johndoe@example.com \par
  \hrulefill
\end{adjustwidth}

\section{Foo}
This is some brief free-form text about some stuff that I can do.  Did you know I do Thing~3 and Thing~4?  It's pretty cool; I know.

\section{Bar and Baz}
\ldots

\end{document}

Also, \hline is limited to a tabular-like scope. Rather use something like \hrulefill.

| improve this answer | |
  • Thanks! I especially like how the use of \par and \hrulefill give a horizontal rule that better splits the vertical space between the heading and the first section. – Tim Parenti Aug 10 '15 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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