Questions tagged [makecell]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
2answers
30 views

Reducing the line spacing for a rotated table cell

I'm trying to reduce the line spacing for the rotated table cells in order to reduce the width of the table and to make it look nicer. Also the cell "Material" looks kind of crammed. This is what it ...
2
votes
2answers
37 views

Align columns with numbers by decimal point and ratio symbol (colon :)

I want to achieve alignment by decimal number AND the colon (:) ratio symbol, similar to what is shown in the code below as opposed to what is shown in the figure. I would welcome any suggestions for ...
2
votes
1answer
34 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 ...
0
votes
1answer
31 views

Cell size with multirow and rotated content

I have the problem, that the cell size on my rotated multirow cells does not adapt its size, so that the contents fit. I tried following the solution described in Long text in rotated multirow , but ...
1
vote
1answer
25 views

How to make a sentences to become 2 line using \thead [duplicate]

I had try include \thead but not working. I want to make Class AA and Class BB go into second line. \documentclass[12pt,oneside]{book} \usepackage[showframe]{geometry} \usepackage{amsmath} \...
0
votes
1answer
37 views

vertical text problem in table

I'm making a planning for some report, and used the LaTeX table generator to change it from Excel to LaTeX. However, if I'm running the generated code, the vertical text gets split up, which I don't ...
0
votes
1answer
99 views

Can we use \makecell in Tabularx

I am not sure why I cannot use \makecell Basically, I just want to have a content centre there. Making my life very difficult. \documentclass[12pt,oneside]{book} \usepackage[showframe]{geometry} \...
1
vote
2answers
51 views

\Xcline (makecell) doesn't lign up with \vrule

I'm not sure how to fix this problem where the \Xcline from makecell doesn't lign up with the \vrule I set in my longtable(need that since the actual table might span several pages). Here is a MWE of ...
1
vote
1answer
33 views

How to align rotated table cells

I need help with aligning rotated cell text. The problem is that I don't know in advance the text that appears in the table, so I can't use something like \settowidth\rotheadsize{text}. This is what ...
3
votes
2answers
38 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 \\ ...
1
vote
1answer
39 views

How to Solve Error With Square [] Brackets on New Line in Header

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 ...
2
votes
2answers
119 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 ...
0
votes
1answer
74 views

Fix errors for a specific table

I have a table with this MWE. \documentclass[a4paper,12pt]{article} \usepackage{amsmath,amssymb} \usepackage{booktabs,makecell} \begin{document} \begin{table}[htb] \captionsetup{justification=...
0
votes
0answers
78 views

\makecell is not working in \tabular{*} s columns, in the l first column it works fine

See this please: \documentclass[11pt]{article} \usepackage[nopar]{lipsum} \setlength\parindent{0pt}% globally suppress indentation \usepackage[format=hang,labelfont=bf]{caption} \usepackage{fullpage} ...
0
votes
1answer
42 views

Undefined control sequence \mcell@MB@ when using \diaghead

When I use the \diaghead provided by makecell package, I get Undefined control sequence errors. It seems the \mcell@MB@ and \mcell@MBjot are both undefined. Following is a simplified example adapted ...
0
votes
0answers
120 views

tabu+makecell+xcolor = Improper \prevdepth

The packages tabu, makecell and xcolor seems to interact in incompatible ways: MWE: \documentclass[10pt,a4paper]{article} \usepackage{tabu} \usepackage{makecell} \usepackage[usenames,dvipsnames]{...
3
votes
2answers
63 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 ...
1
vote
1answer
120 views

makecell package and column width

To create the tables I use the makecell package. I would need the last four columns have a with a smaller width than the first: this is my attempt \documentclass{article} \usepackage[T1]{fontenc} \...
3
votes
2answers
105 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, ...
1
vote
2answers
267 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 \\ ...
1
vote
1answer
56 views

Evenly vertically spaced lines inside makecell

I have a table with a rotated header, and some makecells afterwards to fit the rotated header on one line: \documentclass{article} \usepackage{makecell} \usepackage{graphicx} \usepackage{booktabs} \...
4
votes
2answers
286 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 ...
2
votes
0answers
145 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}...
1
vote
3answers
371 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 ...
1
vote
1answer
68 views

Text not quite centred in table using makecell

See my code below and attached image showing output of the code. I'm producing a table which is just about finished, but one last thing is bothering me. The text in the cells of the column titled "...
2
votes
2answers
124 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] & \...
1
vote
1answer
57 views

alignment with makecell

Consider this example: \documentclass{report} \usepackage{makecell} \begin{document} \begin{tabular}{ll} A0 & \makecell{B01\\B02}\\ A1 & Bbbbbbb1 \end{tabular} \end{document} I use \...
0
votes
1answer
145 views

how to align cell text to center with \makecell

\begin{center} \begin{longtable}{|>{\centering}m{.2\textwidth}|m{.2\textwidth}|} \hline \makecell[{{p{.2\textwidth}}}]{this is a test test test test test test\\ a test too} & bear \\...
5
votes
2answers
48 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 ...
0
votes
1answer
53 views

set font for multiple paragraphs in makecell

I can set a common font for multiple paragraphs as for par 2 and par 3 in this example: \documentclass{report} \begin{document} par 1 { \tiny par 2\\ par 3 } par 4 \end{document} Unfortunately ...
2
votes
1answer
89 views

How to break a line inside a table cell and add text in the next column ONLY IN CERTAIN CASES?

I am quite new to LaTeX and I am making a wine menu. In some cases I need to add a price for a single glass and/or for a half-carafe... But ONLY in these cases, when such an option exists. I found ...
2
votes
1answer
349 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[...
1
vote
1answer
138 views

multirowcell in the final column of a table has vertical line partly missing

I am using the makecell and multirow packages. The only problem I can't solve is having a \multirowcell in the final column of the table leads to the right most vertical line only going part way down....
4
votes
2answers
137 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 \...
1
vote
2answers
2k views

Spacing in cell with \makecell command

I'm having a problem with deleting the extra space in the cell. I think it may have something to do with using \makecell in a \mulitcolumn. I'm trying to have empty space on the 1st line in the second ...
4
votes
1answer
337 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 ...
1
vote
1answer
1k 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 ...
3
votes
1answer
971 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} \...
1
vote
1answer
489 views

How to align cell text to left with \makecell

I am using \makecell in table text because I need to make multiple lines text inside the cell. But I can not get the third column cells to be aligned to left. My tabular only centers the last cell. ...
1
vote
1answer
985 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 ...
1
vote
1answer
91 views

Problems with makecell when using tex4ht

I'm having trouble building a document using tex4ht with makecell. Consider the following M(n)WE: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{booktabs} \usepackage{lipsum} \...
1
vote
3answers
470 views

Cell color problem

I have a problem that I can not color all the box \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{cfr-lm} % instead of the "[cyr]{...
3
votes
1answer
544 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: \...
2
votes
2answers
118 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 ...
2
votes
1answer
175 views

siunitx & makecell in tables: number alignment does not work

I want to align my numbers with siunitx, but in combination with makecell it produce several error message based on my \makecell commands. I tried to protect my makecell commands with brackets, but it ...
0
votes
1answer
667 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 ...
2
votes
1answer
4k 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: \...
3
votes
1answer
355 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} % ...
2
votes
1answer
3k 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} \...
5
votes
3answers
2k 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{...