# Looking for a mid-page break solution

I'm trying to write bios in a column document in which the employee's description appears next to their picture in the adjacent column. I'm trying to get the pictures to align perfectly with the bio descriptions so that I don't have to use a lot of manual adjusting and padding. A midpage break would make this easier, alas, I don't think it exists.

How can I control where text or an image appears in a column without it being shoved down by the content above? For example, an image appears half way down a column regardless of the content above it.

Edit: here's the code I've been using:

\documentclass[twocolumn,12pt,mysize]{Article}
\usepackage{multicol}
\begin{document}

\large\textbf{Person 1 Bio}\\\normalsize
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed doeiusmodtempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum..\medskip

%Ideally this would be the midcolumn break.

\begin{center}
\includegraphics[width=6cm]{../pictures/Person_2_Bio_Pic.png}
\end{center}

\newpage %column really

\begin{center}
\includegraphics[width=6cm]{../pictures/Person_1_Bio_Pic.png}
\end{center}

%Second midcolumn break.

\large\textbf{Person 2 Bio}\\\normalsize
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed doeiusmodtempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum..\medskip


I'm attempting to stagger the bios and their pictures:

Column 1 - Column 2

Person 1 Bio - Person 1 pic

Person 2 pic - Person 2 Bio

The thing I'm struggling with most is getting the bottom picture and bio to stay at a fixed position without the top bio and picture forcing them downward.

• Welcome to TeX.SX! Could you please provide add a minimal working example (MWE) that illustrates your problem? I don't really get what your setup and what the issue are. – Xavier May 27 '13 at 22:23
• I think the parallel package may be useful in your case. As Xavier wrote, it's best to post a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jub0bs May 27 '13 at 22:27

## 2 Answers

The following solution using mdframed allows page breaks. The bio environment has as mandatory argument the name of the file containing the image associated to the description.

I left the hidealllines=true option commented out only to show a frame around the environment to make clear that page breaks are allowed; simply un-comment out that line to hide the frame; adjust the lengths used according to your needs:

\documentclass{article}
\usepackage[a5paper]{geometry}% just for the example
\usepackage{graphicx}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}% just to generate text for the example

\newmdenv[
innerleftmargin=4cm,
singleextra={
\node[anchor=north west] at (P-|O) {\includegraphics[width=3cm]{\file}};
},
firstextra={
\node[anchor=north west] at (P-|O) {\includegraphics[width=3cm]{\file}};
},
%hidealllines=true
]{mbio}

\newenvironment{bio}[1]
{\gdef\file{#1}\begin{mbio}}
{\end{mbio}}
\begin{document}

\begin{bio}{ctanlion}
\lipsum[2]
\end{bio}

\begin{bio}{ctanlion}
\lipsum[4-5]
\end{bio}

\begin{bio}{ctanlion}
\lipsum[2]
\end{bio}

\end{document}


After the edit to the question, two similar environments can be used: lbio for the image on the left and the description to the right, and rbio, for the image to the right and the description to the left:

\documentclass{article}
\usepackage[a5paper]{geometry}% just for the example
\usepackage{graphicx}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}% just to generate text for the example

\newmdenv[
innerleftmargin=4cm,
singleextra={
\node[anchor=north west] at (P-|O) {\includegraphics[width=3cm]{\file}};
},
firstextra={
\node[anchor=north west] at (P-|O) {\includegraphics[width=3cm]{\file}};
},
hidealllines=true
]{mlbio}

\newmdenv[
innerrightmargin=4cm,
singleextra={
\node[anchor=north east] at (P) {\includegraphics[width=3cm]{\file}};
},
firstextra={
\node[anchor=north east] at (P) {\includegraphics[width=3cm]{\file}};
},
hidealllines=true
]{mrbio}

\newenvironment{lbio}[1]
{\gdef\file{#1}\begin{mlbio}}
{\end{mlbio}}
\newenvironment{rbio}[1]
{\gdef\file{#1}\begin{mrbio}}
{\end{mrbio}}

\begin{document}

\begin{lbio}{ctanlion}
\lipsum[2]
\end{lbio}

\begin{rbio}{ctanlion}
\lipsum[2]
\end{rbio}

\end{document}


In another comment, it has been requested to have both columns having the same width (and, possibly, some easy way to control the separation between them). This can be done with a little modification to my previous code; the newly defined \mysep length controls the separation (default value=8pt):

\documentclass{article}
\usepackage{geometry}% just for the example
\usepackage{graphicx}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}% just to generate text for the example

% A length to control the separation between columns
\newlength\mysep
\setlength\mysep{8pt}

\newmdenv[
innerleftmargin={\dimexpr0.5\textwidth+0.5\mysep\relax},
singleextra={
\node[anchor=north west] at (P-|O) {\includegraphics[width=3cm]{\file}};
},
firstextra={
\node[anchor=north west] at (P-|O) {\includegraphics[width=3cm]{\file}};
},
hidealllines=true
]{mlbio}

\newmdenv[
innerrightmargin={\dimexpr0.5\textwidth+0.5\mysep\relax},
singleextra={
\node[anchor=north east] at (P) {\includegraphics[width=3cm]{\file}};
},
firstextra={
\node[anchor=north east] at (P) {\includegraphics[width=3cm]{\file}};
},
hidealllines=true
]{mrbio}

\newenvironment{lbio}[1]
{\gdef\file{#1}\begin{mlbio}}
{\end{mlbio}}
\newenvironment{rbio}[1]
{\gdef\file{#1}\begin{mrbio}}
{\end{mrbio}}

\begin{document}

\begin{lbio}{ctanlion}
\lipsum[2]
\end{lbio}

\begin{rbio}{ctanlion}
\lipsum[2]
\end{rbio}

\begin{lbio}{ctanlion}
\lipsum[2]
\end{lbio}

\end{document}


CTAN lion drawing by Duane Bibby.

• +1 Nice, Gonzalo. I didn't think about page breaks for my solution. – jub0bs May 28 '13 at 7:13
• Maybe my updated code can help inform your solution? Thanks for your help! – jc_os May 28 '13 at 21:57
• @jc_os please see my updated answer. Is it something like that what you want? – Gonzalo Medina May 28 '13 at 23:59
• It is, but with a clear distinction or white space between the two columns down the middle. – jc_os May 30 '13 at 23:52
• @jc_os so both "columns" should have the same width? – Gonzalo Medina May 31 '13 at 0:01

If I understand your question correctly, the solution that follows should be right up your alley. Play around with it and see if it suits you.

Edit: this solution does not allow for page breaks within my custom photobio environment. See Gonzalo Medina's solution for that.

\documentclass{article}

\usepackage[margin=3cm]{geometry}
\usepackage{kantlipsum}

\newenvironment{photobio}{% custom environment for biographies
\setlength{\parindent}{0pt}
\begin{minipage}[t]{0.25\textwidth}
\vspace{0pt}

\newcommand\bio{% splits the photobio environment in two parts (photo & bio)
\end{minipage}\hspace{\fill}%
\begin{minipage}[t]{0.70\textwidth}
\vspace{0pt}
}
}{%
\end{minipage}\\[\baselineskip]
}

\newcommand\myphoto{\rule{2cm}{2cm}}

\begin{document}

\begin{photobio}
\myphoto
\bio
\kant[1]
\end{photobio}
%
\begin{photobio}
\myphoto
\bio
\kant[2]
\end{photobio}
%
\begin{photobio}
\myphoto
\bio
\kant[3]
\end{photobio}

\end{document}

• Maybe my updated code can help inform your solution? Thanks for your help! – jc_os May 28 '13 at 21:57