0

After creating the exams' solution, I noticed that the first page uses some default information. Can I edit the university, subject and date? The date is not the same used in the argument date = "16-01-2021":

exams2pdf(exercises, 
          n = 1, 
          nsamp = 1, 
          language = "pt-PT",
          showpoints = T,
          institution = "Análise Estatística II", 
          title = "Época Normal: Métodos Tipo I - ", 
          logo = "/home/ubuntu/Disciplines/AEII/Minitestes/2019-20/Recurso/ISPA_IU.png", 
          dir = "nops_pdf", 
          name = paste0("Ex_AEII_MTI_v",i,"_"), 
          date = "16-01-2021",
          encoding = "UTF-8",  
          blank = 0,  
          nchoice = 5, 
          duplex = T, 
          reglength = 5, 
          replacement = T,
          schoice = list(eval = ee), 
          template = "solution")

enter image description here

Sinval
  • 1,315
  • 1
  • 16
  • 25
  • This was already answered as part of your previous question above: No, solution.tex was not designed for that. `exams2pdf()` was designed for the case where users write their own master template file. The exam.tex and solution.tex are just demos how this works. In contrast `exams2nops()` works in the following way: Based on user inputs it generates a suitable LaTeX template in the background and then calls `exams2pdf()`. – Achim Zeileis Jan 19 '21 at 15:17
  • Yes, thank you. I will try to automatize the solution with the exam date. Otherwise, each time I create an exam I will have to change the date in "my_solution.tex". – Sinval Jan 19 '21 at 15:19
  • Yes, this is why you can insert certain pieces of information like the ID and the Date into the template through the `header` argument. See Section 3 in `vignette("exams", package = "exams")`. In principle, this mechanism could also be used to set the university name, the exam title, the logo, etc. But as I explained in the other thread: `exams2pdf()` was written under the assumption that most users would want to customize their LaTeX template anyway. And it's hard to do that with one big flexible template - as you witnessed when you tried to tweak details in the layout of `exams2nops()`. – Achim Zeileis Jan 19 '21 at 15:23
  • Yes, I understand. So, each time I generate `exams2nops`, I will also incorporate `exams2pdf(...template="my_solution.tex"...)` in the loop. But before that, I will change the date in the `.tex` file... no big deal. :) – Sinval Jan 19 '21 at 15:31

0 Answers0