Hi Ralph, On 8/28/22 10:58, Ralph Corderoy wrote:
Hi Alejandro,| sed 's/\x1b\[[^@-~]*[@-~]//g' \Out of interest, what's the sed(1) attempting to do? (I know what it's doing.)...I need to get rid of the highlighting.There's probably a better way; see grotty(1)'s -c option or GROFF_NO_SGR environment variable. Piping grotty's output into ‘col -pbx’ may also be useful.
Changed; thanks! BTW, I didn't add -p, since I don't think it's necessary. Also, I added the variable for the output device, and set it to ascii, since utf8 produces multibyte sequences for boxed tables. Now it only uses normal ASCII chars.
Cheers, Alex
No, the page dimensions, etc., are set within the troff source and it's up to that source to allow for external specification if required. If a document is written without specifying them then the defaults apply and the user can override these by using one of the paper-size macro sets, e.g. ‘-ma4’ for A4 paper from groff's a4.tmac. troff -ma4 letter.trAhh, it makes sense: normally documents are designed to be rendered in a specific device and characteristics.Well, relative to the page, yes, but many documents needn't assume much about the output device or page size. If you look at a4.tmac, for example, you'll see it just sets the page length to the paper size and the line length to the paper width less an inch margin both sides. .pl 29.7c .ll 21c-2i Boundaries of the text, like the header and footer position, are set relative to the edge of the paper: the header a distance from the top; the footer up from the bottom, not the top. Thus the page length isn't of immediate concern.
-- Alejandro Colomar <http://www.alejandro-colomar.es/>
OpenPGP_signature
Description: OpenPGP digital signature