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 all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Authors@R: c(
person("Greg", "Macfarlane", role = c("ctb"), email = "[email protected]", comment = c(github = "gregmacfarlane")),
person("Matthias", "Templ", role = c("ctb"), email = "[email protected]", comment = c(ORCID = "0000-0002-8638-5276", github = "matthias-da")),
person("Alvaro", "Uzaheta", role = c("ctb"), email = "[email protected]", comment = c(github = "auzaheta")),
person("JooYoung", "Seo", role=c("ctb"), email="[email protected]", comment = c(ORCID = "0000-0002-4064-6012"))
person("JooYoung", "Seo", role=c("ctb"), email="[email protected]", comment = c(ORCID = "0000-0002-4064-6012")),
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 Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export(jss_article)
export(lipics_article)
export(mdpi_article)
export(mnras_article)
export(opmi_article)
export(oup_article)
export(peerj_article)
export(pihph_article)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Add `trb_article()` for annual meeting submissions to the Transportation Research Board Annual Meeting (thanks, @gregmacfarlane, #427).

- Added OpenMind template (@mikabr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Added OpenMind template (@mikabr)
- Added OpenMind template (thanks, @mikabr, #305).


# rticles 0.21

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

#' @section `opmi_article`: Format for creating Open Mind articles. Adapted from
#' \url{https://www.mitpressjournals.org/journals/opmi/sub}.
Comment on lines +307 to +308
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#' @section `opmi_article`: Format for creating Open Mind articles. Adapted from
#' \url{https://www.mitpressjournals.org/journals/opmi/sub}.
#' @section `opmi_article`: Format for creating Open Mind articles. Adapted from
#' <https://www.mitpressjournals.org/journals/opmi/sub>.

We can use markdown syntax in roxygen now

#' @export
#' @rdname article
opmi_article <- function(..., keep_tex = TRUE) {
pdf_document_format("opmi", keep_tex = keep_tex, ...)
}
Comment on lines +311 to +313
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this format needs to be used with a citation package specifically ? like natbib ?
If so, it needs to be set in there.

If it can be used with the default Pandoc citeproc that is great. Only the template would need adjustment.


#' @section `oup_article`: Format for creating submissions to many Oxford University Press
#' journals. Adapted from
#' <https://academic.oup.com/journals/pages/authors/preparing_your_manuscript>
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Currently included templates and their contributors are the following:
| [LIPIcs](https://www.dagstuhl.de/en/publications/lipics)| [\@nuest](https://github.com/nuest)| [\#288](https://github.com/rstudio/rticles/pull/288) | `lipics_article()` |
| [MDPI](https://www.mdpi.com)| [\@dleutnant](https://github.com/dleutnant)| [\#147](https://github.com/rstudio/rticles/pull/147) | `mdpi_article()` |
| [MNRAS: Monthly Notices of the Royal Astronomical Society](https://academic.oup.com/mnras)| [\@oleskiewicz](https://github.com/oleskiewicz)| [\#175](https://github.com/rstudio/rticles/pull/175) | `mnras_article()`|
| [Open Mind](https://www.mitpressjournals.org/loi/opmi) | [\@mikabr](https://github.com/mikabr)| [\#305](https://github.com/rstudio/rticles/pull/305) | `opmi_article()`|
| [OUP: Oxford University Press](https://academic.oup.com/journals/pages/authors/preparing_your_manuscript) | [\@dmkaplan](https://github.com/dmkaplan)| [\#284](https://github.com/rstudio/rticles/pull/284) | `oup_articles()` |
| [PeerJ: Journal of Life and Environmental Sciences](https://peerj.com)| [\@zkamvar](https://github.com/zkamvar)| [\#127](https://github.com/rstudio/rticles/pull/127) | `peerj_article()`|
| [PiHPh: Papers in Historical Phonology](http://journals.ed.ac.uk/pihph/about/submissions) | [\@stefanocoretta](https://github.com/stefanocoretta)| [\#362](https://github.com/rstudio/rticles/pull/362) | `pihph_article()`|
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Currently included templates and their contributors are the following:
| [LIPIcs](https://www.dagstuhl.de/en/publications/lipics) | [@nuest](https://github.com/nuest) | [#288](https://github.com/rstudio/rticles/pull/288) | `lipics_article()` |
| [MDPI](https://www.mdpi.com) | [@dleutnant](https://github.com/dleutnant) | [#147](https://github.com/rstudio/rticles/pull/147) | `mdpi_article()` |
| [MNRAS: Monthly Notices of the Royal Astronomical Society](https://academic.oup.com/mnras) | [@oleskiewicz](https://github.com/oleskiewicz) | [#175](https://github.com/rstudio/rticles/pull/175) | `mnras_article()` |
| [Open Mind](https://www.mitpressjournals.org/loi/opmi) | [@mikabr](https://github.com/mikabr) | [#305](https://github.com/rstudio/rticles/pull/305) | `opmi_article()` |
| [OUP: Oxford University Press](https://academic.oup.com/journals/pages/authors/preparing_your_manuscript) | [@dmkaplan](https://github.com/dmkaplan) | [#284](https://github.com/rstudio/rticles/pull/284) | `oup_articles()` |
| [PeerJ: Journal of Life and Environmental Sciences](https://peerj.com) | [@zkamvar](https://github.com/zkamvar) | [#127](https://github.com/rstudio/rticles/pull/127) | `peerj_article()` |
| [PiHPh: Papers in Historical Phonology](http://journals.ed.ac.uk/pihph/about/submissions) | [@stefanocoretta](https://github.com/stefanocoretta) | [#362](https://github.com/rstudio/rticles/pull/362) | `pihph_article()` |
Expand Down
85 changes: 85 additions & 0 deletions inst/rmarkdown/templates/opmi/resources/template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
\documentclass[$class_option$]{stjour}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The usual variable should be used, with a for loop in case of several option. See example in other format:

\documentclass[$for(classoption)$$classoption$$sep$,$endfor$]{interact}


$if(journal_name)$\journalname{$journal_name$}$endif$
Copy link
Collaborator

Choose a reason for hiding this comment

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

We usually don't use _ in variable. Rather - if needed as other Pandoc variables (https://pandoc.org/MANUAL.html#variables)


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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$

Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to add other content for Pandoc. Please see other template

Example: https://github.com/rstudio/rticles/pull/427/files#r678334426

\begin{document}

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

\author[$short_author$]{
$for(author)$
$author.name$\affil{$author.affiliation$}$sep$,
$endfor$
}
Comment on lines +39 to +48
Copy link
Collaborator

Choose a reason for hiding this comment

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

Regarding variable name, we should try to use common values

example:

\author[$if(shortauthors)$$shortauthors$$endif$]{

Related to #411


$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$}

\clearpage

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

\end{document}
Binary file not shown.
Loading
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/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/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}

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
Loading