6

Following this How to modify spacing around quotation environment? ...I have tried to use both given solutions (using quoting package and renewing quotation environment). I cannot use quoting package (MiKTeX does not find it, it is recognized by the newest version of MiKTeX but I am finishing my thesis so do not want to ruin my previous work by updating MiKTeX or do anything as such :) - I am not a pro etc. ;)), so I have tried this:

\renewenvironment{quotation}
               {\list{}{\listparindent=0pt%whatever you need
                        \itemindent    \listparindent
                        \leftmargin=0pt%  whatever you need
                        \rightmargin=10pt%whatever you need
                        \topsep=0pt%%%%%  whatever you need
                        \parsep        \z@ \@plus\p@}%
                \item\relax}
               {\endlist}

However it does not work. I have got this in the log file:

! Undefined control sequence. ...tmargin =10pt\topsep =0pt\parsep \z 
@ \@plus\p @ l.319 \begin{quotation}

EDIT: the solution is to not miss the \makeatletter before the code and \makeatother after the code (I did not include the full code)

Have you any ideas, why I cannot use it?

Or how to define spaces (mainly - block stretching it) between quotation environment and paragraphs (the spaces are not the same in different quotations in the text, sometimes the space is uneven before and after quotation or the space is huge, so the output does not look good as it should and I have to add or reduce vspace, which is probably the worst solution taking into account why I use TeX).

Karo
  • 179

1 Answers1

7

The following works for me; note the use of \makeatletter and \makeatother

screenshot

\documentclass{article}
\usepackage{lipsum}

\makeatletter
\renewenvironment{quotation}
               {\list{}{\listparindent=0pt%whatever you need
                        \itemindent    \listparindent
                        \leftmargin=0pt%  whatever you need
                        \rightmargin=10pt%whatever you need
                        \topsep=0pt%%%%%  whatever you need
                        \parsep        \z@ \@plus\p@}%
                \item\relax}
               {\endlist}
\makeatother


\begin{document}

Before the quote \ldots
\begin{quotation}
\lipsum[1]
\end{quotation}
After the quote \ldots
\end{document}
cmhughes
  • 100,947
  • ok :), I will try to figure out how to do it :). – Karo Dec 15 '11 at 10:03
  • 2
    @Karo: I merged your unregistered account and your registered account (which you used for posting the question), now you can accept by clicking the check mark on the left of the answer. I also converted the answer to a comment. – Stefan Kottwitz Dec 15 '11 at 10:40
  • I have quotations within the eledpar double column environment, this technique doesn't seem to work for me, any suggestions? – Shi Yuan Jan 22 '13 at 20:57