rrstudiojournalquarto

Fail to replicate quarto elsevier template


I am currently trying to migrate from rmarkdown to quarto through rstudio platform. First step, I would like to create a scientific article based on elsevier template which could be found Text. However, I failed to replicate it. When I tried to render the template.qmd there was a sudden warning sign ERROR: No valid input files passed to render.

I've looked at the format, strangely if I add an additonal line to it, it worked somehow.

Original code (NOT WORKING):

---
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  

Fixed code (WORKING but...)

---
title: Short Paper

format:
  pdf: default
  elsevier-pdf:
    keep-tex: true
---

by adding pdf: default before elsevier-pdf, the code worked, but I also lost all the footnotes and superscript code after each author. Is there any workaround on this?


Solution

  • This is what worked for me:

    1. Make sure your RStudio version is up to date (see https://quarto.org/docs/get-started/) and make sure required packages are installed.

    2. Install quarto on your system (in my case: https://docs.rstudio.com/resources/install-quarto/#quarto-tar-file-install).

    3. On the command line run quarto use template quarto-journals/elsevier:

    and open the quarto1.qmd file with RStudio and render it. Alternatively, you could try to run quarto install extension quarto-journals/elsevier to install the extension.