[英]How to add URL access date in Quarto pdf references
I am trying to add a last accessed field to web references in a Quarto PDF. Here is a minimal example of a qmd
file:我正在尝试将上次访问的字段添加到 Quarto PDF 中的 web 引用。这是一个qmd
文件的最小示例:
---
title: "How to cite a URL with access date"
format: pdf
bibliography: references.bib
---
I am using @stackoverflow1, @stackoverflow2 and @stackoverflow3.
# References
::: {#refs}
:::
This is references.bib
:这是references.bib
:
@online{stackoverflow1,
title = {Stack Overflow with note},
url = {https://stackoverflow.com/},
year = {2022},
note = {https://stackoverflow.com/, last accessed on 2022-12-30}
}
@online{stackoverflow2,
title = {Stack Overflow with urldate},
url = {https://stackoverflow.com/},
year = 2022,
urldate = {2022-12-30}
}
@online{stackoverflow3,
title = {Stack Overflow with accessed},
url = {https://stackoverflow.com/},
year = {2022},
accessed = {2022-12-30}
}
The output is, output 是,
As you can see, the note
, urldate
and accessed
fields are all ignored.如您所见, note
、 urldate
和accessed
字段都被忽略了。 I have tried using different csl
files, eg APA and Harvard Educational Review .我曾尝试使用不同的csl
文件,例如APA和Harvard Educational Review 。 I have also tried the instructions for doing this in Latex in this and this post.我还在这篇文章和这篇文章中尝试了 Latex 中的说明。 I have also changed @misc
to @online
.我还将@misc
更改为@online
。 None of these seem to make any difference.这些似乎都没有任何区别。
How do you add a date accessed field to a Quarto PDF reference?如何将日期访问字段添加到 Quarto PDF 参考?
References参考
"Stack Overflow", 2022, https://stackoverflow.com/ , last accessed on 2022-12-30 “Stack Overflow”,2022 年, https://stackoverflow.com/ ,最后访问时间为 2022-12-30
When used with CSL, then urldate
is the correct way to add the access date to a reference.当与 CSL 一起使用时, urldate
是将访问日期添加到引用的正确方法。 The used citation style must support that information, or otherwise it won't be shown.使用的引用样式必须支持该信息,否则将不会显示。 You can go to the citation style repository and search for "accessed"
(which is the key used by CSL for this information).您可以通过 go 访问引用样式存储库并搜索"accessed"
(这是 CSL 用于此信息的密钥)。 This will bring up all styles that include this info in the entry.这将显示条目中包含此信息的所有 styles。
https://github.com/citation-style-language/styles/search?q=accessed https://github.com/citation-style-language/styles/search?q=accessed
Such styles are commonly called "author date styles", so we could also search for those in the Zotero database .这样的styles就是俗称的“author date styles”,所以我们也可以在Zotero数据库中搜索一下。 To use a style, download it and pass it via the csl
metadata key.要使用样式,请下载它并通过csl
元数据密钥传递它。
You need to tell Quarto to use biblatex
using cite-method
yaml option.您需要使用cite-method
yaml 选项告诉 Quarto 使用biblatex
。
---
title: "How to cite a URL with access date"
format: pdf
bibliography: references.bib
cite-method: biblatex
---
I am using @stackoverflow1, @stackoverflow2 and @stackoverflow3.
# References
::: {#refs}
:::
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.