
Я пытаюсь создать экзамен с множественным выбором по юридическому документу США. Я использую TeXShop на MacBook Air M2 с MacOS 14.4.1. Я только что установил 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
Экзамен documentclass работает так, как и ожидалось, с размером бумаги по умолчанию Letter (опция documentclass отсутствует, но когда я добавляю опцию 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
опцию в свой исходный файл (со страницы 102 документации exam.cls):
\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}