0

I use xltabular to to write my abstract in a one-column table. The actual abstract is in the third row. Since the abstract is longer than one page, a page break is necessary. Xltabular insert a pagebreak only after a newline \\ command (in my MWE after one blindtext). Is there a way to make the text of the third row automatically pagbreak like a normal paragraph at the bottom of the page? Thanks in advance!

Page break at end of paragraph

MWE:

\documentclass[
a4paper,
10pt,
]{scrreprt}

\usepackage{geometry}
\usepackage{setspace}
\usepackage{setspace}
\usepackage{xltabular}
\usepackage{blindtext}

\geometry{
    landscape=false,
    left=30mm,
    right=25mm,
    top=25mm,
    bottom=25mm,
}

\spacing{1.5}

\begin{document}
    
\chapter{Abstract}

\setlength\tabcolsep{0pt}
\begin{xltabular}{\textwidth}{| X |}
    \hline
    First row: some information.\\
    \hline
    Second row: some more information.\\
    \hline
    Abstract begins in third row.\\
    \blindtext\\
    \blindtext\\
    \blindtext\\
    \blindtext\\
    End of abstract.\\
    \hline
    Fourth row: some information. \\
    \hline
\end{xltabular}
    
\end{document}

Edit:

This is how it looks in Word. I just inserted empty lines in the abstract cell.

How it should look

Edit 2:

\documentclass[
a4paper,
10pt,
]{scrreprt}

\usepackage{geometry}
\usepackage{setspace}
\usepackage{setspace}
\usepackage{xltabular}
\usepackage{framed}
\usepackage{blindtext}

\geometry{
    landscape=false,
    left=30mm,
    right=25mm,
    top=25mm,
    bottom=25mm,
}

\spacing{1.5}
\setlength{\parindent}{0pt}

\begin{document}
    
\chapter{Abstract}

\begin{xltabular}{\textwidth}{| X |}
    \hline
    First row: some information.\\
    \hline
    Second row: some more information.\\
    \hline
    Abstract begins in third row.\\
    \blindtext\\
    \blindtext\\
    \blindtext\\
    \blindtext\\
    End of abstract.\\
    \hline
    Fourth row: some information. \\
    \hline
\end{xltabular}

\clearpage

\begin{framed}
    First row: some information.
\end{framed}
\begin{framed}
    Second row: some more information.  
\end{framed}
\begin{oframed}
    Abstract begins in third row.\\
    \blindtext\\
    \blindtext\\
    \blindtext\\
    \blindtext\\
    End of abstract.
\end{oframed}
\begin{framed}
    Fourth row: some information.
\end{framed}
    
\end{document}
6
  • only ny breaking the text by hand and finishing the paragraph early ending the table row and then re-starting Sep 8, 2021 at 18:32
  • but really a 1-column table isn't doing anything useful (if that is your real case) I would set this with the text at the top level so it breaks easily. Sep 8, 2021 at 18:33
  • So you mean writting just the text and draw frames around? Sep 8, 2021 at 18:36
  • 1
    The simple framed package can break across pages.
    – Bernard
    Sep 8, 2021 at 18:52
  • 1
    Also tcolorbox can easily create boxes that break across pages...
    – Rmano
    Sep 8, 2021 at 18:56

2 Answers 2

1

Just some extension of interesting @Bernard answer (+1):

\documentclass{article}
\usepackage{ebgaramond}
\usepackage{framed} 
\newcommand\Rule{\hspace*{-9pt}\rule[0.5ex]{\dimexpr\linewidth+18pt}{0.2pt}\par}

\title{The Seven Families of Lake Pipple-Popple}
\author{Edward Lear}

%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}% For dummy text. Don't use in a real document

\begin{document}
\pagestyle{plain}
\maketitle

\textbf{ABSTRACT}
\begin{oframed}
    \lipsum[1]
\Rule
    \lipsum[1]
\Rule
    \lipsum[1]
\Rule
    \lipsum[1]
\Rule
    \lipsum[1][1]
\end{oframed}
    \end{document}

enter image description here

(red lines indicate page layout)

1
  • Thanks for the hint! I got some nice results with \setlength{\FrameSep}{\tabcolsep} \newcommand{\FramedRule}{\vspace*{-0.5\baselineskip}\newline\hspace*{-\tabcolsep}\rule[0pt]{\textwidth+2\tabcolsep}{0.4pt}\vspace*{-0.5\topsep}\newline} Oct 18, 2021 at 18:52
1

Here is how to do it with oframed:

    \documentclass{article}
    \pagestyle{plain}
    \usepackage{ebgaramond} 
    \usepackage{framed} %
    %\usepackage[showframe]{geometry} 
    \title{The Seven Families of Lake Pipple-Popple}
    \author{Edward Lear}
     \usepackage{lipsum}

    \begin{document}
    \maketitle
    \begin{oframed}
    \begin{abstract}
        \lipsum
    \end{abstract}
    \end{oframed}

    \end{document} 

enter image description here enter image description here

11
  • This is just one "row". But I need 4 rows. Further, it seems like framed insert a horizontal line befor the pagebreak. Sep 8, 2021 at 19:34
  • Yes, the contents of the environment has a frame on each page. Note there also exists a shaded environment.
    – Bernard
    Sep 8, 2021 at 19:52
  • I think the oframe environment fixes this, but I couldn't figure out how to combine frame to get a the table-like layout. Sep 8, 2021 at 19:54
  • I'll have a look tomorrow (iit's getting late here) at the details of this environment, which I happened to use long ago.
    – Bernard
    Sep 8, 2021 at 19:58
  • Thanks! I've added a template from Word. Maybe it'll help. Sep 8, 2021 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .