I have a folder structure like the following:
chapters/ 01-chapter.md 02-chapter.md 03-chapter.md format.sh parse.sh
pandoc -t html5+smart -so dist/book.html --html-q-tags chapters/*.md
for f in chapters/*.md; do pandoc "$f" -o "$f" -t \ markdown+smart+footnotes-escaped_line_breaks+example_lists \ --columns=80; done
My idea was basically to use Pandoc not only as converter but also as formatter - this worked pretty well until I began to use footnotes:
When I run format.sh every reference name I use for my footnotes get overwritten by a number - which would be fine, but the problem is if I than run parse.sh I get the following message:
[WARNING] Duplicate note reference '1' at line 360 column 1
The problem is
02-chapter.md have both a footnote
[^1]. Basically I would like Pandoc to handle the footnotes for each file separately and not allow cross-referencing across my markdown files but I can't see any way to do this.
Anyone any ideas?