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

Simple document format #68

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open

Simple document format #68

wants to merge 52 commits into from

Conversation

jimhester
Copy link
Owner

This is a major restructuring of the package embracing rmarkdown fully. It has two main features,

  1. fully support rmarkdown, building knitrBootstrap off of html_document()
  2. simplify the code by removing features
    • style and code theme choosers
    • global toggles

It aims to do as little work in javascript as possible, namely no DOM restructuring (other than highlighting).

@znmeb
Copy link

znmeb commented Oct 7, 2014

Thanks!! Once that's done will it upgrade cleanly to Bootstrap 3.2.0?

@znmeb
Copy link

znmeb commented Oct 8, 2014

If I want to test this, can I just do devtools::install_github('jimhester/knitrBootstrap', ref = 'rmarkdown_template')?

@jimhester
Copy link
Owner Author

Yes you can do either

# to install from the rmarkdown_template branch
devtools::install_github('jimhester/knitrBootstrap', ref = 'rmarkdown_template')
# or
devtools::install_github('jimhester/knitrBootstrap@rmarkdown_template')

# To install directly from this pull request
devtools::install_github('jimhester/knitrBootstrap#68')

Let me know if you have issues, or if you miss features I took out. I can add some back if they are things people liked.

The easiest way to get started is to use the rmarkdown templates in Rstudio.

@znmeb
Copy link

znmeb commented Oct 9, 2014

OK - I'll be testing it tonight!! Do you have your own rmarkdown templates? I've been using the "Mosaic Fancy" template from https://github.com/rpruim/mosaic as a template and it works great once I figured out the MathJax code for in-line math.

@znmeb
Copy link

znmeb commented Oct 9, 2014

I did a "new file" from the "knitrBootstrap" template in RStudio. That creates a directory with an Rmd file and a js and css folder. Doing a "knit" in RStudio gives an error -

