If you read the .TH macro code carefully, you'll discover its role is to set up the printing for that file (or group of files). It initializes page dimensions, type faces, size and spacing, etc.
Any empty lines before it result in a break (.br), and producegroff/troff's default behavior before initialization occurs.
True, you can insert program code or anything else that doesn't cause actual page motions before .TH, but empty lines (or lines containing only whitespace will not produce desirable results. At least that's what I recall from back in my man page days from 1989 to 1992 when I worked on the HP-UX Reference manual. And it's the approach I still use on some of my other work when I use macros for producing white papers, technical manuals, etc. I write my own macros instead of using MM, MS, etc. I prefer doing it "my way". :-) Clarke walter harms wrote:
hi, i was playing with man pages and found by chance that empty lines before .TH seems to confuse groff. <code> ./" ./" ./" .TH The header .... </code> works fine (no warnings what so ever) but has am empty page in front and changes in page numbering are ignored. <code> ./" ./" ./" .TH The header .... </code> But this produces the desired output. Is is possible to have a warning, when accidentally empty lines in front are found ? re, wh