3

I'd like to highlight some important quotes in my article by writing them into floating (invisible) boxes, that go half into the (left/right) margin and half into the respective column. I'd prefer a solution that works automatically, independent from the right or the left column of the page.

This is how it should look like.

I suppose it is to be done using \fbox and \minipage.

2 Answers2

4

Try the following definition:

\usepackage[colaction]{multicol}

\newcommand\stickout[1]{%
  \docolaction{\begin{wrapfigure}[11]{l}[50pt]{.3\textwidth}\hspace{20pt}}%  first col
              {\ERROR}%                                                      middle
              {\begin{wrapfigure}[11]{r}[50pt]{.3\textwidth}\hspace{-20pt}}% last
  \begin{minipage}{140pt}
     \Large ``#1''\par
  \end{minipage}%
 \end{wrapfigure}}

and then just use \stickout{Lorem ipsum dolor...} and watch it moving into the right place magically (it needs several runs at a minimum 2).

After that your example suitably simplified gives

enter image description here

You need a current multicol that does implement "colaction". Of course one could make the definition more flexible to pass some of the fixed values are (optional) arguments to the command ... a good use case for xparse but I'm tired tonight.

1

I found a solution. It needs to be manually edited to fit to the lenght of the quote and needs to be changed for left/right column, but it works.

enter image description here

\documentclass[a4paper,oneside]{article}
\usepackage[ascii]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[left=3cm,bottom=2cm]{geometry}
\usepackage{amssymb,amsfonts,textcomp}

\usepackage{multicol}
\setlength{\columnsep}{1cm}

\widowpenalty10000
\clubpenalty10000

\usepackage{wrapfig}
\usepackage{lipsum}


\begin{document}

\begin{multicols}{2}
\lipsum[1]

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Proin ac tempus dui. Etiam non mattis neque. Maecenas tempor,
massa a luctus 
\begin{wrapfigure}[11]{l}[50pt]{.3\textwidth}
\hspace{20pt}
\begin{minipage}{140pt}
\Large{``Lorem ipsum dolor sit amet, consectetur adipiscing elit luctus sollicitudin, elit massa auctor velit, eu mattis
lacus arcu nec est.''}
\end{minipage}
\end{wrapfigure}
\lipsum[2]
\begin{wrapfigure}[11]{r}[50pt]{.3\textwidth}
\hspace{-20pt}
\begin{minipage}{140pt}
\Large{``Lorem ipsum dolor sit amet, consectetur adipiscing elit luctus sollicitudin, elit massa auctor velit, eu mattis
lacus arcu nec est.''}
\end{minipage}
\end{wrapfigure}
\lipsum[2]
\lipsum[2]

\end{multicols}
\end{document}

It severly messes at page and column breaks. The quotes should therefore be placed after the text is finished.