
Estou tentando criar um exame de múltipla escolha em papel jurídico dos EUA. Estou usando o TeXShop em um MacBook Air M2 executando MacOS 14.4.1. Acabei de instalar o TeXLive 2024. Aqui está parte do log do console:
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
A documentclass do exame funciona conforme o esperado com o tamanho de papel carta padrão (sem opção para documentclass, mas quando adiciono option legalpaper
, ela não funciona mais de maneira confiável.
Aqui está meu arquivo fonte (retirado do manual emhttps://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}
Quando adiciono apenas a legalpaper
opção ao meu arquivo de origem (da página 102 da documentação 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}
Recebo a seguinte saída (espaço extra acima do cabeçalho e sem rodapé):
Responder1
A classe não configura o tamanho do pdf, portanto, se o padrão do seu site for A4, as opções de tamanho da página realmente não funcionam e não está claro se funcionam, mesmo que o padrão do seu site seja carta dos EUA (não rastreei suas configurações).
Você poderia relatar isso aos mantenedores do pacote, mas a solução mais fácil (para eles e para você) é carregar geometry
para consertar as coisas.
Você poderia se quiser ajustar outras coisas usando as opções de geometria, por exemplo aumentar \textheight
um pouco se desejar,
Os pdfinfo
relatórios do utilitário
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}