Questions tagged [tabularx]
{tabularx} is a package that defines an environment tabularx, an extension of tabular which has an additional column designator, X, which creates a paragraph-like column whose width automatically expands so that the declared width of the environment is filled.
339
questions
107
votes
4
answers
115k
views
Centering in tabularx and X columns
How can I center the column when using X in tabularx environment like in this example?
\begin{tabularx}{\textwidth}{@{}lXXXXX@{}}
1 & 2 & 3 & 4 & 5 \\
\end{tabularx}
17
votes
3
answers
3k
views
How do I use the ampersand (&) inside a foreach or conditional (or other group/environment) when building tables?
I am trying to build a table, and inside the tabularx environment I would like to have a loop, something like (here is a MWE):
\documentclass[10pt,a4paper]{article}
\usepackage{tabularx}
\usepackage{...
34
votes
2
answers
11k
views
tabularx inside a \newenvironment
There's something wrong with this code:
\newenvironment{Tbl}
{\begin{tabularx}{\textwidth}{|l|X|} \hline}
{\end{tabularx}}
but this is fine:
\newenvironment{Tbl}
{\begin{tabular}{|l|l|} \hline}
{\...
24
votes
2
answers
7k
views
Preventing itemize environment to insert initial vertical space
I'm using itemize and tables like the following
\begin{tabularx}{\textwidth}{>{\ttfamily}llX}
\toprule
\textbf{\rmfamily Operator} & \textbf{Typen} & \textbf{Regel} \\
\midrule
= & ...
15
votes
1
answer
9k
views
Vertical alignment in tabularx X column type
I'd like to create a new column type which works exactly like a X column from tabularx but that also has the text vertically centered. I tried with the newcolumntype command but I can't figure out ...
90
votes
2
answers
208k
views
Automatic line-break in tabular
I'm making a tabular and I'd like to automatically do a like break rather than going beyond the page.
This is my tabular code:
\begin{table}[h]
\begin{tabular}{|l|l|l|}
Use Case Navn: &...
16
votes
4
answers
16k
views
How to create vertical and horizontal dotted lines in a matrix?
Similar to this question, 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}...
26
votes
3
answers
60k
views
How to make a table on more than one page by using the table environment
EDIT Like some comments below are remarking the table environment doesn't allow tables over more than one page. However the solution works fine
I need to make a table over more than one page. The ...
14
votes
2
answers
3k
views
Why is the start row of \rowcolors ignored in tabularx?
Seems like \rowcolors when used for a {tabularx} doesn’t work properly: The specific number of the first row to be colored is ignored. This is not the case for a normal {tabular}.
In both tables the ...
82
votes
6
answers
330k
views
Table layout with tabularx (column widths: 50%|25%|25%)
This code produces a table with three centered column:
\begin{table}[htbp]
\centering
\begin{tabularx}{\textwidth}{| c | c | c |}
\hline
Alpha & Beta & Gamma ...
27
votes
4
answers
27k
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 ...
17
votes
5
answers
6k
views
How to use siunitx and tabularx together?
I'm using the tabular features of siunitx (for what it is worth: v1.3 since I'm on TexLive 2009) to align numbers in tables, eg.
\begin{tabular}{ p{1.5cm} S S S }
bla & 1.23 & 4.5 & 67.89 ...
4
votes
1
answer
2k
views
Table column text exceeds column width
I have a table table and the first column is a multirow. The multirow column text exceeds the column with.
\documentclass{article}
\usepackage[dutch]{babel}
\usepackage{ragged2e}
\usepackage{...
3
votes
1
answer
433
views
Bibliography with citations in tabularx and defernumbers=true only prints [0]
In my document, I need a lot of citations. However, my bibliography stopped working all of a sudden. All the citations in the document and the bibliography are [0] (instead of the excpected [1], [2], ...
70
votes
3
answers
111k
views
What is the difference between tabular, tabular* and tabularx environments?
There have been quite a few hit on Google, including one in Tex SE, but none of those made a complete sense to me. Please don't write something like:
tabular* adjusts the space between text of ...
12
votes
3
answers
736
views
Is it possible to make an underfull tabulary spread out?
With this MWE
\documentclass{article}
\usepackage{tabulary}
\begin{document}
\hrule
\begin{center}
\begin{tabulary}{\textwidth}{|L|L|L|}
foo&bar&baz
\end{tabulary}
\end{center}
\...
24
votes
2
answers
11k
views
Is it possible to use tabularx inside a longtable environment?
Is it possible to use tabularx inside a longtable environment?
If not, is there any way I can get the "X" funcionality of tabularx with the option of long tables ---In order for me to be able to ...
21
votes
3
answers
33k
views
Vertical centering of all columns in \tabularx environment
I want to make a table with vertically centered columns in a \tabularx environment. How can I code the table to have all the column types (l, c, X) vertically centered?
Here is my code:
\begin{table}...
21
votes
2
answers
38k
views
Automatically stretch table to evenly fill horizontal space?
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 ...
12
votes
3
answers
5k
views
Framing cells vertically in a table
I want to add a box in a tabularx table that would frame several cells vertically. There is this post that shows how to frame cells horizontally (Framing cells in a table), but I cannot figure out how ...
6
votes
3
answers
3k
views
Row colour gaps in tabularx with \aboverulesep and \{}
\documentclass[]{article}
\usepackage[table,dvipsnames]{xcolor}
\usepackage{multicol,booktabs,tabularx}
% Table settings
\renewcommand{\aboverulesep}{1pt}
\renewcommand{\belowrulesep}{1pt}
\begin{...
14
votes
3
answers
2k
views
How to produce this table in latex with inconsistent lists/items?
I want to produce the first two rows of this 5-column table in LaTeX:
As you can see it is a special type of tables where we see:
itemized lists inside but inconsistently, ie. column 4 all rows ...
13
votes
1
answer
18k
views
Vertically center text in tabularx table [duplicate]
How to center text vertically in this table?
\begin{center}
\begin{tabularx}{\linewidth}{ | c | X | X | }
\hline
\textbf{Date} & \textbf{Name} & \textbf{Sign} \\
\hline
...
10
votes
2
answers
2k
views
Baselineskip not interpreted in a tabularx keyvalue environment
I'm trying to write a key:value environment which would allow me to create a dual columns tables where the columns are separated by colons.
Typically, I've implemented this using parbox in my own ...
10
votes
4
answers
3k
views
Move tabular entry to bottom of row
How do I get the last column text to be at the bottom of the row?
That is I want the XXX to be aligned with the line containing the arrow.
I tried playing around with \multirow{3}{-3ex}{XXX}, but ...
6
votes
1
answer
169
views
tabularx processes its body multiple times; how do I know which cycle I am in?
Assume that I enjoy setting my tables using an \itemized or list-like coding structure:
\begin{mytabular}[.5\textwidth]
\item head1 & head2% <-- header row
\item abc & def
\item ghi &...
37
votes
1
answer
13k
views
General differences between array, table, tabular, tabularx, longtable, supertabular, longtabu, etc [closed]
What are the general differences between the various table environments that exist for LaTeX? By this I mean: What are their basic purposes? Which ones are the most important ones for new users? Which ...
29
votes
3
answers
38k
views
Tabularx: Break long tables over several pages
I am making a long table for my thesis correction. It will be a really long table and here is what I have till now:
\documentclass[12pt]{article}
\usepackage{mathptmx}%
\usepackage{tabularx}
\...
29
votes
2
answers
79k
views
Vertical line only in one part of a table
I need some help on putting a vertical line in the second part of the table, I don't know how to do it since the tabularx I declared does need to have that only in the second part. The code I used is:...
14
votes
4
answers
35k
views
Table with footnote
I have a table and some of the number inside has some symbol like * and **
which should be explianed as footer ( at the end of the table not the page) I dont know how to do that and I dont want to ...
14
votes
2
answers
5k
views
How to include tabularx/y in a new environment?
I am looking for a way to define a customizable environment for tables in my latex documents. This means:
caption and label
width of table
customized column format (tabular preamble)
While this ...
10
votes
3
answers
33k
views
Wrapping text in \multicolumn
I would like to wrap (and center) text within \multicolumn. Tabularx and tabilary only wrap the text outside of the \multicolumn{} columns. I would also like to define the column width as defined by ...
4
votes
1
answer
2k
views
Why does ltablex skip a number in captions?
The below example presents two tables with an tabularx environment (taken from package ltablex) and a caption. After each tabularx-table, the table counter skips one, as if both the caption and the ...
2
votes
1
answer
3k
views
bottomrule not working in a self-made environment
I have this environment for consistent tables in my LaTeX documents:
\newenvironment{defaultTable}[2] {
\@float{table}[h]
\noindent
\tabularx{\textwidth}{#1}
\specialrule{0.5pt}{10pt}{0pt}
\...
1
vote
1
answer
2k
views
Table number not right after using tabularx
I just found that after I used tabularx, the table number in my document is not right, shown as follows
where the first four tables were done using tabularx and they are all even numbered, despite ...
30
votes
3
answers
97k
views
Top alignment of cell content in tabularx
I would like to align the content of each cell (of the first column) to the top. The approaches presented here did not apply. Maybe it has something to do with die tabular-environment inside the ...
16
votes
1
answer
6k
views
Table looking like a block
The goal is to create a table that has the same style than a block of the used theme in order to have a consequent style trough the document. this can be done by the following two methodes shown in ...
10
votes
2
answers
18k
views
Combine column types defined in dcolumn with tabularx
I'm looking for a way to define a column type which "mixes" the 'D' column defined in the dcolumn package and the 'X' column defined by the tabularx package. In other words, I want a column type that ...
9
votes
2
answers
2k
views
Hebrew vs. German/English translation side-by-side
I am having the following problem: I have Hebrew texts and want to put translations (and other information) right next to it in a nice way. (Previously I used the old Nisus Writer for Mac which for ...
6
votes
3
answers
841
views
How to get the row height and column width within a tabular?
Do you know how I can specify the size of a cell in points (pt) within a tabular, that is the row height and the column witdh? In text mode there are commands like \textwidth or \baselineskip but this ...
5
votes
1
answer
747
views
Unwanted padding in tabular columns when cells contain multiple rows
Whenever I need to create a cell with multiple rows in a tabular environment, I usually create enclose the contents of the cell within a tabular environment within the cell. This has been a great fix ...
5
votes
2
answers
172
views
calc package and global lengths problem in tabularx
The output of the following code is affected whether calc package is included or not:
\documentclass{article}
\usepackage{tabularx}
% \usepackage{calc}
\newsavebox{\testbox}
\newlength{\testlen}
\...
4
votes
2
answers
3k
views
Problems with \rowcolors and booktabs
I've got few tables created with few packages included booktabs where I use the command \rowcolors from the xcolor package. But in the last I notice that the colour is wider that the lines of the same ...
4
votes
1
answer
3k
views
Annotating Tables With Tikz; Adding Arrows
I'd like to be able to draw an arrow with some text on top connecting two arbitrary (i.e. possibly non-right-/left-most, possibly nonadjacent) cells of a table with a left-looking arrow. In particular,...
4
votes
3
answers
2k
views
Extra line of vertical separator using itemize in tabular
I'm creating a resume based off of the example tutorial HERE. It's fairly simple, actually -- just a two columned table with dates on the left and job on the right. I prefer bullets vs. a paragraph ...
4
votes
1
answer
108
views
Odd interaction between tabularx and some list-like environments
After posting this answer to the query How to increase the width of one column and decrease the width of the other one by the same length?, I thought about how to generalize (and simplify) the OP's ...
4
votes
3
answers
2k
views
Creating a special table with different row lengths in latex
How can I have a table like the following picture in latex?
3
votes
1
answer
850
views
table badly too wide
I got a bad problem with the width of my table. I can't get the point why its so wide.
I'm using latexmk.
Here's my code:
\documentclass[final,12pt,abstracton,oneside,a4paper,
bibliography=...
2
votes
1
answer
625
views
Last column vertical rule missing
I'm dealing with the powerful tabularx environment. I was able to obtain a nice table, except for the last column. I need seven columns in total, but at the end I got another half column. I can't ...
24
votes
2
answers
110k
views
Divide the page into 2 parts
I have text, formulas and an enumeration. I tried to use multicols, but it divides the text where it wants. I used tabular, but it don't allow to have an enumeration or I don't know how to do it.
In ...