A package providing some additional commands to enhance the quality of tables in LaTeX.

learn more… | top users | synonyms

4
votes
1answer
522 views

Table and \hlines too short or wide

Here is a MWE of what I am trying to do. \documentclass[a4paper]{article} \usepackage{tabularx,booktabs} \usepackage{color,colortbl} \begin{document} \begin{table}[htb] \centering ...
4
votes
1answer
18k views

Error using \toprule \midrule from Booktabs package [closed]

I am trying to use the package booktabs to make my tables look nicer. However, Latex gives me an error whenever I use \toprule \midrule or \bottomrule. Here is a simple example I created: ...
4
votes
1answer
1k views

Format nomencl in table style

For my thesis I wwant to format the nomencl in the same style as the rest. Simply put this means I want the nomencl to appear as follows: Symbol Quantity Unit t Time s rest ...
4
votes
2answers
2k views

Vertical spacing in tables with math

How can I force LaTeX to vertically center math in a table taking into account subscripts, superscripts, etc? It appears from the output below that LaTeX vertically centered the $JV$ and added the ...
4
votes
3answers
114 views

How to use \shortstack together with \arraystretch to achieve the same row separation?

When I use \shortstack to create newline in a table cell, the row separation is not the same as defined by the value of \arraystretch. The following MWE shows the problem: ...
4
votes
1answer
3k views

