Skip to content
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 open mind template #305

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Authors@R: c(
person("Robrecht", "Cannoodt", role = c("aut", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-3641-729X", github = "rcannood")),
person("Duncan", "Luguern", role = c("aut"), email = "[email protected]"),
person("David M.", "Kaplan", role = c("aut", "ctb"), email = "[email protected]", comment = c(ORCID = "0000-0001-6087-359X", github = "dmkaplan2000")),
person("Alfredo", "Hernández", role = c("ctb"), email = "[email protected]", comment = c(ORCID = "0000-0002-2660-4545"))
person("Alfredo", "Hernández", role = c("ctb"), email = "[email protected]", comment = c(ORCID = "0000-0002-2660-4545")),
person("Mika", "Braginsky", role = c("ctb"), email = "[email protected]", comment = c(github = "mikabr"))
)
Description: A suite of custom R Markdown formats and templates for
authoring journal articles and conference submissions.
Expand All @@ -49,6 +50,6 @@ Imports: utils, rmarkdown, knitr, yaml, tinytex (>= 0.19), xfun
SystemRequirements: GNU make
URL: https://github.com/rstudio/rticles
BugReports: https://github.com/rstudio/rticles/issues
RoxygenNote: 7.0.2
RoxygenNote: 7.1.1
Suggests: testit, bookdown, xtable
Encoding: UTF-8
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export(joss_article)
export(jss_article)
export(mdpi_article)
export(mnras_article)
export(opmi_article)
export(oup_article)
export(peerj_article)
export(plos_article)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ rticles 0.15

- Update to OUP format to use `pandoc-citeproc` by default for citations (thanks, @dmkaplan2000, #289).

- Added OpenMind template (@mikabr)

rticles 0.14
---------------------------------------------------------------------

Expand Down
8 changes: 8 additions & 0 deletions R/article.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ mnras_article <- function(..., keep_tex = TRUE, fig_caption = TRUE) {
)
}

#' @section \code{opmi_article}: Format for creating Open Mind articles. Adapted from
#' \url{https://www.mitpressjournals.org/journals/opmi/sub}.
#' @export
#' @rdname article
opmi_article <- function(..., keep_tex = TRUE) {
pdf_document_format("opmi_article", keep_tex = keep_tex, ...)
}

#' @section \code{oup_article}: Format for creating submissions to many Oxford University Press
#' journals. Adapted from
#' \url{https://academic.oup.com/journals/pages/authors/preparing_your_manuscript}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The **rticles** package provides a suite of custom [R Markdown](http://rmarkdown

- [MNRAS: Monthly Notices of the Royal Astronomical Society](https://academic.oup.com/mnras) articles (contributed by @oleskiewicz via #175) - `mnras_article()`

- [Open Mind](https://www.mitpressjournals.org/loi/opmi) articles (contributed by @mikabr) - `opmi_article()`

- [OUP: Oxford University Press](https://academic.oup.com/journals/pages/authors/preparing_your_manuscript) articles (contributed by @dmkaplan2000 via #271, #284) - `oup_article()`

- [PeerJ: Journal of Life and Environmental Sciences](https://peerj.com) articles (contributed by @zkamvar) - `peerj_article()`
Expand Down
85 changes: 85 additions & 0 deletions inst/rmarkdown/templates/opmi_article/resources/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
\documentclass[$class_option$]{stjour}

$if(journal_name)$\journalname{$journal_name$}$endif$

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% For production only, not authors:
%%\documentclass[OpenMind,finalfonts]{stjour}

%%%%%%%%%%% Please supply information %%%%%%%%%%%%%%%%%%%%%%%%%

\supplementslinks{$supplements_links$}

$if(conflicts_of_interest)$
\conflictsofinterest{$conflicts_of_interest$}
$endif$

%%%%%%%%%%% to be supplied by MIT Press, only %%%%%%%%%%%%%%%%%

\citation{CITATION}

\received{RECEIVED}
\accepted{ACCEPTED}
\published{PUBLISHED}

%% DOI address:
\setdoi{DOI}

%%%%%%%% End MIT Press commands %%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% author definitions should be placed here:

$for(header-includes)$
$header-includes$
$endfor$

\begin{document}

\title[$short_title$]{$title$}
$if(subtitle)$
\subtitle{$subtitle$}
$endif$

\author[$short_author$]{
$for(author)$
$author.name$\affil{$author.affiliation$}$sep$,
$endfor$
}

$for(affiliation)$
\affiliation{$affiliation.code$}{$affiliation.address$}
$endfor$

\correspondingauthor{$corresponding_author.name$}{$corresponding_author.email$}

\keywords{$for(keywords)$ $keywords$$sep$, $endfor$}

\begin{abstract}
$abstract$
\end{abstract}

$body$

%%% End of Article

$if(supportive_information)$
\section{Supportive Information}
$supportive_information$
$endif$

\acknowledgments
$acknowledgments$

\authorcontributions
$author_contributions$

\bibliography{$biblio$}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable provided in yaml is bibliography. I think it should be $bibliography$ here - currently, it is empty, in the resulting tex file


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an optionnal appendix in the OpenMindTemplate.Tex file and in your yaml header in skeleton.Rmd. Should it be here ?

\clearpage

$for(include-after)$
$include-after$
$endfor$

\end{document}
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions inst/rmarkdown/templates/opmi_article/skeleton/opmi.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@book{anderson,
Address = {Mahwah, New Jersey},
Author = {J. R. Anderson},
Date-Added = {2014-02-05 15:27:59 +0100},
Date-Modified = {2014-02-05 16:10:22 +0100},
Publisher = {Lawrence {E}rlbaum {A}ssociates},
Title = {The architecture of cognition},
Year = {1983}}
87 changes: 87 additions & 0 deletions inst/rmarkdown/templates/opmi_article/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: Title of Article
## Remove this if not required
subtitle: Subtitle Here
short_title: Title of Article

## 'OpenMind' or 'manuscript'
class_option: OpenMind
## Only needed if you use 'manuscript' option
journal_name: Open Mind

author:
- name: Author Name
affiliation: 1
- name: Another Name
affiliation: 2
- name: Still another Name
affiliation: 2
- name: and Final Name
affiliation: 1

affiliation:
- code: 1
address: Department, Institution, City, Country
- code: 2
address: Another Department, Institution, City, Country

corresponding_author:
name: Author Name
email: Email address

short_author: Author Names

supplements_links: |
Links to Supplementary Materials.

## Remove this if not required
conflicts_of_interest: |
Please declare any conflict of interest here.

keywords:
- one
- two
- three

abstract: |
Abstract text here.

supportive_information: |
Here you enter further sources of information, if desired. A possible entry might be: No supportive information is available at this time.

acknowledgments: |
Enter your acknowledgments here.

author_contributions: |
Who helped formulate the project, who supplied data, analyses and experiments, etc.

## Remove this if not required
appendix: |
Optional appendix
\section{Sample appendix section}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no appendix variable in your template.tex for this. I think it should be added.


bibliography: opmi.bib
output: rticles::opmi_article
---


# Sample Section
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.

## Sample Subsection
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.

### Sample Subsubsection
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.
Text here. Text here. Text here. Text here.


# References
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be added at the end of the body so right before \section{Supportive Information} and not before the bibliography.

The OpenMindSample.tex does not seem to have this header, however it has the result have it.