This comes as a sequel to my previous question. I'm writing an essay in Markdown. The idea is to use footnotes and list them at the end of the chapter. Right now they show up on the bottom on the page I use footnotes.
I'm new to this and I've read the recommendation to include a WWE. I'm sure it's not perfect, but this would be it:
\documentclass{book}
\usepackage{footnotebackref}
\counterwithin*{footnote}{chapter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\mainmatter
\chapter{chapter 1}
Hi there LaTeX lovers\footnote{this is footnote 1 in chapter 1}
...
Text and more text that goes over two or three pages
Let's go for another one\footnote{and second one in chapter 2}
...
Here I finish the chapter
\chapter{chapter 2}
Let's do this \footnote{footnote 1 in chapter 2}
...
Text again
...
And on a different page, another one \footnote{second in chapter 2}
...
More text and end of the chapter
\end{document}
So what I'd like is showing the first two footnotes of Chapter 1 at the end of that chapter (maybe with a little subtitle called "Notes") and the same for Chapter 2.
I haven't see any clear answer to this, but I wonder if the difference between footnotes and endnotes is precisely the location they appear in a document.
After the suggestion by DG', I at least was succesful on showing the footnotes that way. Im' actually writing the text in Markdown and I convert it with pandoc. I'm using this metadata:
---
documentclass: book
header-includes: |
\usepackage{footnotebackref}
\counterwithin*{footnote}{chapter}
---
And this pandoc command to convert the markdown file to a pdf one (the -N argument suggested by DG was also key):
pandoc test1.md test2.md metadata.yaml -N --output=test.pdf
But again, I'd like to show all the footnotes of the current chapter grouped together at the end of the chapter.
I've seen solutions (1, 2, 3) for a tex document, but this is a little to intimidating for me, and writing in a WYSIWYG interface (writing a tex documents feels a little bit like coding, it somehow breaks my concentration) is important for me.
I'm sure there must be a way to do this with pandoc. I've explored things like
pandoc --reference-links --reference-location=document -s input.md -o output.pdf
And also changing metadata with a couple of different options:
header-includes: |
\usepackage{endnotes}
\usepackage[bottom]{footmisc}
\let\footnote=\endnote
And
header-includes: |
\usepackage{endnotes,chngcntr}
\let\footnote=\endnote
\counterwithin{footnote}{chapter}
But again, no luck. I'm trying, trust me, but at the end I have to ask. It's incredible how this stupid thing is really making me stop actually writing the essay. So much people writing books and selfpublishing, and I haven't found any practical guides that gives current and future authors somekind of easy guide to solve this :/
There's no intention to bother the community, but there are other pandoc related questions answered on this StackExchange site. My goal is to write the essay in Markdown to publish in PDF/ePub, and this is, afaik, the most suitable site to find an answer to my problem. Sorry for the inconvenience.
– javipas Jan 18 '23 at 11:31