# Forum: support

Monitor Forum | Start New Thread
 Nested Flat Threaded Ultimate Show 25 Show 50 Show 75 Show 100
 RE: exams2pdf using Rmd gives errors [ reply ]By: Joris Meys on 2017-05-23 11:46 [forum:45147] Thank you for your swift response! And you're right about your extra comments, thank you.

 RE: exams2pdf using Rmd gives errors [ reply ]By: Achim Zeileis on 2017-05-23 11:08 [forum:45145] Joris, thanks for raising this issue. Our examples in the package never showed R _input_ (only output) and hence we never noticed this problem. The root is that by default pandoc/knitr turn on code decoration (with the {Shaded} environment) which requires the LaTeX template to define this environment. The simple workaround with the current CRAN release is to modify your .Rmd exercises to use the highlight=FALSE option in the code chunks, e.g., {r calculate, highlight=FALSE} abs(round((Mean - mu)/sqrt(Var/n), digits = 3))  In the development version of "exams" here on R-Forge I just committed a version that avoids this problem. By default highlight=FALSE now so that the .Rmd exercises do not have to do this themselves. Of course, the individual exercises can overrule the new default by setting highlight=TRUE explicitly. The devel package now also includes a plain-highlight.tex template that has the necessary environments defined. Also, the lm.Rmd exercise was extended to show the code input for solving the exercise. Compare: exams2pdf("lm.Rmd") exams2pdf("lm.Rmd", highlight = TRUE, template = "plain-highlight.tex") Two further comments on your exercises that have nothing to do with the problem: - Personally, I wouldn't include library("exams") in every exercise but simply assume that this was done prior to calling exams2xyz(). Alternatively, I would use the fully qualified function calls, e.g., exams::fmt(tstat) if I don't want to rely on the package being attached to the search path. - The col='blue' in the histogram uses a lot of highly saturated colors which can be distracting to look at for a longer time. Something like col='lightgray' is visually less invasive.

 RE: exams2pdf using Rmd gives errors [ reply ]By: Joris Meys on 2017-05-23 07:16 [forum:45138] Histogram.Rmd (4) downloads Second file