1

I have some introduction text and a figure at the end of the first page. Now I want to place a framed notes box between those parts, that may go over to the next page. But I want the frame to fill the whole remaining of the page

\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{framed}
\begin{document}
\fbox{\parbox{7cm}{%
Eingangsdatum:\hfill 19.03.2018\\
Bearbeiter:\hfill\textbf{PMI}
}}

\begin{figure}[b]
\fbox{\parbox{9cm}{%
Ergebnis
}}
\end{figure}        

\begin{framed}
\textbf{Anmerkungen:}\\
%% what to do to expand the frame to the top of the figure-box?
%% or, if the notes are longer than one page, expand to the 
%% bottom of the page
\end{framed}    

\end{document}
  • not exactly. My text behind "Anmerkungen:" is processed thru latex, and may result in Text more than a page. So I have a box in the middle of page one (between "Eingangsdatum" and "Ergebnis"), and one box on the next page frameing the hole printable region. – Peter Miehle Mar 19 '18 at 11:51
  • You mean like this, no? – Troy Mar 19 '18 at 14:14
  • not exactly: the box on the last page should stretch to the bottom, leaving place for notes – Peter Miehle Mar 19 '18 at 14:52
1
\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[breakable]{tcolorbox}
\usepackage{lipsum}

\newtcolorbox{stretchbox}[1][]{
    sharp corners,
    breakable,
    height fixed for=all,
    height fill,
    colback=white,
    #1}


\begin{document}
\fbox{\parbox{7cm}{%
Eingangsdatum:\hfill 19.03.2018\\
Bearbeiter:\hfill\textbf{PMI}
}}

\begin{figure}[b]
\fbox{\parbox{9cm}{%
Ergebnis
}}
\end{figure}

\begin{stretchbox}
\textbf{Anmerkungen:}
\lipsum[20-25]
\end{stretchbox}    

\end{document}

Breaking across pages

enter image description here

Single page

enter image description here

  • height fixed for=all that was the part I have not seen even with reading three times over the height filldocumentation. Thanks a lot. – Peter Miehle Mar 19 '18 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.