{"id":987,"date":"2018-05-15T16:08:18","date_gmt":"2018-05-15T21:08:18","guid":{"rendered":"http:\/\/www.hargaden.com\/enda\/?p=987"},"modified":"2021-04-15T16:46:08","modified_gmt":"2021-04-15T16:46:08","slug":"examsproblem-sets-with-individual-student-names-in-latex","status":"publish","type":"post","link":"https:\/\/hargaden.com\/enda\/examsproblem-sets-with-individual-student-names-in-latex\/","title":{"rendered":"Exams\/problem sets with individual student names in LaTeX"},"content":{"rendered":"<p>Usually my exams have a large blank space for students to write their names in.<\/p>\n<p>If, instead, I wanted to generate individualised exams with their names printed in that space, this code will do that for you. It uses the <strong>pgffor<\/strong> package to loop over the list of names you provide.<\/p>\n<pre><code>\\documentclass{article}\n\\usepackage{pgffor}\n\\def\\classlist{Enda Hargaden,\nGeorge Akerlof,\nJoe Stiglitz,\nDon Bruce}\n\\pagenumbering{gobble}\n\\begin{document}\n\\foreach \\studentname in \\classlist{\n\nEcon 381 Problem Set: \\studentname's Copy\n\n\\begin{enumerate}\n\\item What is OLS?\n\\item What's the square root of 25?\n\\item More questions yadda yadda\n\\end{enumerate}\n\n\\newpage}\n\n\\end{document}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Usually my exams have a large blank space for students to write their names in. If, instead, I wanted to generate individualised exams with their names printed in that space, this code will do that&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,11],"tags":[],"class_list":["post-987","post","type-post","status-publish","format-standard","hentry","category-latex","category-teaching"],"_links":{"self":[{"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/posts\/987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/comments?post=987"}],"version-history":[{"count":1,"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/posts\/987\/revisions"}],"predecessor-version":[{"id":1160,"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/posts\/987\/revisions\/1160"}],"wp:attachment":[{"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/media?parent=987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/categories?post=987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hargaden.com\/enda\/wp-json\/wp\/v2\/tags?post=987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}