Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need an image detailing the lattice multiplication method and it should look like this:

http://megamindacademy.com/wp-content/uploads/2011/09/Lattice-Method-for-Multiplication-Example-51.jpg

share|improve this question
    
Do you try to make something ? –  Alain Matthes Feb 9 '13 at 6:43
    
I don't know what kind of code would work for this situation. I've tried searching online but there's nothing that I can use. This is for a 5th grade class that I'm teaching and LaTeX was recommended by the district. –  Janice Feb 9 '13 at 6:54
add comment

1 Answer

up vote 10 down vote accepted

Not a complete code but it's one way to begin the picture. I think there are a lot of possibilities better ... You need the fit library to draw the yellow line. You can see a lot o examples to finish the picture.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}

\begin{document}
\begin{tikzpicture}[case/.style={minimum width=2cm,minimum height=2cm,draw},line/.style={blue!10!gray,line width=4,line cap=round,line join=round}]
\node[case] (a) at (0,0){} ;
\node[case] (b) at (2,0){} ;
\node[case] (c) at (0,2){} ;
\node[case] (d) at (2,2){} ;

\draw[line] (c.south west) -- (c.north west) -- (c.north east) -- (c.south west)-- ++(-1,-1);
\draw[line] (c.south west) -- (c.south east) -- (c.north east) -- (d.north east)-- (a.south west) -- ++(-1,-1);
\draw[line] (d.north east) -- (b.north east) -- (b.north west) -- (b.south west)-- (a.south west) -- (a.north  west);
\draw[line] (b.south west) -- (b.south east) -- (b.north east) -- (b.south west)-- ++(-1.25,-1.25);

\node[left=0.5 cm,above] at (a) {\huge 2};
\node[above=0.25 cm] at (c.north) {\huge 4};
\node[above=0.25 cm] at (d.north) {\huge 5};
\node[text=green,shift={(0.5,0.5)}] at (d.north east) { \huge $\times$};

\end{tikzpicture}
\end{document}   

enter image description here

share|improve this answer
1  
Thank you for the code, I've figured out the rest! –  Janice Feb 9 '13 at 9:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.