I am wondering if I can write a rule for this? Is a rule even a good idea for this or is it better if I keep doing the table. Happy to hear any thoughts.
Also trying to create that red arrow and the label of x10 over it but not really sure how to do this.
I am happy to just keep doing the table if better.
Thank you
Warning- very messy...
\documentclass[
a5paper,
% pagesize,11pt,% both are default and therefore not needed
bibliography=totoc,% bibtotoc is deprecated and therefore replaced according
% to the warning message
numbers=noenddot,% pointlessnumbers is deprecated and therefore replaced
% according to the warning message
headings=normal,% normalheadings is deprecated and therefore replaced
% according to the warning message
DIV=9,twoside=false,
headsepline,footsepline,footinclude=false,% see the KOMA-Script manual
headheight=87pt,% not used, to not lower the header, but this results in a warning
footheight=52pt, % no longer needed, because the lines are not part of the footer
]{scrbook}
\KOMAoptions{DIV=last}
\usepackage{trajan}
\usepackage{setspace}
\linespread{1.05}
\KOMAoptions{DIV=last}% moved according to the KOMA-Script manual, because it
% makes no sense before changing font an linespread.
\usepackage{graphicx}
\usepackage[%
autoenlargeheadfoot=false,% only warn but don't change height reserved for header or footer
manualmark,% or maybe automark, this is not clear due to missing information
% in the question.
plainheadsepline,plainfootsepline,% See the KOMA-Script manual for more information
]{scrlayer-scrpage}
\usepackage{geometry}
\geometry{
a5paper,
total={100mm,200mm}, %not sue what this line is either.
left=15mm,
right=15mm,
top=30mm,
bottom=35mm,
headsep=2mm,
}
\usepackage[dvipsnames]{xcolor}
\definecolor{ssblue}{rgb}{0.22,0.714,1}
\definecolor{red}{RGB}{214,39,41}
\definecolor{Lgreen}{RGB}{125,173,62}
\definecolor{Dgreen}{RGB}{74,108,47}
\definecolor{O}{RGB}{252,133,0}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\usetikzlibrary{shadows}
\newmdenv[tikzsetting={fill=white},
roundcorner=0pt,shadow=false,]{myshadowbox}
%%%Highlightbox
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\usetikzlibrary{shadows}
\newmdenv[tikzsetting={fill=ssblue!50},
roundcorner=0pt,shadow=false,]{highlight}
\newtheorem{example}{Example}
\let\oldexample\example
\renewcommand{\example}{\oldexample\normalfont}
%%%%%%%%%%%%%%%%%Packagaes%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{tikz}
\usepackage{multicol,amsmath,amsfonts}
\usepackage{enumitem}
\usepackage{tasks}
\usepackage{cancel}
%%%%%%%%%table
\usepackage{pbox}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\usepackage{xcolor,colortbl}
%%%%%%%%%table
\begin{document}
\begin{enumerate}[labelwidth=1.5em, labelsep=0.5em, wide=0pt]\everymath{\displaystyle}
\item Fill in the blanks.
\begin{tasks}label=\alph*), label-width=1.5em, after-item-skip=10pt
\task Multiply 0.3 by 10.
\begin{tblr}{colspec = {|X[2,c]|X[0.1,c]|X[2,c]|X[2.3,c]| X[2.4,c]|},
column{2} = {gray!40},
cell{1}{1} = {ssblue!40},
cell{1}{3} = {red!40},
cell{1}{4} = {yellow!40},
cell{1}{5} = {Lgreen!40},}
\hline
\textbf{Ones} & & \textbf{Tenths} & \textbf{Hundredths} & \textbf{Thousandths} \\
\hline
& $\cdot$ & 3\\
\hline
3 & $\cdot$& \\
\hline
\end{tblr}
\begin{align*}
\text{3 tenths} \times 10 &= \rule{2cm}{0.1mm} \; \text{tenths} \\
&= \rule{2cm}{0.1mm} \; \text{ones} \\
\end{align*}
So, $0.3 \times 10$ = \rule{2cm}{0.1mm}
\end{tasks}
\end{enumerate}
\end{document}


geometrymeans you are basically undoing that layout and very possibly breaking other koma-ish things? – cfr Mar 31 '24 at 02:45Something like this, so that I don't have to write everything with the table and just write the numbers. No worries if too much work. Thank you
– user292225 Mar 31 '24 at 03:28DIV=9has something to do with that. – cfr Mar 31 '24 at 03:32red. I think it is on the LaTeX list of colours-you-shouldn't-redefine, but I haven't checked. – cfr Mar 31 '24 at 03:39tikzpicture, but then I'd be inclined to just use amatrix of nodesrather than messing about withtabularray. But that's not really an answer to how to automate this. (Actually, automating atikzpicturewould be more straightforward in a way as you don't have to worry abouttabularray's parser. Though PGF has its own, too ....) – cfr Mar 31 '24 at 04:57tikzmarkin the values list and it seems to work. I'd still be inclined to switch to TikZ but maybe not at this point. – cfr Mar 31 '24 at 05:18