10
votes
Accepted
Get rid of extra white space inserted when using \verb with tabularx
You can use \Verb from fancyvrb, but with the better definition provided by fvextra.
\documentclass{article}
\usepackage{tabularx}
\usepackage{fvextra}
\begin{document}
\Verb|tabular|
\noindent
\...
9
votes
Accepted
How to frame certain cells with tabular?
Use tabularray:
\documentclass[]{article}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\begin{tblr}[]{
colspec={
Q[0.15\textwidth]
Q[0.25\textwidth]
...
9
votes
How to frame certain cells with tabular?
With {NiceTabular} of nicematrix. The red frame is drawn by using the command \Block and its key draw.
\documentclass{article}
\usepackage{xcolor}
\usepackage{nicematrix}
\begin{document}
\begin{...
7
votes
How can I draw inner vertical line centered in tabular?
With the tabularray package, you could use the hspan=even option to distribute the columns evenly:
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{
colspec={|c|c|c|},
...
6
votes
Accepted
tabularx - column width multicolumn
The issue is that while you define the table to have four columns with automatic, i.e., residually determined, widths, you currently don't provide enough information for LaTeX to be able to determine ...
6
votes
Position of the text within a table
If your table consists of multiple paragraphs and a mix of texts and pictures, the default alignment is always w.r.t. the first topmost baselines of each cell. For texts it is a bottom characters. For ...
6
votes
Accepted
How can I draw inner vertical line centered in tabular?
You can use the w-column type from array package:
\documentclass{article}
\usepackage{multirow,array}
\begin{document}
\setlength{\extrarowheight}{1pt}
\begin{tabular}{|c|w{c}{3cm}|w{c}{3cm}|}
\...
5
votes
Accepted
tabularx makes an unwanted line break
I would like to recommend that you rearrange the table's contents as follows:
the contents of both columns should be organized as separate list-like environments,
don't use vertical rules, but well-...
5
votes
Position of the text within a table
You need to run the instruction
\renewcommand{\tabularxcolumn}[1]{m{#1}}
in the preamble, after loading the tabularx package. (The default setting is \newcommand{\tabularxcolumn}[1]{p{#1}}.) See ...
5
votes
Shading part of a table
Here is a possibility with nicematrix
\documentclass{article}
\usepackage{nicematrix}
\definecolor{copper1}{RGB}{203,109,81}
\begin{document}
\begin{NiceTabular}{llllllll}[hlines={1,3-11}]
\...
5
votes
Should an array eat up an explicit \mskip at the end of a column if tabularx is loaded?
tabularx is not involved here other than it loads array.
In previous releases the mskip is removed but in 2024 that was fixed
https://github.com/latex3/latex2e/issues/1323
4
votes
Accepted
Placing four tables next to each other within one big table with a caption on top and small captions below each small table
Something like this?
\documentclass[10pt]{article}
\textwidth= 5.00in
\textheight= 7.4in
\topmargin = 30pt
\evensidemargin=0pt
\oddsidemargin=55pt
\headsep=17pt
\parskip=.5pt % that'll be barely ...
4
votes
Accepted
Nested tabularx inside a \newenvironment
tabularx gathers everything up to the next \end{⟨current environment⟩}, and the name of the current environment is set up by \begin{...}. Therefore, if you do only
\newenvironment{MyTabular}{
\begin{...
4
votes
tabularx - column width multicolumn
Here is a solution with {NiceTabular} of nicematrix.
\documentclass[a4paper, 11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[czech]{babel}
\usepackage[margin=2cm]{geometry}
\usepackage{nicematrix,...
4
votes
Accepted
tabularx: How do I format the first column of this table?
Since automatic line breaking isn't needed, I suggest you switch from a tabularx to a tabular* setup. No need for the adjustwidth sledgehammer.
\documentclass{article} % or some other suitable ...
4
votes
Accepted
\midrule, \bottomrule, etc do not extend until last columns of my table
You're attempting to use a tabularx environment but don't assign the X column type to any one of the 12 columns. You cannot possibly succeed in achieving the table's target width, viz., \textwidth.
...
4
votes
tabularx makes an unwanted line break
I'm not sure where you found X<{\vspace{4pt}\hsize=#1\hsize}, but it's really wrong under many respects.
The \hsize setup should be done at the beginning, not at the end. And \vspace{4pt} is doing ...
4
votes
Accepted
Underfull \hbox (badness 10000) in a tabularx table
You might add \raggedright for the first column (and \centering for the other three), but you leave plenty of empty space.
I don't think that equal width columns add to clarity for the table, so I ...
4
votes
Accepted
Proper multi column spacing
With fixed width columns:
\documentclass{article}
\usepackage{array}
\newlength{\blockwidth}
\begin{document}
\begin{table}[htp]
\centering
% local settings
\setlength{\blockwidth}{0.5cm}
\...
4
votes
Accepted
How to put a line and a note under a certain column in tables?
Part of the issue with your code is that it specifies the table to have seven columns, while it has only six. This causes a noticeable "overhang" of the horizontal lines.
Fixing this issue, ...
4
votes
Position of the text within a table
The answer has already been given by @Mico, but you might benefit from the powerful tabularray
\documentclass[10pt,letterpaper]{article}
\usepackage[lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in]{...
4
votes
How can I draw inner vertical line centered in tabular?
with nicematrix
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}[width=0.6\linewidth]{cX[c]X[c]}[hvlines,cell-space-limits=2pt]
\Block{2-1}{R} &...
4
votes
Adjust image width to occupy the entire width of a tabularx cell regardless of the width of the column
We need to find the absolute width of the first column. Let us work out the value of this length parameter from first principles. First, the instruction
\begin{tabularx}{\textwidth}{
|>{\hsize=0....
4
votes
Accepted
Table content is right aligned instead of left?
You're mixing and mismatching the machineries of the tabularx and tabular* environments. Either use the tabularx approach and start using the R column type (or, rather, the L column type), or switch ...
4
votes
Shading part of a table
With tabularray package the code is short and simple:
\documentclass[letterpaper,12.0pt]{report}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}
\definecolor{copper1}{...
4
votes
Accepted
Spacing and vertical lines on a tabularx
Professional quality tables don't use vertical rules, as explained in booktabs documentation, so, unless you're doing something special, I'd omit them.
\begin{table}[ht!]
\centering
\begin{...
4
votes
Accepted
Problem with multirow and long text
I would suggest to switch to tabularray, which does not allow multiline cells to overflow their cell borders. Also, it allows you to separate cells content from their appearance, so the code looks ...
4
votes
Suppress column already defined warning, tabularx, array
If you must, as for \newcommand, you can undefine the construct before making a new definition.
\documentclass{article}
\usepackage{array}
\newcolumntype{u}{c}
\ExpandArgs{c}\let{NC@find@u}\relax
\...
4
votes
Accepted
How to change position of data values in the column of table
If you really want to mis-align your numbers, replace the nice S column with a left aligned column:
\documentclass[10pt,twoside]{article}
\usepackage[labelfont=bf, skip=5pt, font=small]{caption}
\...
4
votes
Accepted
Siunitx: spread table content accross page
Use tabular* instead.
I made other changes, as you don't need threeparttable for this application. Also \textsuperscript{***} is not only a mouthful, but the output is really awful.
Note also the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tabularx × 2300tables × 1367
longtable × 152
multicolumn × 144
horizontal-alignment × 135
vertical-alignment × 134
multirow × 126
spacing × 63
color × 59
booktabs × 59
tikz-pgf × 56
siunitx × 51
ltablex × 50
width × 48
formatting × 46
line-breaking × 46
captions × 43
environments × 43
columns × 43
threeparttable × 36
tabulary × 36
itemize × 35
alignment × 35
graphics × 33
floats × 33