Articles of tables

\hfill inside a tabular environment doesn't flush right

When I put an \hfill in a tabular row colored using the colortbl package, the coloring does not extend to what I would expect the end of the row to be. For example, the code: \documentclass{article} \usepackage{colortbl} \usepackage{xcolor} \begin{document} \begin{tabular}{c} \rowcolor{black}\textcolor{white}{Sample Text}\\ \rowcolor{black}\hfill\textcolor{white}{More Text}\\ \end{tabular} \end{document} produces this output: I would expect it to produce […]

Line break in the table item

I am creating table in LaTeX and I need to get the text to perform line break automaticaly when it’s too long. And if possible, I’d like to get the text alignment to the left. Is it possible to handle this situation?

tables with column width that depends on the width of table entries

Is there an easy way to specify that a table should have columns of a width such that the beginning of a each new column is of a user-specified and column-independent distance to the end of the longest entry of the preceding column? Is there a way to specify that all columns in a table […]

Pgfplotstable ignores chars in filename

I am using the ignore chars key from the pgfplotstable to ignore some characters in a table. However, I have noticed that it also removes characters from the file name and I am wondering if this is a bug. Here is an example where the ignored char is s. The result is that the table […]

Numbering equations in tabular environment

I wish to number equations in a table, like numbering them in \begin{equation}. … \end{equation} Since all the equations are written as “inline” equations (for example, $a = b+c$) in tabular environment, I have no idea how to number them. Can you help me to find out a way?

How to draw a movement diagram in LaTeX

Can anyone help in producing movement diagrams (in the context of Game Theory) in LaTeX? See the attached image for what I am aiming for. I’ve produced the corresponding payoff table as seen below using the LaTeX code below: \begin{table}[h] \centering \setlength{\extrarowheight}{2pt} \begin{tabular}{cc|ccc} \multicolumn{2}{c}{} & \multicolumn{2}{c}{Colin}\\ \multicolumn{1}{c}{}& & A & B \\\cline{2-4} \multirow{3}*{Rose} & A […]

Formatting an array of complex numbers with pgfplotstable

Say I have two csv files representing the real and imaginary part of a complex matrix. I would like to nicely display this matrix in LaTeX. The difficulty is to correctly round numbers and not displaying them if they are rounded to 0. For example, 1.0000000e+00 and 5.0000000e-01 should give 1+0.5i and 5.0000000e-01 and 0.0000000e+00 […]

Is it possible to use an \hdashrule inside a \ctable as a \midrule?

I would like to know if there is a way to use an \hdashrule or \hdashline inside a \ctableas a \midrule? If possible, it will obey to the same rules as the \midrule command, like adjusting automatically to the table width and conserving the vertical spacing between the rows. I tried the following table : […]

Pgffor and the alignment character (&)

I need to construct a table that looks like: \begin{tabular}{ccc} a(1,1) & a(1,2) & a(1,3)\\ % <— a(2,1) & a(2,2) & a(2,3)\\ % <— I need this a(3,1) & a(3,2) & a(3,3)\\ % <— \end{tabular} for any given number of colums or rows. In fact I only need the part that has arrow next to […]

Creating left (only) curly braces in tabular environment

I have found the code below that almost does what I want. But since I do not understand it, I do not know how to alter it to my purposes. The code below generates a brace on the right side of a collection of three elements in a table and then in followed by a […]