From fb921af4667b6d057e5dbca542432e40bc5bb8f1 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 29 Mar 2021 16:16:02 +0200 Subject: [PATCH] =?UTF-8?q?PDF=E2=86=92EPUB:=20Remove=20role=3D"doc-footno?= =?UTF-8?q?te",=20recommend=20EPUBCheck.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “[…] when you add a role to an element you change its nature to assistive technologies. So because doc-footnote isn't a list item role, it would strip the li tag of its list item nature and turn it into something more like a div or a p tag. That breaks the list semantics for AT users, so they'd no longer be able to access the list as though it were a list.” --- content/posts/how-i-convert-pdfs-to-epub.adoc | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/content/posts/how-i-convert-pdfs-to-epub.adoc b/content/posts/how-i-convert-pdfs-to-epub.adoc index 44648a4..c85be81 100644 --- a/content/posts/how-i-convert-pdfs-to-epub.adoc +++ b/content/posts/how-i-convert-pdfs-to-epub.adoc @@ -25,6 +25,8 @@ toc: true :url-epub-spec: https://www.w3.org/publishing/epub/epub-contentdocs.html :url-ap-semantics: https://www.accessiblepublishing.ca/epub-semantic-aria-roles/ :url-epub3-rendering: http://idpf.org/forum/topic-623 +:url-epubcheck: https://github.com/w3c/epubcheck +:url-epubcheck-footnote: {url-epubcheck}/issues/1018#issuecomment-809385963 :wp-pdf: https://en.wikipedia.org/wiki/PDF :wp-epub: https://en.wikipedia.org/wiki/EPUB :wp-xhtml: https://en.wikipedia.org/wiki/XHTML @@ -204,15 +206,14 @@ Once you are done, copy the result into Calibre. Use the method from above to copy the footnotes into the now empty Emacs buffer and clean them up until you have 1 paragraph per line. Footnotes need to be hyperlink-able, so we can't just wrap them in plain `

` tags, they need IDs. I -like to use `

  • […]
  • ` if -the footnote numbers are increasing throughout the book or `
  • […]
  • ` if they start with -1 in each chapter. We are going to use a macro with a counter to generate -consecutively numbered IDs. First, set the counter to 1 with kbd:[C-x] kbd:[C-k] -kbd:[C-c] `1`. Then, record this macro: +like to use `
  • […]
  • ` if the footnote numbers +are increasing throughout the book or `
  • […]
  • ` if they start with 1 in each chapter. We are going to use a +macro with a counter to generate consecutively numbered IDs. First, set the +counter to 1 with kbd:[C-x] kbd:[C-k] kbd:[C-c] `1`. Then, record this macro: -`
  • ` kbd:[] `
  • ` kbd:[] kbd:[] kbd:[] +`
  • ` +kbd:[] `
  • ` kbd:[] kbd:[] kbd:[] [TIP] Use kbd:[M-x] `describe-key` (mapped to kbd:[C-h] kbd:[k] by default) to find @@ -252,6 +253,8 @@ copyright page, beginning of text and so on. Select menu:Tools[Check book] and fix the errors. +Use link:{url-epubcheck}[EPUBCheck] for a more thorough check. + You're done! Enjoy your cleanly formatted book. 😊 == Updates @@ -265,5 +268,8 @@ You're done! Enjoy your cleanly formatted book. 😊 `