[OS X TeX] Referring to arbitrary labels?

Claus Gerhardt gerhardt at math.uni-heidelberg.de
Thu Nov 18 18:37:47 CET 2004


Mohinish,

In my view the experiments need not be labelled consecutively from 1 to 
n. Thus, I wouldn't introduce new counters, instead I would use

\section{Experiment: Nice test ...}\label{S:3} (If the section number 
happens to be 3)

for experiments that fill a whole section

and

\begin{expt}\label{e:4.2}
\end{expt}

Notice, however, that this construction is clearly meant for relatively 
short statements, not for material that spans a page or two. An 
alternative would be

\subsection{E: Test of the ...}\label{E:..}

Then you can refer to these experiments as: As we have seen in Section 
\ref{S:3}, resp.,  in Experiment \ref{e:4.2}, resp., the results of the 
experiment in \ref{E:...}

The final choice is of course yours.

Claus

On 18.11.2004, at 17:22, Mohinish Shukla wrote:

> Dear Claus,
> 	thanks for your reply.
> However, in the field of psychology (at least), the Experiment is an 
> important 'level' (with Methods, Results & Discussion as sublevels), 
> and it is sometimes most appropriate to refer to the entire experiment 
> as a whole, rather than just the result.
> 	So, using your advice, I know define a theorem in the preamble:
>
> \newtheorem{expt}{E}
> \setcounter{expt}{1}
>
> And for those sections that are experiments, I use the following (the 
> addcounters might not be necessary?):
>
> \section[Experiment \arabic{expt}: Nice test of my model.]{Experiment 
> \arabic{expt}}
> \addtocounter{expt}{-1}
> \begin{expt}
> Nice test of my model.
> \label{exx1}
> \end{expt}
> \addtocounter{expt}{1}
>
>
> This gives appropriate chapter titles, and what looks like a 
> title-line; and looks good in the toc as well.. Not the most elegant, 
> but it certainly works appropriately. Any suggestions would be most 
> welcome :)
>
> Thanks!
> Mohinish
>
>
>
>
>
> On 18 Nov 2004, at 4:34 PM, Claus Gerhardt wrote:
>
>> 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}
>>> \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>
>>>
>>>
>>
>> --------------------- 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>
>>
>>
> 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>





More information about the macostex-archives mailing list