emacs-orgmode
[Top][All Lists]
Advanced

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

[O] ox-html: Table of Contents not respecting CUSTOM_ID


From: Mitchel Humpherys
Subject: [O] ox-html: Table of Contents not respecting CUSTOM_ID
Date: Mon, 29 Jun 2015 14:08:03 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi,

It seems that my table of contents links are no longer using the
CUSTOM_ID property.  Here's a minimal example:

--8<---------------cut here---------------start------------->8---
* My Cool Section
  :PROPERTIES:
  :CUSTOM_ID: my-cool-section
  :END:

* Other Section
  Please refer to [[#my-cool-section]].
--8<---------------cut here---------------end--------------->8---

Which exports as (trimmed down to just the body):

--8<---------------cut here---------------start------------->8---
<body>
<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgheadline1">1. My Cool Section</a></li>
<li><a href="#orgheadline2">2. Other Section</a></li>
</ul>
</div>
</div>
<div id="outline-container-orgheadline1" class="outline-2">
<h2 id="my-cool-section"><a id="orgheadline1"></a><span 
class="section-number-2">1</span> My Cool Section</h2>
<div class="outline-text-2" id="text-my-cool-section">
</div>
</div>

<div id="outline-container-orgheadline2" class="outline-2">
<h2 id="orgheadline2"><span class="section-number-2">2</span> Other Section</h2>
<div class="outline-text-2" id="text-2">
<p>
Please refer to <a href="#my-cool-section">1</a>.
</p>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Mitchel Humpherys</p>
<p class="date">Created: 2015-06-29 Mon 14:04</p>
<p class="validation"><a 
href="http://validator.w3.org/check?uri=referer";>Validate</a></p>
</div>
</body>
--8<---------------cut here---------------end--------------->8---

Specifically, you can see that the headline is linking to #orgheadline1:

    <li><a href="#orgheadline1">1. My Cool Section</a></li>

The internal link seems to be using the CUSTOM_ID, as expected:

    Please refer to <a href="#my-cool-section">1</a>.

Maybe I'm missing some new config option?

I'm using org-mode master, currently at [a833d35159fd: "ox: Properly fix
internal regexps after each buffer change"] (from 6 days ago).  Notably,
I do have [b856f66892b8: "ox-html: Prefer custom ID over internal
references for links to headlines"], which seems to have fixed a similar
problem with internal links to headlines.


-- 
Mitch



reply via email to

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