Skip to main content
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 ...
Tiuri's user avatar
  • 7,779
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{...
egreg's user avatar
  • 1.1m
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 ...
David Carlisle's user avatar
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. \...
Mico's user avatar
  • 514k
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 ...
David Carlisle's user avatar
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 ...
David Carlisle's user avatar
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\...
Zarko's user avatar
  • 300k
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} \...
Zarko's user avatar
  • 300k
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 ...
Bernard's user avatar
  • 273k
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 ...
Runar's user avatar
  • 6,092
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 ...
Bernard's user avatar
  • 273k
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 ...
Mico's user avatar
  • 514k
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 ...
Sveinung's user avatar
  • 20.5k
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.
David Carlisle's user avatar
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 ...
Mico's user avatar
  • 514k
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 ...
Paul Stanley's user avatar
  • 18.2k
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 ...
Bernard's user avatar
  • 273k
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{\...
Bernard's user avatar
  • 273k
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 ...
David Carlisle's user avatar
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 ...
egreg's user avatar
  • 1.1m
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 ...
Mico's user avatar
  • 514k
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 \\ \...
F. Pantigny's user avatar
  • 43.1k
4 votes
Accepted

Error of array with tabulary

The recent LaTeX update unfortunately broke tabulary. A matching update to tabulary is being tested and hopefully should be released today. meanwhile you can use the development version available from ...
David Carlisle's user avatar
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 ...
David Carlisle's user avatar
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 ...
Mico's user avatar
  • 514k
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 ...
Mico's user avatar
  • 514k
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,...
Zarko's user avatar
  • 300k
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{...
David Carlisle's user avatar
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{...
samcarter_is_at_topanswers.xyz's user avatar
3 votes
Accepted

Wrap text around table

if i understood your question correctly, than you have two options for solving of the your problem: use the package afterpage: \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]...
Zarko's user avatar
  • 300k

Only top scored, non community-wiki answers of a minimum length are eligible