[texhax] Change \item behavior, to append argument to default list label, instead of replacing it.

E. Krishnan ekmath at asianetindia.com
Wed Jul 22 02:20:23 CEST 2009


On Tue, 21 Jul 2009, Niall Mansfield wrote:

> The following is what I would like.  Let's say my "foo" environment typesets 
> a list with "ABC" instead of bullets.  Then:
>
> \begin{foo}
> \item the quick
> \item[BONGO] brown fox
> \item jumps
> \item[bar] over the dog
> \end{foo}
>
> should produce:
>
> ABC the quick
> ABC BONGO broxw fox
> ABC jumps
> ABC bar over the dog

Will this do?

   \newenvironment{MyDescription}[1]{%
     \renewcommand\descriptionlabel[1]{#1\ ##1}
     \begin{description}}
     {\end{description}}



   \begin{MyDescription}{ABC}
   \item the quick
   \item[BONGO] brown fox
   \item jumps
   \item[bar] over the dog
   \end{MyDescription}




-- 
Krishnan


More information about the texhax mailing list