trinker / reports

An R package to assist in the workflow of writing academic articles and other reports
http://cran.us.r-project.org/web/packages/reports/
102 stars 25 forks source link

Incorporate scaffold argument of author in new_report and presentation fucntions #30

Closed trinker closed 11 years ago

trinker commented 11 years ago

Ramnath stated here that:

Ramnath: I have added a scaffold argument to author that lets you specify a custom folder to be used as a scaffold. This should make it easier for you to create a custom scaffold in the inst directory of your package, and then pass it as an argument. Let me know if you have any questions

Take advantage of this in new_report and presentation

trinker commented 11 years ago

I believe I will address this by:

  1. Eliminating the use of author and then altering author's defualt.
  2. Using the scaffold argument to author to add either aRmd from within reports or an external path to a custom Rmd file
  3. In slidify_libraries folder I have the [full(scaffold argument to author) examples from slidifyExamples that the user can specify with a period followed by the exact name Ramnath uses for the library (e.g. .io2012) or the user can use the min files to get a minimal version.
  4. The user will specify this Rmd file with an argument slidify = getOption("slidify.template") that can be set in the .Rprofile's options. NULL results in using io2012 (min version with no period because I like that one). This will replace slidify.clean = FALSE. User can pass a path to a custom Rmd as well.

Internal:

  1. If argument to slidify begins with a period search the full libraries first for the file, (if not there check if file.exists. For no period started check the min directory first and then check is file'exists.
  2. Problematically, add name and title to YAML (reveal.js needs special attention in this replacement)

_Note_ add custom css to at least revea.js seen here: https://github.com/trinker/reports/issues/18#issuecomment-15199110

trinker commented 11 years ago

@Ramnathv if you can spare some time can you please look through the min files and update appropriately. I know you've said some widgets go better with various frameworks. I imagine some of the YAML is appropriate for some frameworks and not others as well (like the logos and subtitles).

The goal is to have the best minimal set up (though include appropriate widgets that play nicely with the framwork; it's easier to delete widgets you won't use than to add widgets you will use) for each framework (in Ramnath's opinion)

Thank you kindly. Feel free to fork and do a merge request. I would appreciate this greatly.

trinker commented 11 years ago

Also readers to put a slidify folder in personal templates with a slidify Rmd that will override the proposed slidify argument. This will not be allowed in public templates (I don't think anyway) included with the reports package as it makes a template much too narrow for widespread use.

trinker commented 11 years ago

scaffold was too much muscle for the job I was after (simply replacing a Rmd). I did do as I described but did so by creating the index .rmd via author and then replacing it with a static Rmd stored in reports. I'm still awaiting Ramnath to give feedback on optimal minimal files but the function changes themselves are completed.

trinker commented 11 years ago

closed but the minimal Rmds may still be tweaked

ramnathv commented 11 years ago

I apologize for the delay in looking into this, but I will make it a priority this week so that I can get feedback to you.