Tag Info

New answers tagged

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 ...


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 ...


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 ...


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 ...


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}} ...


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}


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 ...


0

So basically my code now adds \typeout{width=\the\textwidth} to the tex file, runs latex in draft mode first (re-running as needed), then captures textwidth using regex on the output. It also captures the name of the .aux file and loads that. The generated aux file contains the dimensions made by longtable. Why didn't you tex experts tell me that? I ...


0

I had to edit one of my figures so that it didn't rely on the caption package and got rid of it. Everything is in working order again. Thanks!


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 ...


0

It is a matter of taste, but I like ltxtable (Longtable and tabularx merge). The usage might seem awkward, but it does a decent job when you want to set the width of a longtable to a fix value like \textwidth. \documentclass{scrartcl} \usepackage{array,longtable,ltxtable,filecontents} \usepackage[showframe]{geometry} \begin{document} ...


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 ...


0

Package hyperref needs unique anchor names. Since counters sometimes do not have unique names, it introduces a companion "counter" form as \theH<counter>. Then \the<counter> do not be to be unique, but \theH<counter> must. The example redefines \thetable, but \theHtable is not changed. After making \theHtable unique again, the error is ...


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 ...



Top 50 recent answers are included