Quote, Quotation, Quoting in LaTeX

Why quoting?

For every professional or, in any case, serious writer (i. e. bloggers, lawyers, authors, etc.) it's fundamental to have a good quoting tool.
A quoting tool allows to highlight text in dedicated environments separated from ordinary context.
It could be a fragment from a book or a judgment, a poetry or every other source to pur in evidence.

LaTeX and quoting environments.

In LaTeX there's not a single quoting environment.
There are a many quoting environments with many different outputs.
This post focalizes on the basic quotation commands, perfect to highlight parts of the text without changing too much the general formatting.

Quote and Quotation.

In the TexLive standard package distribution there are two quotation environments for prose (for poetry exists the environment verse): quote and quotation.
They are very similar to each other and somebody tells that they are synonym.
But they are not completely equal.
The difference is described in LaTeX Wiki Book as follows:
  • quote for a short quotation, or a series of small quotes, separated by blank lines.
  • quotation for use with longer quotations, of more than one paragraph, because it indents the first line of each paragraph.
If you want a detailed analysis see here.

Examples and code.

Now is the moment to show the differences between quote and quotation.

The quote input/output

The following is a little code for the quote environment.

Before QUOTE
\begin{quote}
\lipsum[1-2]
\end{quote}
After QUOTE


Fig. 1: The Quote output


It should be noted the misalignment of the text before and after the quoted part and the left alignment of each paragraph.

The quotation input/output

The following is a little code for the quotation environment.

Before QUOTATION
\begin{quotation}
\lipsum[1-2]
\end{quotation}
After QUOTATION


Fig. 2: The Quotation output


It should be noted the alignment of the text before and after the quoted part and the indentation of each paragraph.

All together

To facilitate understanding of the differences here are the two environments together:

Fig. 3: Quote and Quotation together


The quoting library.

At this point somebody may wonder if there is an environment that combines all the necessary features to quote effectively.
This environment exists and it's the quoting package.
As you can read in the official page the quoting package is a Consolidated environment for displayed text
As an al­ter­na­tive to the LATEX stan­dard en­vi­ron­ments quo­ta­tion and quote, the pack­age pro­vides a con­sol­i­dated en­vi­ron­ment for dis­played text. First-line in­den­ta­tion may be ac­ti­vated by adding a blank line be­fore the quot­ing en­vi­ron­ment. A key-value in­ter­face (us­ing kvop­tions) al­lows the user to con­fig­ure font prop­er­ties and spac­ing and to con­trol or­phans within and af­ter the en­vi­ron­ment.
To use quoting quoting you must declare the package in the head: the command is \usepackage[]{quoting}.
Then you can use the \begin{quoting}...\end{quoting} environment in your document:

Before QUOTING
\begin{quoting}
\lipsum[1-2]
\end{quoting}
After QUOTING


And the following is the output with the option \usepackage[font=itshape]{quoting}:

Fig. 4: One of quoting possibile outputs


Obviously, the advantage is the possibility to modify and change the settings with many other options.
So you can save time and get a more elegant and readable text.
Thank You for You attention and welcome to my blog.

Comments

  1. Thank you for your helpful tips, I had not noticed the mismatch before and after {quote}. Now I can improve the typesetting of my thesis.

    ReplyDelete

Post a Comment

Popular posts from this blog

Vim: Cut, Copy and Paste to and from the system clipboard

Vim: searching for text containing a slash or a question mark