# [OS X TeX] Referring to arbitrary labels?

Mohinish Shukla shukla at sissa.it
Thu Nov 18 09:06:11 EST 2004

I have a problem that seems 'generic'..(meaning I suppose a similar
problem could arise in various contexts)

- I have a series of Experiments in the thesis; I would like to number
these Experiment 1, Experiment 2 and so on. They are all sections, but
not every section is an Experiment..also, they are spread out across
different chapters.

So, I tried

\newcounter{expt}
\setcounter{expt}{1}

and whenever I have an Experiment (typically a \section), I used

\section{Experiment \arabic{expt}: Experiment name}
\addtocounter{expt}{1}

Works great, except that now I cannot refer back to this particular
experiment. I tried:
\section{Experiment \arabic{expt}: Experiment name\label{expt1}}

but a \ref{expt1} returns, naturally, the section number, and not the
experiment number...

so I cannot say ".. in Experiment \ref{expt1}... "

Any ideas/suggestions? I would be most grateful!

Currently I'm naming the experiments by their section number, as:

\section{Experiment \arabic{chapter}.\arabic{section}: Experiment name}

which is not elegant, but is at least consistent..

Thanks for any suggestions!!!

Mohinish

mohinish shukla
cognitive neuroscience sector
scuola internazionale superiore di studi avanzati
via beirut 2-4
trieste 34014, italy
+39 040 3787 613 (off)
+39 040 3787 615 (fax)

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>

More information about the MacOSX-TeX mailing list