[texhax] inline lists

Paul Isambert zappathustra at free.fr
Fri May 13 10:47:20 CEST 2011


And let's make that fish a simple yet tasty meal:

\newcount \itemcount

\def \list
     {%
         \begingroup
         \itemcount = `\a
     }

\let \endlist = \endgroup

\def \item
     {%
         \ifhmode\penalty-1000 \fi
         (\char \itemcount)%
         \advance \itemcount by 1
         ~\ignorespaces
     }

Paul

Le 13/05/2011 10:34, Philip TAYLOR (Webmaster, Ret'd) a écrit :
> Give a man a fish and you feed him for a day.
> Teach a man to fish and you feed him for life.
>
> \newcount \itemcount
>
> \def \list
>     {%
>         \begingroup
>         \itemcount = 0
>     }
>
> \def \endlist
>     {%
>         \endgroup
>     }
>
> \def \item
>     {%
>         {\advance \itemcount by `\a (\char \itemcount)}\relax
>         \advance \itemcount by 1
>         ~\ignorespaces
>     }
>
> \noindent
> Now is the time
> \list
> \item for all good men
> \item to come to the
> \item aid of the party
> \endlist
> \end
>
> ** Phil.
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org


More information about the texhax mailing list