![如何在 overleaf 上设置垂直添加 ON GRIDS](https://linux22.com/image/470153/%E5%A6%82%E4%BD%95%E5%9C%A8%20overleaf%20%E4%B8%8A%E8%AE%BE%E7%BD%AE%E5%9E%82%E7%9B%B4%E6%B7%BB%E5%8A%A0%20ON%20GRIDS%20.png)
答案1
尝试这个:
\documentclass[border=10pt]{standalone}
\usepackage{xcolor}
\begin{document}
\begin{tabular}{rrrrr}
&\textcolor{red}{1} & &\textcolor{red}{1} &\\
&6&7&5&3\\
+&7&9&1&7\\
\hline
1&4&6&7&0
\end{tabular}
\end{document}
输出:
编辑:新代码
\documentclass{article}
\usepackage{xcolor}
\begin{document}
\begin{tabular}{rrrrr}
&\textcolor{red}{1} & &\textcolor{red}{1} &\\
&6&7&5&3\\
+&7&9&1&7\\
\hline
1&4&6&7&0
\end{tabular}\\[2em]
If You dont want to done also solutions:\\
\begin{tabular}{rrrrr}
&6&7&5&3\\
+&7&9&1&7\\
\hline
\end{tabular}\qquad
\begin{tabular}{rrrrr}
&3&2&5&3\\
+&5&9&1&6\\
\hline
\end{tabular}\qquad
\begin{tabular}{rrrrr}
&3&2&5&3\\
+&5&9&1&6\\
\hline
\end{tabular}\qquad
\end{document}
输出:
最后的解决方案
像这样:
代码:
\documentclass{article}
\usepackage{tikz}
\usepackage[margin=1cm]{geometry}
\usetikzlibrary{matrix}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\large
\draw (7,2.5) node () {\Huge With solutions};
\draw[xstep=0.75cm,ystep=0.5,color=gray!30] (0,0) grid (3.75,2);
\matrix[matrix of nodes,
inner sep=0pt,
anchor=south west,
nodes={inner sep=0pt,text width=.75cm,align=center,minimum height=.5cm}
]{ &&&\textcolor{red}{1}&\\
&1 & 3 & 3 & 7 \\
+&5 & 4 & 4 & 5 \\
&6&7&8&2\\
};
\draw[line width=1pt] (0,.5)--(3.75,.5);
\begin{scope}[xshift=+5cm]
\large
\draw[xstep=0.75cm,ystep=0.5,color=gray!30] (0,0) grid (3.75,2);
\matrix[matrix of nodes,
inner sep=0pt,
anchor=south west,
nodes={inner sep=0pt,text width=.75cm,align=center,minimum height=.5cm}
]{ &\textcolor{red}{1}&&\textcolor{red}{1}&\\
&4 & 7 & 2 & 7 \\
+&8 & 3 & 4 & 5 \\
1&3&0&7&2\\
};
\draw[line width=1pt] (0,.5)--(3.75,.5);
\end{scope}
\begin{scope}[xshift=+10cm]
\large
\draw[xstep=0.75cm,ystep=0.5,color=gray!30] (0,0) grid (3.75,2);
\matrix[matrix of nodes,
inner sep=0pt,
anchor=south west,
nodes={inner sep=0pt,text width=.75cm,align=center,minimum height=.5cm}
]{ &\textcolor{red}{1}&\textcolor{red}{1}&\textcolor{red}{1}&\\
&7 & 2 & 8 & 5 \\
+&4 & 8 & 3 & 6 \\
1&2&1&2&1\\
};
\draw[line width=1pt] (0,.5)--(3.75,.5);
\end{scope}
\end{tikzpicture}
\vspace*{2cm}
\begin{tikzpicture}
\large
\draw (7,2.5) node () {\Huge Without solutions};
\draw[xstep=0.75cm,ystep=0.5,color=gray!30] (0,0) grid (3.75,2);
\matrix[matrix of nodes,
inner sep=0pt,
anchor=south west,
nodes={inner sep=0pt,text width=.75cm,align=center,minimum height=.5cm}
]{ &\;&&&\\
&1 & 3 & 3 & 7 \\
+&5 & 4 & 4 & 5 \\
&\;&&&\\
};
\draw[line width=1pt] (0,.5)--(3.75,.5);
\begin{scope}[xshift=+5cm]
\large
\draw[xstep=0.75cm,ystep=0.5,color=gray!30] (0,0) grid (3.75,2);
\matrix[matrix of nodes,
inner sep=0pt,
anchor=south west,
nodes={inner sep=0pt,text width=.75cm,align=center,minimum height=.5cm}
]{ &\;&&&\\
&4 & 7 & 2 & 7 \\
+&8 & 3 & 4 & 5 \\
&\;&&&\\
};
\draw[line width=1pt] (0,.5)--(3.75,.5);
\end{scope}
\begin{scope}[xshift=+10cm]
\large
\draw[xstep=0.75cm,ystep=0.5,color=gray!30] (0,0) grid (3.75,2);
\matrix[matrix of nodes,
inner sep=0pt,
anchor=south west,
nodes={inner sep=0pt,text width=.75cm,align=center,minimum height=.5cm}
]{ &\;&&&\\
&7 & 2 & 8 & 5 \\
+&4 & 8 & 3 & 6 \\
\;&&&&\\
};
\draw[line width=1pt] (0,.5)--(3.75,.5);
\end{scope}
\end{tikzpicture}
\end{document}