# Tag Info

1

How about: \usepackage{multirow} \begin{document} \begin{table}[h] \begin{tabular}{|l|l|l|l|l|} \hline X & xx & x & x & x \\ \hline \multirow{4}{*}{A} & x & x & x & x \\ \cline{2-5} & x & x & x & x \\ \cline{2-5} & x & x & x & x \\ ...

0

This is just a longer comment to @egreg's answer using his tabular table, rewritten as tabularx When space permits I tend to rewrite like this using tabularx. I use the X columns to add the space between columns, not for the data columns (I also recomment siunitx for that). I double the number of columns, and then adjust the space columns accordingly. Note ...

0

However, using tabularx is a simple way to have equal width columns with a prescribed total width, which may be desirable for numeric data. As for the alignment on the deimal dot, it's easy to get it here, since data have to be right-aligned, and all have the sae number of decimal digits: \documentclass{article} \usepackage[utf8]{inputenc} ...

3

You want siunitx; if you really want to spread out the table (don't, please respect your readers ;-)), use tabular*: \documentclass{article} \usepackage{siunitx} \usepackage{booktabs} \begin{document} \begin{center} \begin{tabular}{ l S[table-format=2.1] S[table-format=1.1] S[table-format=2.1] S[table-format=2.1] S[table-format=-1.1]% the ...

3

Don't use tabularx on numeric data:-) \documentclass{article} \usepackage{dcolumn} \usepackage{booktabs} \begin{document} \begin{center} \begin{tabular}{l *{6}{D..{3.1}}} \toprule & \multicolumn{2}{c}{first} & \multicolumn{2}{c}{second} & \multicolumn{2}{c}{third} \\ \multicolumn{1}{c}{data set} & \multicolumn{1}{c}{foo} & ...

2

Assuming you want to stay with the tabularx table type that was used in my answer to the posting Table rowspan and colspan, you may achieve your objective using the methods set forth in section 4.3 of the user guide of the tabularx package. The method described there works by adjusting the relative widths of the columns of type X. (Naturally, if your ...

4

One option will be to use tabulary. It provides LCRJ column types and you can control the minimum and maximum column widths be setting \tymin and \tymax like \tymin=20pt \tymax=\maxdimen These can be set using \setlength also. Code (using the linked answer): \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{multirow,tabulary} ...

2

tabularx adjusts the table width by adjusting the column width for line breaking paragraphs it rarely makes sense to use it on tabular data as here. I made your "minimal" example more minimal by removing unused packages, used tabular instead of tabularx and truncated the last entry in column 1 which was making it too wide. \documentclass{article} ...

2

Using a default tabularx with package ltablex \documentclass[a4paper]{article} \usepackage{geometry} \usepackage[tablename=TABLE,labelsep=newline,aboveskip=0pt,bf]{caption} \usepackage{booktabs} \usepackage[svgnames]{xcolor} \usepackage{ltablex} \usepackage{amsmath} \protected\def\stars#1{$^{#1}$} \newcolumntype{k}{>{\hsize=.1\hsize}S} ...

2

I would compile the long table as in independent file in landscape format, then include it in the main file, using the pdfpages package. Here is a code for landscape form \documentclass[a4paper]{article}% \usepackage{geometry}%,showframe, nomarginpar [textwidth = 15.75cm, textheight = 25cm, marginratio={4:6,5:7}] ...

5

The X functionality in ltablex is implemented by tabularx and the multipage functionality in ltablex is implemented by longtable. ltablex just includes both packages and supplies a bit of glue so they work better together.

1

Something like this? \documentclass{article} \begin{document} {\centering% \begin{tabular}{lll} Naam & Eigenschap & Value\\ \hline TesttesttesttestTesttesttesttest & String lal ei igigieieieieieie & Lalalaallala \\ Test test test test & String & Lalalaallala \\ Test test test test & String & Lalalaallala \\ Test test test ...

3

You should, at a minimum, replace the header line \multicolumn{3}{r}{Average Tree Nodes} & \multicolumn{5}{r}{Average Tree Depth} \\ with & \multicolumn{2}{r}{Average Tree Nodes} & \multicolumn{2}{r}{Average Tree Depth} \\ Your tabularx environment contains five columns, and it looks like the headers should span column 2/3 and 4/5, ...

0

\usepackage{ltablex} Then your tabularx can have a pagebreak between tabular lines.

3

You have to use [t] for setting the vertical alignment; however, your tabular will be too wide. \documentclass[draft]{scrbook} \usepackage[pass,showframe]{geometry} % just to show the margins \usepackage{tabularx,calc} \usepackage[ruled,longend,german,algochapter]{algorithm2e} \usepackage{lipsum} \newenvironment{algotabularx} ...

4

\documentclass{scrbook} \usepackage{tabularx} \usepackage[ruled,longend,german,algochapter]{algorithm2e} \usepackage{lipsum} \begin{document} \begin{algorithm}[tbp] \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \LinesNumbered \caption[Description]{Description} ...

4

The \textwidth doesn't change: you have to use \linewidth when inside a list (which addmargin is); moreover you have to remember \noindent and @{} for removing the padding on the left and right. \documentclass{scrbook} \usepackage{tabularx} \usepackage{lipsum} \begin{document} \lipsum[2] \begin{addmargin}[2\parindent]{0pt} \lipsum[1] \noindent ...

3

I really wouldn't use tabularx here, as you really know all the column widths in advance, however if you do use it you can add some stretch glue to pad out the box \documentclass[a4paper,12pt]{report} \usepackage[polish]{babel} \usepackage[top=25mm,bottom=25mm,left=35mm,right=25mm]{geometry} \usepackage{tabularx} \begin{document} \begin{table}[!ht] ...

3

ltablex redefines \caption incorrectly, you should have used ltxtable :-) The simplest fix is \documentclass[a4paper,11pt,twoside]{article} %\usepackage{rotating} \usepackage{tabularx} % For paragraph cells in tables \usepackage{ltablex} % allows tabularx over multiple pages. May need to be compiled a couple of times. \usepackage{lscape} ...

0

\caption has to be outside of the tabularx environment but inside a float environment, such as \begin{table}...\end{table}. Edit: Although my answer compiles, my explanation was incorrect. See David Carlisle's answer and comment for an explanation. \documentclass[a4paper,11pt,twoside]{article} %\usepackage{rotating} \usepackage{tabularx} % For paragraph ...

0

This is my solution, based on the input from Paul Gessler in the comments: \documentclass[12pt,ngerman]{article} \usepackage[utf8]{inputenc} \usepackage{tabularx} \usepackage{booktabs} \begin{document} \begin{table}[!htb] \begin{tabularx}{\textwidth}{Xcccccccccccc} \toprule & \multicolumn{6}{c}{dropout yes/no} \\ \addlinespace & ...

2

Use columntype X for the first column: \begin{tabularx}{\textwidth}{Xccc} The X is a column of the type p. If you want to vertically center the values in the other columns you have to redefine the \tabularxcolumnn to \renewcommand\tabularxcolumn[1]{m{#1}} Code: \documentclass[12pt,ngerman]{article} \usepackage[utf8]{inputenc} \usepackage{tabularx} ...

Top 50 recent answers are included