[OS X TeX] Re: Nonenumerated text in an enumerated list

Alain Schremmer schremmer.alain at gmail.com
Wed Jul 30 01:42:41 CEST 2008


On Jul 29, 2008, at 5:39 PM, John B. Thoo wrote:

>
> On Tue, 29 Jul 2008 05:19:33 -0700, in MacOSX-TeX Digest, Vol 9,  
> Issue 27
> "Scott, Randy" <Scott_Randy at sccollege.edu> wrote:
>
>> Good Morning,
>>
>> First, thanks to those who responded to my last question about  
>> squeezing text into boxes. Your ideas worked great and I finished  
>> that little project.
>>
>> Today, I'm trying to make a handout for a class. There will be  
>> some text instructions, followed by some numbered problems, then  
>> more instructions that are to be aligned with the left margin (not  
>> with the enumerated text), then more numbered problems (continuing  
>> the enumeration from the first set of problems), more text, etc.
>>
>> I've read the (seemingly) pertinent sections in my "Latex  
>> Companion" a few times, but it seems to say that anything in an  
>> enumerate environment needs to be an \item.
>>
>> Any ideas?
>>
>> Thanks, as always,
>>
>> Randy Scott
>> Santiago Canyon College
>> Orange, CA
>
> I have used this.
>
> %% -- begin, cut here -- %%
>
> % interitemtext.sty
> %
> % For inserting text between \item's in a list environment
> %
> % Suggested by Michel Bovani.

This forced me to do a search and, of course, I found it. Following  
is Bovani's complete original post and, by the way, why isn't  
interitemtext standard in enumerate environments?

Shameful regards
--schremmer

Subject: Re: [OS X TeX] Intertext like command
From: "Michel Bovani"
Date: Mon, 12 Jul 2004 08:45:43 +0200


Le 12 juil. 2004, =E0 7h10, Will Robertson a =E9crit :

 >
 > On 12 Jul 2004, at 2:20 PM, Alain Schremmer wrote:
 >
 >>
 >>  As you typed it, I think Paragraph text =85 is part of Item 2  
and=20
 >> lined up as such.
 >
 > Oh, yeah. Makes sense now, what you want.
 > Besides manually outdenting the line,

One can use a list environment and  \@totalleftmargin

\makeatletter
\newcommand{\interitemtext}[1]{%
\begin{list}{}
{\itemindent=3D0mm\labelsep=3D0mm
\labelwidth=3D0mm\leftmargin=3D0mm
\addtolength{\leftmargin}{-\@totalleftmargin}}
\item #1
\end{list}}
\makeatother

It will work even inside imbricated enumerates...

\begin{enumerate}
\item item one
\item item two
\begin{enumerate}
\item item one
\item item two
\interitem{The next items are boring but included for completeness...}
\item item three
\end{enumerate}
\item item three
\end{enumerate}


 >  I can't think of anything:
 >
 > \begin{enumerate}
 > \item item one
 > \item item two
 > \item[] \hspace{-20pt} The next items are boring but included for=20
 > completeness...
 > \item item three
 > \end{enumerate}
 >
 > WARNING: I just guessed the amount of space to subtract. 20pt  
might=20
 > not be accurate!!!
 >
 > You could then make your own command to you wouldn't have to deal  
with=20=

 > the uglyness. Put this in your preamble:
 >
 > \newcommand{\interitemtext}[1]{\item[] \hspace{-20pt} #1}
 >
 > (You don't have to use \interitemtext, you can call it whatever  
you=20
 > like)
 > Then:
 >
 > \begin{enumerate}
 > \item item one
 > \item item two
 > \interitemtext{The next items are boring but included for=20
 > completeness...}
 > \item item three
 > \end{enumerate}
 >
 > W
 >



More information about the macostex-archives mailing list