Exams & theses

Two structured documents with their own conventions: exams (the exam class — questions, points, answer spaces, optional solutions) and theses (usually your university’s template, with front matter, body, and back matter). This page covers both.

Exams — the exam class

Use \documentclass{exam} (by Philip Hirschhorn). List questions in a questions environment with \question; subparts go in a parts environment with \part. Assign points with \question[10] (running totals and grade tables are available). Reserve answer space with \fillwithlines{...} or a solution environment, and set multiple choice with choices / oneparchoices (mark the right one with \CorrectChoice). Toggle whether solutions print with \printanswers / \noprintanswers (or the [answers] option) — so the same source makes both the exam and the answer key.

latex
\documentclass[addpoints]{exam}
% \printanswers   % コメントを外すと解答入り / uncomment for the key
\begin{document}
\begin{questions}
  \question[10] 次を計算せよ。
  \begin{solution} 答え。 \end{solution}
  \question 正しいものを選べ。
  \begin{oneparchoices}
    \choice 誤り \CorrectChoice 正しい \choice 誤り
  \end{oneparchoices}
\end{questions}
\end{document}

Theses — use the template

Most universities distribute an official thesis class/template — use it first, since it bakes in the required margins, title page, and formatting. If none is mandated, base your document on report/book (or memoir, or KOMA-Script’s scrbook). Many thesis classes derive from book.

Structure — front, main, back matter

A thesis has three parts — front matter (title page, abstract, acknowledgments, table of contents), main matter (the chapters), and back matter (bibliography, appendices). The book-derived classes provide \frontmatter / \mainmatter / \backmatter, which switch page numbering from roman to arabic automatically. Put the abstract in an abstract environment. For a large thesis with many chapters, split them into files and pull them in with \include (see “Multi-file projects” and “Handling large documents”).

latex
\documentclass[12pt]{book}   % または大学指定のクラス / or your university’s class
\begin{document}
\frontmatter          % ローマ数字: 表紙・要旨・目次
\tableofcontents
\mainmatter           % アラビア数字: 本文
\include{chapters/intro}
\backmatter           % 参考文献・付録
\end{document}