From mboxrd@z Thu Jan 1 00:00:00 1970 From: "D. C. Toedt" Subject: Re: Include heading title in HTML section-number cross-reference, like LaTex \nameref? Date: Sat, 8 Feb 2014 16:46:02 -0600 Message-ID: References: <87k3d5nuiw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3430de6f66fb04f1ece1ae Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCGfg-0002Tr-Gb for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 17:46:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCGfc-0007rC-D7 for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 17:46:48 -0500 Received: from mail-vc0-f174.google.com ([209.85.220.174]:59899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCGfc-0007qo-7s for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 17:46:44 -0500 Received: by mail-vc0-f174.google.com with SMTP id im17so3674690vcb.5 for ; Sat, 08 Feb 2014 14:46:43 -0800 (PST) In-Reply-To: <87k3d5nuiw.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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --047d7b3430de6f66fb04f1ece1ae Content-Type: text/plain; charset=ISO-8859-1 That works -- please email me privately with where to send the $100 via PayPal. Thanks! (Org-mode maintainer [Bastien, still?], can you please let me know if / when this gets implemented in an official release.) Regards, D. C. *D. C. Toedt III * *(my** last name is pronounced "Tate") * Attorney and neutral arbitrator -- tech contracts and intellectual property dc@toedt.com LinkedIn: dctoedt Calendar (redacted) O: +1 (713) 364-6545 C: +1 (713) 516-8968 Houston, Texas (Central time zone) *Common Draft* annotated collection of contract clauses Unless expressly stated otherwise, this message is not intended to serve as an electronic signature nor as assent to an agreement. On Sat, Feb 8, 2014 at 3:50 PM, Nicolas Goaziou wrote: > Hello, > > "D. C. Toedt" writes: > > > QUESTION: When org-mode headings are NUMBERED, and the file is exported > to > > HTML, is there any way to have org-mode include the TITLE, not just the > > section number, of a cross-referenced section, along the lines of the > LaTex > > \nameref{} function? Here's an example: > > > > ==BEGIN EXAMPLE== > > > > #+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t > > > > * Introduction to Technology Contracts > > :PROPERTIES: > > :CUSTOM_ID: IntroTechContracts > > :END: > > > > Lorem ipsum etc. etc. > > > > * Dangerous Clauses > > :PROPERTIES: > > :CUSTOM_ID: DangerousClauses > > :END: > > > > Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]]. > > > > ==END EXAMPLE== > > [...] > > > Is that currently doable? > > I think so. Not trivial, but doable nonetheless. > > --8<---------------cut here---------------start------------->8--- > #+MACRO: get-title (eval (save-excursion (org-open-link-from-string > "[[#$1]]") (org-get-heading nil nil))) > #+MACRO: SECREF [[#$1][{{{get-title($1)}}}]] > #+OPTIONS: H:7 toc:nil num:1 email:t author:t > > * Introduction to Technology Contracts > :PROPERTIES: > :CUSTOM_ID: IntroTechContracts > :END: > > Lorem ipsum etc. etc. > > * Dangerous Clauses > :PROPERTIES: > :CUSTOM_ID: DangerousClauses > :END: > > Lorem ipsum etc. etc. -- see Section {{{SECREF(IntroTechContracts)}}} > --8<---------------cut here---------------end--------------->8--- > > > Regards, > > -- > Nicolas Goaziou > --047d7b3430de6f66fb04f1ece1ae Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
That works -- please email me privately= with where to send the $100 via PayPal. =A0Thanks!

(Org-mode maintainer [Bastien, still?], can yo= u please let me know if / when this gets implemented in an official release= .)

Regards,

D. C.

D
. C. Toedt III=A0
=A0(my
=A0last name is pronounced "Tate")=A0
Attorney and neutra= l arbitrator -- tech contracts and intellectual property

dc@toedt.com=A0 =A0 =A0LinkedIn:=A0dctoedt=A0 =A0=A0C= alendar= =A0(redacted)
O: +1 (713) 364-6545 =A0 = =A0C: +1 (713= ) 516-8968
=A0 =A0=A0
Houston, Texas (Central time zone)
=
Common Draft=A0annotated collection of contract clauses

Unless expressly stated otherwise= , this message is not intended=A0
to serve as an electro= nic signature nor as=A0assent to an agreement.




On Sat, Feb 8, 2014 at 3:50 PM, Nicolas = Goaziou <n.goaziou@gmail.com> wrote:
Hello,
[...]

> Is that currently doable?

I think so. Not trivial, but doable nonetheless.

--8<---------------cut here---------------start------------->8---
#+MACRO: get-title (eval (save-excursion (org-open-link-from-string "[= [#$1]]") (org-get-heading nil nil)))
#+MACRO: SECREF [[#$1][{{{get-title($1)}}}]]
#+OPTIONS: H:7 toc:nil num:1 email:t author:t

* Introduction to Technology Contracts
=A0 :PROPERTIES:
=A0 :CUSTOM_ID: IntroTechContracts
=A0 :END:

Lorem ipsum etc. etc.

* Dangerous Clauses
=A0 :PROPERTIES:
=A0 :CUSTOM_ID: DangerousClauses
=A0 :END:

Lorem ipsum etc. etc. -- see Section {{{SECREF(IntroTechContracts)}}}=
--8<---------------cut here---------------end--------------->8---


Regards,

--
Nicolas Goaziou

--047d7b3430de6f66fb04f1ece1ae--