6

Before I start addressing your questions, it's worth displaying the typeset table (screenshot taken from the TUGBoat article): Observe that the contents of the left-hand column are typeset using a monospaced font and and that the contents of the right-hand column are three math symbols. What is meant by >{$}c<{$} [in the definition of the 2nd column ...


5

You report that the preamble loads both the mdwtab package and the colortbl package. There appears to be an unfortunate [!] interaction between these packages that causes the lines drawn by \hline to be rendered in white and hence become invisible. As soon as you stop loading either the mdwtab package or the colortbl package, the horizontal lines reappear. ...


4

Enclose the table and the \caption-of command in a minipage- or a table-environment. I have reduced your code to an (M)WE. You may also use a table-environment, as demonstrated in example 2 below: In addition, I suggest that you use cleveref for references. You then just write \cref{<label>} instead of figure~ref{<label>} etc. to make a ...


4

The notation >{tokens}c means that every cell in that column will be preceded by tokens; similarly, c<{tokens} tells TeX to append tokens to the cell's contents. Thus >{$}c<{$} means that the contents of the cell will be surrounded by $...$, so typeset in math mode. In your example \alpha will be seen as $\alpha$ and the same for the other ...


3

tabularx really won't do anything sensible if you don't make the sizes add up. It does something and in some cases you may accept the result but any output in that case is accidental untested code paths it means if you have an X column in column 2 you shouldn't have a \multicolumn{..}{c}{...} which spans over column 2, but has no X. You can break this rule ...


3

As mentioned earlier, the error message you get informs you about the missing width of the tabularx: The correct syntax is \begin{tabularx}{>table width here<}{>column specifiers here<}. Example: \begin{tabularx}{\textwidth}{XXX}. Since you mentioned in an earlier comment you were inerested in good looking table, I have added some step-by-step ...


3

\documentclass[12pt,oneside]{book} \usepackage[]{geometry} \usepackage{amsmath} \usepackage{ragged2e} \usepackage{booktabs, makecell, multirow, tabularx, threeparttable, tabulary} \renewcommand\theadfont{\small\bfseries} % for bold in table using \small \renewcommand\theadgape{} \usepackage[svgnames, table]{xcolor} \usepackage{siunitx} %for ...


2

I want the column width to be equal the text width (because I believe it looks better?) Not at all. There are not benefits of make the table wider that it could be, but the opposite. In this case, there are nothing better than \begin{tabular}{ll} but if you insist, this could be my approach: Use tabulary instead of tabularx to set the second column widths ...


2

For me, this looks good \begin{table}[h] \abovetopsep=1ex % skip before toprule \centering \caption{Search terms and FEARS indices} \label{tab1:fears} \begin{threeparttable} \begin{tabularx}{0.75\linewidth}{% @{}>{\hsize=1.2\hsize}X >{\hsize=0.8\hsize}X@{} } \toprule ...


2

In order to see, if is a colour or thickness problem (white lines or too thin to see) do following: (as described in this line colour question) and line thickness question Load the package \usepackage{colortbl} for colour Load the package \usepackage{makecell} for thickness And write \arrayrulecolor{black}\hline and/Or \Xhline{5pt} instead of \hline For ...


2

You are missing an argument to \rowcolors \rowcolors{1}{red}{blue}


2

Your csv file has four columns, hence I guess your tabular also need four columns. Your csv contains no table head, hence the use of option no head. \documentclass[a4paper, 11pt]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[left=3cm,top=3cm,right=3cm]{geometry} \usepackage{tabularx} \usepackage{xfrac} \usepackage{float} \...


2

The first attempt here wasn't a final answer. That was impossible without knowing the definition of C in the tabularx preamble. The definition of C has been copied from this answer posted by Zarko to an earlier question. Finally, all the $ signs have been removed: \documentclass[12pt,a4paper]{report} \usepackage{mathbbol} \usepackage{physics} \usepackage{...


2

