Skip to main content
11 votes

Using \worldflags within a table

The \worldflag macro creates a whole tikzpicture. It is generally not a good idea to nest tikzpictures, so remove the additional tikzpicture around it: \documentclass[a4paper, 12pt]{article} \...
samcarter_is_at_topanswers.xyz's user avatar
6 votes

Long table with all Mathematics columns

In addition to following @PeterGrill's suggestion to load the array package, you may want to give some thought to give the longtable more visual appeal. Importantly, it isn't necessary -- or even ...
Mico's user avatar
  • 519k
6 votes

Table size gets smaller

Instead of code fragments you should show us MWE (Minimal Working Example) with your tables. On table formatting has pages layout strong influence, specially in your case where tables seems to be ...
Zarko's user avatar
  • 302k
6 votes

Using \worldflags within a table

You can't nest tikzpictures. Anyway, you should also fix the height and a spurious space introduced by the worldflag package. \documentclass[a4paper, 12pt]{article} \usepackage{graphicx} \usepackage{...
egreg's user avatar
  • 1.2m
6 votes

Text wrapping in longtable not working

The optional argument to longtable can take c, r or l (according to the documentation), so >\centering p{1cm} is out. longtable doesn't tell you this by reporting an error, though. Indeed, it doesn'...
cfr's user avatar
  • 211k
5 votes

Latex Table condensed and too small?

Hm, your table is full of tabular environments which are just a clutter ... Remove them and for columns use type to which you can prescribe column widths. As you note, you like to have long table. ...
Zarko's user avatar
  • 302k
5 votes
Accepted

Create a phone-book using LaTeX

