Text FormattingTurabian style: quote environment

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

Turabian style: quote environment

Post by alarswilson »

Default "report" class indents the first paragraphs of both "quote" and "quotation" environments.

I need to have these environments flush left on the first paragraph. How?

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

Turabian style: quote environment

Post by localghost »

You can add macros to these environments in a relatively simple way. The following only works for environments without any arguments.

Code: Select all

\makeatletter
\g@addto@macro{\quote}{\upshape}
\g@addto@macro{\quotation}{\upshape}
\makeatother
As you can see that there is nothing what seems related to indentation. My first idea to use \noindent instead of \upshape didn't work for me and I couldn't figure out an explanation.


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
alarswilson
Posts: 26
Joined: Thu Apr 02, 2009 3:42 pm

Turabian style: quote environment

Post by alarswilson »

I added your macro to my preamble with \noindent

Code: Select all

    \makeatletter
    \g@addto@macro{\quote}{\noindent}
    \g@addto@macro{\quotation}{\noindent}
    \makeatother
and it worked. Thanks

This, however, revealed another item I must address: This environment must be indented .5inches from the left according to our style. How can I do this. I looked through Peter Flynn's manual, but I admit I'm at a loss.

It kills me how much work I'm doing to make it look like Microsoft Word! Thank you for your help. It is educational. Andrew
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Turabian style: quote environment

Post by localghost »

alarswilson wrote:[...] This environment must be indented .5inches from the left according to our style. How can I do this. I looked through Peter Flynn's manual, but I admit I'm at a loss. [...]
Is it only indented on the left side or like the original environment indented on both sides?
alarswilson wrote:[...] It kills me how much work I'm doing to make it look like Microsoft Word! Thank you for your help. It is educational. [...]
Your patience and efforts will be worth the result. And the final output will look better than Word could ever manage.
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
magicmoose
Posts: 90
Joined: Fri Nov 06, 2009 7:29 am

Turabian style: quote environment

Post by magicmoose »

alarswilson wrote:It kills me how much work I'm doing to make it look like Microsoft Word! Thank you for your help. It is educational. Andrew
I don't know how far you have progressed with your document or whether my suggestion will be compatible with your document, but the wordlike package is a package that makes LaTeX mimic MS Words layout and styles.
As I say, it might not help you now but maybe in the future ;)
alarswilson
Posts: 26
Joined: Thu Apr 02, 2009 3:42 pm

Re: Turabian style: quote environment

Post by alarswilson »

.5" indent both sides.

I'll take a look at "wordlike." Thanks for the heads up.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Turabian style: quote environment

Post by localghost »

alarswilson wrote:[...] I'll take a look at "wordlike." Thanks for the heads up.
The worldlike package won't help you since it only mimics a standard Word document regarding fonts, page geometry and ToC style. It doesn't set up the document style you need.
alarswilson wrote:.5" indent both sides. [...]
In this case forget the modifications to the concerned environments done by the \g@addto@macro command. You have to redefine them. Here is again a compete example that should meet all the demands so far.

Code: Select all