Some comments and observations: I understand your objective as follows: Have LaTeX determine the relative widths of the X-type columns of a tabularx environment automatically, in a way that minimizes the total height of the environment (the width being set ex ante to \textwidth, right?). This objective is not only ambitious (which isn't a bad thing per se, ...


2

In the case of the first table, I wouldn't use a tabularx environment as no line breaks within cells are needed; I'd use a tabular* environment instead. In the case of the second table, you're not using the tabularx environment properly as none of the columns are of type X. \documentclass[nocrop]{bioinfo} \usepackage[english]{babel} \usepackage{amsmath,...


2

Not knowing whaht the Y column type is, I replaced it with X. You can either use \raisebox{-0.5\totalheight}{…} or load the adjustbox package with option export and use \includegraphics[valign=c].` \documentclass{article} \usepackage[demo, export]{adjustbox} \usepackage{float, tabularx, booktabs, caption} \begin{document} \setcounter{table}{4} \...


1

You need to change \newcommand{\multcolhsize}[1]{\dimexpr #1\hsize + #1\tabcolsep + \tabcolsep \relax} to \newcommand{\multcolhsize}[2]{\dimexpr #1\hsize + #2\tabcolsep \relax} Then, in the \multicolumn{10}{>{\hsize=\multcolhsize{10}\centering\arraybackslash}X}{Complexity} statement, you need to change \hsize=\multcolhsize{10} to \hsize=\...


1

Here are two examples using either xltabular or longtable: \documentclass[a4paper, 11pt]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{siunitx} \usepackage[left=3cm,top=3cm,right=3cm]{geometry} \usepackage{tabularx} %\usepackage{ltablex} % removed to get rid of error message % \keepXColumns \usepackage{xltabular} % added to ...


1

Here is an example using nested desctiption and itemize lists. The layout can be further customized using the enumitem package: \documentclass{report} \usepackage{enumitem} \usepackage{lipsum} \begin{document} \setlist[itemize]{label=+.,leftmargin=*, nosep} \begin{description} \item[a term]\lipsum[3] \begin{itemize} \item[+] \lipsum[1][1] \item[+] \lipsum[1]...


1

Here is a solution which defines two new columns with compact lists. I pretty sure that it is based on a answer by Heiko Oberdiek, but I was not able to find the answer to give correct reference. One column is defined as a itemize list, one is defined as a numbered list. You can change the width of the list columns at will. If you prefer that the tabular ...


1

The following might serve as a place to start from: \documentclass[twocolumn]{article} \usepackage{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{mathrsfs} \usepackage{threeparttable} \newgeometry{vmargin={30mm}, hmargin={20mm,20mm}, columnsep={10mm}} % set the margins \usepackage{multirow} \usepackage{...


1

Change the last row of your tabular from 13 & 14 & 15 \\ \hline to % not the "&" added after "15" 13 & 14 & 15 & \\ \hline


1

For long LTR texts use \begin{latin} ... \end{latin}. Optionally, you can call relsize so your table does not invade the right margin. Here's an example: %!TEX program = xelatex \documentclass{article} \usepackage{relsize} \usepackage{xepersian} \settextfont{Noto Naskh Arabic} \setlatintextfont{Noto Naskh Arabic} \begin{document} %Copied from https://...


1

\thead{{\textbf{Statistic 1\textsuperscript{st}}}}


1

You can play with the options in square brackets to get desired result of spacing etc [label={}, wide = 0pt, leftmargin = *, nosep, itemsep = 0pt, before = \vspace*{\baselineskip}, after =\vspace*{\baselineskip} ] -- the label={} eliminates label 1,2 --- and so on \documentclass{article} \usepackage{multirow} \usepackage[shortlabels]{enumitem} \...


1

You have two problems: If you receive error as you stated in your question title, means that you not load the tabularx package. If you leaded the tabularx package, than question title is misleading. Please, consider to change it accordingly. Error, showed in question is clearly reported: \heading is not defined. This means, that you need to define it ...


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