[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Support for "\Label" and "\myref"

From: AW
Subject: Re: [AUCTeX] Support for "\Label" and "\myref"
Date: Mon, 22 Aug 2016 23:25:04 +0200
User-agent: KMail/5.2.3 (Linux/4.7.0-2-default; KDE/5.24.0; x86_64; ; )

Hi Arash !

Am Montag, 22. August 2016, 19:56:42 CEST schrieb Arash Esbati:
> AW <address@hidden> writes:
> > I use these commands for a kind of abbreviated links, see here (only if
> > you
> > are interested):
> > 
> The final scenario is that \Label is only included after sectioning
> commands?  

> Within AUCTeX, i.e. without Reftex, you probably could get
> away with a style file `abbreviated-refs.el' like this (untested!).
> Function `LaTeX-section-label' is altered to
> `LaTeX-abbrev-refs-section-label' and it calls `LaTeX-abbrev-refs-label'
> instead of `LaTeX-label':

OK, thank you very much!!!

I simply put the tex-code I wrote into the file abbrev-ref.sty, which I attach 
Then I copied your code into abbrev-ref.el and saved it to the same place, a 
temp directory.

In this directory I opened a new *.tex file and tried to write an article. But 
after inserting a section, I just get the usual prompt and "\label". 

However, I often use reftex to get e.g. a table of contents in Emacs (C-c = ).


> --8<---------------cut here---------------start------------->8---
> ... nice code...

> With Reftex, the job is done by `reftex-label' and the modification
> above does not work anymore.  Altering `reftex-label' is something you
> want to do with the next flood ;-)  

Reftex seems to be able to deal with varioref. Maybe we can steal some ideas 

> My suggestion would be to hack
> `LaTeX-abbrev-refs-section-label' to search back and replace \label with
> \Label or to do it on TeX level with a flag that \label expands to
> \Label after \section and to original \label otherwise.

Öh, äh, yes. Whut?

> > Maybe someone can write some lines on a rainy day?
> The forecast says no rain for the rest of the week ;-)
Yes, I'm on vacation in Netherlands and after some rainy days tomorrow the 
nice weather is appreciated really!

> Best, Arash

Kind regards,


Attachment: abbrev-ref.el
Description: Text Data

Attachment: abbrev-ref.sty
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]