4. Decimals booklet LaTeX

4.1. Booklets

4.1.1. Sample decimals booklets by process

add 1dp q

add 1dp ans

pdf tex

sub 2dp q

pdf tex

sub 2dp ans

pdf tex

random 5dp q

pdf tex

random 5dp ans

pdf tex


4.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{dcolumn}
 6\usepackage{fancyhdr}
 7
 8\newcolumntype{d}[1]{cD{.}{.}{#1}}
 9
10
11\def \HeadingQuestions {\section*{\Large Name: \underline{\hspace{8cm}} \hfill Date: \underline{\hspace{3cm}}} \vspace{-3mm}
12{<<title>> of decimals: Questions} \vspace{1pt}\hrule}
13
14% raise footer with page number
15\fancypagestyle{myfancypagestyle}{
16  \fancyhf{} % clear all header and footer fields
17  \renewcommand{\headrulewidth}{0pt} % no rule under header
18  \fancyfoot[C] {\thepage} \setlength{\footskip}{16pt} % raise page number 6pt
19}
20\pagestyle{myfancypagestyle}  % apply myfancypagestyle
21
22% 
23\begin{document}
24\HeadingQuestions
25\vspace{-5mm}
26\begin{multicols}{3}
27<<cols>>
28\end{multicols}
29\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{dcolumn}
 6\usepackage{fancyhdr}
 7
 8\newcolumntype{d}[1]{cD{.}{.}{#1}}
 9
10\def \HeadingAnswers {\section*{\Large Name: \underline{\hspace{8cm}} \hfill Date: \underline{\hspace{3cm}}} \vspace{-3mm}
11{<<title>> of decimals: Answers} \vspace{1pt}\hrule}
12
13% raise footer with page number
14\fancypagestyle{myfancypagestyle}{
15  \fancyhf{} % clear all header and footer fields
16  \renewcommand{\headrulewidth}{0pt} % no rule under header
17  \fancyfoot[C] {\thepage} \setlength{\footskip}{16pt} % raise page number 6pt
18}
19\pagestyle{myfancypagestyle}  % apply myfancypagestyle
20
21% 
22\begin{document}
23\HeadingAnswers
24\vspace{-5mm}
25\begin{multicols}{3}
26<<cols>>
27\end{multicols}
28\end{document}
The diagram template is below.
 1\begin{equation} 
 2    \raisebox{-0.85cm}{
 3        \begin{tabular}{d{<<numip>>.<<numdp>>}}
 4         &<<num1>> \tabularnewline
 5        $<<process>>$&<<num2>> \tabularnewline
 6        \hline
 7         &<<answer>> \tabularnewline
 8        \hline
 9    \end{tabular}}
10\end{equation}
11
12
13
Here’s what some parts of the diagram LaTeX do:
  1. begin{equation}: starts an equation environment.

  2. raisebox{-0.85cm}{: raises the following content by -0.85cm to move up the tabular diagram relative to the equation number.

  3. begin{tabular}{d{4.5}}: starts a tabular environment with decimal points aligned with room for 4 digits in front of it and 5 after it.

  4. <<num1>> \: adds the content of <<num1>> to the first row of the table and ends the row.

  5. <<process>>enspace<<num2>> \: adds the content of <<process>> and <<num2>> separated by an en space to the second row of the table and ends the row.

  6. hline: adds a horizontal line to the table.

  7. <<answer>> \: adds the content of <<answer>> to the third row of the table and ends the row.

  8. hline\: adds another horizontal line to the table and ends the row.

  9. end{tabular}}: ends the tabular environment.

  10. end{equation}: ends the equation environment.