20 votes
Accepted

How to vertically AND left-align a cell with \makecell?

Just don't add a comma between the alignment: \documentclass[12pt]{article} \usepackage{makecell} \usepackage{tabu, booktabs} \begin{document} \begin{table} \begin{tabu} to \textwidth {lXX} \...
Bernard's user avatar
  • 271k
10 votes

\makecell align does not work?

Your interpretation of the vertical alignment specification is incorrect. Using a [t]op alignment merely sets the anchor point for that specific cell to the baseline of the top\first line of the cell ...
Werner's user avatar
  • 602k
8 votes
Accepted

colortbl's \cellcolor not filling whole cell in combination with \makecell

It is known that makecell has problems with coloured tables. Here are two work-arounds: one plays with \rowcolor and its overhang optional arguments, the other replaces makecell with ...
Bernard's user avatar
  • 271k
8 votes
Accepted

Why does \makecell's vertical alignment option affect another cell rather than itself?

The behaviour is not specific to makecell you would see same with tabular or if you use b or m rather than p columns TeX aligns each box in a row so the reference point of the box sits on the (red) ...
David Carlisle's user avatar
8 votes
Accepted

How to use \thead with left align locally instead of globally?

You can achieve this by specifying that option in \thead. Such as \thead[r], \thead[l], \thead[c], etc. \documentclass[12pt]{memoir} \usepackage{tabularx} \usepackage{makecell} \begin{document} ...
Majid Abdolshah's user avatar
7 votes
Accepted

With makecell the text dimension is reduced

\thead (not \makecell) sets the font size to \footnotesize for some reason. Add to your preamble \renewcommand\theadfont{\normalsize\scshape} Note: The \scshape command is in this code because the ...
Bernard's user avatar
  • 271k
6 votes
Accepted

align text in a tabu-table top-left without tricks

As I said in my comment,it is no clear why you use \makecell{...}. Top left align is easy to achieve without it. If you still persist to use it, than you need to add option [tl] for top align and ...
Zarko's user avatar
  • 296k
6 votes
Accepted

\makecell in the header: how to get rid of the space after the last column of the table?

You need the \multicolumn spec to include @{}: \documentclass[british]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{booktabs} \usepackage{siunitx} \usepackage{makecell}...
Joseph Wright's user avatar
  • 259k
6 votes

Custom longtable hangs forever when admittedly weird redefinition of \footnoterule is used

You need to make sure that the footnoterule is a vertical construct \renewcommand\footnoterule{% \endgraf\vspace*{-0.18mm}% \setlength\leftskip{0pt}% \setlength\rightskip{0pt plus 1fil}% \...
David Carlisle's user avatar
6 votes
Accepted

Issue combining makecell and cellcolor

The problem with makecell and colouring tables has been known for quite some time. A simple possibility, consists in replacing \makecell in coloured columns/rows with \Centerstack from stackengine. I ...
Bernard's user avatar
  • 271k
6 votes
Accepted

Color issue with the combination of the longtable, rowcolor, and makecell

You can avoid the problem by using longtblr from the tabularray package: \documentclass[a4paper]{article} \usepackage[table]{xcolor} \definecolor{lightblue}{rgb}{0.93,0.95,1.0} \usepackage{tabularray}...
samcarter_is_at_topanswers.xyz's user avatar
5 votes

Get makecell thead to emulate font size of table environment?

If you don't want the command to change the font then \renewcommand\theadfont{}
David Carlisle's user avatar
5 votes

Misaligned cells using makecell and xtabular

For a better alignment and spacing: Enlarge the width of the columns to 0.9cm. The misalignment is caused by columns that are too narrow, so most entries (except those that you thought are misaligned)...
gernot's user avatar
  • 49.4k
5 votes
Accepted

makecell alters vertical alignment across table row

The default for \makecell is centred, both vertically and horizontally. You could use \makecell[lt]{A\\B\\C\\D\\E}. However, why use \makecell in a pcolumn type? You may as well use this code: \...
Bernard's user avatar
  • 271k
5 votes

Issue combining makecell and cellcolor

With {NiceTabular} of nicematrix: \documentclass{article} \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry} \usepackage[svgnames]{xcolor} \usepackage{nicematrix} \begin{document} \...
F. Pantigny's user avatar
  • 39.7k
5 votes
Accepted

1. How do I align all equations in column 2? 2. Also the left [ of my matrices is not appearing. How do I solve these 2 problems?

It is not perfect, but if you are not too picky, the following solution should be acceptable: In above table is considered longtblr table defined in the tabularay package. That equation are strict ...
Zarko's user avatar
  • 296k
5 votes
Accepted

Why does `\makecell` not provide proper vertical alignment for this particular line?

Redefine the X column and use only one X. \documentclass{article} \usepackage{makecell} \usepackage{tabularx} \usepackage{booktabs} \begin{document} \renewcommand{\tabularxcolumn}[1]{m{#1}} \...
Simon Dispa's user avatar
5 votes
Accepted

How to remove extra vertical space in a table cell bordering makecell

Use \makecell[tl]{...}. \documentclass[11pt]{article} \usepackage[a4paper]{geometry} \geometry{tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm} \usepackage[english]{babel} \usepackage{tabularx, ...
F. Pantigny's user avatar
  • 39.7k
5 votes
Accepted

Size of the Rotated Table Cells

Using your interesting answer as starting point, the possible (more consistent) solution for your problem can be : \documentclass{article} \usepackage{tabularray} \usepackage{makecell} \usepackage{...
Zarko's user avatar
  • 296k
5 votes

how to make cellcolor not fill the cell completely

UPDATE: Here is a shorter solution. \documentclass{article} \usepackage{nicematrix,tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{% <---- BEWARE \node[shape=circle,draw,inner sep=2pt] (...
F. Pantigny's user avatar
  • 39.7k
5 votes
Accepted

Vertically align numbers in siunitx column at the bottom

S columns align like c or l columns on the text baseline, it is your \makecell in column 1 that is vertically centred you want to top or bottom align it.
David Carlisle's user avatar
4 votes
Accepted

Hanging indent with makecell

If I understand well what you mean by a hanging indent, I don't think it can be done within makecell, which is done for standard r, l or c cells. However, you can easily obtain it with a p{some ...
Bernard's user avatar
  • 271k
4 votes

Table cell line break, and rowcolors

Almost after one year (!) this answer will not help OP very much ... or maybe I'm wrong :). Anyway, coloring \makecell is somehow tricky. Correct coloring you obtain with put \makecell{...} into \...
Zarko's user avatar
  • 296k
4 votes
Accepted

siunitx & makecell in tables: number alignment does not work

in S column type S texts (usual in column headers) had to be enclosed in curly braces, even if they are in \makecell or \thead macros form makecell package. exception is, if the header is inside \...
Zarko's user avatar
  • 296k
4 votes
Accepted

Xhline too long in longtable

A work-around consists in using Xclineinstead. Another solution uses the boldlinepackage, from the shipunov bundle: its \hlineB command takes longtable into account. Note that the argument for ...
Bernard's user avatar
  • 271k
4 votes

Set \bottomrule of two uneven tables to same height

Since you load makecell, we can have different values of \arraystretch for the column heads and the rest of the tables, so here is a solution playing with \arraystretch: \documentclass{article} \...
Bernard's user avatar
  • 271k

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