{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/pandoc/issues/1995","labels_url":"https://api.github.com/repos/jgm/pandoc/issues/1995/labels{/name}","comments_url":"https://api.github.com/repos/jgm/pandoc/issues/1995/comments","events_url":"https://api.github.com/repos/jgm/pandoc/issues/1995/events","html_url":"https://github.com/jgm/pandoc/issues/1995","id":60081294,"number":1995,"title":"ePub pop-up footnotes break in iBooks","user":{"login":"anthonynelzin","id":1241258,"avatar_url":"https://avatars.githubusercontent.com/u/1241258?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonynelzin","html_url":"https://github.com/anthonynelzin","followers_url":"https://api.github.com/users/anthonynelzin/followers","following_url":"https://api.github.com/users/anthonynelzin/following{/other_user}","gists_url":"https://api.github.com/users/anthonynelzin/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonynelzin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonynelzin/subscriptions","organizations_url":"https://api.github.com/users/anthonynelzin/orgs","repos_url":"https://api.github.com/users/anthonynelzin/repos","events_url":"https://api.github.com/users/anthonynelzin/events{/privacy}","received_events_url":"https://api.github.com/users/anthonynelzin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-06T09:58:28Z","updated_at":"2015-03-06T10:00:40Z","closed_at":null,"body":"When reading an ePub book generated by Pandoc with iBooks for iOS, popup footnotes won't open. Here's why. Pandoc writes the footnotes as:\r\n\r\n\t<a href=\"#fn1\" class=\"footnoteRef\" id=\"fnref1\" epub:type=\"noteref\"><sup>1</sup></a>\r\n\r\nWhen the `<sup>` tag is inside the `<a>` tag, popup footnotes break (for that matter, if any tag is inside the `<a>` tag, the footnote won't work). This is a fairly well documented problem -- here on Github, on the Adobe InDesign forums, or [on Liz Castro's website](http://www.pigsgourdsandwikis.com/2012/05/creating-pop-up-footnotes-in-epub-3-and.html) for example. In order for the footnote to properly work in iBooks, the markup should be :\r\n\r\n\t<sup><a href=\"#fn1\" class=\"footnoteRef\" id=\"fnref1\" epub:type=\"noteref\">1</a></sup>\r\n\r\nAnother tweak would go a long way in improving the reliability and legibility of Pandoc-generated ePubs: allowing the user to specify if the footnotes block should be visible (`<section class=\"footnotes\">`, good for books designed to be distributed on many plateforms) or not (`<aside class=\"footnotes\">`, good for books designed to be distributed on the iBooks Store only, or for the iBooks version of the book, as iBooks hides asides by defaults).\r\n\r\nHope it helps!"},"comment":{"url":"https://api.github.com/repos/jgm/pandoc/issues/comments/77534382","html_url":"https://github.com/jgm/pandoc/issues/1995#issuecomment-77534382","issue_url":"https://api.github.com/repos/jgm/pandoc/issues/1995","id":77534382,"user":{"login":"mpickering","id":1216657,"avatar_url":"https://avatars.githubusercontent.com/u/1216657?v=3","gravatar_id":"","url":"https://api.github.com/users/mpickering","html_url":"https://github.com/mpickering","followers_url":"https://api.github.com/users/mpickering/followers","following_url":"https://api.github.com/users/mpickering/following{/other_user}","gists_url":"https://api.github.com/users/mpickering/gists{/gist_id}","starred_url":"https://api.github.com/users/mpickering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpickering/subscriptions","organizations_url":"https://api.github.com/users/mpickering/orgs","repos_url":"https://api.github.com/users/mpickering/repos","events_url":"https://api.github.com/users/mpickering/events{/privacy}","received_events_url":"https://api.github.com/users/mpickering/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T10:00:40Z","updated_at":"2015-03-06T10:00:40Z","body":"So you suggest it would be best to extract any tags which are inside links to outside the link? This is not just specific to `sup`?"}}