mdedit.io
Markdown citation guide

How to add citations and a bibliography in Markdown

A citation needs two things: a key in your text and a matching source record. Use this small example to connect them in mdedit, inspect the preview, and check the exported PDF or Word file.

1. Copy a complete, minimal citation example

Open a new document and paste everything below, including the YAML header and fenced bibliography block. The source is fictional and exists only to demonstrate matching IDs.

---
title: "A short research note"
citation-source: embedded
reference-section-title: References
link-citations: true
---

# A small observation

This sentence cites a fictional demonstration source [@demo2026].

```mdedit-bibliography
[
  {
    "id": "demo2026",
    "type": "book",
    "title": "A Fictional Research Handbook",
    "author": [{"family": "Example", "given": "Alex"}],
    "issued": {"date-parts": [[2026]]},
    "publisher": "Example Press"
  }
]
```

The key demo2026 must match in both places. The bibliography title is set by reference-section-title; do not add a second manual list of the same reference.

2. Use BibTeX when that is your source format

Replace the JSON inside the same mdedit-bibliography fence with the following BibTeX record. Use one representation of the record, not both. The citation in the paragraph stays [@demo2026].

@book{demo2026,
  author = {Example, Alex},
  title = {A Fictional Research Handbook},
  year = {2026},
  publisher = {Example Press}
}

Embedded records travel with your Markdown source. A path such as bibliography: references.bib does not upload a file from your computer to the hosted editor. Use the embedded block and see scientific document settings for the supported workflow.

3. Check the citation before sharing

  1. Confirm that the preview resolves the key instead of showing a raw @demo2026 marker.
  2. Export PDF and DOCX. Open both files and find the author, title and year in the references.
  3. Check in-text citations against the required style. A correctly resolved key is not proof that the style meets your institution's rules.
  4. Replace the fictional record with a source you have actually read. Verify its metadata and whether it supports the sentence.

For a larger document, follow the chapter-by-chapter thesis review workflow. For page breaks and output checks, use the PDF export guide.

Why is my citation not rendering?

The key is still visible

Compare spelling and case of the citation and record ID. Check that the YAML header includes citation-source: embedded and that the fence is named mdedit-bibliography.

The bibliography cannot be read

For JSON, check quotes, commas and closing brackets. For BibTeX, check braces. Start with the example above, then add one record at a time to isolate the failing entry.

The style or numbering is unexpected

Source data and formatting style are separate. Compare a short export with your required style before migrating a full thesis. Do not repair each citation manually in an exported file while leaving the source unchanged.

Word feedback needs to return to Markdown

Reviewers can comment in Word. Apply agreed changes to your Markdown source manually; automatic import of comments or tracked changes is not part of this workflow.

Choose the next step

Start and save your first document · Plan a thesis review · Operate your own instance

The hosted editor is a beta and processes documents on the server. Keep your Markdown source backed up and check each final export. Updated 1 November 2026.