9
votes
Accepted
Good practices for creating tables
My suggestion is using
siunitx to align the numbers
booktabs for nicer table rules and spacing:
and not:
\begin{table}[H] this will disable most of the powerful floating mechanism of tex
\begin{...
7
votes
Accepted
Formatting tablenotes
Five suggestions: (1st and 2nd solve the problem, the rest is just a matter of style, but strongly recommended for formal documents).
1) Do not use \resizebox for tables unless strictly necessary. ...
7
votes
Accepted
I have labelled a table, but it says that the reference is undefined
LaTeX must be issueing two separate error messages related to the table.
\caption directives are not allowed outside of LaTeX floats (such as table and figure).
\caption directives are not allowed ...
6
votes
Accepted
creating a contingency table in booktabs-look
Two other possibilities:
\documentclass{article}
\usepackage[flushleft]{threeparttable}
\usepackage[table, svgnames]{xcolor}
\usepackage{boldline, cellspace}
\setlength\cellspacetoplimit{1.5ex}
\...
6
votes
Good practices for creating tables
Not so different from samcarter's answer, but with some valuable tricks.
The symbol “pKa” should not appear in italics, so I defined a couple of macros to deal with this and to simplify input.
The ...
6
votes
include latex table in rmarkdown
If you are using bookdown, there is explicit functionality to handle this. You just need to handle the LaTeX with the following:
```{=latex}
[PUT LATEX HERE]
```
This feature ...
6
votes
Accepted
A way to create a clear layout for large tables
your table already look nice. i would not change much in it appearance. only should look if i can make table code slightly shorter ... :-). for example with use:
for the first column would use >{$...
6
votes
Accepted
How to make the title of a table fit the width of the table
You're not using the threeparttable environment correctly: You should place the \caption statement inside rather than outside the threeparttable environment. That way, the caption's width will be ...
6
votes
Accepted
Unwanted indentations ONLY in the first row of longtable
The problem is with \label{tab:CasosDosVarHom}. You must add a % after the argument of \label (at the end of the input line). Otherwise, it produces a stray space.
See What is the use of percent ...
6
votes
Align decimal numbers with different digital numbers
To typeset a column of numbers with associated separate uncertainties, you may use the siunitx package, set the package option separate-uncertainty, remove the $ inline math initiators and terminators,...
5
votes
Table width with threeparttable smaller than notes and caption?
I would like to follow up on the solution 2/3 from cslstr.
If you put the caption outside the threeparttable- but within the table-environment, than both centering and caption work together without ...
5
votes
creating a contingency table in booktabs-look
Since vertical rules appear to be a necessity, I suggest you not use the macros of the booktabs package. To get adequate spacing above and below the horizontal rules created by \hline, I suggest you ...
5
votes
Accepted
Fit a table into a beamer's frame
To start with a quote from the beamer user guide:
Never use a smaller font size to “fit more on a frame.” Never ever use the evil option shrink.
So please use the following solution at your own ...
5
votes
Accepted
tabular indentation won't go away, even with \noindent and @{} in tabular preamble
The documentation of aastex recommends to use their deluxetable environment. (See Section 2.16 Tables)
There is support in the AASTeX package for tables via two mechanisms:
LATEX’s standard table ...
5
votes
Two Tabulars Side by Side in Threeparttable
Enclose both four-column tables in an "outer", two-column tabular environment:
\documentclass{article}
\usepackage{multirow, threeparttable}
\begin{document}
\begin{table}[hbtp]
\begin{...
5
votes
Two Tabulars Side by Side in Threeparttable
As you've (re-)discovered, the threeparttable environment uses the width of the very first tabular-like environment to determine the width of the other two main elements -- the caption and the ...
5
votes
Accepted
Replicating threeparttable's tablenotes in tabularray [follow up]
The space between notes in threeparttable seems excessive, so I (also) changed it.
\documentclass{article}
\usepackage{tabularx,booktabs}
\usepackage[para, flushleft]{threeparttable}
\makeatletter
\...
5
votes
Table notes outside table margins
For information, {NiceTabular} of nicematrix has its own system for tabular notes. In that environment, you can make the a protruding the right margin (when there is strictly nothing between the end ...
5
votes
Accepted
Table notes outside table margins
One way to fix the spacing issue is to append \hphantom{\textsuperscript{a}} to \tnote{a}.
\documentclass[11pt]{article}
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\begin{document}
...
5
votes
Adjusting two "three part tables" side by side in a document
Empty lines are end of paragraphs. If you want the tables side by side, you should not end a paragraph and start a new one. Removing the empty lines:
\documentclass[10pt, a4paper]{article}
\usepackage[...
5
votes
Accepted
Adjusting two "three part tables" side by side in a document
There are several issues with your code. In no particular order:
You don't appear to be using the machinery of the threeparttable package at all. The three formal parts of a threeparttable ...
5
votes
Adjusting two "three part tables" side by side in a document
I can't see how threeparttable would help for this job.
I'd simply use tabular* with appropriate dimensions as to leave a bit of horizontal space between the two tables; setting \tabcolsep to zero ...
5
votes
Accepted
Text spilling into adjecent cells in threeparttable despite specifying column width
if you use * for the width of the multirows, they will adapt to the width of the text. To use the width of the column instead, use =
if you have unusual words like cyclopentanoperhydrophenanthrene, ...
4
votes
Table width with threeparttable smaller than notes and caption?
The use of threeparttable is no more useful is this case because this soltion is flawed:
it cannot manage correctly wider Notes by default (redefining \TPTminimum is not meant to do that)
it Breaks ...
4
votes
Accepted
threeparttable not working with subcaption(subtable), error: table inside subtable
The problem is that the caption package redefines the threeparttable environment to set the caption type to table. caption uses the caption type to check for inappropriate nesting. In this case, it ...
4
votes
How best to change the font size (etc) of threeparttable's table notes?
I used a simpler approach which was adequate for my needs
...
\begin{tablenotes}
\footnotesize
\item [1] See \url{https://texblog.org/2012/08/29/changing-the-font-size-in-latex/}
\end{tablenotes}
...
...
4
votes
Accepted
How can I ensure uniform spacing for tabular and tabularx with custom tablenotes environment?
It's the tabular width measurement code in threeparttable what did it. (tabular* and tabularx have an explicit width so threeparttable just uses the specified width and doesn't measure anything in ...
4
votes
Good practices for creating tables
Some more improvements. I think this kind of table is more readable with alternate row colours. Also, pKa should be typed in roman characters:
\documentclass{article}
\usepackage[utf8]{inputenc}
\...
4
votes
How to use the full textwidth for tablenotes under multiple tables?
threeparttable hooks into tabular to get the width. So imho a logical way would be to use a surrounding tabular:
\documentclass[11pt,a4paper]{article}
\usepackage[flushleft]{threeparttable}
\...
4
votes
Accepted
Increase width of the caption in threeparttable
The macro \tnote is defined in such a way that it will not function outside the threeparttable environment. This is mostly to prevent it from showing up in the \listoftables.
\documentclass{article}
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
threeparttable × 290tables × 162
longtable × 53
tabularx × 36
tablenotes × 35
captions × 26
threeparttablex × 22
horizontal-alignment × 21
footnotes × 21
siunitx × 16
booktabs × 12
landscape × 11
floats × 10
formatting × 9
lyx × 9
spacing × 7
notes × 7
subcaption × 6
tabulary × 6
line-breaking × 5
rotating × 5
tnote × 5
beamer × 4
cross-referencing × 4
page-breaking × 4