0

I'm new to TeX and been searching for a solution for this for a while.

I'm writing a document which contains a multicols environment with three columns.

What I want to do is to create a box of content with the width of two columns which could potentially be forced to be placed on the top-left, top-right, bottom-left or bottom-right position of a page.

I've started with the top-left idea which seemed the easiest one.

I tried to create a minipage of my content and put it at the beginning of the page but in this case the multicols writes text on top of my 'subcontent' as the image below shows.

My problem

Here is the code I used to generate this sample.

\documentclass[10pt,final,hyphenatedtitles]{minimal}


\usepackage[latin]{babel}

\usepackage{multicol}
\usepackage{lipsum}
\setlength{\columnsep}{0.2cm}
\usepackage{color}

\begin{document}
\begin{multicols}{3}


\noindent\colorbox{green}{
    \begin{minipage}[l][0.28\textheight]{2\columnwidth}
        \lipsum[10]
    \end{minipage}
}

\lipsum
\lipsum 

\end{multicols}
\end{document}

How can I make the multicols text wrap around the minipage I created? Is there another component that I should be using?

Thank you

  • The flowfram package is the only one I know that can handle this. Basically you would create 1 wide (static) column, two short columns and one long column. – John Kormylo Jul 22 '16 at 18:53
2

As you may have noticed, the more powerful a package is, the more difficult it is to use. Note: I repeated the definition of the right column to make sure they filled from left to right on every page.

\documentclass[10pt,final,hyphenatedtitles]{article}

\usepackage[latin]{babel}

\usepackage{flowfram}
\usepackage{lipsum}
\setlength{\columnsep}{0.2cm}
\setlength{\columnwidth}{\dimexpr \textwidth-2\columnsep}
\setlength{\columnwidth}{0.33333\columnwidth}

\newstaticframe[1]{\dimexpr 2\columnwidth+\columnsep}{0.28\textheight}{0pt}{0.72\textheight}[widecolumn]

\newflowframe[1]{\columnwidth}{0.7\textheight}{0pt}{0pt}
\newflowframe[1]{\columnwidth}{0.7\textheight}{\dimexpr \columnwidth+\columnsep}{0pt}
\newflowframe[1]{\columnwidth}{\textheight}{\dimexpr 2\columnwidth+2\columnsep}{0pt}

\newflowframe[2-3]{\columnwidth}{\textheight}{0pt}{0pt}
\newflowframe[2-3]{\columnwidth}{\textheight}{\dimexpr \columnwidth+\columnsep}{0pt}
\newflowframe[2-3]{\columnwidth}{\textheight}{\dimexpr 2\columnwidth+2\columnsep}{0pt}


\begin{document}
\sloppy% default for multicols
\begin{staticcontents*}{widecolumn}
\lipsum[10]
\end{staticcontents*}

\lipsum[1-9]
\end{document}

Static frames vertically center the text inside the frame. You can force it to the top using \vspace*{\fill} at the end. Interestingly, the right column appears slightly off, although one can fix this by adding glue.

  • Thank you very much. I was unaware of the package flowfram, maybe that made the search for an answer so difficult. – Fernando Jul 23 '16 at 21:08

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.