Both, bullets as well as wrapping is possible when you use p{} as column type. I am not 100% sure what you mean with question 1., but the rest works rather simple: \documentclass[dvipsnames,10pt]{...
Arne's user avatar
  • 1,425
4 votes
Accepted

How to split a table across pages using longtable?

(updated the answer to switch from a longtable setup to a tabularx setup) If you eliminate the line breaks in columns 2, 3, and 4, you can typeset the entire table on a single page. The following ...
Mico's user avatar
  • 519k
4 votes
Accepted

Add the word "Supplementary" in the caption title of longtblr

I would like to add the word "Supplementary" just before the word "Table". How can I do it? tabularray, specifically with longtblr as well as talltblr works along templates. Each ...
Celdor's user avatar
  • 9,484
4 votes

Longtable in landscape environment

You wer forcing the table to be wider than the text block with an explicit 1.089\linewidth in a multicolumn, and the sum of the column widths and \tabcolsep spacing was more than \linewidth, I reduced ...
David Carlisle's user avatar
4 votes
Accepted

Longtable header

\caption{Trial.}\\ \hline value & \multicolumn{5}{c}{value} & \multicolumn{5}{c}{value} \\ \cline{2-6} \cline{7-11} & \multicolumn{2}{c}{value} & \multicolumn{2}{c}{value} &...
David Carlisle's user avatar
4 votes

Latex Table condensed and too small?

I suggest you employ two xltabular environments (which can break across pages if needed), set their overall widths to \textwidth, and allow automatic line breaking in columns 2 and 3. I would further ...
Mico's user avatar
  • 519k
4 votes

Table size gets smaller

Here's a set of solutions for all four tables. Observe that they don't make use of the adjustbox sledgehammer. Instead, they employ tabularx (for single-page tables) and xltabular (for multi-page ...
Mico's user avatar
  • 519k
4 votes
Accepted

longtable formatting issue. How to remove extra vertical dashes on the side when table cross page

In the endhead portion, you need to change \multicolumn{9}{|c|}{\tablename\ \thetable{} -- ... to \multicolumn{9}{c}{\tablename\ \thetable{} -- ...
Mico's user avatar
  • 519k
4 votes
Accepted

advice and suggestions for table styles

I suggest that you not use \diagbox; instead, just place the label "IDs" in a line above the 10 data columns. \documentclass[12pt]{report} \usepackage[letterpaper,margin=1in]{geometry} %% \...
Mico's user avatar
  • 519k
4 votes

Remove vertical line between two cells in a LaTeX longtable

One way to fix the formatting is to replace the line &&\\ with & \multicolumn{2}{c|}{} \\ i.e., to replace the second & symbol with \multicolumn{2}{c|}{}. A full minimum working ...
Mico's user avatar
  • 519k
4 votes
Accepted

Unwanted line extension after tcolorbox in longtable

ending a p column in vertical mode is tricky. You can remove the final strut: \documentclass[a4paper, 11pt]{article} \usepackage{longtable,array} \usepackage{tcolorbox} \makeatletter \def\...
David Carlisle's user avatar
4 votes
Accepted

Segmented longtable(longtblr) across multiple columns

longtblr works fine in standard two-column mode, so perhaps you can simply use that. \documentclass[a4paper]{article} \usepackage{tabularray} \usepackage{xcolor} \usepackage{kantlipsum} \begin{...
cfr's user avatar
  • 211k
4 votes
Accepted

Aligning the columns of longtable

This is standard tabular preamble syntax as extended by the core latex tools package. c is a centred column with single line content set its natural width. p{2cm} is a \parbox[t]{2cm} column with ...
David Carlisle's user avatar
4 votes
Accepted

cleveref not working for label after caption in longtable

The problem is that cleveref patches \refstepcounter to update its data, but in a current LaTeX longtable doesn't use \refstepcounter directly (it does it avoids that hyperref anchors are set in the ...
Ulrike Fischer's user avatar
3 votes

How to split a table across pages using longtable?

You're wasting precious space with the long headers, which can be split across lines. For the last column, I like Mico's idea to print the sequence in monospaced type, which guarantees alignment. The ...
egreg's user avatar
  • 1.2m
3 votes

Can not manage table dimension, please help

My main suggestion is not to insert line breaks by hand. Instead, use an xltabular environment and let LaTeX do the tedious job of finding linebreaks. The following example uses an xltabular ...
Mico's user avatar
  • 519k
3 votes
Accepted

Can not manage table dimension, please help

You tagged this longtable (for multi-page tables) but it seems you want to squeeze it in to one page. Just choose a suitable font size and column widths, and remove all the nested tabular. If you ...
David Carlisle's user avatar
3 votes
Accepted

xltabular with enumitem shorten length

Your code would appear to be needlessly complicated, with nested inner and outer environments and invisible \textcolor{white}{aaaa}-type objects (the latter to avoid getting complaints about empty ...
Mico's user avatar
  • 519k
3 votes
Accepted

How to make nested \begin{equation}\begin{aligned} environment within longtable tabular cell?

This is unrelated to longtable. You can not have a vertical display construct like equation* in a c column which is a single line hbox. But as far as I can tell you do not want a vertical display ...
David Carlisle's user avatar
3 votes

Column designator X with topiclongtable

You could use a package like xltabular that combines longtable and tabularx and then persuade this package to use it, but honestly it's not really worth it, it is simple to use the standard tabular p ...
David Carlisle's user avatar
3 votes

I have to generate a table that has paragraphs, however, the text overflows the margins of the page

I just need the text to break onto the next page. The setup of your three-column table is a bit perplexing. There's nothing -- or, more precisely, nothing meaningful, in either column 1 or column 3, ...
Mico's user avatar
  • 519k
3 votes
Accepted

Multicolumn & Multirow leads to an unwanted vertical line

There are two, separate issues with your longtable environment: double-thickness vertical separator line in row 1 unwanted vertical separator line in row 2 To fix the first issue, change \...
Mico's user avatar
  • 519k
3 votes

Multicolumn & Multirow leads to an unwanted vertical line

With tabularray. You didn't show which document class you're using. Please note that, given its column width, your table goes out of the border, with an ordinary article class. \documentclass{article} ...
CarLaTeX's user avatar
  • 65.2k
3 votes
Accepted

decrease table wrapped text spacing

The cells display the required line space since you set \renewcommand{\baselinestretch}{1.5} (I hope you didn't do that only for the table, otherwise you should better use \renewcommand{\arraystretch}{...
jlab's user avatar
  • 4,291

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