Challenge found here. Goal: reproduce it as faithfully as possible.
Code is here and the generated document is here.
To build the example, you'll need a version of groff that has PDF generation support built-in. If it's not in the default path, execute make download; make GROFF=path2groff/groff.
Build notes:
- assumes Gmake is the default make.
make downloadpulls the Jayhawks' logo down using curl and only needs to be run once.
Implementation notes:
- the
.ROLEmacro is crucial for the middle content as it abstracts away point size and font changes. - the
.BLANKROLEmacro is a convenience to help format the empty rows in the table. - the
hdtblpackage is included with groff (man groff_hdtbl) and used to create a table with background colors. You can do this with basetblbut you need to post-process its output with Postscript.
Processing model follows:
"Download logo:"
box "make download" wid 110%
arrow dashed "curl file" ""
file "University_of_Kansas_wordmark.pdf" wid 350%
left; move; move; move; down; move; move; right
"Build document:"
Code: file "kansas.mom" wid 140%
right; arrow
Groff: box "groff"
arrow
Document: file "kansas.pdf" wid 140%
→ /pikchrshow