On Sun, Feb 19, 2012 at 08:41:45PM +0100, Nicolas Goaziou wrote:
> > Suggestion: On export, how about enabling automatic element
> > descriptions for references following the type:name convention, so
> > that e.g. just
> >
> > : in [[ref:tab:numbers]] we can see...
> >
> > would expand to
> >
> >   in Table 2 we can see...
> >
> > If implemented, this should be user-customizable e.g. through an alist
> > like
> >
> >   (("fig" . "Figure") ("tab" . "Table") ("map" . "Map"))
> 
> That's another possibility, but I'd rather follow LaTeX usage. I think
> it gives user more latitude in the end. Indeed, You don't have to think
> about a name prefix ; you can also have constructs like "Tables
> [[ref:table1]], [[ref:table2]] and [[ref:table3]]" for "Tables 1, 2 and
> 3", etc.
> 
> Note that the behaviour you suggest can easily be implemented using
> filters in the new exporter.

Note that for LaTeX export, there's no need to explicitly add names to
references -- LaTeX can figure them out for itself from the label alone,
with a little of help.

There are various CTAN packages implementing this, such as cleveref,
hyperref's \autoref command, varioref's \labelformat command... Cleveref
is arguably the most powerful of these, as you can just chuck references
into a \cref command (which replaces \ref):
\cref{figure1,table1,table3,table2}, and it sorts them all out for you,
to produce "Figure~1, and Tables~1 to~3". (Disclaimer: I'm the author of
cleveref.)

Toby
-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: ts...@cantab.net
web:   www.dr-qubit.org

Reply via email to