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

add open mind template #305

wants to merge 2 commits into from

Conversation

mikabr
Copy link

@mikabr mikabr commented Aug 4, 2020

To contribute a new article template to this package, please make sure you have done the following things (note that journalname_article below is only an example name):

  • Unless you have done it in any other RStudio's projects before, please sign the individual or corporate contributor agreement for a significant pull request (it is fine not to sign it if a PR is only intended to fix a few typos). You can send the signed copy to [email protected].

  • Add the journalname_article() function to R/article.R if the output format is simple enough, otherwise create a separate R/journalname_article.R.

  • Add the Pandoc LaTeX template inst/rmarkdown/templates/journalname_article/resources/template.tex.

  • Add a skeleton article inst/rmarkdown/templates/journalname_article/skeleton/skeleton.Rmd.

  • Add a description of the template inst/rmarkdown/templates/journalname_article/template.yaml.

  • Please include the document class file (*.cls) if needed, but please do not include standard LaTeX packages (*.sty) that can be downloaded from CTAN. If you are using TinyTeX or TeX Live, you can verify if a package is available on CTAN via tinytex::parse_packages(files = "FILENAME"") (e.g., when FILENAME is plain.bst, it should return "bibtex", which means this file is from a standard CTAN package). Please keep the number of new files absolutely minimal (e.g., do not include PDF output files), and also make examples minimal (e.g., if you need a .bib example, try to only leave one or two bibliography entries in it, and don't include too many items in it without using all of them).

  • Update Rd and namespace (could be done by devtools::document()).

  • Update NEWS.

  • Update README with a link to the newly supported journal. Please add your Github username and the full name of the journal (follow other examples in the list).

  • Add a test to tests/testit/test-formats.R. We try to keep them in alphabetical order.

  • Add your name to the list of authors Authors@R in DESCRIPTION. You don't need to bump the package version in DESCRIPTION.

Lastly, please try your best to do only one thing per pull request (e.g., if you want to add two output formats, do them in two separate pull requests), and refrain from making cosmetic changes in the code base: https://yihui.name/en/2018/02/bite-sized-pull-requests/

Thank you!

@yihui yihui requested a review from cderv August 6, 2020 14:45
@cderv cderv self-assigned this Aug 6, 2020
Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution !

I left a few comments below. General ones:

  • The content of the skeleton is rather simple. You did not use any citation for example, that means the format is not tested with the bib. I don't think it is working currently. Can you check that ? You may need to use natbib citation package and not the default pandoc... 🤔
  • If you wish, you can take some example of OpenMindSample.tex to add them in the Rmd to show some content for examples. the sample file provided by OpenMind is rather exhaustive! Could be worth it. Unless each user is well aware of how it works.

Don't mind the potential git conflict, I'll deal with them later.

\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

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

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

Comment on lines 59 to 61
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.

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.

@CLAassistant
Copy link

CLAassistant commented Sep 24, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ cderv
❌ mikabr
You have signed the CLA already but the status is still pending? Let us recheck it.

@cderv
Copy link
Collaborator

cderv commented Jun 9, 2021

Hi @mikabr,

do you plan to keep on working on this following the review ?

Just trying to know the status of this PR.

thanks!

@mikabr
Copy link
Author

mikabr commented Jun 23, 2021

@cderv really sorry for the delay, it's been on my backburner for a while but I'd still like to complete it if that would be possible

@cderv
Copy link
Collaborator

cderv commented Jun 23, 2021

@mikabr Thanks for getting back to me! Sure that would be possible. Really no issue to take your time on this, I just wanted to know if it still was in your scope 😉

Things could move in the meantime so you'll need to deal with merge conflict to solve but nothing to impactful I believe. Ask me if you need anything.

And ping me when you are ready for a final review.

Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

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

Hey,

As it is already an old PR, I have updated it to merge master branch into this. This will allow you to start on correct ground when you'll finish the work on this one.

The comments above marked as outdated are still valid by the way. It is just that the file has moved.

@@ -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).

Comment on lines +307 to +308
#' @section `opmi_article`: Format for creating Open Mind articles. Adapted from
#' \url{https://www.mitpressjournals.org/journals/opmi/sub}.
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

@@ -0,0 +1,85 @@
\documentclass[$class_option$]{stjour}

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

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

Comment on lines +39 to +48
\title[$short_title$]{$title$}
$if(subtitle)$
\subtitle{$subtitle$}
$endif$

\author[$short_author$]{
$for(author)$
$author.name$\affil{$author.affiliation$}$sep$,
$endfor$
}
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

Comment on lines +311 to +313
opmi_article <- function(..., keep_tex = TRUE) {
pdf_document_format("opmi", keep_tex = keep_tex, ...)
}
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.

$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

@cderv
Copy link
Collaborator

cderv commented Apr 19, 2023

👋 @mikabr - Just getting back on this for update on the status.

but I'd still like to complete it if that would be possible

Is this still a project you want to finish ?

@cderv cderv removed their assignment Apr 19, 2023
@cderv cderv added the WIP label Apr 19, 2023
@mikabr
Copy link
Author

mikabr commented Apr 29, 2023

👋 @mikabr - Just getting back on this for update on the status.

but I'd still like to complete it if that would be possible

Is this still a project you want to finish ?

given that I haven't gotten to it in a year and a half, I think it's unlikely to happen

@cderv
Copy link
Collaborator

cderv commented May 2, 2023

OK I'll se if / when I can get to it then. thanks

@cderv cderv marked this pull request as draft May 2, 2023 08:53
@cderv cderv added the help wanted ❤️ we'd love your help! label May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted ❤️ we'd love your help! WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants