Closed ms609 closed 1 year ago
Thanks for trying out this new function!
You will only need to supply the file name for the name
argument in zip_paper()
and in your case, it will be zip_paper("articleName")
. This string will be used to match files in the directory and include them in the zip. The directory name is not needed.
I have just added some codes to include the articleName_file
directory in the zip and this should make the html page viewable.
rjtools::zip_paper("articleName")
produces:
Removing created paper.zip and associated paper folder if detected.
adding: Article/RJwrapper.log (deflated 76%)
adding: Article/RJwrapper.pdf (deflated 25%)
adding: Article/RJwrapper.tex (deflated 44%)
i.e. source files (articleName.bib
, articleName.Rmd
, etc) and HTML output are missing.
(I also wonder how this would handle a case where two separate sub-directories contain different articles named articleName
.)
Is it possible to take a look at your repo?
articleName
in zip_paper()
should find all the files whose name contain articleName
, which includes articleName.bib
, articleName.Rmd
.
Thanks for offering to take a look. I've invited you as a collaborator to my private repo. Hopefully you can see what you need.
Thanks for sharing.
You will need to knit the Rmd
file, which should create the following files and folder:
RJwrapper.log
RJwrapper.pdf
smith_files/
smith.html
smith.R
smith.tex
, and Then, rjtools::zip_paper()
will generate a zip file with everything needed.
Also you may want to include CoverLetter.md
and Figures
as supplementary materials for your submission. These will need to be specified through the others
argument as:
rjtools::zip_paper("smith", others = c("Figures", "CoverLetter.md"))
Thanks – knitting the Rmd file does create these files (which omit from the repo with a .gitignore
) but they are still not included in zip_paper()
.
I think I noticed that the create-article function in rjtools creates a motivation-letter.md
file, which I modified in the repo – is CoverLetter.md
in fact the preferred file name? I had assumed that zip_paper()
would automatically include the files created by the article creation function.
With your repo, I can generate a zip that includes these files:
RJwrapper
files: RJwrapper.log
, RJwrapper.pdf
, RJwrapper.tex
smith
files with extension .bib
, .html
, .R
, .Rmd
, .tex
, and the smith_files
foldersmotivation-letter.md
is now included in zip created by zip_paper()
. We encourage users to directly modify this file for the cover letter and if a different name is used, you will have to explicitly specify it .
I've just updated rjtools from github and run zip_paper("smith")
again from the root directory. paper.zip
does now include a .bib
, .html
, .R
, .Rmd
, and .tex
file, but not smith_files
. I have double-checked that the Article
directory contains a smith_files
subdirectory.
Could the difference between our outcomes reflect an operating system issue? (I'm on Windows 10.)
oh, this may be the reason. I just changed how file path is created and hopefully this now works for Windows, if this is still of your interest now.
@ms609 on your submission we also see that it is missing some of the pre-created figures, eg TreeSpace.png . You need to specifically include these file names when you run zip_paper()
.
I used
create_article(file_name = "articleName", dir_path = "Article")
to create an article in the "Article" subdirectory.I was surprised to have an article returned for resubmission when the zip archive I constructed with
zip_paper(name = "Article/articleName")
didn't contain the necessary HTML & PDF files. On reinspection, I see that the contents of other subdirectories are also included in this zip: I seePerhaps
zip_paper
also needs adir_path
parameter? Or if this is the intended behaviour, could a message be displayed to the user advising on what further steps must be taken?As a workaround, I think it is possible to go:
Then I see
But this does not include the
articleName_files
directory to accompanyarticleName.html
, meaning that the html page is not viewable (as its default body css stylevisibility:hidden
is not removed).Session info