# Dividing a page into independent parts/columns with different widths

I want to divide my page (A4 landscape) into different parts. The top should consist of four columns with different widths and no rule. For this I used vwcol but I could not figure out how to do a column break there. Text should not continue in another column. Below that, the page should only be divided into two columns and have a rule in between. Multicols seems to be the right choice here.

I also would like to have different formattings for each part. E.g. the top four columns are: image, left-aligned text, right-aligned text, image

So far I tried columns, multicols and vwcols but there is always something not working. Here is what I have now:

\documentclass[a4paper,12pt, landscape]{article}
\usepackage[landscape]{geometry}
\geometry{left=20mm,right=20mm,top=20mm,bottom=20mm}

\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{vwcol}
\usepackage{color}

\begin{document}

\begin{vwcol}[widths={0.2,0.3,0.3,0.2}, sep=10mm, rule=0]
\includegraphics[height=0.3\textheight]{img002.png}
%second column: left aligned text
%column break
%third column: right aligned text
\lipsum[1]
\includegraphics[height=0.3\textheight]{img002.png}
\end{vwcol}

\setlength{\columnsep}{20mm}
\setlength{\columnseprule}{3pt}
\renewcommand{\columnseprulecolor}{\color[rgb]{0.9,0.9,0.9}}
\begin{multicols*}{2}
\lipsum[1-2]
\vfill
\columnbreak
\lipsum[1-2]
\end{multicols*}

\end{document}


I am grateful for any hints you could give me. Thanks!

• Welcome to TeX.SX! Please help us to help you and add 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}. – user31729 Jan 23 '15 at 15:43
• Please check that your code compiles before uploading. Not having \begin{document} makes it hard to reproduce anything. Moreover, don't use minimal for examples. When used in this way, it is evil. – cfr Jan 24 '15 at 1:10

Here is a method using flowfram. If you use this, make sure to read the documentation as it re-engineers the output routine in ways you need to know about.

The top of the page is split into 4 frames. The content of these frames will not flow into other parts of the page, so you need to make sure stuff fits else it will spill over and overwrite other parts of your content. The far column on each side is centred. The inner left is set flush left. The inner right is set flush right.

