Text Formattingunwanted indents in \quote, \verse environments

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
alarswilson
Posts: 26
Joined: Thu Apr 02, 2009 3:42 pm

unwanted indents in \quote, \verse environments

Post by alarswilson »

My preamble is below; it inserts the \paraindent20pt in the \quote and \verse environments as well. How can I still indent my text, but not in these environments?

Code: Select all

\documentclass[letterpaper,12pt,english,oneside,raggedright,draft]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{epigraph}
\renewcommand{\epigraphsize}{\footnotesize}
\newcommand{\superscript}[1]{\ensuremath{^\textrm{\scriptsize{#1}}}}
\usepackage{fixltx2e}
\usepackage[flushmargin,hang,multiple,ragged]{footmisc}
\usepackage{titlesec}
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{sectsty}
\usepackage{footmisc}
\usepackage[includeheadfoot,top=.5in, bottom=1in, left=1.5in, right=1in]{geometry}
\usepackage{setspace}
\doublespacing
\expandafter\def\expandafter\quote\expandafter{\quote\singlespacing}
\expandafter\def\expandafter\quote\expandafter{\quotation\singlespacing}
\expandafter\def\expandafter\verse\expandafter{\verse\singlespacing}

% setup for headers (fncyhdr)
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{\thepage}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0pt} 

\raggedright
\hyphenpenalty10000
\parindent20pt

\begin{document}
body
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

unwanted indents in \quote, \verse environments

Post by localghost »

Just supplement your modifications for the concerned environments.

Code: Select all

\expandafter\def\expandafter\quote\expandafter{\quote\noindent\singlespacing}
\expandafter\def\expandafter\quotation\expandafter{\quotation\noindent\singlespacing}
\expandafter\def\expandafter\verse\expandafter{\verse\noindent\singlespacing}
This works as long as the environments contain only one paragraph.

You can double interline spacing by loading the setspace package with the according option.

Code: Select all

\usepackage[doublespacing]{setspace}
The switch so becomes superfluous.


Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply