Prevent table splitting?

Everything related to our flagship word processor.
Post Reply
brsnyder
Posts: 19
Joined: 2015-06-26 23:30:40

Prevent table splitting?

Post by brsnyder »

Is there any way to keep all table rows together on the same page? And also to keep the text above the table with the table?

Thanks -- Barbara
brsnyder
Posts: 19
Joined: 2015-06-26 23:30:40

Re: Prevent table splitting?

Post by brsnyder »

Since there haven't been any replies, is it safe to assume the answer is there is no way to do either of these things?

Thanks -- Barbara
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Prevent table splitting?

Post by adryan »

G’day, Barbara et al

The best way to keep all table rows together on the same page is to have a table consisting of a single row! (Even then, there are height constraints on the row.) With multiple rows, the only way is to reduce the row heights (eg, by reducing font size).

With respect to the isssue of keeping the text above a table with the table, position the cursor within the paragraph preceding the table. In the Paragraph Palette, check the option to “Keep with next ¶“.

By the way, there is what I consider to be a bug in the Table Palette (although it could have been a deliberate design decision); viz, alteration of the number of rows or columns is only allowed by sequential access using the stepper — not by random access to the displayed values.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
brsnyder
Posts: 19
Joined: 2015-06-26 23:30:40

Re: Prevent table splitting?

Post by brsnyder »

Well having a one-row table is not a solution, and honestly I'd barely call it a workaround. If the table rows honored the Keep With Next setting of the text in the table, that would do the trick. But I think a better solution would be to have Widow/Orphan and Keep With Next settings for the table.

What is the process for sending in a feature request?

Thanks -- Barbara
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

Re: Prevent table splitting?

Post by Þorvarður »

Barbara wrote:What is the process for sending in a feature request?
Choose "Send Feedback…" from the Help menu, and then select "Feature Request" as Feedback Type from the pop-up menu.
Is there any way to keep all table rows together on the same page?
Well, obviously that depends on the font size and how many rows you have. How many rows do you have?
brsnyder
Posts: 19
Joined: 2015-06-26 23:30:40

Re: Prevent table splitting?

Post by brsnyder »

It's just a few rows, but it happens to fall near the bottom of the page. So it splits after one or two rows. All the headings and text just above the table are Keep with Next, as are the styles in the table cells, but the setting isn't honored inside the table. I will file a feature request.

Yes I could do a section/next page break, but I don't want that, because if the text flow above that section changes, the page break wouldn't be necessary
User avatar
xiamenese
Posts: 543
Joined: 2006-12-08 00:46:44
Location: London or Exeter, UK

Re: Prevent table splitting?

Post by xiamenese »

Hi Barbara,

You have a situation that, in my perception, basically, Nisus are not going to be able to solve. NWP is page-based in its output and pages have finite dimensions, as do lines in whatever font size and interline spacing you have chosen, and paragraphs have finite dimensions including space before and after. Tables too have finite dimensions, so if the amount of text that precedes the table is taking up so much of the available space on the page that there isn't enough for the table, then either the table has to split — in the way paragraphs do — or it has to move/be moved onto the next page. Furthermore, you say that the headings and text preceding the table must remain in that position, but you don't say how much headings and text in terms of how many lines you are marking as "keep with next". And Nisus can't solve that for you as it is down to the available space on the page.

You can use a page break before the "keep with next" part, as you say, but that results in an ugly large area of white space at the bottom of the preceding page, as you are aware. The only way to keep it all on the same page is either to change the printable page area, either by printing on larger paper, or else by changing the margins and header/footer space, or changing the size of the text by changing fonts, font size and inter-line and inter-paragraph spacing.

We know nothing about what this document is, and of course you may well be having to output it within strict guidelines and none of the above is possible. It seems to me that the only answer then will be to put the table with a suitable caption in a text-box at the top of the next page, with a reference to it — "See table 1 on page X" at the end of the preceding text, and continuing at that point with whatever text is to follow the table.

I don't know if that gives you any way of finding a solution, but page space is finite and no amount of programming can change that as far as I can see.

:)

Mark
brsnyder
Posts: 19
Joined: 2015-06-26 23:30:40

Re: Prevent table splitting?

Post by brsnyder »

