Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[addpoints,]{exam}
- \usepackage{lipsum,graphicx,mdframed,array,ragged2e,booktabs,fmtcount}
- \usepackage[table]{xcolor}
- \pagestyle{headandfoot}
- \def\arraystretch{3}
- \newsavebox{\headbox}
- \savebox{\headbox}{\def\strut{\vrule height\arraystretch\ht\strutbox
- depth\arraystretch\dp\strutbox width0pt}%
- \parbox{\textwidth}{\hrule
- \strut\rlap{left}\hfill\mbox{center}\hfill\llap{right}\hrule
- \fboxsep=1pt
- \colorbox{gray!30}{\makebox[\dimexpr \textwidth-2\fboxsep][c]{\strut Breaking line\newline doesn't\\ work}}\hrule
- \strut number of questions is \numquestions{}.\hfill another one}}
- \extraheadheight{\dimexpr \ht\headbox+\dp\headbox}
- \firstpageheadrule
- \firstpageheader%
- {}%
- {\usebox\headbox}%
- {}
- \begin{document}
- \begin{questions}
- \question some question
- \end{questions}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement