Closed huizezhang-sherry closed 2 years ago
I don't think this is a bug, but is expected behaviour. You can turn this off by supplying an document class argument like so in your YAML header classoption: shortnames
, which is the equivalent of specifying \documentclass[article,shortnames]{jss}
in LaTeX, which is explained in more detail on pp. 8-9 of the official JSS style guide, more info here: https://www.jstatsoft.org/style.
So if you add that line to the default YAML header for the document, you get:
---
documentclass: jss
classoption: shortnames
author:
- name: FirstName LastName
orcid: 0000-0000-0000-0000
affiliation: University/Company
# use this syntax to add text on several lines
address: |
| First line
| Second line
email: \email{name@company.com}
url: http://rstudio.com
- name: Second Author
orcid: 0000-0000-0000-0000
affiliation: 'Affiliation \AND'
# To add another line, use \AND at the end of the previous one as above
- name: Third Author
orcid: 0000-0000-0000-0000
address: |
| Department of Statistics and Mathematics,
| Faculty of Biosciences,
| Universitat Autònoma de Barcelona
affiliation: |
| Universitat Autònoma
| de Barcelona
# use a different affiliation in adress field (differently formated here)
affiliation2: Universitat Autònoma de Barcelona
title:
formatted: "A Capitalized Title: Something about a Package \\pkg{foo}"
# If you use tex in the formatted title, also supply version without
plain: "A Capitalized Title: Something about a Package foo"
# For running headers, if needed
short: "\\pkg{foo}: A Capitalized Title"
abstract: >
The abstract of the article.
keywords:
# at least one keyword must be supplied
formatted: [keywords, not capitalized, "\\proglang{Java}"]
plain: [keywords, not capitalized, Java]
preamble: >
\usepackage{amsmath}
output: rticles::jss_article
---
Thanks @egouldo, this solves my problem!
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.
Here is a minimal reproducible example.
For the first time the package
tidyverse
is referenced, all the authors are printed rather than using the first surname et al style. This becomes not an issue after the first reference.This behavior also persists for other multi-author references.
Maybe a bug here?