Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
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 '11 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 '11 at 21:03
    
That is the solution. I did not used \makeatletter and \makeatother –  Karo Dec 14 '11 at 21:12
    
Thank you Stefan for the background information! –  Karo Dec 14 '11 at 21:16
    
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 '11 at 21:25
add comment

1 Answer

up vote 5 down vote accepted

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}
share|improve this answer
    
Thanks, it works now. –  Karo Dec 14 '11 at 21:12
    
@Karo: If my Answer is appropriate, don't forget to mark it as accepted :) –  cmhughes Dec 14 '11 at 22:51
    
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
    
Thank you, Stefan! –  Karo Dec 16 '11 at 0:26
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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