Page break hints

I have a technical document with equations, graphs, and images. It is written in a chatty style: I prefer “For example in this image… [image] …the colours are saturated.” to “The example in fig.10 has saturated colours.” I know the explicit reference remains understandable no matter how the page is formatted, where my preferred version may be scrambled by an unfortunate page break. However, this seems like ‘the tail wagging the dog’ - I want the tools to support my informal style, rather than modify my style to fit the tools.

There are ways and means for grouping things together, such as frames and tables. I sometimes use them to group equations, or arrange images. But this is hard work. It also groups features into larger blocks making it harder to pour the content into different shapes for .pdf .epub, and so on. If I have missed a simple way to group an arbitrary section of the document so it is not broken by and automatic page break (unless it is longer than the page, of course), then I am a fool and you may tell me so because that would be most of what I need.

If not, let us imagine a new feature…

Suppose we could insert a page break hint instead of a page break. This would mark a good place for a page break. This might be replaced by a page break if it was the lowest hint in the current page, and in the bottom third. If I had put a hint before my example, I would know I had at least a third of a page after the hint, so my text and image would probably stay together. If I could stick a hint before a Contents 1 entry then my TOC entries for each chapter might stay together in blocks.

My ‘third of a page’ is arbitrary: this about the fraction of a page I would be willing to leave blank rather than force a page break where I would rather not have one. Or we could have a no page break hint that could be delimit the section we want to keep on the same page.

There may be other ways to do this.

NB: I asked about putting breaks in a TOC earlier today.

Reply to comments, (particularly JEDIMASTER).

I do not lay out everything with a ruler and squared paper. I think I work as ‘writer’ intends: I add a paragraph and I hope everything below shuffles down. Most of the time this is fine, but sometimes I get surprises. I feel the right solution must be to fix the problem as you see it now, with page layout hints that should not give problems when everything moves again. If I really knew this is the last pass, I can force page breaks, but when do we ever know we are finished?

The same idea came to my mind when I answer your question about TOC. It would indeed solve elegantly the TOC issue.

For images and other “inserts”, I play with frames which I anchor To paragraph usually, but sometimes in long paragraphs it is aesthetically preferable to anchor To character. I get part of your requirement checking the Keep inside text boundaries attribute. Achieving “good” automatic frame/image positioning requires mastering all options in frames styles. Note also that attribute properties seomehow interact with each other (in other words, attributes are not totally orthogonal).

I understand you prefer to anchor As character where the image/frame follows text flow with the inconvenient it relies on standard text layout, i.e. takes all lines individually instead of considering user-defined “groups” or “blocks”.

To see if there is a present solution requires more info on your doc.

Please remember that Writer is a word processor. If you need to control Page breaks then either downlooad from Https:\www.bluegriffon.org and write everything in HTML or use a Desktop Publishing Program such as Scribus. These are the only things I can think of that might help you do it the way you seem to want to.

Thanks for the replies. I can send you (ajlittoz) the document if you want, but it is rather big and examples are sometimes hard to find. It may be easier to describe it. It is text interrupted by single non-text items such as pictures, graphs, or equations. I never flow text around these items, or use more than one column, so the layout is essentially one-dimensional. Some of these non-text items use tables or frames (probably all tables, as I am familiar with them). My aim is to get something that will be readable and in the same order if you turn pages, or scroll up on a phone. I expect this will exist as a bound book, a .pdf, and an .epub (maybe).

My general purpose is similar to yours. I am presently writing a book where i’m faced with the same issues.

Contact me on ajlittoz (at) users (dot) sourceforge (dot) net

Don’t attach your file yet. We need a first mail exchange so that you get my real email address.

If I understand your wish correctly, then there is no need in any page break hint or whatever. Just (create if necessary and) finetune your paragraph styles. Something like setting style parameters as follows: spacing below paragraph = ⅓ of the page size, do not add space between paragraphs of the same style = on, do not split paragraphs = on.

@gabix: good suggestion to handle the area put aside for frames (picture or whatever) but how do you keep some spacing between identically-styles paragraph, like 1 line ou 0.5cm. And how do you prevent the spacing to be effectively used when you transition to another style like Heading n? Handling that through direct formatting is not an improvement over current OP’s method.

This is not criticism, I’m also interested in some smart solution.

Ajlittoz, my impression is that the layout the OP wants implies that paragraphs formatted with Heading n should start from a new page. Again, if I understand the OP correctly.

@gabix: sounds common for Heading 1, but what happens if you “sub-structure” with Heading 2 (which would be my case)? I can’t see how to cope with both. That’s why I’m eager to have a look on OP’s layout to see if there are peculiarities I could manage with frame parameters.

@gabix: I use a few global rules such as ‘start each chapter on a new page’. Do I start each chapter section on a new page? This depends on how the contents pack into pages; but also on hard to measure things such as whether the next section flows from the previous one, or starts a new topic. Usually the automatic layout works fine, but there are occasional places where I want to (say) nudge a page break a bit without breaking the layout elsewhere. The bigger the document, the bigger the risk of side-effects with global layout rules.

Dang. I hope this makes sense. I have re-written this several times, and it still isn’t as clear as I would like.

what happens if you “sub-structure” with Heading 2 (which would be my case)? I can’t see how to cope with both

I still believe this can be handled with styles. For example, alongside with Heading 1 (Heading 2 etc.) that starts with a new page, you create create a derivative style, say, Heading 1 modified (Heading 2 modified etc.) that does not start a new page, but has a big spacing before. Assign equal level and juggle them as necessary.

Again, while Richard Kirk’s description is quite detailed and seems clear to me, I may be missing something. Unless a sample file is shared, it is only guesswork.

The bigger the document, the bigger the risk of side-effects with global layout rules.

Not sure what you mean under global layout rules, but the bigger is the document, the greater is the need for a set of well-defined styles.

@gabix: though your solution based on derived styles does the trick, I don’t like it because I have to manually change the style to fit the layout. I’d prefer some automatic way. This is where the Keep inside text boundaries frame flag comes in handy. I had frames (attached to paragraph) where the anchoring paragraph was too close the bottom of the sheet. Without the flag, the frame would remain with the paragraph and be clipped by page boundary. With the flag, it flows nicely on the next page and wrap properties make sure there is no overlap with subsequent text. I was quite surprised because anchor modes normally does not allow to flush a frame on a different page than the anchoring paragraph.

So wandering if same trick could solve OP’s issue.