헤더에 상자를 포함하는 방법은 무엇입니까? (시험서류 종류)

헤더에 상자를 포함하는 방법은 무엇입니까? (시험서류 종류)

모든 페이지에서 수동으로 반복하는 대신 헤더에 포함하고 싶은 상자가 있습니다. 어떻게 이를 달성할 수 있나요?

\documentclass[addpoints, 12pt]{exam}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[nameinlink]{cleveref}

\pagestyle{headandfoot}
\firstpageheader{\large\bfseries Astronomy Exam\\ \bigskip
\large\bfseries Last Name:\enspace\makebox[1.9in]{\hrulefill}}
{}
{\large\bfseries Univ ID: \makebox[2in]{\hrulefill} \\  \bigskip
 \large\bfseries First Name:\enspace\makebox[2in]{\hrulefill}}
\runningheader{\large\bfseries Last Name:\enspace\makebox[1.9in]{\hrulefill}}
{}
{\large\bfseries First Name:\enspace\makebox[2in]{\hrulefill}}
\firstpagefooter{}{}{}
\runningfooter{}{\thepage}{}

\begin{document}

\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
Answer the questions in the spaces provided on the
answer sheets.}}}
\end{center}

\begin{questions}

\question

\newpage

\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
Answer the questions in the spaces provided on the
answer sheets.}}}
\end{center}

\question
\end{questions}

\end{document}

답변1

-Package를 사용하여 geometry헤더의 높이와 너비를 조정하여 실제로 페이지 상단에 맞도록 했습니다.

그런 다음 왼쪽, 가운데, 오른쪽 헤더를 모두 왼쪽 헤더로 병합하여 모든 항목을 정리하고 간격을 두는 것이 훨씬 쉬워졌습니다. 최대한 초기 레이아웃을 고수하려고 노력했습니다.

작업 예는 다음과 같습니다.

\documentclass[addpoints, 12pt]{exam}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[nameinlink]{cleveref}

\usepackage[top=5.5cm,left=2.5cm,right=2.5cm]{geometry}


\pagestyle{headandfoot}
\firstpageheader{\large\bfseries Astronomy Exam  \hspace{4.3cm} Univ ID: \makebox[2in]{\hrulefill}\\ \bigskip
\large\bfseries Last Name:\enspace\makebox[1.9in]{\hrulefill} \large\bfseries
First Name:\enspace\makebox[2in]{\hrulefill}
\begin{center}
    \fbox{\fbox{\parbox{5.5in}{\centering\small
    Answer the questions in the space provided on the
    answer sheets.}}}
\end{center}
}
{}
{}


\runningheader{
    \large\bfseries Last Name:\enspace\makebox[1.9in]{\hrulefill} \large\bfseries
    First Name:\enspace\makebox[2in]{\hrulefill}
    \begin{center}
        \fbox{\fbox{\parbox{5.5in}{\centering\small
        Answer the questions in the space provided on the
        answer sheets.}}}
    \end{center}
}
{}
{}
\firstpagefooter{}{}{}
\runningfooter{}{\thepage}{}

\begin{document}


\begin{questions}

\question This is a question.

\newpage


\question This is another question.
\end{questions}

\end{document}

관련 정보