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
. This also requires GNU pic to pre-process the data (it requires the aligned attribute for text).
Implementation notes:
- the color background is made using MOM's .DBX macro. Unfortunately, it leaves the top line blank. This is probably fixable but that code's complex and scary.
- when I started, I thought drawing the musical score would be hard. Surprisingly, it was trivial. Getting the text right was difficult as it's arguably misusing pic for alignment purposes.
- the \S macro allowed me to slant the font which was aesthetically pleasing and more carefully fit the document.
Groff's internal processing:
Input: file "bfn.mom" "" width 200% right; move; move; move; move Pic: box rad 10px "pic" arrow dashed from Input.e to Pic.w right; move; move; move; move Groff: box rad 10px "groff" arrow dashed from Pic.e to Groff.w "Unix" "pipe" move; move Output: file "bfn.pdf" "" width 200% arrow from Groff.e to Output.w→ /pikchrshow