\documentclass[11pt,a4paper,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[doublespacing]{setspace}
\usepackage[indentfirst,raggedright]{titlesec}
\usepackage{lmodern}
\usepackage{blindtext}

\setlength{\parindent}{0.5in}
\makeatletter
\newcommand*{\spelled}[1]{%
  \expandafter\@spelled\csname c@#1\endcsname
}
\newcommand*{\@spelled}[1]{%
  \ifcase#1\or{One}\or{Two}\or{Three}\or{Four}\or{Five}\or{Six}\or{Seven}\or{Eight}\or{Nine}\or{Ten}\else\@ctrerr\fi
}
\renewenvironment{quotation}{%
  \list{}{%
    \listparindent 1.5em%
    \itemindent \listparindent
    \leftmargin 0.5in
    \rightmargin \leftmargin
    \parsep \z@ \@plus\p@
  }%
    \item\relax
}
{\endlist}
\renewenvironment{quote}{%
  \list{}{%
    \leftmargin 0.5in
    \rightmargin \leftmargin
  }%
  \item\relax
}
{\endlist}
\makeatother

% Setup for headings (titlesec)
\titleformat{\chapter}[display]
{\normalfont\normalsize\bfseries\filcenter}
{\normalsize\MakeUppercase{\chaptertitlename\ \spelled{chapter}}}
{1pc}
{\normalsize}
\titleformat*{\section}{\normalfont\normalsize\itshape}
\titleformat*{\subsection}{\normalfont\normalsize}
\titleformat*{\subsubsection}{\normalfont\normalsize}
\titleformat*{\paragraph}{\normalfont\normalsize\slshape}
\titlespacing*{\section}{0pt}{1.5\baselineskip}{\baselineskip}
\titlespacing*{\subsection}{0pt}{1.5\baselineskip}{\baselineskip}
\titlespacing*{\subsubsection}{0pt}{1.5\baselineskip}{\baselineskip}

\begin{document}
  \blindtext

  \begin{quote}
    \blindtext
  \end{quote}

  \blindtext
\end{document}
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
alarswilson
Posts: 26
Joined: Thu Apr 02, 2009 3:42 pm

Turabian style: quote environment

Post by alarswilson »

Thank you. This worked well. I added "singlespacing" to the definitions you provided and it appears to work.

Three other things with quotation/quote are now apparent:

quotation environment
1. Now second (third + fourth etc.) paragraphs are not indented. They need to be indented.

2. The spacing between paragraphs in "quotation" is slightly more than 1 ex. It needs to be a normal singlespace.

Both quote and quotation

3. The spacing between the quote and quotation environments and the following paragraphs comes out 1.5ex. I need it to be a normal single space.

Here is my preamble. Note that I have commented a former solution to making quote/quotation single spaced. Please note anything else that is out of line:

Code: Select all

\documentclass[letterpaper,12pt,english,oneside,raggedright,draft]{report}
\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[indentfirst,raggedright]{titlesec}
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{times}
\usepackage{footmisc}
\usepackage[includeheadfoot,top=.5in, bottom=1in, left=1.5in, right=1in]{geometry}
\usepackage[doublespacing]{setspace}

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

\raggedright
\hyphenpenalty10000
\setlength{\parindent}{0.5in}

% spelled chapter numbers
\makeatletter
\newcommand*{\spelled}[1]{%
  \expandafter\@spelled\csname c@#1\endcsname
}
\newcommand*{\@spelled}[1]{%
  \ifcase#1\or{ONE}\or{TWO}\or{THREE}\or{FOUR}\or{FIVE}\or{SIX}\or{SEVEN}\or{Eight}\or{Nine}\or{Ten}\else\@ctrerr\fi
}
\makeatother

% quote and quotation indents and margins
\makeatletter
\renewenvironment{quotation}{%
  \list{}{%
    \listparindent 1.5em%
    \itemindent \listparindent
    \leftmargin 0.5in
    \rightmargin \leftmargin
    \parsep \z@ \@plus\p@
    \singlespacing
  }%
    \item\relax
}
{\endlist}
\renewenvironment{quote}{%
  \list{}{%
    \leftmargin 0.5in
    \rightmargin \leftmargin
    \singlespacing
  }%
  \item\relax
}
{\endlist}
\makeatother

% \expandafter\def\expandafter\quote\expandafter{\quote\noindent\singlespacing}
% \expandafter\def\expandafter\quote\expandafter{\quotation\noindent\singlespacing}
% \expandafter\def\expandafter\verse\expandafter{\verse\noindent\singlespacing}

% Setup for headings (titlesec)
\titleformat{\chapter}[display]
{\normalfont\normalsize\bfseries\filcenter}
{\normalsize\MakeUppercase{\chaptertitlename\ \spelled{chapter}}}
{1pc}
{\normalsize}
\titleformat*{\section}{\normalfont\normalsize\itshape}
\titleformat*{\subsection}{\normalfont\normalsize}
\titleformat*{\subsubsection}{\normalfont\normalsize}
\titleformat*{\paragraph}{\normalfont\normalsize\slshape}
\titlespacing*{\section}{0pt}{3ex}{1ex}
\titlespacing*{\subsection}{0pt}{3ex}{1ex}
\titlespacing*{\subsubsection}{0pt}{3ex}{1ex}

\setlength{\footnotesep}{20pt}
alarswilson
Posts: 26
Joined: Thu Apr 02, 2009 3:42 pm

Re: Turabian style: quote environment

Post by alarswilson »

Any ideas on how to fix my vertical spacing/indentation issues with quote+quotation environments? Thanks. Andrew
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Turabian style: quote environment

Post by localghost »

For this demands another redefinition is necessary.

Code: Select all

\documentclass[11pt,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=1in]{geometry}
\usepackage[doublespacing]{setspace}
\usepackage[indentfirst,raggedright]{titlesec}
\usepackage{lmodern}
\usepackage{blindtext}

\setlength{\parindent}{0.5in}
\makeatletter
\newcommand*{\spelled}[1]{%
  \expandafter\@spelled\csname c@#1\endcsname
}
\newcommand*{\@spelled}[1]{%
  \ifcase#1\or{One}\or{Two}\or{Three}\or{Four}\or{Five}\or{Six}\or{Seven}\or{Eight}\or{Nine}\or{Ten}\else\@ctrerr\fi
}
\renewenvironment{quotation}{%
  \list{}{%
    \listparindent 0.5in
    \itemindent 0pt
    \leftmargin 0.5in
    \rightmargin \leftmargin
    \parsep 0.5\baselineskip
    \topsep 0.5\baselineskip
    \singlespacing
  }%
    \item\relax
}
{\endlist}
\renewenvironment{quote}{%
  \list{}{%
    \listparindent 0.5in%
    \itemindent 0pt
    \leftmargin 0.5in
    \rightmargin \leftmargin
    \topsep 0.5\baselineskip
    \singlespacing
  }%
  \item\relax
}
{\endlist}
\makeatother

% Setup for headings (titlesec)
\titleformat{\chapter}[display]
{\normalfont\normalsize\bfseries\filcenter}
{\normalsize\MakeUppercase{\chaptertitlename\ \spelled{chapter}}}
{1pc}
{\normalsize}
\titleformat*{\section}{\normalfont\normalsize\itshape}
\titleformat*{\subsection}{\normalfont\normalsize}
\titleformat*{\subsubsection}{\normalfont\normalsize}
\titleformat*{\paragraph}{\normalfont\normalsize\slshape}
\titlespacing*{\section}{0pt}{1.5\baselineskip}{\baselineskip}
\titlespacing*{\subsection}{0pt}{1.5\baselineskip}{\baselineskip}
\titlespacing*{\subsubsection}{0pt}{1.5\baselineskip}{\baselineskip}

\begin{document}
  \blindtext

  \begin{quotation}
    \blindtext

    \blindtext
  \end{quotation}

  \blindtext
\end{document}
Should now work as expected.
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