Permalink
Browse files

also set out.format when an appropriate pattern is found

  • Loading branch information...
1 parent c80751a commit 206f8d8e1a7b0f794fb157f8dff566ba82bfa55d @yihui committed Apr 10, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 R/output.R
View
@@ -124,6 +124,8 @@ knit = function(input, output = NULL, tangle = FALSE, text = NULL) {
'see ?knit_patterns on how to set up customized patterns')
knit_patterns$restore()
knit_patterns$set(apat[[pattern]])
+ opts_knit$set(out.format = switch(pattern, rnw = 'latex', tex = 'latex',
+ html = 'html', gfm = 'gfm'))
}
optk = opts_knit$get(); on.exit(opts_knit$set(optk), add = TRUE)

0 comments on commit 206f8d8

Please sign in to comment.