Skip to content

Conversation

@rcannood
Copy link
Contributor

@rcannood rcannood commented Dec 6, 2019

I implemented a fix for #257. Perhaps you might want to take a look at the implementation -- because I changed a hacky function into something that's even hackier.

Here is a small example: files.zip. The file test_needs_include.Rmd will fail with the current version of rticles and should be solved with this PR.

Also, I changed a rasterised image into a vectorised one.

Hope this helps!
Robrecht

Checklist:

  • Update NEWS.

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

Not applicable
  • 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 jj@rstudio.com.

  • 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. Please keep the number of new files absolutely minimal, 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 one hundred items in it without using all of them).

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

  • Update README with a link to the newly supported journal.

  • Add a test to tests/testit/test-formats.R.

@rcannood rcannood changed the title Remove duplicate header includes, fixes #257 Remove duplicate header includes Dec 6, 2019
@rcannood rcannood changed the title Remove duplicate header includes Fix header inludes for rjournal_article() Dec 7, 2019
@rcannood rcannood closed this Dec 7, 2019
@rcannood rcannood reopened this Dec 7, 2019
@rcannood
Copy link
Contributor Author

rcannood commented Dec 7, 2019

Oops, didn't mean to click that >_>

Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

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

I think this is a correct fix. As you said, it looks hackish, so I'll see if I can tweak it a little bit. Thank you very much!

…preamble` field in YAML, or the `header-includes` field, or the `includes` option of `rticles::rjournal_article`
@yihui yihui merged commit ebc84d8 into rstudio:master Dec 10, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants