# How do you create pull quotes?

Does anyone know a package for pull quotes?

Failing that, is anyone interested in writing a command to create one? I'm thinking of something that would have optional and configurable separators above and below (e.g., lines or large quotation marks), and option to float left, right, or center. Ideally the command should print the argument and the pull quote so you do not have to duplicate the text that you want to quote.

To avoid duplicating existing questions, perhaps we should focus on single column documents, so that the pull quote has to be boxed?

-
Something like this one and maybe related? –  percusse Feb 25 '12 at 1:57
–  Werner Feb 25 '12 at 2:19

It can be done with a lot of pain and hard labor. Firstly, you will need to build the page manually, like you would an html page. We build the page, in a long single column (effectively) and we position the text blocks absolutely (using the picture environment). You can also use pict2e or tikZ if you are more familiar with them. There is also a package \textpos for absolute positioning of page elements, but I opted not to use a package to illustrate the technique.

What we do is to use \hangindent to shape the text to get this:

The right hand column is shaped similarly and then positioned using a \put command, from the picture environment.

\documentclass{article}
\usepackage[latin]{babel}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{picture}
\usepackage{ragged2e}
\begin{document}
\vbox to 0pt{\hsize 0.49\linewidth
\hangindent=-60pt \hangafter=9
\lipsum*[2]\par
\begin{picture}(0,0)
\put(3.7cm,3.8cm){\parbox[t]{4cm}{\color{purple}{\textbf{}}\tiny\lipsum*[2]}}
\end{picture}
\lipsum[1]
}
\vskip-12pt\hspace{6cm}{\vbox to 0pt{\hsize 0.49\linewidth
\hangindent=60pt \hangafter=9
\lipsum*[2]\par
\lipsum[1]
}}
\end{document}


Hopefully, one day LaTeX3 will provide a better output routine, to automate this sort of layout.

-

I wrote a package pullquote which allows to create circular as well as rectangular inserts.

-
Thanks Stephan!! I tried to load this file into WriteLaTeX and it's not immediately working. Just so you know…thanks again. –  isomorphismes Jun 3 at 3:48

For two-columns documents, a semi-manual solution is possible using the wrapfig package. It avoids cluttering the code with ad-hoc material as in Werner’s or Yiannis’ solutions.

\documentclass{article}

\usepackage{multicol}% for multiple columns
\usepackage{wrapfig}
\usepackage{calc}% for computations

\begin{document}

\pagestyle{empty}

\begin{multicols}{2}
Wikipedia is a multilingual, Web-based, free-content encyclopedia project. The name is a portmanteau of the words wiki and encyclopedia. Wikipedia is written collaboratively by volunteers, allowing most of its articles to be edited by almost anyone with access to the Web site. Its main servers are in Tampa, Florida, with additional servers in Amsterdam and Seoul.

Wikipedia was launched as an English language project on January 15,
\begin{wrapfigure}[7]{r}[.5\width+.5\columnsep]{5cm}\itshape
Imagine a world in which every single person on the planet is given free access to the sum of all human knowledge. That's what we're doing''
\end{wrapfigure}
2001, as a complement to the expert-written and now defunct Nupedia, and is now operated by the non-profit Wikimedia Foundation. It was created by Larry Sanger and Jimmy Wales; Sanger resigned from both Nupedia and Wikipedia on March 1, 2002. Wales has described Wikipedia as Imagine a world in which every single person on the planet is given free access to the sum of all human knowledge. That's what we're doing''.

Wikipedia has more than six million articles in many languages, including more than 1.5 million articles in the English-language version and more than half a million in the German-language version. There are 250 language editions of Wikipedia, and 19 of them have more than 50,000 articles. The German-language edition has been distributed on DVD-ROM, and there have been proposals for an English DVD or print edition. Since its inception, Wikipedia has steadily risen in popularity, and has spawned several sister projects. According to Alexa, Wikipedia ranks among the top fifteen most visited sites, and many of its pages have been mirrored or forked by other sites, such as Answers.com.

There has been controversy over Wikipedia's reliability and accuracy,
\begin{wrapfigure}[7]{l}[.5\width+.5\columnsep]{5cm}\end{wrapfigure}
with the site receiving criticism for its susceptibility to vandalism, uneven quality and inconsistency, systemic bias, and preference for consensus or popularity over credentials. Information is sometimes unconfirmed and questionable, lacking the proper sources that, in the eyes of most Wikipedians'' (as Wikipedia's contributors call themselves), are necessary for an article to be considered high quality''. However, a 2005 comparison performed by the science journal Nature of sections of Wikipedia and the Encyclop\ae dia Britannica found that the two were close in terms of the accuracy of their articles on the natural sciences. This study was challenged by Encyclopædia Britannica, Inc., who described it as fatally flawed''.
\end{multicols}

\end{document}


The syntax of {wrapfigure} is

\begin{wrapfigure}[number of lines]{alignment}[overhang]{width}...\end{wrapfigure}


The whole process of manually positioning the two {wrapfigures} is well explained in multiple-span.txt:

Cutouts in Matching Columns

~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~X  ~~~~~~~~~~~~~~~~~Y
~~~~~~~~~                    ~~~~~~~~~
~~~~~~~~~                    ~~~~~~~~~
~~~~~~~~~                    ~~~~~~~~~
~~~~~~~~~                    ~~~~~~~~~
~~~~~~~~~                    ~~~~~~~~~
~~~~~~~~~                    ~~~~~~~~~
~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~

Initially, write the document without the wrapfigure, and locate the
desired natural linebreak at "X".  (This first step is used for all
methods described here.)  Then change to

~~~~~~~~X
\begin{wrapfigure}[6]{r}[.5\width+.5\columnsep]{6cm}
...
\end{wrapfigure}
~~~~....

and run LaTeX again. This will print the figure overlapping the right
column, but no matter. Use this run to locate position "Y" in the text.
For the final run, switch to:

~~~~~~~~X
\begin{wrapfigure}[6]{r}[.5\width+.5\columnsep]{6cm}
...
\end{wrapfigure}
~~~~....
...~~~~~~~Y
\begin{wrapfigure}[6]{l}[.5\width+.5\columnsep]{6cm}
\vfill
\end{wrapfigure}
~~~~~~~~~~~


Compared to this example, I only adjusted the parameters : 5cm instead of 6cm for the width and 7 lines instead of 6 lines.

-

For single column documents you can try the cutwin package to put something (e.g., a quote or a diagram) into a cutout in a paragraph.

-
Thanks for joining us:) –  Yiannis Lazarides Feb 25 '12 at 18:57

