Text Formattingsinglespace in {quote}, doublespace elsewhere

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
saimike
Posts: 20
Joined: Wed Apr 11, 2012 10:44 pm

singlespace in {quote}, doublespace elsewhere

Post by saimike »

Preamble: I'm formatting a humanities dissertation so this may seem weird.

I have a lot of quotes from interviews and I want to have them single spaced (intra-paragraph) and doublespaced inter-paragraph. I was able to do this rather well using in my appendix using:

\setlength{\parskip}{11pt}
\singlespacing


Is there a way I can have all my {quote} in singlespace? i.e. whenever I start a \begin{quote}, it will be single spaced with an 11pt \parskip.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

singlespace in {quote}, doublespace elsewhere

Post by Stefan Kottwitz »

With a consistent macro typesetting software like LaTeX, it's no problem. Just extend the quote environment. A quick addition:

Code: Select all

\makeatletter
\g@addto@macro\quote\singlespace
\makeatother
\makeatletter and \makeatother are just required because @ is a special character, commonly used to mark internal macros, which is therefore not allowed for direct use in documents. This would not be necessary in a style file.

Stefan
LaTeX.org admin
saimike
Posts: 20
Joined: Wed Apr 11, 2012 10:44 pm

Re: singlespace in {quote}, doublespace elsewhere

Post by saimike »

Stefan

Awesome, that worked very well!
saimike
Posts: 20
Joined: Wed Apr 11, 2012 10:44 pm

Re: singlespace in {quote}, doublespace elsewhere

Post by saimike »

Stefan

Would this macro affect the inter-paragraph spacing between the quote and the previous or following paragraph?

I am seeing inconsistent spacing when using it with puthesis.cls (https://engineering.purdue.edu/~mark/pu ... thesis.cls).
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

singlespace in {quote}, doublespace elsewhere

Post by Stefan Kottwitz »

I don't think so. Have a look:

Code: Select all

\documentclass[aae,dissertation]{puthesis}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{setspace}
\makeatletter
\g@addto@macro\quote\singlespace
\makeatother
\doublespace
\begin{document}
\blindtext
\begin{quote}
  \blindtext
\end{quote}
\blindtext
\end{document}
Perhaps show with code, similarly as I, what you mean with inconsistent spacing. There could be other reasons.

Stefan
LaTeX.org admin
NeuroTex
Posts: 1
Joined: Fri May 17, 2013 8:34 am

singlespace in {quote}, doublespace elsewhere

Post by NeuroTex »

...thanks for a very helpful post here :D

but - is there a way for (and any sense in) putting the starred version of the \singlespace command? Say something like:

Code: Select all

\makeatletter
\g@addto@macro\quote\singlespace*
\makeatother
the above doesn't seem to be working form me
and using:

Code: Select all

\makeatletter
\g@addto@macro{\quote}{\singlespace*}
\makeatother
just adds an extra "*" in front of my quoted text.

...and what would be the valid/proper way to add \singlespace to every occurrence of a starred command like table* or chapter*?
Post Reply