Answers for "LaTeX make specific table row bold"

0

LaTeX make specific table row bold

\documentclass{article}
\usepackage{tabularx}

\newcommand\setrow[1]{\gdef\rowmac{#1}#1\ignorespaces} 	% Custom row macro
\newcommand\clearrow{\global\let\rowmac\relax} 			% Custom macro ender

\clearrow
\begin{document}

\begin{tabular}{>{\rowmac}c|>{\rowmac}c|>{\rowmac}c<{\clearrow}} % Set up macro in table column formatting
a & b & c\\
\setrow{\bfseries}d & e & f\\ 		% Call macro to bold specific row
e & f& g\\
h & i & j\\
\setrow{\itshape} k & l & m\\ 		% Call macro to italic specific row
n & o & p
\end{tabular}

\end{document}
Posted by: Guest on August-19-2021

Browse Popular Code Answers by Language