12
votes
A curve line with label connecting two tabular cells with TikZ
You can do that with tikzmark library.
I changed your macro \tc. Now it creates a node and takes three parameters (format, node name, content). Then I add a tikzpicture[remember picture,overlay] and ...
11
votes
Accepted
How to calculate the total width of a (tabularray) table and pass this length to other packages such tikz or tcolorbox?
You could use the \settowidth macro to measure the width of your table. To avoid having to code the table twice, you could use a savebox and use it once to typeset your table and another time to ...
11
votes
Accepted
How to make this table nicer
You ask how to make the table nicer. So
remove all vertical rules that have no usefulness;
use top alignment, there's no need for vertically center the entries;
replace rules in the middle with ...
10
votes
Accepted
A curve line with label connecting two tabular cells with TikZ
You can also use the nicematrix package that uses TikZ to draw the table and makes it thus quite easy to reference certain cells:
\documentclass[border=12pt,varwidth]{standalone}
\usepackage{...
10
votes
Accepted
How to make a table less cramped
My main advice for giving your table a less-cramped look is to get rid of all vertical rules and employ fewer, but well-spaced, horizontal rules.
And, in order to make the table more readable, I'd ...
9
votes
Accepted
LuaLaTeX - tabularx - Why does this table not fit on the previous page?
LaTeX limits the size of floats on a page. In particular the parameter \textfraction specifies the minimal amount of the page that is reserved for text (and hence, cannot be used by floats). Default ...
9
votes
How do I create a table with blank fields without lines
Here is a solution with {NiceTabular} of nicematrix.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}[first-col,last-row,hvlines,corners]{cccccc}
$z_1$ & \...
9
votes
How to make a table less cramped
I would do something like this, with tabularray:
\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\UseTblrLibrary{amsmath}
\UseTblrLibrary{siunitx}
\NewColumnType{A}[1][1.4]{Q[
...
9
votes
How to make better looking tables for e.g. a publication?
My suggestions would be:
Only use \multicolumn where it relly belongs. It hardly makes sence in your example to use it to span over just one single column (and I really wonder why so many people ...
9
votes
Accepted
LaTeX Table to Standalone?
I don't think that using a tabularx environment with two equally wide columns and some ensuing line-breaks in the first column generates a good layout. I'd go with a basic tabular environment, use l ...
9
votes
Accepted
Automated Dijkstra Visualization
Here's the Dijkstra algorithm in TeX.
It uses the PGFFor (the .list handler) and PGFMath (the \pgfmathloop) for looping:
The .list handler gets used to store the weights of each edge and to do all ...
9
votes
Call alternating row colors from within the table?
Like this (change colors and alignment as You like)?
Code:
\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\begin{center}
\rowcolors{2}{gray!50}{white}
...
8
votes
Accepted
How to label lines and columns of a matrix?
This is a job for nicematrix:
\documentclass{article}
\usepackage{amsmath}
\usepackage{nicematrix}
\begin{document}
\[
\begin{pNiceMatrix}[first-col,first-row]
& C & D \\
C & b-c & -...
8
votes
Column line missing after "E"?
With "clasic" tabular table you can solve your problem as suggested in @koleygr comment, i.e. for multicolumn cell write \multicolumn{4}{c|}{E}
since it overwrite right vertical line defined ...
8
votes
Accepted
Nicematrix package conflicts with babel
You need to turn the babel shorthand - off:
\documentclass{article}
\usepackage[czech]{babel}
\usepackage{nicematrix}
\begin{document}
\begin{table}[h]
\begin{center}
\shorthandoff{-}
...
8
votes
Accepted
How do I create a table with blank fields without lines
Here's a solution that gets by without using TikZ.
Some remarks about how this code differs from yours:
I use array instead of tabular, saving myself dozens of instances of having to enter the $ ...
8
votes
Accepted
Formatting Chemfig inside of table
Don't fix the chemistry pictures. Instead, fix the horizontal lines, i.e., replace the basic \hline macro with the line-drawing macros of the booktabs package to get well-spaced horizontal rules. ...
8
votes
Too much space between words in tables
You could use ragged right text alignment for your columns:
\documentclass{article}
\usepackage{array}
\begin{document}
\begin{center}
\begin{tabular}{ | c | >{\raggedright}m{3.0cm}| >{\...
8
votes
Problem with multicolumn table
With tabularray:
\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{amsmath}
\newlength{\mylen}
\settowidth{\mylen}{2}
\newsavebox{\mysep}
\sbox{\mysep}{\scriptsize\bfseries\textit{S}}
\...
8
votes
Accepted
Problem with multicolumn table
With {NiceArray} of nicematrix.
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
$\begin{NiceArray}{c|c|c|c}
\Block{1-2}{\scriptstyle S}& \Block{1-2}{\scriptstyle S} & \Block{...
8
votes
Accepted
Problem with table - \tabular vs \tabularx
Unlike the tabular* and tabularx environments, the tabular environment does not take a target width as one of its arguments.
And, while employing the line-drawing macros of the booktabs package, one ...
8
votes
LaTeX Table to Standalone?
As compliment to nice @Mico answer (+1), with use of the tabularray package, i.e. with its talltblr environment which is equivalent to classic threeparttable:
\documentclass[border=3.141592]{...
8
votes
Why is a part of my table open?
To fill in the gaps in two of the four vertical lines, you need to change the line & \\ located immediately below the header line to & & & \\. Or, just delete this line.
I would also ...
8
votes
Accepted
Why is a part of my table open?
Beside use siunitx (omitted here in order to not mess the MWE) to fit the width of the whole table without headaches, consider use tabulary or tabularx (in this case, better the first) and on the ...
8
votes
Accepted
Table with weird borders with the booktabs package
A solution with the tabularray package:
\documentclass{beamer}
\usepackage{tabularray}
\begin{document}
\frame{
\begin{tblr}{
colspec = { *{3}{c }},
hline{1} = {1}{2-3}{},
...
8
votes
Accepted
Horizontal tabular borders and `\arrayrulecolor` in beamer
See this nice answer for a solution. The problem is that beamer redefines the macro \reset@color which is used to change the color for rules when using hhline together with colortbl. It is redefined, ...
7
votes
Accepted
Why are size of words in two tables not same?
For reasons best known to the designers of the IEEEtran document class, the contents of table environments are automatically rendered at \footnotesize -- for a 20% linear reduction in font size -- ...
7
votes
Accepted
inserting Tikz diagrams into a table
This code will enter the tikzpicture(s) into a tabular.
\documentclass{article}
\usepackage{blindtext}
\usepackage{tikz}% added <<<<<<<<<<<<<<<<<
...
7
votes
Accepted
How can I make the vertical line of certain rows thicker in LaTeX tables?
don't use tabu. It is buggy and not maintained
instead it I suggest to use (relative new) package tabularray
using it you can define all horizontal as well vertical lines in table preamble.
\...
7
votes
Accepted
Display colors and their names
You can use collcell. I made other adjustments to the table.
\documentclass{article}
\usepackage[table,dvipsnames,x11names]{xcolor} % colors with names
\usepackage{booktabs}
\usepackage{collcell}
% ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tables × 17234tabularx × 1287
horizontal-alignment × 1036
longtable × 1004
vertical-alignment × 896
multirow × 810
multicolumn × 773
spacing × 655
captions × 589
floats × 577
color × 532
formatting × 506
tikz-pgf × 474
siunitx × 433
columns × 353
booktabs × 350
graphics × 332
beamer × 326
macros × 282
rotating × 275
align × 249
width × 249
line-breaking × 219
math-mode × 214
positioning × 208