|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
RefTeX: defining new label environmentHi all,
I use a TeX package called ExPex for linguistic examples, which has its own way of defining labels. The package defines two environments, \ex--\xe and \pex--\xe (yes, they're both closed with \xe). The latter allows sublists, where each item is introduced with the macro \a. These environments can define labels with angle brackets: \ex<ex:1> This is an example \xe \pex<ex:2> \a This is a subexample \a<b> This is another subexample \xe Is there a way to get RefTeX to recognize these things as labels? I've tried adding a definition to reftex-label-alist and specifying `\ex<*>' for the ENV-OR-MACRO entry, but that doesn't work... TIA Joost PS: there is a discrepancy between the doc string for reftex-label-alist and the info section "Non-Standard Environments". The former says that if ENV-OR-MACRO is a function, it must return a cons cell (FUNCTION . POSITION), the latter says that it must return just a buffer position. -- Joost Kremers, PhD University of Frankfurt Institute for Cognitive Linguistics Grüneburgplatz 1 60629 Frankfurt am Main, Germany _______________________________________________ auctex mailing list auctex@... http://lists.gnu.org/mailman/listinfo/auctex |
|
|
Re: RefTeX: defining new label environment* Joost Kremers (2009-09-10) writes:
> Is there a way to get RefTeX to recognize these things as labels? I've tried adding a definition to reftex-label-alist and specifying `\ex<*>' for the ENV-OR-MACRO entry, but that doesn't work... Yes, angle brackets are not supported as delimiters. I currently don't have a workaround for that. > PS: there is a discrepancy between the doc string for reftex-label-alist and the info section "Non-Standard Environments". The former says that if ENV-OR-MACRO is a function, it must return a cons cell (FUNCTION . POSITION), the latter says that it must return just a buffer position. Thanks for the hint. I fixed this in CVS. By the way, the lines produced by your MUA are rather long. -- Ralf _______________________________________________ auctex mailing list auctex@... http://lists.gnu.org/mailman/listinfo/auctex |
|
|
Re: RefTeX: defining new label environmentOn Sat, 12 Sep 2009 19:44:17 +0200, Ralf Angeli wrote:
> * Joost Kremers (2009-09-10) writes: > >> Is there a way to get RefTeX to recognize these things as labels? I've >> tried adding a definition to reftex-label-alist and specifying `\ex<*>' >> for the ENV-OR-MACRO entry, but that doesn't work... > > Yes, angle brackets are not supported as delimiters. I currently don't > have a workaround for that. > >> PS: there is a discrepancy between the doc string for >> reftex-label-alist and the info section "Non-Standard Environments". >> The former says that if ENV-OR-MACRO is a function, it must return a >> cons cell (FUNCTION . POSITION), the latter says that it must return >> just a buffer position. > > Thanks for the hint. I fixed this in CVS. > > By the way, the lines produced by your MUA are rather long. I do have a workaround for that. Enable display of labels in comments using reftex-label-menu-flags. Then just put a comment with the same label name somewhere near your actual label (the one reftex can't find). I just did it for lstlistings like this: %\label{lst:mylisting} \begin{lstlisting}[caption={Some caption},label=lst:mylisting] Some code \end{lstlisting} Cheers, Martin -- For emails use cs dot tu-berlin dot de as the domain (behind the at). _______________________________________________ auctex mailing list auctex@... http://lists.gnu.org/mailman/listinfo/auctex |
|
|
Re: RefTeX: defining new label environmentOn Sat, Sep 12, 2009 at 07:44:17PM +0200, Ralf Angeli wrote:
> * Joost Kremers (2009-09-10) writes: > > > Is there a way to get RefTeX to recognize these things as labels? I've tried > > adding a definition to reftex-label-alist and specifying `\ex<*>' for the > > ENV-OR-MACRO entry, but that doesn't work... > > Yes, angle brackets are not supported as delimiters. I currently don't > have a workaround for that. Something that I meant to ask but somehow forgot... Is this something that might change in a future version of AUCTeX? TIA Joost -- Joost Kremers, PhD University of Frankfurt Institute for Cognitive Linguistics Grüneburgplatz 1 60629 Frankfurt am Main, Germany _______________________________________________ auctex mailing list auctex@... http://lists.gnu.org/mailman/listinfo/auctex |
|
|
Re: RefTeX: defining new label environment* Joost Kremers (2009-09-25) writes:
> On Sat, Sep 12, 2009 at 07:44:17PM +0200, Ralf Angeli wrote: >> * Joost Kremers (2009-09-10) writes: >> >> > Is there a way to get RefTeX to recognize these things as labels? I've tried >> > adding a definition to reftex-label-alist and specifying `\ex<*>' for the >> > ENV-OR-MACRO entry, but that doesn't work... >> >> Yes, angle brackets are not supported as delimiters. I currently don't >> have a workaround for that. > > Something that I meant to ask but somehow forgot... Is this something that might > change in a future version of AUCTeX? I don't think so because referencing is a feature of RefTeX. If you'd like to know if this will be supported in RefTeX, then at least I don't have it on the agenda. (At least for now I'd rather want to concentrate on AUCTeX.) And until now nobody else has voiced interest in implementing the feature. -- Ralf _______________________________________________ auctex mailing list auctex@... http://lists.gnu.org/mailman/listinfo/auctex |
|
|
Re: Re: RefTeX: defining new label environmentOn Fri, Sep 25, 2009 at 06:55:21PM +0200, Ralf Angeli wrote:
> * Joost Kremers (2009-09-25) writes: > >> Yes, angle brackets are not supported as delimiters. I currently don't > >> have a workaround for that. > > > > Something that I meant to ask but somehow forgot... Is this something that might > > change in a future version of AUCTeX? > > I don't think so because referencing is a feature of RefTeX. Yeah, of course. Silly me. ;-) > If you'd > like to know if this will be supported in RefTeX, then at least I don't > have it on the agenda. (At least for now I'd rather want to concentrate > on AUCTeX.) And until now nobody else has voiced interest in > implementing the feature. Ok, that makes sense. Thanks, Joost -- Joost Kremers, PhD University of Frankfurt Institute for Cognitive Linguistics Grüneburgplatz 1 60629 Frankfurt am Main, Germany _______________________________________________ auctex mailing list auctex@... http://lists.gnu.org/mailman/listinfo/auctex |
| Free embeddable forum powered by Nabble | Forum Help |