0

I'm trying to write a scientific paper in mardown and would like to add a citation. Here's my markdown:

---
title: Test test
author: Jake Sarjeant
documentclass: report
header-includes: |
    \usepackage[a4paper]{geometry}
    \usepackage{tipa}
    \usepackage{graphicx}
    \usepackage{hyperref}
    \usepackage{amsfonts}
    \usepackage[ruled,boxed]{algorithm2e}
    \usepackage{algpseudocode}
    \usepackage{listings}
    \usepackage{amssymb}
    \usepackage{tcolorbox}
    \usepackage{amsmath}
---

\tableofcontents

\newpage

Bla bla bla [@citation]

My biblio.bib file:

@misc{citation,
    Author =       {someone},
    Title =        {title},
    Year =         2021,
    Month =        {Jan},
    URL =          {https://google.com}
}

My pandoc command:

pandoc --citeproc --bibliography=biblio.bib -s paper.md -o generated/paper.pdf

It works just fine, but my citation is expanded in-line:

picture

What I want is this:

Bla bla [1]

And a bibliography section at the end.

Can anyone help?

2 Answers 2

1

I figured it out:

The reason the citation appeared to be in-line was because it was at the end of the file. By adding another heading "Citations" at the end, the problem disappeared:

---
title: Test test
author: Jake Sarjeant
documentclass: report
header-includes: |
    \usepackage[a4paper]{geometry}
    \usepackage{tipa}
    \usepackage{graphicx}
    \usepackage{hyperref}
    \usepackage{amsfonts}
    \usepackage[ruled,boxed]{algorithm2e}
    \usepackage{algpseudocode}
    \usepackage{listings}
    \usepackage{amssymb}
    \usepackage{tcolorbox}
    \usepackage{amsmath}
---

\tableofcontents

\newpage

Bla bla bla [@citation]

# Works Cited

<!-- Pandoc automatically inserts citations here ->
0

For completeness sake and because it's too long for a comment:

By default references are added at the very of the document, but the placement can also be controlled with:

::: {#refs}
:::

This is documented in the manual: https://pandoc.org/MANUAL.html#placement-of-the-bibliography

You must log in to answer this question.

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