groff
[Top][All Lists]
Advanced

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

Re: Two trivial questions


From: Peter Schaffter
Subject: Re: Two trivial questions
Date: Mon, 8 Nov 2021 11:56:07 -0500
User-agent: Mutt/1.9.4 (2018-02-28)

On Mon, Nov 08, 2021, Dave Kemper wrote:
> Yeah, in fact, groff ignores numbers following several marks of
> punctuation besides the comma, and warns about none, even with all
> warnings turned on.
> 
> $ printf '.ps 12\nword\n' | groff -Z -ww > test.out
> $ printf '.ps 12.5\nword\n' | groff -Z -ww | diff - test.out | wc
>       8      12      54
> $ printf '.ps 12,5\nword\n' | groff -Z -ww | diff - test.out | wc
>       0       0       0
> $ printf '.ps 12#5\nword\n' | groff -Z -ww | diff - test.out | wc
>       0       0       0
> $ printf '.ps 12^5\nword\n' | groff -Z -ww | diff - test.out | wc
>       0       0       0
> $ printf '.ps 12_5\nword\n' | groff -Z -ww | diff - test.out | wc
>       0       0       0
> $ printf '.ps 12;5\nword\n' | groff -Z -ww | diff - test.out | wc
>       0       0       0
> $ printf '.ps 12!5\nword\n' | groff -Z -ww | diff - test.out | wc
>       0       0       0
> $ printf '.ps 12@5\nword\n' | groff -Z -ww | diff - test.out | wc
>       0       0       0

Not all punctuation or trailing characters are ignored.

$ printf ".ps 12.5\n.tm \\\n[.s]\n" | groff -z
  12.5
$ printf ".ps 12:5\n.tm \\\n[.s]\n" | groff -z
  1
$ printf ".ps 12&5\n.tm \\\n[.s]\n" | groff -z
  1

-- 
Peter Schaffter
https://www.schaffter.ca



reply via email to

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