emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Org-mode-publish: link to dedicated target accross files


From: Sébastien Brisard
Subject: Re: [O] Org-mode-publish: link to dedicated target accross files
Date: Tue, 31 Dec 2013 18:44:40 +0100

Hello,



> yes, that might help. Org-file =references.org= is a list of bibliographic
> references. Each entry is actually an item in a description list, like so
>
> #+BEGIN_SRC
>   - <<HASH1962>>
> [[http://dx.doi.org/10.1016/0022-5096(62)90004-2][Hashinand Shtrikman
> (1962)]] :: Z. Hashin and S. Shtrikman, /On some variational
> principles in anisotropic and nonhomogeneous elasticity/, Journal of the
> Mechanics and Physics of Solids 10(4):335-342, 1962
> #+END_SRC
>
> Then, in other org files, I'd like to refer to one of the items in the
> list. For example, I would like to write something like
>
> Using the energy principle of Hashin and Shtrikman (1962), an upper bound
> on the elastic moduli can be derived.
>
> Once exported to html, I would like the text 'Hashin [...] (1962)' to be a
> hyperlink which should point to references.html#HASH1962.
>
> Do you need more details? How can I achieve that result?

What happens if you write

  [[file:./references.org::#HASH1962][Hashin and Shtrikman (1962)]]

in other Org files?

There are two answers
1. in Emacs, clicking on the link opens the file references.org, but I get "No match" in the minibuffer
2. in the exported HTML file, the link is correct (something like <a href="">
If I instead write

 [[file:./references.org::HASH1962][Hashin and Shtrikman (1962)]]

(without the #), then the behaviour is the exact opposite
3. in Emacs, the link (including the dedicated target) is found
4. in the exported HTML file, the link is incomplete (<a href="">

What I would like is 2 + 3...

Sébastien

reply via email to

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