demydd / pandoc

Automatically exported from code.google.com/p/pandoc
0 stars 0 forks source link

Proper cross-references in DocBook and reST #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
From Marcin Wojdyr:

It would be useful if pandoc supported proper cross-references
in DocBook and reST:

DocBook:
1) add id to each <section>, based on <title>, like you do for <h1>.
2) use <link> instead of <ulink> when link starts with "#".

Markdown: This is [internal link](#header-identifier).
HTML: This is <a href="#header-identifier">internal link</a>.
DocBook: This is <link linkend="header-identifier">internal link</
link>.

reST:
http://docutils.sourceforge.net/docs/user/rst/quickref.html#implicit-hyperlink-t
argets
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#implicit-hype
rlink-targets

it would be better to use full titles rather than mangled, i.e.
[link](#Header identifier) instead of [link](#header-identifier),
and change it only in HTML output.

Original issue reported on code.google.com by fiddloso...@gmail.com on 9 Mar 2008 at 3:10

GoogleCodeExporter commented 8 years ago

Original comment by fiddloso...@gmail.com on 9 Mar 2008 at 3:14

GoogleCodeExporter commented 8 years ago

Original comment by fiddloso...@gmail.com on 5 Dec 2009 at 8:07

GoogleCodeExporter commented 8 years ago
Docbook issue is resolved in r1651.

RST issue is more complex and will be put on the back burner.

Original comment by fiddloso...@gmail.com on 5 Dec 2009 at 6:27

GoogleCodeExporter commented 8 years ago

Original comment by fiddloso...@gmail.com on 5 Dec 2009 at 7:10

GoogleCodeExporter commented 8 years ago
I think Pandoc really needs to have (internal) support for internal links 
(anchors).
I see that docbook writer already have some support for it, but it's not 
enough. I
think we need addtiional entry in Block datatype (say, data Block = ... | Anchor
String). Some of input languages (html, latex, maybe other?) support "tags" 
like <a
name=..>, and many output languages (html, latex, docbook,odt,mediawiki) 
support them
too. So, I think pandoc should have support for internal links.

Original comment by ilya.por...@gmail.com on 22 Dec 2009 at 11:50

GoogleCodeExporter commented 8 years ago
I've add support for internal links in my branch. One can see it at
http://github.com/portnov/pandoc/tree/ilinks .

Original comment by ilya.por...@gmail.com on 26 May 2010 at 9:04