groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] It is time to modernise "groff"


From: Bjarni Ingi Gislason
Subject: [Groff] It is time to modernise "groff"
Date: Thu, 31 Aug 2017 20:54:10 +0000
User-agent: Mutt/1.5.20 (2009-12-10)

Introduction:

A) There are about 1400 lines in the code in the "groff" repository that
contains the backquote, grave (`) as a directional quote, but it is output
exactly as itself, as it is not processed as an input to "groff" to be
formatted and typeset.

Example:

an-old.tmac:.    tm `R' is a string (producing the registered sign), not a 
macro.

devices/grodvi/dvi.cpp:    error("unrecognised drawing command `%1'", 
char(code));

devices/grops/ps.cpp:// `pl' is in inches

preproc/eqn/lex.cpp:          lex_error("`\\' ignored at end of equation");


B) There are too many manuals (man pages) that contain a syntax error that is
not seen because

a) The user does not use '-ww'

b) Programs, that use "groff", like "man" (from "man-db"), suppress most
warnings by default, so the user must himself arrange for the permission to
see the warnings.


Changes:

case A:
  Instead of changing these '`' to "'", it is time to modernize "groff" and
get rid of Americanism, old, obsolete, deprecated, bad, and worse decisions.

  Suggestions:

a) Change command substitution `...` to a modern form, $(...) or equivalent

b) Change backquote (`), that is used as a quote mark, to ' (single quote)

c) Input characters display as themselves.  That means ' and ` print as
themselves.

d) Compatibility mode is removed

e) All warnings are issued unconditionally

f) No (special) warning can be suppressed or chosen (with -E, -w..., '-W
...', or the request '.warn ...').

g) All warnings are made to be errors and processing stopped immediately.

  I have seen too many man pages, where a warning from "groff" is seen, if
the user allows it.

  Programs like "man" (from "man-db") suppress most warnings if the user
does not turn on an environmental variable (which too many users and
maintainers do not know of, or ignore).

  Writers, maintainers (up- and downstreams) should not be allowed to misuse
"*roff" to produce, maintain or distribute faulty products!

h) Make the default page size be A4 (a4).

i) Adjust default sizes to the metric system.

j) Use a metric point as default.  1 such point is then 375 micrometres
(15 x 250 um) or about 1 didot-point (0.376 mm).

k) Add a warning (error) to some macros, when they are misused.

  Example: macros for two fonts (like .BR, .IR) but have only one argument.

l) Remove some compatibility of "groff" with Unix troff, example:

  preproc/tbl/table.cpp:// The only point of this is to make `\a' ``work'' as 
in Unix tbl.  Grrr.

m) Change ``...'' to "...".  Directional quotation mark are not useful in
comments, output to the standard error, or output that is not processed by
"groff" itself.  Applies also to "groff".

  Such writing of quotes is a good example of how people get brainwashed.

n) Let \[en] output '--' (en-dash) when glyph is missing
Let \[em] output '---' (em-dash) when glyph is missing

o) Use the .ig request for longer (4-5 lines) comments, like
.de comment
..
.ig comment
<Comments>
.comment

  Issue an error if there are more the (4-5) consecutive lines that begin
with the comment request.

p) Remove the '-a' option (the ASCII approximation output).

?) More ideas.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]