* HTML export: internal links broken
@ 2008-03-26 22:50 Sebastian Rose
2008-03-28 15:20 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Rose @ 2008-03-26 22:50 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
There is small bug in the XHTML export. Internal links point to nowhere.
* Example
*** In the orgfile:
This [[Some Heading][Link]] should link to '*** Some Heading'.
*** After export, HTML file:
This <a href="#Some--Heading">Link</a> should link to '*** Some
Heading'.
There is no anchor defined with that name in the exported HTML. There
are two possibilities to change this:
1) define the anchor next to the heading:
<a id="Some--Heading" />
2) If the link pionts to a heading, use the ID of the heading in the
link:
... <a href="sec-3.2.1">Link</a> to '*** Some Heading'.
The second one is the one I would prefer, but that would mean to handle
links to headings differently from links to user defined anchors. But it
would keep the nesting of section containers clean.
Regards,
Sebastian
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: HTML export: internal links broken
2008-03-26 22:50 HTML export: internal links broken Sebastian Rose
@ 2008-03-28 15:20 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2008-03-28 15:20 UTC (permalink / raw)
To: Sebastian Rose; +Cc: emacs-orgmode Mailinglist
Hi Sebastian,
this is not really a bug. Internal links in Org are fuzzy links, they
do a text search.
During HTML export I am only implementing explicit targets: pieces of
text enclosed in <<...>>
So if you write
> * <<Some Heading>>
>
> ** <<Some other heading>>
>
> *** Some <<third>> heading
>
> This [[Some Heading][Link]] should link to '*** Some Heading'.
>
> This [[Some other heading][Link]] should link to '*** Some other
> heading'.
>
> This [[third][Link]] should link to '*** Some third heading',
> even though only a single word is in the target.
then you will get a properly linked export:
> <div id="outline-container-1" class="outline-2">
> <h2 id="sec-1">1 <span class="target">Some Heading</span> </h2>
> <div id="text-1"></div>
>
> <div id="outline-container-1.1" class="outline-3">
> <h3 id="sec-1.1">1.1 <span class="target">Some other heading</
> span> </h3>
> <div id="text-1.1"></div>
>
> <div id="outline-container-1.1.1" class="outline-4">
> <h4 id="sec-1.1.1">1.1.1 Some <span class="target">third</
> span> heading</h4>
> <div id="text-1.1.1">
>
>
> <p>
> This <a href="#sec-1">Link</a> should link to '*** Some Heading'.
> </p>
> <p>
> This <a href="#sec-1.1">Link</a> should link to '*** Some other
> heading'.
> </p>
> <p>
> This <a href="#sec-1.1.1">Link</a> should link to '*** Some third
> heading'.
> </p>
> </div>
> </div>
> </div>
> </div>
Hope this helps.
- Carsten
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-28 15:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-26 22:50 HTML export: internal links broken Sebastian Rose
2008-03-28 15:20 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).