Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage{lipsum}
- \usepackage{refcount}
- \makeatletter
- \newcommand \@@footer{%
- \ifnum\getpagerefnumber{question-start-\thequestion}<\getpagerefnumber{question-end-\thequestion}
- Question~\thequestion{} continues on the next page%
- \fi\hfill\parbox[c]{5cm}{\Large\bf \flushright SEE NEXT PAGE}}
- \def \ps@exam{%
- \let \@mkboth \@gobbletwo%
- \def \@oddhead{}%
- \def \@oddfoot{\@@footer}%
- \def \@evenhead{}%
- \def \@evenfoot{\@@footer}%
- }
- \pagestyle{exam}
- \newcommand \testpagebreak[1]{%
- \vfil%
- \penalty #1%
- \vfilneg%
- }
- \newcounter{question}
- \newenvironment{question}{%
- \begin{list}{}{}%
- \refstepcounter{question}%
- \item[\bfseries\thequestion.]%
- \leavevmode% Start paragraph
- \label{question-start-\thequestion}%
- }{%
- \label{question-end-\thequestion}%
- \end{list}%
- \testpagebreak{-350}%
- }
- \begin{document}
- \begin{question}
- \lipsum[1-7]
- \end{question}
- \begin{question}
- \lipsum[8-10]
- %\lipsum[8-13]
- \end{question}
- \begin{question}
- Just a single line
- And another
- \end{question}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement