# [OS X TeX] Referring to arbitrary labels?

Claus Gerhardt gerhardt at math.uni-heidelberg.de
Thu Nov 18 10:34:50 EST 2004

I would advice against defining a new section command. A references
should enable the reader to find the reference in the text fairly
easily. The best reference is of course a page number, which can also
be achieved by using something like like fullref. I usually do this  in
a book, when the reference points to a different section. In a paper
refering to the section and theorem/experiment label alone is more
appropriate.

Thus I would recommend to use the standard section command. Your
experiments lead certainly to a main observations or results. This
result should be stated like a theorem

\begin{thm}
\end{thm}

In addition you have to define in the preamble

\newtheorem{thm}[subsection]{Experiment}

Then this will be printed as

Experiment 3.1. The breath taking result can best be described ....

if the experiment is the first experiment in section 3. This would be
my recommendation.

You could also define

\newtheorem{thm}{Experiment}

then the experiments would be labeled consecutivley starting with 1
without any reference to a section number. If there would be a
bijective relation between experiments and sections, this would be
identical, but I doubt it, because of the introduction, and you also
said that some experiments would be stated not as sections. Thus, to be
consistent you should use the first approach.

Claus

On 18.11.2004, at 15:06, Mohinish Shukla wrote:

> 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}
>
>
> 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>
>
>

--------------------- 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>