
我正在嘗試在美國法律論文上創建多項選擇題考試。我在運行 MacOS 14.4.1 的 MacBook Air M2 上使用 TeXShop。我剛剛安裝了 TeXLive 2024。
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-20>
(/usr/local/texlive/2024/texmf-dist/tex/latex/exam/exam.cls
Document Class: exam 2023/07/09 Version 2.704 by Philip Hirschhorn
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
考試文檔類別在預設信紙尺寸下按預期工作(文檔類別沒有選項,但當我新增選項時legalpaper
,它不再可靠地工作。
這是我的來源文件(取自手冊https://math.mit.edu/~psh/exam/examdoc.pdf):
\documentclass[answers,12pt]{exam}
\pagestyle{headandfoot}
\firstpageheadrule
\firstpagefootrule
\firstpageheader{Math 115}{Final Exam}{July 4, 1776}
\runningheader{Math 115}
{Page \thepage\ of \numpages}
{July 4, 1776}
\firstpagefooter{Math 115}{Final Exam}{Page \thepage\ of \numpages}
\runningfooter{Math 115}{Final Exam}{Page \thepage\ of \numpages}
\runningheadrule
\runningfootrule
\usepackage{times}
\begin{document}
EXAM
\begin{questions}
\question My question with multiple choices.
\begin{choices}
\choice The first choice.
\choice The second choice.
\choice The third choice.
\choice The fourth choice.
\CorrectChoice The fifth choice.
\end{choices}
\end{questions}
\end{document}
當我僅將legalpaper
選項新增至來源檔案時(來自 exam.cls 文件的第 102 頁):
\documentclass[legalpaper,answers,12pt]{exam}
\pagestyle{headandfoot}
\firstpageheadrule
\firstpagefootrule
\firstpageheader{Math 115}{Final Exam}{July 4, 1776}
\runningheader{Math 115}
{Page \thepage\ of \numpages}
{July 4, 1776}
\firstpagefooter{Math 115}{Final Exam}{Page \thepage\ of \numpages}
\runningfooter{Math 115}{Final Exam}{Page \thepage\ of \numpages}
\runningheadrule
\runningfootrule
\usepackage{times}
\begin{document}
EXAM
\begin{questions}
\question My question with multiple choices.
\begin{choices}
\choice The first choice.
\choice The second choice.
\choice The third choice.
\choice The fourth choice.
\CorrectChoice The fifth choice.
\end{choices}
\end{questions}
\end{document}
我得到以下輸出(頁首上方有額外空間,沒有頁尾):
答案1
課程沒有設定pdf 大小,因此如果您的網站預設值為A4,則頁面大小選項實際上不起作用,並且不清楚它們是否有效,即使您的網站預設值為us letter(我沒有追蹤其設定) 。
您可以向軟體包維護者報告這種情況,但最簡單的解決方案(對他們和您而言)是加載geometry
以修復問題。
如果您想使用幾何選項調整其他內容,例如,\textheight
如果您願意,可以增加一點,
公用事業pdfinfo
報告
Page size: 612 x 792 pts (letter)
\documentclass[
letterpaper
,answers,12pt]{exam}
\usepackage{geometry}
\pagestyle{headandfoot}
\firstpageheadrule
\firstpagefootrule
\firstpageheader{Math 115}{Final Exam}{July 4, 1776}
\runningheader{Math 115}
{Page \thepage\ of \numpages}
{July 4, 1776}
\firstpagefooter{Math 115}{Final Exam}{Page \thepage\ of \numpages}
\runningfooter{Math 115}{Final Exam}{Page \thepage\ of \numpages}
\runningheadrule
\runningfootrule
\usepackage{times}
\begin{document}
EXAM
\begin{questions}
\question My question with multiple choices.
\begin{choices}
\choice The first choice.
\choice The second choice.
\choice The third choice.
\choice The fourth choice.
\CorrectChoice The fifth choice.
\end{choices}
\end{questions}
\end{document}