Hi all,
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!
Graphics, Figures & Tables ⇒ Highlight Line of Tables
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Highlight Line of Tables
Hi Joshua,
have a look at this example: Highlighting in a formula.
That method also works with
Stefan
have a look at this example: Highlighting in a formula.
That method also works with
tabular
instead of matrix
or array
.Stefan
LaTeX.org admin
-
- Posts: 15
- Joined: Sun Aug 30, 2015 11:13 pm
Highlight Line of Tables
Stephen, thanks a lot! This is awesome. Since I use Lyx (Beamer in Lyx more specifically) and not Latex, I put
in the preamble. So, I need to put
I tried but I got an error message.
Thanks a lot again!
Code: Select all
Code, edit and compile here:
\usepackage{amsmath}\usepackage{tikz}\usetikzlibrary{fit}
Code: Select all
Code, edit and compile here:
\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: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Highlight Line of Tables
Hi Joshua!
Sorry I'm traveling without Internet (test voyage of an unfinished cruise ship) so I could not answer.
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
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
LaTeX.org admin