1

I am writing an exam booklet that has different sets of questions intended for grade 5 to grade 9. I use article class and each section contains a separate set of questions. I wish to put 6 big numbers 5 for pages that contain questions for grade 5, 6 big numbers 6 for pages that contains questions for grade 6, ...etc, all at top margin. Could you suggest any packages for doing this?

For example, pages that have questions for grade 5 look something like this on top margin:

enter image description here

1
  • what is the relationship between grades and sections or any division of doument? 6 big numbers at header? can you explain a bit more?
    – touhami
    Sep 22 '15 at 5:54
2

You can use the eso-pic package to add the number at the desired location. Using a macro to hold the number and redefining it, you can get the desired result. A little example:

\documentclass{article}
\usepackage[a6paper]{geometry}% just for the example
\usepackage{xcolor}
\usepackage{lmodern}
\usepackage{eso-pic}
\usepackage{lipsum}

\newcommand\Grade{5}
\newcommand\GradeHeader{%
  \fontsize{30}{36}\selectfont%
  {\color{gray!60}\vrule width 3pt}\,\Grade%
  \,{\color{gray!60}\vrule width 3pt}\,\Grade%
  \,{\color{gray!60}\vrule width 3pt}\,\Grade%
  \,{\color{gray!60}\vrule width 3pt}\,\Grade%
  \,{\color{gray!60}\vrule width 3pt}\,\Grade%
  \,{\color{gray!60}\vrule width 3pt}\,\Grade%
    \,{\color{gray!60}\vrule width 3pt}%
}
\AddToShipoutPictureBG{%
  \AtPageUpperLeft{%
    \raisebox{-2\height}{%
      \makebox[\paperwidth]{\GradeHeader}%
    }%
  }%
}

\begin{document}

\section{5th Grade}
\lipsum[1-4]
\clearpage
\renewcommand\Grade{6}
\section{6th Grade}
\lipsum[1-4]
\clearpage
\renewcommand\Grade{7}
\section{7th Grade}
\lipsum[1-4]
\clearpage
\renewcommand\Grade{8}
\section{8th Grade}
\lipsum[1-4]

\end{document}

The result:

enter image description here Adjust the settings for the \raisebox to get the desired position in your actual document.

5
  • I mean 5 or 6 numbers of each kind on one relevant page. There should be a vertical bars between these big numbers. It is even better to have gray or different colours for both the numbers and the bars.
    – Thumbolt
    Sep 22 '15 at 14:18
  • @Thumbolt Your description is still confusing. Please add to your question an image (even hand-drawn) of the desired output. Sep 22 '15 at 14:26
  • I have drawn a photo to illustrate my point.
    – Thumbolt
    Sep 22 '15 at 14:48
  • @Thumbolt Thanks. I've updated my answer. Let me know of that is what you had in mind. Sep 22 '15 at 15:39
  • Before the question pages, there should be some pages introducing the competition. So how to delay the effect of the commands until the first page of question set?
    – Thumbolt
    Sep 22 '15 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.