Description of problem: When one tries to make a PostScript (or PDF) version of the ps manpage, errors crop up leading to a bad PS file. Version-Release number of selected component (if applicable): procps-3.2.7-17.fc8.x86_64 How reproducible: Always. Steps to Reproduce: 1. man -t ps > trial.ps 2. 3. Actual results: > man -t ps > trial.ps <standard input>:947: numeric overflow <standard input>:1391: numeric overflow <SNIP about 90 numeric overflows> <standard input>:1391: numeric overflow <standard input>:1404: addition overflow Also, upon viewing the PostScript file (or a pdf formed using "man -t ps | ps2pdf - trial.pdf; attached herein), the errors may be found on pages 10-14. You can see that some of the entries are running off the edge of the page. It looks like some wordwrap algorithm with gtbl isn't quite working. Expected results: A properly formatted PostScript file. Additional info: I have attached a PDF file made by the technique above. Also, I wasn't sure who to file this bug with. I can see it being a procpc, man, or groff problem.
Created attachment 296353 [details] Example PDF made from ps manpage via man -t
Will check with the 'man' package maintainer. I'm not sure the bug is in procps. I think man (groff?) should format the pages the same way as on the screen. And in a terminal it looks OK.
Thanks, I wasn't sure, but yeah it does appear correctly in terminal. One other thing I tried was based on an old webpage I found. It used a command similar to the one below to format pages for Xman. So, I tried it with a different -T command for groff. Namely: > gunzip -c /usr/share/man/man1/ps.1.gz | gtbl | geqn | gtbl | groff -Tps -mandoc | ps2pdf - ps.manpage.pdf gtbl:<standard input>:761: `.' not last character on line gtbl:<standard input>:761: giving up on this table gtbl:<standard input>:1490: `.' not last character on line gtbl:<standard input>:1490: giving up on this table gtbl:<standard input>:2014: `.' not last character on line gtbl:<standard input>:2014: giving up on this table gtbl:<standard input>:8020: `.' not last character on line gtbl:<standard input>:8020: giving up on this table Using this pipe-stream does indeed rid the errors. Unfortunately it does so by essentially stripping out the offending tables. Just for reference, I am attaching the PDF created with this method.
Created attachment 296358 [details] ps manpage created via groff pipestream
Reassigning to man.
As is seen from the comment #3 this is not man problem - this is groff problem man uses command cd /usr/share/man && /usr/bin/gunzip -c '/usr/share/man/man1/ps.1.gz' | /usr/bin/gtbl | /usr/bin/groff -Tps -mandoc >trial.ps which causes it.
Weird thing is that "man -t ps" and "groff -Tps -mandoc" will result in different documents when run on ps.1. How comes?
'cause man use some nrof -Something. If you'll try to read this man page with mc, then you see another problems. This man page has incorrect characters in table of contents (page 10 and next) and that is the reason of all problems.
Marcela found out that the problem is caused by the following line: .nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n) rewriting it to .nr ColSize ((\n[.l] - \n[.i]) / 1n - 20) seems to solve the problem. I'll add this change to the next procps update.