3. Decimals booklet LaTeX

3.1. Booklets

3.1.1. Sample decimals booklets by process

add 1dp q

add 1dp ans

pdf tex

sub 2dp q

sub 2dp ans


3.1.2. Latex templates

The multi page LaTeX decimals question template is below.
 1\documentclass[leqno, 12pt]{article}
 2\usepackage[a4paper, portrait, margin=2cm]{geometry}
 3\usepackage{amsmath}
 4\usepackage{multicol}
 5\usepackage{siunitx}
 6\usepackage{fancyhdr}
 7
 8
 9\sisetup{output-decimal-marker={.}}
10
11
12\def \HeadingQuestions {\section*{\Large Name: \underline{\hspace{8cm}} \hfill Date: \underline{\hspace{3cm}}} \vspace{-3mm}
13{<<title>> of decimals: Questions} \vspace{1pt}\hrule}
14
15% raise footer with page number
16\fancypagestyle{myfancypagestyle}{
17  \fancyhf{} % clear all header and footer fields
18  \renewcommand{\headrulewidth}{0pt} % no rule under header
19  \fancyfoot[R] {\thepage} % place page number at the bottom right
20  \setlength{\footskip}{14.5pt} % raise page number
21}
22\pagestyle{myfancypagestyle}  % apply myfancypagestyle
23
24%
25\begin{document}
26\HeadingQuestions
27\vspace{-5mm}
28\begin{multicols}{3}
29<<diagrams>>
30\end{multicols}
31\end{document}
The multi page LaTeX decimals answer template is below.
 1\documentclass[leqno, 12pt]{article}
 2\usepackage[a4paper, portrait, margin=2cm]{geometry}
 3\usepackage{amsmath}
 4\usepackage{multicol}
 5\usepackage{siunitx}
 6\usepackage{fancyhdr}
 7
 8
 9\sisetup{output-decimal-marker={.}}
10
11\def \HeadingAnswers {\section*{\Large Name: \underline{\hspace{8cm}} \hfill Date: \underline{\hspace{3cm}}} \vspace{-3mm}
12{<<title>> of decimals: Answers} \vspace{1pt}\hrule}
13
14\fancypagestyle{myfancypagestyle}{
15  \fancyhf{} % clear all header and footer fields
16  \renewcommand{\headrulewidth}{0pt} % no rule under header
17  \fancyfoot[R] {\thepage} % place page number at the bottom right
18  \setlength{\footskip}{14.5pt} % raise page number
19}
20\pagestyle{myfancypagestyle}  % apply myfancypagestyle
21
22
23%
24\begin{document}
25\HeadingAnswers
26\vspace{-5mm}
27\begin{multicols}{3}
28<<diagrams>>
29\end{multicols}
30\end{document}
The diagram template is below.
 1% diagram template
 2\begin{equation}
 3    \raisebox{-0.8cm}{
 4        \begin{tabular}{c S[table-format=<<numip>>.<<numdp>>]}
 5         &<<num1>> \tabularnewline
 6        $<<process>>$&<<num2>> \tabularnewline
 7        \hline
 8         &<<answer>> \tabularnewline
 9        \hline
10    \end{tabular}}
11\end{equation}
Here’s what some parts of the diagram LaTeX do:
Explanation of LaTeX code

Line

Explanation

\begin{equation}

Begins the equation environment, which is used for displaying mathematical equations.

\raisebox{-1.0cm}{

Lowers the content inside the braces by 1.0 cm.

\begin{tabular}{c d{<<numip>>.<<numdp>>}}

Begins a tabular environment with two columns: the first column is centered (c), and the second column is aligned on the decimal point with specified integer and decimal places.

&<<num1>> \tabularnewline

Inserts the value of <<num1>> in the second column and moves to the next row.

$<<process>>$&<<num2>> \tabularnewline

Inserts the value of <<process>> in the first column (enclosed in math mode) and <<num2>> in the second column, then moves to the next row.

\hline

Adds a horizontal line across the table.

&<<answer>> \tabularnewline

Inserts the value of <<answer>> in the second column and moves to the next row.

\hline

Adds another horizontal line across the table.

\end{tabular}}

Ends the tabular environment and the \raisebox command.

\end{equation}

Ends the equation environment.