[Top][All Lists]

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

[O] Include heading title in HTML section-number cross-reference, like L

From: D. C. Toedt
Subject: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?
Date: Sat, 8 Feb 2014 15:11:22 -0600

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:


#+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t

* Introduction to Technology Contracts
  :CUSTOM_ID: IntroTechContracts

Lorem ipsum etc. etc.

* Dangerous Clauses
  :CUSTOM_ID: DangerousClauses

Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]].


With numbering turned ON (#+OPTIONS: num:1), the link is exported to HTML as:  Section <a href="">

With numbering turned OFF (#+OPTIONS: num:nil), the link is exported to HTML as:  Section <a href="" 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, let's say:   Section <a href="" entitled "<a href="" to Technology Contracts</a>."

Is that currently doable?

. C. Toedt III 
 last name is pronounced "Tate"
Attorney and neutral arbitrator -- tech contracts and intellectual property

address@hidden     LinkedIn: dctoedt    Calendar (redacted)
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.

reply via email to

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