Comments (6)
I am not at a computer so I can't be positive this is the problem, but it
looks like from your example you do not call the knitr render_markdown
function. Put that function in the first code block or in a setup block
and it should work. I will take a look at this and make sure I am correct
when I can. Sorry fir the problems, there is not a great way for me to fix
this particular issue transparently unfortunately.
On Oct 13, 2013 2:39 PM, "Carson" [email protected] wrote:
This probably isn't a real issue (just me being ignorant), but for some
reason, I can't get proper code highlighting using the RStudio option:options(rstudio.markdownToHTML =
function(inputFile, outputFile) {
require(knitrBootstrap)
knit_bootstrap_md(input=inputFile, output=outputFile)
}
)I've also tried changing the default code_style option:
options(rstudio.markdownToHTML =
function(inputFile, outputFile) {
require(knitrBootstrap)
knit_bootstrap_md(input=inputFile, output=outputFile, code_style='tomorrow')
}
)Not sure how I can provide a reproducible example, but herehttps://github.com/cpsievert/cpsievert.github.com/tree/master/projects/615/HW4is what I'm working on. Also, I'm using RStudio version 0.98.313 and here
is my sessionInfo:R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8attached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] knitrBootstrap_0.8.0 markdown_0.6.3 knitr_1.5 dlm_1.1-3 XML2R_0.1
[6] roxygen2_2.2.2 digest_0.6.3 devtools_1.3loaded via a namespace (and not attached):
[1] brew_1.0-6 evaluate_0.5 formatR_0.9 httr_0.2 memoise_0.1 parallel_3.0.1 plyr_1.8 RCurl_1.95-4.1
[9] stringr_0.6.2 tools_3.0.1 whisker_0.3-2 XML_3.95-0.2—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25
.
from knitrbootstrap.
I just tried that and it doesn't seem to help. I also pushed the changes to the input file to make sure I'm not missing something...
from knitrbootstrap.
Sorry I told you the wrong function the first time. The function you need to call is knitr::render_html() Code highlighting in your example seems to work fine once you do that. My apologies, I should have proof read my email more thoroughly the first time.
from knitrbootstrap.
Ah, yes. That was the issue. One more thing. I noticed that the cached code chunks aren't highlighted. Is there a workaround for that? My instinct would be to add echo=FALSE the cached chunk, then rewrite that chunk with eval=FALSE, but that is obviously not optimal.
from knitrbootstrap.
That is just because the result is cached from before you added
render_html(). Just delete your cache and rerun and it will work properly.
On Sun, Oct 13, 2013 at 4:50 PM, Carson [email protected] wrote:
Ah, yes. That was the issue. One more thing. I noticed that the cached
code chunks aren't highlighted. Is there a workaround for that? My instinct
would be to add echo=FALSE the cached chunk, then rewrite that chunk with
eval=FALSE, but that is obviously not optimal.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-26226758
.
from knitrbootstrap.
Awesome. Looks good now. Thanks!
from knitrbootstrap.
Related Issues (20)
- Allow knitrBootstrap to be used as a vignette engine HOT 3
- Using bootstrap.thumnail HOT 1
- Scrolling of the menu / table of contents HOT 1
- Add support for "self_contained" document option HOT 9
- Title in YAML header HOT 18
- Rendering datatable() from DT package fails HOT 1
- General package documentation listed as primerTree HOT 1
- d3heatmap with knitrBootstrap doesn't work HOT 1
- Allow additional pandoc options HOT 1
- Display figure captions HOT 6
- No produce figures in base64
- What are the code styling options? HOT 1
- Line breaks are gone in R code and output HOT 5
- Can knitrBootstrap make slide decks (ioslides/slidy)? HOT 5
- rpivotTable is not getting drawn with this HOT 3
- No title and table of content
- leaflet maps do not show up when using knitrBootstrap::bootstrap_document:
- custom css HOT 1
- Renders VERY narrow HOT 3
- maptools archived
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knitrbootstrap.