10
votes
"Stairs" in Latex table, (some kind of vertical \cline)
You can use
\multicolumn{1}{c|}{\vdots}
in the cells that need a vertical line
9
votes
"Stairs" in Latex table, (some kind of vertical \cline)
With {NiceArray} of nicematrix.
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
$\begin{NiceArray}{|cccc|}[cell-space-top-limit=3pt]
\Hline
P_{11} & P_{12} & P_{13} &...
6
votes
Accepted
How do I resize rows in a table differently?
A couple of ad hoc commands:
\documentclass{article}
\usepackage{amsmath,tabularx}
\begin{document}
\begin{table}[h!]
\caption{Table}\label{tab:1}
\centering
\newcolumntype{C}{>{\centering\...
5
votes
Accepted
Adjusting Table in Latex tabularx environment
NB! I Corrected the \label[tab]{results}, which is wrong syntax unless your thesis-package redefines the label-command. However, I really recommend you to have a look at cleveref.
Use tabular X-...
5
votes
Adjusting Table in Latex tabularx environment
How to organize table is quite opinion base. Some ones might liked the following (based on Sveinung and my comment above):
\documentclass[12pt]{article}
\usepackage{geometry}
\usepackage{booktabs, ...
5
votes
Accepted
Adding arrayrulecolor command removes top rule
There seems to be problems with coloured \clines in beamer. Here is a workaround, using \cmidrule from booktabs. I had to neutralise the vertical padding below the rule. I simplified a bit the code: ...
5
votes
Accepted
Cline not connecting fully in table with custom lines
The array package offers !{decl.} with <decl.> being used instead of the vertical line. To get a 1pt wide vertical line, you can use \vrule width 1pt. You can also declare a new column type ...
5
votes
Accepted
The problem is that Czech babel makes "-" an active character (whatever that means)
If you do not use the - shorthand just turn it off, there is no need to patch every command separately.
\documentclass[10pt]{scrbook}
\usepackage[main=czech]{babel}
\usepackage{booktabs}
\usepackage{...
5
votes
\cline equivalent that allows `(lr)` trim on either side
It is easier to use tblr environment of tabularray package:
\documentclass[border=5mm]{standalone}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\SetTblrInner{rowsep=1pt}
\begin{document}
\begin{...
5
votes
Accepted
Cline not working
With tabularray:
\documentclass{article}
\usepackage{xcolor}
\usepackage{etoolbox}
\usepackage{tabularray}
\makeatletter
\ExplSyntaxOn % https://tex.stackexchange.com/questions/629708
\pretocmd{\@...
5
votes
Accepted
Break a hline between two slide
You could use the tabularray package:
\documentclass[xcolor=table]{beamer}
\usepackage{tabularray}
% from https://github.com/lvjr/tabularray/issues/429#issuecomment-1672666912
\NewTableCommand{\...
4
votes
Accepted
I can't get the last column line in my table
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{center}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|c|c|c|}
\hline
\multicolumn{2}{|c|}{} &...
4
votes
I can't get the last column line in my table
\multicolumn{3}{c|}{Player 1} to add the line to the right and \multicolumn{1}{c}{} in the previous cell to remove the one on the left.
4
votes
Extra,unwanted, row set by \cline
with array:
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[22]
\[\renewcommand\arraystretch{1.5}
\begin{array}{r|rrrr}
&3 &-5 &0 &4 \\
2 & &...
4
votes
How do I resize rows in a table differently?
I'm wondering why you are using \multicolumn, a solution for the Theoratical / Application part might be:
\documentclass{article}
\usepackage{amsmath,tabularx}
\begin{document}
\begin{table}[h!]
\...
4
votes
Accepted
\color in a \cline-like macro causes extra line when after the last row
You need to restore the colour in the same cell, so:
\documentclass{article}
\usepackage{xcolor}
\makeatletter
\def\clineThicknessColor#1#2#3{\@ClineThicknessColor#1\@nil{#2}{#3}}
% Example usage: ...
4
votes
Accepted
\clines in regression table misaligned
The reason for the misalignment is the & between \cline{2-4} & \cline{4-6}.
Moreover, don't put \\ after a \hline, and you don't need an empty row to create a gap between the lines.
However, ...
4
votes
Accepted
in longtable a Bold \cline and colored column
Boldline, and the bold lines from makecell have problems with colour in tables. For lines of variable widths, you can load booktabs and neutralise locally the padding added around the rules, or use ...
4
votes
How do I resize rows in a table differently?
One possibility is to draw an invisible line (of zero width) and the desired height and depth (below the baseline).
For example \rule[-4mm]{0mm}{10mm} draws a line of zero width (therefore invisible) ...
4
votes
Accepted
\cline not working properly
First, of you will make it a lot easier for others to help if you provide a full minimal example instead of a sniplet, then we do not have to guess the rest.
Secondly, don't just ignore compilation ...
4
votes
Putting text in the middle of a line within a three part table
The \thead machinery seems like overkill for the table at hand. In its place, I suggest use \multicolumn{2}{c}{...} directives for the centered header cells, along with \cmidrule instead of \cline.
I ...
4
votes
Accepted
issue with hhline and cellcolor in table
I have two MWEs: the last one cure both problems, the first does not cure the small green spaces.
Using hhline
You have forgotten to turn on arrayrowcolor{black} two places. In addition, the hhline-...
4
votes
Accepted
How to align text vertically in table
Turning the comments of @leandris and myself into an answer.
The following uses \cmidrule and adjusts the \multirow accordingly. In addition it typesets the temperatures using the siunitx package (...
4
votes
Adding arrayrulecolor command removes top rule
You can obtain what you want directly with {NiceTabular} of nicematrix. A key hvlines draws all the expected rules excepted in the corners (specified by corners).
\documentclass{beamer}
\usetheme{...
4
votes
A small aesthetic problem in tables: conflict between \ cellcolor and \ cline commands
Here is a code that works. Some remarks: I didn't load colortbl, as xcolor with the [table] option loads it. Furthermore, I replaced all \cellcolor commands with a single \rowcolor at the beginning of ...
4
votes
Partial cline in table only for some fraction
It's easy with tikz and nicematrix.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}{cc}[cell-space-top-limit=4pt]
1 &...
4
votes
Accepted
Problem with cline being to short
It's easier to debug these things if you add a row with column numbers (just while testing)
\documentclass{article}
\usepackage{multirow}
\usepackage{graphicx,array}
\begin{document}
\begin{table}[!...
3
votes
Accepted
Span rule disappear when using colors in table
The problem with \cline and coloured cells is known. A work-around consists in using \hhline which works well with colour: set the colour of the last part of the hhline to yellow, and restore it to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cline × 85tables × 55
multirow × 18
multicolumn × 15
tabularx × 12
longtable × 10
hline × 8
booktabs × 5
beamer × 4
color × 4
cellcolor × 4
hhline × 4
horizontal-alignment × 3
colortbl × 3
spacing × 2
pdftex × 2
formatting × 2
align × 2
vertical-alignment × 2
amsmath × 2
page-breaking × 2
matrices × 2
templates × 2
arrays × 2
width × 2