[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] empty line before .TH in man page produces sometimes an empt
From: |
Clarke Echols |
Subject: |
Re: [Groff] empty line before .TH in man page produces sometimes an empty page |
Date: |
Sun, 01 Oct 2006 17:44:36 -0600 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
ABSOLUTELY NO LINES, other than genuine troff/groff comment lines
should appear in a man page file before the .TH line. You do *not*
want troff/groff interpreting *anything* before it encounters the
.TH macro call because .TH sets up page boundaries, end-of-page
traps, and a bunch of other stuff that you want fully established
and settled before you start interpreting text. This has been the
case for decades.
In a source-code (SCCS) or revision (RCS) control environment, the
first line in the file starts with .\" $Header: [I think -- it's
been many years since I did this stuff back in 1989-1992]. The
RCS or SCCS software then fills in the line with date, revision
version number, etc., but by making it a comment, it keeps the
revision information invisible to troff/groff.
Any line before .TH that is not a comment will create a break in
no-fill mode, and in fill mode will create a non-empty buffer prior
to the .TH line, causing unpredictable behavior, depending on various
environment/status conditions.
Clarke
Bernd Warken wrote:
Consider the followin short man page:
$ cat manpage.1
\" comment
.TH MANPAGE 1 "2006 Oct 1" "manpage"
.SH NAME
manpage \- test man page
This has a bug: the first line (with the comment) should start with a dot.
For example, the man page bash.1 has this bug.
Without the dot, this line produces an empty space in the output. In text
or html output, this space is a single empty line, ok.
But in ps or dvi output, a whole empty page is created. I consider this a
bug in ps and dvi mode.
If you write some text before the .TH request this text is written in a
single line even in ps or dvi output. But as soon as you add a line that is
empty or has only spaces or a comment a whole empty page is created
in ps or dvi mode.
Bernd Warken
_______________________________________________________________________
Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos.
Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222
_______________________________________________
Groff mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/groff