我正在使用狮子座,yaml和pandoc创建一个pdf。为此,我的工作流程如下所示:
而且工作得很好。问题是,我想告诉pandoc包括所有的书目项目,无论它们是在标价文本中使用[@reference]引用,还是只是在嵌入式yaml块中收集以供参考。这是可能的吗?,如果没有,有什么方法可以让pandoc做这样的事情呢?
PS:我在pandoc的标记中使用了-@reference技巧,试图在导出的目录中添加非明确的参考书目,但是我在导出的pdf中有一年的括号,正如人们所预期的那样,所以这不是一条路。
发布于 2016-04-08 15:58:25
pandoc的自述1给出了解决方案。您需要定义一个虚拟的nocite元数据字段,并将引用放在那里:
# References
The bibliography will be inserted after this header. Note that
the `unnumbered` class will be added to this header, so that the
section will not be numbered.
If you want to include items in the bibliography without actually
citing them in the body text, you can define a dummy `nocite` metadata
field and put the citations there:
---
nocite: |
@item1, @item2
...
@item3
In this example, the document will contain a citation for `item3`
only, but the bibliography will contain entries for `item1`, `item2`, and
`item3`.发布于 2013-11-20 16:32:40
最后,我想在pandoc中添加一个语法,将引文标记为包含在参考书目中,而不将它们放在文本中。
但就目前而言,最好的选择是将所有引用都放在文本中,并修改CSL文件,这样就不会打印实际引用(仅仅是参考书目)。我无法给出如何去做的指导,但我听说过其他人也这么做过,所以我知道这是可能的。
https://stackoverflow.com/questions/20077939
复制相似问题