4

I have a three-column multicol layout throughout my document, with some special text (like a title) at the very start of the document, like this:

original

The use of three columns is due to space constraints on the document that I'm writing. The above document was generated with this code:

\documentclass[a4paper,landscape]{article}

\usepackage{multicol}
\usepackage[margin=0.7cm,bottom=1.3cm,footskip=0.7cm]{geometry}
\usepackage{lipsum}
\setlength{\columnseprule}{0.4pt}

\begin{document}
\begin{multicols*}{3}
\raggedright
{\huge \textbf{Long Long Very Long Title Abcdefg}}
\section*{Limits}
\lipsum\lipsum
\end{multicols*}
\end{document}

The title wraps into two lines and that's ugly.

I know I'm asking for something strange, but is there a way to force the title into one line, and hence "eat" into the adjacent column (thereby removing the column separator between the first and second columns, and pushing text on the second column downward)?

(Note: The third column should not be pushed downward.)

Pushing text downward in the second column is a secondary concern, because I can do that manually by adding some vspace in the text at the correct location, but I have no workaround to remove the bit of column separator that overlaps the title.

I have tried using mbox, i.e.:

\mbox{\huge \textbf{Long Long Very Long Title Abcdefg}}

but this will (as expected) not get rid of the column separator:

mbox

It isn't very obvious with the word "Title", but the column separator is actually there. Ideally, the separator should start from about 1cm below the bottom of the title, at the same height as the "Limits" subsection name.

I've also tried setting the background color of the mbox, but the column separator is drawn over the mbox, so I can't hide the column separator with this method.

Any suggestions on how I might achieve this?

3
  • An idea is to remove the separator and draw over the page with tikz and overlay help
    – koleygr
    Oct 26 '17 at 14:13
  • Have you tried the flowfram package?
    – Thérèse
    Oct 28 '17 at 18:33
  • @Thérèse After a quick glance at the flowfram docs, it seems like killing an ant with a sledgehammer, and I won't be able to use multicols.
    – Bernard
    Oct 29 '17 at 3:44
3

Changing the size of multicol's columns individually isn't possible without a major rewrite of its internal column balancing routines. Manually shrinking a column separator is possible with the very latest version of multicolrule (1.2), which I released earlier today and should be hitting your CTAN mirror within the next day or so. (If you're impatient, it's is available immediately at github.)

These two commands are the core of the solution:

\DeclareMCRulePattern{shrink-me}{extend-top=-\reservespace-\baselineskip}
\SetMCRule{width=thin,line-style=solid,patterns=shrink-me,pattern-for=1}

It works by declaring a pattern for the column separator, and then applying that pattern to the first separator only.

MWE:

\documentclass[a4paper,landscape]{article}
\usepackage[margin=0.7cm,bottom=1.3cm,footskip=0.7cm]{geometry}
\usepackage{lipsum}
\usepackage{multicolrule}

\newsavebox{\mytitle}
\newlength{\reservespace}
\savebox{\mytitle}{\textbf{\huge Long Long Very Long Title Abcdefg}}
\setlength{\reservespace}{\ht\mytitle}
\addtolength{\reservespace}{\dp\mytitle}
\addtolength{\reservespace}{\baselineskip}
\addtolength{\reservespace}{-\topskip}
\DeclareMCRulePattern{shrink-me}{extend-top=-\reservespace-\baselineskip}
\SetMCRule{width=thin,line-style=solid,patterns=shrink-me,pattern-for=1}
\raggedright

\begin{document}
\begin{multicols*}{3}
\usebox{\mytitle}
\section*{Limits}
\lipsum[1-3]

\columnbreak\vspace*{\reservespace}

\lipsum[4-7]
\lipsum
\end{multicols*}
\end{document}

The result:

enter image description here

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.