Skip to content

Commit 985346a

Browse files
committed
Add a test for when cite-method is correctly taken into account
When `cite-method` is set in YAML, its value is only considered when references will be used either by `bibliography` or `references` in YAML header
1 parent 52271d9 commit 985346a

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function Pandoc(doc)
2+
assert(quarto.doc.pdf_engine() == "xelatex", "`quarto.doc.pdf_engine()` should be xelatex but is instead: " .. quarto.doc.pdf_engine())
3+
assert(quarto.doc.cite_method() == "natbib", "`quarto.doc.cite_method()` should return natbib but return instead: " .. (quarto.doc.cite_method() or 'unset'))
4+
return doc
5+
end
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: testing Lua API value for latex
3+
format:
4+
latex:
5+
pdf-engine: xelatex
6+
cite-method: natbib
7+
references:
8+
- type: article-journal
9+
id: WatsonCrick1953
10+
author:
11+
- family: Watson
12+
given: J. D.
13+
- family: Crick
14+
given: F. H. C.
15+
issued:
16+
date-parts:
17+
- - 1953
18+
- 4
19+
- 25
20+
title: 'Molecular structure of nucleic acids: a structure for
21+
deoxyribose nucleic acid'
22+
title-short: Molecular structure of nucleic acids
23+
container-title: Nature
24+
volume: 171
25+
issue: 4356
26+
page: 737-738
27+
DOI: 10.1038/171737a0
28+
URL: https://www.nature.com/articles/171737a0
29+
language: en-GB
30+
filters:
31+
- 12299-1.lua
32+
---
33+
34+

0 commit comments

Comments
 (0)