2

I have seen here how to perform a page break:

groff ms page break macro

I have been trying to find the equivalent but for columns in a .2C two columns formatted document. Sometimes the header of a section appears at the end of the left column isolated and I would like to manually force to appear at the beginning of the right column in those cases.

Is there any equivalent to .bp but for columns?

1 Answer 1

1

You can use the basic troff need command. It takes the number of lines of space you need for the following input. Typically, a header macro would include such a command to avoid the widow that you are seeing. So if you would like at least 2 lines of text plus a header you might use, say

.ne 5
3
  • Thanks. I have an embeded picture right after the .NH header, maybe that makes the header to appear orphan. In that scenario .ne 5 seems that it does not fix the issue. I have found that header and picture can be enclosed with .KS/.KE and they will be moved to the next column, but I was wondering if a explicit column break command would be available. Commented May 14, 2020 at 16:46
  • Yes, .ne 999 will always trigger a new column, but I suppose the ms equivalent is the register HORPHANS (lines to keep with header). You could always consider a floating keep .KF so that the text stays in column 1 and the image floats to column 2, to avoid big gaps. Commented May 14, 2020 at 16:52
  • .ne 999 definitively works, so it is a valid workaround to force a column break Commented May 14, 2020 at 16:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.