-
Notifications
You must be signed in to change notification settings - Fork 524
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
Conversation
There was a problem hiding this 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 !
% | ||
% ---- 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$ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
llncs.cls and splncs04.bst are in the llncs package on CTAN and fig1.eps was a sample figure.
biblatex is deactivated for this template
There was a problem hiding this 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.
I get a warning when rendering the
skeleton.Rmd
file:I think is has to do with the email in line 27:
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 toR/article.R
if the output format is simple enough, otherwise create a separateR/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 viatinytex::parse_packages(files = "FILENAME"")
(e.g., whenFILENAME
isplain.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 linetest_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!