quarto-dev / quarto-dev/quarto-cli

Rendering to GFM does not use linked literature citations

Open
#9,601 7 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since May 7, 2024.

bibliography bug crossref pandoc
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When rendering a quarto document to Github flavoured markdown (GFM), the output does not use this linked GFM citation syntax:

ants are great, see [[1]](#1)

## Table of references

<a id="1">[1]</a>  A. Ant, "A Book About Ants", 2021

instead it uses

ants are great, see A. Ant (2021).

## Table of references

<div id="refs" class="references csl-bib-body" entry-spacing="0">

<div id="ref-ants" class="csl-entry">

<span class="csl-left-margin">\[1\]
</span><span class="csl-right-inline">A. Ant, “A Book About Ants” 2021.</span>

</div>

I see the following issues with it:

  • it is not layouted properly when rendered into github pages
  • it does not make use of the div IDs that are defined (no links from the citations in the text)

Am I missing a setting? Or is it the expected behaviour?
Or is this citation linking only github pages specific and not a gfm feature?

Steps to reproduce
---
title: "Ants"
author: 
    name: "Anty McAnt"
bibliography: ./literature.bib
format:
    gfm:
        html-math-method: plain
        number-sections: false
        toc: false
---

ants are great, see @ant2021.

and render to gfm.

Expected behavior
ants are great, see [[1]](#1)

## Table of references

<a id="1">[1]</a>  A. Ant, "A Book About Ants", 2021
Actual behavior

No response

Your environment

IDE: VSCode 1.88.1
OS: Win10

Quarto check output

Quarto 1.5.31
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.13: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.5.31
Path: C:\Users\mfranke\AppData\Local\Programs\Quarto\bin
CodePage: 1252

[>] Checking tools....................OK
TinyTeX: v2024.01
Chromium: (not installed)

[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\mfranke\AppData\Roaming\TinyTeX\bin\windows
Version: 2023

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
Version: 3.10.11
Path: d:/User/mfranke/documents/projects/colib/.venv/Scripts/python.exe
Jupyter: 5.7.1
Kernels: python3, .venv, py_venv, venv

() Checking Jupyter engine render....Traceback (most recent call last):
File "C:\Users\mfranke\AppData\Local\Programs\Quarto\share\jupyter\jupyter.py", line 21, in
from notebook import notebook_execute, RestartKernel
File "C:\Users\mfranke\AppData\Local\Programs\Quarto\share\jupyter\notebook.py", line 15, in
from yaml import safe_load as parse_string
ModuleNotFoundError: No module named 'yaml'
There is an unactivated Python environment in .venv. Did you forget to activate it?

[>] Checking Jupyter engine render....OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.