From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?S=E9bastien_Brisard?= Subject: Re: Org-mode-publish: link to dedicated target accross files Date: Tue, 31 Dec 2013 18:44:40 +0100 Message-ID: References: <87ppofqyjg.fsf@gmail.com> <87lhz2r7w3.fsf@gmail.com> <87ob3ydsvw.fsf@gmail.com> <87k3emdmfx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdc0628693cd004eed81d0d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vy3N4-0006pr-9o for emacs-orgmode@gnu.org; Tue, 31 Dec 2013 12:44:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vy3My-0000iv-Kn for emacs-orgmode@gnu.org; Tue, 31 Dec 2013 12:44:50 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:45587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vy3My-0000ig-B5 for emacs-orgmode@gnu.org; Tue, 31 Dec 2013 12:44:44 -0500 Received: from mail-qc0-f170.google.com (mail-qc0-f170.google.com [209.85.216.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id A866814091321 for ; Tue, 31 Dec 2013 18:44:41 +0100 (CET) Received: by mail-qc0-f170.google.com with SMTP id x13so12240558qcv.15 for ; Tue, 31 Dec 2013 09:44:40 -0800 (PST) In-Reply-To: <87k3emdmfx.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --047d7bdc0628693cd004eed81d0d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, > yes, that might help. Org-file =3Dreferences.org=3D is a list of bibliogr= aphic > > references. Each entry is actually an item in a description list, like = so > > > > #+BEGIN_SRC > > - <> > > [[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 th= e > > 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 bou= nd > > on the elastic moduli can be derived. > > > > Once exported to html, I would like the text 'Hashin [...] (1962)' to b= e > 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 ...) 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 (...) What I would like is 2 + 3... S=E9bastien --047d7bdc0628693cd004eed81d0d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello,



> yes, that might help. Org-file =3Dreferences.org=3D is a list of bibliographic
> references. Each entry is actually an item in a description list, like= so
>
> #+BEGIN_SRC
> =A0 - <<HASH1962>>
> [[http://dx.doi.org/10.1016/0022-5096(62)90004-2][H= ashinand Shtrikman
> (1962)]] :: Z. Hashin and S. Shtrikman, /On some var= iational
> principles in anisotropic and nonhomogeneous elasticity/, Journal of t= he
> 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 bo= und
> on the elastic moduli can be derived.
>
> Once exported to html, I would like the text 'Hashin [...] (1962)&= #39; 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

=A0 [[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 lik= e <a href=3D"./references.html#HASH1962">...</a>)
=
If I instead write

=A0[[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=3D"./references.html">...</a>)

What I would like is 2 + 3...

S=E9bastien<= br>
--047d7bdc0628693cd004eed81d0d--