/usr/share/groff/1.22.4/tmac
NameSizeModeActions
mdoc/-0755rm
an-ext.tmac37880644editdlrm
an-old.tmac146620644editdlrm
an.tmac3130644editdlrm
andoc.tmac26540644editdlrm
composite.tmac8050644editdlrm
cp1047.tmac24530644editdlrm
cs.tmac48360644editdlrm
de.tmac51330644editdlrm
den.tmac12260644editdlrm
devtag.tmac38300644editdlrm
doc-old.tmac365710644editdlrm
doc.tmac866380644editdlrm
eqnrc14270644editdlrm
europs.tmac16890644editdlrm
fallbacks.tmac14160644editdlrm
fr.tmac55600644editdlrm
hyphen.cs214370644editdlrm
hyphen.den1600780644editdlrm
hyphen.det1609090644editdlrm
hyphen.fr282150644editdlrm
hyphen.sv348340644editdlrm
hyphen.us281210644editdlrm
hyphenex.cs5050644editdlrm
hyphenex.us217560644editdlrm
ja.tmac19340644editdlrm
latin1.tmac22720644editdlrm
latin2.tmac23620644editdlrm
latin5.tmac22790644editdlrm
latin9.tmac22720644editdlrm
man.tmac580644editdlrm
mandoc.tmac610644editdlrm
mdoc.tmac570644editdlrm
papersize.tmac43320644editdlrm
pdfpic.tmac37580644editdlrm
pic.tmac1390644editdlrm
ps.tmac205770644editdlrm
psatk.tmac11020644editdlrm
psold.tmac18280644editdlrm
pspic.tmac49980644editdlrm
safer.tmac2180644editdlrm
sv.tmac44030644editdlrm
trans.tmac48020644editdlrm
troffrc16420644editdlrm
troffrc-end11670644editdlrm
tty-char.tmac58240644editdlrm
tty.tmac18820644editdlrm
unicode.tmac930644editdlrm
www.tmac409230644editdlrm
zh.tmac17290644editdlrm
Edit: /usr/share/groff/1.22.4/tmac/pdfpic.tmac (3758B)
.\" pdfpic.tmac .\" .\" Define the PDFPIC macro. .\" .\" When used other than with gropdf, the image is converted to .eps .\" and processing passed over to PSPIC. .\" .\" Usage: .\" .\" .PDFPIC [-L|-R|-C|-I ] [ []] .\" .\" Requires the poppler-utils package (for pdfinfo and pdftops). .\" Requires running groff in unsafe mode. . .do if d PDFPIC .nx . .nr _C \n(.C .cp 0 . .de @abort . ab [PDFPIC]: \\$* Aborting. .. .de PDFPIC . if !\\n[.U] \ . @abort Use of \\$0 requires giving groff the -U option. . . nr convert-pdf 0 . if !'\\*[.T]'pdf' .nr convert-pdf 1 . . nr pdf-offset-mode 0 . . \" left-aligned? . ie '\\$1'-L' \{\ . nr pdf-offset-mode 1 . if \\n[convert-pdf] .ds pspic-args \\$1 \" . shift . \} . el \{\ . \" right-aligned? . ie '\\$1'-R' \{\ . nr pdf-offset-mode 2 . if \\n[convert-pdf] .ds pspic-args \\$1 \" . shift . \} . el \{\ . \" indented? . ie '\\$1'-I' \{\ . nr pdf-offset-mode 3 . nr pdf-offset (m;\\$2) . if \\n[convert-pdf] .ds pspic-args \\$1 \\$2 \" . shift 2 . \} . el \{\ . \" centered is the default . ie '\\$1'-C' \{\ . if \\n[convert-pdf] .ds pspic-args \\$1 \" . shift . \} . el .nr pdf-offset-mode 0 . \} . \} . \} . br . . ds is-pdf \\$1 . substring is-pdf -3 . if !'\\*[is-pdf]'pdf' \ . @abort \\$1 at line \\n[.c] is not a PDF file, or lacks a .pdf extension. . .\" if driver is not gropdf, convert image to .eps . if \\n[convert-pdf] \{\ . ds img-file \\$1 . substring img-file 0 -5 . . sy pdftops -eps \\$1 . shift . . as pspic-args \\*[img-file].eps \\$* . . PSPIC \\*[pspic-args] . return . \} . .\" get image dimensions . ec @ . sy pdfinfo @$1 | \ grep "Page *size" | \ sed -e 's/Page *size: *\\([[:digit:].]*\\) *x *\\([[:digit:].]*\\).*$/\ .nr pdf-wid (p;\\1)\\n\ .nr pdf-ht (p;\\2)/' \ > /tmp/pdfpic\n[$$] . so /tmp/pdfpic\n[$$] . sy rm /tmp/pdfpic\n[$$] . ec . . \" if we have a parameter, use it as the final . \" image width; otherwise we use the image's natural width . \" or the current line length, whatever is smaller . ie (\\n[.$] >= 2) \ . nr pdf-deswid (i;\\$2) . el \ . nr pdf-deswid ((\\n[.l] - \\n[.i]) parameter, use it as the final . \" image height in case it is smaller than the height . \" value we have just computed . if ((\\n[.$] >= 3) & (\\n[pdf-desht] > (i;0\\$3))) \{\ . nr pdf-desht (i;\\$3) . \" recompute the final image width since we always . \" keep the correct image aspect . nr pdf-deswid (\\n[pdf-desht] * 1000 + (\\n[pdf-ht] / 2) \ / \\n[pdf-ht] * \\n[pdf-wid] \ + 500 / 1000) . \} . . \" reserve vertical space for image . ne (\\n[pdf-desht]u + 1v) . . \" compute image offset w.r.t. the current left margin . if (\\n[pdf-offset-mode] == 0) \ . nr pdf-offset (\\n[.l] - \\n[.i] - \\n[pdf-deswid] / 2) . if (\\n[pdf-offset-mode] == 1) \ . nr pdf-offset 0 . if (\\n[pdf-offset-mode] == 2) \ . nr pdf-offset (\\n[.l] - \\n[.i] - \\n[pdf-deswid]) . \h'\\n[pdf-offset]u'\ \X'pdf: pdfpic \\$1 -L \\n[pdf-deswid]z \\n[pdf-desht]z' . if !r PDFPIC_NOSPACE \{\ . sy echo ".nr PDFPIC_NOSPACE 0$GROFF_PDFPIC_NOSPACE" > /tmp/x\n[$$] . so /tmp/x\n[$$] . sy rm /tmp/x\n[$$] . \} . if \\n[PDFPIC_NOSPACE]==0 \{\ . br . sp \\n[pdf-desht]u . \} .. . .cp \n[_C] . .\" end of pdfpic.tmac