From mboxrd@z Thu Jan 1 00:00:00 1970 From: "D. C. Toedt" Subject: Include heading title in HTML section-number cross-reference, like LaTex \nameref? Date: Sat, 8 Feb 2014 15:11:22 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1133ec96d02a9904f1eb8eda Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCFC3-0005Oj-E6 for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 16:12:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCFBz-0006Ki-Ib for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 16:12:07 -0500 Received: from mail-vb0-f46.google.com ([209.85.212.46]:59737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCFBz-0006Kc-D8 for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 16:12:03 -0500 Received: by mail-vb0-f46.google.com with SMTP id o19so3715908vbm.33 for ; Sat, 08 Feb 2014 13:12:02 -0800 (PST) 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 --001a1133ec96d02a9904f1eb8eda Content-Type: text/plain; charset=ISO-8859-1 I'm using Org-mode version 8.2.5f with Gnu Emacs 24.3 on a Macbook Air with Mavericks. I'm using it to build building an annotated collection of contract clauses that I'm releasing under a Creative Commons license (see http://www.CommonDraft.org), which I hope to monetize with a book on contract drafting and negotiation. I've done a fair amount of Google searching and also searching within this list. If the following isn't already implemented, I'd pay USD$100 (via PayPal) to have that done to whoever implements it in an official org-mode release, plus another USD$100 donation to the org-mode maintainer. 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== With numbering turned ON (#+OPTIONS: num:1), the link is exported to HTML as: Section 1. With numbering turned OFF (#+OPTIONS: num:nil), the link is exported to HTML as: Section Introduction to Technology Contracts. Using a macro, I'd like to be able to AUTOMATICALLY do the latter --- that is, have the link text be the heading title --- even with numbering turned ON, so that a macro such as {{{SECREF(IntroTechContracts)}}} would render in HTML as, let's say: Section 1, entitled "Introduction to Technology Contracts." Is that currently doable? *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. --001a1133ec96d02a9904f1eb8eda Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm using Org-mode version 8.2.5f w= ith Gnu Emacs 24.3 on a Macbook Air with Mavericks. I'm using it to bui= ld building an annotated collection of contract clauses that I'm releas= ing under a Creative Commons license (see http://www.CommonDraft.org), which I hope to monetize with a book= on contract drafting and negotiation.

I've done a fair amount= of Google searching and also searching within this list. If the following = isn't already implemented, I'd pay USD$100 (via PayPal) to have tha= t done to whoever implements it in an official org-mode release, plus anoth= er USD$100 donation to the org-mode maintainer.

QUESTION: =A0When org-mode = headings are NUMBERED, and the file is exported to HTML, is there any way t= o have org-mode include the TITLE, not just the section number, of a cross-= referenced section, along the lines of the LaTex \nameref{} function? =A0He= re's an example:

=3D=3DBEGIN EXAMPLE=3D=3D

#+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t
<= div class=3D"gmail_default">
* = Introduction to Technology Contracts
=A0 :PROPERTIES:
=A0 :CUSTOM_ID: IntroTechContracts
=A0 :END:

Lorem ipsum= etc. etc.
* Dangerous Clauses
<= font face=3D"arial, helvetica, sans-serif">
=A0 :PROPERTIES:
=A0 :CUSTOM_ID: Dangerou= sClauses
=A0 :END:

Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]].
=3D=3DEND EXAMPLE=3D=3D

With numbering turned ON (#+OPTIONS: num:1), the link is exporte= d to HTML as: =A0Section <a href=3D"#IntroTechContracts">1&= lt;/a>.
With numbering turned OFF (#+OPTIONS: num:nil), the link is expo= rted to HTML as: =A0Section <a href=3D"#IntroTechContracts">= ;Introduction to Technology Contracts</a>.

Using a macro, I= 'd like to be able to AUTOMATICALLY do the latter --- that is, have the= link text be the heading title --- even with numbering turned ON, so that = a macro such as {{{SECREF(IntroTechContracts)}}} would render in HTML as, l= et's say: =A0 Section <a href=3D"#IntroTechContracts">1= </a>, entitled "<a href=3D"#IntroTechContracts">Introduction = to Technology Contracts</a>."

Is that currently doable?

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.


--001a1133ec96d02a9904f1eb8eda--