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 ...
7
votes
Accepted
How can I recreate this table?
There's not really much to do: count the number of rows to span.
\documentclass{article}
\usepackage{geometry}
\usepackage{newpxtext,newpxmath}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{...
6
votes
Wrapping text in \multicolumn
The statement in the question that wrapping does not occur in \multicolumn is not correct. Wrapping will occur in par-mode column types (p, X) etc whether they are specified in the main table preamble ...
6
votes
Accepted
How to make this particular table better looking?
I'm afraid I can't parse your tabulary code. Here's a solution that makes use of tabularx as well as of the siunitx package to align the numbers in the four numeric columns on the decimal markers.
\...
6
votes
How to make this particular table better looking?
I would never use tabularx or tabulary for data tables such as this (even though I wrote both those packages). They are designed to affect the total table width by controlling line breaking within ...
6
votes
Accepted
How do I "debug" LaTeX errors?
If you use
\multicolumn{2}{l}{\textit{iii}}
with a standard l not L in the multicolumn then it works.
In this case there isn't really any sane way to debug it (other than reading the package ...
6
votes
Accepted
Game theory payoff table - small correction needed
\documentclass[12pt]{article}
\usepackage{multirow}
\newcommand\ml[1]{\multicolumn{1}{|l|}{#1}}
\newcommand\mcc[1]{\multicolumn{2}{c}{#1}}
\begin{document}
\begin{center}
\renewcommand\...
6
votes
How to draw \hline which does not cross a cell gotten by merged ones?
As mentioned @Teepeemm in his comment, instead of \hlines you should use \cline{2-3}. Or instead of tabular table use tblr of tabularray package:
\documentclass[margin=3mm,varwidth]{standalone}
\...
5
votes
Wrapping text in a fixed width table so that table height adjusts
You can solve your problem in two ways:
With multirow, count the number of lines required ((not rows!) and add to the 2nd column a supplementary cell with invisible rule of the required depth (found ...
5
votes
Accepted
Wrapping text in a fixed width table so that table height adjusts
\savebox can be really useful in many examples, although sometimes they might be a bit hacky.
This works in the way that it is saving a parbox set to the specified width into a box. We can then ...
5
votes
Simple table without borders
Use tabularx and the X column type. This should be fine:
\begin{tabularx}{\linewidth}{c>{\arraybackslash}X}
Year 2023-2024 & Very long very long text Very long very long text Very long very ...
5
votes
Accepted
Cannot typeset an equation correctly
I can see no reason for employing a 4-column tabulary environment; an equation environment is all you need.
I would, though, replace all instances of \overline with \bar. And it should be \sum_{p\in ...
5
votes
Accepted
New to LaTeX and need help with a table for my Lesson Plan
Here is another possible solution, after fine tuning and tweeking. All columns are set in relation of the \columnwidth, so it will survive a change from letter to A4. The text with in the cells relate ...
4
votes
How to add a caption to tabulary?
As for tabular, \caption goes before the tabulary. It is part of the surrounding table environment.
4
votes
Put two tables side by side in the same page
This is the idea:
\documentclass[11pt]{article}
\usepackage{float}
\usepackage{booktabs}
\begin{document}
\begin{table}[H]
\begin{minipage}{.4\textwidth}
\centering
\begin{tabular}{...
4
votes
Remove space between specific column entries in table
I would like to suggest that you reorganize the table to get rid of all empty ("filler"?) columns and place the information about R^2 in a separate row below the top-tier header cells. With these ...
4
votes
Accepted
Remove space between specific column entries in table
Jeepers, that is one ugly way of doing a table!
There's always more than one way to do it. I'd suggest:
Use S from siunitx for the figures.
Put the asterisks in the p-value column (braced so as not ...
4
votes
Remove space between specific column entries in table
Never use \resizebox with a tabular! It leads to inconsistent font size. Better play with fontsizes and the value of \tabcolsep.
I propose to use tabularx to fit \linewidth, and systematically use ...
4
votes
Accepted
reproduce a specific table
Here is a simple code:
\documentclass[]{article}
\usepackage[showframe]{geometry}
\usepackage{multirow, booktabs, makecell, boldline}
\begin{document}
\begin{table}[!htbp]
\centering\setlength{\...
4
votes
Accepted
how to create a table with acm
If you get a TeX error then you should not even look at the PDF, look at the log, your log will show
! LaTeX Error: Environment tabulary undefined.
as tabulary is not defined. (You must have loaded ...
4
votes
Accepted
Why \% unable to use in table, overlap (Table alignment)
You're reserving a wrong number of digits.
Also, there should be no % sign in the header if not all table entries express percentages.
The entries that are not percentages should not be aligned at ...
4
votes
Accepted
How to fit the contents of a table without using the tiny font?
The two main changes I would recommend are (1) forcing line breaks in the headers of data columns 4 and 5 and (2) employing a tabularx environment and the X column type for the first column. With ...
4
votes
How to draw \hline which does not cross a cell gotten by merged ones?
With {NiceTabular} of nicematrix.
\documentclass[margin=3mm,varwidth]{standalone}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}{ccc}[hvlines]
col1 & col2 & col3 \\
\...
3
votes
multicolumn tabular is not adding column separator lines
even the columns are empty, you alwas need to set all ampersands. because you didn't do this, the last cell, which end with vertical line, never appear ...
\documentclass{article}
\usepackage{array,...
3
votes
Wrapping text in tables which contains underscores
Your code, as written, provides three separate reasons for why line breaks aren't occurring inside the long "words":
line breaks aren't allowed inside verbatim-type groups
line breaks aren't allowed ...
3
votes
Accepted
"! Misplaced \noalign. \hline ->\noalign" error while adding 3rd row in tabulary
Unrelated to tabulary: you are missing the minipage width in all the new entries
\begin{minipage}
Note the error message
! Missing number, treated as zero.
<to be read again>
\begin{...
3
votes
Accepted
Table numbering when combining ThreePartTable and "ltabulary"
Just use longtable's method for handling the captions and it will work fine:
\documentclass[oneside]{scrbook}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs}
\usepackage[referable]...
3
votes
Accepted
multicolumn tabular is not adding column separator lines
The easiest way to improve the table is to give it a more "open" look -- by removing all vertical lines and using the line-drawing macros of the booktabs package for the horizontal lines. To assure ...
3
votes
Easy vertical alignment in Tabulary balanced columns
As the author of both tabularx and tabulary packages, I wouldn't use either of them for a data table such as this. they are about line breaking within cells and here, apart from the headings, you do ...
3
votes
Accepted
In tables how to auto wrap words (linebreak), align to the left, use only textwidth, preserve table numbering
I suggest to use a tabularx:
\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{caption}
\begin{document}
\begin{table}[htbp]
\caption{caption goes here}
\begin{...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tabulary × 168tables × 116
tabularx × 36
longtable × 15
multicolumn × 11
multirow × 8
vertical-alignment × 7
width × 7
wrap × 7
threeparttable × 6
horizontal-alignment × 5
errors × 5
color × 5
environments × 5
tabu × 5
tikz-pgf × 4
math-mode × 4
itemize × 4
alignment × 4
spacing × 3
align × 3
captions × 3
boxes × 3
landscape × 3
tabularray × 3