Last active
February 21, 2018 10:58
-
-
Save avatar-lavventura/10cf7a28565c881f4c8a03b9d0d76d87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{figure}[H] | |
\centering | |
\begin{tikzpicture}[ | |
MyStyle/.style={draw, minimum width=2em, minimum height=2em, outer sep=0pt, node distance = 0.01cm }, | |
] | |
\matrix (A) [matrix of math nodes, nodes = {draw,align=center}, nodes={MyStyle, anchor=center, }, column sep=-\pgflinewidth] | |
{10\\ 10 & 20\\ 20 & 33\\ 15 \\}; | |
\begin{scope}[-{Stealth[length = 5.0pt]}] | |
\end{scope} | |
\end{tikzpicture} | |
\end{figure} | |
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}[
MyStyle/.style={draw, minimum width=2em, minimum height=2em, outer sep=0pt, node distance = 0.01cm },
]
\matrix (A) [
matrix of nodes, % removed math
nodes = {
draw,
text width=5mm, % added
align=center,
MyStyle,
anchor=center
},
column sep=-\pgflinewidth
]
{ {10\\ 10} & {20\\ 20} & {33\\ 15} \\};
\end{tikzpicture}
\end{document}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was hoping to get something like:
|10 | 20 | 33|
|10 | 20 | 15 |