TransWikia.com

pgfplotstable: How to highlight row and column of a cell with special content

TeX - LaTeX Asked on March 2, 2021

If I say string replace={x}{cellcolor{pink}x} a cell with content ‘x’ gets highlighted.
But how to highlight the row and the column of ‘x’ too?

enter image description here

documentclass[]{article}
usepackage{pgfplotstable}
pgfplotsset{compat=newest}
pgfplotstableset{string type, col sep=comma, header=false}
pgfplotstableread[]{
a, b, c
d, e, f
g, x, i
j, k, l
}mytable

usepackage{colortbl}
begin{document}
section{Highlight a Cell with special Content}
pgfplotstabletypeset[
string replace={x}{cellcolor{pink}x}
]{mytable}

section{Highlight row, column too?}
pgfplotstabletypeset[
string replace={x}{cellcolor{pink}x}
]{mytable}
end{document}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP