sommer@BINAH.CC.BRANDEIS.EDU (12/13/90)
My problem is to be able to use a new counter to sequentially designate items in my text (e.g., chemical structures) automatically BUT ALSO to be able to re-use the structure number (automatically) when needed. In my preamble I can put \newcounter{str} \newcommand{\str}{\stepcounter{str}{\bf \thestr}} to simply designate each new item in sequence. E.g., compare compound \str \ to compound \str . (output = compare compound *1* to compound *2*.) When I add \newenvironment{strnum}{\str}{{}} to the preamble, it should create an environment to put in the numbers with enough space between the \begin{strnum} \label{steroid6} and \end{strnum} for the optional label{steroid6} command. So how do I define a counter for the environment so I can re-use the number associated with \ref{steroid6} elsewhere in my text? I was sort of hoping it would be built into the LaTeX newenvironment defs but it's not working as hoped. Note: \begin{strnum} and \end{strnum} does produce *3* in the output. Everything compiles _without error_, but there is no *#* corresponding to \ref{steroid6} in the output = "... associated with elsewhere in my ..." The space between "with" and "elsewhere" is very big, though. My .aux file contains: \relax \newlabel{steroid1}{{}{1}} % I guess the 1 is the page # for use with % \pageref{steroid6}, but that the str # is {} And, yes, I did latex twice before dvi'ing. I've been reading latex.tex, but I don't know enough TeX to know where to start hacking. Thanks for suggestions ...