{tabularx} is a package that defines an environment tabularx, an extension of tabular which has an additional column designator, X, which creates a paragraph-like column whose width automatically expands so that the declared width of the environment is filled.

learn more… | top users | synonyms

14
votes
3answers
887 views

How do I use the ampersand (&) inside a foreach or conditional (or other group/environment) when building tables?

I am trying to build a table, and inside the tabularx environment I would like to have a loop, something like (here is a MWE): \documentclass[10pt,a4paper]{article} \usepackage{tabularx} \usepackage{...
1
vote
0answers
18 views

tabularx table formats poorly when too long

I have a long, multi-columned tabularx table in a document I'm working with. I'm finding that under certain circumstances the table's formatting breaks. My minimum working example (works with the ...
2
votes
1answer
38 views

making linegoal pay attention to equation numbering

linegoal is an incredibly useful package. Is there a way to make it take equation numbering into account? Consider the following MWE: \documentclass[leqno]{article} \usepackage{amsmath,tabularx,...
3
votes
2answers
76 views

How to place footnotes in the caption of a table?

Problem: Question title says it all, although it can be misunderstood, what I am trying to achieve is through a command (hoping for footnote) to be able to place a footnote mark anywhere in the table ...
2
votes
1answer
27 views

Items in itemize aren't on the text area

Good morning I've got this source code below. The problem is the item item in itemize isn't in the text area but it's out of the text area. I try to get $$ on every \item line but the result is the ...
2
votes
1answer
55 views

How to draw Tables

I want to draw this Table: I tried: \documentclass[book,12pt,twoside]{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{array} \begin{document} ...
0
votes
0answers
10 views

Increase the vertical height of a specific row [duplicate]

In a tabular environment, how can I use \renewcommand{\arraystretch}{3} increase the height of a specific row? For instance, making a custom height of the first row only? \renewcommand{\arraystretch}{...
1
vote
0answers
22 views

How to remove a blank page before landscape figure tabular?

I tried to insert a figure using landscape, figure and tabular. However, it has an extra blank page. What should I do to remove the extra page? Thank you so much. \documentclass[12pt]{article} \...
2
votes
1answer
106 views

Using \CorrectChoice (exam package) inside tabularx Environment

For modelling a list of questions with yes/no answers I wanted to define an environment where I can setup a question with a command: \clO for an option that's not applicable and \clX for those that ...
3
votes
2answers
42 views

Decimal Alignment in tabulary package

How to achieve Decimal alignment as well auto fit table in tabulary package, below is my code, or is there any other way to achieve both, please guide, \documentclass{article} \renewcommand{\...
6
votes
1answer
100 views

tabularx processes its body multiple times; how do I know which cycle I am in?

Assume that I enjoy setting my tables using an \itemized or list-like coding structure: \begin{mytabular}[.5\textwidth] \item head1 & head2% <-- header row \item abc & def \item ghi &...
1
vote
1answer
32 views

Automatically pick from one of N available table widths

Problem statement I am using a custom-written document class that makes excessive use of a relatively wide outer margin. To strenghten the eye's judgement for what constitutes the main text block vs. ...
3
votes
1answer
49 views

Where Did My $ Go?

Don't worry its not a problem of $ being a special character (or at least I think). For some reason the $ that is supposed to show up next to the total on the last line does not. Removing either the \...
0
votes
1answer
17 views

using multicolumn in latex table

I have the following table: I want the following: 'Short-crested' belongs to the value 1, 2, 5, 10 and 20. 'Long-crested' belongs to the value 100, 200, 500, 1000, 10000. I want them to move to ...
3
votes
1answer
21 views

Align tabularx in list: missing [t] option

With a tabular, the optional argument [t] can set the alignment to top, which is handy when putting a table inside a list item. This aligns the first line of the table with the list number. Is there ...
5
votes
3answers
15k views

Top alignment of cell content in tabularx

I would like to align the content of each cell (of the first column) to the top. The approaches presented here did not apply. Maybe it has something to do with die tabular-environment inside the ...
1
vote
1answer
19 views

Vertically align text in tabularx environment

I tried the different approaches I have found here on TexExchange. But I wasn't successful. I'm not sure whether the embedded figure leads to that behavior. I want to align the all the text centered ...
3
votes
1answer
71 views

How to make a table with equally sized columns?

I have the following table: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table}[htbp] \centering \caption{Add caption} \begin{tabular}{...
2
votes
2answers
45 views

Tabularx problem

I always used tabularx withouth any problem, but now I can't make it work anymore and I don't understand why. Could you tell me what's the problem ? \documentclass[10pt,a4paper,final,twoside]{book} \...
4
votes
2answers
90 views

How to vertically (and horizontally) center text of cells using tabularx?

My question is very similar to this one: previous question but when I vary the example a little (as below), my cells are no longer vertically aligned \documentclass[12pt]{article} \usepackage{...
0
votes
2answers
28 views

Put a frame around table notes

I created a table and I added some notes to some cells. I was wondering if it is possible to put a frame around the table notes. The frame should have the same size as the the table. At the end I ...
5
votes
2answers
65 views

Using \if in a tabularx

I am trying to use \if within a tabularx environment. This works: \documentclass{scrlttr2} \usepackage{tabularx} \begin{document} \newcounter{x} \setcounter{x}{0} \begin{tabularx}{\...
2
votes
2answers
412 views

cm - illegal unit of measure in tabular?

I wanted to created a table and I get an illegal unit of measure error, but I use cm, which works great normally.... I don't know why but sometimes I get this error and sometimes it works great... \...
4
votes
2answers
59 views

How to multirow in tabularx environment?

In my code, I was trying to assign four phrases in first column second row in line with their description... \documentclass[13pt]{book} \usepackage{tabularx,booktabs} \usepackage{multirow} \begin{...
1
vote
1answer
59 views

How to get random-steps decorated tables?

I use tikz's decoration={random steps} a lot in a document for boxes and separator lines. In the same document I have tables set as tabularx, but the cell backgrounds / lines in those tables are ...
2
votes
1answer
37 views

Text wrapping of text in multirow

I want to wrap rotated text which goes out of the lines. The line I want to fix is given below: \parbox[t]{2mm}{\multirow{3}{*}{\rotatebox[origin=c]{90}{Summary of the monthly returns for the ...
3
votes
1answer
37 views

How to center the text in tabularx

I have created a table as given below. I want to center the following part. \gmc{4}{@{}p{0.8\textwidth}@{}}{Summary of monthly cross-portfolio regressions: 25 Fama-French portfolios (constructed on 5 ...
1
vote
1answer
15 views

Addition of ltablex makes tabularx loses formatting

I created a table T, which looked great. I wanted to create another table spanning multiple pages, and hence I add a package called ltablex. Turns out that just the addition of this package makes the ...
1
vote
2answers
34 views

How to wrap long text in a cell within tabularx environment

I am facing problem with automatic text wrapping in a tabularx environment. I am facing problem with \gmc{14}{l}{Characteristic 1: Cross-sectional overlap in month-over-month regional real estate ...
2
votes
1answer
52 views

Centering in Tabularx does not work

I am trying to center columns using \newcolumntype{Y}{>{\centering\arraybackslash}X}. However, it does not work in the following example. \documentclass[11pt]{article} \usepackage{setspace} \...
2
votes
0answers
37 views

Caption outside float in tabularx

I am getting an error, while processing this latex file. Please help me. Thanks. \documentclass{article} \usepackage{tabularx} \usepackage{threeparttable} \usepackage{threeparttablex} \usepackage{...
1
vote
1answer
36 views

Latex can't find tabularx even though it's installed [closed]

Description of Problem When I use latexmk to compile a project to PDF I get the following error: ! LaTeX Error: File `tablularx.sty' not found. I am then prompted to "Enter file name". If I then ...
2
votes
2answers
48 views

Problems with the height and text alignment justification of a \multirow in a tabularx environment

I have a large table fitted to the width of the page, using the tabularx environment, that makes use of multirow. Following the example in table with tabularx and multirow, I used \multirow{n}{\hsize}...
0
votes
1answer
30 views

tabularx column text alignment color

I created a tabularx table with columns specifications. `\setlength\extrarowheight{5pt} %Augmente la taille des lignes du tableau `% \begin{tabularx}{1\linewidth}{| >{\columncolor{...
1
vote
1answer
74 views

Table formatting with tabularx

I'm trying to format the following table: \documentclass[12pt]{report} \usepackage[left=35mm, right=25mm, top=30mm, bottom=30mm]{geometry} \usepackage{tabularx} \usepackage[flushleft]{threeparttable} ...
2
votes
2answers
36 views

Alignment in table depends on length of header

When I delete the header "General variables used in the header" in the code (or any long text), the two columns overlap like this: Current output: Current code: \documentclass[12pt,twoside]{book} ...
1
vote
2answers
47 views

Table going beyond the page width

Why this table expands beyond the page? \begin{table} \caption{Class distribution in the succeeding partitions from $ A_{1} $ and $ A_{2} $} \label{table:ClassDistribution} \newcolumntype{R}{>{\...
3
votes
1answer
36 views

Figure in two-column article

I have a two-column article document in which I want to place a figure spanning both columns above two (independent) tables (using tabularx), one in each column. I've followed the answer here, but it ...
1
vote
1answer
40 views

Table Errors - Misplaced \noalign, Misplaced \omit, extra alignment tabs

I am very new to latex, and as I'm nearing the end of my first thesis, due to submission in two days I'm placing the results which have finally been extracted after several attempts over the past few ...
4
votes
2answers
83 views

How to create a table with fixed-width cells and use cellcolor and multicolumn to create time bars? Or: How to substitute ganttbar with tabular?

Failing to combine a gantt chart with a table I now try to avoid the gantt chart by just using a tabular environment. However I like to keep some neat features of the pgfgantt-package and I'm facing ...
3
votes
3answers
43 views

tabular or tabularx: how to align the first column to the top?

In the example below, I would like the star to be aligned to the very top (as much as possible). Is it possible and if yes how to do it? I'm looking for a generic solution as I could replace the ...
2
votes
1answer
45 views

text alignment with a picture horizontally

I am new to LaTeX and I am working with ShareLaTex. I started writing my Thesis for the University and I want to put some text alligned with the the top of the picture and with a space between the ...
1
vote
0answers
34 views

how to make a table span 2 pages?

i'm not an expert in Latex, Maybe the question seems straightforward for many of you. I'm trying to make a table span 2 pages . this is my code : \usepackage{tabu} \usepackage{longtable} \...
4
votes
2answers
47 views

How to merge the contents of the table cell without using multirow and multicolumn?

\documentclass{article} \usepackage{graphicx} \begin{document} \begin{table} \renewcommand{\arraystretch}{1.2} \centering \setlength\tabcolsep{0.5em} \scalebox{0.84} { \begin{tabular}{|l|l|l|} \hline ...
0
votes
0answers
28 views

how to create long table with multirows?

I'm new with latex and I'm trying to use this table which is long and divided into multiple pages. but I failed to add multirows and multicolumns to make it look like this table this is my code ...
2
votes
1answer
28 views

Table \rowcolor \multicolumn color displacement

I have the following table: \documentclass[a4paper,12pt,twoside]{book} \usepackage[utf8x]{inputenc} \usepackage[table,xcdraw]{xcolor} \usepackage{tabularx, threeparttable} \usepackage{multirow} \...
3
votes
3answers
61 views

Wrap text in tabular and itemize?

I would like to get the following effect without manually using & and \\ to wrap the text (i.e., all the text will be wrapped automatically) \documentclass[11pt,letterpaper]{article} % Make lists ...
2
votes
2answers
58 views

Math mode in table headers (tabularx)

I am editing a document, using a custom class. The author has numbers with a bar over them in a table header, e.g. $0.58\bar3$. However, when I try to compile it I get the following errors: ! Package ...
1
vote
1answer
48 views

Problem with tabularx's vertical spacing

I have a problem with the way tabularx (or is it booktabs?) is handling vertical spacing between horizontal lines and the cell content / background color. MWE: \documentclass[paper=a4,fontsize=12pt]{...
1
vote
1answer
52 views

Error while setting column width in Latex: Package array Error: Illegal pream-token (3cm): `c' used

This is my code to build a simple table. \begin{table} \small \centering \begin{tabular}{ l{3cm}|l|l|l} .... \hline \end{tabular} \end{table} But, I am getting the error Package array Error: ...