Reputation: 53
I have been using r/exams in some of my last exams and everything has worked fine. This semester, however, r/exams seems to generate the exams in Times New Roman instead of Helvetica, which messes with the character recognition in the scanning process.
Even the minimal example, produces this behavior:
library("exams")
myexam <- list("cholesky.Rnw")
set.seed(403)
ex1 <- exams2nops(myexam, n = 1,
dir = "nops_pdf", name = "demo", date = "2015-07-29",
points = c(1), showpoints = TRUE)
Does anyone have any idea what could have gone wrong? How do I see the intermediate steps? I get no error messages.
Thanks!
Upvotes: 3
Views: 189
Reputation: 17183
Starting from R/exams version 2.3-2 (the current CRAN version at the time of writing) it is enforced that the digits that need to be scanned are always in Helvetica (\fontfamily{phv}
) even if the font is switched for the rest of the document.
However, in a plain TinyTeX installation, i.e., after running just tinytex::install_tinytex()
the Helvetica font is not installed yet. Just setting \fontfamily{phv}
is not enough for TinyTeX to realize that an additional package needs to be installed (psnfss
). Therefore, I have modified the devel version of exams
on R-Forge to explicitly include \usepackage{helvet}
. This will trigger the automatic installation of psnfss
in TinyTeX. Installing version 2.3-5 should thus resolve the problem: install.packages("exams", repos = "http://R-Forge.R-project.org")
. This will also be released to CRAN in the next days.
Moreover, just for future reference, I went through the source code of exams2nops()
to check what packages we use. Partly for historical reasons there are quite a few. Possibly these could also be streamlined.
Sweave
: verbatim, url, fancyvrb, ae.helvet
, sfmath
.pandoc
from Markdown: booktabs, longtable, eurosym, textcomp.Upvotes: 3