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

learn more… | top users | synonyms (2)

3
votes
1answer
1k views

space between columns titles in tabular

I am having trouble doing the following in the tabular environment: title1 title2 ------ ------ a 1 b 2 . . . . . . z 26 That, having only the column ...
3
votes
2answers
1k views

Drawing Arrows in Tables

What is the best way to draw a diagonal line through the following table? \begin{center} \begin{tabular}{*{9}{c}} $e_{1}$ & = & $0$ & $.$ & $d_{1}^{1}$ & $d_{1}^{2}$ & ...
2
votes
0answers
195 views

Want to add more column on the left side?

Want to add more column on the left side? \documentclass{article} \usepackage{pgfgantt} \usepackage{rotating} \usepackage[graphicx]{realboxes} \newganttchartelement*{mymilestone}{ ...
2
votes
1answer
748 views

Clash among packages?

I am working on a colored table and found clashes in various color packages and finally no color in alternate rows. I have followed suggestions, but nothing seems to be working fine. Below is my ...
2
votes
2answers
1k views

booktabs and tiny horizontal space

In a regular table, I'm trying to remove the small horizontal space before the first column and after the last one as achieved with package booktabs with the option @{}. How can I do that? Please ...
1
vote
1answer
61 views

Multicols and multirows table

i want to create this table structure: +---+-------+ | | b | | a +---+---+ | | c | d | +---+---+---+ | e | f | g | +---+---+---+ This is, what i have so far: \begin{tabular}{ | c | c | c ...
1
vote
1answer
608 views

Automatic adjustment of cell width

My problem is similar to tabular tabularx automatic linebreak (p/m/b doesn't work as expected). However he had some other issues that I don't have. I have a two-column article. In this article I ...
46
votes
3answers
2k views

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 ...
28
votes
5answers
2k views

How to produce a list of prime numbers in LaTeX

I would like to write a LaTeX script that produces all the prime numbers between the numbers n and m, where n < m. How can I do this? I feel it shoud not be that hard, but I cannot seem to program ...
22
votes
1answer
18k views

Can a table include a horizontal dashed line?

In a normal table, you can use the \hline command to draw a horizontal line. I am trying to make this line a dashed horizontal line. I have found the package dashrule via this answer, but this only ...
29
votes
10answers
2k views

Methods to edit column order in an existing LaTeX table?

What is the best way of editing an existing LaTeX table? I need to swap the order of two columns and can't think of an efficient way of doing this. My table is a long creature of the following ...
18
votes
3answers
5k views

How to make table with rotated table headers in LaTeX

I saw a table created in PowerPoint and wanted to know how to do it in LaTeX. The table is shown below. The aspects of the table that I'm most interested in are the rotated table headers as well as ...
15
votes
4answers
14k views

Fancy tables in LaTeX

I am terrible at LaTeX tables. I managed to produce a table, but it looks so basic. How do I make it fancier? Here is the table's code: \begin{table} \begin{tabular}{|l|l|l|l|l|} \hline ...
8
votes
2answers
6k views

How to Rotate Text in Table across column spanning many rows

\documentclass[fleqn,12pt,a4paper]{article} \usepackage{tabularx} \begin{document} \begin{table}[ht] \begin{minipage}[b]{1 \linewidth}\centering \begin{tabular}{|c|c|c|c|c|} \hline ...
7
votes
4answers
2k views

Using external tables in TikZ

How do I use tabela.xls as a data source to a LaTeX table or even a table made with TikZ with the following command? Note: I wanted to use tabela.xls as a data source for multiple files. Tex and that ...
20
votes
2answers
3k views

Highlight a table row with a rectangular overlay

I am trying to highlight the row of a table by drawing a rectangle over that row. A wrinkle is that the code for the table is pre-written from external statistical software and then included in the ...
16
votes
2answers
12k views

shrinking tables for presentations

What is the most convenient way to shrink a table to fit in a beamer slide?
16
votes
2answers
2k views

Generate random numbers with a specific font

My objective is to create a table or some form of environment as shown in the figure below. The numbers should be randomly generated every time you compile and have the font shown below. Is ...
14
votes
1answer
10k views

Change caption font size

I want to change the font size of a single rotated table caption (definitely not all the captions in all my tables/figures) Right now I can wrap the text inside the \caption around a \scriptsize{} ...
16
votes
1answer
556 views

automatically insert data in a complex table

I have a relatively complex table that looks like this: The same table structure is going to be repeated so many times. I already have the tables in MS Word. My question is if there is an easy ...
9
votes
3answers
10k views

Newline in a table cell which is centered

This question may look like a duplicate but, none of the answers given to the possible duplicates contain the answer to this specific case. I have a tabular, say \begin{tabular}{ccc}. While adding a ...
8
votes
1answer
239 views

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 ...
7
votes
1answer
309 views

How can I create a table that spans across the width of two vertical (and opposite) A4 pages?

I have a large (wide) table to typeset. I usually use the code below for my tables which enables me to specify the width of each column in the table. However, it is up to me to make sure that the sum ...
6
votes
1answer
7k views

Fitting tables into beamer

I have some tables in my presentations that are rather big. I found out how to use \resizebox to fit them into my page. Unfortunately this only works for tables that are wide. For long tables, my ...
18
votes
4answers
434 views

Avoid repeating [hbt] and \centering for every table

In a document I'm writing, I'm using the familiar [hbt] option for my floating tables, and I center them. I'd like to avoid repeating that every time I'm creating a table. I assume it's easy to add ...
17
votes
2answers
2k views

Aligning inside tabular environment, specific cell

I'm trying to align specific content of the single cell. For example, \begin{tabular}{|r|r|} \hline 1 & 2 \hline right & to_the_left \hline 1 & 2 \hline ...
16
votes
3answers
4k views

Rounding numbers in a table / Truncating text in table

Is it possible to have automatic rounding of numbers in a table? Say that I have this, made in the usual way with a tabular environment: pi | 3.14592654 e | 2.7182818284 phi | 1.6180339887 Can ...
14
votes
2answers
21k views

Insert image and list inside a table

I am trying to add both an image and list inside a table but I face various problems. As shown in the picture, the image is above the first horizontal line and also the lists are not properly ...
12
votes
2answers
8k views

Math mode in tabular without having to use $…$ everywhere

\begin{tabular}{|l|l|l|} \hline Column A & Column B \\ \begin{math} x & 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 ...
12
votes
1answer
1k views

Curly brackets around a table

I would like to have braces on the left side of a table (either that or on the right side) and bellow the same table. What I have got is $ m-Mal \underbrace{ ...
8
votes
1answer
707 views

Change text color in table, preserve ability

I'm having difficulty creating a new command for \rowstyle that allows me to color the text of different rows in a table and preserve my ability to space out the columns and not induce space between ...
8
votes
4answers
643 views

How to make 4 equal paddings (left, right, top, bottom) in a table cell?

I want each cell in a tabular to have 4 equal paddings of exactly 15pt each. How to make 4 equal paddings (left, right, top, bottom) in a table cell? \documentclass{article} ...
7
votes
2answers
9k views

Create a table with LaTeX

I need to copy a table from a pdf file to my LaTeX document. I know I have to do it by hand but still don't understand how to create a table with LaTeX.
7
votes
3answers
347 views

How to execute command on every table column

I have a table where I have to execute the same command for every entry in the table. For example: \ibibleverse{Matthew}(1:1) & \ibibleverse{Mark}(1:1) & \ibibleverse{Luke}(1:1) \\ ...
6
votes
1answer
966 views

Wrapping text in enumeration environment around a table

I would like to wrap the text in an enumerate environment around a table, this is my actual situation (sorry for including so much code, but I wanted to give a precise idea of the number of lines in ...
6
votes
2answers
2k views

Indent all but first lines of paragraph.

Inside of a table column with a width determined by a p{5in} tag, I want all but the first line of text to be indented. Is there any way to achieve this? Doing it by hand would make later edits ...
4
votes
1answer
178 views

Making a class to generate colored tables with a predefined layout

This is a follow-up question in which I asked how to define classes with \newcommands into \newenvironments, and I had some good answers to this particular issue. However, the problem that I have ...
3
votes
3answers
704 views

How to create columns within an itemize environment?

I want to generate a list of the following syntax for a resume. * <Description of Activity> <empty space> <right aligned date> Currently I have been using a form such as ...
17
votes
3answers
7k views

Aligning Decimal Points in Table

I want to align two numbers in two different rows the decimal point. I do see a link for that here: Aligning numbers by decimal points in table columns However, I don't understand how to ...
15
votes
3answers
2k views

Problem with redefining Tabular environment with the \renewenvironment ‎command‎

In a book I'm typesetting, I want the tabular environment to be in footnote size and the other body of the book to be in normalsize font. To do this, I've tried something like the following: ...
12
votes
5answers
295 views

LaTeX Tables: Cell value color based on its sign / conditional cell color

I've a long LaTeX document with many tables. Now I want to show negative values in cell in red color. I wonder how to do globally. My MWE is below: \documentclass{article} \begin{document} ...
10
votes
3answers
236 views

Special Table with Diagonal lines [duplicate]

Recently, I have to work with some problems that require to draw table like below in LaTeX. I used to think about diagonal line inside a cell, but it's not a good choice for this problem since the ...
10
votes
2answers
724 views

How to align integers on the right, but still center them

Suppose we have a table like this: \begin{tabular}{c} Heading \\ 1 \\ 10 \\ 100 \\ \end{tabular} This will center all the numbers. If I want to align them to the right, I could change the column ...
9
votes
1answer
83 views

How do I make an exact copy of a table, but keep its number for referencing?

I have a table, and I want to print it twice in my document. I want them to have the same label, caption and number, so that in the caption when it says "Table 1: foo" the same number shows up, and so ...
9
votes
3answers
302 views

Inserting an image properly in a table

I'd like to insert those lines that from "Foo" point to the four different rows in the table. I've tries inserting an image but it doesn't come out right (please ignore the bad quality of the ...
9
votes
2answers
1k views

Automatic way to break narrow tables into two columns?

Is there an easy way to break long narrow tables into two (or possibly more) columns (i.e. without manually rearranging the columns)? In the following example you can see that there is a lot of ...
8
votes
2answers
267 views

Accessing values from tables via “grid search”

I am trying to achieve the following: I want to access a number from a table in the main text and make some calculations with it. For example, if there is a value 1.85 in the table I want to store it ...
8
votes
2answers
565 views

Table: Can I shift a column by half the height of a row?

This question is best explained by giving the usecase: I have a table where I list some data and I would like to add a column to the right which gives the ratio of two adjacent rows. Now to make it ...
8
votes
1answer
1k views

Resizing a table by textheight

Say, I have a table which doesn't fit on one page. Say, I don't want to use any special table types or so but want to solve the problem by using the \resizebox-command and keep my ratio. If by using ...
7
votes
1answer
3k views

Putting LaTeX table legend in a “x\y” style [duplicate]

Possible Duplicate: Tables of numbers Is it possible to put a "x\y" style legend in one cell (maybe be made up of several cells) of a table? It would be great to make the 'x' slightly lower ...