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:



    \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

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: |

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: |


header-includes: |

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 :/

  • 1
    well pandoc isn't really on-topic here. We can tell you how to create a suitable tex document (but you seem to have found already some), but how to get pandoc to create such a tex from a markdown should better be asked in a pandoc forum or mailing list. Jan 18, 2023 at 10:40
  • I've tried, believe me :( The previous question was solved even if it was pandoc-related, so I had hopes this one could be answered as well and help other users in my situation. I know this is a TeX-focused Q&A site, but the "pandoc" tag is somewhat popular. But I understand your point, trust me. Thanks!
    – javipas
    Jan 18, 2023 at 11:06
  • 1
    in your previous question you got the quite sound advice to "preferably focussing on the latex part only (i.e. leave out pandoc),". In the current state your question is a rather bad mix as it is unclear where your problem actually is. So at first try to get working tex code, and then tackle the pandoc question. Jan 18, 2023 at 11:21
  • Ulrike, I really understand and I've tried to be sincere and completely honest explaining the situation. 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, 2023 at 11:31
  • well if you don't want or can split your question I'm out. It would be rather trivial for me to provide or correct the tex side, but I don't have the time to fight with the pandoc side which I don't use. Jan 18, 2023 at 12:35

1 Answer 1


The memoir class (a superset of book) provides for a variety of endnotes at the end of the document or after each chapter. Read section 12.6 Endnotes in the manual for details (texdoc memoir).

  • I've tried to use that. I've created a template.tex file with "\documentclass{memoir}" and I've included "\userpackage{enotez}" (endnotes hasn't been updated lately, it seems) and then "\let\footnote=\endnote" to make footnotes behave like endnotes. I then try to apply that template to convert my test.md (with several footnotes) to test.pdf and the numbers appear on the text as superindexes, but the endnotes don't. I don't know how to "convert" Markdown footnotes/endnotes through pandoc.
    – javipas
    Jan 18, 2023 at 20:04
  • Please provide an MWE that we can compile that shows what you have done. Have you followed memoir's code for endnotes? Jan 25, 2023 at 18:44
  • I tried, but as I said, the idea here is to write an essay, not "code" it, which is what I feel on my light testing with LaTeX editors. The idea was to write in markdown and convert it to PDF with pandoc, but I'm taking another route now.
    – javipas
    Jan 27, 2023 at 7:00
  • This site has little to do with markdown or pandoc. Glad you are going elsewhere. --- GOM Jan 28, 2023 at 18:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .