目前,我正试图通过rstudio平台从rmarkdown迁移到quarto。第一步,我想创建一篇基于elsevier模板的科学文章,可以找到文本。然而,我没有复制它。当我试图渲染template.qmd时,突然出现了一个警告标志ERROR: No valid input files passed to render。
我看过这种格式,奇怪的是,如果我给它加上一条附加线,它就能起作用。
原始代码(不起作用):
---
title: Short Paper
author:
- name: Alice Anonymous
email: alice@example.com
affiliations:
- id: some-tech
name: Some Institute of Technology
department: Department Name
address: Street Address
city: City
state: State
postal-code: Postal Code
attributes:
corresponding: true
note: This is the first author footnote.
- name: Bob Security
email: bob@example.com
affiliations:
- id: another-u
name: Another University
department: Department Name
address: Street Address
city: City
state: State
postal-code: Postal Code
note: |
Another author footnote, this is a very long footnote and it should be a really long footnote. But this footnote is not yet sufficiently long enough to make two lines of footnote text.
- name: Cat Memes
email: cat@example.com
affiliations:
- ref: another-u
note: Yet another author footnote.
- name: Derek Zoolander
email: derek@example.com
affilations:
- ref: some-tech
abstract: |
This is the abstract. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum augue turpis, dictum non malesuada a, volutpat eget velit. Nam placerat turpis purus, eu tristique ex tincidunt et. Mauris sed augue eget turpis ultrices tincidunt. Sed et mi in leo porta egestas. Aliquam non laoreet velit. Nunc quis ex vitae eros aliquet auctor nec ac libero. Duis laoreet sapien eu mi luctus, in bibendum leo molestie. Sed hendrerit diam diam, ac dapibus nisl volutpat vitae. Aliquam bibendum varius libero, eu efficitur justo rutrum at. Sed at tempus elit.
keywords:
- keyword1
- keyword2
#journal: "An awesome journal"
date: last-modified
# bibliography: bibliography.bib
format:
elsevier-pdf:
keep-tex: true
journal:
formatting: preprint
model: 3p
cite-style: authoryear 固定代码(有效但.)
---
title: Short Paper
format:
pdf: default
elsevier-pdf:
keep-tex: true
---通过在pdf: default之前添加elsevier-pdf,代码起作用了,但我也在每个作者之后丢失了所有脚注和上标代码。有什么解决办法吗?
发布于 2022-08-03 08:48:35
这就是对我有用的东西:
quarto use template quarto-journals/elsevier

并使用quarto1.qmd打开RStudio文件并呈现它。或者,您可以尝试运行quarto install extension quarto-journals/elsevier来安装扩展。
https://stackoverflow.com/questions/73216317
复制相似问题