-
Notifications
You must be signed in to change notification settings - Fork 522
Update to elsevier template #467
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
Changes from 9 commits
9f2c202
53b6b9e
afd38c5
594a283
4dd345d
4491690
7c9c906
68e36fa
0e6bdf4
baeeeda
d1b8b2f
d5038d7
3ac9254
b4630ed
a2561a7
00ad4db
aeae64e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
\documentclass[$layout$]{elsarticle} %review=doublespace preprint=single 5p=2 column | ||
$-- Keeping in template layout for backward compatibility | ||
|
||
\documentclass[$if(layout)$$layout$$else$$for(classoption)$$classoption$$sep$,$endfor$$endif$]{elsarticle} %review=doublespace preprint=single 5p=2 column | ||
%%% Begin My package additions %%%%%%%%%%%%%%%%%%% | ||
|
||
\usepackage[hyphens]{url} | ||
|
||
$if(journal)$ | ||
\journal{$journal$} % Sets Journal name | ||
$endif$ | ||
|
||
|
||
\usepackage{lineno} % add | ||
$if(linenumbers)$ | ||
\linenumbers % turns line numbering on | ||
|
@@ -53,11 +55,10 @@ | |
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} | ||
$endif$ | ||
$if(natbib)$ | ||
\usepackage{natbib} | ||
\usepackage[$natbiboptions$]{natbib} | ||
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} | ||
$else$ | ||
\bibliographystyle{elsarticle-harv} | ||
$endif$ | ||
|
||
$if(listings)$ | ||
\usepackage{listings} | ||
$endif$ | ||
|
@@ -85,7 +86,6 @@ | |
urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$, | ||
linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$, | ||
pdfborder={0 0 0}} | ||
\urlstyle{same} % don't use monospace font for urls | ||
$if(links-as-notes)$ | ||
% Make links footnotes instead of hotlinks: | ||
\renewcommand{\href}[2]{#2\footnote{\url{#1}}} | ||
|
@@ -194,20 +194,29 @@ | |
|
||
\title{$title$} | ||
$for(author)$ | ||
\author[$author.affiliation$]{$author.name$$if(author.footnote)$\corref{$author.footnote$}$endif$} | ||
\author[$author.affiliation$]{$author.name$$if(author.footnote)$% | ||
$if(author.correspondingauthor)$\corref{cor1}$endif$% | ||
\fnref{$author.footnote$}$endif$} | ||
$if(author.email)$ \ead{$author.email$} $endif$ | ||
$endfor$ | ||
$for(address)$ | ||
\address[$address.code$]{$address.address$} | ||
\affiliation[$address.code$]{$address.address$} | ||
$endfor$ | ||
\cortext[cor1]{Corresponding author} | ||
$for(footnote)$ | ||
\cortext[$footnote.code$]{$footnote.text$} | ||
\fntext[$footnote.code$]{$footnote.text$} | ||
$endfor$ | ||
|
||
\begin{abstract} | ||
$abstract$ | ||
\end{abstract} | ||
$if(keywords)$ \begin{keyword} $for(keywords)$$keywords$$sep$ $endfor$\end{keyword}$endif$ | ||
$if(keywords)$ | ||
\begin{keyword} | ||
$for(keywords/allbutlast)$$keywords$ \sep $endfor$ | ||
$for(keywords/last)$$keywords$$endfor$ | ||
\end{keyword} | ||
$endif$ | ||
Comment on lines
-210
to
+217
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the part where Pandoc 2.10 is required right ? So that we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's the only place that requires pandoc 2.10. I can't think of another way to do it without the user explicitly adding the \sep separators which is a bit ugly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes this is cleaner, but it brings a pretty recent version of Pandoc as a requirement for this template. If we consider that rticles users are mainly RStudio users, a pandoc version > 2.10 is available since last release. And next release with upgraded version should be soon. So we can set the minimum requirement and see if someone complain. Other option would be indeed to have a comment in YAML header to ask user to add |
||
|
||
\end{frontmatter} | ||
|
||
$body$ | ||
|
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 need to think about this. I don't mind doing that for new articles formats, but
elsevier_article()
is not a new function. Adding this requirement will make this a breaking change. They would need to have a newer Pandoc. Version 2.10 is not that old "2020-06-29" and even if RStudio is shipping with recent version, there could be some users still using an older Pandoc.