[Top][All Lists]

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

Re: [groff] A few newb questions about Troff typesetting

From: Peter Schaffter
Subject: Re: [groff] A few newb questions about Troff typesetting
Date: Tue, 28 Nov 2017 11:46:10 -0500
User-agent: Mutt/1.5.24 (2015-08-30)

> > 2) How do I include pictures in my documents?  Pictures in this
> >    sense mean real-life pictures, like the ones in JPG or PNG.

Pictures have to be converted either to eps or pdf.  If your output
is PostScript, converted eps images are inserted with the PSPIC
macro (see groff_tmac(5)).  If your output is pdf and you're using
the mom macros, pdf images are inserted with the PDF_IMAGE macro.

For a brief discussion about images in groff, see

> > 3) Is the `-dpaper` option the proper way to set the paper size?
> >    Are there more proper ways?

The usual way is to set the physical dimensions in your source file
if they differ from the default papersize(1) of your system, and
invoke groff with the -P-p<size> option.  E.g. if your system
default is US letter and you want an A4 document, set the a4
dimensions in the source file and process it with

  groff -P-pa4 ...

Note that if you use the mom macros and pdfmom(1) to produce PDF
output, there is no need to specify the papersize at the command
line since pdfmom extracts the dimensions of the page from the
source file.

> > 4) Given a TTF file, what is the best way to add custom fonts?  I
> >    have actually added a few fonts with success.  I was able to
> >    successfully add and use EmojiOne SVGinOT
> >    ( on Troff using
> >    ttf2afm and afmtodit and the textmap table.  Some fonts don't
> >    work, though.  I have no idea why.

Probably the easiest way to convert and install TTF fonts for use
with groff is the '' script, available here

Remember to make the file executable.

Peter Schaffter

reply via email to

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