[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Target and link text normalised to `orgtargetn'
From: |
Suvayu Ali |
Subject: |
Re: [O] Target and link text normalised to `orgtargetn' |
Date: |
Sun, 19 Apr 2015 15:24:25 +0200 |
User-agent: |
Mutt/1.5.23.1-rc1 (2014-03-12) |
Hi Nicolas,
On Sun, Apr 19, 2015 at 02:57:09PM +0200, Nicolas Goaziou wrote:
> Suvayu Ali <address@hidden> writes:
>
> > Sorry, I don't think I quite understand. AFAIU, targets like
> > <<interesting>> have to be unique even inside the Org buffer for links
> > like this to work: [[interesting][very cool]], regardless of export. So
> > then why rename them during export?
>
> There's no guarantee that, e.g., \label{interesting} is a valid syntax.
> Think about <<100%>> for LaTeX. Actually such links were broken for
> non-ASCII characters before the patch.
>
> Note that this is transparent for the user: if <<interesting>> becomes
> \label{foo}, [[interesting][very cool]] automatically becomes
> \hyperref[foo]{very cool}.
>
> Your problem is different AFAIU. You are relying on the internal pattern
> of generated labels, i.e., you are eating Org's dog food. I advise
> against it.
Yes indeed. I wanted to use the location information provided by
refstyle, and varioref. By using \secref or \vpageref I would get
references like: section §3, on page 5, etc.
> If you need explicitly "\label{interesting}", ask Org to write it with,
> e.g., "@@latex:\label{foo}@@" or even better
>
> #+MACRO: lbl @@latex:\label{$1}@@
>
> {{{lbl(foo)}}}
>
Okay I see it now, in your last email I got a bit confused, but now I
follow. With your solution I use both label and reference using LaTeX,
bypassing Org. Of course this leaves me with links not working inside
Org. I was eventually going to use filters to transform the ref
commands to the alternate ones from refstyle and varioref to get both
LaTeX and Org side working as I wanted. Something like this:
<<sec:interesting>>
[[sec:interesting]]
Then transform \ref{sec:interesting} → \secref{sec:interesting} with a
filter; that way I would have my cake and eat it too! I see your point
though.
Thanks a lot for the comments. :)
Cheers,
--
Suvayu
Open source is the future. It sets us free.
- [O] Target and link text normalised to `orgtargetn', Suvayu Ali, 2015/04/14
- Re: [O] Target and link text normalised to `orgtargetn', Suvayu Ali, 2015/04/14
- Re: [O] Target and link text normalised to `orgtargetn', Rasmus, 2015/04/14
- Re: [O] Target and link text normalised to `orgtargetn', Rasmus, 2015/04/16
- Re: [O] Target and link text normalised to `orgtargetn', Suvayu Ali, 2015/04/16
- Re: [O] Target and link text normalised to `orgtargetn', Rasmus, 2015/04/16
- Re: [O] Target and link text normalised to `orgtargetn', Nicolas Goaziou, 2015/04/18
- Re: [O] Target and link text normalised to `orgtargetn', Suvayu Ali, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Nicolas Goaziou, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn',
Suvayu Ali <=
- Re: [O] Target and link text normalised to `orgtargetn', Nicolas Goaziou, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Suvayu Ali, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Nicolas Goaziou, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Suvayu Ali, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Rasmus, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Nicolas Goaziou, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Rasmus, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Nicolas Goaziou, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Rasmus, 2015/04/19
- Re: [O] Target and link text normalised to `orgtargetn', Nicolas Goaziou, 2015/04/19