-
Notifications
You must be signed in to change notification settings - Fork 520
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 Springer Journal Article template #164
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#' Springer Journal format. | ||
#' | ||
#' This format was adapted from the Springer Macro package for Springer | ||
#' Journals. | ||
#' | ||
#' @inheritParams rmarkdown::pdf_document | ||
#' @param ... Arguments to \code{rmarkdown::pdf_document} | ||
#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}} | ||
#' @examples | ||
#' \dontrun{ | ||
#' rmarkdown::draft("MyArticle.Rmd", template = "springer_article", package = "rticles") | ||
#' } | ||
#' | ||
#' @export | ||
springer_article <- function(..., keep_tex = TRUE, citation_package = 'none'){ | ||
template <- find_resource("springer_article", "template.tex") | ||
inherit_pdf_document(template = template, | ||
keep_tex = keep_tex, | ||
citation_package = citation_package, | ||
...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
inst/rmarkdown/templates/springer_article/resources/template.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
% !TeX program = pdfLaTeX | ||
\documentclass[smallextended]{svjour3} % onecolumn (second format) | ||
%\documentclass[twocolumn]{svjour3} % twocolumn | ||
% | ||
\smartqed % flush right qed marks, e.g. at end of proof | ||
% | ||
\usepackage{amsmath} | ||
\usepackage{graphicx} | ||
|
||
\usepackage[hyphens]{url} % not crucial - just used below for the URL | ||
\usepackage{hyperref} | ||
\providecommand{\tightlist}{% | ||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} | ||
|
||
% | ||
% \usepackage{mathptmx} % use Times fonts if available on your TeX system | ||
% | ||
% insert here the call for the packages your document requires | ||
%\usepackage{latexsym} | ||
% etc. | ||
% | ||
% please place your own definitions here and don't use \def but | ||
% \newcommand{}{} | ||
% | ||
% Insert the name of "your journal" with | ||
% \journalname{myjournal} | ||
% | ||
|
||
%% load any required packages here | ||
$preamble$ | ||
|
||
$if(highlighting-macros)$ | ||
$highlighting-macros$ | ||
$endif$ | ||
|
||
\begin{document} | ||
|
||
\title{$title$ $if(thanks)$\thanks{$thanks$} $endif$} | ||
$if(subtitle)$ \subtitle{$subtitle$} $endif$ | ||
|
||
$if(titlerunning)$ | ||
\titlerunning{$titlerunning$} | ||
$endif$ | ||
|
||
\author{ $for(authors)$ $authors.name$ \and $endfor$ } | ||
|
||
$if(authorrunning)$ | ||
\authorrunning{ $authorrunning$ } | ||
$endif$ | ||
|
||
\institute{ | ||
$for(authors)$ | ||
$authors.name$ \at | ||
$if(authors.address)$ $authors.address$ $endif$\\ | ||
$if(authors.email)$ \email{$authors.email$} $endif$ % \\ | ||
% \emph{Present address:} of F. Author % if needed | ||
\and | ||
$endfor$ | ||
} | ||
|
||
\date{Received: date / Accepted: date} | ||
% The correct dates will be entered by the editor | ||
|
||
|
||
\maketitle | ||
|
||
\begin{abstract} | ||
$abstract$ | ||
\\ | ||
\keywords{ | ||
$for(keywords)$ | ||
$keywords$ \and | ||
$endfor$ | ||
} | ||
$if(PACS)$ | ||
\PACS{ | ||
$for(PACS)$ | ||
$PACS$ \and | ||
$endfor$ | ||
} | ||
$endif$ | ||
|
||
$if(MSC)$ | ||
\subclass{ | ||
$for(MSC)$ | ||
$MSC$ \and | ||
$endfor$ | ||
} | ||
$endif$ | ||
|
||
\end{abstract} | ||
|
||
|
||
\def\spacingset#1{\renewcommand{\baselinestretch}% | ||
{#1}\small\normalsize} \spacingset{1} | ||
|
||
|
||
$body$ | ||
|
||
\bibliographystyle{spbasic} | ||
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} | ||
|
||
\end{document} |
26 changes: 26 additions & 0 deletions
26
inst/rmarkdown/templates/springer_article/skeleton/bibliography.bib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
%% Copied from asa_article template | ||
|
||
|
||
@incollection{Galyardt14mmm, | ||
Author = {April Galyardt}, | ||
Booktitle = {Handbook of Mixed Membership Models}, | ||
Date-Added = {2014-08-21 21:18:27 +0000}, | ||
Date-Modified = {2014-08-21 21:18:27 +0000}, | ||
Editor = {Edoardo M. Airoldi and David Blei and Erosheva, Elena and Fienberg, Stephen E.}, | ||
Publisher = {Chapman and Hall}, | ||
Title = {Interpreting Mixed Membership Models: Implications of Erosheva's Representation Theorem}, | ||
Year = {2014} | ||
} | ||
|
||
|
||
@incollection{Mislevy06Cog, | ||
Author = {Robert Mislevy}, | ||
Booktitle = {Educational Assessment}, | ||
Chapter = {8}, | ||
Date-Added = {2014-08-21 20:58:59 +0000}, | ||
Date-Modified = {2014-08-21 20:58:59 +0000}, | ||
Editor = {Robert L. Brennan}, | ||
Publisher = {American Council on Education and Praeger Publishers}, | ||
Title = {Cognitive Psychology and Educational Assessment}, | ||
Year = {2006} | ||
} |
65 changes: 65 additions & 0 deletions
65
inst/rmarkdown/templates/springer_article/skeleton/skeleton.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
title: Title here | ||
subtitle: Do you have a subtitle? If so, write it here | ||
titlerunning: Short form of title (if too long for head) | ||
authorrunning: Short form of author list if too long for running head | ||
thanks: | | ||
Grants or other notes about the article that should go on the front | ||
page should be placed here. General acknowledgments should be placed at the | ||
end of the article. | ||
|
||
authors: | ||
- name: Author 1 | ||
address: Department of YYY, University of XXX | ||
email: abc@def | ||
|
||
- name: Author 2 | ||
address: Department of ZZZ, University of WWW | ||
email: djf@wef | ||
|
||
keywords: | ||
- key | ||
- dictionary | ||
- word | ||
|
||
#PACS: | ||
#- PAC1 | ||
#- superPAC | ||
|
||
MSC: | ||
- MSC code 1 | ||
- MSC code 2 | ||
|
||
abstract: | | ||
The text of your abstract. 150 -- 250 words. | ||
|
||
bibliography: bibliography.bib | ||
output: rticles::springer_article | ||
--- | ||
|
||
# Introduction {#intro} | ||
|
||
Your text comes here. Separate text sections with | ||
|
||
# Section title {#sec:1} | ||
|
||
Text with citations by @Galyardt14mmm, [@Mislevy06Cog]. | ||
|
||
## Subsection title {#sec:2} | ||
|
||
as required. Don't forget to give each section | ||
and subsection a unique label (see Sect. \ref{sec:1}). | ||
|
||
#### Paragraph headings | ||
|
||
Use paragraph headings as needed. | ||
|
||
\begin{align} | ||
a^2+b^2=c^2 | ||
\end{align} | ||
|
||
|
||
|
||
|
||
|
||
# References |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Next time it will be better if you could separate this into a different pull request since it is not related to the new Springer format (i.e. one thing per PR).
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.
Right! (Didn't know it's not related.)