New answers tagged

1

Well, you gave no MWE, so in parts I can only guess, but the main culprit here is to use the first two csv-lines in your headers for longtable and omit the first two csv-lines displaying the data. Use the following code for the \endfirsthead: \csvreader[% head=false, late after line=\\, filter equal={\thecsvinputline}{1}, ]{\jobname.csv}{}{\...


1

I identified and fixed the problem. The new version 0.4.0 (not yet on CTAN) can be found in my GitHub repository https://github.com/poldi2015/ecv. The class file ecv.cls need to be replaced.


0

The longtable package lets tables that don't fit in one page continue on the following page. The package and its documentation are at: https://ctan.org/pkg/longtable Regarding making a table fit in the width of a page, a key point is dealing with line breaks inside cells. The source code in the question has \newline instructions in columns of type c or r, ...


3

Don't guess the width and redefine the left distance: \documentclass[]{scrbook} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage[binary-units=true,locale = DE]{siunitx} \usepackage{caption} \usepackage[nonumberlist,acronym,toc,symbols,nomain]{glossaries-extra} \usepackage{showframe} % just for the example % Setup list of abbreviations \...


2

Something like this? Observe the use of \par directives to force line breaks within a given column. Do also note that the X column type permits automatic linebreaking. \documentclass{article} \usepackage{tabularx} \begin{document} \begin{table} \setlength\extrarowheight{2pt} % for a more open "look" \begin{tabularx}{\textwidth}{|c|X|} \hline \textbf{...


1

Replace the continuation caption (everything including the \multicolumn) \documentclass{report} \usepackage{longtable} %from my uni thisis sty file \usepackage[centerlast,small,sc]{caption} \begin{document} This is a specimen table, note the \texttt{caption} macro sets the table caption in smaller than the body font size. Also the main caption sets `...


0

You don't need a longtable. Instead, employ a table* environment, which takes up both columns in a two-column document, and a tabularx environment that takes up the full width of the text block. Note that table* and figure* environments are always placed at the top of a page. \documentclass[journal,10pt]{IEEEtran} \usepackage{cite,mathtools,amssymb} \...


2

With the KOMA-Script class you can use \addtokomafont{caption}{\normalsize} MWE: \documentclass[captions=tableheading]{scrreprt} \usepackage[onehalfspacing]{setspace} \usepackage{array} \usepackage{booktabs} \usepackage{longtable} \addtokomafont{caption}{\normalsize} \addtokomafont{captionlabel}{\bfseries} \usepackage{blindtext} \begin{document} \...


1

Here is my suggestion using a simple longtable in combination with the threeparttablex package for the table notes. I have also moved some repeated information from the column headers into a common header and introduced some abbreviations. In order to make the table fit to the textwidth (of a standard report with the geometry package loaded). I have also ...


1

As Zarko already mentioned in the comments, you can get rid of the undesired gap in the vertical line by removing the \\ after \hline: \documentclass{article} \usepackage{longtable} \usepackage{graphicx} \usepackage{array} \begin{document} \begin{longtable}{m{0.5\textwidth}|m{0.25\textwidth}|m{0.15\textwidth}} Thumbnail & Description & Number of ...


2

Simple: for the alignment of vertical rules, make these two tables a single one, adding a \vskip between the two rows. For the second problem, use also a \makecell for the second column. \documentclass[letter,10pt]{article} \usepackage{makecell} \renewcommand{\cellalign}{tl} \usepackage{longtable} \usepackage{fontspec} \usepackage [margin=1.5cm] {geometry} ...


4

Width of the first column The easiest way would be to use a fixed-width column as declared with p{4cm}. However, this requires: either guessing a large-enough width, accepting the fact that it is most probably larger than necessary, and hoping it will stay large enough as the document evolves; or measuring all boxes and choosing the largest width, which is ...


3

Remove the extra & in the header after {Active} Replace \bottomhead with \bottomrule late after line = \\ is not necessary here % \begin{filecontents*}{monodisperse15.csv} 20,2.825,5.967,0.0,0.0,0.0,0.0 22,2.85,15.516,0.0,0.0,0.0,0.0 24,3.126,11.748,0.0,0.0,0.0,0.0 26,3.45,3.772,0.0,0.0,0.0,0.0 28,3.544,8.243,0.0,0.0,0.0,0.0 ...


3

Another solution, using the optional argument of \multirow to adjust the vertical position of its content, and a slight modification of the itemize parameters: \documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage[pdftex]{graphicx} \usepackage{enumitem} \usepackage{pifont} \usepackage{longtable, tabularx, makecell} \usepackage{array,...


4

Here is my suggestion: I have replaced the longtable environment by xltabular that combines the features of longtable with those of tabularx. To vertically center the contents of the rotated first column, I have used a combination of a vertically centered X type column (See \renewcommand{\tabularxcolumn}[1]{m{#1}}) and the [origin=c] option of \rotatebox. I ...


4

Since the numbers in the 11 numeric columns require both alignment on the respective decimal markers and the typesetting of thousands-separators, I recommend using the S column type of the siunitx package over the D column type of the dcolumn package. A nice side-effect of using the S column type is that it suffices to enclosed objects that shouldn't be ...


2

Here is my suggestion using dcolumn to align the numbers with respect to . or ,, an abbreviation for "Shareholder" and some linebreaks in the column headers: \documentclass[10pt,a4paper]{article} \usepackage{booktabs} \usepackage[singlelinecheck=false, font={large, bf}]{caption} \usepackage{array,lscape,longtable} \usepackage[a4paper, total={6in,10in},top=...


1

I am posting the way I solved the problem. \documentclass[10pt,a4paper]{article} \usepackage{booktabs} \usepackage[singlelinecheck=false, font={large, bf}]{caption} \usepackage{array,lscape,longtable} \usepackage[a4paper, total={6in,10in},top=2cm]{geometry} \usepackage{siunitx,amsmath,dcolumn} \newcolumntype{.}[1]{D{.}{.}{2.4}} \newcolumntype{,}[1]{D{,}{,}{...


2

I would rather use the xltabular package and adopt columns' widths to their contents sizes: \documentclass[]{article} \usepackage[a4paper, margin=1in]{geometry} \usepackage{boldline, % new makecell, % new xltabular} % new \renewcommand{\theadfont}{\tiny\bfseries} \renewcommand{\theadgape}{} \usepackage{...


2

I suggest using the landscape environment, and the xltabular and threeparttablex packages. The former brings the functionalities of longtable to tabularx, the latter is an extension of threeparttable, with a slightly different syntax, which makes table notes available in longtable. I also used `siunitx for an alignment of the numbers on the decimal dot. \...


1

If your table content is only what you show in your MWE, than you not need longtable, sufficient is tabular environment. instead X column type I suggest to use the S column type defined in the siunitx package your table is to wide that can be fir in text width. I would consider to the `landcsape oriented table. This cab be obtain with: use pdflscape package ...


5

Here is a variant with some improvements in the table layout, like a spacing between groups of rows, and using the xltabularenvironment, which brings the functionalities of longtable to tabularx. I also defined a more compact ‘three stars’ symbol (\iiiast). \documentclass[11pt,a4paper]{article} \usepackage{geometry} \usepackage{mathtools} \...


7

Some off-topic refinement of your table ... With correct use of \longtable, S columns type defined in the siunitx package for numbers (and use only 9 columns, not 18 in your MWE), using your new command \sym for designating numbers in table with * (on more consistent way), added "Continue on the next page" at bottom of table parts (except the last one), ......


7

Here is my suggestion using the longtable package: \documentclass[11pt,a4paper]{article} \usepackage{booktabs} \usepackage[singlelinecheck=false, font={large, bf}]{caption} \usepackage{array,lscape,longtable} \begin{document} \begin{landscape} \setlength{\tabcolsep}{5pt} \begin{longtable}{ll*{8}{r@{}>{$}l<{$}}} \caption{The Results of ...


0

It is possible to use \caption{} within tabu, simply add \\ at the end of the line, e.g.: \documentclass{article} \usepackage{longtable} \usepackage{tabu} \begin{document} \begin{longtabu}{l} \caption{This is a caption} \\ This is some table data \\ \end{longtabu} \end{document} Any credits go to @cfr who already explained the solution within ...


Top 50 recent answers are included