Questions tagged [makecell]
The makecell tag has no usage guidance.
141
questions
47
votes
3
answers
31k
views
How to diagonally divide a table cell … properly?
There have been many threads discussing solutions to the task of drawing a diagonal line in a table cell. There are also two packages to do this, slashbox and the better looking makecell with its \...
19
votes
1
answer
35k
views
How to vertically AND left-align a cell with \makecell?
I am writing a table with the \makecell package, and I am able to left-align the makecell text with the command:
\makecell[l]{here is \\ my text \\ in the cell}
I can also top-align the text with:
\...
10
votes
4
answers
2k
views
Table coloring doesn't extend all the way with makecell
This issue occurs while using xcolor to alternate the table color, while also using makecell to put multiple lines in a table cell. In this specific scenario, where a larger cell is in a colored line, ...
10
votes
3
answers
5k
views
\makecell align does not work?
In the docs of the makecell package in Section 1.1 it stated that one can align text horizontally to the top or bottom with \makecell[t]{..} and \makecell[b]{..}. I tried that with
\documentclass{...
10
votes
2
answers
3k
views
colortbl's \cellcolor not filling whole cell in combination with \makecell
I want to color some cells of a table, some of which use \makecell. The problem I run into is that not the whole width of the \makecell cells is filled by the color.
MWE:
\documentclass{article}
\...
8
votes
3
answers
255
views
Size of the Rotated Table Cells
I want to create a custom table with tabularray package. I have used makecell and rotating packages to rotate some of the table cells. Additionally, the length of the rotated cells are set with \...
7
votes
1
answer
1k
views
Why does \makecell's vertical alignment option affect another cell rather than itself?
I'm puzzled by the behavior of \makecell (from the makecell package) when given a vertical alignment option (such as [t] or [b]). It appears that the specified option doesn't affect the vertical ...
7
votes
1
answer
501
views
\makecell in the header: how to get rid of the space after the last column of the table?
This table is perfect for me except for the space left at the end:
How can I eliminate it? @{} doesn't work!
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\...
6
votes
2
answers
545
views
Issue combining makecell and cellcolor
I have seen similar question to this one already but none of the answers I have found seem to solve my problem. I'm trying to color the cells of the first column of my table, but I cannot find a ...
6
votes
1
answer
2k
views
With makecell the text dimension is reduced
I added the makecell package in order to insert a line break within a column of tabular environment.
Everything perfect and smooth except for the shrinkage of the text dimension:
\documentclass[...
5
votes
1
answer
2k
views
makecell package vertical centering of vertical text
I'm using makecell package to write vertical text to my table cells. It works fine, but I have trouble centering it.
Normal vertical text (within a {tabular}) is displayed as:
\rothead{Some ...
5
votes
2
answers
93
views
styling nline cells
The number line command \nline from the makecell package inserts n cells with a pattern containing an incrementing number. I'd like to treat those as headers, styled with \theadfont and \theadalign. I ...
5
votes
2
answers
857
views
Misaligned cells using makecell and xtabular
First a minimal example:
\documentclass{article}
\usepackage{makecell}
\usepackage{xtab}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\begin{xtabular}{|p{0.65cm}||C{0....
5
votes
3
answers
4k
views
How to get automatic line-breaks using tabularx and makecell?♀
I'm using the tabularx and makecell packages for the aesthetics of my tables. I used the X column type for columns with long texts and \makecell{...} for line-breaks into the cells. But when I try to ...
5
votes
3
answers
2k
views
Table cell line break, and rowcolors
This question is about three things:
Making forced line break in a cell
Combining above with \rowcolors
Combining above with vertical lines
1.This is obviously a common problem, since I have read ...
5
votes
2
answers
1k
views
Combining diagonal table cell lines with minimum row clearance
So, yeah, it just never ends I guess. I'm fully aware that the following table is not exactly going to win an award for its stunning beauty no matter what. But the most important problem is that in ...
4
votes
3
answers
142
views
Color issue with the combination of the longtable, rowcolor, and makecell
I am trying to add a list of elements into a longtable cell.
I have tried several solutions and the only one that has proved really applicable is the one I present in the following MWE.
The main ...
4
votes
2
answers
307
views
Coloring a line of a table
I try to color only the first line of the table below, using the code:
\documentclass{article}
\usepackage{makecell}
\usepackage{hhline}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{tabularx}
...
4
votes
2
answers
835
views
makecell alters vertical alignment across table row
Consider this example:
\documentclass{report}
\usepackage{makecell}
\usepackage{lipsum}
\begin{document}
\begin{tabular}{p{3cm}p{3cm}}
\lipsum[1][1] & \lipsum[1][2-4]\\
\lipsum[1][5] & \...
4
votes
2
answers
328
views
Set \bottomrule of two uneven tables to same height
I have two parallel tables not equal in height. I'd like to set \bottomrule of the shorter left table to the same height as the right one.
Is this even possible without rearranging the rows? Using \...
4
votes
2
answers
2k
views
Align column in table on Plus/minus symbol with values of varying length and align header of first column with data?
I would like the data in the "Confidence Limit" column to align on the plus/minus symbol. Here is a link to a similar but different question Aligning +- sign in table. However, the values in my data ...
4
votes
2
answers
3k
views
How to color column heads determined width makecell
In my answer to question How do I repeat the first table row on every page using longtable inside of tcolorbox?
I suggest to (between others) to use makecell package to define head of table and ...
4
votes
1
answer
344
views
How to remove extra vertical space in a table cell bordering makecell
MWE:
\documentclass[11pt]{article}
\usepackage[a4paper]{geometry}
\geometry{tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\usepackage[english]{babel}
\usepackage{tabularx, makecell}
\setlength{\...
4
votes
1
answer
4k
views
Get makecell thead to emulate font size of table environment?
I have a table defined like this:
\begin{table}[]
\tiny
It contains a table header in bold with a line break between words.
\textbf{\thead{word1 \\ word2}}
I added this to my pre-amble as per this ...
4
votes
3
answers
953
views
Colored tables with booktabs, makecell and cellspace
While experimenting with different table-packages, I realised, that each package basically stands for itself and often lacks in compatibility with other great packages.
So I tried to create a table ...
4
votes
1
answer
529
views
Diagonal cell division with tikz figure on same row and into `X` column from longtabu
MWE (with full package list)
\documentclass[english, bibliography=totoc]{scrreprt}
%%% PAGE DIMENSIONS
\usepackage{geometry}
\geometry{verbose,a4paper,tmargin=3.5cm,bmargin=2.5cm,lmargin=2.6cm,...
4
votes
1
answer
717
views
How to add a hyperlink to a multiline element in a table, which uses makecell?
I've an existing table in LaTeX (for my resume), which uses makecell package to produce the formatted output in multiple lines for each entry. Example of one row:
2007 & \makecell[c] {Bachelor of ...
4
votes
2
answers
3k
views
How to color rows when using makecell?
I'd like to color the rows of a table to make it easy readable. Some cells have multiple lines, so I use the makecell package, and planned to use the xcolor for coloring, but they are clashing. Sample ...
4
votes
1
answer
6k
views
Using \multirow and \makecell
I am trying to make a table which has in total 4 rows (1 tittle + 3 data). In one column, which contains the same information for all 3 rows, I decided to use \multirow.
In this multicolumn I would ...
4
votes
1
answer
1k
views
Bad vertical distance in table using makecell package \multirowhead
This is my working code:
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{array}
\usepackage{caption}
\usepackage{tabu}
\...
3
votes
4
answers
183
views
how to make cellcolor not fill the cell completely
\documentclass[]{article}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{graphicx}
\usepackage{floatrow}
\...
3
votes
2
answers
6k
views
How to use \thead with left align locally instead of globally?
How to align the contents of the \thead cell to the right?
\documentclass[12pt]{memoir}
\usepackage{tabularx}
\usepackage{makecell}
\begin{document}
\begin{tabular}{|c|}
\thead{Content \\ ...
3
votes
1
answer
3k
views
align text in a tabu-table top-left without tricks
I use tabu and makecell to create tables and their content. As many other people I want to align cell content top-left. There are a lot of postings about that topic (with different table environments) ...
3
votes
1
answer
280
views
Automatic line break in tabularx environment
I'm trying to get a table that automatically inserts a line-break so some very long text can fit in the cell, instead of overflowing to the margins like it's doing now. I tried with \makecell but didn'...
3
votes
2
answers
786
views
How to Solve Error With Square [] Brackets on New Line in Header [duplicate]
In the table below, if I move the units in the square brackets to the next line in the header (e.g. [mg/g] on a new line), I get an error. However, if I use curved () brackets instead, there is no ...
3
votes
1
answer
334
views
how do set table body math parts in different font
How do set the table body math part only different font using XeLaTeX. My MWE is:
\documentclass[a4paper,10pt]{article}
\usepackage[margin=1in, showframe, nomarginpar]{geometry}
\...
3
votes
1
answer
342
views
How to achieve a centered header over right-aligned columns of numbers when the header is long relative to the width of the column of numbers
I have difficulties to produce a relatively wided centered header entry over a relatively narrow column of right-aligned numbers. The other way around it works fine with the makecell package as shown ...
3
votes
2
answers
99
views
Is it possible to create a command with another command, passing code as a string?
I want to loop through a list and print some text. The placement of that text is inside a table, inside a \makecell command. I could hard-code the items from the list I want, including some \\ ...
3
votes
2
answers
3k
views
rowcolor doesn't fill complete cell
So I'm trying to color the rows in my table, but in the rows where I use \makecell, the colouring doesn't work properly. Somebody knows a solution for this?
\usepackage{xcolor, colortbl} %kleurtjes ...
3
votes
1
answer
2k
views
Wrapping text with multirow [duplicate]
I'm working with a long table in and I'm having some issues with the it. I can't wrap the text in the last column, which uses multicolumn. Therefore, the text goes out of margins. Here's my code:
\...
3
votes
2
answers
885
views
progressbar with overlay text
I need to display the actual percentage value as an overlay to a progressbar. As you can see in the MWE, the only thing I get is to move it below the bar, but I want it inside the bar. Is this even ...
3
votes
2
answers
197
views
Makecell: Declare default alignment in \usepackage[]
I want to load the makecell package with a default option to make all \makecell cells left-aligned by default. What should I substitute in for OPTIONS below to make left-alignment the default behavior ...
3
votes
1
answer
576
views
How to vertically align the contents of cells in NiceTabular?
I am trying to to vertically align cells contents in NiceTabular when they get significantly different heights. However, \adjustbox and makecell do not seem to work (neither does \adjustbox and \Block)...
3
votes
1
answer
94
views
rowcolor uneffective in longtable with makecell [duplicate]
I'm trying to color the rows of a longtable with rowcolor as follow (in the MWE I have onyl included few rows of the very long table):
\documentclass[a4paper]{article}
\usepackage[fontsize=8pt]{...
3
votes
2
answers
177
views
Even vertical distribution of lines in a multiline cell
I am trying to create a figure which has two or three photos on the right and text on the left. What I want is for the text on the left to be equally spread across the height of the cell (equal to the ...
3
votes
2
answers
381
views
Using makecell in tabu: incompatibility with the packages tcolorbox and todonotes
I have a problem when using the package tabu with makecell and tcolorbox and todonotes. This is my minimal example code:
\documentclass[a4paper]{scrreprt}
\usepackage{tcolorbox}
\usepackage{todonotes}...
3
votes
1
answer
2k
views
Top & left alignment with \makecell in tabular
I'm struggling to make a specific cell (4th column) top and left aligned. Not too sure why \makecell is not co-operating but here's my latex code:
\documentclass[10pt,a4paper]{article}
\usepackage[...
3
votes
1
answer
888
views
How to change table background headers color on multiple pages by this code
change the color of the background of the header to blue, not the header font color. thank you in advance
\begin{document}
\pagestyle{plain}
\lipsum[1-5]
%\pagestyle{empty}
\begin{landscape} % ...
3
votes
1
answer
12k
views
\usepackage{makecell} is declared, but \makecell is not defined
In my preamble, I declared:
...
\usepackage{cite}
\usepackage{color}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{float}
\usepackage{array}
\usepackage{makecell}
\usepackage{multirow}
\...
2
votes
2
answers
222
views
\makecell with typeface and line break
I'm having a bit of trouble using typefaces like \textbf or \spacedlowsmallcaps in \makecells with line breaks.
The following code works:
\begin{table}
\centering
\begin{tabular}{lcc}
\...