我正在尝试使用如下所示的标题来格式化页面顶部(可能在姓名:和时期:)
显然\hrule
,\rule
这不是为学生创建写下姓名和句号的行的正确命令。
此外,放置\\
在“第 3 单元测验(代数 2)”之后不会强制换行,并将“有理指数和指数方程”放置在下一行。
非常感谢您花时间查看并回复这篇文章!
母语:
\documentclass[12pt]{exam}
%\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{bm}
\usepackage{multicol}
\usepackage[nice]{nicefrac}
\usepackage{tasks}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\usepackage{color}
\usepackage{soul}
\pagestyle{head}
\header{\textbf{Algebra II: Unit 13 Quiz Rational Exponents and Exponential Equations (25 pts.}}
{}
{Name:\hrule[3in]}
\header{\textbf{Algebra II: Unit 13 Quiz}}
{}
{Name:\answerline}
\newcommand{\pagetop}{%
}
\newlength{\lwidth}% added <<<<<
\settowidth{\lwidth}{(99)\enspace} % added
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=\lwidth, % changed <<<<<<<<<
item-indent=0pt, % changed <<<<<<<<<<
%label-format = \bfseries,
%add \bf to make numbers bold <<<<<<<<<<
label=(\arabic*), %
label-offset = -\lwidth,% added <<<<<
item-format = \hspace{\lwidth},% added <<<<<
column-sep=2em, % changed <<<<<<<<<
}
\makeatletter
\renewcommand{\fullwidth}[1]{%
\vbox{%
\leftskip=-\lwidth \rightskip=0pt
\advance\linewidth\@totalleftmargin%
\@totalleftmargin=0pt%
#1}%
\nobreak
}
\makeatother
%******************************************** added <<<<<<<<<<
\newlength{\SolutionSpace}
\ifthenelse{\boolean{printanswers}}
{\setlength{\SolutionSpace}{5cm}
\colorsolutionboxes
\definecolor{SolutionBoxColor}{gray}{0.8}}% solutions are printed
{\setlength{\SolutionSpace}{0cm}
\colorsolutionboxes
\definecolor{SolutionBoxColor}{gray}{1}}% solutions are not being printed
%*********************************************
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate](4)
\task![]\fullwidth{\textbf{\#1-2 Rewrite using fractional exponents. (1 pt.) \#3-4 Rewrite in radical form. (1 pt.)}}
%%% Prob #1
\task
$2^4=16$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$\log16_{2} =4$}
\end{solutionorbox}
\vspace{0.25cm}
%%%%
%%%%Prob #2
\task
$3^3=27$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$\log27_{3}=3$}
\end{solutionorbox}
\vspace{0.25cm}
%%%Prob #3
\task
$a^2=b$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$\log{a}_{b}=2$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #4
\task
$c^r=m$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$\log{c}_{m}=r$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #5
% to change the number of "columns" you need to stop and restart tasks. Note the use of \lasttask to reset the counter (task).
\end{tasks}\unskip
\edef\lasttask{\arabic{task}}%
\begin{tasks}[style=enumerate](3)
\task![]\fullwidth{\textbf{Compute without a calculator.}}%
\setcounter{task}{\lasttask}
%%% Prob #5
\task
$64^{1/3}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$?$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #9
\task
$9^{3/2}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$=$}
\end{solutionorbox}
\vspace{0.25cm}
%%% Prob #7
\task
$\biggl(\dfrac{8}{27}\biggr)^{-2/3}$
\begin{solutionorbox}[\SolutionSpace]
\colorbox{yellow}{$=$}
\end{solutionorbox}
\end{tasks}
\end{document}
答案1
使用此代码定义第一页的页眉。
% *********************************** first page header <<<<<<<<<<<<<
\pagestyle{head}
\lhead[{\parbox[t]{0.5\linewidth}{\raggedright \bfseries Algebra II: Unit 13 Quiz \\ Rational Exponents and Exponential Equations}}]{}
\rhead[{\parbox[t]{0.5\linewidth}{Name:\enspace\hrulefill \\[\baselineskip]%
Period\enspace\makebox[1cm]{\hrulefill}\enspace(25 points)}}]{}
\extraheadheight[0.7cm]{0cm}
% ***********************************
使用可选参数\lhead
和\rhead
\rhead[<on the first page>]{< on other pages>}
该命令\extraheadheight[0.7cm]{0cm}
在第一页上增加了 0.7 厘米的额外页眉高度,同时在第一页之后的所有页面上保持原始高度。