# Tag Info

2

You need to make TeX think it is starting a new word after these breaks so that allows hyphenation of the following part. \hspace{0pt} will accomplish such a break. It is best to collect your code for this in to custom commands for the behaviour you wish to allow at the given punctuation mark: \documentclass[a4paper,leqno,twoside]{article} ...

4

You can use adjustbox package with export option so that the keys are available inside the \includegraphics command. \usepackage[export]{adjustbox} and then use valign=c \includegraphics[keepaspectratio,width=\linewidth,valign=c]{example-image-a.jpg} Code: \documentclass{article} \usepackage{graphicx} \usepackage{longtable,amsmath,tabularx} ...

4

You can use $\vcenter{...}$: \documentclass{article} \usepackage{graphicx} \usepackage{longtable,amsmath,tabularx} \begin{document} \begin{longtable}{m{0.2\linewidth} m{0.7\linewidth}} \hline $\vcenter{\includegraphics[keepaspectratio,width=\linewidth]{example-image-a.jpg}}$ & \$\!\begin{aligned} A &= b\cdot{}h\\ P &= 2(b+h)\\ ...

0

To my utter surprise, I actually managed to patch the code for the ltabulary environment to add support for the \caption command. The patched code is taken from the ltxtable package with very minor changes and comprises a whooping 3 lines. The below code solves all problems in one go, as suggested in the first problem in the question. Replace the ...

0

Well I read your MWE code and the first two lines repeated once, I erased from the MWE, later I copied the code and compile on my machine without errors. The first time only the second table gives an error showing the footnote in very narrow column. But the second time all look good. I fear the errors your reported come from those duplicated lines in your ...

1

\documentclass[a4paper]{tufte-book} \usepackage{booktabs} \usepackage{tabularx} \usepackage{longtable} \usepackage{lscape} \usepackage{colortbl} \begin{document} \begin{landscape} \advance\vsize6cm \csname @colroom\endcsname=\vsize \textheight=\vsize \csname @colht\endcsname=\vsize \small ...

1

Could have also done \begin{landscape} \begin{sidewaystable} INSERT TABLE \end{sidewaystable} \end{landscape}

1

You can use the S column type, from the siunitx package to have automatic formatting of number. Here is a code: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{array, longtable} \usepackage{booktabs} \usepackage[table-format = 1.2,table-number-alignment = center, ...

4

Instead of reducing font size, choose proper column widths such that each column can accomodate the widest content (if not, allows wrapping) with the total width of all columns not exceeding \textwidth. \begin{longtable}{C{\dimexpr0.12\textwidth-2\tabcolsep\relax} *2{C{\dimexpr0.19\textwidth-2\tabcolsep\relax}} ...

2

You can use threeparttablex. Here is an attempt. \documentclass{article} \usepackage{threeparttable} \usepackage{booktabs} \usepackage{dcolumn} \usepackage{longtable} \usepackage{threeparttablex} \usepackage{pdflscape} \newcolumntype{d}[1]{D{.}{.}{#1}} \newcommand\mc[1]{\multicolumn{1}{c}{#1}} \begin{document} \begin{landscape} \setlength\tabcolsep{0.1pt} ...

0

You can also have a look at the hyphenat package which redefines the underscore \_ so that hyphenation can automatically occur. This adds a hyphen at the end of the line. This has the advantage that you don't have to manually add \- in every word with an underscore. \documentclass[a4paper]{article} \usepackage{hyphenat} \begin{document} ...

0

You can add some potential breaking points to the long word by adding \- (if you want a hyphen when breaking} or \allowbreak (if you don't). Examples \fbox{\parbox[b]{5cm}{AAA\_BB\_CCC\_D\_EEE\-EEE\_FFF\_GGGGG\_HHHHHH}} \fbox{\parbox[b]{5cm}{AAA\_BB\_CCC\_D\_EEEEEE\allowbreak \_FFF\_GGGGG\_HHHHHH}} resulting in more information at this related ...

2

You have to move your \label{mytbl} just after the caption like \caption{My caption}\label{mytbl}\\ \toprule You can put the Continued on next page in the same way you do with a long table: \caption{My caption}\label{mytbl}\\ \toprule & \multicolumn{2}{c}{Grp 1} & \multicolumn{2}{c}{Grp 2} & \\ & ...

2

\label should never be before \caption and in particular a \caption in a longtable has to be the complete row, so it is best to put \label in the caption argument.

3

\vfill instructs TeX to insert vertical space as necessary to, well, fill when appropriate. What this means depends on the context but, in this case, you are telling TeX that if it needs to, it is perfectly fine to put such space before and after the table, effectively pushing the first page of the table to the bottom and the final page to the top. If you ...

2

\begin{longtable}[r]{|lr|} Use the optional argument.

3

you can color the tabular with the \rowcolors macro: \documentclass[12pt,a4paper]{article} \usepackage{longtable} \setlength{\LTpre}{0pt} \setlength{\LTpost}{-6pt} \usepackage{array} \usepackage[UKenglish]{babel} \usepackage{geometry} \usepackage{booktabs} \usepackage{array} \usepackage{lscape} \usepackage{siunitx} \usepackage{parskip} ...

3

Perhaps this is, what the OP requests, but I could not test any feature, since the example by the OP is fragmented. I changed to tcolorbox with no rounded corners and switched off the box rules. In order to demonstrate the colorbox at all, I used a yellow background colour. \documentclass[12pt,a4paper]{article} \usepackage{longtable} \setlength{\LTpre}{0pt} ...

3

To reiterate my comment as an answer, the final table is indented as a paragraph, and can be remedied by placing a \noindent prior to the final tabular block. Excerpt: % SMALL TABLE \noindent\begin{tabular}{ | r @{\hspace{0.1cm}} l } * & Indicate statistical significance at the 5\% level. \\ ** & Indicate statistical significance at the 1\% ...

4

How about ps. I do not think it is a good idea to post such a long url in the document. Use a small name and use that for the link. But if this is what you want: \documentclass[10pt,letterpaper]{article} \usepackage{hyperref} \usepackage{longtable} ...

2

You need p{5cm} the same as in tabular to specify a cell that works like \parbox. 6cm and the default inter-column space made a table wider than the page, so I reduced both. Also don't put longtable in a center environment. If you edit a longtable (including changing c to p) it can take a few runs for all parts of the table to line up, which may account for ...

3

You can put your headline and description inside a separate tabular inside the same row of longtable. You can even make a macro for it like: \newcommand{\benchmark}[2]{% \begin{tabular}{@{}p{\linewidth}@{}} #1 \\ \midrule #2 \end{tabular}% } The full code: \documentclass{article} \usepackage{longtable,booktabs} \usepackage[textheight=3cm]{geometry} ...

Top 50 recent answers are included