[WARNING - NOT VIRUS SCANNED] Re: [OS X TeX] Re: Eliminate extra vertical space in enumerate? (Gary L. Gray)

Ross Moore ross.moore at mq.edu.au
Mon May 7 02:07:09 CEST 2012


Hi all,

On 07/05/2012, at 9:38 AM, Gary L. Gray wrote:

> On May 6, 2012, at 6:52 PM, Ross Moore wrote:
> 

>> However, it clashes with  \usepackage{enumerate}  which also
>> provides an optional argument.
>> You certainly cannot use the two together. 
>> Besides, having to edit all your enumerate environments to add the
>> extra option is a hassle, assuming Gary is reusing a lot of stuff
>> already coded.
>> 


> Ross,
> 
> That does look interesting. Note that enumitem does have an option that makes it backward compatible with the feature of enumerate that we use. That is, one can load enumitem with the shortlabels option as:
> 
> \usepackage[shortlabels]{enumitem}
> 
> Does this change your suggestion?

The important thing is to not have to go through and look
at (and edit) the options to every {enumerate} environment.


OK; this works too, without affecting other {enumerate} lists
that may be within the document.

\framebox{%
\parbox{\textwidth}{\setenumerate[1]{topsep=0pt}%
\begin{enumerate}[(a)]
\item
First item.
\item
Second item.
\item
Third item.
\end{enumerate}%
}}

or the way you really want it, I'd guess, is something like:

\usepackage[shortlabels]{enumitem}
\newcommand{\framedsolution}[1]{%
 \framebox{\parbox{\textwidth}{%
  \setenumerate[1]{topsep=0pt}%  can add other settings here
  #1}}%
}


using it as:

\framedsolution{%
\begin{enumerate}[(a)]
\item
First item.
\item
Second item.
\item
Third item.
\end{enumerate}%
}


Or as an environment:

\newenvironment{framesolution}%
 {\framebox\bgroup\parbox{\textwidth}\bgroup
   \setenumerate[1]{topsep=0pt}%  can add other settings here
 }%
 {\egroup\egroup}

using it as:

\begin{framesolution}
\begin{enumerate}[(a)]
\item
First item.
\item
Second item.
\item
Third item.
\end{enumerate}%
\end{framesolution}

> 
> -- 
> All the best,
> Gary


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross.moore at mq.edu.au 
Mathematics Department                           office: E7A-419      
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------






More information about the macostex-archives mailing list