How to renew quotation environment for custom margins. I would like to
set custom value for left and an identical for the right margin, e.g.
\mymargin. Also, I would like that quotation environment starts with a
\noindent for only the first line. As far as I am concerned it inject
a \noindent directly before the contents of the environment.
I know that it should look something like:
\makeatletter
\renewenvironment{quotation}
{\list{}{...}
{\endlist}
\makeatother
Please, how do I do this?
Thanks,
Pander
why don't you do what the rest of us do, look in the source
in article quotations is defined as
\newenvironment{quotation}
{\list{}{\listparindent 1.5em%
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\item\relax}
{\endlist}
compare it with quote:
\newenvironment{quote}
{\list{}{\rightmargin\leftmargin}%
\item\relax}
{\endlist}
experimenting with these may bring you to the right solution (in the
mean time you will learn something)
play with \listparindent or \itemindent
--
/daleif (remove RTFSIGNATURE from email address)
Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
\renewenvironment{quotation}
{\list{}{\leftmargin=<??>% <-- set here your margin
\listparindent \parindent
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \parskip}%
\item\relax\noindent\ignorespaces}
{\endlist}
Ciao
Enrico
Have you forgot \setlength ? ;-)
\renewenvironment{quotation}[1][\leftmargin=1.5em]
{\list{}{\listparindent 1.5em
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@ #1}%
\item\relax}
{\endlist}
\begin{quotation}
\begin{quotation}[\itemindent=2cm \leftmargin =2em]
more flexible...
GL, what are you talking about now?
> \renewenvironment{quotation}[1][\leftmargin=1.5em]
> {\list{}{\listparindent 1.5em
> \itemindent \listparindent
> \rightmargin \leftmargin
> \parsep \z@ \@plus\p@ #1}%
> \item\relax}
> {\endlist}
>
> \begin{quotation}
>
> \begin{quotation}[\itemindent=2cm \leftmargin =2em]
>
> more flexible...
>
>
>>
>> compare it with quote:
>>
>> \newenvironment{quote}
>> {\list{}{\rightmargin\leftmargin}%
>> \item\relax}
>> {\endlist}
>>
>> experimenting with these may bring you to the right solution (in the
>> mean time you will learn something)
>>
>> play with \listparindent or \itemindent
>>
>>
>>
>>
>
I'd expected from you: \setlength {\itemident}{\listparindent}
with the braces and all that stuff ;-)
Do you even know what I posted?
copy'n'pasted from article.cls
why should I change it?
I get it, you do not like \setlength, so what? I find it handy in
several cases.
For example adding calc, \setlength allows additions, your syntax below
does not. A user cannot easily get \leftmargin = 1.5em + \parindent
(say). So for non-programmers \setlength has its advantages, not just
for programming macros, but also for user interfaces.
>>
>>> \renewenvironment{quotation}[1][\leftmargin=1.5em]
>>> {\list{}{\listparindent 1.5em
>>> \itemindent \listparindent
>>> \rightmargin \leftmargin
>>> \parsep \z@ \@plus\p@ #1}%
>>> \item\relax}
>>> {\endlist}
>>>
>>> \begin{quotation}
>>>
>>> \begin{quotation}[\itemindent=2cm \leftmargin =2em]
>>>
>>> more flexible...
>>>
>>>
>>>>
>>>> compare it with quote:
>>>>
>>>> \newenvironment{quote}
>>>> {\list{}{\rightmargin\leftmargin}%
>>>> \item\relax}
>>>> {\endlist}
>>>>
>>>> experimenting with these may bring you to the right solution (in the
>>>> mean time you will learn something)
>>>>
>>>> play with \listparindent or \itemindent
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>
I would say only for user interface. And by the way since eTeX exists,
\def\setlength #1#2{#1\dimexpr #2\relax \relax }
provides all, with the same syntax as \dimexpr that is, an economy in
the learning of its usage.
tabu does not know \setlength: tracking an assignment in the log
{changing \dimen118=12pt into \dimen118=18pt}
is painful, tracking it amongst the lines produces by calc.sty is
impossible...
Regards.
My goal is to use \parindent on the left and right of quotation and
when an indentation occurs inside a quotation env, it will be absolute
two times \parindent and relative on one \parindent.
When I do:
\rewenvironment{quotation}
{\list{}{\listparindent \parindent%
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\item\relax}
{\endlist}
Nothing is changed in horizontal margins or indentation but an empty
line is added before and after the quotation. :S
\documentclass[a4paper]{article}
\usepackage{lipsum}
\makeatletter
\renewenvironment{quotation}
{\list{}{
\listparindent \parindent
\itemindent 0pt
\leftmargin\parindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\item\relax}
{\endlist}
\makeatother
\begin{document}
% text width
\noindent\rule{\textwidth}{3mm}
\begin{quotation}
\lipsum[1-3]
\end{quotation}
\noindent\rule{\textwidth}{3mm}
\end{document}