[OS X TeX] Automatic labeling for references

Herbert Schulz herbs at wideopenwest.com
Sat Apr 5 17:04:06 CEST 2008


On Apr 5, 2008, at 9:41 AM, Alain Schremmer wrote:
> On Apr 4, 2008, at 10:18 PM, David Watson wrote:
>> Good grief!
>>
>> I would never EVER use a random label number. The whole purpose of  
>> using labels and references is to make it memorable.
>
> That's if you still have a functioning memory. Mine is fading fast.
>
>> \label{eulersformula} is WAY more memorable than  
>> \label{x89237kjalsdfi134}
>
> Er, I can't remember whether I had EulerFormula, eulerformula,  
> Eulerformula, Euler_formula, etc .I am going crazy!
>
> ...

Howdy,

Create a Macro that contains

%:#SEL#
\label{#SEL#}

and save it as Set Label (or something like that. When you want to  
enter a new label write out the label, e.g.

Eq:MyEquation

then select it and run the Macro. You'll end up with

%:Eq:MyEquation
\label{Eq:MyEquation}

so the label will show up in the Tags drop down menu. You can also  
assign the Macro to a keyboard shortcut to make it a bit quicker. The  
only thing that slows you down here is the need to select the label  
name before running the Macro.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)





More information about the macostex-archives mailing list