# Tag Info

1

If you are looking for space reduction, you are choosing the wrong tabular environment (booktabs is generous in terms of space). So, I suggest the following (which you should only do when there is no other choice; these are not good practices): get rid of booktabs more importantly, reshape your table by transposing. The reason behind transposing is that ...

1

Is that what you want? \documentclass[letterpaper,oneside,12pt]{book} \usepackage[letterpaper, inner=2.5 cm, outer=2.5cm, bottom=2.5cm, dvips]{geometry} \usepackage{tabularx,booktabs,makecell,multirow, caption} \usepackage{enumitem} % to control Itemization spacing \renewcommand{\tabularxcolumn}[1]{>{\raggedright\arraybackslash}m{#1}} ...

0

If you want stretching, you can't use a tabular. \documentclass{article} \newlength{\columnA} \newlength{\columnB} \newsavebox{\tempbox} \begin{document} \settowidth{\columnA}{The ABCD table should stretch to fit} \settowidth{\columnB}{Thickest} \savebox{\tempbox}{% \parbox[t]{\columnA}{\centering A relatively wide line\\ ...

1

If the table data are generated, you should be able to set up things so that the starting part of the file to input is \begin{longtable}{lrrrrrr} \caption{\thelongtablecaption}\\[\bigskipamount] \toprule {} & coef & std err & $t$ & $P>|t|$ & \multicolumn{2}{c}{[95\% Conf. Int.]} \\ \midrule \endfirsthead \toprule {} & coef & ...

2

You mention that the tabular data are dynamic, are regenerated occasionally, and are stored in an external file. However, the structure of the table -- the number of columns, and its header and footer material -- is constant, correct? If that's the case, be sure to write only the tabular data to the external file. As you've discovered, it's not a good idea ...

1

You have made some odd choices in your original document, which may or may not be intentional: making an unnumbered section for each conclusion, but adding the conclusions to the ToC as chapters use of the \paragraph command. Normally (and very rarely) those are used for numbered document divisions below \subsubsection. This is the reason why you have such ...

2

The error means you're not loading the multirow package, but you don't need it, for it's easier to specially treat one cell than all 13 in the header row; with makecell it's easy. The only problem is to reduce the table so it fits; I used \small and 2.2pt as \tabcolsep. \documentclass{article} \usepackage{booktabs,makecell} \begin{document} \begin{table} ...

1

I figured it out, but now all tables have border 0pt. This is no good for mixed content with multiple columns and tables. <custom-preamble> \setlength\arrayrulewidth{0pt} </custom-preamble>

0

The dotted lines are made with \dotfill. A table with tabularx could be: \documentclass{article} \usepackage{tabularx} \begin{document} \begin{tabularx}{\textwidth}{ccX@{}l} test1 & test & test \dotfill & [A] \\ test2 & test & test \dotfill & [V] \\ \end{tabularx} \end{document} To change the spacing of the dots you can ...

1

\documentclass{article} \usepackage{tabularx} \makeatletter \newcommand*{\tocdotfill}{% \leaders\hbox{% $\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$% }\hfill\kern\z@ } \makeatother \begin{document} \noindent \begin{tabularx}{\linewidth}{lXr} A & Hello world \dotfill & 1\\ B & Foobar \tocdotfill & 2\\ \end{tabularx} ...

3

Simpy use \hline instead of \toprule, \midrule, or \bootomrule. Or set the arrayrulewidth \PassOptionsToPackage{table,x11names}{xcolor}% only needed if you get an option clash \documentclass[a4paper]{article} \usepackage{xcolor} \usepackage{booktabs} \begin{document} \def\arraystretch{1.5}% vertical stretch \setlength\arrayrulewidth{1pt}% thicker ...

5

You can't use booktabs with coloured rows as it introduces some vertical spaces around horizontal rules, which will not be coloured. Instead I suggest using \boldline, a small package from the shipunov bundle, which allows for hlines with variable thickness. The syntax is\hlineB{number}(or\clineB), which will draw a horizontal line with thickness equal ...

3

For its internal purposes, bytefield changes the category code of & upon starting the environment. This change cannot affect the argument already absorbed by \bansen, so you have to do the category change beforehand: \documentclass{article} \usepackage{bytefield} \newcommand{\bansen}{% \begingroup\catcode&=10 \banseninternal} ...

0

Currently Pandoc doesn't support the tabular table environment. Someone announced in the Pandoc discussion forum about a year ago a separate Pandoc filter to achieve this: https://groups.google.com/d/msg/pandoc-discuss/RUC-tuu_qf0/h-H3RRVt1coJ

3

Just use multicolumn with the tabular environment like this: \documentclass{article} \usepackage[table]{xcolor} \begin{document} \begin{tabular}{c|c|c|c|c} \multicolumn{5}{c}{ input}\\ \multicolumn{1}{c}{state}&\multicolumn{1}{c}{a}&\multicolumn{1}{c}{b}& \multicolumn{1}{c}{c}&\multicolumn{1}{c}{\textit{P}}\\ \cline{2-4} ...

1

In case, that you not need array andcolortbl in other tables, than you can obtain beautiful table by means of (almost forgotten) package mdwtab: \documentclass{article} \usepackage{setspace} \usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry} \usepackage{caption} \usepackage{mdwtab,tabularx} \doublespacing ...

1

Font size, with the New Font Selection System, can be selected in the following way: \fontsize{size}{leading}\selectfont where size is the point size you want (say, 10pt) and leading is the leading (space between lines) you want (say, 12pt). This does, as mentioned, require scalable fonts, or at least font definition files which permit dynamic generation ...

3

You can do that with cellspace package: define a minimal vertical padding of rows, and prefix the relevant ccolumn specifier with the letter S (or C if you use siunitx): \documentclass{scrreprt} \usepackage{setspace} \usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry} \usepackage{array,tabularx} \doublespacing \usepackage{cellspace} ...

5

I suggest you drop the vertical line completely. How about something like this? \documentclass{scrreprt} \usepackage{setspace} \usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry} \usepackage{array,tabularx,booktabs} \doublespacing \begin{document} \begin{table}[htb] \centering \onehalfspacing \caption{Table of info.} ...

1


1

I found a way to achieve what I need by just adding an additional, "dummy" column. Just changing this: \begin{longtable}[h]{p{2cm}l@{\extracolsep{\fill}}} to this: \begin{longtable}[h]{p{2cm}l@{\extracolsep{\fill}}l} seems to do the trick. Example:

3

Please always post complete documents showing packages used. Don't use p columns for numeric data, you can use \multicolumn for headings which need a different format, don't use math italic for multi-letter identifiers such as mol. \documentclass{article} \usepackage{dcolumn,booktabs} \newcolumntype{d}{D..} \begin{document} \begin{tabular}{ l ...

1

Here is a solution. I took the opportunity to improve the vertical padding of cells, and defined a \nocell command to have a number of empty cells; its argument is the number of consecutive empty cells. \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{geometry} \usepackage{multirow} \usepackage{array, makecell, rotating} ...

2

A general answer would be tabularx. But for your use-case, I suggest you re-think the way your table is presented. What do you think about a solution like this: \documentclass{report} \usepackage{caption} \usepackage{booktabs,siunitx} \begin{document} In order to get the most complete view of the different methods, their computation times are printed ...

0

Try this: \documentclass{report} \usepackage{caption} \usepackage{float} \usepackage{graphicx} \begin{document} In order to get the most complete view of the different methods, their computation times are printed in the table below: \begin{table}[h] \centering \caption{Computation time for the different bootstrap methods\label{comptimes}} \footnotesize ...

Top 50 recent answers are included