Text boxes that go into the the margin in a two column article

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.

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

• Welcome to TeX.SX! Can you include your example as part of the post, rather than as a link? – Adam Liter Dec 4 '14 at 18:58
• How can I do this? I quickly created a pdf using openoffice to illustrate what I mean. How can I include it directly? – Johannes Klug Dec 4 '14 at 19:02
• In this answer there is a description of how to upload an image if you don't have enough reputation. It's under the heading "I'm being told that I cannot insert an image. What now?" – Adam Liter Dec 4 '14 at 19:06
• Fixed example according to site rules. – Johannes Klug Dec 4 '14 at 19:17
• @AdamLiter with your reputation, you can always just edit the picture in yourself ;) – yo' Dec 4 '14 at 19:17

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

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.

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.

\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.