creating and automating exams with latex friends
play

Creating and Automating Exams with LaTeX & Friends Uwe - PowerPoint PPT Presentation

Creating and Automating Exams with LaTeX & Friends Uwe Ziegenhagen August 11, 2019 Dante e. V. Heidelberg 1 Whats this talk about? As a lecturer I need to prepare exams Exams require significant amount of time: not too


  1. Creating and Automating Exams with LaTeX & Friends Uwe Ziegenhagen August 11, 2019 Dante e. V. Heidelberg 1

  2. What’s this talk about? • As a lecturer I need to prepare exams • Exams require significant amount of time: • not too simple, not too difficult • right amount of questions • unambigous questions • L A T EX offers various packages to typeset exams and exercises, in this talk we cover exam 2

  3. The exam document class • Maintained by Philip Hirschhorn • Current version 2.6 from November 2017 • Comes with a well-written manual • Supports various types of questions, multiple choice questions, grading tables, etc. 3

  4. A very basic example \documentclass[12pt]{exam} 1 2 \begin{document}\Large 3 4 \begin{questions} 5 \question[10] Who was Albert Einstein? 6 \question[10] Compute \(e = m \cdot c^2 \)! 7 \end{questions} 8 9 \end{document} 10 � Listing 1: A very basic exam example 4

  5. Resulting document 1. (10 points) Who was Albert Einstein? 2. (10 points) Compute e = m · c 2 !  Figure 1: Resulting output 5

  6. Localizing the exam-specific terms Exam-specific terms can be localized, here’s an example for German: 1 \pointpoints{Punkt}{Punkte} \bonuspointpoints{Bonuspunkt}{Bonuspunkte} 2 \renewcommand{\solutiontitle}{\noindent\textbf{Lösung:}\enspace} 3 \chqword{Frage} 4 \chpgword{Seite} 5 \chpword{Punkte} 6 \chbpword{Bonus Punkte} 7 \chsword{Erreicht} 8 \chtword{Gesamt} 9 10 \hpword{Punkte:} \hsword{Ergebnis:} 11 \hqword{Aufgabe:} 12 \htword{Summe:} 13 6

  7. Creating headers and footer You can create headers and footers for the first resp. running pages. \pagestyle{headandfoot} 1 2 \firstpageheadrule \runningheadrule 3 \firstpageheader{<left>}{<center>}{John Doe \\ Statistics 101 - 2019} 4 \runningheader{<l>}{<c>}{Statistics 101 - 2019} 5 \firstpagefooter{\today}{FOM Essen}{\thepage\,/\,\numpages} 6 \runningfooter{\today}{FOM Essen}{\thepage\,/\,\numpages} 7 8 \begin{document}\Large 9 \begin{questions} 10 11 \question[10] Who was Albert Einstein? \question[10] Compute \(e = m \cdot c^2 \)! 12 \end{questions} 13 \end{document} 14 � Listing 2: Setting header & footer 7

  8. Resulting document John Doe <left> <center> Statistics 101 - 2019 1. (10 points) Who was Albert Einstein? 2. (10 points) Compute e = m · c 2 ! Figure 2: Resulting output (top)  August 11, 2019 FOM Essen 1 / 1  Figure 3: Resulting output (bottom) 8

  9. Dividing questions • Questions can be further divided, exam provides the following environments: • parts • subparts • subsubparts • Inside these environments individual questions are then added with • \part • \subpart • \subsubpart 9

  10. Example for subdivided questions \question[10] Who was Albert Einstein? 1 2 \begin{parts} 3 \part[1] Where was he born? 4 \part[4] What has he become famous for? 5 \begin{subparts} 6 \subpart[2] What does \(e=mc^2\) mean? 7 \subpart[2] What did he get the Nobelprice for? 8 \end{subparts} 9 \end{parts} 10 11 \end{questions} 12 \end{document} 13 � Listing 3: Subdivisions \part and \subpart 10

  11. Resulting document John Doe <left> <center> Statistics 101 - 2019 1. (10 points) Who was Albert Einstein? (a) (1 point) Where was he born? (b) (4 points) What has he become famous for? i. (2 points) What does e = mc 2 mean? ii. (2 points) What did he get the Nobelprice for?  Figure 4: Resulting output 11

  12. Multiple choice and fill-In questions • The exam class offers several environments for multiple choice and fill-in questions: • choices for vertical choices using letters • checkboxes for vertical checkboxes • oneparcheckboxes for horizontally aligned checkboxes • with \fillin[solutiontext] horizontal lines are created there, where the students are supposed to put their answer 12

  13. Multiple choice and fill-In questions I \question Who was not a Beatle? 1 2 \begin{choices} 3 \choice John 4 \choice Paul 5 \choice George 6 \CorrectChoice Benedict 7 \end{choices} 8 Listing 4: Example for choices � 13

  14. Multiple choice and fill-In questions II \question Who was not a Beatle? 1 2 \begin{checkboxes} 3 \choice John 4 \choice Paul 5 \choice George 6 \CorrectChoice Benedict 7 \end{checkboxes} 8 Listing 5: Example for checkboxes � 14

  15. Resulting document: checkboxes and choices John Doe <left> <center> Statistics 101 - 2019 1. Who was not a Beatle? A. John B. Paul C. George D. Benedict 2. Who was not a Beatle? � John � Paul � George � Benedict  Figure 5: Resulting output 15

  16. Multiple choice and fill-In questions III \question Who was not Beatle? 1 2 \begin{oneparcheckboxes} 3 \choice John 4 \choice Paul 5 \choice George 6 \choice Ringo 7 \CorrectChoice Benedict 8 \end{oneparcheckboxes} 9 10 \question \fillin[James Bond][7em] has the \enquote{ 11 license to kill}. � Listing 6: oneparcheckboxes and fillin 16

  17. Resulting document John Doe <left> <center> Statistics 101 - 2019 1. Who was not Beatle? √ Benedict � John � Paul � George � Ringo 2. James Bond has the “license to kill”.  Figure 6: Oneparcheckboxes and fillin 17

  18. Resulting document Using the “answers” class option John Doe <left> <center> Statistics 101 - 2019 1. Who was not Beatle? √ Benedict � John � Paul � George � Ringo 2. James Bond has the “license to kill”.  Figure 7: Resulting output 18

  19. Creating space for answers % simple vertical space 1 \vspace*{<length>} 2 3 % vertical space to the end of the page 4 \vspace*{\stretch{1}} 5 \newpage 6 7 % empty framed box 8 \makeemptybox{<length>} 9 10 % empty framed box to the end of the page 11 \makeemptybox{\stretch{1}} 12 \newpage 13 19

  20. More space for answers \fillwithlines{<length>} % for lines 1 % Remark: \linefillheight for the inter-line spacing 2 3 \fillwithdottedlines{<length>} % for dotted lines 4 % Remark: distance in \dottedlinefillheight 5 6 \fillwithgrid{<length>} % 7 % \setlength{\gridsize}{5mm} 8 % \setlength{\gridlinewidth}{0.1pt} 9 10 \answerline[answer] % for short answers 11 20

  21. Space for answers John Doe <left> <center> Statistics 101 - 2019 1. Give a short overview of whatever! 2. (5 points) Describe the general theory of relativity! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . .  Figure 8: Resulting output 21

  22. Space for answers John Doe <left> <center> Statistics 101 - 2019 1. Give a short overview of whatever! 2. (5 points) When was Henry VIII born? 2.  Figure 9: Resulting output 22

  23. Printing solutions • Global option answers controls printing of solutions • solution -environment after each \question \begin{solution} 1 Some text containing the solution. 2 \end{solution} 3 • Some environments for the solution space • solutionorbox • solutionorlines • solutionordottedlines • solutionorgrid 23

  24. Example for the solution environment \begin{questions} 1 \question[1] How much does lead (Pb) weigh? 2 3 \begin{solution} 4 Pb weighs \SI{11,342}{\gram\per \centi\meter^3} 5 \end{solution} 6 7 \end{questions} 8 \end{document} 9 � Listing 7: Multiple choice 24

  25. Resulting document Resulting document, class option “answers” set John Doe <left> <center> Statistics 101 - 2019 1. (1 point) How much does lead (Pb) weigh? Solution: Pb weighs 11 . 342 g / cm 3  Figure 10: Resulting output 25

  26. Example for solutionorgrid \question[5] Draw the function $3x^2+4x+5$! 1 2 \begin{solutionorgrid}[8cm] 3 \begin{tikzpicture}[baseline] 4 \begin{axis}[ 5 axis y line=center,axis x line=middle,grid=both, 6 xmax=5,xmin=-5,ymin=0,ymax=10, 7 xlabel=$x$,ylabel=$y$,xtick={-5,...,5}, 8 ytick={0,...,11},anchor=center] 9 \addplot[smooth,blue,thick,samples=100]{3*x^2+4*x+5} ; 10 \end{axis} 11 \end{tikzpicture} 12 \end{solutionorgrid} 13 � Listing 8: solutionorgrid 26

  27. Resulting document (“answers” not set) John Doe <left> <center> Statistics 101 - 2019 1. (5 points) Draw the function 3 x 2 + 4 x + 5 !  Figure 11: Resulting output 27

  28. Resulting document (“answers” option set) John Doe <left> <center> Statistics 101 - 2019 1. (5 points) Draw the function 3 x 2 + 4 x + 5 ! 10 y 9 8 7 6 Solution: 5 4 3 2 1 x − 5 − 4 − 3 − 2 − 1 1 2 3 4 5  Figure 12: Resulting output with class option “answers” 28

  29. Printing grade tables • exam supports the output of grade tables • grade tables can be arranged per page or question \gradetable[v][questions] vertically per question 1 \gradetable[h][questions] horizontally per questions 2 \gradetable[v][pages] vertically per page 3 \gradetable[h][pages] horizontally per page 4 29

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend