-
Couldn't load subscription status.
- Fork 524
Add Springer Journal Article template #164
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 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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") | ||
| fmt <- inherit_pdf_document(template = template, | ||
| keep_tex = keep_tex, | ||
| citation_package = citation_package, | ||
| ...) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,8 +24,13 @@ | |
| %% load any required packages here | ||
| $preamble$ | ||
|
|
||
| $if(highlighting-macros)$ | ||
| $highlighting-macros$ | ||
| $endif$ | ||
|
|
||
|
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. 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 commentThe reason will be displayed to describe this comment to others. Learn more. Right! (Didn't know it's not related.) |
||
| \begin{document} | ||
|
|
||
|
|
||
| \def\spacingset#1{\renewcommand{\baselinestretch}% | ||
| {#1}\small\normalsize} \spacingset{1} | ||
|
|
||
|
|
||
| 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} |
Large diffs are not rendered by default.
| 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 |
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 don't think it is necessary to create the variable
fmthere. I mean the assignment is unnecessary.