How to use \abovetopsep (to add space between a table's caption and tabular part)?

I read in the documentation of the booktabs package that \abovetopsep can be used to add some space between a table and its caption (instead of the lower-level \vspace{}). However, the exact placement ...
4
votes
1answer
221 views

Equivalent of \DTLiflastrow

With the datatool package there is a \DTLiffirstrow. I am looking for a similar command to detect the last row, \DTLiflastrow, but could not find one. I attempted to create my own but was not ...
4
votes
1answer
1k views

'longtable' and 'booktabs' not working on this example?

I am not even sure what is wrong here. I have a table I would like the caption to be at bottom, marked with (continued) from 2nd page onwards. I would like the table to break at certain places by ...
3
votes
4answers
567 views

Help with a booktabs table

I'm a relatively new user to Latex, and this is the first time I am attempting to construct a table for my thesis. I would like the table to look like this: Following some research on the internet, ...
3
votes
2answers
94 views

Modify global size of booktabs table

Here is the table I am trying to make: \documentclass{book} \usepackage{tabularx, booktabs} \usepackage{lipsum} \begin{document} \begin{table} \centering \begin{tabularx}{\textwidth}{lll} ...
3
votes
2answers
3k views

Default value for \addlinespace from booktabs

In the booktabs package documentation the command is described in the following: Occasionally we want to put an extra space between certain rows of a table; for example, before the last row, if ...
3
votes
2answers
610 views

Table layout: cells with short and long text

I've been fiddling with a table layout where some cells contain very little text while others may need multiple lines, and I can't seem to get it readable and nice-looking. MWE: ...
3
votes
2answers
2k views

how to vertically align text in multirow cell with tabularx with renewcommand?

Here I come again, Following the indications on this url I managed to get almost exactly what I want. However the problem is that the first multirow cell (with text "5 and 6") is not vertically ...
3
votes
1answer
80 views

Problems with \rowcolors and booktabs

I'vegot few tables created with few packages included booktabs where I use the command \rowcolors from the xcolor package. But in the last I notice that the colour is wider that the lines of the same ...
3
votes
2answers
170 views

Switch off booktabs for one table only

I am using the booktabs package in basically all my papers to present tables with results or descriptive statistics. However, I need to show a schematic choice in a table, and for that I need a proper ...
3
votes
2answers
110 views

Table contents are not centring properly

I'm trying to make a table however the contents of certain columns aren't centred correctly. I'm using the following in my preamble... \documentclass[11pt,a4paper,twoside, twocolumn]{article} ...
3
votes
1answer
3k views

Strange problem with `longtabu`

I would like to share with you a quite simple example LaTeX is not able to compile. I use the longtabu environment provided by tabu package. I am using commands from booktabs as recommended in the ...
3
votes
1answer
201 views

Using longtable with \cmidrule: page-breaking issues

Here's a (minimal?) working example that illustrates both the issues I am having: \documentclass{article} \usepackage{longtable,booktabs,lipsum,array} \usepackage{pgfplots} ...
3
votes
1answer
574 views

colortbl stepping on midrules in booktabs

I'm using booktabs and colortbl. I'm get a very annoying problem of the color table overlapping a horizontal rule. Maybe pixel snapping problem or something, but I can't make it go away. And I ...
3
votes
1answer
722 views

Proper centering with cmidrule and multi- row and column

The code below produces the following figure: The issue I am having is that Sample is not vertically aligned, I get proper alignment if \cmidrule(l){2-3} \cmidrule(l){4-5} is removed. How do I ...
3
votes
1answer
124 views

dcolumn italicize header for me

I am trying to use dcolumn to align the decimals for me. I am using booktabs while constructing the table. The code I have is: \documentclass{article} \usepackage{booktabs,dcolumn} ...
3
votes
2answers
120 views

Remove whitespace between columns in table

I'm trying to create a table using booktabs, but for some reason I get extra whitespace between my last two columns. \documentclass{article} \usepackage{booktabs} \begin{document} ...
3
votes
1answer
128 views

Table: rule spanning two side-by-side tables

I have a little problem for which I desperately need help. Basically I want to span a midrule (or any other type of rule) over two vertically aligned side-by-side tables. As in the MWE below, I could ...
3
votes
1answer
610 views

booktabs with custom column spacing

I'm trying to use the booktabs package, and I'm trying to make tables with "column groups" that are delimited by extra space. In the following, I am doing this using the @{} syntax in the tabular ...
3
votes
1answer
37 views

cmidrule - Why do I have to give the trim value when specifying the space between two columns?

If one uses the @-operator to tweak the space between two columns, \cmidrule needs to be supplied with the width of the trim, otherwise the rule/line looks really awful. Why is that? I'd rather not, ...
2
votes
2answers
1k views

booktabs and tiny horizontal space

In a regular table, I'm trying to remove the small horizontal space before the first column and after the last one as achieved with package booktabs with the option @{}. How can I do that? Please ...
2
votes
2answers
289 views

Table formatting

I use the following table: \documentclass[a4paper, 12pt, bibliography=totoc, index=totoc, abstracton, ...
2
votes
1answer
3k views

how to \multicolumn in booktabs?

Following is my code: \documentclass[a4paper,10pt]{article} %\documentclass[a4paper,10pt]{scrartcl} \usepackage[utf8x]{inputenc} \usepackage{booktabs} \begin{document} \begin{table}[htbp] ...
2
votes
1answer
41 views

Align numeric values from knitr command \Sexpr{} by decimal in table created with booktabs and tabularx

I am writing my thesis as dynamic document using .Rnw, knitr and R. I ran my statistical analyses in an external R-script, which I sourced into my main .Rnw-file. I also want to create some tables ...
2
votes
1answer
40 views

\arraystretch in conjunction with booktabs

I'm trying to enlarge the row-height of my booktabs-table but \arraystretch does this asymmetrically. I am slightly confused because this is an obvious problem to me and I couldn't find any solutions ...
2
votes
1answer
254 views

\cmidrule one column wide

What's the problem with a \cmidrule(lr){1}? Please consider the following MWE \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \centering \footnotesize ...
2
votes
1answer
544 views

Formatting raggedright in booktabs. Why am I getting a \noalign error?

I have a \sidewaystable that is also a \threeparttable. I'm trying to produce it using booktabs. In the shape columns there are words with more than 8 letters that TeX keeps hyphenating. The column ...
2
votes
1answer
35 views

Multi-column problem with booktabs package

I'm trying to make a simple-looking table with the booktabs package. I would like to make a multi column, followed by another cell. Right now I can't get to make the following cell, where I would like ...
2
votes
1answer
2k views

Autofit table column with booktabs

Background Using booktabs produces the top table in the following image: Both tables reside in floats, but even when outside of the float the same result is produced. The Application and Version ...
2
votes
1answer
205 views

Combining \rowcolor and \cmidrule [duplicate]

I want to shade the heading of my table. It all worked fine until I started using \cmidrule. This is my output: Is there a way to shade the white space between the first and second row? The code ...
2
votes
0answers
79 views

I have 3 errors running this code with \toprule and \midrule in a table… If include booktabs package in my preamble, I have 9 errors [closed]

\begin{table}[htbp] \centering \caption{Zeros e pesos para quadratura de Gauss-Legendre} \begin{tabular}{cccccc} \toprule \multicolumn{2}{c}{n = 5} & \multicolumn{2}{c}{n = 10} ...
2
votes
0answers
106 views

Errors using dmath for multiline equation breaking in a table with booktabs package?

I would appreciate if you can help me find a solution/way out to the following problem. I am using the booktabs package to get a nice looking table. I have a long equation in the table which I ...
1
vote
2answers
228 views

Why won't my \otoprule command work in table formatting?

Primer: I'm very new to LaTeX. I am creating a table with the following code. Here is part of the table: \usepackage{tabularx, multirow, booktabs} \begin{table}[tp] \caption{Rain garden site ...
1
vote
3answers
3k views

Booktabs and longtable - strange spaces between lines

I needed to make some horizontal table lines bold so I used booktabs package. However if I use \toprule command to make line bold I get strange outcome - there are some spaces between bold line and ...
1
vote
1answer
587 views

how to split the table heading in booktabs?

how to split the column headings? How do I get newline after some word? When I put \\, it changes the alignment badly. This is my code: \documentclass{article} \usepackage{pgfplots} ...
1
vote
1answer
89 views

Fit a table to page width

I am new to Latex and making tables using booktab. I made a table with hierarchy in the x-axis such that I have 3 columns and each column further has 3 sub-columns. But, the table fails to fit within ...
1
vote
1answer
221 views

How to embed a minted environment inside a tabular environment?

I'm using packages minted and booktabs, and would like to put a minted environment within a tabular one. However, the following does not work: \documentclass[11pt]{article} \usepackage{minted} ...
1
vote
1answer
253 views

Table without using booktabs

I would like to know how to create the following table without using the package booktabs. Is this even possible? \begin{table*}\centering \begin{tabular}{@{}rrrrcrrrcrrr@{}}\toprule & ...
1
vote
1answer
57 views

Problems for coloring tables using booktabs and xcolor

Well, recently I posted a question related here. Thanks to the solution suggested by Harish Kumar I could fix the two tables posted at first. Later I tried to apply the solution to a new third table. ...
1
vote
1answer
129 views

Table wrapper breaks when using svn-multi and booktabs

I have a bizarre problem with a customised table wrapper in conjunction with booktabs and svn-multi. The MWE below illustrates the issue. The wrapper myTable works fine if: either booktabs is not ...
1
vote
1answer
1k views

bottomrule not working in a self-made environment

I have this environment for consistent tables in my LaTeX documents: \newenvironment{defaultTable}[2] { \@float{table}[h] \noindent \tabularx{\textwidth}{#1} \specialrule{0.5pt}{10pt}{0pt} ...
1
vote
1answer
49 views

longtable multirow problem with cmidrule and nopagebreak

I'm trying to reimplement the David Carlisle solution given here for breaking long tables over certain rows (breaking in \hline commnands instead \cline ones). This solution is complemented with the ...
1
vote
2answers
99 views

Vertical text in table with no vertical lines

I want to modify this table in this way: Here is my MWE, in which I tried to achieve it with no success. \documentclass{article} \usepackage{array} % \extrarowheight macro \usepackage{graphicx} ...
1
vote
2answers
17 views

Page-breaking of long tables with tabularx and booktabs in scrreprt documentclass

within my thesis I want to have a page break within tables that are very long, and which are created with tabularx and booktabs packages. Surprisingly I could not find any applicable solution for my ...
1
vote
0answers
15 views

Beamer, booktabs, empheq, pgfplots incompatability [duplicate]

The following minimal example \documentclass{beamer} \usepackage{booktabs} \usepackage{empheq} \usepackage{pgfplots} \begin{document} \begin{frame} Test \end{frame} \end{document} gives the error ...