New answers tagged tables
2
votes
Accepted
Tabular alignment with cline
Set the left-hand side outside the tabular construction knowing that (by default) tabulars will have a vertically-centred alignment/anchor point; then, some minor adjustment for any alignment can be ...
2
votes
Accepted
How to prevent lost float error in table, in poster environment?
To answer the original question: in a poster usually you don't want tables and figures to float, because then you don't have fine-grained control of where the figure appears - or it may even be lost ...
1
vote
Resizebox and table in springer class
The sn-jnl class automatically uses threeparttable in order to make the caption to use the same line width as the tabular it refers to.
This means that the people in charge of the class don't want ...
2
votes
siunitx column entry causing overfull hbox
The last entry is special with respect to the others, so you can treat it as such. I give two suggestions, I'd prefer the first one.
\documentclass{article}
\usepackage{siunitx}
\usepackage{booktabs}
...
2
votes
Splitting table header labels
Rather than implement your stated formatting objective -- and clutter up the table's "look" even more -- I'd simplify and declutter the table's appearance by getting rid of all vertical ...
1
vote
siunitx column entry causing overfull hbox
Like this:
With use of the tabularray package you can obtain this with the following MWE:
\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{siunitx}
\begin{document}
\begin{table}\...
5
votes
Accepted
Include clickable 'Fig.'/'Table' in \ref without duplication in captions
I want [cross-]references to include 'Fig.'/'Table' before the number so they are clickable and in link color.
In addition to employing the hyperref package (which you do already), you only need to (...
3
votes
Include clickable 'Fig.'/'Table' in \ref without duplication in captions
Maybe you can use the cleveref package.
\documentclass[12pt]{article}
\usepackage[colorlinks,citecolor=blue, linkcolor=blue, urlcolor=blue]{hyperref}
\usepackage{cleveref}
\crefformat{figure}{#2Fig.~#...
4
votes
Resizebox and table in springer class
How can I ... have a table (single column) inside a resizebox with caption at the top in a springer document ?
Whatever else you do, never ever use \resizebox on tabular-like material.
If your ...
4
votes
Accepted
Aligning Footnotes in a LaTeX Table
The immediate cause of the formatting issues you're experiencing is a combination of (a) the \centering directive and (b) the improper \item-related syntax in the tablenotes environment.
Since you ...
0
votes
Accepted
Column spacing when using multicolumn
Like this:
With use of the tblr od tabularray Package and X columns type the MWE is:
\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage[export]{adjustbox}
\...
3
votes
Enlarging the length of a table cell
For information, here is a way to create that table with {NiceTabular} of nicematrix.
\documentclass{article}
\usepackage{xcolor}
\usepackage{nicematrix}
\begin{document}
\begin{table}
\centering
\...
3
votes
Accepted
Enlarging the length of a table cell
The easiest would probably be to replace p{3cm} by c, which will centre your content at a rubber width.
\documentclass{article}
\usepackage[table]{xcolor}
\setlength{\arrayrulewidth}{1mm}
\setlength{\...
1
vote
Enlarging the length of a table cell
The width of the cell for p-type cells is the argument: p{3cm} means that cell will be 3cm wide. You can center it (instead of justified) either by changing p{3cm} to c or by using >{centering}p{...
5
votes
Accepted
Fixed column width and left alignment works partially
Use >{\raggedright\arraybackslash}:
\documentclass [chapterprefix=true,pagesize=false,listof=totoc,bibliography=totoc,fontsize=10pt,twoside,open=right,cleardoublepage=empty,headsepline=off]{scrbook}...
2
votes
Accepted
Place two sideway Tables next to each other on one side
Let me spell out my comment.
If I correctly understand you, you like to have both tables in the same page, something like this:
For this you need to insert both tables in one sideways environment and ...
2
votes
Place two sideway Tables next to each other on one side
Instead of starting a new sidewaystable environment, just use the same one and add some space between your tables:
\documentclass{article}
\usepackage{float} %H-Figure Typ
\usepackage[...
4
votes
How to color a cell in easytable
For information, here is a way to create that table with {NiceTabular} of nicematrix.
All the style of rules provided by TikZ are available.
\documentclass[border=20pt]{standalone}
\usepackage{xcolor}
...
1
vote
cellcolor not working with multicolumn
As possible alternative with use of the tblr of tabularray package:
\documentclass[11pt]{article}
\usepackage{xcolor}
\usepackage{tabularray}
\NewTableCommand\SCC[2]{\SetCell[c=#1]{bg=#2}}
\begin{...
4
votes
How to color a cell in easytable
I suggest the newer tabularray package:
\documentclass[border=10pt]{standalone}
\usepackage{xcolor,tabularray}
\begin{document}
\begin{tblr}{
colspec ={|[gray] Q|[dashed] Q|[dashed] Q|[dashed] Q|[...
5
votes
Accepted
cellcolor not working with multicolumn
The environment {NiceTabular} of nicematrix tries to be compatible with the standard technics provided by LaTeX and the standard packages array, tabularx, multirow, booktabs. However, there are some ...
-1
votes
How to split columns into 2
I recommend this website. It's really easy and fast to use.
The table in my answer is generated by the website.
https://www.tablesgenerator.com/
% Please add the following required packages to your ...
1
vote
Accepted
Column too wide in table in a beamer: 'p' option and footnotesize don't help
To summarise the various comments in a community-wiki answer:
you shouldn't typeset anything in beamer without a frame environment (notice the incorrect vertical alignment and broken numbering). Use ...
Community wiki
1
vote
Table overflow with tabular
As supplement to nice @Mico answer, below is solution where is use tabularray package which also define X columns type which can employ several option for aligning text in them, define columns mode, ...
5
votes
Accepted
Table overflow with tabular
I suggest you employ a tabularx environment (provided by the tabularx package), set its target width to \textwidth, and employ the X column type for the second column, in order to allow for automatic ...
0
votes
Tabular: title above and caption below?
There are already great solutions on this page, though they are a bit too complex for my taste. Here is a very simple solution that delivers most of what you asked for but not all:
\usepackage{caption}...
1
vote
Looking for two tables to start at the same height
You don't need minipages, just the [t] option to tabular.
\documentclass{article}
\begin{document}
\begin{center}
\sffamily
\begin{tabular}[t]{|l|l|}
\hline
Monthly Income & \$5500 \\
\...
2
votes
Looking for two tables to start at the same height
Your main problem is already solved by comments, so by following MWE is shown how you can write your tables with use of the tabularray and siunitx packages:
\documentclass{article}
\usepackage{...
3
votes
Looking for two tables to start at the same height
As @DavidCarlisle has already pointed out in a comment, there's no need to encase the tabular environments in minipage environments. Instead, as @samcarter_is_at_topanswers.xyz has already suggested, ...
5
votes
Accepted
What should I do so that the length of the brackets remains constant when I color the table?
As documented in the colortbl documentation you need to balance the fill glue or use a higher order fill.
\documentclass[a4paper,10pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\...
1
vote
Accepted
Table cell/row color overflows line
With {NiceTabular} of nicematrix.
\documentclass{article}
\usepackage{geometry}
\usepackage{nicematrix}
\begin{document}
\begin{table}[ht]
\centering
\renewcommand{\arraystretch}{1.5}
\begin{...
0
votes
Accepted
LaTex: Small table, that should be flush left, is indenting to the right
As was already mentioned in comments, instead of two block of code, you should provide an MWE (Minimal working Example), a small but complete document, which reproduce your problem. IN its preamble ...
0
votes
LaTex: Small table, that should be flush left, is indenting to the right
I found a solution. There is a parameter to the colspec for the table. The following table definition, does the trick:
\subsection{Software blows up after starting} % \label{JIRA-3079}
\begin{tblr}{...
1
vote
Accepted
beamer titlepage how to organize authors in a table which spans slide-width
I wouldn't mess with the content of macros like \author etc.
Instead you could either redefine the author template (and add your table there) and/or redefine the whole title page template if you need ...
3
votes
Adjusting the indentation and the horizontal spacing in tables in latex
Assuming that the descriptions don't need to be broken across lines, you can use a tabular when the list fits a single page or longtable otherwise.
Instead of @{\quad} you can use @{\hspace{<length&...
4
votes
Accepted
Adjusting the indentation and the horizontal spacing in tables in latex
Try something like this:
\documentclass[12pt,a4paper,openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[left=1in, right=1in, top=1in, bottom=0.85in,headsep=22pt]{geometry}
\usepackage{amsmath,...
0
votes
Accepted
How can I create a left-aligned table of a fixed width containing equations?
Like this:
(red lines indicate page layout).
It is not clear, if left align of equations should be in the whole document or just in table. In MWE below I consider the last case. By help of nccmath ...
0
votes
Converting Word or Excel tables to Latex
I was looking for the most easiest solution, I like this better, check it out. Link below.
https://tableconvert.com/excel-to-latex
1
vote
Warning "No positions in optional float specifier"
You have provided no example, but some code you have not shown is presumably incorrectly redefining table so that the optional argument is no longer optional.
For example this document
\documentclass{...
1
vote
One column is wider than the rest using multicolumn
With {NiceTabular} of nicematrix.
\documentclass{article}
\usepackage{fontspec} % compile with XeLaTeX or LuaLaTeX
\setmainfont{Calibri}
\usepackage{booktabs,nicematrix}
\begin{document}
\begin{...
2
votes
Siunitx: spread table content accross page
Just for the sake of comparison, here are (a) a solution that uses tabularx (properly), with five equally wide columns, and (b) a solution that uses a basic tabular environment. Speaking for myself, ...
4
votes
Accepted
Siunitx: spread table content accross page
Use tabular* instead.
I made other changes, as you don't need threeparttable for this application. Also \textsuperscript{***} is not only a mouthful, but the output is really awful.
Note also the ...
0
votes
Multicolumn wider than subcolumn
Here is a solution with {NiceTabular} of nicematrix.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}{c}[&-in-blocks]
\Block[draw,transparent]{5-1}{}
\...
0
votes
Align 3 tables neatly
Some observations, in no particular order:
No need for "outer" tabular or minipage environments.
A single \centering instruction suffices.
I would top-align the first two tables.
I would ...
3
votes
Reduce the column padding in tabular environment
I endorse combination of the Werner's and egreg's ideas, but with use of ˙tabularray` package:
\documentclass[12pt,a4paper]{article}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, % ...
0
votes
Increase the size of column name cells in a table
You can use an invisible rule to stretch only the heads, but it seems, the other rows should also be stretched a bit, so I'll combine both. And it seems the head should use a sans-serif font and maybe ...
3
votes
Align 3 tables neatly
I'd typeset the two short and narrow tables one on top of the other and the longer table side-by-side.
\documentclass{article}
\usepackage{graphicx}
\usepackage{array}
\begin{document}
\begin{table}...
3
votes
Accepted
Increase the size of column name cells in a table
You could switch to the tabularray package and use row{1}={rowsep+=5pt} to add additional space above and below the first row:
\documentclass[a4paper, 12pt]{article}
\usepackage{tabularray}
\begin{...
3
votes
Accepted
Align 3 tables neatly
The outer tabular seems unnecessarily complicate, you could directly place the two inner tables besides each other:
\documentclass{article}
\usepackage{graphicx}
\usepackage{array}
\begin{document}
...
2
votes
Automatically integreate min/max/mean values from a table into the text
LaTeX can do anything, but if you want statistics in real-time, from data from your document, it is much simpler to make literate programming with a statistic language such as R. For this you need to ...
Top 50 recent answers are included
Related Tags
tables × 18109tabularx × 1362
horizontal-alignment × 1068
longtable × 1051
vertical-alignment × 931
multirow × 855
multicolumn × 819
spacing × 681
captions × 614
floats × 596
color × 552
formatting × 542
tikz-pgf × 498
siunitx × 457
columns × 370
booktabs × 364
graphics × 345
beamer × 338
macros × 286
rotating × 284
align × 261
width × 257
line-breaking × 227
math-mode × 226
alignment × 223