Thanks, Mark. What I am looking for, which I will request, is a feature similar to Framemaker in which you can (I don't remember exactly) either set a row to keep with next/previous, or set a table to not split (in which case it splits only if it is too large to fit on a single page IIRC) or set number of widow rows etc. It will also copy whatever row(s) you designate as heading rows if the table does split. These features would make using tables much more robust in Nisus.

Another kind of related feature request will be to add "Keep with previous" as a paragraph option. This is useful for the first item in a list, etc.

Thanks -- Barbara
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

Re: Prevent table splitting?

Post by Þorvarður »

>How many rows do you have?
>>It's just a few rows

Have you tried to insert the table as watermark from the Tools menu ? That gives you quite a lot of options, including size scaling.
You first create the table in an empty Nisus document. Save it as PDF. Then use that PDF as a watermark, and scale it until it fits.
User avatar
xiamenese
Posts: 543
Joined: 2006-12-08 00:46:44
Location: London or Exeter, UK

Re: Prevent table splitting?

Post by xiamenese »

brsnyder wrote:Thanks, Mark. What I am looking for, which I will request, is a feature similar to Framemaker in which you can (I don't remember exactly) either set a row to keep with next/previous, or set a table to not split (in which case it splits only if it is too large to fit on a single page IIRC) or set number of widow rows etc. It will also copy whatever row(s) you designate as heading rows if the table does split. These features would make using tables much more robust in Nisus.

Another kind of related feature request will be to add "Keep with previous" as a paragraph option. This is useful for the first item in a list, etc.

Thanks -- Barbara
I'm with you on having header rows duplicated following a split; yes, other programs do that, but I've hardly ever used tables in NWP, so wasn't aware that NWP didn't do that. As for splitting "only if it's too large to fit on a single page", you're never going to be able to put a table that would fill a page on a page where some of it is taken up with other text. So the measure is it will split if it is too long to fit on the available space on the page.

If a split table with the header rows repeated would be acceptable, have you, for the moment thought of fudging it by putting in duplicates of the header rows at the necessary point, or else splitting the table into two at the appropriate point yourself and repeating the header rows in the second table? Or am I beginning to understand that your current problem is that the table is splitting immediately after the header rows?
Þorvarður wrote:Have you tried to insert the table as watermark from the Tools menu ? That gives you quite a lot of options, including size scaling.
You first create the table in an empty Nisus document. Save it as PDF. Then use that PDF as a watermark, and scale it until it fits.
But surely you could achieve the same by merely using a suitably smaller font or font size for the table.
Þorvarður
Posts: 410
Joined: 2012-12-19 05:02:52

Re: Prevent table splitting?

Post by Þorvarður »

> Have you tried to insert the table as watermark from the Tools menu ? That gives you quite a lot of options, including size scaling. […]
>>But surely you could achieve the same by merely using a suitably smaller font or font size for the table.
Mark, I think there is one decisive difference. If she has just a few rows, a watermark can be made so that it flows into the footer without splitting the rows. Thus you gain additional space. A table can't do that.
Regarding the following screenshot, the page guides will not be visible, of course, when the document is printed or saved as PDF. The table appears as one, uninterrupted object. Correct me if I'm wrong.
Table as watermark.png
Table as watermark.png (85.66 KiB) Viewed 15766 times
brsnyder
Posts: 19
Joined: 2015-06-26 23:30:40

Re: Prevent table splitting?

Post by brsnyder »

Thanks, everyone, for all the suggestions, but none of them address the actual requirements. Scaling, watermark, font size, none of these takes into account the fact that the position of the table will change depending on text above it anywhere in the document. Two rows might fit on a page, or 6, or 9, or all of them, depending on where it lands on the page. I'm not interested in a one-off way to address this particular table in this particular document at this particular moment (although your suggestions might come in handy when and if I do) but was asking about a standard way to meet the requirements on an ongoing basis.

Thanks again! -- Barbara
ThosGreen
Posts: 16
Joined: 2021-09-15 03:28:09

Re: Prevent table splitting?

Post by ThosGreen »

Back in 2015 brsnyder requested a feature to prevent a table splitting unnecessarily over a page .

The idea is that the text layout engine could look at a table, decide whether its vertical size is bigger than the remaining space on the current page, and if so insert a page break.

That would not a be a page break in the source text, just one inserted on that particular occasion. Thus if the same document is edited and the table finds itself higher on the page, the page break would not be necessary.

Framemaker had this feature. I don't know whether current word processors other than Nisus have it.

Has the feature been incorporated into Nisus? Or has anyone written a macro for the job?
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Prevent table splitting?

Post by phspaelti »

ThosGreen wrote: 2023-09-14 06:34:36Or has anyone written a macro for the job?
This should do it:
Insert PageBreak before Tables.nwm
(6 KiB) Downloaded 141 times
philip
Post Reply