\documentclass[12pt,twoside,addpoints]{exam}

\usepackage[top=15mm,bottom=20mm,right=20mm,left=20mm]{geometry}
\usepackage{pgffor}
\usepackage{setspace}
\usepackage{mathtools}
\usepackage{enumerate}
\usepackage{multicol}
\usepackage{cancel}
\usepackage{fontspec}
\usepackage{background}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{wasysym}
\usepackage{rotating}
\usepackage{tabularx}

\usepackage{ifthen}   % Required for conditional statements
\usepackage{pgf}      % Required for random number generation
\graphicspath{ {./img/} }

\noprintanswers{}

\input{0-include}
% that's all folks

\usepackage{tikz}
\usetikzlibrary{decorations.text, shadows, arrows.meta}
\newfontfamily\looney[]{That's Font Folks!}
\definecolor{darkblueOuter}{RGB}{1,11,23}
\definecolor{darkblueInner}{RGB}{1,18,37}
%

\setcounter{tocdepth}{1}

\title{\textsc{Year 9 Mathematics\\ Topic 5b\\Linear Equations \& Inequalities}}
\author{PEN Education}
\date{2024}


%\setlength\parindent{0pt}


\backgroundsetup{placement = top, hshift=0cm, vshift=-\textwidth*0.70, scale = 0.75, contents ={\ifnum\value{page}=1 \includegraphics[width=\textwidth]{img/logo-cover.png}\else \fi}}

% some exam environment options
\marksnotpoints
\pointsinrightmargin
\boxedpoints
\setlength{\rightpointsmargin}{1cm}


\newcommand{\randomword}[1]{%
  \pgfmathsetmacro{\angle}{random(-45,45)}% Generate a random angle between -45 and 45
  \rotatebox{\angle}{#1}%
}


\begin{document}

\maketitle % this sets the current page style to title
\dotfill


\tableofcontents

\cfoot{\thepage}

\dotfill
\section{Introduction}
    \setcounter{secmarks}{0}
    \input{1-intro}
    \setcounter{sec1marks}{\thesecmarks}
\section{Using linear equations to solve problems}
    \setcounter{secmarks}{0}
    \input{2-using-linear}
    \setcounter{sec2marks}{\thesecmarks}
\section{Literal Equations}
    \setcounter{secmarks}{0}
    \input{3-literal-eq}
    \setcounter{sec3marks}{\thesecmarks}
\section{Inequalities}
    \setcounter{secmarks}{0}
    \input{4-inequalities}
    \setcounter{sec4marks}{\thesecmarks}
\section{Solving linear inequalities}
    \setcounter{secmarks}{0}
    \input{5-solving-ineq}
    \setcounter{sec5marks}{\thesecmarks}
\newpage
\section{Homework}
    \setcounter{secmarks}{0}
    \input{0-homework}
    \setcounter{sec6marks}{\thesecmarks}


\foreach \i in {1,2,...,10} {
  \addtocounter{totalmarks}{\value{sec\i marks}}
}

\begin{center}
\begin{minipage}[m]{\linewidth}
Marker's use only. \\ \large
\begin{tabularx}{\linewidth}{||>{\bfseries}l||>{\centering}X|>{\centering}X|>{\centering}X|>{\centering}X|>{\centering}X|>{\centering}X||>{\bfseries}c||}
\hline \hline
\rule[-0.75em]{0em}{2em}\parbox[m]{2.75cm}{\MakeUppercase{Section}}
    & 1
    & 2
    & 3
    & 4
    & 5
    & HW
    & Total
    \\ \hline
\rule[-1.75em]{0em}{4em}\parbox[m]{0.15\linewidth}{\MakeUppercase{Marks}}  
    & $\dfrac{}{\arabic{sec1marks}}$ 
    & $\dfrac{}{\arabic{sec2marks}}$  
    & $\dfrac{}{\arabic{sec3marks}}$ 
    & $\dfrac{}{\arabic{sec4marks}}$ 
    & $\dfrac{}{\arabic{sec5marks}}$ 
    & $\dfrac{}{\arabic{sec6marks}}$
    & $\dfrac{}{\thetotalmarks}$  \\ \hline \hline
\end{tabularx}    
\end{minipage}
\end{center}
%\section{The End}
%\hspace{4.5cm}
%    \input{0-outro}

%playground

\end{document}

% Local Variables:
% TeX-engine: luatex
% End:
