%%% ==================================================================== %%% @METAFONT-file{ %%% author = "Alan Jeffrey", %%% version = "1.1", %%% date = "02 June 1992", %%% time = "13:54:01 BST", %%% filename = "dmfexmpl.mf", %%% address = "School of Cognitive and Computing Sciences %%% University of Sussex %%% Brighton BN1 9QH %%% UK", %%% telephone = "+44 273 606755 x 3238", %%% FAX = "+44 273 678188", %%% checksum = "15329 114 377 3956", %%% email = "alanje@cogs.sussex.ac.uk", %%% codetable = "ISO/ASCII", %%% keywords = "diagrams, metafont", %%% supported = "yes", %%% abstract = "Example diagrams for the diagramf package.", %%% docstring = "These are the example diagrams for the %%% diagramf package, described in diagramf.tex. %%% %%% Copyright 1992 Alan Jeffrey. %%% %%% The checksum field above contains a CRC-16 %%% checksum as the first value, followed by the %%% equivalent of the standard UNIX wc (word %%% count) utility output of lines, words, and %%% characters. This is produced by Robert %%% Solovay's checksum utility.", %%% package = "diagramf", %%% dependencies = "diagramf.mf diagramf.sty arrows.mf", %%% maintainer = "Jeremy Gibbons", %%% address-maintainer = "Department of Computer Science %%% University of Aukland %%% Private Bag %%% Aukland %%% New Zealand", %%% email-maintainer = "jeremy@cs.aukuni.ac.nz", %%% } %%% ==================================================================== %%% %%% 25 Oct 1990, v1.0: Released version 1.0. %%% %%% 2 Jun 1992, v1.1: Added standard headers, and renamed the file %%% from example.mf to dmfexmpl.mf. mode_setup; input diagramf; input arrows; vardef setoval@# text t = setbox@# t; draw hboxbl@#{hboxbr@#-hboxtl@#} ..hboxbr@#{hboxtr@#-hboxbl@#} ..hboxtr@#{hboxtl@#-hboxbr@#} ..hboxtl@#{hboxbl@#-hboxtr@#} ..cycle enddef; begindiagram (1,48pt#,35pt#,0pt#); hboxes (0 upto 4); pickup pencircle scaled 0.4pt; .5[hboxtl0,hboxtr0] = (.5w,h-3pt); hboxtr1-hboxbl0 = (-10pt,-10pt); hboxtl2-hboxbr0 = (10pt,-10pt); hboxbr3 = 2/3[hboxbl0,hboxtr1]; hboxbl4 = 2/3[hboxbr0,hboxtl2]; drawarrow hboxbl0--top rt hboxtr1; drawarrow hboxbr0--top lft hboxtl2; setoval0 "$\mathstrut a \vert b$"; setoval1 "$\mathstrut a$"; setoval2 "$\mathstrut b$"; setbox3 "$\mathstrut b$"; setbox4 "$\mathstrut a$"; enddiagram; begindiagram (2,30pt#,7pt#,2pt#); hboxes (0); pickup pencircle scaled 0.4pt; .5[hboxl0,hboxr0] = (.5w,0); draw hboxbl0..hboxtl0 ---hboxtr0..hboxbr0 ---cycle; setbox0 "$g \circ h$"; enddiagram; begindiagram(3,120pt#,40pt#,0pt#); hboxes (0 upto 6); .5[hboxtr0,hboxbl0] = (.5w,.5[h,-d]); hboxtl1=(0,h); hboxtr2=(w,h); hboxr3=(w,ypart hboxr0); hboxbr4=(w,-d); hboxbl5=(0,-d); hboxl6=(0,ypart hboxl0); pickup pencircle scaled 0.4pt; drawarrow .5[hboxbr1,hboxtr1]--hboxtl0; drawarrow .5[hboxbl2,hboxtl2]--hboxtr0; drawarrow .5[hboxbl3,hboxtl3]--hboxr0; drawarrow .5[hboxbl4,hboxtl4]--hboxbr0; drawarrow .5[hboxbr5,hboxtr5]--hboxbl0; drawarrow .5[hboxbr6,hboxtr6]--hboxl0; prooflabel0; setbox0 "$g \circ h$"; setbox1 "\tt hboxtl0"; setbox2 "\tt hboxtr0"; setbox3 "\tt hboxr0"; setbox4 "\tt hboxbr0"; setbox5 "\tt hboxbl0"; setbox6 "\tt hboxl0"; enddiagram; end;