Hot answers tagged

9

The opening and closing parentheses and the spaces after the commas in all data cells actually take up a lot of space. If you're willing to suppress them, it's entirely possible to typeset the table in a single landscape-oriented page. The following code and screenshot presents two possible solutions. The first pretty much follows the OP's code in terms of ...


7

\documentclass{article} \usepackage{caption} \usepackage{longtable} \usepackage{booktabs} \begin{document} {\small\setlength{\tabcolsep}{4pt} \begin{longtable}{lllll} \caption{Caption} \label{tab:persona}\\ \toprule \endfirsthead \caption[]{Caption -- continued from previous page}\\ \toprule \endhead \bottomrule \endfoot Variable & Cluster 0 & ...


6

Below is my attempt: \documentclass[english]{scrartcl} \usepackage{babel} \usepackage{blindtext} \usepackage{chemfig} \setchemfig{atom sep=2.25em} \usepackage{booktabs} \begin{document} \section{Structural formula} \blindtext \begin{center} \schemestart \begin{tabular*}{\textwidth}{@{}c@{\extracolsep{\fill}}c@{\extracolsep{\fill}}c@{}} \chemfig{*6(=(-OH)...


4

\documentclass[11pt,authoryear,sort&compress]{report} \usepackage{booktabs,tabularx,siunitx,lipsum} %\usepackage[showframe]{geometry} \begin{document} \lipsum[2] \begin{table}[h] \small\tabcolsep3pt\belowcaptionskip1ex \caption{The most influential countries \label{tab:Most-Cited-Countries}} \begin{tabularx}{\linewidth}{@{}rX@{} S[table-format=2]S[table-...


4

I propose this solution, based on tabularx, siunitx and threeparttable: \documentclass[11pt,authoryear,sort&compress]{report} \usepackage{booktabs,tabulary,array,tabularx} \usepackage{siunitx} \usepackage{threeparttable} \usepackage{geometry} \begin{document} \begin{table}[!hb] \footnotesize \sisetup{table-number-alignment=center} \begin{threeparttable}...


4

I would do that with makecell. I added some simplification to the code (\hspace{1em} is simply \quad). \documentclass[11pt]{article} \usepackage{bigstrut, makecell} \begin{document} \begin{center} \begin{tabular}{c|c|c} \hline \rule{0pt}{3ex} \makecell{Ratio of unit lengths\bigstrut[t] \\ $u_x : u_y : u_z$} & Tan. $ \phi $ & Tan. $ \theta $ \\[1ex] ...


3

The booktabs package is explicitly incompatible with vertical lines. I like booktabs, so here is how I would do it with that package: Remove the vertical lines. Move the "Coal Resources Summary" to the caption. Move the "Depth" column to the caption (if you wanted to keep it, using a multirow would be a much better way than all those ...


3

Here, I make two changes: I put the offending name into a stack, to break it across two lines I add two spaces ~~ to the end of each line to push the chem figure slightly leftward, allowing the extra space for the name. The MWE. \documentclass[english]{scrartcl} \usepackage{babel} \usepackage{blindtext} \usepackage{chemfig} \setchemfig{atom sep=2.25em} \...


2

after any error don't even look at the PDF except as a possible debugging aid, Tex makes no attempt at sensible output if you choose to scroll past an error, it just recovers enough to try to syntax check the rest of the document. Your code produces ! Extra }, or forgotten \endgroup. as you have \begin{description} in the first cell of the table, nut a ...


2

You could do this in your preamble: \NewDocumentEnvironment{mytable}{ m } { \begin{tcolorbox}[width=.95\linewidth] \begin{center} \refstepcounter{table} % ❶ \textbf{Table \thetable: #1}% ❷ \par } { \end{center} \end{tcolorbox} } and then in your document: \begin{mytable}{Some axioms} \begin{itemize} \item $\top \...


2

You may try the new LaTeX3 package tabularray: \documentclass{article} \usepackage{caption} \usepackage{tabularray} \begin{document} \begin{table}[ht] \caption{Overview of notation} \label{tab:notation_TC} \centering \begin{tblr}{colspec={ll},row{1}={m,1cm,font=\bfseries}} \hline[2pt] Notation & Description \\ \hline ...


2

do not use booktabs \begin{table}[htbp] \centering \caption{Add caption} \begin{tabular}{|rcc|r|r|r|} \hline & & \multicolumn{3}{l}{\textbf{Coal Resources Summary (Mt)}} & \\ \hline \multicolumn{1}{|l|}{Seam} & \multicolumn{1}{c|}{Depth(m)} & \multicolumn{1}{l|}{Thickness (m)} & \multicolumn{1}{l|}{...


2

I would employ a tabularx environment and use a modified form of the X column type for the first column, where the modification suspends full justification and enables hanging indentation. \documentclass[12pt]{article} % or some other suitable document class \usepackage{tabularx,ragged2e,booktabs} \usepackage{newtxtext,newtxmath} \newcolumntype{L}{>{\...


2

A place to start from: \documentclass[twocolumn]{article} \usepackage{booktabs} % horizontal lines, such as \toprule, \midrule and \bottomrule \usepackage{tabularx} % tabularx environment \usepackage{siunitx} % S type columns to improve alignment of numbers \usepackage{threeparttable} % tablenotes environment and \tnote commend \usepackage{makecell} % \thead ...


2

It’s easy peasy with tblr environment of the new LaTeX3 package tabularray: \documentclass[10pt]{beamer} \usetheme{Frankfurt} \usepackage[utf8x]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{tabularray} \SetTblrInner{row{odd}={blue9},row{even}={green9},row{1}={yellow9}} \begin{document} \begin{frame} \begin{tblr}{...


2

This version uses \tabularx instead of tabular*. The main difference is that all the columns will be the same width. The main advantage is that \linewidth is the available space, so one can use \parbox[t]{\linewidth}{\centering ...} to handle the names. \documentclass[english]{scrartcl} \usepackage{babel} \usepackage{blindtext} \usepackage{chemfig} \...


1

Assuming that you really need 4 columns in your table, you may also be interested in the following nicematrix-based appraoch, wich at the same time makes sure, the table is exactly as wide as the textwidth: \documentclass{scrreprt} \usepackage[showframe,margin=2.5cm]{geometry} \usepackage{nicematrix} \usepackage{siunitx} \newcommand{\kmh}{\km\per\hour} \...


1

Here is a corrected version of your table: \documentclass[12pt]{report} \usepackage[a4paper, left=30mm, right=30mm, top=25mm, bottom=25mm]{geometry} \usepackage{siunitx} \usepackage{booktabs} \begin{document} \begin{table}[ht] \centering \small \renewcommand{\arraystretch}{1.4} \caption{Descriptive statistics for the daily return of the timeseries.} ...


1

\documentclass[11pt]{elsarticle} \usepackage{booktabs} \begin{document} \begin{table}[ht] \caption{Overview of notation} \label{tab:notation_TC} \centering % \small % uncomment for a smaller font size in the table \begin{tabular}{ll} \toprule \bfseries Notation & \bfseries Description\\ \midrule hey & hello\\ \bottomrule \end{tabular} \...


1

I suggest one of the following two alternative layouts, that use just 2 instead of 16 tables as well as abbreviations (similar to the ones used by Mico in their answer) \documentclass{article} \usepackage{booktabs} \usepackage{geometry} \begin{document} \begin{table} \centering \begin{tabular}{l*{8}{c}} \toprule & \multicolumn{8}{c}{...


1

You need to drastically simplify and streamline the tables just to get two tables to fit side by side. The following code gives an example of how this may be done. \documentclass{article} % or some other suitable document class \usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably \begin{document} \noindent \begin{tabular}[t]{ @{} llc @...


1

I saw your post and had exactly the same problem, just solved it for my file. I highly recommend you to create a new table environment where you can configure ONLY such table. (Because of [H] , \usepackage{float} is required) \documentclass[xcolor=table,10pt]{beamer} \usetheme{Frankfurt} \usepackage[utf8x]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} ...


1

Here are two different suggestions: \documentclass[12pt,a4paper]{report} \usepackage[detect-none]{siunitx} \sisetup{range-phrase = \text{--}} % dashes for range of numbers \newcommand{\Rnom}{\hbox{$\mathcal{R}_{\odot}$}} \newcommand{\Mnom}{\hbox{$\mathcal{M}_{\odot}$}} \usepackage{booktabs} % only used for second example \begin{document} \begin{table} ...


1

Another posibility: by use of \captionof command: \documentclass{article} \usepackage{caption} \renewcommand\thetable{\thesection.\arabic{table}} \usepackage{tcolorbox} \begin{document} \setcounter{section}{9} \section{Axioms} \begin{tcolorbox}[width=.95\linewidth] \captionsetup{font=bf} \begin{center} \captionof{table}{Some axioms} \begin{itemize} ...


1

With the description environment within the tabular, your redefinition of \item is limited to the scope of the first cell within the tabular. Beyond that, \item reverts back to its original definition and things fail. You'll have to make the assignment (\renewcommand{\item}) global for it to extend beyond the cell where it's redefined in. Another problem ...


1

Here is an alternative, that makes use of a p type column, the shift=* option of pspicture and \makegapedcells from the makecell package: \documentclass[12pt]{article} \usepackage{amsmath,amssymb} \usepackage{xcolor} \usepackage{pstricks-add} \definecolor{rouge}{rgb}{0.93,0.11,0.14} \definecolor{vert}{rgb}{0.22,0.71,0.29} \usepackage{makecell} \setcellgapes{...


1

Using the suggestion of the user @gigair in your comment with a minipage you can obtain this: \documentclass[12pt]{article} \usepackage{amsmath,amssymb} \usepackage{xcolor} \usepackage{pstricks-add} \definecolor{rouge}{rgb}{0.93,0.11,0.14} \definecolor{vert}{rgb}{0.22,0.71,0.29} \begin{document} \begin{tabular}{ | c | c | c | } \hline $\...


1

\documentclass{article} \usepackage{geometry} \usepackage{siunitx} \usepackage{booktabs} \begin{document} \begin{table} \centering \sisetup{group-separator={,}, input-open-uncertainty = , input-close-uncertainty = , table-align-text-pre = false, table-align-text-post = false, group-minimum-digits=4} %\...


1

You can specify most colors and usage of \ttfamily in the column specifications. \documentclass[12pt,a4paper]{scrartcl} \usepackage[table]{xcolor} \definecolor{mygray}{gray}{.55} \definecolor{myblue}{rgb}{0.25,0.45,0.75} \definecolor{myviolet}{rgb}{0.6,0.4,0.8} \definecolor{myred}{rgb}{.6,0,0} \definecolor{mygreen}{rgb}{.31,.47,.26} \definecolor{myorange}{...


1

One more possibilities: by use of the tabularray and siunitx packages :-): \documentclass{article} \usepackage{amsmath} \usepackage[skip=1ex]{caption} \usepackage{tabularray} \UseTblrLibrary{siunitx} \NewColumnType{C}{>{$}c<{$}} \begin{document} \begin{table} \centering \caption{Stability derivatives for chosen wing design} \label{tab:...


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