Error in (function (css = NULL, theme = NULL, highlight = NULL, ...)  : 
  could not find function "%||%"
Calls: <Anonymous> -> create_output_format -> do.call -> <Anonymous>
Execution halted

So does running "rmarkdown::render" in the console:

> getwd()
[1] "/data/Projects/journal-source/stories/knitrBootstrap"
> rmarkdown::render('knitrBootstrap.Rmd')
Error in (function (css = NULL, theme = NULL, highlight = NULL, ...)  : 
  could not find function "%||%"
> 

@znmeb
Copy link

znmeb commented Oct 9, 2014

It looks like there aren't any vignettes now - at least only 'DESCRIPTION' and 'NEWS' are showing in the help panel. The install appears to have worked.

> devtools::install_github('jimhester/knitrBootstrap@rmarkdown_template')
Downloading github repo jimhester/knitrBootstrap@rmarkdown_template
Installing knitrBootstrap
'/usr/lib64/R/bin/R' --vanilla CMD INSTALL  \
  '/tmp/RtmpG1nI5K/devtools28ca7e37c723/jimhester-knitrBootstrap-25924a2'  \
  --library='/usr/lib64/R/library' --install-tests 

* installing *source* package ‘knitrBootstrap’ ...
** R
** exec
** inst
** preparing package for lazy loading
** help
No man pages found in package  ‘knitrBootstrap’ 
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (knitrBootstrap)
Making 'packages.html' ... done
> 

@znmeb
Copy link

znmeb commented Oct 9, 2014

Here's what's in the library after the install:

/usr/lib64/R/library/knitrBootstrap:
total 48
-rw-r--r--. 1 root root  984 Oct  8 20:45 DESCRIPTION
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 examples
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 exec
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 help
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 html
-rw-r--r--. 1 root root   40 Oct  8 20:45 LICENSE
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 Meta
-rw-r--r--. 1 root root  159 Oct  8 20:45 NAMESPACE
-rw-r--r--. 1 root root 2202 Oct  8 20:45 NEWS
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 R
drwxr-xr-x. 4 root root 4096 Oct  8 20:45 rmarkdown
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 templates

/usr/lib64/R/library/knitrBootstrap/examples:
total 3448
-rw-r--r--. 1 root root 3067595 Oct  8 20:45 all.html
-rw-r--r--. 1 root root     489 Oct  8 20:45 all.Rmd
-rw-r--r--. 1 root root  440344 Oct  8 20:45 engines.html
-rw-r--r--. 1 root root    3590 Oct  8 20:45 engines.Rmd
-rw-r--r--. 1 root root    6394 Oct  8 20:45 messages.html
-rw-r--r--. 1 root root     630 Oct  8 20:45 messages.Rmd

/usr/lib64/R/library/knitrBootstrap/exec:
total 4
-rwxr-xr-x. 1 root root 3010 Oct  8 20:45 encode.pl

/usr/lib64/R/library/knitrBootstrap/help:
total 12
-rw-r--r--. 1 root root  60 Oct  8 20:45 aliases.rds
-rw-r--r--. 1 root root   0 Oct  8 20:45 AnIndex
-rw-r--r--. 1 root root   0 Oct  8 20:45 knitrBootstrap.rdb
-rw-r--r--. 1 root root 113 Oct  8 20:45 knitrBootstrap.rdx
-rw-r--r--. 1 root root  64 Oct  8 20:45 paths.rds

/usr/lib64/R/library/knitrBootstrap/html:
total 8
-rw-r--r--. 1 root root  920 Oct  8 20:45 00Index.html
-rw-r--r--. 1 root root 1179 Oct  8 20:45 R.css

/usr/lib64/R/library/knitrBootstrap/Meta:
total 20
-rw-r--r--. 1 root root  190 Oct  8 20:45 hsearch.rds
-rw-r--r--. 1 root root   38 Oct  8 20:45 links.rds
-rw-r--r--. 1 root root  228 Oct  8 20:45 nsInfo.rds
-rw-r--r--. 1 root root 1020 Oct  8 20:45 package.rds
-rw-r--r--. 1 root root  164 Oct  8 20:45 Rd.rds

/usr/lib64/R/library/knitrBootstrap/R:
total 16
-rw-r--r--. 1 root root 1056 Oct  8 20:45 knitrBootstrap
-rw-r--r--. 1 root root 7354 Oct  8 20:45 knitrBootstrap.rdb
-rw-r--r--. 1 root root  523 Oct  8 20:45 knitrBootstrap.rdx

/usr/lib64/R/library/knitrBootstrap/rmarkdown:
total 8
drwxr-xr-x. 5 root root 4096 Oct  8 20:45 rmd
drwxr-xr-x. 4 root root 4096 Oct  8 20:45 templates

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd:
total 16
drwxr-xr-x. 5 root root 4096 Oct  8 20:45 bootstrap3
-rw-r--r--. 1 root root 2690 Oct  8 20:45 default.html
drwxr-xr-x. 3 root root 4096 Oct  8 20:45 highlightjs
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 magnific_popup

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3:
total 12
drwxr-xr-x. 3 root root 4096 Oct  8 20:45 css
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 fonts
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 js

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css:
total 112
-rw-r--r--.  1 root root 109518 Oct  8 20:45 bootstrap.min.css
drwxr-xr-x. 19 root root   4096 Oct  8 20:45 themes

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes:
total 68
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 amelia
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 cerulean
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 cosmo
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 cyborg
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 darkly
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 flatly
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 journal
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 lumen
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 paper
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 readable
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 sandstone
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 simplex
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 slate
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 spacelab
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 superhero
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 united
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 yeti

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/amelia:
total 112
-rw-r--r--. 1 root root 111576 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/cerulean:
total 112
-rw-r--r--. 1 root root 114267 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/cosmo:
total 112
-rw-r--r--. 1 root root 111733 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/cyborg:
total 112
-rw-r--r--. 1 root root 111555 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/darkly:
total 112
-rw-r--r--. 1 root root 113576 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/flatly:
total 112
-rw-r--r--. 1 root root 113285 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/journal:
total 112
-rw-r--r--. 1 root root 111171 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/lumen:
total 116
-rw-r--r--. 1 root root 116301 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/paper:
total 116
-rw-r--r--. 1 root root 116578 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/readable:
total 112
-rw-r--r--. 1 root root 112177 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/sandstone:
total 112
-rw-r--r--. 1 root root 112036 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/simplex:
total 112
-rw-r--r--. 1 root root 113254 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/slate:
total 124
-rw-r--r--. 1 root root 123889 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/spacelab:
total 116
-rw-r--r--. 1 root root 116538 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/superhero:
total 112
-rw-r--r--. 1 root root 112381 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/united:
total 108
-rw-r--r--. 1 root root 110052 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/css/themes/yeti:
total 116
-rw-r--r--. 1 root root 114962 Oct  8 20:45 bootstrap.min.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/fonts:
total 152
-rw-r--r--. 1 root root 20335 Oct  8 20:45 glyphicons-halflings-regular.eot
-rw-r--r--. 1 root root 62927 Oct  8 20:45 glyphicons-halflings-regular.svg
-rw-r--r--. 1 root root 41280 Oct  8 20:45 glyphicons-halflings-regular.ttf
-rw-r--r--. 1 root root 23320 Oct  8 20:45 glyphicons-halflings-regular.woff

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/bootstrap3/js:
total 32
-rw-r--r--. 1 root root 31819 Oct  8 20:45 bootstrap.min.js

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/highlightjs:
total 44
drwxr-xr-x. 2 root root  4096 Oct  8 20:45 highlight
-rw-r--r--. 1 root root 37977 Oct  8 20:45 highlight.pack.js

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/highlightjs/highlight:
total 196
-rw-r--r--. 1 root root 2235 Oct  8 20:45 arta.css
-rw-r--r--. 1 root root  830 Oct  8 20:45 ascetic.css
-rw-r--r--. 1 root root 1738 Oct  8 20:45 atelier-dune.dark.css
-rw-r--r--. 1 root root 1752 Oct  8 20:45 atelier-dune.light.css
-rw-r--r--. 1 root root 1763 Oct  8 20:45 atelier-forest.dark.css
-rw-r--r--. 1 root root 1772 Oct  8 20:45 atelier-forest.light.css
-rw-r--r--. 1 root root 1753 Oct  8 20:45 atelier-heath.dark.css
-rw-r--r--. 1 root root 1762 Oct  8 20:45 atelier-heath.light.css
-rw-r--r--. 1 root root 1784 Oct  8 20:45 atelier-lakeside.dark.css
-rw-r--r--. 1 root root 1793 Oct  8 20:45 atelier-lakeside.light.css
-rw-r--r--. 1 root root 1774 Oct  8 20:45 atelier-seaside.dark.css
-rw-r--r--. 1 root root 1783 Oct  8 20:45 atelier-seaside.light.css
-rw-r--r--. 1 root root 1769 Oct  8 20:45 brown_paper.css
-rw-r--r--. 1 root root 1520 Oct  8 20:45 codepen-embed.css
-rw-r--r--. 1 root root 2809 Oct  8 20:45 color-brewer.css
-rw-r--r--. 1 root root 1740 Oct  8 20:45 dark.css
-rw-r--r--. 1 root root 2602 Oct  8 20:45 default.css
-rw-r--r--. 1 root root 1814 Oct  8 20:45 docco.css
-rw-r--r--. 1 root root 1849 Oct  8 20:45 far.css
-rw-r--r--. 1 root root 1604 Oct  8 20:45 foundation.css
-rw-r--r--. 1 root root 1723 Oct  8 20:45 github.css
-rw-r--r--. 1 root root 2138 Oct  8 20:45 googlecode.css
-rw-r--r--. 1 root root 2674 Oct  8 20:45 hybrid.css
-rw-r--r--. 1 root root 1775 Oct  8 20:45 idea.css
-rw-r--r--. 1 root root 1486 Oct  8 20:45 ir_black.css
-rw-r--r--. 1 root root 1547 Oct  8 20:45 kimbie.dark.css
-rw-r--r--. 1 root root 1547 Oct  8 20:45 kimbie.light.css
-rw-r--r--. 1 root root 1878 Oct  8 20:45 magula.css
-rw-r--r--. 1 root root  923 Oct  8 20:45 mono-blue.css
-rw-r--r--. 1 root root 1992 Oct  8 20:45 monokai.css
-rw-r--r--. 1 root root 2334 Oct  8 20:45 monokai_sublime.css
-rw-r--r--. 1 root root 2256 Oct  8 20:45 obsidian.css
-rw-r--r--. 1 root root 1513 Oct  8 20:45 paraiso.dark.css
-rw-r--r--. 1 root root 1514 Oct  8 20:45 paraiso.light.css
-rw-r--r--. 1 root root 1663 Oct  8 20:45 pojoaque.css
-rw-r--r--. 1 root root 2574 Oct  8 20:45 railscasts.css
-rw-r--r--. 1 root root 1619 Oct  8 20:45 rainbow.css
-rw-r--r--. 1 root root 1961 Oct  8 20:45 school_book.css
-rw-r--r--. 1 root root 1622 Oct  8 20:45 solarized_dark.css
-rw-r--r--. 1 root root 1622 Oct  8 20:45 solarized_light.css
-rw-r--r--. 1 root root 2262 Oct  8 20:45 sunburst.css
-rw-r--r--. 1 root root 1449 Oct  8 20:45 tomorrow.css
-rw-r--r--. 1 root root 1623 Oct  8 20:45 tomorrow-night-blue.css
-rw-r--r--. 1 root root 1553 Oct  8 20:45 tomorrow-night-bright.css
-rw-r--r--. 1 root root 1620 Oct  8 20:45 tomorrow-night.css
-rw-r--r--. 1 root root 1557 Oct  8 20:45 tomorrow-night-eighties.css
-rw-r--r--. 1 root root 1534 Oct  8 20:45 vs.css
-rw-r--r--. 1 root root 2270 Oct  8 20:45 xcode.css
-rw-r--r--. 1 root root 1854 Oct  8 20:45 zenburn.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/rmd/magnific_popup:
total 24
-rw-r--r--. 1 root root  7782 Oct  8 20:45 magnific-popup.css
-rw-r--r--. 1 root root 14630 Oct  8 20:45 magnific-popup.js

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates:
total 8
drwxr-xr-x. 3 root root 4096 Oct  8 20:45 knitrBootstrap
drwxr-xr-x. 3 root root 4096 Oct  8 20:45 simple

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/knitrBootstrap:
total 8
drwxr-xr-x. 4 root root 4096 Oct  8 20:45 skeleton
-rw-r--r--. 1 root root   59 Oct  8 20:45 template.yaml

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/knitrBootstrap/skeleton:
total 12
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 css
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 js
-rw-r--r--. 1 root root  124 Oct  8 20:45 skeleton.Rmd

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/knitrBootstrap/skeleton/css:
total 12
-rw-r--r--. 1 root root 11706 Oct  8 20:45 knitrBootstrap.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/knitrBootstrap/skeleton/js:
total 4
-rw-r--r--. 1 root root 1252 Oct  8 20:45 knitrBootstrap.js

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/simple:
total 8
drwxr-xr-x. 4 root root 4096 Oct  8 20:45 skeleton
-rw-r--r--. 1 root root   74 Oct  8 20:45 template.yaml

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/simple/skeleton:
total 12
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 css
drwxr-xr-x. 2 root root 4096 Oct  8 20:45 js
-rw-r--r--. 1 root root  107 Oct  8 20:45 skeleton.Rmd

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/simple/skeleton/css:
total 8
-rw-r--r--. 1 root root 5017 Oct  8 20:45 simple.css

/usr/lib64/R/library/knitrBootstrap/rmarkdown/templates/simple/skeleton/js:
total 4
-rw-r--r--. 1 root root 894 Oct  8 20:45 simple.js

/usr/lib64/R/library/knitrBootstrap/templates:
total 44
-rw-r--r--. 1 root root  2742 Oct  8 20:45 default.html
-rw-r--r--. 1 root root  7297 Oct  8 20:45 knitr_bootstrap_code_style_toggle.html
-rw-r--r--. 1 root root 11730 Oct  8 20:45 knitr_bootstrap.css
-rw-r--r--. 1 root root  1947 Oct  8 20:45 knitr_bootstrap_includes.html
-rw-r--r--. 1 root root  5391 Oct  8 20:45 knitr_bootstrap.js
-rw-r--r--. 1 root root  4110 Oct  8 20:45 knitr_bootstrap_style_toggle.html

@jimhester
Copy link
Owner Author

Sorry you ran into difficulties, I split a few functions into their own file but neglected to add it to the repository. If you reinstall the latest version from the branch it should now work.

@znmeb
Copy link

znmeb commented Oct 9, 2014

Yep - working now! Notes:

  1. MathJax doesn't seem to be enabled by default - I'll dig into that a bit later
  2. The toggles for displaying R code and results seem to be there by default. I don't remember seeing in the documentation how to get rid of those in the YAML front matter.
  3. It is using Bootstrap 3.2.0 - I haven't cycled through the themes yet.

I don't know if I've posted this before, but the target for all of this activity is my new blog, znmeb.bitbucket.org. That's built with Nikola and I can either post HTML out of knitrBootstrap or raw Markdown there. Actually I can post anything Pandoc can handle; Nikola has the option to call out to Pandoc as a compiler. Nikola's "native" language is Restructured Text, which is big amongst the Pythonistas.

@jimhester
Copy link
Owner Author

@znmeb Mathjax should be working now. As far as the toggles go there is no way to get rid of them completely. You may want to try using simple_document which uses only a small toggle on the side of each block instead of the buttons or panels used in bootstrap_document.

I could also make a version which does not have a toggle at all and only has a thin panel outline based on the code type if that is what you are looking for.

@znmeb
Copy link

znmeb commented Oct 10, 2014

I'm going for "mobile first" here - the toggles (and the old navbar and theme magic) work on a mobile small screen but they distract from the content. If you've got a recent version of Firefox handy, go into the 'Developer' menu, select 'Responsive Design View' and look at a rendered page with resolution 320x480. Bootstrap 3 itself works that way, although I've had some issues with a few of the themes. I ended up with 'Cosmo' on http://znmeb.bitbucket.org/stories/mosaic-fancy-test-document.html because of the theme issues.

@znmeb
Copy link

znmeb commented Oct 10, 2014

Incidentally, the workflow for that test page used RStudio knit .Rmd -> Pandoc Markdown followed by Nikola Pandoc compilation of the Markdown to HTML. Migrating to knitrBootstrap will replace all the rendering in Nikola with HTML made in RStudio.

@lcolladotor
Copy link
Contributor

Hi,

I just noticed all of these changes. Is there somewhere I should look for some minor docs? Or should I wait a bit longer before testing?

I am hoping that it won't be too hard to switch to this version from the previous github one as I'm using knitrBootstrap for my recently accepted packages in Bioconductor.

I'm using a makefile for creating the vignettes and specifying the appropriate call depending on the knitrBoostrap version as seen here.

Thank you again for making knitrBootstrap!

@znmeb
Copy link

znmeb commented Oct 14, 2014

I've updated my workflow for http://znmeb.bitbucket.org; see http://znmeb.bitbucket.org/stories/blogging-with-rstudio-and-nikola.html for the details. I'm generating un-themed HTML using the standard RStudio knitr-pandoc chain. I then pass the un-themed HTML to Nikola for theming and the rest of the site building. I'll be migrating to knitrBootstrap once the next release is out and turning off most of the Nikola theming for RStudio-authored documents.

@jimhester
Copy link
Owner Author

@lcolladotor Please try out the new version, I would like as much user input as possible before switching. If you miss something let me know and I can add it. I am also thinking of making the simple format the default one, so I feedback on how everyone likes that would be great.

In terms of creating vignettes with the new version it should be easier than previously, you can just use the following YAML header. I will make a template with this header in it, so it will be very easy to do in the future.

---
title: "Vignette Title"
author: "Vignette Author"
date: "`r Sys.Date()`"
output: 
  knitrBootstrap::simple_document
    toc: true
vignette: >
  %\VignetteIndexEntry{Vignette Title}
  %\VignetteEngine{knitr::rmarkdown}
  \usepackage[utf8]{inputenc}
---

@jimhester
Copy link
Owner Author

Just an FYI to anyone watching this thread the newest version of Rmarkdown has support for code folding (http://blog.rstudio.org/2016/03/21/rmarkdown-v0-9-5/) which was one of the few remaining features knitrBootstrap had that regular rmarkdown did not.

@lcolladotor
Copy link
Contributor

Thanks for the note @jimhester. It looks very promising.

I'm guessing that you were involved in this now that you are at RStudio.

Cheers,
Leo

lcolladotor added a commit to leekgroup/regionReport that referenced this pull request Mar 21, 2016
With rmarkdown v0.9.5 released today and described at
http://blog.rstudio.org/2016/03/21/rmarkdown-v0-9-5/ it doesn't look like
knitrBootstrap adds much anymore as commented by Jim Hester himself at
jimhester/knitrBootstrap#68 (comment)

With this in mind, I'm switching the default to rmarkdown instead of using
knitrBootstrap. Specially because the version of knitrBootstrap I like to use
is only available via GitHub and will probably never make it to CRAN.

It might even make sense to completely drop the knitrBootstrap dependency,
although I'll leave it for now since there is no immediate need to drop it.

I'm also testing using the DT package for the datatables features instead of
the JS code that was included before. This might not work on this commit but
I'll get it to work soon anyway.
@lcolladotor
Copy link
Contributor

I had a lot of unread notifications from knitrBootstrap and until I went through them did I realize that @humburg has been doing a lot of great work on this package. I did switch my regionReport to use rmarkdown v0.9.5 by default as documented at leekgroup/regionReport@e9d8aeb. One feature from knitrBootstrap that I think is missing in rmarkdown is the thumbnails for the figures.

Anyhow, I don't know if you plan on pushing this branch to CRAN or not and it's probably too early to tell. For now, I'll leave the option to use knitrBootstrap on regionReport.

humburg added 2 commits March 24, 2016 11:35
* Place 'include after' block after body

* Add scrollbar to long TOC

* Replace deprecated '--no-wrap' option

* Allow wrapping option to be set in yaml header
lcolladotor added a commit to leekgroup/regionReport that referenced this pull request Aug 21, 2017
With rmarkdown v0.9.5 released today and described at
http://blog.rstudio.org/2016/03/21/rmarkdown-v0-9-5/ it doesn't look like
knitrBootstrap adds much anymore as commented by Jim Hester himself at
jimhester/knitrBootstrap#68 (comment)

With this in mind, I'm switching the default to rmarkdown instead of using
knitrBootstrap. Specially because the version of knitrBootstrap I like to use
is only available via GitHub and will probably never make it to CRAN.

It might even make sense to completely drop the knitrBootstrap dependency,
although I'll leave it for now since there is no immediate need to drop it.

I'm also testing using the DT package for the datatables features instead of
the JS code that was included before. This might not work on this commit but
I'll get it to work soon anyway.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/regionReport@115061 bc3139a8-67e5-0310-9ffc-ced21a209358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants