rstudio / rticles

LaTeX Journal Article Templates for R Markdown
https://pkgs.rstudio.com/rticles/
1.46k stars 516 forks source link

Modifying elsevier_article() template #485

Closed drfurtado closed 2 years ago

drfurtado commented 2 years ago

Hi @cboettig,

I am seeking to modify the elsevier_article() template.

Issue 1 I need to add information on the top left of the first page similar to this example.

Issue 2 When I render the PDF, the words "Preprint submitted" appear on the right bottom of the first page. How would I go about omitting those two words?

Any help is greatly appreciated.


By filing an issue to this repo, I promise that

I understand that my issue may be closed if I don't fulfill my promises.

cderv commented 2 years ago

Hello @drfurtado

Issue 1 I need to add information on the top left of the first page similar to this example.

Is this part of any elsevier tex template ?

Issue 2 When I render the PDF, the words "Preprint submitted" appear on the right bottom of the first page. How would I go about omitting those two words?

Do you have preprint among the classoption ? This is by default in our skeleton, but I think you would need to remove it. https://github.com/rstudio/rticles/blob/dc1733156ba79caf94a8151ee5b8fc0727cb76de/inst/rmarkdown/templates/elsevier/skeleton/skeleton.Rmd#L39

By the way, we are using template for CTAN package elsarticle https://ctan.org/pkg/elsarticle There is a documentation file to look into also if you need some help configuring

drfurtado commented 2 years ago

Hello @drfurtado

Issue 1 I need to add information on the top left of the first page similar to this example.

Is this part of any elsevier tex template ?

Issue 2 When I render the PDF, the words "Preprint submitted" appear on the right bottom of the first page. How would I go about omitting those two words?

Do you have preprint among the classoption ? This is by default in our skeleton, but I think you would need to remove it.

https://github.com/rstudio/rticles/blob/dc1733156ba79caf94a8151ee5b8fc0727cb76de/inst/rmarkdown/templates/elsevier/skeleton/skeleton.Rmd#L39

By the way, we are using template for CTAN package elsarticle https://ctan.org/pkg/elsarticle There is a documentation file to look into also if you need some help configuring

I did delete preprint but the word still appears on the rendered pdf. I even tried to add final but to no avail. I did look at the documentation file but could find a solution for this problem.

Below is the FM file I am using:

---
title: Short Paper
author:
  - name: Alice Anonymous
    email: alice@example.com
    affiliation: Some Institute of Technology
    correspondingauthor: true
    footnote: 1
  - name: Bob Security
    email: bob@example.com
    affiliation: Another University
  - name: Cat Memes
    email: cat@example.com
    affiliation: Another University
    footnote: 2
  - name: Derek Zoolander
    email: derek@example.com
    affiliation: Some Institute of Technology
    footnote: 2
address:
  - code: Some Institute of Technology
    address: Department, Street, City, State, Zip
  - code: Another University
    address: Department, Street, City, State, Zip
footnote:
  - code: 1
    text: "This is the first author footnote."
  - code: 2
    text: "Another author footnote."
abstract: |
  This is the abstract. sx sd s d sds ds d s dsd sdsdsdsdsdsd sd s d sd s ds d sd s d sd s d sd s d sd s d sd s d sd   s ds dsdsdsdsdsdsdsdsds d sd sd sdsdsdsds d sdsd sd s d sd  sd sd  sd s d sd s d sds ds d s dsdsdsdsdsd  sdsdsdsdsdsdsdsdsdsdsd sd sd s dnskdnskdn sk d sdn sd sd  ns d sd snd ks dkns d.

keywords: 
  - keyword1
  - keyword2
journal: "Journal of Kinesiology and Wellness"
date: "`r Sys.Date()`"
classoption: 5p, authoryear
bibliography: mybibfile.bib
linenumbers: false
numbersections: false
# Use a CSL with `citation_package = "default"`
# csl: https://www.zotero.org/styles/elsevier-harvard
output: 
  rticles::elsevier_article:
    keep_tex: true
    citation_package: natbib
---
cderv commented 2 years ago

the words "Preprint submitted" appear on the right

In fact, this comes from the template .cls that we have included with rticles: https://github.com/cderv/rticles/blob/c80b4835a724193df5e005d78128bc91a0a0a724/inst/rmarkdown/templates/elsevier/skeleton/elsarticle.cls#L1014

I did delete preprint but the word still appears on the rendered pdf.

This is not something I found in the PDF doc but by reading the .cls file, and also finding this online: https://support.river-valley.com/wiki/index.php?title=Elsarticle.cls after a google search. You need to add nopreprintline option among the classoption to remove the footer line.

I believe this must be done by elsevier before publishing only. Anyway, this is not a rticles issue, it is mainly how to use elsevier template. I don't know why they do not document that in their PDF.

drfurtado commented 2 years ago

the words "Preprint submitted" appear on the right

In fact, this comes from the template .cls that we have included with rticles: https://github.com/cderv/rticles/blob/c80b4835a724193df5e005d78128bc91a0a0a724/inst/rmarkdown/templates/elsevier/skeleton/elsarticle.cls#L1014

I did delete preprint but the word still appears on the rendered pdf.

This is not something I found in the PDF doc but by reading the .cls file, and also finding this online: https://support.river-valley.com/wiki/index.php?title=Elsarticle.cls after a google search. You need to add nopreprintline option among the classoption to remove the footer line.

I believe this must be done by elsevier before publishing only. Anyway, this is not a rticles issue, it is mainly how to use elsevier template. I don't know why they do not document that in their PDF.

Thank you so much!

github-actions[bot] commented 1 year ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.