[OS X TeX] Automatic labeling for references

Alain Schremmer schremmer.alain at gmail.com
Sat Apr 5 16:49:52 CEST 2008


On Apr 4, 2008, at 10:18 PM, Jan Anderssen wrote:
> Hello.
>
>>> But then you've still got to get the \ref commands right so you  
>>> need to know what the labels are. Or do I have this wrong?
>>
>> I assume you mean that before I can write "We already saw in  
>> \titleref{314} that …" in the source, I have to know that 314 is  
>> the label of the section I want to reference. Well, I could look  
>> up the section in the toc and then the label number at the given  
>> page number. In fact, why coulnd't the label be the chapter number  
>> followed by some symbol and then by the section number? Then I  
>> would just have to look up the toc!
>>
>> The reason I would like this to be automatic is that last year I  
>> gave up on references altogether because I got completely confused  
>> even though someone on this list had written a macro that would  
>> generate random label numbers. This way, it would be just a matter  
>> of looking up an already existing label.
>
> I often change the order of things around as I go along (sometimes  
> quite dramatically), so what was section 2.3 might become section  
> 2.7 etc.

That's why I had resigned myself to resorting to looking up the toc.

> So you (I?) would either need to live with a mismatch of label and  
> actual section number then (making it kind of arbitrary), or change  
> the label and all depending \ref's all the time, which seems quite  
> tedious and error-prone unless automated.

Yes, now that you mention it, that's what I had forgotten, that's why  
I had given up on referencing: the depending refs, the disaster that  
follows when the stuff I want to refer to moves from this section to  
that section.

I think I am doomed again to no reference or do the referencing at  
the very end. Still, automatic labeling of ALL sections would still  
be useful at that stage.

Grateful regards
--schremmer


More information about the macostex-archives mailing list