# How to left align the dropped points in the right margin in “exam” class and to add “Turn over” to every odd page footer

I was making a question paper in exam class. There I have met with following two challenges.

1. I want to drop the points at the right margin with left alignment. But here by default it is right aligned. Here is a sample. I have used showframe option in geometry package just to show the actual scenario. I need to do that because after printing the page, it is going dangerously close to the edge of the pages.

1. The second thing I need is a "Turn Over" message at the right footer of every odd page (of course along with the page number at the centre). But if it is the last page, then the message should not be there. I tried with fancyhdr but it seems it does not work with exam class. I am using pdflatex compiler.

Here is my preamble. Thanks in advance.

\documentclass[a5paper,11pt]{exam}
\usepackage[left=0.25in,right=0.75in,top=0.5in,bottom=0.5in,footskip=.15in,showframe]{geometry}
\usepackage{amsmath, amssymb, amsthm, amsfonts}
\usepackage{mathtools}
\usepackage[inline]{enumitem}
\usepackage{nccmath}
\footer{}{\thepage}{}
\marksnotpoints
\bracketedpoints
\pointsdroppedatright
\renewcommand\partlabel{(\textbf{\alph{partno}})}
\renewcommand{\thesubpart}{(\textit{\roman{subpart}})}
\renewcommand{\subpartlabel}{\thesubpart}
\renewcommand\questionlabel{\textbf{\thequestion.}}


Please, ask one question per post and provide a compilable MWE instead of code fragments. Here is how you can get left aligned marks.

\documentclass[a5paper,11pt]{exam}
\usepackage[english]{babel}
\usepackage[left=0.25in,right=0.75in,top=0.5in,bottom=0.5in,footskip=.15in,showframe]{geometry}
\marksnotpoints
\bracketedpoints
\pointsdroppedatright

\usepackage{etoolbox}
\makeatletter
\setlength\@rightmargin{0.5in}
\patchcmd\setup@point@toks
{}{}
\patchcmd\droppoints
{}{}
\patchcmd\droptotalpoints
{\llap{\total@block}}
{\rlap{\total@block}}
{}{}
\patchcmd\droptotalbonuspoints
{\llap{\bonustotal@block}}
{\rlap{\bonustotal@block}}
{}{}
\makeatother

\usepackage{blindtext}

\begin{document}
\begin{questions}
\question[10]
\blindtext\droppoints
\question[15.5]
\blindtext\droppoints
\end{questions}
\end{document}


• I got your point. I cannot mark both the answers as correct. Sorry for the trouble. A big thanks for the code. – Subhajit Paul Sep 6 '18 at 3:28

And this handles the page numbers. Note: it takes two runs for lastpage to work.

\documentclass[a5paper,11pt]{exam}
\usepackage[left=0.25in,right=0.75in,top=0.5in,bottom=0.5in,footskip=.15in,showframe]{geometry}
\usepackage{amsmath, amssymb, amsthm, amsfonts}
\usepackage{mathtools}
\usepackage[inline]{enumitem}
\usepackage{nccmath}
\usepackage{lastpage,refcount}
\usepackage{lipsum}% debug only
\footer{}{\thepage}{\ifodd\value{page}\relax
\if\thepage\getpagerefnumber{LastPage}\relax
\else Turn Over
\fi
\fi}
\marksnotpoints
\bracketedpoints
\pointsdroppedatright
\renewcommand\partlabel{(\textbf{\alph{partno}})}
\renewcommand{\thesubpart}{(\textit{\roman{subpart}})}
\renewcommand{\subpartlabel}{\thesubpart}
\renewcommand\questionlabel{\textbf{\thequestion.}}

\begin{document}
\lipsum[1-10]
\end{document}

• Sorry, I asked two questions and now I cannot mark both the answers right. Thanks for your help. – Subhajit Paul Sep 6 '18 at 3:30