Description
Linux POP!_OS 22.04
pandoc 3.1.2
Calibre 6.14
When an epub is created from pandoc markdown files using the --file-scope option, the output epub is not broken up into multiple files, even with the use of the --split-level option, and the generated TOC expects a multiple file epub.
For the demonstration epub outputs change the .zip extention to .epub, because GitHub doesn't allow uploading .epub.
Test1:
pandoc -f markdown -t epub --file-scope --metadata-file metadata.md -o file-scope-test.epub test1.md test2.md
output:
file-scope-test.zip
screenshot selecting a chapter:
The output epub is not split into multiple files according to the default behavior of splitting at level 1 headings, and the footnotes are formatted in the manner of a single file epub.
Test2:
pandoc -f markdown -t epub --file-scope --split-level=1 --metadata-file metadata.md -o file-scope-test_split-level.epub test1.md test2.md
output:
file-scope-test_split-level.zip
screenshot selecting a chapter:
The output epub is not split into multiple files when explicitly instructed split at level 1 headings, and the footnotes are formatted in the manner of a single file epub.
Test3:
This test is to show that pandoc behaves as expected when the --file-scope option is not used.
pandoc -f markdown -t epub --metadata-file metadata.md -o file-scope-test_no-file-scope.epub test1.md test2.md
output:
[WARNING] Duplicate note reference '1' at test2.md line 7 column 1
[WARNING] Duplicate note reference '2' at test2.md line 9 column 1
file-scope-test_no-file-scope.zip
screenshot selecting a chapter:
The output epub is split into multiple files according to the default behavior of splitting at level 1 headings, and there are conflicting footnotes (as expected).