I have to highlight the ith row and jth column which are removed from a matrix to form its minor as depicted in the picture  My try is this, but I don't know how to highlight..      \documentclass[preview, border=1pt, convert={outext=.png}]{standalone} \usepackage{amsfonts} \usepackage{mathtools} \usepackage{amsmath} \usepackage{amssymb} \usepackage{siunitx} \usepackage{braket} \usepackage[table]{xcolor} \newcommand\x{\times} \newcommand\y{\cellcolor{green!10}} \usepackage[utf8]{inputenc} \begin{document} \begin{equation*}     A = \det\left(\begin{array}{cccc}     \rowcolor{red!20}     a_{11}  &amp; \ldots  &amp; a_{1j} &amp; \ldots &amp; a_{1n} \\     \ldots   &amp; \ldots &amp; \ldots &amp; \ldots &amp; \ldots \\    \rowcolor{blue!20}     a_{1j}  &amp; \ldots   &amp; a_{ij} &amp; \ldots &amp; a_{in} \\     \ldots   &amp; \ldots &amp; \ldots &amp; \ldots &amp; \ldots \\     a_{n1}  &amp;  \ldots  &amp; a_{nj} &amp; \ldots &amp; a_{nm}\\   \end{array}\right) \end{equation*} \end{document}
28590
I have a matrix shown below. I would like to have the whole row green rather than only the cells.   How can I do that?  \begin{equation}\label{eq:appendrow} \newcommand\x{\times} \newcommand\y{\colorbox{mygreen}{$1$}}   \left(\begin{array}{cccc}     \x  &amp; \x  &amp; \x &amp; \x \\     0   &amp; \x  &amp; \x &amp; \x \\     0   &amp; 0   &amp; \x &amp; \x \\     0   &amp; 0   &amp; 0  &amp; \x \\     \y  &amp; \y  &amp; \y &amp; \y \\   \end{array}\right) \end{equation}   The output is:
35573
\begin{tabular}{|l|l|l|} \hline Column A &amp; Column B \\  \begin{math} x &amp; y \\ \end{math}  \end{tabular}   This won't let me compile and gives a lot of errors, how do I enable math mode in a table without using $ on everything?
66743
I would like to have a table that looks like the image below.  \documentclass{article} \begin{document}     \begin{table*}         \begin{tabular}{|l|l|l|l|l|l|l|} \hline              &amp;\multicolumn{3}{c|}{A} &amp;\multicolumn{3}{c|}{B} \\ \cline{2-7}            1 &amp; a &amp; b &amp; c &amp; d &amp; e &amp; f \\ \hline           2 &amp; g &amp; h &amp; i &amp; j &amp; k &amp; l \\ \hline          \end{tabular}     \end{table*} \end{document}   However, I cannot obtain the table with an entire empty row, like the cold cache, written in its center. Is there some way to do so?    I also want the caption below the table.
123044
I would like to highlight specific digits in a number. Since the number is large I would like to use \num{} from . Of course I can do it manually as in the MWE below, but was hoping that there might be an easy way to use the commented out syntax to accomplish this:  Code: \documentclass{article} \usepackage{xcolor} \usepackage{siunitx}  \newcommand*{\Color}[2][red]{\textcolor{#1}{#2}}%  \begin{document}  \num{99 976}  88\,9\Color{76} %\num{88 9\Color{76}}  77\,\Color{976} %\num{77 \Color{976}}  \end{document}
64300
I'm having an issue with conditional formatting using the INDIRECT function. I'm doing something similar to  , but the only answer there isn't working for me.  Basically, I want to highlight rows where B is not blank and F is blank. INDIRECT will work for ONE of the conditions, but   = AND(INDIRECT("B"&amp;ROW()) &gt; 0, INDIRECT("F"&amp;ROW()) = "")    does not work at all.  The answer in the question points to replacing the references with relative ones, so I'm thinking this should work:  = AND ($B2 &gt; 0, $F2 = "")   But it does not, nor does ISBLANK($F@) or ISEMPTY($F2) (the cell contains a formula that sometimes will return "", I want the row highlighted in these cases but only when something is in column B).  Am I missing something about relative references? Why doesn't INDIRECT work with AND/OR?
92186
I'm trying to typeset some python code, and I would like integer literals to be highlighted. I've come up, after about two hours of fighting with the documentation and various other questions here and on SO, with the following:  \lstset{ %     language=Python,     otherkeywords={1, 2, 3, 4, 5, 6, 7, 8, 9, 0},     morekeywords=[2]{1, 2, 3, 4, 5, 6, 7, 8, 9, 0},     keywordstyle=[2]{\color{orange}},     keywordstyle=\color{blue}\bfseries,     stringstyle=\color{red}, }   Unfortunately, that doesn't work. Numbers found in strings are also highlighted, which is rather annoying, and not only are they highlighted: they are highlighted in blue. Numerals in regular program text, on the other hand, are rightly highlighted in red.  Help?  EDIT: Thanks Peter Grill for your very nice solution. Is there a way to not break string colouring, though? When I use you code, the stringstyle=\color{red} doesn't seem to work anymore (strings are just plain black). Similarly, comments can be enclosed in triple quotes in python, and if I adapt your quote to detect """ blocks, then the corresponding  comments are not highlighted anymore.
106120
I need a formula for conditional formatting to make an Excel 2010 spreadsheet alternate highlighting when a single column changes.  This question, "", is exactly what I want to do, but the suggested solution didn't work for me--it just highlights the first row of each matching value.  I know how to use conditional formatting, but for the life of me I can't figure out or find any pointers on the net so far to make this work.  Ideas?  Here is a link to a picture of how I want my spreadsheet to look when I'm done.  Basically I want every other Disp Number value row to be highlighted.  Seems like it would be a common thing to want to do, and I've seen this asked for in various places, but people struggle with making it work.
58096
I'm trying to make a conditional formatting rule in Google Spreadsheet that would highlight a row green based on text in multiple cells.   If cells L2, M2, and N2 = APPROVED; and cell O2 = X; then row 2 = highlighted green.
56051
I would like to know how to add dash lines in Matrix (see figuge)  Cheers  S.L.    \documentclass{article} \usepackage{amsmath}  \begin{document} \begin{equation} \begin{bmatrix} N &amp; B_i \\ B_i^T &amp; 0 \end{bmatrix} \begin{bmatrix} x_i\\ k \end{bmatrix} =\begin{bmatrix} n\\ 0 \end{bmatrix} \text{ with } n = A^TPl \end{equation} \end{document}
38638
I would like to define a command that puts a red box around an equation with yellow highlighting.  I have the basics working pretty well. What I am unable to figure out is:   How to keep the alignment of the equations on the equal sign. Be able to have the alignment character within the call to highlight box.  That is, I would really prefer to be able to say something like:  \highlightbox{g &amp;= f}   instead of what I resorted to doing below.  Here is what I have so far:  \documentclass[11pt]{article} \usepackage{color} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts}  \newcommand{\highlightbox}[1]{%     \setlength{\fboxrule}{6pt}\fcolorbox{red}{yellow}{#1}\quad% }  \begin{document} \begin{align*}    \highlightbox{a} &amp;\highlightbox{= b} \\                  c  &amp;              = d \\                  e  &amp;              = f  \\    \highlightbox{g} &amp;\highlightbox{= f} \\ \end{align*} \end{document}
106147
I'd like to fill the cells of a table with a background color. How can this be done?
47609
Sometimes you can see in books tables, that have alternating background color for rows in a table to support readability. How I can achieve this with LaTeX?  And yes, I could put macros \odd and \even into each row, but in that case I would have to change all following rows, if I input later another row into the table. I want TeX to decide itself, which row is odd or even and put the appropiate style into it.
94667
I am using Google Spreadsheets to create a matrix (time/activity) as a daily schedule for staff to sign into.  Is there a formula to calculate the number of cells in a column that are shaded (or not shaded) a certain color?  For example: 20 of the cells are gray and 31 are not gray (shaded any other color) and instead of manually counting them, it calculates this at the bottom of reach column.
115292
I am trying to write that the trace is the pushforward of the determinant, and so I would like to have * as a subscript beside \det in mathmode. But when I type $\det_*$ then instead the * appears below \det. Can I change this somehow?
106174
Some material I'm creating requires output that looks like this:  (note the position of the arrows).    I'm using the following code (with the AMS macros) to generate this, and I'm looking for comments - it works fine, but I'm curious if there's a better/cleaner way to deal with the arrows:  \[   \begin{bmatrix}[rrr|r] 1 &amp; 2 &amp; 0 &amp; -1 \\ 2 &amp; 1 &amp; 1 &amp; 1 \\ -1 &amp; 1 &amp; -1 &amp; -1   \end{bmatrix}   \begin{matrix}[c] ~ \\ \xrightarrow{R_2-2R_1} \\ \xrightarrow{R_3+R_1} \end{matrix}   \begin{bmatrix}[rrr|r] 1 &amp; 2 &amp; 0 &amp; -1 \\ 0 &amp; -3 &amp; 1 &amp; 3 \\ 0 &amp; 3 &amp; -1 &amp; -2 \end{bmatrix}   \begin{matrix}[c] ~ \\ ~ \\ \xrightarrow{R_2+R_3} \end{matrix}   \begin{bmatrix}[rrr|r] 1 &amp; 2 &amp; 0 &amp; -1 \\ 0 &amp; -3 &amp; 1 &amp; 3 \\ 0 &amp; 0 &amp; 0 &amp; 1 \end{bmatrix} \]   I'm using only the standard AMS macros, together with a cute addition to the matrix macros that I found on the Web that allows column specifications within the AMS matrices:  \makeatletter \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%   \hskip -\arraycolsep   \let\@ifnextchar\new@ifnextchar   \array{#1}} \makeatother
57009
I am struggling to create the matrix in the picture attached using Latex. I have tried using commands like \hline but the matrix ends up looking messy as the line goes all the way across.    Edit: To clarify, I am looking for each block to have a square outline.
124035
How can I write a matrix with a header line that is not bracketed? I have used the following code to produce the results below. In addition of being ugly, it is impractical when I need to align the first row, n1, ..., n6 with the matrix columns.  \documentclass{book}  \usepackage{amsmath}    \begin{document}    \[ \ \ \ \ \ \ \ n_1\ \ \ \ \ \ \ \ n_2\ \ \ \ n_3\ \ \ \ \ \ \ \ \ n_4\ \ \ \ n_5\ \ \ \ n_6\]     \[ \begin{bmatrix}         1 &amp; -1 &amp; 0 &amp; 0 &amp; 0 &amp; 1\\         0.960 &amp; -0.977 &amp; 0 &amp; 0 &amp; 0 &amp; 0.983\\         0 &amp; 1 &amp; -1 &amp; -1 &amp; 0 &amp; 0\\         0 &amp; 0.977 &amp; 0 &amp; -0.983 &amp; 0 &amp; 0\\         0 &amp; 0 &amp; 0 &amp; 1 &amp; -1 &amp; -1\\         0 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1\\        \end{bmatrix}        \begin{bmatrix}n_1\\n_2\\n_3\\n_4\\n_5\\n_6\end{bmatrix} =        \begin{bmatrix}0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 100\end{bmatrix} \]  \end{document}