[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] HTML Export of Links to Source Blocks seems broken
From: |
Nicolas Goaziou |
Subject: |
Re: [O] HTML Export of Links to Source Blocks seems broken |
Date: |
Fri, 17 Jun 2016 09:51:10 +0200 |
Hello,
timor <address@hidden> writes:
> considering the following example:
>
> --------------------------------------
> #+NAME: test_fun
> #+BEGIN_SRC js
> function test_fun() {
>
> } #+END_SRC
>
> Link to [[test_fun]]
>
> #+NAME: another_test_fun
> #+BEGIN_SRC js
> function another_test_fun() {
>
> }
> #+END_SRC
>
> Link to [[another_test_fun]]
> -----------------------------------------
>
> the exported html code creates to <a> tags, like this:
>
> ------------------------------------
> Link to <a href="#orgsrcblock1">1</a>
> ------------------------------------
>
> and this:
>
> ------------------------------------
> Link to <a href="#orgsrcblock2">1</a>
> ------------------------------------
>
> Is that behavior desired?
Yes, it is. Those are internals targets. Org handles them, well,
internally.
> I would expect the link text to actually spell "test_fun" and
> "another_test_fun" in this case, since those are the names of the
> source blocks.
This is a reasonable expectation only if you are a bit careful about the
value of the NAME keyword. See `org-latex-prefer-user-labels' for more
information.
> As a workaround, is there anywhere in the exporter that I could hook
> into to change the link text myself?
There is no equivalent to `org-latex-prefer-user-labels' in HTML export
back-end at the moment. Though, patches to add one are welcome since
this is a quite frequent request.
Regards,
--
Nicolas Goaziou
- [O] HTML Export of Links to Source Blocks seems broken, timor, 2016/06/16
- Re: [O] HTML Export of Links to Source Blocks seems broken,
Nicolas Goaziou <=
- Re: [O] HTML Export of Links to Source Blocks seems broken, timor, 2016/06/17
- Re: [O] HTML Export of Links to Source Blocks seems broken, Nicolas Goaziou, 2016/06/17
- Re: [O] HTML Export of Links to Source Blocks seems broken, timor, 2016/06/20
- Re: [O] HTML Export of Links to Source Blocks seems broken, Nicolas Goaziou, 2016/06/20
- Re: [O] HTML Export of Links to Source Blocks seems broken, timor, 2016/06/20
- Re: [O] HTML Export of Links to Source Blocks seems broken, Nicolas Goaziou, 2016/06/20