英文:
Quarto extension installed but not found during render
问题
Environment: RStudio 2022.12.0+353, Ubuntu 22.04.2 LTS
我正在使用Quarto/RStudio撰写科学手稿。我刚刚使用以下命令安装了section-bibliographies filter作为扩展:quarto install extension pandoc-ext/section-bibliographies
,安装完成后显示“Extension installation complete”。我现在在项目目录中看到了_extensions子目录。我还按照section-bibliographies/README中的说明更新了YAML配置文件:
---
filters:
- section-bibliographies
bibliography: refs.bib
reference-section-title: References
citeproc: false
---
然而,当我渲染.qmd文件时,出现错误:“Error running filter section-bibliographies: Could not find executable section-bibliographies”。在添加section-bibliographies filter之前,文档渲染时没有任何错误。在解决此问题时,我安装了最新版本的Quarto,但并未解决此问题。您有任何关于问题可能出在哪里的想法吗?
英文:
Environment: RStudio 2022.12.0+353, Ubuntu 22.04.2 LTS
I am writing a scientific manuscript using Quarto/RStudio. I just installed the section-bibliographies filter as an extension using quarto install extension pandoc-ext/section-bibliographies
which concluded with "Extension installation complete". I now see the _extensions subdirectory in the project directory. I also updated the YAML as described in the section-bibliographies/README:
---
filters:
- section-bibliographies
bibliography: refs.bib
reference-section-title: References
citeproc: false
---
However, when I render the .qmd file, it errors with "Error running filter section-bibliographies: Could not find executable section-bibliographies". Before adding the section-bibliographies filter, the document rendered without any errors. In troubleshooting this, I installed the latest version of Quarto, but that did not fix the issue. Any ideas what the problem might be?
答案1
得分: 1
根据@tarleb的建议,我将完整的筛选器路径(从项目目录)添加到了YAML中。在渲染过程中,出现了以下错误:
>"运行筛选器_extensions/pandoc-ext/section-bibliographies/section-bibliographies.lua时出错:无法打开_extensions/pandoc-ext/section-bibliographies/section-bibliographies.lua:没有这样的文件或目录"。
然后,我提供了完整的筛选器路径(即从我的计算机的顶级目录),这允许渲染无错误。然而,我还必须从YAML中删除citeproc: false
,以便引用能够格式化,并在每个H1部分的末尾显示参考文献。唯一剩下的问题是,除了在每个H1部分的末尾的参考文献外,还有一个包含所有参考文献的部分在渲染文档的末尾。最后,为了完整起见,在后台作业窗口中,渲染步骤还会为每个图表产生警告,例如:
>"[警告] Citeproc: 未找到引用fig-lineplot"。
尽管如此,图表和图表引用都被按预期格式化。
英文:
Following the suggestion made by @tarleb, I added the full filter path (from the project directory) to the YAML. During rendering, that produced the following error:
>"Error running filter _extensions/pandoc-ext/section-bibliographies/section-bibliographies.lua:
cannot open _extensions/pandoc-ext/section-bibliographies/section-bibliographies.lua: No such file or directory".
I then provided the full filter path (i.e., from my computer's top-level directory) and that allowed rendering without errors. However, I also had to remove citeproc: false
from the YAML for the citations to be formatted and for the references to be displayed at the end of each H1 section. The only remaining glitch is that, in addition to references at the end of each H1 section, there is another section at the end of the rendered document containing all references. Finally, for completeness, in the Background Jobs window the rendering step also produces warnings for each figure, for example:
>"[WARNING] Citeproc: citation fig-lineplot not found".
Despite this, the figures and figure citations are formatted as expected.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论