This is less a calibre problem than just not knowing how to do this correctly.
I've been successfully using Markdown-formatted text to create Mobi files for my Kindle, but converting the same source into ePub for my new Sony T1 is giving me a little trouble. Specifically link anchors. People who know more than me, please help.
If I want to link to the beginning of a header, I've been doing this:
Code:
# Chapter 4
Blablabla...
<a name="anchorForChapter5"></a>
# Chapter 5
Blablabla...
On the Kindle this works because the Kindle displays the page so that the link is at the screen top, leaving the <h1> tag just below it. I know it's kind of faking it, and there really should be a page break at the <h1>, but on the Kindle it
looks pretty much like a normal chapter would when jumped-to from the table of contents. I've been using this for e.g. endnotes.
But. The Sony seems to jump to links by going to the page that contains the link, and then just displaying that page as though I'd paged to it manually. So if a link happens to wind up at the bottom of the page, then so be it. Unfortunately for my method, that means that the Markdown source above takes us to the end of Chapter 4, with Chapter 5 hidden behind the next page break. Oops. Well that is indeed what I'm explicitly telling it to do (pesky computers, taking me literally

), but the Kindle was polite enough to pretend not to notice.
What would be a process to link directly to/near headers that would work on both machines?