COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Memoir - adjustwidth - indentation

• Follow

How can one force indentation within an adjustwidth environment?

Or how would one define a similar environment that allowed one to use
\indent or \noindent and respected the indentation previously in
force.

I was unable to find any reference to the behaviour of adjustwidth
with respect to indentation in the manual but it seems that it's
noindent regardless...

 0
Reply julianidostuff (33) 12/3/2009 11:19:59 PM

On 4 Dec, 00:19, Julian I-Do-Stuff <julianidost...@gmail.com> wrote:
> How can one force indentation within an adjustwidth environment?
>
> Or how would one define a similar environment that allowed one to use
> \indent or \noindent and respected the indentation previously in
> force.
>
> I was unable to find any reference to the behaviour of adjustwidth
> with respect to indentation in the manual but it seems that it's
> noindent regardless...

Of course I meant the FIRST paragraph within an adjustwidth
environment... subsequent paragraphs revert to the behaviour the
neophyte naively expected throughout...

 0

Julian I-Do-Stuff wrote:
> On 4 Dec, 00:19, Julian I-Do-Stuff <julianidost...@gmail.com> wrote:
>> How can one force indentation within an adjustwidth environment?
>>
>> Or how would one define a similar environment that allowed one to use
>> \indent or \noindent and respected the indentation previously in
>> force.
>>
>> I was unable to find any reference to the behaviour of adjustwidth
>> with respect to indentation in the manual but it seems that it's
>> noindent regardless...
>
> Of course I meant the FIRST paragraph within an adjustwidth
> environment... subsequent paragraphs revert to the behaviour the
> neophyte naively expected throughout...

It is defined using a list, and thus it is the list environment that
withholds the indentation of the first line.

A version with indentation would be

