PDF→EPUB: Visually clarify macros.
Only wrap the text that the user is supposed to enter in <code>-tags. Before it was easy to misinterpret and enter extra spaces.
This commit is contained in:
parent
3574b902d8
commit
255408907b
|
@ -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 `<p>` tags, except block quotes and sub-headlines. Either use another
|
||||
macro (`<p> kbd:[<end>] </p> kbd:[<down>] kbd:[<down>] kbd:[<home>]`) or this
|
||||
macro (`<p>` kbd:[<end>] `</p>` kbd:[<down>] kbd:[<down>] kbd:[<home>]) or this
|
||||
elisp function:
|
||||
|
||||
[source,elisp]
|
||||
|
@ -184,15 +184,15 @@ hyperlink-able, so we can't just wrap them in plain `<p>` tags, they need IDs. I
|
|||
like to use `<span>1</span><p id="fn1">[…]</p>` if there is only one
|
||||
footnote-section or `<span>1</span><p id="fn1_1">[…]</p>` 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:
|
||||
|
||||
`<span> kbd:[C-x] kbd:[C-k] kbd:[<tab>] kbd:[C-u] -1 kbd:[C-x] kbd:[C-k]
|
||||
kbd:[C-a] </span><p id="fn kbd:[C-x] kbd:[C-k] kbd:[<tab>] "> kbd:[<end>] </p>
|
||||
kbd:[<down>] kbd:[<down>] kbd:[<home>]`
|
||||
`<span>` kbd:[C-x] kbd:[C-k] kbd:[<tab>] kbd:[C-u] `-1` kbd:[C-x] kbd:[C-k]
|
||||
kbd:[C-a] `</span><p id="fn` kbd:[C-x] kbd:[C-k] kbd:[<tab>] `">` kbd:[<end>]
|
||||
`</p>` kbd:[<down>] kbd:[<down>] kbd:[<home>]
|
||||
|
||||
[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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user