The bottom of the page is split into 2 columns. Text flows here from one column to the next and one page to the next. (So if you want to move to the next column before the first is full, you need to insert a manual break, as you'd expect.)

Please do NOT use minimal for examples. I copied your code without paying enough attention and spent ages trying to figure out why it was complaining about standard LaTeX commands not being defined. This class is NOT intended for examples, and should not be used for such.

\documentclass[a4paper,12pt,landscape]{article}
\usepackage{geometry}
\geometry{left=20mm,right=20mm,top=20mm,bottom=20mm}

\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{xcolor}

\usepackage{flowfram,calc}
\newdynamicframe{\dimexpr.2\textwidth-.75\columnsep}{.3\textheight}{0pt}{.7\textheight}[upperfarleft]
\newdynamicframe{\dimexpr.3\textwidth-.75\columnsep}{.3\textheight}{.2\textwidth+.5\columnsep}{.7\textheight}[upperleft]
\newdynamicframe{\dimexpr.3\textwidth-.75\columnsep}{.3\textheight}{.5\textwidth+.5\columnsep}{.7\textheight}[upperright]
\newdynamicframe{\dimexpr.2\textwidth-.75\columnsep}{.3\textheight}{.8\textwidth+.5\columnsep}{.7\textheight}[upperfarright]
\setdynamicframe*{upperleft}{style=raggedright}
\setdynamicframe*{upperright}{style=raggedleft}
\setdynamicframe*{upperfarleft,upperfarright}{style=centering}

\setlength{\columnsep}{20mm}
\setlength{\ffcolumnseprule}{3pt}
\twocolumninarea{\textwidth}{.7\textheight-5pt}{0pt}{0pt}
\renewcommand{\ffruledeclarations}{\color[rgb]{0.9,0.9,0.9}}
\insertvrule{flow}{1}{flow}{2}

\begin{document}

\setdynamiccontents*{upperfarleft}{\includegraphics[height=0.275\textheight,width=.175\textwidth]{example-image-a}}
\setdynamiccontents*{upperfarright}{\includegraphics[height=0.275\textheight,width=.175\textwidth]{example-image-b}}
\setdynamiccontents*{upperleft}{A caption for the left image which will be left aligned. Make sure that the contents fits the area available as it will NOT flow' elsewhere, as requested!}
\setdynamiccontents*{upperright}{A caption for the right image which will be right aligned. Make sure that the contents fits the area available as it will NOT flow' elsewhere, as requested!}

\lipsum[1-4]

\end{document}


# EDIT

A little explanation in response to queries in a comment...

When setting up the 'dynamic' frames at the top, the syntax used above is:

\newdynamicframe{width of frame}{height of frame}{horizontal offset from origin}{vertical offset from origin}[label]


where the origin is at the lower left corner (south west) of the text block.

In the top row, you have 3 column separations and 4 columns. So the total width for separating the columns is 3 times \columnsep and you want to divide it equally between the 4 columns (or so I assumed). Hence, .75\columnsep is taken from each column width. In the bottom row, you have 1 column separation and 2 columns. So, you want .5\columnsep to be taken from the width of each column in order for the columns to be of equal width. Hence this is taken from the width of each column. It is not a 3:2 ratio since \columnsep is default for the top and 20mm for the bottom.

• Thank you, this works quite well! I tried to use different heights and separators (with variables) and I do not completely understand the .75 and .5 \columnsep (3:2 ratio). Also, thank you for pointing out the problem with the 'minimal' document class. I will use 'article' whenever I cannot decide which one to use. – Godrebh Jan 24 '15 at 9:52
• @Godrebh See edit. I've added some explanation. – cfr Jan 24 '15 at 11:19

This is only a trial of a solution.

The vwcol package/environment does not provide for a \columnbreak command as I've understood the manual.

I've tried to 'build' the upper columns with a tabular and new column types for left and right aligned text.

The spacings has to be changed of course.

\documentclass[a4paper,12pt, landscape]{minimal}
\usepackage[landscape]{geometry}
\geometry{left=20mm,right=20mm,top=20mm,bottom=20mm}

\usepackage{lipsum}

\usepackage{calc}
\usepackage{array}
\usepackage{xcolor}
\usepackage[demo]{graphicx}
\usepackage{vwcol}

\usepackage{multicol}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash}p{#1}}

\begin{document}

\begin{tabular}{p{0.2\textwidth}p{0.3\textwidth}p{0.3\textwidth}p{0.2\textwidth}}
\begin{tabular}[t]{p{0.15\textwidth}}
\includegraphics[width=0.15\textwidth,height={0.3\textheight}]{img002.png}%
\end{tabular}%
&
\begin{tabular}{@{}L{0.25\textwidth}@{}}
\lipsum[1]%
\end{tabular}%
&
\begin{tabular}{@{}R{0.25\textwidth}@{}}
\lipsum[1]%
\end{tabular}
&
\begin{tabular}[t]{@{}p{0.15\textwidth}@{}}
\includegraphics[width=0.15\textwidth,height={0.3\textheight}]{img002.png}%
\end{tabular}% \tabularnewline
\end{tabular}

\setlength{\columnsep}{20mm}
\setlength{\columnseprule}{3pt}
\renewcommand{\columnseprulecolor}{\color[rgb]{0.9,0.9,0.9}}
\begin{multicols*}{2}
\lipsum[1-2]
\vfill
\columnbreak
\lipsum[1-2]
\end{multicols*}

\end{document}


• Thank you! This almost does what I want. I tried to reduce the spacing by increasing the widths of the contents from .15 to .18 and from .25 to .28. I realized that the columns are not central anymore. Maybe this is because the left image has an indentation to the right. So if I want to play a little bit with the column separators, then cfr's answer is easier. – Godrebh Jan 24 '15 at 9:32
• @Godrebh: I thought about flowframe as well, but I've got no experience with that package, so I did not pursue that idea. My solution is a trial, as stated in the post. Perhaps it's worth to generalize it. I'll think about it. cfr's answer is better, for sure – user31729 Jan 24 '15 at 13:35