GeneralLettrine offsets paragraph after quotation

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
spyrule
Posts: 3
Joined: Mon Nov 08, 2010 8:27 am

Lettrine offsets paragraph after quotation

Post by spyrule »

I'm very new to Latex, and I'm currently using Lyx. I haven't had any problems using lettrine to create drop caps, but, for some reason, the text after a quotation within the same section will be indented in the same fashion as the first paragraph's drop cap. So, for example, if you were to create a new document, write

Code: Select all

\usepackage{lettrine}
into the document's preamble, write a short paragraph where the first letter is drop capitalized with, say,

Code: Select all

\lettrine{A}
then create a second paragraph with the layout of 'Quotation' (the same thing happens with 'Verse' and 'Quote' too, by the way), then create another 'Standard' styled paragraph with no indent

Code: Select all

\noindent
you'll probably see that the last paragraph's first two lines are indented as if there were a spot for a drop cap.

Any help would be greatly appreciated :D
Last edited by spyrule on Tue Nov 09, 2010 1:58 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Lettrine offsets paragraph after quotation

Post by meho_r »

The problem occurs when quotation environment isn't separated from the text before/after it with an empty line (which it isn't in LyX). Anyway, this looks like a bug worth reporting to both: the author of lettrine package as well as LyX developers.

For those who don't use LyX:

Code: Select all

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{lipsum}
\usepackage{xcolor}

\usepackage{lettrine}

\begin{document}

\lettrine[lines=3]{A}{} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consecte tuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo.

\begin{quotation}% with an empty line before/after quotation env., everything is normal
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consecte tuer id, vulputate a, magna. 

Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo.
\end{quotation}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consecte tuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo.

\lettrine[lines=3]{A}{} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consecte tuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo.
%
\begin{quotation}% without an empty before/after quotation, the indentation problem occurs
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consecte tuer id, vulputate a, magna. 

Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo.
\end{quotation}
%
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, {\color{red}vestibulum} ut, placerat ac, adipiscing vitae, felis. Curabitur dictum {\color{red}gravida} mauris. Nam arcu libero, nonummy eget, consecte tuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo.

\end{document}
spyrule
Posts: 3
Joined: Mon Nov 08, 2010 8:27 am

Lettrine offsets paragraph after quotation

Post by spyrule »

Thanks so much for the reply meho_r! I've written a trouble-ticket at Lyx.org's tracking site (which can be found here http://www.lyx.org/trac/ticket/7025), and I've also contacted Lettrine's author, and awaiting am reply. At Lyx.org, a developer noted that a manual line break can be entered in Lyx by placing the cursor where the break is wanted, and pushing ctrl+enter. The problem then becomes, as you'd probably guess, a large gap between a paragraph and a block quote. I'll write again as soon as I hear back from Lettrine's author, or have any new news.

Thanks again!
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Lettrine offsets paragraph after quotation

Post by meho_r »

There is another solution: just place an empty ERT box (Ctrl+L) in a separate line before quotation environment instead of line break (Ctrl+Enter). This way you'll get two empty lines in the source, which is enough to prevent the issue from coming into existence (and LaTeX ignores the second empty line anyway, so there will be no repercussions of this walkaround). Also, a correction: it is only the spacing before the quotation environment that matters, the one after it is irrelevant. But still, it would probably be better if LyX separated environments from surrounding text by default and provided some means to remove indentation of the text following them manually or by an option, like paragraph indent, for example.
spyrule
Posts: 3
Joined: Mon Nov 08, 2010 8:27 am

Lettrine offsets paragraph after quotation

Post by spyrule »

The empty Tex box worked! Incidentally, I found an obscure reference to

Code: Select all

\parshape=0
in a document from 2006. If you place this at the beginning of the paragraph following the blockquote, everything seems to work just fine. The empty Tex box, however, seems less invasive as there is node code to parse; so I think I'll be using that method from now on.

I can't thank you enough meho_r!! Until next time :)
Post Reply