\" HOW-TO: \" \" 1. edit in `nroff-mode' \" 2. groff -p $pic -T ps > $ps # get PostScript \" 3. ps2pdf $ps $pdf-large # get too-large PDF \" 4. pdfcrop --margins 12 $pdf-large $pdf # remove whitespace \" 5. include in LaTeX with \includegraphics \" \" Here is zsh to do part 2-4: \" \" #! /bin/zsh \" pic2pdf () { \" local name=$1 \" \" # PS \" local ps=${name}.ps \" groff -p $name -T ps > $ps \" \" # PDF \" local large_pdf=${name}-large.pdf \" local final_pdf=${name}.pdf \" ps2pdf $ps $large_pdf \" pdfcrop --margins 12 $large_pdf $final_pdf \" \" # clean \" rm $large_pdf $ps \" } \" \" %% include figure inIn LaTeX: \" %% \" \usepackage{graphicx} \" %% ... \" \begin{center} \" \includegraphics{relative/path/to/llc.pdf} \" \end{center} .PS down; circle radius 0.5 "best-effort core"; arrow 0.2; box height 0.33 "cache L1" arrow 0.3; box width 1.5 height 0.33 "cache L2 = LLC"; line 1 dashed " bus" ljust; box width 3 "DRAM" dashed; .PE