View Single Post
Old 08-26-2015, 11:37 PM   #4
ni_c
Enthusiast
ni_c began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jul 2015
Device: none
Heres a few other ideas relating to linking within the document, putting here as much to remind me later, but glad it it helps simplify things for anyone else while at it (btw, turns out name"" and id"" are interchangable, but calibre defaults to using id"" so will use that here for consistency)

Ok supposing all the epub sections are merged as index_split_000.html and you wanto link to a url at the end of the book from half a dozen places, and be able to link back to those places from the url link. Will need to make seperate link backs

ill write it so theres a seperate title for the link on the previous line and add linkbacks on a third line after url. Am using page breaks, but no difference with paragraphs (have also added seperate id for the url itself -1.0.1- just to work with the stylesheet.css). And if the titles on a previous line to the link, is better to have internal links point to the title line instead of the link itself. Heres an example

<p class="calibre1" id="1.0">Good book on dogs:<br>
<a href="www.dogbook.com/bestsellers/you_bite_girl" id="1.0.1" >www.dogbook.com/bestsellers/you_bite_girl</a><br>
<i>Go back to reference links:</i><b><a href="index_split_000.html#1.1">[1]</a>, <a href="index_split_000.html#1.2">[2]</a>, <a href="index_split_000.html#1.3">[3]</a>, <a href="index_split_000.html#1.4">[4]</a>, <a href="index_split_000.html#1.5">[5]</a>, <a href="index_split_000.html#1.6">[6]</a></b></p>

the reference links themselves just need this

bla bla <a href="index_split_000.html#1.0" id="1.1" >see book</a> [1] bla bla
bla bla <a href="index_split_000.html#1.0" id="1.2" >see book</a> [2] bla bla
bla bla <a href="index_split_000.html#1.0" id="1.3" >see book</a> [3] bla bla
bla bla <a href="index_split_000.html#1.0" id="1.4" >see book</a> [4] bla bla
bla bla <a href="index_split_000.html#1.0" id="1.5" >see book</a> [5] bla bla
bla bla <a href="index_split_000.html#1.0" id="1.6" >see book</a> [6] bla bla

btw calibre seems to prefer formatting it as #id_1.0 but just #1.0 works fine
ni_c is offline   Reply With Quote