\makeatletter
\begin{list}{}{%
\topsep\z@%
\listparindent\parindent%
\parsep\parskip%
\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
{\setlength{\leftmargin}{#1}}%
\@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
{\setlength{\rightmargin}{#2}}%
}
\item[]}{\end{list}}

\makeatother

--

/daleif (remove RTFSIGNATURE from email address)

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.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

 0

On 4 Dec, 10:22, Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> wrote:
> Julian I-Do-Stuff wrote:
> > On 4 Dec, 00:19, Julian I-Do-Stuff <julianidost...@gmail.com> wrote:
> >> How can one force indentation within an adjustwidth environment?
>
> >> Or how would one define a similar environment that allowed one to use
> >> \indent or \noindent and respected the indentation previously in
> >> force.
>
> >> I was unable to find any reference to the behaviour of adjustwidth
> >> with respect to indentation in the manual but it seems that it's
> >> noindent regardless...
>
> > Of course I meant the FIRST paragraph within an adjustwidth
> > environment... subsequent paragraphs revert to the behaviour the
> > neophyte naively expected throughout...
>
>
> It is defined using a list, and thus it is the list environment that
> withholds the indentation of the first line.
>
> A version with indentation would be
>
> \makeatletter
> =A0 =A0\begin{list}{}{%
> =A0 =A0 =A0\topsep\z@%
> =A0 =A0 =A0\listparindent\parindent%
> =A0 =A0 =A0\parsep\parskip%
> =A0 =A0 =A0\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {\setlength{\leftmargin}{#1}}%
> =A0 =A0 =A0\@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {\setlength{\rightmargin}{#2}}%
> =A0 =A0 =A0}
> =A0 =A0 =A0\item[]}{\end{list}}
>
> \makeatother
>
> --
>
> /daleif (remove RTFSIGNATURE from email address)
>
> LaTeX FAQ: =A0 =A0 =A0http://www.tex.ac.uk/faq
> LaTeX book: =A0 =A0http://www.imf.au.dk/system/latex/bog/=A0 =A0(in Danis=
h)
> Remember to post minimal examples, see URL belowhttp://www.tex.ac.uk/cgi-=
bin/texfaq2html?label=3Dminxamplhttp://www.minimalbeispiel.de/mini-en.html

Thank you greatly...

Now I see how adjustwidth is defined I've done this (and similarly for
myAdjustWidth* using the code in Memoir.cls)

{\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
{\setlength{\leftmargin}{#1}}%
\@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
{\setlength{\rightmargin}{#2}}%
}
{}

without screwing something else up... it *seems* ok to judge by the
output).

With no disrespect intended to the staggering effort of many people
involved in creating the system as a whole, the classes, additional
macros etc. - and the quality of the results - coming at TeX/LaTeX
with a head that once belong to a software engineer, I struggle with
the design/implementation philosophy. Such questions as "Why does
something labelled as a width adjustment change other contingent
things?" make my head hurt :)

My default assumption from here on will be - unless directed otherwise
- that unless one examines the implementing code one cannot predict
what any particular command will actually do. The fact that that
adjustwidth is based on a list environment (as I now know many
environments are - also conflicting with my sense of implementation
purity) is stated in the manual, but not in the description of
adjustwidth itself... it's in section 8.6 under list environments, and
thus unseen unless one searches the entire manual and reads around
every occurence (which is how I found it).

Whether the following suggestion has any merit is not for me to say,
but would it be possible in e.g. the Command Summary to indicate where
commands effectively "specialise" (are derived from)something else and
so have broader effect than might otherwise be apparent?

e.g. "\begin{adjustwidth}{<left>}{<right>... sets a List environment
and temporarily adds the lengths {<left>} and {<right>} to the left
and right margins within that List environment"

However, it's worth saying that without your help my brain would
probably have melted by now... thanks again.

 0

Julian I-Do-Stuff wrote:
> On 4 Dec, 10:22, Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> wrote:
>> Julian I-Do-Stuff wrote:
>>> On 4 Dec, 00:19, Julian I-Do-Stuff <julianidost...@gmail.com> wrote:
>>>> How can one force indentation within an adjustwidth environment?
>>>> Or how would one define a similar environment that allowed one to use
>>>> \indent or \noindent and respected the indentation previously in
>>>> force.
>>>> I was unable to find any reference to the behaviour of adjustwidth
>>>> with respect to indentation in the manual but it seems that it's
>>>> noindent regardless...
>>> Of course I meant the FIRST paragraph within an adjustwidth
>>> environment... subsequent paragraphs revert to the behaviour the
>>> neophyte naively expected throughout...
>>
>> It is defined using a list, and thus it is the list environment that
>> withholds the indentation of the first line.
>>
>> A version with indentation would be
>>
>> \makeatletter
>>    \begin{list}{}{%
>>      \topsep\z@%
>>      \listparindent\parindent%
>>      \parsep\parskip%
>>      \@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
>>                   {\setlength{\leftmargin}{#1}}%
>>      \@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
>>                   {\setlength{\rightmargin}{#2}}%
>>      }
>>      \item[]}{\end{list}}
>>
>> \makeatother
>>
>> --
>>
>> /daleif (remove RTFSIGNATURE from email address)
>>
>> 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 belowhttp://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxamplhttp://www.minimalbeispiel.de/mini-en.html
>
> Thank you greatly...
>
> Now I see how adjustwidth is defined I've done this (and similarly for
> myAdjustWidth* using the code in Memoir.cls)
>
>     {\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
>                  {\setlength{\leftmargin}{#1}}%
>     \@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
>                  {\setlength{\rightmargin}{#2}}%
> 	}
> 	{}
>
> without screwing something else up... it *seems* ok to judge by the
> output).
>
> With no disrespect intended to the staggering effort of many people
> involved in creating the system as a whole, the classes, additional
> macros etc. - and the quality of the results - coming at TeX/LaTeX
> with a head that once belong to a software engineer, I struggle with
> the design/implementation philosophy. Such questions as "Why does
> something labelled as a width adjustment change other contingent
> things?" make my head hurt :)
>
> My default assumption from here on will be - unless directed otherwise
> - that unless one examines the implementing code one cannot predict
> what any particular command will actually do. The fact that that
> adjustwidth is based on a list environment (as I now know many
> environments are - also conflicting with my sense of implementation
> purity) is stated in the manual, but not in the description of
> adjustwidth itself... it's in section 8.6 under list environments, and
> thus unseen unless one searches the entire manual and reads around
> every occurence (which is how I found it).
>
> Whether the following suggestion has any merit is not for me to say,
> but would it be possible in e.g. the Command Summary to indicate where
> commands effectively "specialise" (are derived from)something else and
> so have broader effect than might otherwise be apparent?
>
> e.g. "\begin{adjustwidth}{<left>}{<right>... sets a List environment
> and temporarily adds the lengths {<left>} and {<right>} to the left
> and right margins within that List environment"
>
> However, it's worth saying that without your help my brain would
> probably have melted by now... thanks again.

This is typical for all new users.

But you are not a typical new user, as your documents that 'interesting
requirements'

Usually environments and macros are just something people use, but in
other cases, people with special needs, as your self, need special

In those cases it is my opinion that you are better of explaining your
problem here first instead of in LC (no disrespect to LC, it is a great
forum for helping users)

A lot of the people on CTT are highly skilled (La)TeX macro programmers,
or have intimate knowledge of packages, classes and their internals. And
thus can offer great help to people.

But it will help us a lot if people would ask better question, or
explaing better what they are trying to achive.

--

/daleif (remove RTFSIGNATURE from email address)

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.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

 0

On Dec 4, 2:38=A0am, Julian I-Do-Stuff <julianidost...@gmail.com> wrote:
> Such questions as "Why does something labelled as a width

Since width adjustment is a pure formatting issue, one should rightly
expect that there are no other changes, including to paragraph
indentation.
Maybe it could be changed, but I expect a lot of documents are already
based on the current behavior.

\raggedright in core LaTeX has the same problem!

Donald Arseneau


 0