[texhax] labeling things

Joe Corneli jcorneli at math.utexas.edu
Sat Sep 20 15:25:07 CEST 2003


Hi,

I want to make a new environment with numbered/labeled lines in it.

This doesn't seem too hard and I can probably figure out how to do all
this on my own, but for the sake of community and to solicit any
brainstorms you might have, I'm posting some thoughts here.

I have a set of definitions, currently written as in the following example.

(topology)\defn{
\item $X$ set \\
\item $t = \{U_{\alpha} \pipe U_{\alpha} \subset X\}$\\
\item $\phi \in t$
\item $X \in t$
\item $\{V_i\}_{i=1}^n \subset t \Rightarrow \cap_1^n V_i \in t$ \\
\item $\{V_{\alpha}\}_{\alpha \in I} \subset t \Rightarrow \cup_{\alpha} V_{\alpha} \in t$}


My current \defn environment formats the items in a bullet'd list, like
itemize (but with less space between the lines and with a smaller
typeface than the surrounding text).
 
I would like these lines to be numbered. I would be happy to dispense
with the bullets if there were numbers instead (and I'm sure I could
figure out how to do this with the list environment), but both bullets
to the left and numbers to the right seems like an even more attractive
option, and I'm not so sure I could figure out how to do that one.  My
guess is to base the new environment on tabular instead of list.  

Also I would like to have each item be automatically labelled with
something meaningful, like topology1, topology2, etc.  This is probably
as easy as changing the definition of the environment something like
this:

\defn{topology}{
\item $X$ set \\
\item $t = \{U_{\alpha} \pipe U_{\alpha} \subset X\}$\\
\item $\phi \in t$
\item $X \in t$
\item $\{V_i\}_{i=1}^n \subset t \Rightarrow \cap_1^n V_i \in t$ \\
\item $\{V_{\alpha}\}_{\alpha \in I} \subset t \Rightarrow \cup_{\alpha} V_{\alpha} \in t$}

and then fiddling around with counters.

Anyway, it looks like if I want to do this I will have some happy
hours  figuring out how -- but if you have thoughts about it that
may give me a head start!

Cheers,
Joe






More information about the texhax mailing list