Advertisement
diaaa

Untitled

Sep 1st, 2018
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. \documentclass[addpoints,]{exam}
  2.  
  3. \usepackage{lipsum,graphicx,mdframed,array,ragged2e,booktabs,fmtcount}
  4. \usepackage[table]{xcolor}
  5.  
  6. \pagestyle{headandfoot}
  7.  
  8. \def\arraystretch{3}
  9.  
  10. \newsavebox{\headbox}
  11. \savebox{\headbox}{\def\strut{\vrule height\arraystretch\ht\strutbox
  12. depth\arraystretch\dp\strutbox width0pt}%
  13. \parbox{\textwidth}{\hrule
  14. \strut\rlap{left}\hfill\mbox{center}\hfill\llap{right}\hrule
  15. \fboxsep=1pt
  16. \colorbox{gray!30}{\makebox[\dimexpr \textwidth-2\fboxsep][c]{\strut Breaking line\newline doesn't\\ work}}\hrule
  17. \strut number of questions is \numquestions{}.\hfill another one}}
  18.  
  19. \extraheadheight{\dimexpr \ht\headbox+\dp\headbox}
  20.  
  21. \firstpageheadrule
  22. \firstpageheader%
  23. {}%
  24. {\usebox\headbox}%
  25. {}
  26.  
  27. \begin{document}
  28. \begin{questions}
  29. \question some question
  30. \end{questions}
  31. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement