46
votes
What is the difference between tabular, tabular* and tabularx environments?
Check out the following MWE:
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{tabular}{|l|c|r|}
\hline
foo & bar & fubar \\
fubar & toobar & foo \\
...
36
votes
Accepted
Vertical centering of all columns in \tabularx environment
It seems that addition of
\renewcommand\tabularxcolumn[1]{m{#1}}% for vertical centering text in X column
in your preamble is what you looking for:
\documentclass{article}
\usepackage{geometry}
\...
34
votes
What is the difference between tabular, tabular* and tabularx environments?
I will begin by showing a screenshot of tabular, tabular* and tabularx versions of one and the same, admittedly contrived, table. The material in the first column is left-aligned; the material in the ...
31
votes
Tabularx: Break long tables over several pages
You cannot use the longtable package if you want to preserve the X column. Therefore you could use ltablex.
\documentclass[12pt]{article}
\usepackage{mathptmx}%
\usepackage{tabularx}
\usepackage{...
19
votes
Accepted
When should the tabularx environment be used or not?
Is the tabularx environment useful?
Yes. But it's no environment intended to replace tabular with (i.e. it makes no sense to make every tabular a tabularx).
When should we use the tabularx ...
19
votes
Improve appearance of the table in Latex
I would rather have table with following design:
Edit:
In comparison with your table code I made the following changes:
With use of geometry package and its default settings for pages' borders the ...
17
votes
When should the tabularx environment be used or not?
TeXnician already said when it's useful, I would like to add when it is detrimental.
Never use tabularx without an X column!
Sometimes I saw questions with this wrong usage here, never do that!
\...
16
votes
Accepted
How to draw a half and half colored circle?
Something like this?
\documentclass[12pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{tikz,float}
\usepackage{tabularx}
\usepackage{xparse}
\NewDocumentCommand{\statcirc}{ O{#2} m }{%
...
15
votes
What is the difference between tabular, tabular* and tabularx environments?
Plain LaTeX tabular
Every column takes its space, the total width
of the table is the sum of the columns (plus inter-column space).
***%
\begin{tabular}{p{2cm}p{2cm}p{2cm}}
a a a a a a a a a a a a ...
14
votes
Accepted
how to make font size small in a tabular environment
Yes, it does. The difference between \small and \normalfont is just not very large, so you maybe just didn't notice it.
There are in general two ways to go (and your example contains both):
set a ...
14
votes
When should the tabularx environment be used or not?
The important thing to note about tabularx that it is all about automatically setting the target length for line breaking within a column. However the vast majority of data tables in scientific ...
14
votes
tabularx inside tcolorbox not centered properly
Since line breaking inside the cells is neither expected nor desirable, and since the natural widths of the four columns are quite different, using a tabularx environment seems wrong. I suggest you ...
13
votes
Accepted
Why does tabularx fail with siunitx?
This is due to a change in expl3 interacting with some low-level code in siunitx: the latter is there due to a slight 'gap' in the coverage of useful functions by expl3. For the present, adding
\...
13
votes
Accepted
Overfull in tabularx with siunitx
siunitx expects the last column to contain a number with two digits in front and two after the decimal sign. It cannot know about the % sign.
\documentclass[11pt,draft]{report}
\usepackage{tabularx}
\...
12
votes
Accepted
Why is the start row of \rowcolors ignored in tabularx?
Obviously tabularx doesn't have bugs, this is a documented feature.
TX sets the table several times, and restores latex counters but tex primitive counters can not be restored so easily. This defines ...
12
votes
How to draw a half and half colored circle?
One more (and simple) example with use of shapes.geometry packages :-)
\documentclass[12pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{...
12
votes
siunitx: How to remove the minus sign, if a number is rounded to zero?
Indeed siunitx keeps the sign of the original number. As an alternative you can round using pgfplots, which removes the sign for fixed output (it keeps the sign in scientific output).
This can be ...
12
votes
Accepted
Improve appearance of the table in Latex
I suggest you use a tabularx environment, with width set to \textwidth, ragged-right rather than full justification in all five columns, and a bespoke itemize-like environment (called mylist in the ...
11
votes
Table layout with tabularx (column widths: 50%|25%|25%)
My new LaTeX3 package tabularray is an alternative to the outdated tabu package:
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{table}[htbp]
\centering
\begin{tblr}{
...
11
votes
Accepted
tabularx with different column widths
I suppose you want the m column type width should be 40 % of the b type width, and the s type width half the m type width. The way you calculated the coefficients is not correct: the sum of the ...
11
votes
Horizontal icons between subfloats
It's not clear you need a table at all:
\documentclass{report}
\usepackage{pifont}
\usepackage[svgnames, x11names]{xcolor}
\usepackage{graphicx
}
\usepackage{caption}
\usepackage{subfig}
\usepackage[...
11
votes
Accepted
Aligning +- sign in table
For such tables I'd recommend siunitx:
\documentclass[12pt, twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,siunitx,amsmath,caption}
\sisetup{separate-uncertainty}
\begin{...
11
votes
Accepted
Different problems with tabularx
newer add \\ after \hline
in second row you not used \hline after \hline, consequently the content in the first cell in this row is correctly placed
before and after itemize are always added vertical ...
11
votes
Accepted
Apply a color gradient to lines of a tabularx
With {NiceTabular} of nicematrix. That package provides environment similar to the classical environments {tabular} and {tabularx} but which creates PGF/Tikz nodes under the cells, rows and columsn. ...
10
votes
Accepted
How to produce this table in latex with inconsistent lists/items?
The answer would be to put the list inside a minipage or parbox, but that is not really fun. Here is another solution with enumitem using the before and after keys and the command \tablistcommand: ...
10
votes
How to draw a half and half colored circle?
We, at work, also use the quarter semaphores.
It's easy to do with tkz-euclide package.
I have created a pic with three args: background color, grade (90/180/270) of the angle of the sector which has ...
10
votes
siunitx: How to remove the minus sign, if a number is rounded to zero?
You could use \fpeval to round the numbers and then siunitx to format them:
\documentclass{article}
\usepackage{siunitx,xfp}
\usepackage{booktabs, tabularx}
\begin{document}
\sisetup{round-mode=...
10
votes
How to draw a table 2*1+3*1 in `tabular`:
An alternative to tabular...stacked \frameboxes.
\documentclass{article}
\usepackage{stackengine}
\setstackgap{S}{\fboxrule}
\begin{document}
\Shortstack{%
\framebox(100,30){}
\framebox(100,30){}}%
\...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tabularx × 2227tables × 1320
longtable × 144
multicolumn × 139
vertical-alignment × 132
horizontal-alignment × 130
multirow × 122
spacing × 61
booktabs × 58
color × 55
tikz-pgf × 52
siunitx × 49
ltablex × 49
width × 45
line-breaking × 44
formatting × 43
environments × 43
captions × 41
columns × 41
tabulary × 36
threeparttable × 35
itemize × 34
floats × 33
alignment × 33
align × 32