Here is a much more manual approach, but perhaps similar in style to @YiannisLazarides' answer, for inserting a pull quote. It uses the \parshape primitive to adjust the indentation (or line width) on a per-line basis:

\documentclass{article}
\usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{eso-pic}% http://ctan.org/pkg/eso-pic
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{multicol}% http://ctan.org/pkg/multicol
\newcommand{\zindent}{0pt \linewidth}% full width/no indent
\newcommand{\rindent}{0pt \dimexpr\linewidth-11em\relax}% right indent
\newcommand{\lindent}{11em \dimexpr\linewidth-11em\relax}% left indent
\newcommand{\leftquote}{\smash{\raisebox{-1em}{\makebox[2em][r]{\Huge\bfseries\textcolor{blue!50}\textquotedblleft}}}}%
\newcommand{\rightquote}{\makebox[2em][l]{\smash{\raisebox{-1em}{\Huge\bfseries\textcolor{blue!50}\textquotedblright}}}}%
\newcommand{\leftcorr}{% Left column correction
\parshape 15
\zindent \zindent \zindent
\rindent \rindent \rindent \rindent
\rindent \rindent \rindent \rindent
\rindent \rindent \rindent
\zindent%
}
\newcommand{\rightcorr}{% Right column correction
\parshape 13
\zindent
\lindent \lindent \lindent \lindent
\lindent \lindent \lindent \lindent
\lindent \lindent \lindent
\zindent%
}
\newcommand{\insertpullquote}{%
\AtPageCenter{\vspace*{4em}\hspace*{-9em}%
\begin{minipage}[c]{18em}
\sffamily\llap{\leftquote}\large This is a pull quote that describes some really nifty stuff
right into the story. Hey, that's why they call it a
pull quote! The \texttt{lipsum}
package text doesn't make for a pleasant read. \hfill \rlap{\rightquote}
\end{minipage}
}%
}%
}
\begin{document}
\begin{multicols}{2}
\lipsum[1]
\insertpullquote% Insert pull quote
\leftcorr% Left correction
\lipsum[2-5]
\rightcorr% Right correction
\lipsum[6]
\lipsum[7]
\lipsum[8]
\end{multicols}
\end{document}


With a prior knowledge of the placement, three things are required:

1. Adding a right indentation in the left column (using \leftcorr in the MWE);
2. Adding a left indentation in the right column (using \rightcorr in the MWE); and
3. Inserting the content/pull quote (using \insertpullquote in the MWE).

Here is some detail regarding the above steps:

1. The right indentation (or \leftcorr) is set over 15 lines; the first 3 are regular lines with 0pt indent stretching the entire \linewidth (therefore the 3 \zindents). The next 11 are indented 0pt, but only have a width of \linewidth-11em (therefore the 11 \rindents). The final line resets the paragraph alignment to the regular width (therefore the single \zindent).

2. The same as the above, just over 13 lines, with a reverse usage of indentation and line width.

3. This is just a bit of playing around with stuff - colour using xcolor, box movements using graphicx and overlaps \llap and \rlap. The pull quote is set in a box of width 18em with the text quotes on either side set in 2em overhung boxes. Hence the 11em indent/width modification in item (1) and (2) since the inner pull quote "spans" 22em (11em into each column).

As you can see, the code is not always that pretty, but it is definitely possible. I don't think the sequential way TeX parses code is meant to accommodate this kind of request easily (at the moment). That is, when you think about the way boxes have to be laid out on the page, knowledge of already set boxes is unknown to TeX without any manual intervention.

Page layout in multi-column mode was provided by the multicol package, although it might just as well have been provided using a twocolumn document class option. eso-pic provided the means to position an item on the page during page shipout (via \AddToShipoutPictureFG* and \AtPageCenter), although manual placement or placement via something like tikz or wrapfig would also have been possible.

The xcolor package provided some colour, while lipsum supplied the dummy text. geometry added some page real estate. None of these packages may be required in your end product.

-
Good solution. I did not use \parshape, specifically as I was thinking the following strategy to automate the calculations and would appreciate your thoughts. First typeset the full text in a narrow column. At the line where the 1/2 image is to be inserted, vsplit the box, do parshape or do hangindent, add enough material to end the column, vsplit again (now we have the left column typeset), similar technique for second etc... Can be done before sending to output routine. You think is doable? –  Yiannis Lazarides Feb 26 '12 at 9:54
@YiannisLazarides: Honestly, I've never worked with \vsplit. Can you point me to an example? I'm pretty sure one would have to work some magic to "add enough material to end the column" on both sides as well. –  Werner Feb 26 '12 at 17:37
I am not too sure if there is a good example here. Will post a small example in my answer to-morrow as a suggestion for further improvements. –  Yiannis Lazarides Feb 26 '12 at 18:41
Please see tex.stackexchange.com/questions/45958/…, regarding vsplit. –  Yiannis Lazarides Feb 27 '12 at 9:09