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).

4
  • 2
    Would you be able to include an entire minimal working example (MWE) of what you currently have, rather than just a snippet of code.
    – Werner
    Dec 14, 2011 at 20:56
  • 6
    You have to use \makeatletter before the redefiniton and should use \makeatother after it, because of the @ character in \z@ and further control sequences. See What do \makeatletter and \makeatother do? for an explanation.
    – Stefan Kottwitz
    Dec 14, 2011 at 21:03
  • That is the solution. I did not used \makeatletter and \makeatother
    – Karo
    Dec 14, 2011 at 21:12
  • It was my first question, sorry for breaking a rule with MWE... Actually the problem was with using just a snippet of code -- so maybe with EDIT it will be more useful for the others (newbies here like me :)) not to follow the same mistake.
    – Karo
    Dec 14, 2011 at 21:25

1 Answer 1

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}
3
  • ok :), I will try to figure out how to do it :).
    – Karo
    Dec 15, 2011 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, 2011 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, 2013 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.