2

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}
3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.