0

I want to create a whitebox with empty space (in order for people to write in it when the document in printed) but i can't find any solution to do that. I tried tcolorbox but I can't fix the height of my box when it is breakable. Other thing I tried is putting a vspace into my box but the frame does not fit the white space.

I basically need to be able to set a specific height of white space that can be separated between pages.

Do you have any clue ? Thanks.

PS : my attempt :

\begin{tcolorbox}[breakable]
    my Question is bla bla bla ?
        \vspace{25cm} % space for the answer that should be breakable between pages

\end{tcolorbox}
  • Welcome to TeX SX! Could you express the height in number of lines? – Bernard Jun 1 '16 at 14:32
  • no problem what so ever, any unit is good – KenH Jun 1 '16 at 14:38
4
\documentclass{article}

\usepackage[many]{tcolorbox}
\usepackage{pgffor}

\begin{document}
\begin{tcolorbox}[breakable]
blblbllb

\foreach\x in {1,2,...,60}
{\strut\par}

blbll
\end{tcolorbox}
\end{document}
0

Simple solution this was answered here but with mdframed. Style can be tweaked as required. Slightly edited.

\documentclass{article}

\usepackage{blindtext}
\usepackage{xcolor}

\usepackage[style=1,leftmargin=0pt,rightmargin=0pt]{mdframed}


\makeatletter

\newenvironment{boxtype1}{%
\begin{mdframed}%
[linewidth=.5,backgroundcolor=gray!20,linecolor=black,fontcolor=black]%
%\fontsize{9}{12}\sffamily\selectfont%
}{\end{mdframed}}


\makeatother

\begin{document}


\begin{boxtype1}
0000

\blindtext \blindtext

11111

\blindtext \blindtext

2222

\blindtext \blindtext

3333

\blindtext \blindtext

\end{boxtype1}

\end{document}
  • Except this type of box doesn't break between pages – KenH Jun 2 '16 at 8:26
  • You shouldn't use a number in an environment name for the same reason you can't use one in a macro name. Environments work by creating macros to begin and end them, but \boxtype1 is not valid. – cfr Jun 3 '16 at 3:13
  • noted and thanks. Very new to this world of TeX, yet started learning and answering. Thanks to this fantastic forum. – Rama Krishna Majety Jun 3 '16 at 12:13

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.