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