Citation help needed from academics using markdown

I’m needing help from academics who have experience using markdown for citations.

I am writing a book in markdown and using Bookends as my reference manager (I also have Zotero). I know how to insert the needed citations in a markdown document (I typically use APA 7th Edition). However, for this book I want to create an endnote reference (not a footnote) that when the document is exported to Word I can can turn the citations into endnotes, not footnotes.

For example, here is what I have in one of the passages in the book:

In The Culture Code, {1992, #258563} Rapaille points out that when we ask someone what he or she does for a living, we are essentially asking who he or she is.

The problem is that I actually need this to be cited as a reference that will be generated as an endnote. If I use (fn) I get a footnote at the end of each page, which is not what I want.

How do I cite using markdown so that the result is a superscript number at the citation point that then generates as a corresponding reference in a list of endnotes? I want it to look and behave like this:

In the markdown document:
In The Culture Code Rapaille points out that when we ask someone what he or she does for a living, we are essentially asking who he or she is. (fn)

In the Word formatted document:
In The Culture Code Rapaille points out that when we ask someone what he or she does for a living, we are essentially asking who he or she is.1

At the end of the Word document once the references have been generated:

Endnotes

  1. Rapaille, C. (1992). The culture code: An ingenious way to understand why people around the world buy and live as they do. ASQ Quality Press.

I hope that makes sense!

1 Like

Probably pandoc citations.
You’re using pandoc?

In The Culture Code Rapaille points out that when we ask someone what he or she does for a living, we are essentially asking who he or she is [@Rapaille1992Culture].

Then you have a .bib file that has all your refs in it. Bookends can create this for you.

Pandoc uses Citation Style Language (CSL) to format the in-text citations, meaning just by changing the selected CSL, you can change from superscript numeric refs to (Author, year), to [1], etc. There are several thousand styles available.

You’ll need some yaml at the beginning of your document (or in a separate file) to tell pandoc what to do.

So my writing in Scrivener looks like:

Rejection rates vary by study, with rejection rates of 16% to 66% for body-powered prostheses, and 23% for myoelectric prostheses [@Bhaskaranand2003Prosthetic; @Kruger1993Myoelectric; @Biddiss2007Upperlimb; @McFarland2010Unilateral].

and when converted to Word by pandoc it looks like:

Rejection rates vary by study, with rates of 16% to 66% for body-powered prostheses, and 23% for myoelectric prostheses (Kruger and Fishman 1993; Bhaskaranand et al. 2003; Biddiss and Chau 2007a; McFarland et al. 2010).

And the bib at the end:

Kruger LM, Fishman S (1993) Myoelectric and Body-Powered Prostheses: J of Pediatr Orthop 13:68–75. \https://doi.org/10.1097/01241398-199301000-00014\

(without the slashes, of course.)

If you’re using Marked2, I would suspect it is very similar to pandoc in its function.

More info:

Citation syntax:
https://pandoc.org/MANUAL.html#citation-syntax

More about citations:
https://pandoc.org/MANUAL.html#citations

3 Likes

To sum up and add to @JohnAtl’s post:

  1. This assumes you’re using Pandoc for conversion.
  2. Use a CSL file to style citations. You can get these from here, just search for a style that supports endnotes. Save this somewhere close to your Markdown document.
  3. Export your citations from your citation manager as a .bib (BibTex) file. Save this somewhere close to your Markdown document. Your citation manager might also support syncing to an external .bib file but I would suggest setting that up after you’ve got the rest of this working first.
  4. Add a YAML block to the top of your Markdown document:
--- 
## Outline 
author: "Your Name"
date: 2022-01-16
bibliography: path/to/bib/file
citation-style: path/to/csl/file
...

# Rest of your markdown document below
  1. Your pandoc command should look something like this:
	pandoc -r markdown+yaml_metadata_block --citeproc draft.md -o draft.docx

Would suggest saving this somewhere so you don’t need to type it over and over again, like a script or something.
6) Running the command should produce the result you want, assuming your citation style (specified by the CSL file you downloaded) supports endnotes!

Hopefully this is helpful and not just too long :joy:

4 Likes

@Bmosbacker, I suggest that you head over to Pandoc’s Manual and familiarize yourself with it. It is complete and clear. Do it sooner rather than later, and you will save yourself a lot of headaches.

However, it is possible he is not running pandoc directly from the terminal (I recall you were running pandoc from an Obsidian plugin, @Bmosbacker?) and therefore much of the information in the manual will be of no use and might even cause some confusion.

That said, it is still a good suggestion :slight_smile:

I am running it in Obsidian. I appreciate the help for advice but the truth is, it appears above my technical paygrade. I’ll have to figure out a workaround. That said, I really do appreciate all the feedback everyone provided. :pray:

Understandable. You might also want to check this out, not sure if it will be any more helpful.

Have you tried scanning the document with Bookends to convert the citations?
Been a while, but it might generate a list of references too.

You may want to explore the environment shared here: Setting Up a Scholarly Writing Environment With Markdown, VSCodium and pandoc.

1 Like

Thanks, I’ll check it out!