I want a background arrow in a column of text to show a propagating effect.
I tried using tikzmark and tikz, but the arrow overwrites the text, and tikz opacity doesn't play nice with regular text.
\documentclass[a6paper]{article}
\usepackage{array}
\usepackage{graphicx,colortbl,booktabs,environ,hhline}
\usepackage{tikz}
\usetikzlibrary{calc,arrows}
\begin{document}
\pagestyle{empty}
\newcommand{\tikzmark}[1]{%
\tikz[overlay,remember picture] \node (#1) {};}
\begin{table}
\centering
\resizebox{0.5\columnwidth}{!}{%
\newcommand{\bluecells}{\cellcolor{blue!08!white}\textcolor{black}}
\newcommand{\greencells}{\cellcolor{green!10!white}\textcolor{purple!3!black}}
\renewcommand{\arraystretch}{1.4}
\setlength{\extrarowheight}{1.2pt}
\begin{tabular}{m{1.5cm}m{1.5cm}m{1.5cm}m{1.5cm}m{1.5cm}m{1.5cm}}
\hskip1ex & A & G\tikzmark{a} & X & G & R \\\hhline{~-----}
%row 1
A & A &A &A &A &A \\
%row 2
A &A &A &A &A \\
%row 3
A &A &A &A &A \\
%row 4
A &A & XX\tikzmark{b} & A & A & A \\
%row 5
A & A & A & A & A \\
\end{tabular}
\tikz[overlay,remember picture] \draw[-triangle 45,draw=green!20!white,line width=5pt,fill opacity=0.2] ($(a.south)+(-.2,-.3)$) -- ($(b.south)+(-.4,-.1)$);
}
\end{table}
\end{document}
I'd like to avoid redoing my tables in tikz just to get the arrow, because I have to convert them all. If I could somehow convince tikz to draw under the text, or even better to have the table redraw a second time over the whole thing, that would fix the problem.
Also, if anyone has a better suggestion than a background arrow to show propagating effects, I'd love to know. However, I have to do rows and colums, and make a sort of weave out of things, since sometimes the effects (arrows) cross over one another. Tikz will have no trouble doing that, if I can get it to play nice.


resizeboxon a tabular environment as it weill lead to inconsistenz and sometimes extremely small font sizes. Instead, I'd change the column widths. – leandriis Oct 03 '19 at 16:03