2

I have a large chunk of text that's currently being used in my template, I want to programmatically split this over too pages.

The text is first put into a textbox onto a page and needs to be restricted to a certain size (8 lines or so). The rest of the text needs to put into a variable or something on the following page.

Not exactly sure how I can implement this since the text overflows the boxes no matter I tend to find in there.

3

Thanks werner here is my solution with a MWE (sorry for any mistakes i'm copying off a computer without internet access)

\documentclass{article}
\usepackage{blindtext}
\begin{document}
\newbox{\testbox}
\newbox{\partialbox}
\setbox\testbox=\vbox{\blindtext[3]}
\ifdim\ht\testbox>2in
     \setbox\partialbox=\vsplit\testbox to 2in
     \unvbox\partialbox
     Continued on the next page... (yes i know it's not the next page)
\else
     \unvbox\testbox
\fi


\ifvoid\testbox
    {}
\else
    \unvbox\testbox
\fi
\end{document}
|improve this answer|||||

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.