1

I'm typesetting a book with two flows of text.

Text 1 is regular text. Text 2 I would like it to flow through defined frames at the bottom of the page, all of the same width but of variable height.

I know how to do this with the FLOWFRAM package using static frames. I could also do it in other ways. But I do not want to manually break my text. I would like the text to flow through the frames (dynamic frames) at the bottom of the page, while another text flow on the top.

This is easy to obtain with indesign obviously. Is there a way to do it in Latex? Please see my MWE. I can make a text flow in the bottom frames, but how can I make another text flow in the top part of the page?

\documentclass[a5paper]{book}

\usepackage{lipsum} \usepackage{flowfram}

\newflowframe [1-2] {\textwidth} {7cm} {0\textwidth} {0\textheight} [Frame1]

 \newflowframe [3-5]
{\textwidth}
{3cm}
{0\textwidth}
{0\textheight}
[Frame2]


 \newflowframe [6-7]
{\textwidth}
{5cm}
{0\textwidth}
{0\textheight}
[Frame3]


\begin{document}

\lipsum{1}

\end{document}

Haim
  • 487
  • Always post your output of MWE or at least the part showing the problem. My output is correct in all the pages. – Fran Apr 18 '23 at 09:06
  • Sure the mwe is correct. It has one text flowing through a chain of frames. But the question is: how can I have, in the same pages, a second text flowing through a second chain of frames? – Haim Apr 18 '23 at 09:49
  • I see. From the manual: "The frames in a document such that the contents of the document environment flow from one frame to the next in the order that they were defined. You can redefine, for instance, the third frame to be on top (.8\textwidth, or so...) of the first page [1] to show the last part of theatext at the beginning. If you move the definition before of any other, it will start with "Lore ipsum ..." no matter of the frame name. Moreover, you can set frames with static contents (example). – Fran Apr 18 '23 at 17:15
  • I understand. But my question was how to defines 2 or 3 texts (separate tex files) and have them flow through predefined frames in a book. I know I can have static frames and define page by page the content of the frames but then I would use other easier means to obtain this, like paracol and / or minipage. I guess what I would like to do is not possible in latex? Thanks – Haim Apr 18 '23 at 17:31
  • I try to rephrase my question. Please see the updated questiona nd tell me if it is clearer. – Haim Apr 19 '23 at 22:59
  • Also: Please see the example of this book, where the two texts flow in parallel columns. https://en.wikipedia.org/wiki/Glas_(book) – Haim Apr 19 '23 at 23:10

1 Answers1

1

One solution could be have each text in a separate pdf where earch frame should be a whole page, and use the pages of that files as images mixed in the final document in any order. In the MWE, these images are framed with \fbox to show the exact dimensions of each page.

If this imagesmust be included in a regular order (A1 and B1 in page 1, A2 and B2 in page 2, etc.) with a loop you can mix even large texts with a few lines of code. The MWE show that with a reddish \lipsum[1-10] (fake dummy Latin) from a pdf of 5 pages (a6paper in landscape) is printed at five top frames and another similar pdf with a blue \kant[1-7] (non sense English text in Kantian style) is printed as bottom frames.

Depending of your exact goal, you may want also crop every each source pdf page with pdfcrop to avoid original margins and vertical top or bottom gaps. Then each page will have random heights and even different widths (The MWE show that 9th frame is clearly smaller , because all pages have been cropped). Note that using cropped images with size relatives to the text layout could produce unexpected inconsistencies of font sizes (not in this MWE, however).

MWE:

mwe

lipsum.tex source (Use it to make also kant.tex after modify the dummy text and color accordingly):

\documentclass[a6paper,landscape]{article}
\usepackage{lipsum,kantlipsum,xcolor}
\usepackage[margin=1cm]{geometry}
\pagestyle{empty}
\begin{document}
\color{red!30!black} 
\section{Lipsum}
\lipsum[1-10] %\kant[1-7]
\end{document}

lipsum-crop.pdf and kant-crop.pdf:

pdfcrop lipsum.pdf
pdfcrop kant.pdf

main document:

\documentclass{article}
\usepackage{graphicx}
\usepackage[margin=2cm]{geometry}
\usepackage{ifthen}
\begin{document}
\whiledo{\value{page}<6}{%
\fbox{\includegraphics[page=\thepage,
height=.45\textheight,width=\linewidth,keepaspectratio]{lipsum-crop.pdf}}\par
\vspace{\fill}  
\fbox{\includegraphics[page=\thepage,
height=.45\textheight,width=\linewidth,keepaspectratio]{kant-crop.pdf}}
\newpage}%
\end{document}
Fran
  • 80,769
  • This is a very ingenious solution, but basically the simple answer to my question is: No, it cannot be done with latex and flowfram; but yes, there are workarounds to obtain the same visual results... Please tell me if I misunderstood. – Haim Apr 21 '23 at 02:45
  • Yes, that is the sense of my answer. Flow frames are filled in definition order but filled page per page, without specity a source, so as far I can see is not possible make parallels text across several pages from different sources, expect mix both sources is some way and add frame break between chunks of text. – Fran Apr 21 '23 at 18:58
  • Understood. Thanks – Haim Apr 23 '23 at 01:48