Graphics, Figures & Tables ⇒ Highlight Line of Tables
-
- Posts: 15
- Joined: Sun Aug 30, 2015 11:13 pm
Highlight Line of Tables
In order to highlight the results in a Lyx Table I need to put a red box around a table column. Any idea on how to do so?
I tried \colortbl, \boxed but didn't work.
Thanks!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Highlight Line of Tables
have a look at this example: Highlighting in a formula.
That method also works with
tabular
instead of matrix
or array
.Stefan
-
- Posts: 15
- Joined: Sun Aug 30, 2015 11:13 pm
Highlight Line of Tables
Code: Select all
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{fit}
Code: Select all
\newcommand{\overlay}[2][]{\tikz[overlay, remember picture, #1]{#2}} \tikzset{ highlighted/.style = { draw, thick, rectangle, rounded corners, inner sep = 0pt, fill = red!15, fill opacity = 0.5 } } \newcommand{\highlight}[1]{% \overlay{ \node [fit = (left.north west) (right.south east), highlighted] (#1) {}; } } \newcommand{\flag}[2]{\overlay[baseline=(#1.base)] {\node (#1) {$#2$};}}
just before the table?
Thanks a lot again!
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Highlight Line of Tables
Sorry I'm traveling without Internet (test voyage of an unfinished cruise ship) so I could not answer.
Please tell us the error message.joshua_smith_158 wrote: I tried but I got an error message.
Generally it would be good if you would post the code you tried as .lyx attachment in the forum, and even better as LaTeX export. (reduced copy, but compilable or bringing the error)
Stefan