SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: Problem with a table in exams2pdf [ Reply ]
By: Achim Zeileis on 2018-03-06 08:18
[forum:45740]
No prob, glad if it's useful for you!

RE: Problem with a table in exams2pdf [ Reply ]
By: Francisco Goerlich on 2018-03-06 07:45
[forum:45739]
It also works for me!
Many thanks for the help and for the useful package.
Regards,

RE: Problem with a table in exams2pdf [ Reply ]
By: Achim Zeileis on 2018-03-05 23:34
[forum:45738]
The code uses pandoc to convert the Markdown exercises to LaTeX, prior to embedding it into your templates. And pandoc makes use of some extra packages for the table formatting, namely booktabs and longtable. (Also you need eurosym to display the euro symbol via pandoc.)

Thus, simply extend line 6 of your examen.tex file to:

\usepackage{a4wide,color,verbatim,Sweave,url,xargs,amsmath,booktabs,longtable,eurosym}

After that change the following works fine for me:

exams2pdf("020211.Rmd", template = "examen.tex", encoding = "UTF-8")

Problem with a table in exams2pdf [ Reply ]
By: Francisco Goerlich on 2018-03-05 19:25
[forum:45736]

ExamsTable.zip (6) downloads
Hello,

When using the 'plain8,tex' template (by default) in 'exams2pdf(theQuiz, encoding = 'UTF-8')' then a table in an exercise in printed correctly. See GoodTable.pdf file question 8.

But when using 'examen.tex' template (an slightly modified 'exam.tex' template that cames with program), then the same table is printed incorrectly. The comand I use is: 'exams2pdf(theQuiz, encoding = 'UTF-8', edir = qdir, template = c('examen','solucion'), n = 1, header = list(ID = students[k, 4], Date = Fecha))'
See BadTable.pdf file question 8.

It is not clear to me how to modify the templates to get the table printed correctly.

I also attach the Rmd file in the zip file.

Many thanks in advanced,

Thanks to:
Vienna University of Economics and Business Powered By FusionForge