diff --git a/content/posts/how-i-convert-pdfs-to-epub.adoc b/content/posts/how-i-convert-pdfs-to-epub.adoc index 4c086c7..252c6b0 100644 --- a/content/posts/how-i-convert-pdfs-to-epub.adoc +++ b/content/posts/how-i-convert-pdfs-to-epub.adoc @@ -160,7 +160,7 @@ next paragraph and repeat… Now you should have a text file with 1 paragraph per line. We need to wrap all lines in `

` tags, except block quotes and sub-headlines. Either use another -macro (`

kbd:[]

kbd:[] kbd:[] kbd:[]`) or this +macro (`

` kbd:[] `

` kbd:[] kbd:[] kbd:[]) or this elisp function: [source,elisp] @@ -184,15 +184,15 @@ hyperlink-able, so we can't just wrap them in plain `

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

[…]

` if there is only one footnote-section or `1

[…]

` for chapter-footnotes. 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: +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:[C-x] kbd:[C-k] kbd:[] kbd:[C-u] -1 kbd:[C-x] kbd:[C-k] -kbd:[C-a]

kbd:[]

-kbd:[] kbd:[] kbd:[]` +`` kbd:[C-x] kbd:[C-k] kbd:[] kbd:[C-u] `-1` kbd:[C-x] kbd:[C-k] +kbd:[C-a] `

` kbd:[] +`

` kbd:[] kbd:[] kbd:[] [NOTE] -`kbd:[C-u] -1 kbd:[C-x] kbd:[C-k] kbd:[C-a]` “adds” -1 to the counter, so that +kbd:[C-u] `-1` kbd:[C-x] kbd:[C-k] kbd:[C-a] “adds” -1 to the counter, so that we can use the same number again. Call the macro until every footnote is wrapped and copy them to Calibre.