I am looking for a way, to change the height of a row in a tabular environment (or evenly add space at the top and bottom) but without changing the size of an included matrix.   If I use \renewcommand{arraystretch}{1.5} (which works perfectly in any other case) unfortunately also changes the size of my matrix. See MWE:  \documentclass[a4paper,12pt]{report}  \usepackage{amsmath} \begin{document}  \begin{tabular}{|c|c|}\hline $\begin{pmatrix} 1\\2\\3  \end{pmatrix}$&amp;2 \\ \hline \end{tabular}  \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|}\hline $\begin{pmatrix} 1\\2\\3  \end{pmatrix}$&amp;2 \\ \hline \end{tabular}  \end{document}   Which gives me the following output:   and    But I actually want something like this:    Is there any way to do this?
122258
Possible Duplicate:          I am trying to insert a matrix inside a table, and I am looking for a good way to do this. Usually when I write matrices in equations, I use array environment, so I naively defined an array inside tabular, and it sort of works. The only problem is that the matrix itself seems to take up a huge amount of space inside the cell. An example is   \begin{tabular}{|c|c|} \hline \textbf{EKF} &amp; \textbf{UKF}\\ \hline $Q = \left[ \begin{array}{cc} 0.1 &amp; 0 \\ 0 &amp; 0.1 \end{array}\right]$ &amp; $Q = left[ \begin{array}{cc} 0.01 &amp; 0 \\ 0 &amp; 0.01  \end{array}\right]$\\ \hline $R = 5 \times 10^{-3}$ &amp; $R = 5 \times 10^{-5}$ \\ \hline \end{tabular}   Is there any way to increase the spacing in the cell containing the matrix without that matrix taking up all the space?
101166
A hopefully very simple question. Why does the multicolumn in my example below screw up the spacing between the columns below? Obviously I would want columns A, B, and C to be spaced evenly (as they are if I comment the multicolumn-row). How to achieve this?  \documentclass{scrbook} \usepackage{booktabs} \usepackage{multirow}  \newcommand{\crule}[1]{\multispan{#1}{\hspace*{\tabcolsep}\hrulefill\hspace*{\tabcolsep}}}  \begin{document}  \begin{table}[!t]     \caption{bla.}      \begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}c@{\extracolsep\fill}c@{\extracolsep\fill}c@{}}     \toprule         &amp; \multicolumn{3}{c}{sample number}\\         &amp; \crule{3}\\ % definition should still include some neg. vspace after that         &amp; 1 &amp; 2 &amp; 3\\     \midrule     some longer text here  &amp; A    &amp; B   &amp; C\\     \bottomrule     \end{tabular*}     \end{table} \end{document}   results in
100054
How to adapt this table to break across page boundaries?  Original question here:      \documentclass{article}     \usepackage{tabularx}     \usepackage{amsmath}     \usepackage[table]{xcolor}     \usepackage{tabularx, multirow, makecell, rotating} %     \usepackage{enumitem}          \begin{document}         \begin{center}     \bfseries \settowidth\rotheadsize{List of Abbreviation/accronym} \begin{tabularx}{\linewidth}{|c|&gt;{\centering\arraybackslash}X|}     \hline \cellcolor{gray!30} Abbreviation &amp; \cellcolor{gray!30} Explanation     \\     \hline \multirow[b]{2}{*}{USA}                &amp; \cellcolor{blue!30}  United state of america  \rule[-1em]{0pt}{2.5em} \\     \cline{2-2} %   &amp;  %   \rule[-1em]{0pt}{2.5em} \\ %    \cline{2-2}     &amp;    \rule[-1em]{0pt}{2.5em} \\     \hline         \multirow[b]{2}{*}{NY}                &amp;  \cellcolor{blue!30} New york   \rule[-1em]{0pt}{2.5em} \\     \cline{2-2} %   &amp;  %   \rule[-1em]{0pt}{2.5em} \\ %    \cline{2-2}     &amp;     \rule[-1em]{0pt}{2.5em} \\     \hline \end{tabularx}     \end{center}     \end{document}
76966
How can I change the color of the lines (the frame) in a tabular environment? In the following MWE:  \begin{tabular}{c|c|c} a&amp;b&amp;c \\ \hline d&amp;e&amp;f \\ \hline g&amp;h&amp;i \end{tabular}   I would like the horizontal and vertical lines of the table to have, say a blue color.
123640
I was trying to insert matrix into a \subsection{}:  \subsection{Suppose $X= \begin{array}{cc} 1 &amp; 2 \\ 3 &amp; 4 \end{array}$}   This gives me an error:   ! TeX capacity exceeded, sorry [input stack size=5000].   What is wrong here? Thanks!
123832
I have a matrix initialized with some colors and no values. With the help of beamer's overlays I wanted to modify the matrix in the next step, changing some of the colors and inserting some values. I attach a figure, so you can get a clear picture of what I want to achieve (on the top you have the empty matrix, and on the bottom the matrix after it has been filled in):    I have tried to overwrite the whole matrix with a new one, but that has several problems:   Text like "Some label" gets overwritten and looks thicker in the second slide. If I need to do N steps, instead of just 2, rewriting the whole matrix every time is really tedious.   I know I am not really aware of all the possibilities in TikZ and Beamer, so there might something there that I am missing, and that would allow me to do what I want. Does anyone know what can I do in order to update the matrix nodes between the overlay steps?
77930
I currently have this table:  \begin{table} \centering \begin{tabular}{ |c|c| } \hline no test &amp; no test \\ \hline no test &amp; \begin{tabular}{c|c} D1 &amp; 1.23 \\ \hline D2 &amp; 1.23 \\ \end{tabular} \\ \hline \end{tabular} \end{table}    Giving:    hline in the nested tabular does not span the entire cell width.  Of course multirow/multicolumn would be a choice. However, this is a "mutable" table, to which I will need to add "sub-rows" each time new data arrives, but I do not know in advance where. So, it could become something like:    For such purpose, multirow/multicolumn seems that would require constantly changing their row/column numbers.  How can this be solved in such a way that minimizes the work each time a new "sub-row" is added?  Thanks.
17999
I'm using itemize and tables like the following  \begin{tabularx}{\textwidth}{&gt;{\ttfamily}llX}  \toprule  \textbf{\rmfamily Operator} &amp; \textbf{Typen} &amp; \textbf{Regel} \\  \midrule  = &amp; Alle Typen &amp;   \begin{itemize}    \item This is how we roll    \item Maybe we can talk?   \end{itemize} \\  \bottomrule \end{tabularx}   But it keeps inserting a vertical space before the itemized list. How can I prevent it from doing so?
40156
I would like to create a matrix with rows and columns being labeled. I would like the matrix elements to be right aligned, the row labels being displayed to the right of the matrix, and the column labels above the matrix. I tried:  \documentclass{article}  \usepackage[T1]{fontenc} \usepackage[american,ngerman]{babel}  \begin{document} % does work: $\bordermatrix{%  &amp; 1 &amp; 2 \cr 1 &amp; x1 &amp; x2 \cr 2 &amp; x3 &amp; x423 \cr 3 &amp; x5 &amp; x6 }$ % does not work (see error below): % $\bordermatrix*{% %   x1&amp;x2&amp;1\cr %   x3&amp;x4&amp;2\cr %   x5&amp;x6&amp;3\cr %   1&amp;2 6 }$ \end{document}  % ERROR: Misplaced alignment tab character &amp;.  % --- TeX said --- % l.17   x1&amp; %           x2&amp;1\cr % --- HELP --- % The special character &amp;, which should be used only to separate items % in an array or tabular environment, appeared in ordinary text. You % probably meant to type \&amp;.   To get at least the row labels displayed at the correct side of the matrix, I wanted to use the starred version of \bordermatrix, but that did not work (as opposed to given in Voss's mathmode guide). Also, the matrix entries are not right aligned. How can I create such a matrix? Is there a way to do this with amsmath?  UPDATE  Thanks to the link by Werner, a minimal example is this:  \documentclass{article} \usepackage{blkarray} \newcommand{\matindex}[1]{\mbox{\scriptsize#1}} \begin{document} \[   A=\begin{blockarray}{rrl}     \matindex{1} &amp; \matindex{2} &amp; \\     \begin{block}{(rr)l}       \,100 &amp; b\phantom{\,} &amp; \matindex{row 1} \\       2 &amp; 12 &amp; \matindex{row 2} \\       e &amp; f &amp;  \matindex{ABDC} \\     \end{block}   \end{blockarray} \] \end{document}   It's just a quick hack to get a bit more horizontal space between the parentheses and the matrix entries.
121324
I have a table that is typeset using a tabular environment.  (I want to keep it in a tabular environment.)  The contents of each row is an expression involving radicals. The inter-line spacing is inconsistent with other tables in my file and with the inter-line spacing of the text in my file.  I seem to recall that the inter-line spacing should be 1.2 times the height of the current line or current row.  Is that right?  \documentclass[10pt]{amsart}  \begin{document}  \noindent {\textbf{Example}} \vskip1.25mm The following functions are increasing on the interval $[0, \, \infty)$. \vskip1.25mm \noindent \hspace*{1em} \begin{tabular}{r l} i.)     &amp;       \hspace*{-0.5em}$x^{2} + x$ \\ ii.)    &amp;       \hspace*{-0.5em}$x^{3} + 2x^{2} + 3x - 7$ \\ iii.)   &amp;       \hspace*{-0.5em}$x^{2} + \sqrt{x}$ \end{tabular} \vskip0.25in  \noindent {\textbf{Example}} \vskip1.25mm The following functions are increasing on the interval $[0, \, \infty)$. \vskip1.25mm \noindent \hspace*{1em} \begin{tabular}{r l} i.)     &amp;       \hspace*{-0.5em}$\sqrt{x^{2} + x}$ \\ ii.)    &amp;       \hspace*{-0.5em}$\sqrt[\uproot{1} \leftroot{-1} 3]{x^{3} + 2x^{2} + 3x - 7}$ \\ iii.)   &amp;       \hspace*{-0.5em}$(x^{2} + \sqrt{x}){\vphantom{x^{2} + \sqrt{x}}}^{3}$ \end{tabular}  \end{document}
92980
I just upgraded my texlive distribution and can no longer insert space in table rows using \\[x pt] syntax when colortbl is loaded.  It seems that recent changes to array.sty might be the problem as this is the only package to change recently.  Can anyone suggest a workaround?  MWE  \listfiles \documentclass{article} \usepackage{colortbl} \begin{document} \begin{tabular}{l}   \hline   No space below with \texttt{colortbl.sty} loaded. \\[10mm]   \hline \end{tabular} \end{document}   File versions in use:   article.cls    2014/09/29 v1.4h Standard LaTeX document class   size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option) colortbl.sty    2012/02/13 v1.0a Color table columns (DPC)    array.sty    2018/04/07 v2.4g Tabular extension package (FMi)    color.sty    2016/07/10 v1.1e Standard LaTeX Color (DPC)    color.cfg    2016/01/02 v1.6 sample color configuration   pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
75161
I have shown that two of the three elementary operations will not change the image of the row space of the matrix: given a row vector $\vec{v}$, $k\vec{v}$ will span the same (scalar multiplication), and switching the order of the rows won't change anything because the span of the row vectors will be the same (vectors will be in a different order). However, how would one show that adding/subtracting vectors does not change the row space?
77160
I want to have my tables fill the entire width of the page (i.e., \textwidth). So far, the only thing I've managed to come up with is:  \renewcommand{\tabcolsep}{4.4pt}   By manually trying different values, I can eventually get the table to spread out and fill the space. However, this is tedious as I have a lot of tables.  I tried the tabularx package:  \begin{tabularx}{\columnwidth}{ r r r r r r r } \toprule &amp; $z_{6}$ &amp; $z_{8}$ &amp; $z_{9}$ &amp; $z_{11}$ &amp; $z_{13}$ &amp; $z_{14}$ \\ \midrule fileA &amp; 0.00 &amp; 0.00 &amp; 0.00 &amp; 0.08 &amp; 0.79 &amp; 0.08  \\ fileB &amp; 0.01 &amp; 0.00 &amp; 0.13 &amp; 0.00 &amp; 0.84 &amp; 0.00  \\ fileC &amp; 0.00 &amp; 0.39 &amp; 0.02 &amp; 0.49 &amp; 0.00 &amp; 0.00  \\ fileD &amp; 0.75 &amp; 0.08 &amp; 0.00 &amp; 0.00 &amp; 0.00 &amp; 0.00  \\ \bottomrule                              \end{tabularx}   However, this still relies on the \tabcolsep value. (If the value is small, all the columns will still be close; if it's large, the columns will be more spread out.) What I'm looking for is an automatic solution for two things:   the table to take the entire width of the page; and each column to be evenly spaced along the horizontal.   tabularx only does (1). How can I get (2)?
52490
The following code shows that a \color{red} command increases the height of a tabular cell. I want to use a switch, not a command as \textcolor{red}{text}.  \documentclass{article}  \usepackage{xcolor} \usepackage{float}  \begin{document}  \begin{table}[H] \begin{tabular}{*{2}{p{0.45\textwidth}}} \hline \color{red} header &amp; header \tabularnewline \hline  %  content  &amp; content \tabularnewline  content  &amp; content \tabularnewline  content  &amp; content \tabularnewline \hline \end{tabular} \end{table}  \end{document}     How can I work around this problem?
21071
I have 5 columns in my table. So I want to reduce distance between two columns to make it look good. In the following figure, I want to reduce distance between column 1 and 2.   I tried \setlength{\tabcolsep}{5pt} but it didn't look good. I want top row to take only two rows, not three. how do I do that?    \usepackage{tabularx,booktabs}  \usepackage{array} \newcolumntype{Z}{&gt;{\centering\let\newline\\\arraybackslash\hspace{0pt}}X} \newcolumntype{C}{&gt;{\centering\let\newline\\\arraybackslash\hspace{0pt}}p}  \begin{table}[t] \caption{Case studies} \centering  \begin{tabularx}{\textwidth}{C{3cm}*5{Z}}     \toprule  Nature of unreliability &amp;  Sender SST &amp;  Receiver SST &amp;  Implementation SST &amp;  Retransmission Bound \\      \midrule  Noisy (Single fixed error message) &amp; DSST &amp; DSST &amp; DSST &amp; Unbounded \\ \bottomrule \end{tabularx} \label{case-studies} \end{table}
105515
Is there any way to reduce the font size in a table/tabular but only in one of its columns without repeating the size command in each cell of that column?  Thanks.
69254
Similar to , I am trying to output a similar matrix with dotted line instead of dashed line.       Is there anyway to do this? I also try to use these three packages:  \usepackage{tabularx} \usepackage{longtable} \usepackage{arydshln}  I also like to learn how to implement this in \documentclass{revtex4}, in addition to using in \documentclass{article}. As far as we know that arydshln may not be compatible with revtex4 or revtex4-1 as far as I tried.   . And I add arydshln after the tabularx; but it cannot compile successfully, but only output errors. Could someone offer any hints or some resolutions?  The answer needs not to be complete. Thank you for your help!!!