Skip to main content
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
David Carlisle's user avatar
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} &...
F. Pantigny's user avatar
  • 43.8k
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\...
egreg's user avatar
  • 1.2m
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-...
Sveinung's user avatar
  • 20.6k
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, ...
Zarko's user avatar
  • 302k
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: ...
Bernard's user avatar
  • 273k
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 ...
leandriis's user avatar
  • 63.2k
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{...
David Carlisle's user avatar
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{...
L.J.R.'s user avatar
  • 11.5k
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{\@...
Zarko's user avatar
  • 302k
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{\...
samcarter_is_at_topanswers.xyz's user avatar
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|}{} &...
Johannes_B's user avatar
  • 24.4k
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.
David Carlisle's user avatar
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 & &...
Zarko's user avatar
  • 302k
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!] \...
albert's user avatar
  • 1,337
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: ...
David Carlisle's user avatar
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, ...
CarLaTeX's user avatar
  • 65.2k
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 ...
Bernard's user avatar
  • 273k
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) ...
AndréC's user avatar
  • 26.2k
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 ...
daleif's user avatar
  • 55.5k
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 ...
Mico's user avatar
  • 519k
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-...
Sveinung's user avatar
  • 20.6k
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 (...
Skillmon's user avatar
  • 63.2k
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{...
F. Pantigny's user avatar
  • 43.8k
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 ...
Bernard's user avatar
  • 273k
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 &...
polyn's user avatar
  • 5,981
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}[!...
David Carlisle's user avatar
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 ...
Bernard's user avatar
  • 273k

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