New answers tagged tables
0
votes
How to "cut off" table diagonally from typesetting empty cells
With {NiceMatrix} of nicematrix.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[
\renewcommand{\arraystretch}{1.5}
\begin{NiceMatrix}[hvlines,corners=SE,columns-width=auto]
&...
1
vote
Accepted
Matrices inside a table
Your error is simply a missing \\ before \midrule, unrelated to the matrix.
1
vote
Automatically creating table with borders
If you actually want to draw all the rules of a tabular (maybe not a good idea...), you can use {NiceTabular} of nicematrix and its key hvlines.
\documentclass{article}
\usepackage{nicematrix}
\begin{...
1
vote
Round corner for each column
An example with {NiceTabular} of nicematrix.
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
\NiceMatrixOptions{cell-space-limits=4pt}
\newcommand{\FrameColumn}{\Block[tikz={...
3
votes
Accepted
Full page-width tabular overflows into margin when multicols is used
The total width of your tabular environment, when using 2 columns,
is 1\linewidth plus 4\tabcolsep, where \tabcolsep is the space which is inserted before and after a column (default value: 6pt), ...
3
votes
Accepted
How to change hline thickness in tabular?
You can define your \thickhline using TeX primitives:
\def\thickhline{\noalign{\hrule height.8pt}}
So, the example from this other answer looks like:
\documentclass{article}
\def\thickhline{\noalign{...
2
votes
Accepted
Create a well-formatted table in LaTeX
To have a table with three parts (caption, table, and notes), the better option is to use the package threeparttable.
The c columns center text in one line, so you have a very big table that does not ...
0
votes
Color fraction of table cell
The environment {NiceTabular} of nicematrix is similar to the classical environment {tabular} but creates PGF/TikZ nodes under the cells, rows and columns. Then, it's possible to use these nodes with ...
0
votes
Coloring in a multirow
Here is a way to construct that table with {NiceTabular} of nicematrix. You need several compilations.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{table}
\begin{...
0
votes
Double border line for table
Here is a solution with the latest version of nicematrix (v. 6.24 of 2023-09-28).
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
\noindent
\begin{NiceTabular}{XX}
\Block{1-2}...
0
votes
Highlighting table cells
Here is an easy solution with the latest version of nicematrix (v. 6.24 of 2023-09-28).
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
\begin{NiceTabular}{*6{c}}[cell-space-...
1
vote
xcolor `table' options clears part of the hhline command output
For information, here is a way to construct that table with nicematrix (≥ 6.24 of 2023-09-28).
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
\renewcommand{\arraystretch}{1.2}
...
1
vote
Dashed lines in a table using arydshln
It is not entirely clear, what is your problem? That dashed vertical lines are not present in the first table row and incomplete in the second row?
However, I wonder, why you use mix of booktabs ...
2
votes
Accepted
How to make `friends of 10' math tiles on overleaf
TikZ
Here's a quick solution via TikZ and a matrix node where you have to specify number of columns and rows yourself.
No, TikZ isn't really necessary and it can be improved …
Two global counters are ...
0
votes
How to bottom-align the contents of every cell in a column?
If you use b for the columns 2 and 3 you get
which is what I think you want, although if you want first aligned with the top and last aligned with the bottom, it's a bit harder ad the middle column ...
0
votes
Accepted
Add an additional line in a cell in a table
The package nicematrix provides environments similar to the classical environments ({tabular}, {pmatrix}, etc.) but with PGF/TikZ nodes under the cells, rows and columns. Then, it's possible to use ...
0
votes
Multirow text disappears behind cell
If you willing to use tabularray package instead of tabularx, than table code is more clean and shorter:
\documentclass{article}
\usepackage{lipsum} % for dummy text
\usepackage{...
0
votes
Multirow text disappears behind cell
Move \multirow from the top to the bottom of all merges cells. Then, use a negative argument as a number of merged cells. Using colours with multirow package is one of the commons issues and is ...
0
votes
My new page command doesn't work after table
You can use the H position specifier to force the table to be where it is located in the .tex file. This requires \usepackage{float}.
\usepackage{float}
\begin{table}[H]
...
2
votes
Accepted
Cannot centered of a row with tabularx and ding in Pifont package
Like this?
You should change definitions for \cmark and \xmark. Instead of use color{...} you should use \textcolor{<desired color}{<symvol>}. See MWE below:
\documentclass[a4paper,12pt]{...
1
vote
Table: Vertical spacing on a line with text wrapping. How to vertically center the content of a cell belonging to this row?
With {NiceTabular} of nicematrix.
\documentclass[12pt,a4paper]{memoir}
\usepackage{geometry}
\geometry{left=3cm,right=2cm,top=3cm,bottom=2cm}
\usepackage{nicematrix}
\usepackage{booktabs}
\begin{...
2
votes
Table: Vertical spacing on a line with text wrapping. How to vertically center the content of a cell belonging to this row?
I'd get rid of the first column (with the dashes) and apply the X column type exclusively to the text column; I'd use a simple c column type for the the ten data columns.
The instruction \renewcommand\...
0
votes
how to center the table on the page without following the margin
You may liked the following table design:
\documentclass{article}
\usepackage{booktabs, tabularx}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{table}[htb]
\small
\renewcommand\...
2
votes
How to change hline thickness in tabular?
With {NiceTabular} of nicematrix, you specify all the characteristic of a TikZ rule (eg thick) in optional argument of | and \Hline (the version of \hline in nicematrix).
\documentclass{article}
\...
0
votes
Reducing vertical margin, increasing the top margin in the cell and centring the elements in the cell
You can easily get a similar table using the tabularray package.
\documentclass{article}
\usepackage{graphicx} % for rotating the text
\usepackage{caption}
\usepackage{tabularray}
\begin{document}
...
3
votes
Accepted
`easytable` package seems to conflict with `l3doc` class
The issue is that | is used by l3doc as a shortcut for verbatim, and easytable doesn't like that. You'll have to disable the shortcut here:
\documentclass{l3doc}
\usepackage{xcolor}
\usepackage{...
0
votes
I don't get my table width fixed
You are allocating quite a lot more than 25 centimeters: no reasonable paper format allows it.
I'd avoid vertical rules and double rules: they add nothing and make for hard reading.
Using siunitx we ...
0
votes
How do I use multirow in LaTeX?
Just a quick comment that you should always provide the central brackets in multirow. ie, from the example above:
\multirow{3}*{Text N}
Should actually be:
\multirow{3}{*}{Text N}
This is because ...
1
vote
I don't get my table width fixed
With tblr table and tabularray libraries booktabs, siunitx (which load packages with the same name) and nccmath package (for medium size fractions: \mfrac):
Edit:
From your MWE can be concluded, that ...
2
votes
I don't get my table width fixed
Don't ignore LaTeX warning and error messages. For the table at hand, they arise because the c column type does not take an argument. I suppose one could superficially "fix" the syntax error ...
1
vote
How to max out a table within a cell of a bigger table
I can't figured out why you nested tables. The same result you can get with simple one table:
\documentclass{article}%
\begin{document}
%
\begin{tabular}{lll}
\hline
& & \\
rtyu &...
1
vote
How to max out a table within a cell of a bigger table
You need to change both instances of
\multicolumn{3}{l}{%
to
\multicolumn{3}{@{}l@{}}{%
in order to suppress the automatic application of whitespace padding on both sides of the single l column.
An ...
1
vote
Tables with multirows, coloured cells and horizontal dashed lines.
Here is a solution with {NiceTabular} of nicematrix.
\documentclass{article}
\usepackage{xcolor}
\usepackage{nicematrix,tikz}
\begin{document}
\begin{table}
\centering
\begin{NiceTabular}{...
1
vote
How to right justify a table cell using package tabular
The package nicematrix provides an environment {NiceTabular} similar to the classical environment {tabular} but with new functionalities.
In particular, the columns p, m, b and X have an optional ...
2
votes
How to right justify a table cell using package tabular
With table tblr of tabularray package your table code is short and simple:
\documentclass[11pt,a4paper]{article}
\usepackage{newtxtext,newtxmath}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\...
0
votes
How to color entire rows on a tab?
White space is caused by spaces between columns inserted by macro @{\extracolsep{\fill}} which insert additional space between columns.
You should be aware, that in landscape page orientation \...
0
votes
Accepted
How to color entire rows on a tab?
Have a try at tabularx package, where we can define a centered X column.
\documentclass[a4paper, 12pt, french]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\...
2
votes
How to right justify a table cell using package tabular
As you've discovered, the contents of a p-type column are left-aligned (as well as fully justified) by default. To change its behavior to right-alignment, it's necessary to (a) load the array package ...
3
votes
How to top-align the rotated cell contents of one row in a table?
With {NiceTabular} of nicematrix.
\documentclass{scrartcl}
\usepackage{nicematrix}
\begin{document}
\begin{table}
\centering
\renewcommand{\arraystretch}{2}
\begin{NiceTabular}
[
first-row , ...
2
votes
Accepted
How to top-align the rotated cell contents of one row in a table?
Something like this?
\documentclass{scrartcl}
\usepackage{mathtools,amsthm,amssymb,mathrsfs,mathalfa} % Math Packages
\usepackage{bm} % bold-italic math.
\usepackage{comment} % easily comment ...
2
votes
Accepted
Alignment problems with regression table and math in heading
My main recommendation would be that you employ the dcolumn package and its D column type instead of the c column type to align the numbers on their respective decimal markers (the commas, which no ...
2
votes
Alignment problems with regression table and math in heading
You can try to use \mathrlap.
\documentclass[12pt]{scrartcl}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{unicode-math}
\usepackage{booktabs}
\usepackage{array}
\usepackage{threeparttable}
\...
2
votes
Accepted
Changing cell height in tabularray
Something like this? I'd simply create extra rows to cover those 15 mins slots.
\documentclass[margin=5mm]{standalone}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{
hline{1}, hline{even},...
0
votes
Changing cell height in tabularray
I've figured it out, I was missing stretch=0.
\begin{tblr}{
hlines, vlines,
columns = {40mm, c},
column {1} = {25mm, l},
row {1} = {abovesep=2mm, belowsep=2mm},
rows = {6mm, c},
...
2
votes
Accepted
halign=c appears to be not respected in tabularray
The cmd option seems to be stronger than the halign option and thus overwrites it. If you want to use \RaggedRight, you should maybe rather try the solution proposed in the tabularray manual (section ...
0
votes
Put names on top of matrix
With {pNiceMatrix} of nicematrix.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{center}
\NiceMatrixOptions{first-row,first-col}
\setlength{\tabcolsep}{10pt}
\begin{tabular}{...
4
votes
Accepted
Deindent array, `\noindent` does not work
Please (a) get rid of all \text wrappers, (b) get rid of the \quad directives, (c) get rid of \ignorespacesafterend, (d) omit the equation* wrapper, (e) replace the array environment with a tabular ...
0
votes
\midrule, \bottomrule, etc do not extend until last columns of my table
Note that tabularx needs at least one X column, but there's no real use for it.
Repetitions should be avoided as much as possible in tables, here the (long) word “Experiment”: a further header makes ...
1
vote
\midrule, \bottomrule, etc do not extend until last columns of my table
Besides the good answers about the latex code, what about the content design?
As far as I can guess, "Group 1 column" could have more sense in the table caption, or as header of the "...
1
vote
Expl3 - sorting and displaying a seq in Tabularray
The following sorts your data into a named sequence, and then uses that named sequence in the tblr in an expandable way:
\documentclass{article}
\usepackage{tabularray}
\ExplSyntaxOn
\...
Top 50 recent answers are included
Related Tags
tables × 17506tabularx × 1310
horizontal-alignment × 1049
longtable × 1021
vertical-alignment × 919
multirow × 825
multicolumn × 793
spacing × 666
captions × 601
floats × 583
color × 536
formatting × 519
tikz-pgf × 481
siunitx × 443
columns × 361
booktabs × 355
graphics × 334
beamer × 328
macros × 285
rotating × 281
align × 255
width × 249
line-breaking × 221
math-mode × 218
positioning × 209