无法复制四开爱唯尔模板

Bra*_*tno 5 r journal rstudio quarto

我目前正在尝试通过 rstudio 平台从 rmarkdown 迁移到 quarto。第一步,我想基于 elsevier 模板创建一篇科学文章,可以在Text中找到。然而我却未能复制它。当我尝试渲染时,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  
Run Code Online (Sandbox Code Playgroud)

固定代码(正在运行,但是...)

---
title: Short Paper

format:
  pdf: default
  elsevier-pdf:
    keep-tex: true
---
Run Code Online (Sandbox Code Playgroud)

通过添加pdf: defaultbefore elsevier-pdf,代码可以工作,但我也丢失了每个作者之后的所有脚注和上标代码。这有什么解决方法吗?

use*_*748 4

这对我有用:

  1. 确保您的 RStudio 版本是最新的(请参阅https://quarto.org/docs/get-started/)并确保安装了所需的软件包。

  2. 在您的系统上安装 quarto (在我的例子中:https://docs.rstudio.com/resources/install-quarto/#quarto-tar-file-install)。

  3. 在命令行上运行quarto use template quarto-journals/elsevier

并使用 RStudio 打开quarto1.qmd文件并渲染它。或者,您可以尝试运行quarto install extension quarto-journals/elsevier来安装扩展。