Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
14

I would rather have table with following design: Edit: In comparison with your table code I made the following changes: With use of geometry package and its default settings for pages' borders the width of text width is increased. With this a more space for table columns are available. Consequently, the text can be in a more beautiful form than in cells ...


8

I suggest you use a tabularx environment, with width set to \textwidth, ragged-right rather than full justification in all five columns, and a bespoke itemize-like environment (called mylist in the code below) that uses all available space. I also wouldn't use vertical lines to separate the columns -- they're not needed, and I wouldn't use \hline directives ...


5

Here is another possible solution, after fine tuning and tweeking. All columns are set in relation of the \columnwidth, so it will survive a change from letter to A4. The text with in the cells relate to the width of individual table column. I have set all tables in relation to each other, i.e. base width is 1/15-column width, and the other columns are 2/15 ...


4

I'll provide a solution that covers the first section of your table, and leave the remaining rows as an exercise for the reader (forgive me, teacher habits ;) ).   First, to address your column width issue. In this case, where you have a large amount of text, the tabulary package seems to fit the best. It allows shorter columns to be resized to their ...


4

Example 1 I leave it to you to fill in the correct data where I put the Xs. You should also consider to use less arraystrech, remove vertical lines and use booktabs, see my second example: \documentclass{article} \usepackage{caption} \usepackage{adjustbox} \usepackage{setspace} \usepackage[margin=1in]{geometry} \usepackage{multirow,tabularx} \renewcommand{...


4

like this? Why not use tabu package is explained in comments below your question ... Solution can be use tabularx instead of tabu and boldline for horizontal lines with adjusted thickness (instead booktabs rules, which have (white) space above/below rule): \documentclass[12pt]{article} \usepackage{boldline}% for rules, part of Shipunov bundle \usepackage{...


4

I suggest you change the setup of the tabularx structure so that all five columns are of (modified) type X; then make the first column about three times as wide as each the four data columns. See the code below for how this may be achieved. Since you're loading the booktabs package, I suggest you actually make use of it: Get rid of all vertical rules and ...


4

For example: \documentclass[a4paper]{article} \usepackage[english]{babel} \usepackage[svgnames,table]{xcolor} \usepackage{tabularx} \usepackage{ragged2e} \usepackage{enumitem} \setlist{nosep,noitemsep,topsep=0pt,leftmargin=1em} \usepackage{biblatex} \addbibresource{biblatex-examples.bib} \renewcommand\tabularxcolumn[1]{>{\RaggedRight}p{#1}} \begin{...


4

Some of your X-columns are too narrow. I converted them to c and then removed multicolumn two places as unnecessary. In addition, I added an additional empty column as a new fourth column to balance white space. Annother possibility is to remove the two empty columns and replace them with a fixed width space using !{\hspace{<wd>}}: \documentclass{...


3

You can achieve the desired result by using the table environment and the \caption command as shown in the following example: \documentclass[final,3p,times,12pt]{elsarticle} \usepackage{caption} \usepackage{booktabs} \begin{document} \begin{table} \small \setlength{\tabcolsep}{4pt} \captionsetup{font=large} \caption{Table Title} {\footnotesize This ...


3

This is just an idea: if you rotate the table, it easily fits in one text line. \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} \usepackage[most]{tcolorbox} \usepackage{tabularx} \usepackage{array} \usepackage{colortbl} \usepackage{array,multirow,tabularx} \newtcolorbox[blend into=tables]{mytable}[2][]{% enhanced, fonttitle=\...


3

You could put "For yield displacement of" in a common header for the last four columns. This way you can drastically decrease the width of thous columns: \documentclass[a4paper, 12pt]{report} \usepackage{array} \usepackage{tabularx,booktabs} \newcolumntype{Y}{>{\centering\arraybackslash}X} \usepackage{caption} \begin{document} \noindent \begin{...


3

The same question has been submitted in GitHub, see Simplest MWE to have an alternating row color #18. The proposed solution for the version v2.9 2019/01/11 of tabu comments some commands, see Figure. For further details, please check the solution provided in GitHub. I try this fix in tabu.sty (v2.9) and does what you are looking for. Maybe it will be ...


2

Here is a possibikity. Note that for commutative diagrams, you should preferably use tikz-cd in the place of amscd. Also, hyperref should be loaded as the last package, with very few exceptions, and you shouldn't load both enumerate and enumitem, to avoid any conflicts. \documentclass[a4paper, brazil, 12pt]{report} \usepackage[margin=1.5cm ]{geometry} \...


2

edit: with tabular for table environment, booktabs for horizontal rules, siunitx for align numbers at decimal points in even columns and makecell for columns' headers and with use document class of the your document. That the table is narrower than the width of the text, I reduced the \tabcolsep to 2pt in font size to \small: \documentclass[a4paper]{...


2

You're quite lucky with this table: setting the long header at zero width solves the issue. I'd avoid vertical rules altogether and use siunitx for better alignment of the figures. \documentclass{book} \usepackage[a4paper]{geometry} \usepackage[x11names]{xcolor} \usepackage{ragged2e} \usepackage{tabularx} \usepackage{booktabs} \usepackage{makecell} \...


2

You have two possibilities to fix the issue you encountered: manipulate the table counter put both panels in the same tabularx environment and manually add some vertical white space Here is an MWE for the first possibility. I have commented out the table environment and added \addtocounter{table}{-1} after the caption command. \documentclass[12pt]{...


2

Title suggests you are wanting largest possible 2rows of 3 sets x 2 tabular x 3 column like this I have included Sebasiano 's suggestion to alter 2nd Title \documentclass[a4paper]{article} \usepackage{geometry}%[landscape] would be much easier \geometry{margin=0.5in} %1.3cm needed to fit 3 times x 2tabular x 3column @small % if you change \small to \tiny ...


2

\documentclass{article} \begin{document} \begin{table}[!p] \tiny \begin{minipage}[b]{0.3\linewidth} \centering \caption{U.S. Petroleum Stocks} \label{foo} \begin{tabular}{@{\extracolsep{5pt}} ccc}\hline\hline lag & ADF & p.value \\ \hline $0$ & $$-$0.990$ & $0.702$ \\ $1$ & $$-$1.448$ & $0.541$ \\ $2$ & $$-$1.888$ & $0....


2

Here it is, with adjustbox and a local definition of the X columntype. Note that beforehand, I converted the logo to .pdf with the epspdf utility: \documentclass{article} \usepackage{multirow, tabularx} \usepackage{graphicx} \usepackage[export]{adjustbox} \begin{document} \cleardoublepage \thispagestyle{empty} \bgroup \renewcommand{\tabularxcolumn}[1]{m{#...


2

A totally different approach is to use the eminent, but little known, package cals to build the tabular. Actually, cals is more or less tailor made to build this type of tabulars, because you build the tabular cell by cell. The documentation is rudimentary and a little bit difficult to understand, but this tabular is the result of approximately two hours ...


2

Assuming that your question is not just about the partial horizontal lines but also about adding the two additional column header rows, I'd suggest the following: In the example, I have used booktabs for lines with a bit more vertical white space around them. Since the table will be too tall for a landscape page if we use these lines and add two more rows, ...


2

booktabs package for partial rules: \documentclass[final,3p,times,12pt]{elsarticle} \usepackage{lscape} \usepackage{booktabs} \begin{document} \begin{landscape} \begin{tabular}{lcccccc} \toprule & \multicolumn{6}{c}{"Dependent Variable: Log(Average Fare)"} \\ \cmidrule{2-7} & \multicolumn{3}{c}{City} & \multicolumn{3}{c}{State}\\ \cmidrule(r)...


2

With the valign option from the adjustbox package: \documentclass[paper=a5]{scrreprt} \usepackage{graphicx} \usepackage{tabularx} \usepackage[export]{adjustbox} \begin{document} \begin{tabularx}{\linewidth}{l X} Laptop & \rule{2cm}{3cm} \\ Laptop & \includegraphics[width=2cm,valign=t]{example-image} \\ \end{tabularx} \end{document}


1

I would spread the columns and their width differently: \documentclass{article} \usepackage[margin=3cm]{geometry} \usepackage{booktabs,tabularx} \begin{document} \begin{table}\centering \scriptsize \setlength\cmidrulekern{0.25em} \begin{tabularx}{\linewidth}{@{} l >{\raggedleft\hsize=1.2\hsize}X@{,}>{\raggedright\hsize=1.2\hsize}X ...


1

With geometry for smaller margins, a slightly smaller \tabcolsep and the help of an abbreviation you can get the following: \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} %\usepackage[table,svgnames]{xcolor} \usepackage[many]{tcolorbox} \tcbuselibrary{skins} \usepackage{tabularx} \usepackage{array} \usepackage{colortbl} \usepackage{...


1

No need to use tabularx: \documentclass{article} \usepackage{graphicx} \begin{document} \noindent\begin{minipage}{\textwidth} \fontfamily{phv}\selectfont % Helvetica \begin{tabular}{@{}c@{}} \includegraphics[width=1.02in]{uaqlogo} \end{tabular}\qquad \begin{tabular}{@{}l@{}} \LARGE Universidad Autónoma de Querétaro \\[0.15in] \Large Facultad de Ingeniería ...


1

I improved upon the great answer by Sveinung, these are more personal preferences. The result looks like this Whenever I have to type something twice or thrice I consider that a smell, and a good indication that part of my code (in this case LaTeX) should be extracted and simplified. Keep it DRY (Don't repeat yourself) When it comes to dealing with ...


1

Like this? It is not automatic. As you manually interrupt numbering of rows, you can do the same for \dotfill: \documentclass{memoir} \newcounter{rownum} \newcommand{\getEqNo}{\refstepcounter{rownum} \therownum.\,} \newcommand\mcl[1]{\multicolumn{1}{l}{#1}} \begin{document} \begin{tabularx}{.9\textwidth}{>{\getEqNo}r @{} X<{\...


1

\newcommand*\rot[1]{\rotatebox[origin=r]{90}{ #1 }}


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