2

The code below works by printing "page x of y" on each page on the left, and go to next page on the right (or end of Exam for the last page). What I cannot get it to do is to write question xx continues as a central footer. Since I was not able to paste this code as a reply to comments/suggestions on my earlier post here why-does-this-ifincomplete-latex-code-not-work, This is a repeat of that post.

\documentclass[addpoints,10pt,fleqn]{exam}
\RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace}
\usepackage{setspace}% http://ctan.org/pkg/setspace
\RequirePackage{tikz, pgflibraryplotmarks}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage[margin=1in]{geometry}
\usepackage{enumerate,mdwlist}
\usepackage{mathtools}  % for 'bmatrix*' environment
\usepackage{paralist}   % for 'inparaenum' environment\newcommand{\dist}{\displaystyle}
\usepackage{enumitem}
\usepackage[normalem]{ulem}
\usepackage{geometry}
\geometry{
a4paper, total={210mm,297mm}, left=20mm, right=15mm, top=20mm, bottom=15mm,}
\singlespacing
\pagestyle{headandfoot}
\runningheadrule
\runningheader{Linear Algebra-MAT 2200}
{Tutorial shhet 7, Page \thepage\ of \numpages} {June, 2015}

\begin{document}
\raggedright
\begin{center}
\bf{Linear Algebra}
\end{center}
Handout 2 \hfill{May, 2015}\\
\flushright Tutorial Sheet 7
\noindent\makebox[\linewidth]{\rule{\textwidth}{1pt}}
\pagestyle{headandfoot}
\footrule
\lfoot{\footnotesize Page \thepage\ of \numpages}
\cfoot{\newcommand{\continues}{\ifincomplete
{\footnotesize Question \IncompleteQuestion\ continues \hfill Please go to next page\ldots}{}}} \rfoot{\iflastpage{End of Tutorial Sheet 7.}{\footnotesize Please go to next page\ldots}}
\begin{questions}
\begingroup\onehalfspacing
\question
Given the vectors \\
\begin{inparaenum}[a)]
\item
(2, -1, 1) and (1, 2, 1) \\
\item
(2, 1, -3) and (1, 1, 1) \\
\item
(2, -1, 2) and (1, -1, 2) \\
\end{inparaenum}
\break

Find \\
\begin{inparaenum}[i)]
\item
Which of the pairs of vectors are perpendicular \\
\item
A vector perpendicular to both of the given vectors \\
\end{inparaenum}
\endgroup
\end{questions}
\end{document}
1
  • 1
    Thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. Jun 21, 2015 at 21:29

1 Answer 1

0

There are 3 minors errors in your code and exactly in

\cfoot{\newcommand{\continues}{\ifincomplete{\footnotesize Question \IncompleteQuestion\ continues \hfill Please go to next page\ldots}{}}}

what you need is

\cfoot{\newcommand{\continues}{\ifincomplete{\footnotesize Question \IncompleteQuestion\ continues}{}}\continues}

or simply

\cfoot{\ifincomplete{\footnotesize Question \IncompleteQuestion\ continues}{}}
3
  • Thanks very much @touhami, the code you have given me does exactly what I want. Much appreciation. Jun 22, 2015 at 5:36
  • I had earlier marked this answer as the corect one. Once more thanks very much @Touhami, the code does exactly what I want. I really appreciate. Jun 22, 2015 at 19:28
  • @ZiloreMumba you're welcome
    – touhami
    Jun 22, 2015 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .