LaTeX forum ⇒ 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

Postby alarswilson » Mon Jan 18, 2010 10:48 am

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?

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Tue Jan 19, 2010 12:21 pm

You can add macros to these environments in a relatively simple way. The following only works for environments without any arguments.
  1. \makeatletter
  2. \g@addto@macro{\quote}{\upshape}
  3. \g@addto@macro{\quotation}{\upshape}
  4. \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
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ 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

Postby alarswilson » Thu Jan 21, 2010 12:35 pm

I added your macro to my preamble with \noindent
  1. \makeatletter
  2. \g@addto@macro{\quote}{\noindent}
  3. \g@addto@macro{\quotation}{\noindent}
  4. \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: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Thu Jan 21, 2010 12:59 pm

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.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ 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

Postby magicmoose » Thu Jan 21, 2010 2:05 pm

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

Postby alarswilson » Fri Jan 22, 2010 10:06 am

.5" indent both sides.

I'll take a look at "wordlike." Thanks for the heads up.

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Fri Jan 22, 2010 11:05 am

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.
  1. \documentclass[11pt,a4paper,twoside,english]{report}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[latin1]{inputenc}
  4. \usepackage{babel}
  5. \usepackage[doublespacing]{setspace}
  6. \usepackage[indentfirst,raggedright]{titlesec}
  7. \usepackage{lmodern}
  8. \usepackage{blindtext}
  9.  
  10. \setlength{\parindent}{0.5in}
  11. \makeatletter
  12. \newcommand*{\spelled}[1]{%
  13. \expandafter\@spelled\csname c@#1\endcsname
  14. }
  15. \newcommand*{\@spelled}[1]{%
  16. \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
  17. }
  18. \renewenvironment{quotation}{%
  19. \list{}{%
  20. \listparindent 1.5em%
  21. \itemindent \listparindent
  22. \leftmargin 0.5in
  23. \rightmargin \leftmargin
  24. \parsep \z@ \@plus\p@
  25. }%
  26. \item\relax
  27. }
  28. {\endlist}
  29. \renewenvironment{quote}{%
  30. \list{}{%
  31. \leftmargin 0.5in
  32. \rightmargin \leftmargin
  33. }%
  34. \item\relax
  35. }
  36. {\endlist}
  37. \makeatother
  38.  
  39. % Setup for headings (titlesec)
  40. \titleformat{\chapter}[display]
  41. {\normalfont\normalsize\bfseries\filcenter}
  42. {\normalsize\MakeUppercase{\chaptertitlename\ \spelled{chapter}}}
  43. {1pc}
  44. {\normalsize}
  45. \titleformat*{\section}{\normalfont\normalsize\itshape}
  46. \titleformat*{\subsection}{\normalfont\normalsize}
  47. \titleformat*{\subsubsection}{\normalfont\normalsize}
  48. \titleformat*{\paragraph}{\normalfont\normalsize\slshape}
  49. \titlespacing*{\section}{0pt}{1.5\baselineskip}{\baselineskip}
  50. \titlespacing*{\subsection}{0pt}{1.5\baselineskip}{\baselineskip}
  51. \titlespacing*{\subsubsection}{0pt}{1.5\baselineskip}{\baselineskip}
  52.  
  53. \begin{document}
  54. \blindtext
  55.  
  56. \begin{quote}
  57. \blindtext
  58. \end{quote}
  59.  
  60. \blindtext
  61. \end{document}
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ 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

Postby alarswilson » Fri Jan 22, 2010 4:19 pm

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:

  1. \documentclass[letterpaper,12pt,english,oneside,raggedright,draft]{report}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[english]{babel}
  4. \usepackage{epigraph}
  5. \renewcommand{\epigraphsize}{\footnotesize}
  6. \newcommand{\superscript}[1]{\ensuremath{^\textrm{\scriptsize{#1}}}}
  7. \usepackage{fixltx2e}
  8. \usepackage[flushmargin,hang,multiple,ragged]{footmisc}
  9. \usepackage[indentfirst,raggedright]{titlesec}
  10. \usepackage{blindtext}
  11. \usepackage{fancyhdr}
  12. \usepackage{times}
  13. \usepackage{footmisc}
  14. \usepackage[includeheadfoot,top=.5in, bottom=1in, left=1.5in, right=1in]{geometry}
  15. \usepackage[doublespacing]{setspace}
  16.  
  17. % setup for headers (fncyhdr)
  18. \pagestyle{fancy}
  19. \lhead{}
  20. \chead{}
  21. \rhead{\thepage}
  22. \lfoot{}
  23. \cfoot{}
  24. \rfoot{}
  25. \renewcommand{\headrulewidth}{0pt}
  26.  
  27. \raggedright
  28. \hyphenpenalty10000
  29. \setlength{\parindent}{0.5in}
  30.  
  31. % spelled chapter numbers
  32. \makeatletter
  33. \newcommand*{\spelled}[1]{%
  34. \expandafter\@spelled\csname c@#1\endcsname
  35. }
  36. \newcommand*{\@spelled}[1]{%
  37. \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
  38. }
  39. \makeatother
  40.  
  41. % quote and quotation indents and margins
  42. \makeatletter
  43. \renewenvironment{quotation}{%
  44. \list{}{%
  45. \listparindent 1.5em%
  46. \itemindent \listparindent
  47. \leftmargin 0.5in
  48. \rightmargin \leftmargin
  49. \parsep \z@ \@plus\p@
  50. \singlespacing
  51. }%
  52. \item\relax
  53. }
  54. {\endlist}
  55. \renewenvironment{quote}{%
  56. \list{}{%
  57. \leftmargin 0.5in
  58. \rightmargin \leftmargin
  59. \singlespacing
  60. }%
  61. \item\relax
  62. }
  63. {\endlist}
  64. \makeatother
  65.  
  66. % \expandafter\def\expandafter\quote\expandafter{\quote\noindent\singlespacing}
  67. % \expandafter\def\expandafter\quote\expandafter{\quotation\noindent\singlespacing}
  68. % \expandafter\def\expandafter\verse\expandafter{\verse\noindent\singlespacing}
  69.  
  70. % Setup for headings (titlesec)
  71. \titleformat{\chapter}[display]
  72. {\normalfont\normalsize\bfseries\filcenter}
  73. {\normalsize\MakeUppercase{\chaptertitlename\ \spelled{chapter}}}
  74. {1pc}
  75. {\normalsize}
  76. \titleformat*{\section}{\normalfont\normalsize\itshape}
  77. \titleformat*{\subsection}{\normalfont\normalsize}
  78. \titleformat*{\subsubsection}{\normalfont\normalsize}
  79. \titleformat*{\paragraph}{\normalfont\normalsize\slshape}
  80. \titlespacing*{\section}{0pt}{3ex}{1ex}
  81. \titlespacing*{\subsection}{0pt}{3ex}{1ex}
  82. \titlespacing*{\subsubsection}{0pt}{3ex}{1ex}
  83.  
  84. \setlength{\footnotesep}{20pt}

alarswilson
Posts: 26
Joined: Thu Apr 02, 2009 3:42 pm

Postby alarswilson » Mon Feb 01, 2010 11:10 am

Any ideas on how to fix my vertical spacing/indentation issues with quote+quotation environments? Thanks. Andrew

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Sun Feb 07, 2010 2:33 pm

For this demands another redefinition is necessary.
  1. \documentclass[11pt,twoside,english]{report}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[latin1]{inputenc}
  4. \usepackage{babel}
  5. \usepackage[includeheadfoot,margin=1in]{geometry}
  6. \usepackage[doublespacing]{setspace}
  7. \usepackage[indentfirst,raggedright]{titlesec}
  8. \usepackage{lmodern}
  9. \usepackage{blindtext}
  10.  
  11. \setlength{\parindent}{0.5in}
  12. \makeatletter
  13. \newcommand*{\spelled}[1]{%
  14. \expandafter\@spelled\csname c@#1\endcsname
  15. }
  16. \newcommand*{\@spelled}[1]{%
  17. \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
  18. }
  19. \renewenvironment{quotation}{%
  20. \list{}{%
  21. \listparindent 0.5in
  22. \itemindent 0pt
  23. \leftmargin 0.5in
  24. \rightmargin \leftmargin
  25. \parsep 0.5\baselineskip
  26. \topsep 0.5\baselineskip
  27. \singlespacing
  28. }%
  29. \item\relax
  30. }
  31. {\endlist}
  32. \renewenvironment{quote}{%
  33. \list{}{%
  34. \listparindent 0.5in%
  35. \itemindent 0pt
  36. \leftmargin 0.5in
  37. \rightmargin \leftmargin
  38. \topsep 0.5\baselineskip
  39. \singlespacing
  40. }%
  41. \item\relax
  42. }
  43. {\endlist}
  44. \makeatother
  45.  
  46. % Setup for headings (titlesec)
  47. \titleformat{\chapter}[display]
  48. {\normalfont\normalsize\bfseries\filcenter}
  49. {\normalsize\MakeUppercase{\chaptertitlename\ \spelled{chapter}}}
  50. {1pc}
  51. {\normalsize}
  52. \titleformat*{\section}{\normalfont\normalsize\itshape}
  53. \titleformat*{\subsection}{\normalfont\normalsize}
  54. \titleformat*{\subsubsection}{\normalfont\normalsize}
  55. \titleformat*{\paragraph}{\normalfont\normalsize\slshape}
  56. \titlespacing*{\section}{0pt}{1.5\baselineskip}{\baselineskip}
  57. \titlespacing*{\subsection}{0pt}{1.5\baselineskip}{\baselineskip}
  58. \titlespacing*{\subsubsection}{0pt}{1.5\baselineskip}{\baselineskip}
  59.  
  60. \begin{document}
  61. \blindtext
  62.  
  63. \begin{quotation}
  64. \blindtext
  65.  
  66. \blindtext
  67. \end{quotation}
  68.  
  69. \blindtext
  70. \end{document}

Should now work as expected.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


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


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 5 guests