Update springer article
Springer seems to have updated its template. The one provided by rticles uses de svjour3 class, but the one you can download form the website uses the sn-jnl class and is pretty different.
I'm preparing a submission (that's why I noticed) so I could update it and send a PR.
By filing an issue to this repo, I promise that
- [ x ] I have fully read the issue guide at https://yihui.name/issue/.
- [ x ] I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included
xfun::session_info('rticles'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rticles'). - If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- [ x ] I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
I'm preparing a submission (that's why I noticed) so I could update it and send a PR.
Awesome thanks !
We don't have an effective way currently to know when a journal updates and when we need to update. We are trying to rely on contributor for that. Thank you very much !
I'm trying to adapt this affiliation format:
\affil[3]{\orgdiv{Department}, \orgname{Organization}, \orgaddress{\street{Street}, \city{City}, \postcode{610101}, \state{State}, \country{Country}}}
Right now I have this in the yaml header
affiliations:
- number: 1
corresponding: TRUE
division: Department
name: Organization
address:
street: Street
city: City
postcode: 100190
state: State
country: Country
And this in the template
$for(affiliations)$
\affil$if(affiliations.corresponding)$*$endif$[$affiliations.number$]{
$if(affiliations.division)$
\orgdiv{$affiliations.division$},
$endif$
$if(affiliations.name)$
\orgname{$affiliations.name$},
$endif$
$if(affiliations.address)$
\orgaddress{
$if(affiliations.address.street)$
\street{$affiliations.address.street$},
$endif$
$if(affiliations.address.city)$
\city{$affiliations.address.city$},
$endif$
$if(affiliations.address.postcode)$
\postcode{$affiliations.address.postcode$},
$endif$
$if(affiliations.address.state)$
\state{$affiliations.address.state$},
$endif$
$if(affiliations.address.country)$
\country{$affiliations.address.country$}
$endif$
}
$endif$}
$endfor$
The problem is that for an organisation without some of the fields you get dangling commas:
\affil*[2]{\orgname{Other Organisation},}
Is there a way to emulate the $sep$ behaviour inside an if?
What about using a for instead of an if ? I wonder if the $sep$ will add if there is only one value 🤔
https://pandoc.org/MANUAL.html#for-loops
Some pipes function are required sometimes for complex layout (https://pandoc.org/MANUAL.html#pipes) This will upgrade Pandoc's requirement for the format but it is really to do otherwise without it sometimes.
But it is possible that Template feature from Pandoc is too limited for this new organization 🤔
Ah, thanks for pointing me to the pipe thing. Using the pairs pipe and clever use of names I solved it with:
affiliations:
- number: 1
corresponding: TRUE
info:
orgdiv: Department
orgname: Organization
address:
street: Street
city: City
postcode: 100190
state: State
country: Country
and
$for(affiliations)$
\affil[$affiliations.number$]{$for(affiliations.info/pairs)$\$it.key${$it.value$}$sep$, $endfor$$if(affiliations.address)$, \orgaddress{$for(affiliations.address/pairs)$\$it.key${$it.value$}$sep$, $endfor$}$endif$}
$endfor$
Using the pairs pipe and clever use of names I solved it
Good! This just means that a minimum Pandoc version requirement will be required for this template.
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.