I would "create" a feature (like indesign do). I mean: I have a box A on page 1 and a box B (or page). I copy some text, I put it on box A, but the text is much more that the A box text can contain. I would that the Remaining of text goes to box B on page 2 (or 3 or 4 etc). It's difficult to explain, do someone has a god answer) I mean, can I connect two text box?
1 Answers
You can use the flowfram package to define complex page layouts where text can flow to arbitrary positions of a page and size. The only limitation is that the width of the text cannot change in the middle of a paragraph, so if you have frames of different widths, it is up to you to ensure that paragraphs that begin in a frame do not end in another, or place manually a \framebreak where the paragraph must jump to a new frame of different width.
You can define the layout with \newflowframe with four mandatory arguments: width, height, X and Y position. The frames are filled in the order that they are defined, in each page. For example, this will make pages where text appears in two blocks of 10×5cm but first at the bottom and then above, and the same in every page:
\newflowframe{10cm}{5cm}{0pt}{0pt}
\newflowframe{10cm}{5cm}{0pt}{200pt}
You can limit the frames to selected pages with an optional argument:
\newflowframe[1-4]{10cm}{5cm}{0pt}{0pt}
\newflowframe[2,4]{10cm}{5cm}{0pt}{200pt}
In this way, pages 1-4 will have only one bottom frame (page 2 and 3) or two frames (page 1 and 4) and from page 5 onwards, the normal text layout.
You can add also labels to frame definitions, to avoid getting lost in complex designs:
\newflowframe[1-4]{10cm}{5cm}{0pt}{0pt}[bottomframe]
\newflowframe[2,4]{10cm}{5cm}{0pt}{200pt}[middleframe]
A working example with small enumerated sections to easily check the flow of the text:
\documentclass{article}
\usepackage{flowfram}
\usepackage{lipsum} % dummy text
\newflowframe[1-3]{10cm}{3cm}{0cm}{0cm}[box1]
\newflowframe[1,3]{7cm}{3cm}{3cm}{19cm}[box2]
\newflowframe[1,2]{10cm}{3cm}{-3cm}{10cm}[box3]
\begin{document}
\section{foo} \lipsum[2][1-3]
\section{foo} \lipsum[2][1-3]
\section{foo} \lipsum[2][1-3]
\section{foo} \lipsum[2][1-3]
\section{foo} \lipsum[2][1-3]
\section{foo} \lipsum[2][1-3]
\section{foo} \lipsum[2][1-3]\framebreak
\section{foo} \lipsum[2][1-3]
\section{foo} \lipsum[2][1-3]
\end{document}
This allow a unique flow of main text filling each flow frame defined in ascending order of defined frames for that page, so you can main text somewhere in page 1 that continue somewhere in page 2 but not in page 4, because this mean mean have two flows of text.
However, you can use together with static frames, where the text cannot flow automatically but using \continueonframe[Optional text]{label}. The next MWE place first dummy English text in top boxes of pages 1,4 and 7, while the rest is filled with the dummy latin text).
\documentclass{article}
\usepackage{flowfram}
\usepackage{lipsum} % dummy text
\usepackage{kantlipsum} % dummy text
\newstaticframe*[1]{\textwidth}{.35\textheight}{0pt}{.65\textheight}[stat1]
\newstaticframe*[3]{\textwidth}{.35\textheight}{0pt}{.65\textheight}[stat2]
\newstaticframe*[7]{\textwidth}{.35\textheight}{0pt}{.65\textheight}[stat3]
\newflowframe[1,3,7]{\textwidth}{.6\textheight}{0pt}{0pt}[mainplushole]
\newflowframe[2,4-6,8-50]{\textwidth}{\textheight}{0pt}{0pt}[main]
\begin{document}
% Special text
\begin{staticcontents*}{stat1}
\section*{Kant lipsum}
\kant[1]
\continueonframe[Continue in page 3 for whatever reason]{stat2}
\kant[2]
\continueonframe[Continue in page 7 for fun]{stat3}
\kant[3]
\end{staticcontents*}
% Main text
\section{Latin Lore Ipsum}
\lipsum[1-50]
\end{document}
- 80,769
-
ok, I've understand the way you create box, but how can you set a specific text to a specific box? I mean: How can I insert some text in a box in page 1 that will continue in other specific box in page 2 (or 3 or 4...)? In this example, you create the box (1,2 and 3) but how can I assign a specific text to a specific box? – RenatoP Mar 05 '24 at 12:26
-
@RenatoP You can only have one automatic flow text for main text in order of definition for each page. For specific text in scattered pages you need also static frames and explicitly set the jumps with
\continueonframe. See the edited answer. – Fran Mar 05 '24 at 19:35
flowfram. Example here. – Fran Mar 04 '24 at 19:25\vsplitprimitive for this case. – wipet Mar 04 '24 at 21:02