Tag Info

Hot answers tagged

12

The following solution sets up an environment blocktable derived from longtable that provides the desired functionality using LaTeX only. Implementation notes First, a few counters are needed: \newcounter{@tabrow} \newcounter{@emptyrow} \newcounter{@modulus} \newcounter{@default@blocksize} @tabrow will be incremented every row to determine the current ...


4

Here is a version that keeps the dynamic X columns using ltablex. Don't use tabu as there is no further support for the package. \documentclass[12pt,a4paper,BCOR5mm]{scrbook} %Tabellen & Listen \usepackage{booktabs} \usepackage{multirow} \usepackage{ltablex} \usepackage{rotating} \usepackage{colortbl} \usepackage{ragged2e} %% to allow hyphenation with ...


3

No idea why tabu doesn't shrink that column, but this makes your table fit: \begin{longtabu}{>{\small}p{1.6cm}*{22}{WG}W}


2

You can calculate the widths, taking account of the rules and column padding and then choosing the proportion of the remaining width to allocate to each column: \documentclass{article} \usepackage{lipsum} \usepackage{xcolor} \usepackage{colortbl} \usepackage{longtable} \usepackage{luatextra} \defaultfontfeatures{Ligatures=TeX} \textwidth = 400pt ...


2

Attention: This is not really meant as code usable in a real document as I didn't test it a lot. But I was curious if one can exchange the longtable headers in the middle of a table and this is the result. The header of a longtable is stored in a box (\LT@head) and when a longtable chunk is output at the top of the page this box is added. The box is ...


2

As pointed out by other members in the comments, you have set a width that is greater than \textwidth, in this case tabularx can be used to benefit from the total available width by setting the first column as p{2cm} and the rest of the width goes to the second column. \noindent was also necessary for tabularx. For the longtable you can set the same, but, ...


1

Per the query you left on @Kiraa's answer, here's a solution that modifies the macro \LT@makecaption of the longtable package directly. The solution uses the \patchcmd macro of the etoolbox package to perform the required surgery on the \LT@makecaption macro. \documentclass{article} \usepackage{longtable} \usepackage{etoolbox} \makeatletter ...


1

You can use two longtables, but arrange that they share the same column widths: \documentclass[a4paper]{scrartcl} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[latin1]{inputenc} \usepackage{booktabs} \usepackage{longtable} \begin{document} \begingroup \makeatletter \ifx\LT@ii\@undefined\else \def\LT@entry#1#2{\noexpand\LT@entry{-#1}{#2}} ...


1

I would not advice to get out of the margins if not absolutely necessary. This looks inconsistent and therefore typographically ugly (I am exaggerating). Just reduce each column by the width of its two separators on both sides and you are good to go. I have enlarged the width so that you can use the maximum available. If you reduce a bit, the [c] will do the ...


1

\documentclass{article} \usepackage{ltablex,array} \usepackage[textheight=1in]{geometry} \usepackage{showframe} \begin{document} \newcolumntype{L}{>{\raggedright\arraybackslash}X} \begin{tabularx}{\textwidth}{*{6}{L}} & Homer J. Simpson & Marge Simpson & Bart Simpson & Lisa Simpson & Maggie Simpson \\ \hline \endhead Age ...


1

In this case I wouldn't worry about it too much even though TeX is telling you the badness is 10000 (infinitely bad) it is essentially spurious just booktabs rules not fully playing with longtable, it isn't affecting the output. But don't put longtable in a center environment, it has no effect on the horizontal alignment, just adds spurious vertical space ...


1

You can hide some columns on one page and other on the other page: \documentclass{book} \usepackage{array} \newcolumntype{H}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{}} \begin{document} \begin{table}\centering \caption{Table part 1} \newcolumntype{\somecolumns}{llllllHHHHH} \begin{tabular}{\somecolumns} & 1 & 2 & 3 & 4 & 5 & 6 ...


1

I took your code and added several identical rows in order to make the longtable split across pages. The output I get at the start of the second page when I run pdflatex from TeX Live versions 2015 and 2014 is If I run pdflatex from TeX Live version 2013, I get In TeX Live 2014 (and 2015) I have Package: bigfoot 2014/10/23 2.0 makes footnotes work ...



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