3

I would ask how to split justified text between two different pages using longtabu. For now, if a single row exceed the space of the page, the entire text will be printed in the next page, leaving a big white space in the previous page.

\documentclass[a4paper, 12pt]{article}

\usepackage{longtable,tabu}

\usepackage{lipsum}

\begin{document}

\begin{longtabu}{X[2,j]X[16,j]}


A & \lipsum[1] \\

B & \lipsum[1] \\

C & \lipsum[1] \\

D & \lipsum[1] \\

\end{longtabu}


\end{document}

You could note how the text of C will be entirely printed on page 2, leaving a large white space on the bottom of page 1.

Thank you all.

qwertxyz
  • 542
  • You can't split a table cell across pages. – egreg Mar 05 '16 at 11:00
  • If your real text is anything like this, then it should be set as a list not as a table, then list items naturally break over a page. – David Carlisle Mar 05 '16 at 11:01
  • The problem with the list is that I can't obtain a fixed distance between the description and the text (i.e. a descriptor called "ABC" will generate more white space than one called "A"), and I can't manage how to obtain a proper justification like the table above – qwertxyz Mar 05 '16 at 11:08
  • @Alessio not at all. list setting is parametrised in all sorts of ways, even a standard enumerate has indentation set so that something like i) is given the same space as xii) – David Carlisle Mar 05 '16 at 11:40
  • @DavidCarlisle so please can you indicate me how to make a description list with fixed space between description and descriptor, and with descriptor justified like the table above? I'm searching but i can't find nothing that fit with my intended view. Thank you – qwertxyz Mar 05 '16 at 11:54
  • http://tex.stackexchange.com/questions/203428/align-text-at-the-bottom-of-the-table-cell/203454#203454, http://tex.stackexchange.com/questions/72701/how-to-create-columns-within-an-itemize-environment/72778#72778, http://tex.stackexchange.com/questions/126910/problem-with-longtabu-package-not-doing-pagebreak/148911#148911, http://tex.stackexchange.com/questions/135333/parameter-description-with-long-descriptions-and-long-lists-possibility-of-pa, http://tex.stackexchange.com/questions/145234/longtable-with-items/203888#203888 – David Carlisle Mar 05 '16 at 11:59

1 Answers1

1

Thanks to @davidcarlisle, who posted this link to another question https://tex.stackexchange.com/a/107391/41963, I was able to find an excellent solution to my problem, creating a custom list enviromnment as follows:

\documentclass[a4paper, 12pt]{article}

\usepackage{longtable,tabu}

\usepackage{lipsum}


\usepackage{enumitem}
\usepackage[showframe]{geometry}


\newenvironment{plist}{%
\list{}{\labelwidth0pt
\def\makelabel##1{\makebox[2cm][l]{##1}}%
\itemsep 10pt
\advance\leftmargin1.2cm
\itemindent-2cm
}}
{\endlist}

\newenvironment{plist2}{%
\list{}{\labelwidth0pt
\def\makelabel##1{\makebox[1cm][l]{##1}}%
\itemsep 10pt
\advance\leftmargin.2cm
\itemindent-1cm
}}
{\endlist}

\begin{document}

\begin{plist}

\item[a] \lipsum[27]

\item[abc] \lipsum[27]

\item[abcdef] \lipsum[27]

\begin{plist2}

\item[abc] \lipsum[30]

\item[a] \lipsum[30]

\end{plist2}

\item[abcdefghi] \lipsum[27]

\end{plist}

\end{document}

This custom list environment works even with nested sublist (by changing the parameters in the preamble) and correctly splits the justified paragraph between two pages.

page 1

page 2

qwertxyz
  • 542