7

I have a multi-page document that has many small sections split with \hrule lines. Occasionally a section will end immediately before a page break, and so the next section will begin right at the top of the next page. The \hrule above the new section on the new empty page then ends up looking silly.

Is it possible to define a macro like \hruleButOnlyIfNotAtTopOfPage?

Note that I'm using Plain TeX.

1 Answer 1

10

leaders are your friend:

enter image description here

\vsize=4cm \def\r{\par\smallskip\leaders\hrule\vskip.4pt\smallskip} aaaa \r aaaa \r aaaa \r aaaa \r aaaa \r aaaa \r aaaa \r aaaa \r aaaa \r aaaa \r \bye 

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.