Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LNCS template (#445) #475

Merged
merged 18 commits into from
May 9, 2022
Merged

Add LNCS template (#445) #475

merged 18 commits into from
May 9, 2022

Conversation

eliocamp
Copy link
Contributor

@eliocamp eliocamp commented Mar 19, 2022

I get a warning when rendering the skeleton.Rmd file:

[WARNING] Citeproc: citation uni-heidelberg.de not found

I think is has to do with the email in line 27:

    email: "\\{abc,lncs\\}@uni-heidelberg.de"

rmarkdown is interpreting @uni-heidelberg as a citation for some reason. Is there a way to avoid this automatic conversion?

How to contribute a new output format ?

To contribute a new article template to this package, please make sure you have done the following things (note that journalname_article below is only an example name):

  • This project uses a Contributor Licence Agreement (CLA) that you'll be asked to sign when opening a PR. This is required for a significant pull request (it is fine not to sign it if a PR is only intended to fix a few typos). We use a tool called CLA assistant for that.
    You could also, unless you have done it in any other RStudio's projects before, sign the individual or corporate contributor agreement. You can send the signed copy to [email protected].

  • Add the journalname_article() function to R/article.R if the output format is simple enough, otherwise create a separate R/journalname_article.R.

  • Document your function using roxygen2. Markdown syntax is supported. Refer to https://roxygen2.r-lib.org/articles/rd-formatting.html for formatting references.

  • Add the Pandoc LaTeX template inst/rmarkdown/templates/journalname/resources/template.tex.

  • Add a skeleton article inst/rmarkdown/templates/journalname/skeleton/skeleton.Rmd.

  • Add a description of the template inst/rmarkdown/templates/journalname/template.yaml.

  • Please include the document class file (*.cls) if needed, but please do not include standard LaTeX packages (*.sty) that can be downloaded from CTAN. If you are using TinyTeX or TeX Live, you can verify if a package is available on CTAN via tinytex::parse_packages(files = "FILENAME"") (e.g., when FILENAME is plain.bst, it should return "bibtex", which means this file is from a standard CTAN package). Please keep the number of new files absolutely minimal (e.g., do not include PDF output files), and also make examples minimal (e.g., if you need a .bib example, try to only leave one or two bibliography entries in it, and don't include too many items in it without using all of them).

  • Update Rd and namespace (could be done by devtools::document()).

  • Update NEWS.

  • Update README with a link to the newly supported journal. Please add your Github username and the full name of the journal (follow other examples in the list).

  • Add a test to tests/testit/test-formats.R by adding a line test_format("journalname"). We try to keep them in alphabetical order.

  • Add your name to the list of authors Authors@R in DESCRIPTION. You don't need to bump the package version in DESCRIPTION.

Lastly, please try your best to do only one thing per pull request (e.g., if you want to add two output formats, do them in two separate pull requests), and refrain from making cosmetic changes in the code base: https://yihui.name/en/2018/02/bite-sized-pull-requests/

Thank you!

Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

You'll find some comments below. Regarding the error with citeproc, this probably happens because by default Pandoc Citeproc is used. Do you want to use only natbib instead ?
Otherwise, I'll see why Pandoc citeproc is blicking on this.

Thanks !

R/article.R Outdated Show resolved Hide resolved
inst/rmarkdown/templates/lncs/resources/template.tex Outdated Show resolved Hide resolved
Comment on lines 124 to 135
%
% ---- Bibliography ----
%
% BibTeX users should specify bibliography style 'splncs04'.
% References will then be sorted and formatted in the correct style.
%
\bibliographystyle{splncs04}
% \bibliography{mybibliography}
%
$if(bibliography)$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$endif$
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't use any if clause for the citation engine. Is this suppose to work for all : natbib, biblatex or Pandoc's citeproc ?

I read

BibTeX users should specify bibliography style 'splncs04'.

is this working with all citation package ?

If you look at default Pandoc's latex template, you'll see there are conditions to activate part of template depending on citation engine. Some template here do the same, others are only working with natbib and this is enforced in the format function with citation_package argument.

This should probably be tested with different engine, if it is suppose to support it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not at all familiar with how citations engines are supposed to work, so tried to modify the original template as little as possible. The template states:

For citations of references, use \cite{Nuncio2011}. Multiple citations are grouped\ \cite{Levitus2012,Raphael2004}.

So I left it at that.

I'll look at the other templates to adapt it to other citation engines.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can decide that this template only works with natbib for example by setting the citation_engine in the output format function.

My comment is just that currently, default is to use Pandoc's citeproc and the template does not account for that.
Change mentioned above would fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the template with natbib and biblatex and none of them seem to be compatible with the splncs04 bibliography style (there's even an alternative style that is made to be compatible with natbib). So I'm going to set the citation_engine to "default", which is the only compatible one.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I read about the guideline, it should be working with at least one of the option using splncs04.bst for the bibliostyle.
https://www.springer.com/gp/computer-science/lncs/conference-proceedings-guidelines

I'll check it out.

inst/rmarkdown/templates/lncs/skeleton/skeleton.Rmd Outdated Show resolved Hide resolved
inst/rmarkdown/templates/lncs/skeleton/skeleton.Rmd Outdated Show resolved Hide resolved
inst/rmarkdown/templates/lncs/skeleton/skeleton.Rmd Outdated Show resolved Hide resolved
inst/rmarkdown/templates/lncs/skeleton/llncs.cls Outdated Show resolved Hide resolved
inst/rmarkdown/templates/lncs/skeleton/splncs04.bst Outdated Show resolved Hide resolved
Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! I'll take it from here.

@cderv cderv merged commit 81bb681 into rstudio:main May 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2022
@cderv cderv linked an issue Nov 27, 2024 that may be closed by this pull request
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Springer Lecture Notes in Computer Science (LNCS) template?
2 participants