-
Notifications
You must be signed in to change notification settings - Fork 524
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
base: main
Are you sure you want to change the base?
Conversation
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.
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$} |
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.
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$} | ||
|
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.
There is an optionnal appendix in the OpenMindTemplate.Tex
file and in your yaml header in skeleton.Rmd
. Should it be here ?
appendix: | | ||
Optional appendix | ||
\section{Sample appendix section} |
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.
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 |
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.
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.
|
Hi @mikabr, do you plan to keep on working on this following the review ? Just trying to know the status of this PR. thanks! |
@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 |
@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. |
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.
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) |
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.
- Added OpenMind template (@mikabr) | |
- Added OpenMind template (thanks, @mikabr, #305). |
#' @section `opmi_article`: Format for creating Open Mind articles. Adapted from | ||
#' \url{https://www.mitpressjournals.org/journals/opmi/sub}. |
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.
#' @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$ |
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.
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} |
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.
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} |
\title[$short_title$]{$title$} | ||
$if(subtitle)$ | ||
\subtitle{$subtitle$} | ||
$endif$ | ||
|
||
\author[$short_author$]{ | ||
$for(author)$ | ||
$author.name$\affil{$author.affiliation$}$sep$, | ||
$endfor$ | ||
} |
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.
Regarding variable name, we should try to use common values
example:
\author[$if(shortauthors)$$shortauthors$$endif$]{ |
Related to #411
opmi_article <- function(..., keep_tex = TRUE) { | ||
pdf_document_format("opmi", keep_tex = keep_tex, ...) | ||
} |
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.
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$ | ||
|
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.
We need to add other content for Pandoc. Please see other template
Example: https://github.com/rstudio/rticles/pull/427/files#r678334426
👋 @mikabr - Just getting back on this for update on the status.
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 |
OK I'll se if / when I can get to it then. thanks |
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 toR/article.R
if the output format is simple enough, otherwise create a separateR/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 viatinytex::parse_packages(files = "FILENAME"")
(e.g., whenFILENAME
isplain.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!