Questions tagged [tables]

{tables} is about the tabular environment and related packages such as {array}, {booktabs}, {tabularx}, {tabu}, {tabularray} and {longtable}. For questions about the table environment (i.e., about floating or positioning), use {floats} instead.

is about the tabular environment and related packages such as , , , , and . For questions about the table environment (i.e., about floating or positioning), use instead.

There are many packages that extend the basic functionality of the tabular environment. A good overview of packages (and package conflicts) can be found in Which tabular packages do which tasks and which packages conflict?. If your question involves one of these specific packages (or another tabular package not listed), you should add a tag for that package as well as the tag.

Specific to the positioning of as , consider reading any of the following posts:

17910 questions
231
votes
10 answers

Table with multiple lines in some cells

What is the easiest way to have 2 lines in some of the cells in a table? The only way I can think right now is to actually have 2 separate rows (without the line in the middle) and use \multirow on all other cells in this row. Any easier ideas?
Grzenio
  • 9,465
143
votes
2 answers

How to center the table in Latex

I have got a simple code to generate table in Latex. \begin{tabular}{ | c | c | c | } \hline symbol & value & unit \\ \hline $z Na$ & 11 & - \\ \hline $z F$ & 9 & - \\ \hline $Emax Na$ & 0.545 & $[MeV]$ \\…
user1519221
142
votes
3 answers

How to merge columns in a table?

I have this table, but wanted to format the first row. I like to match the two columns of first row, and last two columns of the same first row. Any suggestion on how to do that? \begin{table}[!h] \caption{Comparison of…
BrettHarry
  • 3,361
  • 6
  • 29
  • 23
88
votes
3 answers

How to merge cells vertically

Is it possible to create a table like this one? The usual structure of tables I use looks like this: \begin{table}[H] \begin{adjustbox}{width=\textwidth,center} % \begin{adjustbox}{center} \begin{tabular}{lll} \hline …
eualin
  • 1,335
79
votes
4 answers

How to specify the row height in LaTeX table?

I want to create a LaTeX table with three rows which have different row heights. How can I do this? The following code \renewcommand\arraystretch{2.4} \setlength\minrowclearance{2.4pt} seems make each row has the same height.
eva
  • 1,071
71
votes
4 answers

Evenly distributing column widths

Consider the following hunk of code: \begin{tabular}{| c | c | c | c | c | c | c | } \cline{2-7} \multicolumn{1}{c}{} & \multicolumn{3}{|c|}{Fantastical aardvarks} & \multicolumn{3}{c|}{Spelunking elephants}\\ \hline Foo bar & A & B & C & A & B &…
71
votes
2 answers

How to create a table with fixed column widths

I've put in the following code: \begin{tabular} {l{4cm} l{5cm}} hello & foo\\ hello & bar\\ \end{tabular} and it gives me an error: ! LaTeX Error: Illegal character in array arg. See the LaTeX manual or LaTeX Companion for explanation. Type H …
60
votes
3 answers

Tabular, make a column or a row emphasized

I want to create a table and to make all cells of a column emphasized. Is there a simple way to do it, or do I have to emphasize every single cell?
53
votes
3 answers

Center only heading text in a table

I need your help. I want to get a heading text center aligned, but the rest of the table, left aligned only. I tried with some advice in other post: \multicolumn {number of columns}{type of align}{heading} but I don't get it. I want the same result…
Isai
  • 4,153
53
votes
2 answers

Reduce cell margins in a table

I have a table as shown below. \documentclass{article} \usepackage{graphicx} \newcommand*\rot{\rotatebox{90}} \begin{document} \begin{table}[!ht] \centering \begin{tabular}{| c | c | c |} \hline 1 & 2 & 3\\ \hline …
Javad
  • 763
  • 2
  • 7
  • 8
51
votes
2 answers

Diagonally divided table cell

Possible Duplicate: Diagonal lines in table cell I'd like to include a table of numbers in my document. Those numbers are defined by two parameters n and k, and I'd like to achieve a presentation similar to what Comtet did in "Advanced…
51
votes
6 answers

Diagonal lines in table cell

I need this table: (each row and column should have the same height and length, last cell should be divided by diagonal line). I tried the following…
LiN
  • 1,361
50
votes
4 answers

How to left align text in a table with \makecell

This is my code.. I want to left align the statement "number when majority of the nodes.....". Please help \begin{table}[h!] \caption{Main Notations} \label{tab:table1} \resizebox{9cm}{!} { \begin{tabular}{|l|l|p{1cm|}} \hline \textbf{Notation} &…
roshni
  • 859
50
votes
1 answer

LaTeX table cell with a diagonal line and 2 sub cells

Possible Duplicate: Diagonally divided table cell Diagonal lines in table cell I'd like to have a LaTeX table, where the top left cell marks what the headers are to the right and also mark what the descriptors are downwards. For this I'd like to…
luh
50
votes
3 answers

Is there a tool to make a complicated Table like this one ("Auswahlliste" from "Pahl/Beitz Konstruktionsmethodik")?

I’m developing a product as a part of my thesis for my university in Germany. We are supposed to use standard methodology for decision making. One of the tools is called “Auswahlliste”. (I don’t even know how to translate it. Maybe “choice list”.)…
Smiling_Man
  • 607
  • 8
  • 13
1
2 3
99 100