I have a file with the following heading:
.PS
.ps 8.5
boxht = 1/6
boxwid = 0.3
moveht = 1/12
movewid = 0.15
linethick = 0
It looks like a troff
file, at least that's what Linux file
tells me (I have not been able to simply open it with, say, Evince). However, if I simply groff -Tps somefile > somefile.ps
, it simply gives me the text of the file: it does not create the ps file following the code in it.
The question is, how do I convert this type of file into ps
or pdf
?
You have to tell groff which set of macros to use in formatting the document. For example, man-pages use the "an" macros, with the command-line option "-man".
To see what macros would apply, you have to look at more than just the slice that you have quoted. xterm for instance has a file (ctlseqs.ms) which is formatted using the "s" ("-ms") macros.
The "-Tps" option may be redundant; most groff configurations appear to default to PostScript output.