# Tag Info

30

More or less: \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning, matrix} \usepackage{amsmath} \newcommand{\arrayfilling}[2]{ \fill[#2!30, opacity=.5] ([shift={(1mm,1mm)}]#1.north west) coordinate(#1auxnw)--([shift={(1mm,1mm)}]#1.north east)coordinate(#1auxne) to[out=-75, in=75] ([shift={(1mm,-1mm)}]#1.south east)coordinate(#1auxse)--(...

19

You can use the /.list feature John Kormylo mentioned in his answer to repeat a style for different inputs. \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \tikzset{myset/.style={row 2 column #1/.style={nodes={text=red}}}} \begin{tikzpicture}[myset/.list={1,3,5}] \matrix [matrix of nodes] { 8 & 1 & 6 & 8 & ...

19

Using text depth and text height, you can control the total height for the nodes; text width gives you control over the width (there's also a minimum size key which could be used): \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} \begin{document} \begin{tikzpicture}[every node/.style={anchor=base,text depth=.5ex,text height=2ex,...

17

First of all, as you're using matrix of nodes, you don't need to specify nodes manually. each node is only as big as it needs to be, so one (far from elegent or automatic way) is to specify minimum heights and minimum widths: Code \documentclass{beamer} \usepackage{txfonts} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{frame}[fragile]{...

17

Here is a proposal. It is essentially quite straightforward in that you simply create a TikZ matrix in the usual way, and then draw the coloured lines using the coordinates of the nodes. To ensure the green line doesn't lie over of the red and blue lines, I've adjusted the coordinates it uses by 0.5mm, this is controlled by a variable I've saved as \offset. ...

16


Only top voted, non community-wiki answers of a minimum length are eligible