如何在 overleaf 上设置垂直添加 ON GRIDS

如何在 overleaf 上设置垂直添加 ON GRIDS

我想在 overleaf 上执行此操作。但我不确定该如何进行。

预先感谢您的帮助! 在此处输入图片描述

答案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}

相关内容