我想要创建如下所示的布局,该布局出现在数学测试的顶部。
代码当前呈现如下内容。
带有“姓名”和“期间”的单元格需要更靠右。我尝试为\hline
这两个单元格创建一个空白的填充行,但这会导致多个错误。
感谢您花时间阅读并回复我的帖子!
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\usepackage{amsmath}
\usepackage{framed}
\usepackage{bm}
\usepackage{multicol}
\usepackage{tasks}
\pagestyle{head}
{}
{}
\begin{document}
\newcommand{\pagetop}{%
}
\begin{table}[!htp]
\begin{tabular}{lll}
\textbf{Algebra II: Q3 Final Exam - Part 1} & Name:\hline \\
\textbf{(Units 8 \& 9)} & Period:\hline \\
\end{tabular}
\end{table}
\newlength{\lwidth}
\settowidth{\lwidth}{(99)\enspace}
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=\lwidth,
item-indent=0pt,
label=(\arabic*), %
label-offset = -\lwidth,
item-format = \hspace{\lwidth},
column-sep=2em,
}
\makeatletter
\renewcommand{\fullwidth}[1]{%
\vbox{%
\leftskip=-\lwidth \rightskip=0pt
\advance\linewidth\@totalleftmargin%
\@totalleftmargin=0pt%
#1}%
\nobreak
}
\makeatother
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate,start=2](1)
\task![]\fullwidth{\textbf
{Simplify each expression to a single value without using a calculator. \emph{Show work.}\\(NO calculators)}}
%%% Prob #44
\task
In 2015, there were 75 wolves in Yellowstone National Park. Due to the efforts of park officials,
the population grew to 90 wolves in 2016. This trend continues and the wolf population increases exponentially.
\begin{solutionorbox}
$answer here$
\end{solutionorbox}
\bigskip
\end{tasks}
\end{document}```
答案1
\lhead
我建议使用可选参数和来设置第一页的标题\rhead
\rhead[<on the first page>]{<on the other pages>}
这样,您就可以使用页眉空间来显示考试标题。
该命令
\extraheadheight[0.7cm]{0cm}
在第一页上增加了 0.7 厘米的额外页眉高度,同时在第一页之后的所有页面上保持原始高度。
\documentclass[12pt]{exam}
\usepackage[a4paper,margin=0.5in,include head]{geometry}% changed
\usepackage{amsmath}
\usepackage{framed}
\usepackage{bm}
\usepackage{multicol}
\usepackage{tasks}
% *********************************** first page header added <<<<<<<<<<<<<
\pagestyle{head}
\lhead[\bfseries Algebra II: Q3 Final Exam - Part 1\\ (Units 8 \& 9)]{}
\rhead[{\parbox[b]{0.5\linewidth}{Name:\enspace\hrulefill \\%
Period:\enspace\hrulefill\enspace(65 points total for Parts 1 \& 2)}}]{}
\extraheadheight[0.7cm]{0cm}
% ***********************************
\printanswers %<<<<
\begin{document}
\newlength{\lwidth}
\settowidth{\lwidth}{(99)\enspace}
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=\lwidth,
item-indent=0pt,
label=(\arabic*), %
label-offset = -\lwidth,
item-format = \hspace{\lwidth},
column-sep=2em,
}
\makeatletter
\renewcommand{\fullwidth}[1]{%
\vbox{%
\leftskip=-\lwidth \rightskip=0pt
\advance\linewidth\@totalleftmargin%
\@totalleftmargin=0pt%
#1}%
\nobreak
}
\makeatother
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate,start=2](1)
\task![]\fullwidth{\textbf
{Simplify each expression to a single value without using a calculator. \emph{Show work.}\\(NO calculators)}}
%%% Prob #44
\task
In 2015, there were 75 wolves in Yellowstone National Park. Due to the efforts of park officials,
the population grew to 90 wolves in 2016. This trend continues and the wolf population increases exponentially.
\begin{solutionorbox}
\emph{answer here}
\end{solutionorbox}
\bigskip
\end{tasks}
\end{document}
使用此代码在之间添加垂直空间姓名和时期
% *********************************** first page header added <<<<<<<<<<<<<
\pagestyle{head}
\lhead[{\parbox[b]{0.50\linewidth}{\raggedright \bfseries Algebra II: Q3 Final Exam - Part 1\\[\baselineskip] (Units 8 \& 9)}}]{}
\rhead[{\parbox[b]{0.50\linewidth}{Name:\enspace\enspace\hrulefill \\[\baselineskip]%
Period:\enspace\hrulefill\enspace(65 points total for Parts 1 \& 2)}}]{}
\extraheadheight[0.7cm]{0cm}
% ***********************************