# A two-column layout with one column dedicated to additional content

I'm looking for a perhaps slightly unusual layout and I've not been able to find anything on the internet. Perhaps this is the closest but I'm looking for something more general.

Basically what I want is to have a (larger) column for mainly text and a smaller second column to hold figures and notes. I know about marginnotes but I'm not really sure that's going to give me quite what I want. In particular I want a larger column that will have a lot of text in rather than a few small columns (I've not even tried seeing how margin notes interact with page breaks)

I want to be able to use commands in regular text to put things into the other column but I also want to be able to have things that span both columns (e.g headers or large figures).

As a final and less important thing, it would be nice if I could have things in the second column appear close to the things in the main text (this would be more important for some things than others so some kind of "affinity" setting would be a plus).

Any full or partial solutions or indeed a relevant package would be helpful.

Here is an image of what I'd be aiming for (i.e. One main column with some stuff to the side and e.g a heading spanning both columns):

I think the best solution is still to use \marginpar (or if you prefer \marginnote from the marginnote package. Just make the \marginparwidth bigger, and textwidth correspondingly smaller.

And for the headings over the full width you can define an environment that typesets them in a wider environment.

Here is an example, using both \marginpar and \marginnote. This solution assumes a one-sided document layout, i.e. the margin notes are always to the right.

\documentclass{article}
\usepackage{calc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{marginnote}

\newlength{\fullwidth}
\setlength{\fullwidth}{\textwidth+\marginparwidth+\marginparsep}

% Two different possibilities to define a wide environment.

\newenvironment{widetext}{%
\par\hsize=\fullwidth \linewidth=\hsize \textwidth=\hsize \columnwidth=\hsize}%
{\par}

\newenvironment{wide}
{\begin{list}{}{\setlength{\leftmargin}{0pt}\setlength{\rightmargin}{-\marginparwidth-\marginparsep}}\item}
{\end{list}}

\begin{document}
\section{Introduction}
\label{sec:introduction}

Some intro text

\marginnote{\includegraphics[width=\linewidth]{example-image}}
\lipsum[1]
\marginpar{Nam dui ligula, fringilla a, euis- mod sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tel- lus. Donec aliquet, tortor sed ac- cumsan bibendum, erat ligula ali- quet magna, vitae ornare odio me- tus a mi. Morbi ac orci et nisl hendrerit mollis.}
\lipsum[3]
\begin{widetext}
\bfseries \Large A heading spanning both columns'' using the \texttt{widetext} environment. This is some more filler text.
\end{widetext}
\lipsum[4]\marginnote{Some more text in the margin positioned a bit upwards.}[-5\baselineskip]
\newpage
\begin{wide}
\bfseries \Large Another heading spanning both columns''. Now using the \texttt{wide} environment. This is some more text.
\end{wide}
\lipsum
\end{document}


If you want breakable text in your right column you could use the parallel package. Here is a suggestion to make that a bit easier:

\usepackage{parallel}
\newlength{\lefttextwidth}
\setlength{\lefttextwidth}{\textwidth}
\newcommand{\twocols}[2]
{\begin{widetext}
\begin{Parallel}{\lefttextwidth}{\marginparwidth}%
\ParallelLText{#1}
\ParallelRText{#2}
\end{Parallel}
\end{widetext}}


and then in the document:

\twocols
{\lipsum[1]}
{Some side remark.}
\twocols
{\textbf{Parallel Left}\lipsum[2]\lipsum[9]}
{\textbf{Parallel Right}\lipsum[3]}
\twocols
{\textbf{Parallel Left}\lipsum[4]}
{\textbf{Parallel Right}\lipsum[5]}


Sometimes the right column parts may bump into each other when mixing parallel and margin notes. In the case inserting \twocols{}{} may help.

• Thanks. This seems to be the sort of thing I want. I'm currently away from a computer with Latex installed. How does marginpar or marginnote cope with page breaks? Also can I reconfigure the float environments to have a position for the margin? – Dan Robertson Nov 21 '16 at 13:16
• Both marginpar and marginnote have trouble with page break. They are unbreakable (actually they are a kind of floats). If they are too close to the bottom they will stick into it. If you want to have breakable text in the right column you could look into the parallel package. But it is more work to structure your document, because you have to give each paragraph inside a command. Actually it is possible to use it together with my solution if you put a Parallel environment in a widetext environment. – Pieter van Oostrum Nov 21 '16 at 14:04
• I will add code to make it easier to use parallel for those cases where you want page breaks in your second column. – Pieter van Oostrum Nov 21 '16 at 14:21
• There is also this: tug.org/TUGboat/tb31-2/tb98hicks.pdf it mentions a \sidebar macro for the memoir style which seems like it could be useful to me. – Dan Robertson Nov 21 '16 at 14:34
• Thanks for mentioning this. But \sidebar doesn't keep its text close to the callout. I guess there really isn't a 100% ideal solution. It would be nice if \marginpars could be made breakable, just like footnotes. – Pieter van Oostrum Nov 21 '16 at 14:53