summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:45:48 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:45:48 +0000
commit5dc602d16c5be2fd035b254ca23484a90aebd6dc (patch)
tree72efb15fba318cc2096a8cc6999ed3fa0bff317d
parentb4fc5f639874db951177ec539299d20908adb654 (diff)
doc 5
git-svn-id: svn://tug.org/texlive/trunk@81 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex3/galley/xhj-test.tex176
-rw-r--r--Master/texmf-dist/doc/latex3/template/template-test.tex39
-rw-r--r--Master/texmf-dist/doc/latex3/template/tprestrict-test.tex43
-rw-r--r--Master/texmf-dist/doc/latex3/xinitials/xinitials-test.tex326
-rw-r--r--Master/texmf-dist/doc/latex3/xor/cat.eps305
-rw-r--r--Master/texmf-dist/doc/latex3/xor/escher.eps63
-rw-r--r--Master/texmf-dist/doc/latex3/xor/europe.eps3227
-rw-r--r--Master/texmf-dist/doc/latex3/xor/outline.eps19
-rw-r--r--Master/texmf-dist/doc/latex3/xor/outline2.eps19
-rw-r--r--Master/texmf-dist/doc/latex3/xor/oxford-trial.tex298
-rw-r--r--Master/texmf-dist/doc/latex3/xor/rahtz18.eps174
-rw-r--r--Master/texmf-dist/doc/latex3/xor/theworld.eps3058
-rw-r--r--Master/texmf-dist/doc/latex3/xor/xo-README.txt219
-rw-r--r--Master/texmf-dist/doc/latex3/xor/xo-pfloat.tex1623
-rw-r--r--Master/texmf-dist/doc/latex3/xor/xo-sample.tex578
-rw-r--r--Master/texmf-dist/doc/latex3/xparse/xparse-test.tex230
-rw-r--r--Master/texmf-dist/doc/latex3/xtheorem/readme.txt40
-rw-r--r--Master/texmf-dist/doc/latex3/xtheorem/xtheorem-test.tex58
-rw-r--r--Master/texmf-dist/doc/metapost/base/Makefile125
-rw-r--r--Master/texmf-dist/doc/metapost/base/grdemo.pdfbin0 -> 8325 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/base/index.html62
-rw-r--r--Master/texmf-dist/doc/metapost/base/mpgraph.pdfbin0 -> 173873 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/base/mpintro.pdfbin0 -> 158501 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/base/mpman.pdfbin0 -> 466130 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/Makefile31
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/README32
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/agepop91.d85
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/agepopm.d85
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/countries.d60
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/ctabbing.sty17
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/demo.ms105
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/energy.d75
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/examples.mp247
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/figs.mp22
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/grdemo.ms124
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/lead.d24
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/manfig.mp859
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/matmul.d21
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpgraph.bib96
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpgraph.mp129
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpgraph.tex1109
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpintro.bib48
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpintro.tex878
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpman.bib80
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpman.ist4
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mpman.tex5483
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/timepop.d21
-rw-r--r--Master/texmf-dist/doc/metapost/exteps/LICENSE340
-rw-r--r--Master/texmf-dist/doc/metapost/exteps/README5
-rw-r--r--Master/texmf-dist/doc/metapost/exteps/exteps.pdfbin0 -> 116101 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/README.ctan29
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/README.featpost36
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh95
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh1
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/fpost1
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed5
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh6
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/laproof13
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/lbproof16
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/lcproof13
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh9
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh8
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh10
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh8
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh32
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh9
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh7
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh15
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/doc/doclicense.txt10
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/doc/featexamples.html163
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/doc/featpost.1.gzbin0 -> 1980 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/doc/featpost.sgml1623
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/doc/tug2004.pdfbin0 -> 413671 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/bugtrack/bughunt.mp57
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp9
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/highmemory/hiddenlinegraph.mp72
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/highmemory/mainmemtest.mp54
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/highmemory/par3Dplotexamples.mp149
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/borderframetest.mp28
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/conegetready.mp36
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/doitnow.mp33
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/electricpotential.mp151
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/emptylines.mp28
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/experimental.mp177
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/fieldlines.mp59
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/fis3prey.mp128
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/frustum.mp46
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_casq.mp84
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_freder.mp94
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/graphexample.mp16
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/lcurvature.mp114
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/mptoolcone.mp49
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/nembends.mp48
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/nemdirector.mp82
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp60
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquirapitch.mp69
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/nemuniax.mp61
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/pathernon.mp65
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/planpht.mp291
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/rigorcubo.mp36
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/rmnbob.mp45
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/sal.mp104
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/sfearschem.mp34
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/signalvertexSD.mp40
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/spherample.mp49
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/squareanglines.mp14
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/troncoconedef.mp54
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/twistnlc.mp54
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/twistroundbiax.mp62
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/twocyclestogether.mp113
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/twoupcones.mp51
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/anglinerigorouscircle.mp108
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/cartaxes.mp28
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/conicurv.mp94
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfacecentered.mp112
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfigures.mp44
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/cylimple.mp50
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/downloadicon.mp66
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/eemcsblabla.mp292
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/embroncordada.mp57
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/fakehole.mp59
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/featpostlogo.mp29
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/ffcbob.mp84
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/fieldlinesnorma.mp104
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/fis1prex.mp131
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/fis3prex.mp481
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/geombasic.mp82
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/geomfiguei.mp71
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/geommine.mp104
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/globe.mp32
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/halfcirclesfear.mp43
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/hexagonaltrimesh.mp25
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurface.mp153
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurfaces.mp65
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/inductionbob.mp116
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/joinedemptylines.mp47
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/kindofcube.mp81
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/labelconstruct.mp30
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/labelinspace.mp33
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/magneticflux.mp105
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/nembiaxi.mp64
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/nemsaddl.mp86
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/nsmetica.mp60
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/parafuso.mp100
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/pathofstraightline.mp29
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/photoreverse.mp242
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/polyhedr.mp191
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/positivecharge.mp28
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/resistcircuit.mp64
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscircle.mp49
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscone.mp36
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscSD.mp49
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscoptions.mp31
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousfearpath.mp66
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/rotatnlc.mp49
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/saturn.mp111
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/sharpraytrace.mp102
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/simplecar.mp25
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp56
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/spatialhalfsfear.mp15
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/spltwiben.mp81
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/stageforthree.mp115
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/tangencypoint.mp38
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/tdarrow.mp26
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/thearchicon.mp59
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/thethreekindsofperspec.mp195
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/torus.mp297
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/trajectoryline.mp88
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/triangulartrimesh.mp39
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/tropicalglobe.mp23
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/tshirtfig.mp39
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/tuftescatter.mp83
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/twistflat.mp55
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/twoholes.mp31
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/unperfection.mp59
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/unperfectionremoved.mp34
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/vanallenbelt.mp51
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/verygoodcone.mp28
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/standard/xraycamera.mp117
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/cone.mp37
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/ellipticprism.mp39
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/intersection2D.mp46
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/kindofcube.mp57
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/newexperimental.mp157
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/perspec.mp77
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/planintersection.mp105
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/revolvers.mp112
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tug04/tangency2D.mp56
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/galrey/galrey.rc75
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/galrey/galrey.sh6
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/galrey/galrey.tpl42
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/jpeg/cbxSmall.jpgbin0 -> 2537 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/jpeg/hiddenlinegraph1.jpgbin0 -> 30350 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostbackground.jpegbin0 -> 23535 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostclearback.jpegbin0 -> 4710 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples1.jpgbin0 -> 15400 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples2.jpgbin0 -> 27764 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/jpeg/planpau2.jpegbin0 -> 15711 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/latex/linuxdoc-sgml.sty117
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/latex/logofeatpost.tex18
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/latex/ltugboat.cls1225
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/latex/macroMan.tex1737
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/latex/mflogohack.sty31
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/latex/null.sty0
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/latex/qwertz.sty19
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/macro/README.macro13
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/cylimple.1.pngbin0 -> 8642 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/globe.1.pngbin0 -> 21110 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorouscone.1.pngbin0 -> 11103 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorousfearpath.1.pngbin0 -> 8984 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/rotatnlc.1.pngbin0 -> 37973 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/stageforthree.2.pngbin0 -> 34023 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.5.pngbin0 -> 83805 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.6.pngbin0 -> 62981 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/nontextualpng/triangulartrimesh.1.pngbin0 -> 95207 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/border140.pngbin0 -> 552 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/borderframetest.pngbin0 -> 291 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/composite.pngbin0 -> 264 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/downloadicon.pngbin0 -> 5494 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/experfilminifram.pngbin0 -> 23300 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/featpost2.pngbin0 -> 4763 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/inifram.pngbin0 -> 4412 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/lcdistortsallinifram.pngbin0 -> 43210 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/metapostlace.pngbin0 -> 20108 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/png/myicon.pngbin0 -> 237 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/typesetinspace/README.mpy21
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/typesetinspace/example.mp17
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/typesetinspace/exampleminimal.mp7
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/typesetinspace/makempy.pl365
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-grph.mp295
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-tool.mp2366
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/xcmd/README.xcmd10
-rwxr-xr-xMaster/texmf-dist/doc/metapost/featpost/xcmd/xmpost70
-rw-r--r--Master/texmf-dist/doc/metapost/hatching/htchuse.mp55
-rw-r--r--Master/texmf-dist/doc/metapost/hatching/htchuse_.tex11
-rw-r--r--Master/texmf-dist/doc/metapost/hatching/readme52
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/README11
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/examples.pdfbin0 -> 126612 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/latexmp.pdfbin0 -> 90561 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp34
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex23
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp11
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp34
-rw-r--r--Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp41
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/README84
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/cube10.mp88
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/cube4-eng.mp124
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/cube5.mp86
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/cube6.mp94
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/cube7.mp133
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/cube8.mp48
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/cube9.mp66
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1-eng.mp75
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1.mp76
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2-eng.mp90
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2.mp91
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3-eng.mp98
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3.mp99
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4-eng.mp112
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4.mp113
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5-eng.mp84
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5.mp85
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6-eng.mp100
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6.mp101
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7-eng.mp102
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7.mp103
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8-eng.mp120
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8.mp121
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/gutmp9.mp63
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/monge-eng.mp148
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/examples/monge.mp149
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/gut2001.pdfbin0 -> 247845 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/paper1997corrected.pdfbin0 -> 138588 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/tb57roeg.pdfbin0 -> 175795 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/tb57roegel.ltx1149
-rw-r--r--Master/texmf-dist/doc/metapost/mp3d/tugboat-geometry-space.pdfbin0 -> 263816 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/mpattern/README129
-rw-r--r--Master/texmf-dist/doc/metapost/mpattern/README.PL133
-rw-r--r--Master/texmf-dist/doc/metapost/mpattern/test.mp146
-rw-r--r--Master/texmf-dist/doc/metapost/mpattern/test.tex22
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/INSTALL6
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/LEGAL104
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/README17
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.mp146
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.pdfbin0 -> 32908 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/examples/wec.mp122
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/examples/wec.pdfbin0 -> 8824 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/examples/worldmap.jpgbin0 -> 23616 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/piechartmp/piechartmp.pdfbin0 -> 316716 bytes
-rw-r--r--Master/texmf-dist/doc/mex/base/00readme226
-rw-r--r--Master/texmf-dist/doc/mex/base/mex.html212
-rw-r--r--Master/texmf-dist/doc/mex/base/mexinfo.eng604
-rw-r--r--Master/texmf-dist/doc/mex/base/mexinfo.pol875
-rw-r--r--Master/texmf-dist/doc/mex/base/qq.eps360
-rw-r--r--Master/texmf-dist/doc/mex/base/tstmex.tex102
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/Makefile29
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/README53
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/examples/Makefile27
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/examples/catcode.tex10
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/examples/list.tex12
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/examples/tilde.tex8
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/examples/tilde2.tex17
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/test-math.utf8.tex227
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/test.utf8.tex23
-rw-r--r--Master/texmf-dist/doc/mex/utf8mex/utf8math.el312
-rw-r--r--Master/texmf-dist/doc/plain/cellular/cellular.doc114
-rw-r--r--Master/texmf-dist/doc/plain/cellular/origin28
-rw-r--r--Master/texmf-dist/doc/plain/gustlib/README146
-rw-r--r--Master/texmf-dist/doc/plain/gustlib/readme.biblotex17
-rw-r--r--Master/texmf-dist/doc/plain/gustlib/readme.plbtx99375
-rw-r--r--Master/texmf-dist/doc/plain/gustlib/readme.plmac21824
-rw-r--r--Master/texmf-dist/doc/plain/harvmac/harvsamp.tex273
-rw-r--r--Master/texmf-dist/doc/plain/jsmisc/deutsch.doc329
-rw-r--r--Master/texmf-dist/doc/plain/jsmisc/deutsch.tex350
-rw-r--r--Master/texmf-dist/doc/plain/jsmisc/idverb.doc194
-rw-r--r--Master/texmf-dist/doc/plain/metatex/README92
-rw-r--r--Master/texmf-dist/doc/plain/metatex/gpl.txt340
-rw-r--r--Master/texmf-dist/doc/plain/metatex/mtmp2pdf.tex369
-rw-r--r--Master/texmf-dist/doc/plain/metatex/mtpaper.pdfbin0 -> 133791 bytes
-rw-r--r--Master/texmf-dist/doc/plain/metatex/mtpaper/delay.mf301
-rw-r--r--Master/texmf-dist/doc/plain/metatex/mtpaper/diagram.tex83
-rw-r--r--Master/texmf-dist/doc/plain/metatex/mtpaper/frame.tex23
-rw-r--r--Master/texmf-dist/doc/plain/metatex/mtpaper/mtpaper.tex654
-rw-r--r--Master/texmf-dist/doc/plain/metatex/mtpaper/shadow.tex85
-rw-r--r--Master/texmf-dist/doc/plain/mnras/fonttest.tex169
-rw-r--r--Master/texmf-dist/doc/plain/mnras/mnguide.tex1988
-rw-r--r--Master/texmf-dist/doc/plain/mnras/mnland.tex82
-rw-r--r--Master/texmf-dist/doc/plain/mnras/mnsample.tex705
-rw-r--r--Master/texmf-dist/doc/plain/mnras/readme.txt15
-rw-r--r--Master/texmf-dist/doc/plain/newsletr/READ.ME76
-rw-r--r--Master/texmf-dist/doc/plain/newsletr/losample.tex380
-rw-r--r--Master/texmf-dist/doc/plain/newsletr/newsletr.txt134
-rw-r--r--Master/texmf-dist/doc/plain/newsletr/newssamp.tex267
-rw-r--r--Master/texmf-dist/doc/plain/patch/patch.doc543
-rw-r--r--Master/texmf-dist/doc/plain/pdcmac/00readme.txt21
-rw-r--r--Master/texmf-dist/doc/plain/pdcmac/copying.txt358
-rw-r--r--Master/texmf-dist/doc/plain/pdcmac/install.txt91
-rw-r--r--Master/texmf-dist/doc/plain/pdcmac/news.txt14
-rw-r--r--Master/texmf-dist/doc/plain/pdcmac/oput01.eps423
-rw-r--r--Master/texmf-dist/doc/plain/pdcmac/oput02.eps404
-rw-r--r--Master/texmf-dist/doc/plain/pdcmac/version.txt19
-rw-r--r--Master/texmf-dist/doc/plain/plgraph/00readme.txt105
-rw-r--r--Master/texmf-dist/doc/plain/plgraph/autopict.ins102
-rw-r--r--Master/texmf-dist/doc/plain/plgraph/exmplcol.tex6
-rw-r--r--Master/texmf-dist/doc/plain/plgraph/exmplgrf.tex10
-rw-r--r--Master/texmf-dist/doc/plain/plgraph/exmplpfg.tex17
-rw-r--r--Master/texmf-dist/doc/plain/plgraph/exmplpic.tex15
-rw-r--r--Master/texmf-dist/doc/plain/plnfss/LPPL.txt405
-rw-r--r--Master/texmf-dist/doc/plain/plnfss/plnfss.txt132
-rw-r--r--Master/texmf-dist/doc/plain/plnfss/test-plnfss.tex40
-rw-r--r--Master/texmf-dist/doc/plain/treetex/epodd.bbl107
-rw-r--r--Master/texmf-dist/doc/plain/treetex/epodd.tex1189
-rw-r--r--Master/texmf-dist/doc/plain/treetex/readme19
-rw-r--r--Master/texmf-dist/doc/plain/treetex/tree_doc.bbl97
-rw-r--r--Master/texmf-dist/doc/plain/treetex/tree_doc.tex1331
-rw-r--r--Master/texmf-dist/doc/plain/tugboat/tubguide.pdfbin0 -> 140238 bytes
-rw-r--r--Master/texmf-dist/doc/plain/tugboat/tubguide.tex844
-rw-r--r--Master/texmf-dist/doc/plain/typespec/TypeSpec.pdfbin0 -> 646412 bytes
-rw-r--r--Master/texmf-dist/doc/plain/typespec/TypeSpec.tex255
-rw-r--r--Master/texmf-dist/doc/plain/vertex/vertex.doc289
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/00changes.txt36
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/00readme.txt49
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/monsyl.txt456
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/rgr.readme39
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/rgreekmacros.tex159
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/rgrhyph.tex1179
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/rgrpaper.tex763
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/rgrtestfont.tex274
-rw-r--r--Master/texmf-dist/doc/plain/yannisgr/tomakeformat.txt26
-rw-r--r--Master/texmf-dist/doc/texdraw/getopt.c762
-rw-r--r--Master/texmf-dist/doc/texdraw/getopt.h129
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw.cps109
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw.fns74
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw.pdfbin0 -> 222791 bytes
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw.texi2957
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_1.html82
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_10.html126
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_11.html205
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_2.html882
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_3.html369
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_4.html119
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_5.html314
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_6.html183
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_7.html250
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_8.html342
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_9.html321
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_foot.html25
-rw-r--r--Master/texmf-dist/doc/texdraw/texdraw_toc.html78
-rw-r--r--Master/texmf-dist/doc/texdraw/texi2dvi275
-rw-r--r--Master/texmf-dist/doc/texdraw/texindex.c1700
-rw-r--r--Master/texmf-dist/doc/texdraw/txdexamp.latex514
-rw-r--r--Master/texmf-dist/doc/texdraw/txdexamp.tex485
-rw-r--r--Master/texmf-dist/doc/texsis/base/COPYING287
-rw-r--r--Master/texmf-dist/doc/texsis/base/Example.tex232
-rw-r--r--Master/texmf-dist/doc/texsis/base/Fonts.tex112
-rw-r--r--Master/texmf-dist/doc/texsis/base/INSTALL17
-rw-r--r--Master/texmf-dist/doc/texsis/base/Install.tex66
-rw-r--r--Master/texmf-dist/doc/texsis/base/MANIFEST80
-rw-r--r--Master/texmf-dist/doc/texsis/base/Manual.fgl11
-rw-r--r--Master/texmf-dist/doc/texsis/base/Manual.ref174
-rw-r--r--Master/texmf-dist/doc/texsis/base/Manual.tbl24
-rw-r--r--Master/texmf-dist/doc/texsis/base/Manual.tex22
-rw-r--r--Master/texmf-dist/doc/texsis/base/NEWS61
-rw-r--r--Master/texmf-dist/doc/texsis/base/README151
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSapxF.doc55
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXScover.doc28
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSdcol.doc300
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSdoc.doc55
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSdoc0.doc293
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSdocM.doc142
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSend.doc137
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSenvmt.doc610
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSeqns.doc370
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSfigs.doc703
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSfmts.doc604
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSfonts.doc279
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSinstl.doc358
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSintro.doc353
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSletr.doc588
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSmisc.doc298
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSprns.doc95
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSrefs.doc474
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSrevs.doc484
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSruled.doc604
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSsects.doc899
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSsite.000164
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXSsymb.doc199
-rw-r--r--Master/texmf-dist/doc/texsis/base/TXStags.doc212
-rw-r--r--Master/texmf-dist/doc/texsis/base/index.tex296
-rwxr-xr-xMaster/texmf-dist/doc/texsis/base/letr230
-rw-r--r--Master/texmf-dist/doc/texsis/base/penguin.eps507
-rw-r--r--Master/texmf-dist/doc/texsis/base/penguin2.eps1041
-rw-r--r--Master/texmf-dist/doc/texsis/base/texsis.1219
-rw-r--r--Master/texmf-dist/doc/texsis/base/texsis.el46
-rw-r--r--Master/texmf-dist/doc/texsis/base/texsis.lsm46
-rw-r--r--Master/texmf-dist/doc/xmltex/base/englishutf16.xmlbin0 -> 194 bytes
-rw-r--r--Master/texmf-dist/doc/xmltex/base/russianutf8.xml7
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/ChangeLog24
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/Changes-2003-01150
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/README.passivetex33
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/index.html2771
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/latextei-fo.xml647
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/latextei.tex4
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/latextei.xml972
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/passivetex.xml388
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/properties.xml592
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/test.xml280
-rw-r--r--Master/texmf-dist/doc/xmltex/passivetex/xsa.xml14
448 files changed, 91479 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex3/galley/xhj-test.tex b/Master/texmf-dist/doc/latex3/galley/xhj-test.tex
new file mode 100644
index 00000000000..6ba6fa5486f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/galley/xhj-test.tex
@@ -0,0 +1,176 @@
+\documentclass{article}
+
+
+\setlength\textwidth{5cm}
+
+\usepackage{xparse,xhj,galley2}
+\tracinggalleys=2 % want tracing here
+
+
+\def\trace{\tracingassigns=1\tracingall}
+
+\IgnoreWhiteSpace
+
+% simple definition for \\
+% ignoring * form
+%
+\DeclareDocumentCommand\\{so}
+ {\leavevmode \unskip
+ \hskip \GAL@@linefillskip
+ \IfNoValueF{#2}{\vadjust{\vskip #2}}\break
+ }
+
+
+
+\setlength\parindent{12pt}
+
+\begin{document}
+
+some starting text
+
+%\trace
+\UseInstance{pshape}{staggered}
+
+\section{This should\\ be\\
+ a really staggered\\heading (but isn't)}
+
+In fact we should not be surprised since the standard \LaTeX{} heading
+code is essentially using its own pshape and thus overwriting the
+outer pshape declaration.
+
+\UseInstance{pshape}{staggered}
+\UseInstance{justification}{raggedright}
+This is a paragraph for testing various justification\\ settings. We have some
+text and after the word `word' \\ we just had a forced line break. We
+do some more line break testing, e.g., this\\[7pt] one was supposed to
+add 7pts of extra space.
+
+
+And here a paragraph for comparison with some text some text some text
+also-containing-a-longer-word some text some text some text some text
+some text some text some text.
+
+\section{Linebreaks}
+
+
+A line break with linebreak\linebreak
+and now ...
+
+% A line break with oldlinebreak\oldlinebreak
+% what takes longer?
+
+
+\section{Justified}
+
+%\trace
+some text\marginpar{\UseInstance{justification}{raggedright}\fussy
+ \fontfamily{pop}\fontsize{7}{9}\selectfont ZZZ Some text in
+ optima. Some text in optima. Some text in optima. Some text in
+ optima. Some text in optima.}
+some text some text some text some text some text some text some text
+some text some text some text some text some text some text
+some text some text some text some text some text some text some text
+some text some text some text some text some text some text
+some text some text some text some text some text some text some text
+some text some text some text some text some text some text
+
+%\trace
+
+\section{Raggedright}
+
+\UseInstance{justification}{raggedright}
+This is a paragraph for testing various justification settings. We have some
+text and after the word `word' \\ we just had a forced line break. We
+do some more line break testing, e.g., this\\[7pt] one was supposed to
+add 7pts of extra space.
+
+
+And here a paragraph for comparison with some text some text some text
+also-containing-a-longer-word some text some text some text some text
+some text some text some text.
+
+\section{Left}
+
+\UseInstance{justification}{raggedleft}
+\UseInstance{hyphenation}{off}\sloppy
+This is a paragraph for testing various justification settings. We have some
+text and after the word `word' \\ we just had a forced line break. We
+do some more line break testing, e.g., this\\[7pt] one was supposed to
+add 7pts of extra space.
+
+
+
+And here a paragraph for comparison with some text some text some text
+also-containing-a-longer-word some text some text some text some text
+some text some text some text.
+
+\tracingpages=1
+
+\section{Adjust}
+
+\UseInstance{justification}{adjust}
+\UseInstance{hyphenation}{on}\fussy
+This is a paragraph for testing various justification settings. We have some
+text and after the word `word' \\ we just had a forced line break. We
+do some more line break testing, e.g., this\\[7pt] one was supposed to
+add 7pts of extra space.
+
+
+And here a paragraph for comparison with some text some text some text
+also-containing-a-longer-word some text some text some text some text
+some text some text some text.
+
+\section{Center}
+
+\UseInstance{justification}{center}
+This is a paragraph for testing various justification settings. We have some
+text and after the word `word' \\ we just had a forced line break. We
+do some more line break testing, e.g., this\\[7pt] one was supposed to
+add 7pts of extra space.
+
+
+And here a paragraph for comparison with some text some text some text
+also-containing-a-longer-word some text some text some text some text
+some text some text some text.
+
+\section{Center first}
+
+\UseInstance{justification}{centerfirst-adjust}
+This is a paragraph for testing various justification settings. We have some
+This is a paragraph for testing various justification settings. We have some
+This is a paragraph for testing various justification settings. We have some
+This is a paragraph for testing various justification settings. We have some
+text and after the word `word' \\ we just had a forced line break. We
+do some more line break testing, e.g., this\\[7pt] one was supposed to
+add 7pts of extra space.
+This is a paragraph for testing various justification settings. We have some
+This is a paragraph for testing various justification settings. We have some
+This is a paragraph for testing various justification settings. We have some
+This is a paragraph for testing various justification settings. We have some
+
+
+And here a paragraph for comparison with some text some text some text
+also-containing-a-longer-word some text some text some text some text
+some text some text some text.
+
+
+\section{Center middle}
+
+\hrule
+
+\UseInstance{justification}{centermiddle}
+
+This is a paragraph for testing various justification settings. We have some
+text and after the word `word' \\ we just had a forced line break. We
+do some more line break testing, e.g., this\\[7pt] one was supposed to
+add 7pts of extra space.
+
+
+And here a paragraph for comparison with some text some text some text
+also-containing-a-longer-word some text some text some text some text
+some text some text some text.
+
+\hrule
+
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex3/template/template-test.tex b/Master/texmf-dist/doc/latex3/template/template-test.tex
new file mode 100644
index 00000000000..6a234e1010d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/template/template-test.tex
@@ -0,0 +1,39 @@
+\RequirePackage{template}
+
+\DeclareTemplateType{xxx}{0}
+
+\DeclareTemplate{xxx}{test}{0}
+ {
+ xkey=n \xkey,
+ key =i {yyy} \value
+ }
+ {
+ \DoParameterAssignments
+ \show\xkey
+ \show\value
+ \value
+ }
+
+\DeclareTemplateType{yyy}{0}
+
+\DeclareTemplate{yyy}{foo}{0}
+ {
+ keya =L \foo
+ }
+ {
+ \DoParameterAssignments
+ \show\foo
+ }
+
+
+\DeclareInstance{xxx}{bar}{test}
+ {
+ xkey = \UseTemplate{yyy}{foo}{ keya = 20pt },
+ key = \UseTemplate{yyy}{foo}{ keya = 10pt }
+ }
+
+\ShowInstance{xxx}{bar}
+
+\UseInstance{xxx}{bar}
+
+\stop
diff --git a/Master/texmf-dist/doc/latex3/template/tprestrict-test.tex b/Master/texmf-dist/doc/latex3/template/tprestrict-test.tex
new file mode 100644
index 00000000000..042853b97df
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/template/tprestrict-test.tex
@@ -0,0 +1,43 @@
+
+\makeatletter
+\RequirePackage{template}
+\IgnoreWhiteSpace
+
+\newcount\ca
+\newdimen\da
+
+
+\DeclareTemplateType{type}{0}
+
+%\tracingall\tracingassigns=1
+\DeclareTemplate{type}{Ta}{0}{
+ one =l [2in] \da,
+ two =c [5] \ca}
+ {\DoParameterAssignments\typeout{\da=\the\da,\@spaces \ca=\the\ca}}
+
+\ShowTemplate{type}{Ta}
+
+\typeout{1^^J==}
+\UseTemplate{type}{Ta}{}
+
+\typeout{2^^J==}
+\UseTemplate{type}{Ta}{one=44pt, two=7}
+
+
+\DeclareRestrictedTemplate{type}{Tb}{Ta}{one=33pt}
+
+\ShowTemplate{type}{Tb}
+
+\typeout{RESTRICT^^J3^^J==}
+
+\DeclareInstance{type}{foo}{Tb}{two=9}
+
+\ShowInstance{type}{foo}
+
+\UseInstance{type}{foo}
+
+\typeout{4^^J==}
+\UseTemplate{type}{Tb}{two=7}
+
+\stop
+
diff --git a/Master/texmf-dist/doc/latex3/xinitials/xinitials-test.tex b/Master/texmf-dist/doc/latex3/xinitials/xinitials-test.tex
new file mode 100644
index 00000000000..18b3ea3fc97
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xinitials/xinitials-test.tex
@@ -0,0 +1,326 @@
+
+
+\newcommand\sample{%
+ Infandum, regina, iubes renovare dolorem, Troianas ut opes et
+ lamen\-ta\-bile regnum cruerint Danai; quaeque ipse miserrima vidi,
+ et quorum pars magna fui. Quis talia fando Myrmidonum Dolopumve aut
+ duri miles Ulixi temperet a lacrimis? Et iam nox umida caelo
+ praecipitat, suadentque cadentia sidera somnos. Sed si tantus amor
+ casus cognoscere nostros et breviter Troiae supremum audire laborem,
+ quamquam animus meminisse horret, luctuque refugit, incipiam. \par}
+
+\newcommand\smallsample{%
+ Infandum, re\-gi\-na, iubes renovare do\-lo\-rem, Troi\-a\-n\-as ut
+ opes et la\-men\-ta\-bile regnum cru\-e\-rint Da\-nai; qua\-e\-que
+ ip\-se mis\-er\-ri\-ma vi\-di, et quorum pars ma\-g\-na fui. Quis
+ talia fando Myrmidonum Dolopumve aut duri miles Ulixi temperet a
+ lacrimis?\par}
+
+
+\documentclass[twocolumn]{article}
+
+\setlength{\columnsep}{60pt}
+
+\addtolength{\textheight}{\baselineskip}
+
+\frenchspacing
+
+\usepackage{times}
+
+
+\input{xinitials.sig}
+
+%\tracinggalleys=2
+
+\def\trace{\tracingassigns=1\tracingall}
+
+
+\begin{document}
+
+This document requires the use of Optima fonts. If they are not
+available something will get substituted but of course then the
+adjustments in the instances are probably no longer adequate (though
+they are not really adequate right now either :-)
+
+\section{Random manual initials}
+
+\ExtendedInitial*[
+ initial-font = \fontfamily{pop}\fontsize{40}{40}\selectfont,
+ v-adjust = 1pt,
+ h-adjust = -2pt,
+ nominal-height = 20pt,]
+So! do good
+ initials might look like this?
+\smallsample
+
+
+\ExtendedInitial*[
+ initial-font = \fontsize{40}{40}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = -4pt,
+ h-adjust = 0pt,
+ text-sep = 1pt,
+ nominal-height = 0pt,
+ initial-format = \llap{#1}, ]
+Initials can be set out of the body font family by simply using an \smallsample
+
+
+\ExtendedInitial*[
+ initial-font = \fontsize{40}{40}\selectfont,
+ parshape-list = {0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = 0pt,
+ text-sep = 0pt,
+ nominal-height = 0pt,]
+{$\Im$}nitials are large letters which are sometimes used to mark the start
+of a paragraph, typically the first paragraph of a chapter.
+
+\hrule
+\ExtendedInitial*[
+ initial-font = \fontsize{40}{40}\selectfont,
+ parshape-list = {0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = 0pt,
+ text-sep = 0pt,
+ nominal-height = 0pt,]
+{$\Im$}nitials are large letters which are sometimes used to mark the start
+of a paragraph, typically the first paragraph of a chapter.
+
+
+
+\section{A default}
+
+\DeclareInstance{initial}{default}{std}{
+ initial-font = \fontfamily{pop}\fontsize{40}{40}\selectfont,
+ parshape-list = {0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -1pt,
+ text-sep = 3pt,
+}
+
+\Initial A good initial might look like this?
+\smallsample
+
+\subsection{Overwritten for A}
+
+\DeclareInstance{initial}{A}{std}{
+ initial-font = \fontfamily{pop}\fontsize{40}{40}\selectfont,
+ parshape-list = {-4pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -2pt,
+ text-sep = 3pt,
+}
+
+\Initial A good initial might look like this?
+\smallsample
+
+
+\newpage
+
+\section{Default again followed by random}
+
+\Initial Or like like this?
+\smallsample
+
+
+\ExtendedInitial * [
+ initial-font = \fontfamily{pop}\fontsize{40}{40}\selectfont,
+ parshape-list = {3pt,3pt},
+ v-adjust = 0pt,
+ h-adjust = 0pt,
+ text-sep = 0pt,
+ initial-format = \fbox{#1},]
+Or does it look like this?
+\smallsample
+
+\ExtendedInitial * [
+ initial-font = \fontfamily{pop}\fontsize{100}{100}\selectfont,
+ v-adjust = 1pt,
+ h-adjust = -2pt,
+ text-sep = 4pt,]
+Anything might work
+\smallsample
+\par
+
+%\newpage
+
+
+\section{Comparisons}
+
+
+\Initial What is better?
+\smallsample
+
+\medskip
+
+\ExtendedInitial * [
+ initial-font = \fontfamily{pop}\fontsize{40}{40}\bfseries,
+ parshape-list = {0pt,-6pt},
+ v-adjust = 0pt,
+ h-adjust = -2pt,
+ text-sep = 3pt,]
+What is better?
+\smallsample
+
+\section{Some drop initials}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
+
+\DeclareCollectionInstance{drop3}{initial}{default}{std}{
+ initial-font = \fontsize{36}{36}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = 0pt,
+ text-sep = 2pt,
+}
+
+
+\UseCollection{initial}{drop3}
+
+\fontsize{8}{9.8}\selectfont
+
+\Initial Y[ou] don't think so? \smallsample
+
+\medskip
+
+\Initial W[hy] don't you think so? \smallsample
+
+\medskip
+
+\Initial T[his] is disgraceful! \smallsample
+
+
+\section{\dots additionally moved into the margin}
+
+\DeclareCollectionInstance{drop3}{initial}{Y}{std}{
+ initial-font = \fontsize{36}{36}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -6pt,
+ text-sep = 2pt,
+}
+
+
+\DeclareCollectionInstance{drop3}{initial}{T}{std}{
+ initial-font = \fontsize{36}{36}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -6pt,
+ text-sep = 2pt,
+}
+
+
+\DeclareCollectionInstance{drop3}{initial}{W}{std}{
+ initial-font = \fontsize{36}{36}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -10pt,
+ text-sep = 2pt,
+}
+
+\medskip
+
+
+\Initial Y[ou] don't think so? \smallsample
+
+\medskip
+
+\Initial W[hy] don't you think so? \smallsample
+
+\medskip
+
+\Initial T[his] is disgraceful! \smallsample
+
+
+\section{How about quotes?}
+
+\Initial [``]{Y}[ou don't think so?]'' \smallsample
+
+\medskip
+
+\Initial [``]{W}[hy don't you think so?]'' \smallsample
+
+\medskip
+
+\Initial [``]{T}[his is disgraceful!]'' \smallsample
+
+
+
+\section{Fixing quotes first step}
+
+\DeclareCollectionInstance{drop3}{initial}{Y}{std}{
+ initial-font = \fontsize{36}{36}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -6pt,
+ quote-sep = 3pt,
+ text-sep = 2pt,
+}
+
+\DeclareCollectionInstance{drop3}{initial}{T}{std}{
+ initial-font = \fontsize{36}{36}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -6pt,
+ quote-sep = 3pt,
+ text-sep = 2pt,
+}
+
+
+\DeclareCollectionInstance{drop3}{initial}{W}{std}{
+ initial-font = \fontsize{36}{36}\selectfont,
+ parshape-list = {0pt,0pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -10pt,
+ quote-sep = 3pt,
+ text-sep = 2pt,
+}
+
+\medskip
+
+\Initial [``]{Y}[ou don't think so?]'' \smallsample
+
+\medskip
+
+\Initial [``]{W}[hy don't you think so?]'' \smallsample
+
+\medskip
+
+\Initial [``]{T}[his is disgraceful!]'' \smallsample
+
+
+
+\section{Fixing quotes alternative}
+
+\ExtendedInitial * [
+ initial-font = \fontfamily{pop}\fontsize{40}{40}\selectfont,
+ parshape-list = {-5pt,0pt},
+ v-adjust = 0pt,
+ h-adjust = -1pt,
+ quote-sep = -5pt,
+ text-sep = 3pt,
+ quote-format = \LARGE #1,
+ ]
+[``]{A} good initial might look like this?''
+\smallsample
+
+
+
+
+\section{Accented letters as initials}
+
+\ExtendedInitial* [
+ initial-font = \fontfamily{pop}\fontsize{40}{40}\selectfont,
+ parshape-list = {-1pt,-3pt},
+ v-adjust = 1pt,
+ h-adjust = -5pt,
+ text-sep = 0pt,
+ ]
+ {\"U}ber den sieben Bergen bei den sieben Zwergen \smallsample
+
+
+\ExtendedInitial
+ {\"U}ber den sieben Bergen bei den sieben Zwergen \smallsample
+
+\stop
+
diff --git a/Master/texmf-dist/doc/latex3/xor/cat.eps b/Master/texmf-dist/doc/latex3/xor/cat.eps
new file mode 100644
index 00000000000..0042ea088fe
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/cat.eps
@@ -0,0 +1,305 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%BoundingBox: 44 527 80 559
+%%Creator: COREL DRAW
+%%Title: CAT.TMP
+%%CreationDate: Sat Jan 18 17:29:05 1992
+
+%%DocumentFonts:
+%%EndComments
+%%BeginProlog
+% -------------- POSTSCRIPT PROLOG FOR CORELDRAW 2.X ------
+% Copyright Corel Systems Corporation 1990
+/AutoFlatness 0 def/wCorelDict 300 dict def
+wCorelDict begin/bd{bind def}bind def/ld{load def}bd
+/xd{exch def}bd/_ null def/$c 0 def/$m 0 def
+/$y 0 def/$k 0 def/$t 1 def/$n _ def/$o 0 def
+/$fil 0 def/$C 0 def/$M 0 def/$Y 0 def/$K 0 def
+/$T 1 def/$N _ def/$O 0 def/$PF false def
+/$pan 0 def/$h false def/$al 0 def/$tr 0 def
+/$le 0 def/$lx 0 def/$ly 0 def/$ctm matrix currentmatrix def
+/$ptm matrix def/$ttm matrix def/$stm matrix def
+/$skm matrix def/$fst 128 def/$pad 0 def/$rox 0 def
+/$roy 0 def currentscreen/@dsp xd/$dsp/@dsp def
+/$dsa xd/$dsf xd/$sdf false def/$SDF false def
+/$Scra 0.0 def statusdict/pageparams known{statusdict begin
+pageparams end 1 ne{/$Scra -90.0 def}if pop pop pop}if
+/$sv 0 def/@cp/closepath ld/@gs/gsave ld/@gr/grestore ld
+/@np/newpath ld/@sv{/$sv save def}bd/@rs{$sv restore}bd
+/@ss{load setscreen}bd AutoFlatness 1 eq{/$cpx ([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator;\n) def
+/@err1{$cpx print flush newpath}bd/@ifl{currentflat dup 10 gt{pop @err1 exit}if 2 add setflat}bd
+/@fill/fill ld/fill{currentflat{{@fill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd
+/@eofill/eofill ld/eofill{currentflat{{@eofill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd
+/@clip/clip ld/clip{currentflat{{@clip}stopped{initclip @ifl}{exit}ifelse}bind loop setflat}bd
+/@eoclip/eoclip ld/eoclip{currentflat{{@eoclip}stopped{initclip @ifl}{exit}ifelse}bind loop setflat}bd
+/@stroke/stroke ld/stroke{currentflat{{@stroke}stopped{@ifl}{exit}ifelse}bind loop setflat}bd
+}if/InRange{3 -1 roll 2 copy le{pop}{exch pop}ifelse
+2 copy ge{pop}{exch pop}ifelse}bd/wDstChck{2 1 roll dup 3 -1 roll
+eq{1 add}if}bd/@dot{dup mul exch dup mul add 1 exch sub 2 div}bd
+/@lin{exch pop abs 1 exch sub}bd/@MN{2 copy le{pop}{exch pop}ifelse}bd
+/setcmykcolor where{pop}{/setcmykcolor{4 1 roll
+3{3 index add 1 @MN 1 exch sub 3 1 roll}repeat
+setrgbcolor pop}bd}ifelse/colorimage where{pop}{/colorimage{/$ncl xd
+pop pop pop pop{currentfile $dat readhexstring pop}repeat
+pop}bd}ifelse/@tc{dup 1 ge{pop}{4{dup 6 -1 roll
+mul exch}repeat pop}ifelse}bd/@spc{7 2 roll
+ColorSeparationMode 1 eq{6 index @tc 0 4 $ink sub index
+exch pop}{5 index dup _ eq{pop 0 4 $ink sub index
+exch pop}{CurrentInkName eq{6 index}{0}ifelse}ifelse}ifelse
+5 1 roll 8 -2 roll 6{pop}repeat 1 exch sub dup setgray
+1 eq exch 1 eq and not}bd/@scc{$ink -1 eq
+{$c $m $y $k $t @tc setcmykcolor true}{$o $c $m $y $k $t $n @spc
+}ifelse}bd/@SCC{$ink -1 eq{$C $M $Y $K $T @tc setcmykcolor true}{
+$O $C $M $Y $K $T $N @spc}ifelse}bd/@sft{
+/$tx $tllx $pxf add dup $tllx gt{$pwid sub}if def
+/$ty $tury $pyf sub dup $tury lt{$phei add}if def}bd
+/@stb{pathbbox/$ury xd/$urx xd/$lly xd/$llx xd}bd
+/@ep{{cvx exec}forall}bd/@tp{@sv/$in true def
+2 copy dup $lly le{/$in false def}if $phei sub $ury ge{/$in false def}if
+dup $urx ge{/$in false def}if $pwid add $llx le{/$in false def}if
+$in{@np 2 copy moveto $pwid 0 rlineto 0 $phei neg rlineto
+$pwid neg 0 rlineto 0 $phei rlineto clip @np
+$pn cvlit load aload pop 7 -1 roll 5 index sub
+7 -1 roll 3 index sub translate/$ctm matrix currentmatrix def
+@ep pop pop pop pop}{pop pop}ifelse @rs}bd/@th{@sft
+0 1 $tly 1 sub{dup $psx mul $tx add{dup $llx gt{$pwid sub}{exit}ifelse
+}loop exch $phei mul $ty exch sub 0 1 $tlx 1 sub{$pwid mul
+3 copy 3 -1 roll add exch @tp pop}for pop pop}for}bd
+/@tv{@sft 0 1 $tlx 1 sub{dup $pwid mul $tx add
+exch $psy mul $ty exch sub{dup $ury lt{$phei add}{exit}ifelse}loop
+0 1 $tly 1 sub{$phei mul 3 copy sub @tp pop}for
+pop pop}for}bd/@pf{@gs $ctm setmatrix $pm concat
+@stb @gs ColorSeparationMode 0 eq{1 setgray eofill}{
+$o 0 0 0 0 0 (Black) @spc{eofill}if}ifelse
+@gr eoclip Bburx Bbury $pm itransform/$tury xd/$turx xd
+Bbllx Bblly $pm itransform/$tlly xd/$tllx xd
+/$wid $turx $tllx sub def/$hei $tury $tlly sub def
+$wid 0 gt $hei 0 gt and{$pn cvlit load aload pop
+/$pd xd 3 -1 roll sub/$phei xd exch sub/$pwid xd
+/$tlx $wid $pwid div ceiling 1 add def/$tly $hei $phei div ceiling 1 add def
+$psx 0 eq{@tv}{@th}ifelse}if @gr @np}bd/@dlt{ColorSeparationMode 0 eq{
+/$dc $toc $tot mul $frc $frt mul dup/$c xd sub $fst 1 sub div def
+/$dm $tom $tot mul $frm $frt mul dup/$m xd sub $fst 1 sub div def
+/$dy $toy $tot mul $fry $frt mul dup/$y xd sub $fst 1 sub div def
+/$dk $tok $tot mul $frk $frt mul dup/$k xd sub $fst 1 sub div def
+true}{$o $frc $frm $fry $frk $frt $frn @spc
+dup{/$frk 1 currentgray sub def}{/$frk 0 def}ifelse
+$o $toc $tom $toy $tok $tot $ton @spc dup{/$tok 1 currentgray sub def}
+{/$tok 0 def}ifelse or dup{/$c 0 def/$m 0 def/$y 0 def/$k $frk def
+/$dc 0 def/$dm 0 def/$dy 0 def/$dk $tok $frk sub $fst 1 sub div def}if
+}ifelse}bd/@ftl{1 index 4 index sub dup $pad mul dup/$pdw xd
+2 mul sub $fst div/$wid xd 2 index sub/$hei xd
+pop translate $c $m $y $k 4 copy ColorSeparationMode 0 ne
+{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
+0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill
+$pdw 0 translate $fst{4 copy ColorSeparationMode 0 ne
+{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
+0 0 moveto 0 $hei lineto $wid $hei lineto $wid 0 lineto 0 0 lineto fill
+$wid 0 translate $dk add 4 1 roll $dy add 4 1 roll
+$dm add 4 1 roll $dc add 4 1 roll}repeat $dk sub 4 1 roll
+$dy sub 4 1 roll $dm sub 4 1 roll $dc sub 4 1 roll
+ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop}
+{setcmykcolor}ifelse 0 0 moveto 0 $hei lineto $pdw $hei lineto $pdw 0 lineto 0 0 lineto fill
+}bd/@ftr{1 index 4 index sub dup $rox mul/$row xd
+2 div 1 index 4 index sub dup $roy mul/$roh xd
+2 div 2 copy dup mul exch dup mul add sqrt
+$row dup mul $roh dup mul add sqrt add dup/$hei xd $fst div/$wid xd
+4 index add $roh add exch 5 index add $row add
+exch translate pop pop pop pop currentflat 5 mul setflat
+$c $m $y $k 4 copy ColorSeparationMode 0 ne
+{1 exch sub setgray pop pop pop}{setcmykcolor}ifelse
+$wid 0 moveto 0 0 $hei 0 360 arc fill 1.0 $pad 2 mul sub dup scale
+$fst{4 copy ColorSeparationMode 0 ne{1 exch sub setgray pop pop pop}
+{setcmykcolor}ifelse $wid 0 moveto 0 0 $hei 0 360 arc fill
+/$hei $hei $wid sub def $dk add 4 1 roll $dy add 4 1 roll
+$dm add 4 1 roll $dc add 4 1 roll}repeat pop pop pop pop}bd
+/@ff{@gs @dlt{$ctm setmatrix eoclip newpath Bbllx Bblly moveto
+Bbllx Bbury lineto Bburx Bbury lineto Bburx Bblly lineto
+$fan rotate pathbbox newpath $fty 1 eq{@ftr}{@ftl}ifelse}if
+@gr @np}bd/@Pf{@sv ColorSeparationMode 0 eq $ink 3 eq or{$ctm setmatrix
+72 1000 div dup matrix scale dup concat dup Bburx exch Bbury exch itransform
+ceiling cvi/Bbury xd ceiling cvi/Bburx xd Bbllx exch Bblly exch itransform
+floor cvi/Bblly xd floor cvi/Bbllx xd $Prm aload pop
+$Psn load exec}{1 setgray eofill}ifelse @rs
+@np}bd/@ftx{{(0) dup 3 -1 roll 0 exch put
+@gs true charpath currentpoint $ctm setmatrix
+@@txt @gr @np moveto $tr 0 rmoveto}forall pop}bd
+/@sm{/$ctm $ctm currentmatrix def}bd/@lorg{$lx $ly moveto
+/$ly $ly $le sub def}bd/@ft{matrix currentmatrix 3 1 roll
+$sdf{$scf $sca $scp @ss}if $fil 1 eq{/@@txt/@pf ld @ftx}{$fil 2 eq
+{/@@txt/@ff ld @ftx}{$fil 3 eq{/@@txt/@Pf ld @ftx}{@scc
+{dup $tr exch 0 exch ashow}if pop pop}ifelse}ifelse}ifelse
+$sdf{$dsf $dsa $dsp @ss}if setmatrix}bd/@st{
+matrix currentmatrix 3 1 roll $SDF{$SCF $SCA $SCP @ss}if
+@SCC{{(0) dup 3 -1 roll 0 exch put @gs true charpath currentpoint
+$ctm setmatrix $ptm concat stroke @gr moveto $tr 0 rmoveto}forall
+pop}{pop pop}ifelse $SDF{$dsf $dsa $dsp @ss}if
+setmatrix}bd/@pt{dup length exch}bd/@te{@pt
+@lorg @ft cleartomark [}bd/@tr{@pt @lorg @st cleartomark [}bd
+/@ta{@pt @lorg 2 copy @gs @ft @gr @st cleartomark [}bd
+/@t@a{@pt @lorg 2 copy @gs @st @gr @ft cleartomark [}bd
+/g{1 exch sub/$k xd/$c 0 def/$m 0 def/$y 0 def/$t 1 def/$n _ def/$fil 0 def
+}bd/G{1 exch sub/$K xd/$C 0 def/$M 0 def/$Y 0 def/$T 1 def/$N _ def}bd
+/k{/$k xd/$y xd/$m xd/$c xd/$t 1 def/$n _ def/$fil 0 def}bd
+/K{/$K xd/$Y xd/$M xd/$C xd/$T 1 def/$N _ def}bd
+/x{1 exch sub/$t xd/$n xd/$k xd/$y xd/$m xd/$c xd/$fil 0 def}bd
+/X{1 exch sub/$T xd/$N xd/$K xd/$Y xd/$M xd/$C xd}bd
+/d/setdash ld/i{dup 0 ne{setflat}{pop}ifelse}bd
+/j/setlinejoin ld/J/setlinecap ld/M/setmiterlimit ld
+/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd
+/c/curveto ld/C/c ld/v{4 -2 roll 2 copy 6 -2 roll curveto}bd
+/V/v ld/y{2 copy curveto}bd/Y/y ld/l/lineto ld
+/L/l ld/m/moveto ld/n/newpath ld/N/newpath ld
+/F{matrix currentmatrix $sdf{$scf $sca $scp @ss}if
+$fil 1 eq{@pf}{$fil 2 eq{@ff}{$fil 3 eq{@Pf}{@scc{eofill}{@np}ifelse
+}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}if
+setmatrix}bd/f{@cp F}bd/S{matrix currentmatrix
+$ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if @SCC{$skm currentmatrix
+$ptm concat stroke setmatrix}{@np}ifelse $SDF{$dsf $dsa $dsp @ss}if
+setmatrix}bd/s{@cp S}bd/B{@gs F @gr S}bd/b{@cp B}bd
+/W{eoclip}bd/p{/$pm xd 7{pop}repeat/$pyf xd/$pxf xd
+/$pn xd/$fil 1 def}bd/P{11{pop}repeat}bd/z{/$al xd
+/$tr xd/$le xd exch findfont exch scalefont setfont}bd
+/Z{dup type 0 type eq{/$bDir xd}if findfont
+dup maxlength 1 add dict exch dup{1 index/FID ne{3 index
+3 1 roll put}{pop pop}ifelse}forall pop dup dup/Encoding get
+256 array copy dup/$fe xd/Encoding exch put
+dup/Fontname 3 index put 3 -1 roll dup length 0 ne{0 exch{
+dup type 0 type eq{exch pop}{$fe exch 2 index exch put
+1 add}ifelse}forall pop}if definefont pop}bd
+/e{@sm concat [/t{@te}def}bd/r{@sm concat [/t{@tr}def}bd
+/o{@sm concat [/t{pop}def}bd/a{@sm concat [/t{@ta}def}bd
+/t{@te}def/T{cleartomark @np/$lx 0 def/$ly 0 def
+$ctm setmatrix/$ttm matrix def}bd/u{}bd/U{}bd
+/A{pop}bd/H{/$h true def}bd/h{@cp H}bd/q/@gs ld
+/Q/@gr ld/E{5 array astore exch cvlit exch def}bd
+/`{}bd/~{}bd/@{}bd/&{}bd/CorelDrawRencodeVect [
+16#80/grave/circumflex/tilde/dotlessi/florin/quotedblleft/quotedblright/guilsinglleft
+16#88/guilsinglright/fi/fl/dagger/daggerdbl/endash/periodcentered/breve
+16#90/quotedblbase/ellipsis/perthousand/trademark/Pt/fractionbar
+16#98/divide 16#a1/exclamdown/cent/sterling/currency/yen/bar/section
+16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/emdash/registered/overbar
+16#b0/ring/plusminus/twosuperior/threesuperior/acute/mu/paragraph/bullet
+16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/OE
+16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/oe
+16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] def/@cc{currentfile $dat readhexstring pop}bd
+/@ii{concat 3 index 3 index m 3 index 1 index l
+2 copy l 1 index 3 index l 3 index 3 index l
+clip pop pop pop pop}bd/@E{/Bbury xd/Bburx xd
+/Bblly xd/Bbllx xd}bd/@c{@cp}bd/@p{/$fil 1 def
+/$pm xd/$psy xd/$psx xd/$pyf xd/$pxf xd/$pn xd}bd
+/@P{/$fil 3 def/$Psn xd array astore/$Prm xd}bd
+/@k{/$fil 2 def/$roy xd/$rox xd/$pad xd/$fty xd/$fan xd
+$fty 1 eq{/$fan 0 def}if/$tok xd/$toy xd/$tom xd/$toc xd
+/$frk xd/$fry xd/$frm xd/$frc xd/$frn _ def/$frt 1 def/$ton _ def/$tot 1 def
+}bd/@x{/$fil 2 def/$roy xd/$rox xd/$pad xd
+/$fty xd/$fan xd 1 exch sub/$tot xd/$ton xd/$tok xd/$toy xd/$tom xd/$toc xd
+1 exch sub/$frt xd/$frn xd/$frk xd/$fry xd/$frm xd/$frc xd}bd
+/@i{@sm @gs @ii 5 index 1 ne{@gs 1 g F @gr}if
+1 eq 5 index 1 eq and{@gs $ctm setmatrix F @gr}if
+@np/$ury xd/$urx xd/$lly xd/$llx xd/$bts xd
+/$hei xd/$wid xd/$dat $wid $bts mul 8 div ceiling cvi string def
+$bts 1 eq{@SCC/$frg xd}{1 G @SCC/$frg xd}ifelse
+$frg{$SDF{$SCF $SCA $SCP @ss}if $llx $lly translate
+$urx $llx sub $ury $lly sub scale $wid $hei abs
+$bts 1 eq{false}{$bts}ifelse [ $wid 0 0 $hei neg 0
+$hei 0 gt{$hei}{0}ifelse]/@cc load $bts 1 eq{imagemask}{image}ifelse
+$SDF{$dsf $dsa $dsp @ss}if}{$hei{@cc pop}repeat}ifelse
+@gr $ctm setmatrix}def/@M {@sv}bd/@N{/@cc{}def
+12 -1 roll neg 12 1 roll @i @rs}bd/@I{@sm @gs
+@ii @np/$ury xd/$urx xd/$lly xd/$llx xd/$ncl xd
+/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div ceiling cvi string def
+$llx $lly translate $urx $llx sub $ury $lly sub scale
+$wid $hei $bts [ $wid 0 0 $hei neg 0 $hei]/@cc load
+false $ncl colorimage @gr $ctm setmatrix}bd
+/@t{/$lx 0 def/$ly 0 def/$stm $stm currentmatrix def
+3 1 roll translate $ttm concat 1 exch t $stm setmatrix}def
+/@n{/$ttm exch matrix rotate def}bd/@z{ exch findfont exch scalefont setfont
+}bd/@s{}bd/@l{}bd/@B{@gs S @gr F}bd/@b{@cp @B}bd
+/@a{@sm concat [/t{@t@a}def}bd/@w{5 2 roll dup/$pan xd
+matrix rotate/$ptm xd matrix scale $ptm dup concatmatrix/$ptm xd
+1 eq{$ptm exch dup concatmatrix/$ptm xd}{pop}ifelse
+1 w}bd/@g{1 eq dup/$sdf xd{/$scp xd/$sca xd
+/$scf xd}if}bd/@G{1 eq dup/$SDF xd{/$SCP xd
+/$SCA xd/$SCF xd}if}bd/@D{3 copy @ss/$dsp xd
+/$dsa xd/$dsf xd}bd/@j{@sv @np}bind def/@J{@rs}bind def
+/@sep{/ColorSeparationMode where{pop}{/ColorSeparationMode 0 def
+/CurrentInkName (Composite) def}ifelse ColorSeparationMode 0 eq
+{/CurrentInkName (Composite) def}if/CurrentInkName where{pop}{
+/CurrentInkName (Composite) def}ifelse CurrentInkName (Composite) eq{/$ink -1 def}
+{CurrentInkName (Cyan) eq{/$ink 0 def} {CurrentInkName (Magenta) eq{/$ink 1 def}
+{CurrentInkName (Yellow) eq{/$ink 2 def} {CurrentInkName (Black) eq{/$ink 3 def}
+{/$ink 4 def}ifelse}ifelse}ifelse}ifelse}ifelse}bd
+@sep/@whi{@gs -72000 dup moveto -72000 72000 lineto
+72000 dup lineto 72000 -72000 lineto closepath 1 setgray fill
+@gr}bd/@neg{ [{1 exch sub}/exec cvx currenttransfer/exec cvx] cvx settransfer
+@whi}bd/@reg{[] 0 d 0 setgray .3 setlinewidth
+2 copy 5.4 0 360 arc closepath 2 copy moveto 9 0 rlineto
+2 copy moveto -9 0 rlineto 2 copy moveto 0 9 rlineto
+moveto 0 -9 rlineto stroke}bd/leftbracket{(\050)}def
+/rightbracket{(\051)}def
+
+%%EndProlog
+%%BeginSetup
+11.4737 setmiterlimit
+1.00 setflat
+/$fst 128 def
+
+%%EndSetup
+@sv
+/$ctm matrix currentmatrix def
+u
+%%Note: Object
+45.22 528.19 78.98 558.14 @E
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+1.01 1.01 0.00 [1.00000 0.00000 0.00000 1.00000 0.00000 0.00000] 0 @w
+%%CURV 106
+73.30 539.78 m
+73.08 538.42 72.22 537.26 71.78 536.33 C
+72.79 534.67 73.73 531.43 74.81 530.64 C
+74.59 530.64 77.04 528.84 73.87 529.06 C
+73.08 529.34 73.08 530.93 70.20 533.81 C
+69.70 533.74 70.56 530.57 71.50 529.63 c
+73.15 528.19 70.27 528.55 70.13 528.62 C
+68.98 529.34 68.62 534.60 67.03 536.26 c
+66.24 537.19 65.16 536.98 64.30 536.90 C
+63.22 536.62 60.62 537.19 60.55 534.02 C
+60.62 532.66 62.14 530.21 62.86 529.78 c
+65.30 528.41 62.06 528.34 61.70 528.77 C
+61.13 529.34 60.19 530.64 59.26 531.65 C
+57.74 532.44 56.38 533.66 56.02 534.96 C
+54.94 534.74 53.86 534.17 53.64 533.23 C
+53.42 532.22 53.86 531.58 54.86 530.14 C
+56.02 529.85 56.38 529.27 56.02 528.98 c
+55.87 528.84 53.71 528.62 53.57 528.91 C
+52.70 529.49 51.70 531.86 51.19 533.16 c
+50.90 533.88 49.97 535.82 51.55 537.77 C
+51.98 538.49 51.91 539.86 51.77 540.65 c
+51.55 541.94 51.55 542.74 52.42 544.46 C
+49.75 546.77 45.22 551.23 49.61 557.14 C
+50.11 557.64 51.55 558.14 50.76 556.27 C
+49.82 553.68 46.66 551.45 53.42 546.19 C
+54.50 546.91 58.97 546.48 60.48 546.19 c
+64.66 545.33 65.52 545.33 68.40 546.05 C
+68.76 546.19 68.83 547.99 70.34 549.22 C
+70.06 550.15 72.00 551.45 72.22 552.53 C
+72.65 553.39 73.66 550.73 73.66 550.66 C
+73.58 551.23 74.66 552.31 74.81 552.96 C
+75.74 553.25 75.10 550.94 75.89 549.50 c
+76.32 548.93 76.68 549.07 77.11 547.70 C
+77.47 546.34 78.98 545.18 76.54 543.89 c
+75.17 543.17 74.59 543.31 73.58 542.88 C
+73.58 542.23 73.51 540.79 73.30 539.78 c
+@c
+S
+U
+@rs
+%%Trailer
+ end
diff --git a/Master/texmf-dist/doc/latex3/xor/escher.eps b/Master/texmf-dist/doc/latex3/xor/escher.eps
new file mode 100644
index 00000000000..87e6b36a84f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/escher.eps
@@ -0,0 +1,63 @@
+%!
+%%BoundingBox: 0 0 236 236
+% M. C. Escher style impossible triangle
+% written by Guy Shaw
+
+% Things that are easy to play with:
+% Position on paper, overall size, and linewidth
+/inch { 72 mul } bind def
+
+gsave
+
+.15 inch 0 translate
+3 inch dup scale
+1 3 inch div setlinewidth
+
+% Thickness parameter:
+% /Thick is the thickness of the structural members of the triange,
+% as a fraction of the height of the triangle.
+% Reasonable looking impossible triangles can be obtained with Thick <= 1/6.
+% right at /Thick == 1/6, there is no space left inside the triangle.
+% /Thick > 1/6 yields bizarre, but not very interesting results.
+% /Thick < 1/20 is less interesting, because the "impossibility"
+% is not so striking when the structural members are that thin.
+% A good "standard" value is 1/8.
+
+/Thick 1 8 div def
+
+% You would not normally want to change anything that follows.
+
+/Tall 1 def
+/HalfThick Thick .5 mul def
+
+newpath
+ HalfThick Thick moveto
+ Thick 0 lineto
+ 1 Thick sub 0 lineto
+ 1 HalfThick sub Thick lineto
+ .5 HalfThick add Tall Thick sub lineto
+
+ 1 Thick sub 0 moveto
+ .5 HalfThick add Tall 3 Thick mul sub lineto
+ Thick 3 mul Thick 2 mul lineto
+
+ 1 Thick 2.5 mul sub Thick moveto
+ .5 Tall Thick 4 mul sub lineto
+stroke
+
+newpath
+ HalfThick Thick moveto
+ 1 Thick 2.5 mul sub Thick lineto
+ HalfThick neg Thick rlineto
+ Thick Thick add Thick Thick add lineto
+ .5 HalfThick add Tall Thick sub lineto
+ Thick neg 0 rlineto
+ closepath
+fill
+grestore
+/Helvetica findfont 30 scalefont setfont
+0 5 moveto (L) show
+3.1 inch 5 moveto (R) show
+1.6 inch 2.7 inch moveto (T) show
+showpage
+
diff --git a/Master/texmf-dist/doc/latex3/xor/europe.eps b/Master/texmf-dist/doc/latex3/xor/europe.eps
new file mode 100644
index 00000000000..c0b0c013f8f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/europe.eps
@@ -0,0 +1,3227 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: FreeHand
+%%Title: #13
+%%CreationDate: 12/3/90 15:59
+%%BoundingBox: 105 61 747 537
+%%DocumentProcSets: FreeHand_header 2 0
+%%DocumentSuppliedProcSets: FreeHand_header 2 0
+%%ColorUsage: Color
+%%CMYKProcessColor: 0 0 0 0.1 (10% gray)
+%%+ 0 0 0 0.2 (20% gray)
+%%+ 0 0 0 0.4 (40% gray)
+%%+ 0 0 0 0.6 (60% gray)
+%%+ 0 0 0 0.8 (80% gray)
+%%EndComments
+%%BeginProcSet: FreeHand_header 2 0
+/FreeHandDict 200 dict def
+FreeHandDict begin
+/currentpacking where{pop true setpacking}if
+/bdf{bind def}bind def
+/bdef{bind def}bdf
+/xdf{exch def}bdf
+/ndf{1 index where{pop pop pop}{dup xcheck{bind}if def}ifelse}bdf
+/min{2 copy gt{exch}if pop}bdf
+/max{2 copy lt{exch}if pop}bdf
+/dr{transform .25 sub round .25 add
+exch .25 sub round .25 add exch itransform}bdf
+/curveto{dr curveto}bdf
+/lineto{dr lineto}bdf
+/moveto{dr moveto}bdf
+/graystep 1 256 div def
+/bottom -0 def
+/delta -0 def
+/frac -0 def
+/left -0 def
+/numsteps -0 def
+/numsteps1 -0 def
+/radius -0 def
+/right -0 def
+/top -0 def
+/x -0 def
+/y -0 def
+/df currentflat def
+/tempstr 1 string def
+/clipflatness 3 def
+/inverted?
+0 currenttransfer exec .5 ge def
+/concatprocs{
+/proc2 exch cvlit def/proc1 exch cvlit def
+/newproc proc1 length proc2 length add array def
+newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval
+newproc cvx}bdf
+/storerect{/top xdf/right xdf/bottom xdf/left xdf}bdf
+/rectpath{newpath left bottom moveto left top lineto
+right top lineto right bottom lineto closepath}bdf
+/sf{dup 0 eq{pop df dup 3 mul}{dup} ifelse /clipflatness xdf setflat}bdf
+version cvr 38.0 le
+{/setrgbcolor{
+currenttransfer exec 3 1 roll
+currenttransfer exec 3 1 roll
+currenttransfer exec 3 1 roll
+setrgbcolor}bdf}if
+/gettint{0 get}bdf
+/puttint{0 exch put}bdf
+/vms{/vmsv save def}bdf
+/vmr{vmsv restore}bdf
+/vmrs{vmr vms}bdf
+/CD{/NF exch def
+{exch dup/FID ne{exch NF 3 1 roll put}
+{pop pop}ifelse}forall NF}bdf
+/MN{1 index length/Len exch def
+dup length Len add string dup
+Len 4 -1 roll putinterval dup 0 4 -1 roll putinterval}bdf
+/RC{256 string cvs(|______)anchorsearch
+{1 index MN cvn/NewN exch def cvn
+findfont dup maxlength dict CD dup/FontName NewN put dup
+/Encoding MacVec put NewN exch definefont pop}{pop}ifelse}bdf
+/RF{dup FontDirectory exch known{pop}{RC}ifelse}bdf
+/FF{dup 256 string cvs(|______)exch MN cvn dup FontDirectory exch known
+{exch}if pop findfont}bdf
+userdict begin /BDFontDict 20 dict def end
+BDFontDict begin
+/bu{}def
+/bn{}def
+/setTxMode{pop}def
+/gm{moveto}def
+/show{pop}def
+/gr{pop}def
+/fnt{pop pop pop}def
+/fs{pop}def
+/fz{pop}def
+/lin{pop pop}def
+end
+/MacVec 256 array def
+MacVec 0 /Helvetica findfont
+/Encoding get 0 128 getinterval putinterval
+MacVec 127 /DEL put MacVec 16#27 /quotesingle put MacVec 16#60 /grave put
+/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI
+/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US
+MacVec 0 32 getinterval astore pop
+/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute
+/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave
+/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute
+/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis
+/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
+/register/copyright/trademark/acute/dieresis/notequal/AE/Oslash
+/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation
+/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash
+/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft
+/guillemotright/ellipsis/nbspace/Agrave/Atilde/Otilde/OE/oe
+/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge
+/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl
+/daggerdbl/periodcentered/quotesinglbase/quotedblbase
+/perthousand/Acircumflex/Ecircumflex/Aacute
+/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex
+/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde
+/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron
+MacVec 128 128 getinterval astore pop
+/fps{currentflat exch dup 0 le{pop 1}if
+{dup setflat 3 index stopped
+{1.3 mul dup 3 index gt{pop setflat pop pop stop}if}{exit}ifelse
+}loop pop setflat pop pop
+}bdf
+/fp{100 currentflat fps}bdf
+/rfp{clipflatness currentflat fps}bdf
+/fcp{100 clipflatness fps}bdf
+/fclip{{clip}fcp}bdf
+/feoclip{{eoclip}fcp}bdf
+end %. FreeHandDict
+%%EndProcSet
+%%BeginSetup
+FreeHandDict begin
+/ccmyk{dup 5 -1 roll sub 0 max exch}ndf
+/setcmykcolor{1 exch sub ccmyk ccmyk ccmyk pop setrgbcolor}ndf
+/setcmykcoloroverprint{4{dup -1 eq{pop 0}if 4 1 roll}repeat setcmykcolor}ndf
+/findcmykcustomcolor{5 /packedarray where{pop packedarray}{array astore readonly}ifelse}ndf
+/setcustomcolor{exch aload pop pop 4{4 index mul 4 1 roll}repeat setcmykcolor pop}ndf
+/setseparationgray{1 exch sub dup dup dup setcmykcolor}ndf
+/setoverprint{pop}ndf
+/currentoverprint false ndf
+/colorimage{pop pop
+[5 -1 roll/exec cvx 6 -1 roll/exec cvx 7 -1 roll/exec cvx 8 -1 roll/exec cvx
+/exch cvx/pop cvx/exch cvx/pop cvx/exch cvx/pop cvx/invbuf cvx]cvx image}
+%. version 47.1 of Postscript defines colorimage incorrectly (rgb model only)
+version cvr 47.1 le{userdict begin bdf end}{ndf}ifelse
+/customcolorimage{pop image}ndf
+/separationimage{image}ndf
+/newcmykcustomcolor{6 /packedarray where{pop packedarray}{array astore readonly}ifelse}ndf
+/inkoverprint false ndf
+/setinkoverprint{pop}ndf
+/overprintprocess{pop}ndf
+/setspotcolor
+{spots exch get 0 5 getinterval exch setcustomcolor}ndf
+/currentcolortransfer{currenttransfer dup dup dup}ndf
+/setcolortransfer{systemdict begin settransfer end pop pop pop}ndf
+/setimagecmyk{dup length 4 eq
+{aload pop}
+{aload pop spots exch get 0 4 getinterval aload pop 4
+{4 index mul 4 1 roll}repeat 5 -1 roll pop} ifelse
+systemdict /colorimage known{version cvr 47.1 gt}{false}ifelse
+not{pop 1 currentgray sub}if
+/ik xdf /iy xdf /im xdf /ic xdf
+}ndf
+/setcolor{dup length 4 eq
+{aload overprintprocess setcmykcolor}
+{aload 1 get spots exch get 5 get setinkoverprint setspotcolor}
+ifelse}ndf
+/bc2[0 0]def
+/bc4[0 0 0 0]def
+/c1[0 0 0 0]def
+/c2[0 0 0 0]def
+/absmax{2 copy abs exch abs gt{exch}if pop}bdf
+/calcstep
+{c1 length 4 eq
+{
+0 1 3
+{c1 1 index get
+c2 3 -1 roll get
+sub
+}for
+absmax absmax absmax
+}
+{
+bc2 c1 1 get 1 exch put
+c1 gettint c2 gettint
+sub abs
+}ifelse
+graystep div abs round dup 0 eq{pop 1}if
+dup /numsteps xdf 1 sub dup 0 eq{pop 1}if /numsteps1 xdf
+}bdf
+/cblend{
+c1 length 4 eq
+{
+0 1 3
+{bc4 exch
+c1 1 index get
+c2 2 index get
+1 index sub
+frac mul add put
+}for bc4
+}{
+bc2
+c1 gettint
+c2 gettint
+1 index sub
+frac mul add
+puttint bc2
+}ifelse
+setcolor
+}bdf
+/logtaper{/frac frac 9 mul 1 add log def}bdf
+/imbits 1 def
+/iminv false def
+/invbuf{0 1 2 index length 1 sub{dup 2 index exch get 255 exch sub 2 index 3 1 roll put}for}bdf
+/cyanrp{currentfile cyanbuf readhexstring pop iminv{invbuf}if}def
+/magentarp{cyanbuf magentabuf copy}bdf
+/yellowrp{cyanbuf yellowbuf copy}bdf
+/blackrp{cyanbuf blackbuf copy}bdf
+/fixtransfer{
+dup{ic mul ic sub 1 add}concatprocs exch
+dup{im mul im sub 1 add}concatprocs exch
+dup{iy mul iy sub 1 add}concatprocs exch
+{ik mul ik sub 1 add}concatprocs
+currentcolortransfer
+5 -1 roll exch concatprocs 7 1 roll
+4 -1 roll exch concatprocs 6 1 roll
+3 -1 roll exch concatprocs 5 1 roll
+concatprocs 4 1 roll
+setcolortransfer
+}bdf
+/currentpacking where{pop false setpacking}if
+%%EndSetup
+/spots[1 0 0 0 (Process Cyan) false newcmykcustomcolor
+0 1 0 0 (Process Magenta) false newcmykcustomcolor
+0 0 1 0 (Process Yellow) false newcmykcustomcolor
+0 0 0 1 (Process Black) false newcmykcustomcolor
+]def
+vms
+0 sf
+newpath
+106.3 534.9 moveto
+746 534.9 lineto
+746 62 lineto
+106.3 62 lineto
+closepath
+gsave
+[0 0 0 0.1]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+268 477.6 moveto
+268 477.6 lineto
+closepath
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+270.2 475.4 moveto
+270.2 475.4 lineto
+274.8 475.4 lineto
+277 473.1 lineto
+283.8 473.1 lineto
+281.6 468.6 lineto
+274.8 466.3 lineto
+272.5 461.8 lineto
+270.2 459.5 lineto
+268 457.2 lineto
+270.2 455 lineto
+274.8 457.2 lineto
+279.3 457.2 lineto
+283.8 455 lineto
+283.8 455 lineto
+288.4 455 lineto
+286.2 450.4 lineto
+283.8 445.8 lineto
+281.6 441.4 lineto
+277 439 lineto
+274.8 436.8 lineto
+272.5 436.8 lineto
+274.8 434.6 lineto
+272.5 432.2 lineto
+265.7 434.6 lineto
+270.2 432.2 lineto
+274.8 430 lineto
+277 427.8 lineto
+277 423.2 lineto
+277 421 lineto
+274.8 418.6 lineto
+270.2 416.4 lineto
+263.4 414.2 lineto
+258.9 414.2 lineto
+254.4 416.4 lineto
+249.8 411.8 lineto
+249.8 416.4 lineto
+247.6 421 lineto
+249.8 423.2 lineto
+254.4 427.8 lineto
+254.4 432.2 lineto
+256.6 434.6 lineto
+254.4 436.8 lineto
+254.4 439 lineto
+249.8 436.8 lineto
+245.3 432.2 lineto
+247.6 436.8 lineto
+249.8 441.4 lineto
+254.4 443.6 lineto
+254.4 448.2 lineto
+258.9 450.4 lineto
+252.1 448.2 lineto
+252.1 452.7 lineto
+256.6 455 lineto
+256.6 461.8 lineto
+256.6 464 lineto
+258.9 468.6 lineto
+263.4 466.3 lineto
+263.4 470.8 lineto
+265.7 473.1 lineto
+270.2 475.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+245.3 468.6 moveto
+247.6 473.1 lineto
+247.6 477.6 lineto
+252.1 477.6 lineto
+254.4 479.9 lineto
+256.6 479.9 lineto
+256.6 475.4 lineto
+252.1 473.1 lineto
+245.3 468.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+302 489 moveto
+302 493.5 lineto
+304.2 495.8 lineto
+304.2 500.3 lineto
+306.6 498 lineto
+306.6 493.5 lineto
+302 489 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+231.7 427.8 moveto
+227.2 427.8 lineto
+227.2 425.4 lineto
+222.6 425.4 lineto
+222.6 423.2 lineto
+218.1 421 lineto
+220.3 416.4 lineto
+224.9 414.2 lineto
+229.4 416.4 lineto
+231.7 411.8 lineto
+231.7 409.6 lineto
+236.2 409.6 lineto
+240.8 414.2 lineto
+243 414.2 lineto
+240.8 418.6 lineto
+240.8 425.4 lineto
+236.2 427.8 lineto
+231.7 427.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+231.7 427.8 moveto
+227.2 427.8 lineto
+227.2 425.4 lineto
+222.6 425.4 lineto
+222.6 423.2 lineto
+218.1 421 lineto
+220.3 416.4 lineto
+224.9 414.2 lineto
+229.4 416.4 lineto
+231.7 411.8 lineto
+229.4 405 lineto
+229.4 398.2 lineto
+227.2 393.7 lineto
+224.9 386.9 lineto
+220.3 384.6 lineto
+220.3 380.1 lineto
+220.3 380.1 lineto
+215.8 382.4 lineto
+211.3 380.1 lineto
+204.5 382.4 lineto
+199.9 380.1 lineto
+193.1 380.1 lineto
+186.3 380.1 lineto
+186.3 384.6 lineto
+188.6 384.6 lineto
+184.1 384.6 lineto
+186.3 386.9 lineto
+181.8 389.2 lineto
+184.1 391.4 lineto
+186.3 391.4 lineto
+181.8 393.7 lineto
+186.3 396 lineto
+188.6 396 lineto
+193.1 396 lineto
+199.9 396 lineto
+197.7 398.2 lineto
+190.9 398.2 lineto
+195.4 400.6 lineto
+197.7 405 lineto
+202.2 405 lineto
+199.9 407.4 lineto
+195.4 409.6 lineto
+193.1 414.2 lineto
+197.7 416.4 lineto
+199.9 416.4 lineto
+197.7 421 lineto
+197.7 423.2 lineto
+197.7 425.4 lineto
+202.2 425.4 lineto
+206.7 421 lineto
+211.3 421 lineto
+213.5 423.2 lineto
+215.8 423.2 lineto
+213.5 427.8 lineto
+215.8 430 lineto
+218.1 430 lineto
+218.1 434.6 lineto
+222.6 434.6 lineto
+227.2 432.2 lineto
+231.7 434.6 lineto
+234 432.2 lineto
+231.7 427.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+259.8 411.2 moveto
+258.2 407.2 lineto
+261.4 403.2 lineto
+261.4 402.4 lineto
+261.4 399.2 lineto
+259 396 lineto
+258.2 392 lineto
+260.6 388.8 lineto
+257.4 387.2 lineto
+258.2 383.2 lineto
+255.8 381.6 lineto
+254.2 377.6 lineto
+252.6 372.8 lineto
+250.2 368 lineto
+251.8 362.4 lineto
+254.2 360 lineto
+249.4 356.8 lineto
+247 353.6 lineto
+243 355.2 lineto
+239 355.2 lineto
+235.8 358.4 lineto
+233.4 356 lineto
+231 356 lineto
+227 352.8 lineto
+222.2 349.6 lineto
+217.4 347.2 lineto
+213.4 346.4 lineto
+217.4 344 lineto
+218.2 340.8 lineto
+223 344 lineto
+227 344 lineto
+231.8 344 lineto
+234.2 340 lineto
+237.4 342.4 lineto
+237.4 346.4 lineto
+246.2 344.8 lineto
+250.2 341.6 lineto
+252.6 344.8 lineto
+255.8 343.2 lineto
+259.8 345.6 lineto
+263 341.6 lineto
+267 342.4 lineto
+271.8 340 lineto
+279.8 340 lineto
+283.8 342.4 lineto
+291 344 lineto
+287.8 345.6 lineto
+283.8 347.2 lineto
+282.2 350.4 lineto
+285.4 350.4 lineto
+286.2 350.4 lineto
+286.2 353.6 lineto
+290.2 355.2 lineto
+295.8 359.2 lineto
+297.4 364.8 lineto
+296.6 369.6 lineto
+292.6 370.4 lineto
+288.6 372.8 lineto
+285.4 370.4 lineto
+283.8 374.4 lineto
+287 379.2 lineto
+285.4 384.8 lineto
+282.2 388 lineto
+286.2 389.6 lineto
+287 393.6 lineto
+283.8 399.2 lineto
+280.6 403.2 lineto
+280.6 409.6 lineto
+279 414.4 lineto
+279.8 420.8 lineto
+277.4 424.8 lineto
+277 423.2 lineto
+277 421 lineto
+274.8 418.6 lineto
+270.2 416.4 lineto
+263.4 414.2 lineto
+259.8 411.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+258.2 407.2 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+257.4 387.2 moveto
+258.2 383.2 lineto
+255.8 381.6 lineto
+254.2 377.6 lineto
+252.6 372.8 lineto
+250.2 368 lineto
+251.8 362.4 lineto
+254.2 360 lineto
+246.2 359.2 lineto
+243 360.8 lineto
+239.8 364 lineto
+239 365.6 lineto
+236.6 368 lineto
+233.4 366.4 lineto
+230.2 366.4 lineto
+232.6 368.8 lineto
+229.4 370.4 lineto
+228.6 373.6 lineto
+235 372.8 lineto
+239.8 373.6 lineto
+242.2 377.6 lineto
+244.6 380.8 lineto
+244.6 384.8 lineto
+240.6 385.6 lineto
+247 388 lineto
+251 389.6 lineto
+254.2 387.2 lineto
+257.4 389.6 lineto
+257.4 387.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+404.6 535.2 moveto
+399.8 532.8 lineto
+402.2 530.4 lineto
+396.6 530.4 lineto
+394.2 528.8 lineto
+392.6 532.8 lineto
+387.8 531.2 lineto
+383 527.2 lineto
+383 523.2 lineto
+378.2 524 lineto
+372.6 524.8 lineto
+371.8 521.6 lineto
+375 520.8 lineto
+372.6 517.6 lineto
+368.6 519.2 lineto
+368.6 516 lineto
+364.6 514.4 lineto
+360.6 514.4 lineto
+357.4 512 lineto
+359.8 509.6 lineto
+355.8 508 lineto
+355.8 508.8 lineto
+356.6 504 lineto
+352.6 502.4 lineto
+355.8 500.8 lineto
+355 497.6 lineto
+359 496.8 lineto
+363 496 lineto
+355.8 494.4 lineto
+355 490.4 lineto
+353.4 488 lineto
+357.4 486.4 lineto
+353.4 484 lineto
+355.8 480.8 lineto
+361.4 481.6 lineto
+359 477.6 lineto
+355.8 474.4 lineto
+357.4 471.2 lineto
+353.4 469.6 lineto
+351.8 469.6 lineto
+348.6 467.2 lineto
+350.2 462.4 lineto
+353.4 464.8 lineto
+355.8 466.4 lineto
+356.6 461.6 lineto
+354.2 458.4 lineto
+350.2 459.2 lineto
+351 454.4 lineto
+355 448.8 lineto
+359 447.2 lineto
+361.4 442.4 lineto
+368.6 442.4 lineto
+374.2 444.8 lineto
+378.2 448.8 lineto
+383.8 452.8 lineto
+388.6 452.8 lineto
+390.2 456 lineto
+393.4 458.4 lineto
+393.4 463.2 lineto
+395.8 468 lineto
+397.4 464 lineto
+397.4 457.6 lineto
+399.8 453.6 lineto
+403 452 lineto
+403.8 459.2 lineto
+405.4 464.8 lineto
+408.6 472 lineto
+412.6 478.4 lineto
+411.8 485.6 lineto
+411 490.4 lineto
+415 492 lineto
+414.2 496.8 lineto
+410.2 500 lineto
+412.6 510.4 lineto
+412.6 518.4 lineto
+411.8 528 lineto
+411.8 527.2 lineto
+414.2 532 lineto
+415.8 535.2 lineto
+404.6 535.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+472.6 535.2 moveto
+465.4 528 lineto
+461.4 524.8 lineto
+457.4 520 lineto
+458.2 520 lineto
+453.4 512.8 lineto
+449.4 505.6 lineto
+447.8 496 lineto
+449.4 486.4 lineto
+451.8 480 lineto
+456.6 472.8 lineto
+460.6 464.8 lineto
+459 458.4 lineto
+458.2 453.6 lineto
+454.2 448.8 lineto
+451.8 450.4 lineto
+447 447.2 lineto
+442.2 445.6 lineto
+445.4 440.8 lineto
+445.4 435.2 lineto
+443.8 431.2 lineto
+444.6 424 lineto
+441.4 418.4 lineto
+439 409.6 lineto
+437.4 404 lineto
+431 402.4 lineto
+426.2 404 lineto
+422.2 400.8 lineto
+422.2 396 lineto
+419 392.8 lineto
+413.4 393.6 lineto
+408.6 392 lineto
+409.4 396 lineto
+408.6 400 lineto
+409.4 405.6 lineto
+406.2 410.4 lineto
+409.4 413.6 lineto
+406.2 418.4 lineto
+405.4 424 lineto
+402.2 428.8 lineto
+401.4 436 lineto
+402.2 440.8 lineto
+399 444 lineto
+399 449.6 lineto
+399 454.4 lineto
+399.8 453.6 lineto
+403 452 lineto
+403.8 459.2 lineto
+405.4 464.8 lineto
+408.6 472 lineto
+412.6 478.4 lineto
+411.8 485.6 lineto
+411 490.4 lineto
+415 492 lineto
+414.2 496.8 lineto
+410.2 500 lineto
+412.6 510.4 lineto
+412.6 518.4 lineto
+411.8 528 lineto
+411.8 527.2 lineto
+414.2 532 lineto
+415.8 535.2 lineto
+472.6 535.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+499.8 535.2 moveto
+555 535.2 lineto
+562.2 532.8 lineto
+565.4 528 lineto
+563 520.8 lineto
+559 512.8 lineto
+558.2 507.2 lineto
+554.2 503.2 lineto
+547 488 lineto
+543 482.4 lineto
+539.8 484.8 lineto
+535.8 482.4 lineto
+530.2 481.6 lineto
+528.6 478.4 lineto
+523.8 476 lineto
+518.2 473.6 lineto
+512.6 471.2 lineto
+507 467.2 lineto
+506.2 472 lineto
+503.8 476.8 lineto
+500.6 480 lineto
+494.2 478.4 lineto
+491.8 484.8 lineto
+491 492 lineto
+493.4 497.6 lineto
+490.2 504.8 lineto
+490.2 511.2 lineto
+489.4 516.8 lineto
+491 520.8 lineto
+490.2 526.4 lineto
+495 525.6 lineto
+499.8 535.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+447 421.6 moveto
+446.2 414.4 lineto
+443 407.2 lineto
+443 415.2 lineto
+447 421.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+460.6 433.6 moveto
+457.4 429.6 lineto
+455.8 422.4 lineto
+455.8 417.6 lineto
+459 418.4 lineto
+460.6 424.8 lineto
+462.2 429.6 lineto
+460.6 433.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+501.4 446.4 moveto
+503 439.2 lineto
+506.2 442.4 lineto
+511 446.4 lineto
+506.2 448 lineto
+501.4 446.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+503.8 455.2 moveto
+502.2 452.8 lineto
+507 450.4 lineto
+507.8 453.6 lineto
+503.8 455.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+391.8 434.4 moveto
+391 429.6 lineto
+391 424 lineto
+384.6 425.6 lineto
+379.8 424.8 lineto
+374.2 424 lineto
+371 420.8 lineto
+370.2 424 lineto
+374.2 427.2 lineto
+380.6 427.2 lineto
+384.6 430.4 lineto
+391.8 434.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+368.6 388.8 moveto
+369.4 395.2 lineto
+369.4 400.8 lineto
+365.4 403.2 lineto
+367 411.2 lineto
+368.6 417.6 lineto
+372.6 416.8 lineto
+376.6 419.2 lineto
+379 416 lineto
+378.2 421.6 lineto
+381.4 423.2 lineto
+386.2 423.2 lineto
+387 420 lineto
+383.8 417.6 lineto
+388.6 415.2 lineto
+391.8 412.8 lineto
+390.2 408.8 lineto
+387.8 411.2 lineto
+384.6 406.4 lineto
+382.2 403.2 lineto
+380.6 399.2 lineto
+378.2 395.2 lineto
+376.6 392 lineto
+379.8 389.6 lineto
+376.6 388 lineto
+368.6 388.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+381.4 397.6 moveto
+385.4 398.4 lineto
+388.6 396.8 lineto
+389.4 393.6 lineto
+386.2 390.4 lineto
+383 394.4 lineto
+381.4 397.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmrs
+0 sf
+newpath
+394.2 405.6 moveto
+395 401.6 lineto
+391.8 400 lineto
+393.4 397.6 lineto
+393.4 392.8 lineto
+397.4 392.8 lineto
+396.6 388.8 lineto
+400.6 388.8 lineto
+400.6 389.6 lineto
+400.6 392.8 lineto
+404.6 394.4 lineto
+402.2 397.6 lineto
+405.4 400 lineto
+405.4 406.4 lineto
+400.6 405.6 lineto
+400.6 401.6 lineto
+397.4 401.6 lineto
+394.2 405.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+331 328 moveto
+330.2 332 lineto
+330.2 335.2 lineto
+327 336.8 lineto
+327 339.2 lineto
+323.8 339.2 lineto
+320.6 340 lineto
+317.4 337.6 lineto
+314.2 337.6 lineto
+305.4 340 lineto
+312.6 342.4 lineto
+315.8 341.6 lineto
+318.2 344 lineto
+315.8 347.2 lineto
+319 347.2 lineto
+319 350.4 lineto
+323 355.2 lineto
+326.2 360 lineto
+327.8 364 lineto
+331 362.4 lineto
+331 358.4 lineto
+328.6 355.2 lineto
+327 350.4 lineto
+334.2 355.2 lineto
+335 359.2 lineto
+335 362.4 lineto
+334.2 366.4 lineto
+337.4 368 lineto
+341.4 369.6 lineto
+343.8 368 lineto
+346.2 369.6 lineto
+350.2 370.4 lineto
+350.2 369.6 lineto
+351 364.8 lineto
+350.2 359.2 lineto
+346.2 354.4 lineto
+348.6 350.4 lineto
+345.4 346.4 lineto
+340.6 344 lineto
+336.6 342.4 lineto
+336.6 337.6 lineto
+335 332.8 lineto
+334.2 325.6 lineto
+331 328 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+334.2 325.6 moveto
+331 328 lineto
+330.2 332 lineto
+330.2 335.2 lineto
+327 336.8 lineto
+327 339.2 lineto
+323.8 339.2 lineto
+320.6 340 lineto
+317.4 337.6 lineto
+314.2 337.6 lineto
+305.4 340 lineto
+301.4 340 lineto
+302.2 334.4 lineto
+306.2 331.2 lineto
+307.8 327.2 lineto
+312.6 322.4 lineto
+314.2 319.2 lineto
+315.8 316 lineto
+319.8 319.2 lineto
+320.6 313.6 lineto
+323 310.4 lineto
+327 306.4 lineto
+330.2 308.8 lineto
+330.2 304.8 lineto
+334.2 306.4 lineto
+334.2 305.6 lineto
+336.6 310.4 lineto
+334.2 314.4 lineto
+331.8 317.6 lineto
+333.4 320 lineto
+334.2 325.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+393.4 313.6 moveto
+389.4 316 lineto
+384.6 317.6 lineto
+383.8 318.4 lineto
+384.6 312.8 lineto
+380.6 316 lineto
+375.8 319.2 lineto
+374.2 324.8 lineto
+376.6 328 lineto
+375 332 lineto
+380.6 333.6 lineto
+380.6 333.6 lineto
+382.2 339.2 lineto
+385.4 341.6 lineto
+385.4 346.4 lineto
+385.4 352.8 lineto
+390.2 354.4 lineto
+393.4 355.2 lineto
+390.2 359.2 lineto
+385.4 362.4 lineto
+387.8 367.2 lineto
+387.8 372.8 lineto
+387 373.6 lineto
+391 371.2 lineto
+393.4 374.4 lineto
+398.2 374.4 lineto
+401.4 377.6 lineto
+404.6 380 lineto
+404.6 377.6 lineto
+407.8 376.8 lineto
+411 377.6 lineto
+411 382.4 lineto
+414.2 380.8 lineto
+415 377.6 lineto
+410.2 375.2 lineto
+413.4 372.8 lineto
+416.6 369.6 lineto
+420.6 366.4 lineto
+421.4 362.4 lineto
+419.8 356.8 lineto
+419 356.8 lineto
+417.4 353.6 lineto
+418.2 349.6 lineto
+421.4 347.2 lineto
+421.4 342.4 lineto
+421.4 335.2 lineto
+423 330.4 lineto
+423.8 324.8 lineto
+422.2 320.8 lineto
+418.2 323.2 lineto
+414.2 320 lineto
+410.2 316 lineto
+406.2 316 lineto
+403 313.6 lineto
+396.6 312.8 lineto
+393.4 313.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+426.2 319.2 moveto
+430.2 316.8 lineto
+435 312.8 lineto
+436.6 308 lineto
+441.4 306.4 lineto
+441.4 310.4 lineto
+446.2 309.6 lineto
+450.2 305.6 lineto
+457.4 302.4 lineto
+463 298.4 lineto
+469.4 299.2 lineto
+473.4 295.2 lineto
+477.4 298.4 lineto
+483 298.4 lineto
+487 300 lineto
+493.4 299.2 lineto
+498.2 296.8 lineto
+501.4 300 lineto
+505.4 297.6 lineto
+510.2 297.6 lineto
+513.4 294.4 lineto
+517.4 292.8 lineto
+518.2 299.2 lineto
+519.8 304.8 lineto
+525.4 311.2 lineto
+531.8 316 lineto
+531.8 322.4 lineto
+529.4 325.6 lineto
+528.6 329.6 lineto
+526.2 333.6 lineto
+526.2 340.8 lineto
+524.6 345.6 lineto
+528.6 354.4 lineto
+527 362.4 lineto
+523.8 370.4 lineto
+519.8 377.6 lineto
+515.8 381.6 lineto
+511 379.2 lineto
+504.6 379.2 lineto
+499 380 lineto
+491 379.2 lineto
+480.6 378.4 lineto
+475 378.4 lineto
+471 376 lineto
+467.8 376 lineto
+471.8 380.8 lineto
+465.4 376.8 lineto
+460.6 379.2 lineto
+458.2 380.8 lineto
+459.8 384 lineto
+448.6 382.4 lineto
+442.2 380.8 lineto
+435.8 375.2 lineto
+431 372.8 lineto
+426.2 372.8 lineto
+423 367.2 lineto
+423.8 362.4 lineto
+421.4 363.2 lineto
+421.4 362.4 lineto
+419.8 356.8 lineto
+419 356.8 lineto
+417.4 353.6 lineto
+418.2 349.6 lineto
+421.4 347.2 lineto
+421.4 342.4 lineto
+421.4 335.2 lineto
+423 330.4 lineto
+423.8 324.8 lineto
+422.2 320.8 lineto
+426.2 319.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+422.2 320.8 moveto
+418.2 323.2 lineto
+414.2 320 lineto
+410.2 316 lineto
+406.2 316 lineto
+403 313.6 lineto
+396.6 312.8 lineto
+393.4 313.6 lineto
+394.2 308 lineto
+398.2 304.8 lineto
+399.8 299.2 lineto
+403.8 293.6 lineto
+410.2 287.2 lineto
+408.6 282.4 lineto
+413.4 281.6 lineto
+416.6 285.6 lineto
+419.8 289.6 lineto
+426.2 285.6 lineto
+431.8 284 lineto
+435.8 281.6 lineto
+439 279.5 lineto
+440.6 273.6 lineto
+448.6 268.8 lineto
+455 266.4 lineto
+459.8 268.8 lineto
+463 272.8 lineto
+471.8 276 lineto
+478.2 280 lineto
+486.2 281.6 lineto
+494.2 283.2 lineto
+504.6 284 lineto
+508.6 281.6 lineto
+512.6 282.4 lineto
+515 288 lineto
+516.6 292.8 lineto
+517.4 292.8 lineto
+513.4 294.4 lineto
+510.2 297.6 lineto
+505.4 297.6 lineto
+501.4 300 lineto
+498.2 296.8 lineto
+493.4 299.2 lineto
+487 300 lineto
+483 298.4 lineto
+477.4 298.4 lineto
+473.4 295.2 lineto
+469.4 299.2 lineto
+463 298.4 lineto
+457.4 302.4 lineto
+450.2 305.6 lineto
+446.2 309.6 lineto
+441.4 310.4 lineto
+441.4 306.4 lineto
+436.6 308 lineto
+435 312.8 lineto
+430.2 316.8 lineto
+426.2 319.2 lineto
+422.2 320.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+440.6 273.6 moveto
+448.6 268.8 lineto
+455 266.4 lineto
+459.8 268.8 lineto
+463 272.8 lineto
+471.8 276 lineto
+478.2 280 lineto
+486.2 281.6 lineto
+494.2 283.2 lineto
+504.6 284 lineto
+508.6 281.6 lineto
+512.6 282.4 lineto
+512.6 283.2 lineto
+512.6 278.4 lineto
+519 276 lineto
+513.4 270.4 lineto
+507.8 264 lineto
+505.4 256.8 lineto
+499 250.4 lineto
+496.6 244.8 lineto
+492.6 240.8 lineto
+485.4 239.2 lineto
+478.2 240 lineto
+471 239.2 lineto
+463 238.4 lineto
+457.4 235.2 lineto
+454.2 232.8 lineto
+447.8 234.4 lineto
+440.6 236.8 lineto
+435 243.2 lineto
+433.4 248 lineto
+430.2 252 lineto
+434.2 258.4 lineto
+436.6 261.6 lineto
+435.8 265.6 lineto
+440 267 lineto
+440.6 273.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+526.4 275.6 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+492.6 240.8 moveto
+485.4 239.2 lineto
+478.2 240 lineto
+471 239.2 lineto
+463 238.4 lineto
+457.4 235.2 lineto
+454.2 232.8 lineto
+447.8 234.4 lineto
+440.6 236.8 lineto
+435 243.2 lineto
+433.4 248 lineto
+430.2 252 lineto
+428 250 lineto
+421.6 250 lineto
+417.6 247.6 lineto
+412.8 246 lineto
+405.6 247.6 lineto
+403.2 246 lineto
+405.6 243.6 lineto
+403.2 239.6 lineto
+404.8 237.2 lineto
+405.6 232.4 lineto
+401.6 229.2 lineto
+403.2 224.4 lineto
+405.6 219.6 lineto
+408 223.6 lineto
+408.8 227.6 lineto
+412.8 227.6 lineto
+416 222.8 lineto
+418.4 215.6 lineto
+423.2 213.2 lineto
+424.8 209.2 lineto
+420 209.2 lineto
+425.6 203.6 lineto
+431.2 198 lineto
+436 198 lineto
+443.2 194 lineto
+447.2 188.4 lineto
+444 188.4 lineto
+447.2 186.8 lineto
+452.8 185.2 lineto
+460.8 180.4 lineto
+465.6 175.6 lineto
+468.8 171.6 lineto
+471.2 174.8 lineto
+468.8 178.8 lineto
+474.4 181.2 lineto
+481.6 181.2 lineto
+484.8 178 lineto
+490.4 181.2 lineto
+496 180.4 lineto
+499.2 174.8 lineto
+497.6 168.4 lineto
+500.8 163.6 lineto
+500.8 158.8 lineto
+504 154 lineto
+511.2 157.2 lineto
+516 158.8 lineto
+519.2 162.8 lineto
+525.6 158 lineto
+528 161.2 lineto
+530.4 169.2 lineto
+528 173.2 lineto
+524 177.2 lineto
+520.8 181.2 lineto
+521.6 187.6 lineto
+520.8 191.6 lineto
+527.2 195.6 lineto
+524 198 lineto
+521.6 202 lineto
+520 207.6 lineto
+524 210.8 lineto
+524 210 lineto
+520 214 lineto
+523.2 216.4 lineto
+518.4 219.6 lineto
+515.2 217.2 lineto
+507.2 219.6 lineto
+509.6 222.8 lineto
+505.6 226.8 lineto
+501.6 229.2 lineto
+499.2 237.2 lineto
+492.6 240.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+430.2 252 moveto
+428 250 lineto
+421.6 250 lineto
+417.6 247.6 lineto
+412.8 246 lineto
+405.6 247.6 lineto
+396.8 249.2 lineto
+392 254 lineto
+388 257.2 lineto
+382.4 256.4 lineto
+379.2 253.2 lineto
+376 254 lineto
+372 257.2 lineto
+367.2 257.2 lineto
+362.4 261.2 lineto
+363.2 266 lineto
+365.6 270 lineto
+366.2 269.6 lineto
+371 266.4 lineto
+371 266.4 lineto
+376.6 269.6 lineto
+379.8 268 lineto
+385.4 267.2 lineto
+389.4 269.6 lineto
+394.2 269.6 lineto
+394.2 269.6 lineto
+395.8 269.6 lineto
+399 265.6 lineto
+402.2 263.2 lineto
+402.2 269.6 lineto
+399 272.8 lineto
+402.2 276 lineto
+405.4 280.8 lineto
+408.6 282.4 lineto
+413.4 281.6 lineto
+416.6 285.6 lineto
+419.8 289.6 lineto
+426.2 285.6 lineto
+431.8 284 lineto
+435.8 281.6 lineto
+439.5 279.5 lineto
+440.6 273.6 lineto
+440 267.5 lineto
+435.8 265.6 lineto
+436.6 261.6 lineto
+434.2 258.4 lineto
+430.2 252 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+372.8 254.8 moveto
+372 257.2 lineto
+367.2 257.2 lineto
+362.4 261.2 lineto
+363.2 266 lineto
+365.6 270 lineto
+362.2 269.6 lineto
+355.8 271.2 lineto
+352.6 274.4 lineto
+350.2 270.4 lineto
+344.6 272 lineto
+342.2 270.4 lineto
+342.4 271.6 lineto
+338.4 270.8 lineto
+334.4 267.6 lineto
+330.4 265.2 lineto
+326.4 260.4 lineto
+324 252.4 lineto
+328 255.6 lineto
+332 256.4 lineto
+333.6 254 lineto
+333.6 251.6 lineto
+334.4 247.6 lineto
+339.2 246.8 lineto
+343.2 246 lineto
+347.2 249.2 lineto
+348.8 253.2 lineto
+351.2 253.2 lineto
+352 248.4 lineto
+354.4 242.8 lineto
+356.8 246 lineto
+359.2 247.6 lineto
+359.2 251.6 lineto
+362.4 249.2 lineto
+365.6 249.2 lineto
+368 245.2 lineto
+369.6 248.4 lineto
+368 253.2 lineto
+373.6 251.6 lineto
+372.8 254.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+334.4 247.6 moveto
+339.2 246.8 lineto
+343.2 246 lineto
+347.2 249.2 lineto
+348.8 253.2 lineto
+351.2 253.2 lineto
+352 248.4 lineto
+354.4 242.8 lineto
+356.8 246 lineto
+359.2 247.6 lineto
+359.2 251.6 lineto
+362.4 249.2 lineto
+365.6 249.2 lineto
+368 245.2 lineto
+369.6 248.4 lineto
+368 253.2 lineto
+373.6 251.6 lineto
+373.6 253.2 lineto
+376 254 lineto
+379.2 253.2 lineto
+382.4 256.4 lineto
+388 257.2 lineto
+392 254 lineto
+396.8 249.2 lineto
+405.6 247.6 lineto
+403.2 246 lineto
+405.6 243.6 lineto
+403.2 239.6 lineto
+404.8 237.2 lineto
+405.6 232.4 lineto
+405.6 232.4 lineto
+400.8 233.2 lineto
+397.6 230.8 lineto
+391.2 230 lineto
+389.6 226 lineto
+392.8 222.8 lineto
+391.2 218.8 lineto
+391.2 213.2 lineto
+394.4 206.8 lineto
+400 202.8 lineto
+404.8 198 lineto
+407.2 189.2 lineto
+408.8 182 lineto
+413.6 176.4 lineto
+420 171.6 lineto
+427.2 170 lineto
+433.6 169.2 lineto
+431.2 165.2 lineto
+435.2 162.8 lineto
+440.8 158.8 lineto
+448 154 lineto
+455.2 149.2 lineto
+459.2 145.2 lineto
+461.6 139.6 lineto
+460.8 134 lineto
+456.8 137.2 lineto
+453.6 141.2 lineto
+448.8 144.4 lineto
+444.8 146 lineto
+440.8 142 lineto
+439.2 137.2 lineto
+437.6 133.2 lineto
+441.6 131.6 lineto
+444.8 128.4 lineto
+444.8 122 lineto
+440.8 119.6 lineto
+437.6 116.4 lineto
+436.8 112.4 lineto
+432.8 107.6 lineto
+429.6 104.4 lineto
+426.4 102.8 lineto
+426.4 107.6 lineto
+428 111.6 lineto
+428.8 115.6 lineto
+432 119.6 lineto
+431.2 127.6 lineto
+428 134 lineto
+423.2 138.8 lineto
+416 141.2 lineto
+416 146.8 lineto
+409.6 149.2 lineto
+408 153.2 lineto
+404.8 154.8 lineto
+402.4 158.8 lineto
+396.8 160.4 lineto
+392 162 lineto
+391.2 166.8 lineto
+386.4 168.4 lineto
+382.4 174.8 lineto
+376.8 178.8 lineto
+374.4 183.6 lineto
+370.4 187.6 lineto
+366.4 192.4 lineto
+365.6 202 lineto
+360.8 210 lineto
+356.8 213.2 lineto
+351.2 216.4 lineto
+345.6 217.2 lineto
+341.6 213.2 lineto
+337.6 210 lineto
+333.6 208.4 lineto
+333.6 213.2 lineto
+330.4 215.6 lineto
+328 218 lineto
+328.8 223.6 lineto
+328 229.2 lineto
+325.6 233.2 lineto
+330.4 235.6 lineto
+334.4 237.2 lineto
+332 244.4 lineto
+334.4 247.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+301.4 340 moveto
+302.2 334.4 lineto
+306.2 331.2 lineto
+307.8 327.2 lineto
+312.6 322.4 lineto
+314.2 319.2 lineto
+315.8 316 lineto
+319.8 319.2 lineto
+320.6 313.6 lineto
+323 310.4 lineto
+327 306.4 lineto
+330.2 308.8 lineto
+330.2 304.8 lineto
+334.2 306.4 lineto
+337.4 300.8 lineto
+341.4 296.8 lineto
+346.2 296 lineto
+350.2 292.8 lineto
+346.2 288.8 lineto
+342.2 283.2 lineto
+341.4 275.2 lineto
+342.2 270.4 lineto
+342.4 271.6 lineto
+338.4 270.8 lineto
+334.4 267.6 lineto
+330.4 265.2 lineto
+326.4 260.4 lineto
+324 252.4 lineto
+328 255.6 lineto
+332 256.4 lineto
+333.6 254 lineto
+333.6 251.6 lineto
+334.4 247.6 lineto
+332 244.4 lineto
+334.4 237.2 lineto
+330.4 235.6 lineto
+325.6 233.2 lineto
+328 229.2 lineto
+328.8 223.6 lineto
+328 218 lineto
+330.4 215.6 lineto
+333.6 213.2 lineto
+333.6 208.4 lineto
+333.6 208.4 lineto
+328 207.6 lineto
+323.2 203.6 lineto
+317.6 202.8 lineto
+312 204.4 lineto
+308.8 206 lineto
+308 209.2 lineto
+303.2 210 lineto
+298.4 209.2 lineto
+293.6 213.2 lineto
+288 211.6 lineto
+280.8 208.4 lineto
+279.2 202 lineto
+278.4 196.4 lineto
+272.8 196.4 lineto
+266.4 198 lineto
+260.8 200 lineto
+258.4 203.6 lineto
+254.4 207.6 lineto
+250.4 210 lineto
+250.4 210 lineto
+242.4 210.8 lineto
+240 214 lineto
+235.2 215.6 lineto
+232 219.6 lineto
+228 222 lineto
+225.6 227.6 lineto
+231.2 233.2 lineto
+236 241.2 lineto
+237.6 245.2 lineto
+240 249.2 lineto
+240.8 254 lineto
+241.6 259.6 lineto
+245.6 253.2 lineto
+245.6 258.8 lineto
+243.2 262 lineto
+244 265.2 lineto
+245.6 270.8 lineto
+240 275.6 lineto
+238.4 282.8 lineto
+237.6 288.4 lineto
+236 293.2 lineto
+235.2 298 lineto
+231.2 298 lineto
+227.2 303.6 lineto
+220.8 306.8 lineto
+216.8 310.8 lineto
+218.4 313.2 lineto
+221.6 312.4 lineto
+220 316.4 lineto
+216 318.8 lineto
+221.6 319.6 lineto
+226.4 318.8 lineto
+232 319.6 lineto
+236 317.2 lineto
+238.4 313.2 lineto
+243.2 313.2 lineto
+247.2 311.6 lineto
+252.8 310 lineto
+252 316.4 lineto
+251.2 322.8 lineto
+252 328.4 lineto
+255.2 326.8 lineto
+258.4 324.4 lineto
+259.2 320.4 lineto
+264.8 318 lineto
+270.4 315.6 lineto
+276.8 315.6 lineto
+273.6 319.6 lineto
+277.6 322 lineto
+283.2 322.8 lineto
+286.4 325.2 lineto
+291.2 327.6 lineto
+290.4 332.4 lineto
+292.8 337.2 lineto
+296.8 339.6 lineto
+301.4 340 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+528 161.2 moveto
+529.6 169.2 lineto
+530.4 169.2 lineto
+530.4 169.2 lineto
+528 173.2 lineto
+524 177.2 lineto
+520.8 181.2 lineto
+521.6 187.6 lineto
+520.8 191.6 lineto
+527.2 195.6 lineto
+524 198 lineto
+521.6 202 lineto
+520 207.6 lineto
+524 210 lineto
+525.6 206.8 lineto
+530.4 206.8 lineto
+534.4 205.2 lineto
+538.4 203.6 lineto
+543.2 205.2 lineto
+547.2 202.8 lineto
+555.2 204.4 lineto
+560.8 209.2 lineto
+567.2 213.2 lineto
+576 214 lineto
+583.2 212.4 lineto
+589.6 209.2 lineto
+589.6 210 lineto
+589.6 206.8 lineto
+585.6 206 lineto
+584 200.4 lineto
+583.2 194 lineto
+580 190.8 lineto
+583.2 189.2 lineto
+588 183.6 lineto
+584 182.8 lineto
+578.4 183.6 lineto
+574.4 182.8 lineto
+569.6 179.6 lineto
+566.4 176.4 lineto
+566.4 172.4 lineto
+560.8 170.8 lineto
+557.6 168.4 lineto
+551.2 169.2 lineto
+546.4 170 lineto
+540.8 170 lineto
+538.4 167.6 lineto
+528.8 165.2 lineto
+528.9 169.2 lineto
+528 161.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+533.6 165.2 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+504.8 149.2 moveto
+501.6 143.6 lineto
+496 142.8 lineto
+490.4 142 lineto
+487.2 140.4 lineto
+483.2 139.6 lineto
+481.6 133.2 lineto
+478.4 138 lineto
+474.4 143.6 lineto
+469.6 146 lineto
+469.6 146.8 lineto
+472.8 148.4 lineto
+471.2 152.4 lineto
+473.6 155.6 lineto
+472 158.8 lineto
+472.8 165.2 lineto
+473.6 169.2 lineto
+469.6 171.6 lineto
+468.8 171.6 lineto
+471.2 174.8 lineto
+468.8 178.8 lineto
+474.4 181.2 lineto
+481.6 181.2 lineto
+484.8 178 lineto
+490.4 181.2 lineto
+496 180.4 lineto
+499.2 174.8 lineto
+497.6 168.4 lineto
+500.8 163.6 lineto
+500.8 158.8 lineto
+504 154 lineto
+504.8 149.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+65.1 502.5 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+301.4 340 moveto
+302.2 334.4 lineto
+306.2 331.2 lineto
+307.8 327.2 lineto
+312.6 322.4 lineto
+314.2 319.2 lineto
+315.8 316 lineto
+319.8 319.2 lineto
+320.6 313.6 lineto
+323 310.4 lineto
+327 306.4 lineto
+330.2 308.8 lineto
+330.2 304.8 lineto
+334.2 306.4 lineto
+334.2 305.6 lineto
+336.6 310.4 lineto
+334.2 314.4 lineto
+331.8 317.6 lineto
+333.4 320 lineto
+334.2 325.6 lineto
+331 328 lineto
+330.2 332 lineto
+330.2 335.2 lineto
+327 336.8 lineto
+327 339.2 lineto
+323.8 339.2 lineto
+320.6 340 lineto
+317.4 337.6 lineto
+314.2 337.6 lineto
+305.4 340 lineto
+301.4 340 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+390.4 375.6 moveto
+392 379.6 lineto
+388 378.8 lineto
+384.8 380.4 lineto
+384 378 lineto
+380 382.8 lineto
+382.4 386.8 lineto
+380.8 390.8 lineto
+379.8 389.6 lineto
+376.6 388 lineto
+368.6 388.8 lineto
+370.4 384.4 lineto
+369.6 381.2 lineto
+371.2 376.4 lineto
+374.4 370 lineto
+369.6 372.4 lineto
+366.4 372.4 lineto
+365.6 367.6 lineto
+364 370.8 lineto
+360.8 367.6 lineto
+360.8 372.4 lineto
+356 373.2 lineto
+352 374 lineto
+349.6 370 lineto
+350.2 370.4 lineto
+350.2 369.6 lineto
+351 364.8 lineto
+350.2 359.2 lineto
+346.2 354.4 lineto
+348.6 350.4 lineto
+345.4 346.4 lineto
+340.6 344 lineto
+336.6 342.4 lineto
+336.6 337.6 lineto
+335 332.8 lineto
+334.2 325.6 lineto
+333.4 320 lineto
+331.8 317.6 lineto
+334.2 314.4 lineto
+336.6 310.4 lineto
+334.2 305.6 lineto
+334.2 306.4 lineto
+337.4 300.8 lineto
+341.4 296.8 lineto
+346.2 296 lineto
+350.2 292.8 lineto
+346.2 288.8 lineto
+342.2 283.2 lineto
+341.4 275.2 lineto
+342.2 270.4 lineto
+350.2 270.4 lineto
+352.6 274.4 lineto
+355.8 271.2 lineto
+362.2 269.6 lineto
+365.6 270 lineto
+366.2 269.6 lineto
+371 266.4 lineto
+371 266.4 lineto
+376.6 269.6 lineto
+379.8 268 lineto
+385.4 267.2 lineto
+389.4 269.6 lineto
+394.2 269.6 lineto
+394.2 269.6 lineto
+395.8 269.6 lineto
+399 265.6 lineto
+402.2 263.2 lineto
+402.2 269.6 lineto
+399 272.8 lineto
+402.2 276 lineto
+405.4 280.8 lineto
+408.6 282.4 lineto
+410.2 287.2 lineto
+403.8 293.6 lineto
+399.8 299.2 lineto
+398.2 304.8 lineto
+394.2 308 lineto
+393.4 313.6 lineto
+389.4 316 lineto
+384.6 317.6 lineto
+383.8 318.4 lineto
+384.6 312.8 lineto
+380.6 316 lineto
+375.8 319.2 lineto
+374.2 324.8 lineto
+376.6 328 lineto
+375 332 lineto
+380.6 333.6 lineto
+380.6 333.6 lineto
+382.2 339.2 lineto
+385.4 341.6 lineto
+385.4 346.4 lineto
+385.4 352.8 lineto
+390.2 354.4 lineto
+393.4 355.2 lineto
+390.2 359.2 lineto
+385.4 362.4 lineto
+387.8 367.2 lineto
+387.8 372.8 lineto
+390.4 375.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+518.4 444.4 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmrs
+0 sf
+newpath
+589.6 209.2 moveto
+589.6 210 lineto
+589.6 206.8 lineto
+585.6 206 lineto
+584 200.4 lineto
+583.2 194 lineto
+580 190.8 lineto
+583.2 189.2 lineto
+588 183.6 lineto
+584 182.8 lineto
+578.4 183.6 lineto
+574.4 182.8 lineto
+569.6 179.6 lineto
+566.4 176.4 lineto
+566.4 172.4 lineto
+560.8 170.8 lineto
+557.6 168.4 lineto
+551.2 169.2 lineto
+546.4 170 lineto
+540.8 170 lineto
+538.4 167.6 lineto
+528.8 165.2 lineto
+529.2 165.6 lineto
+529.6 169.2 lineto
+530.4 169.2 lineto
+530.4 169.2 lineto
+528 173.2 lineto
+524 177.2 lineto
+520.8 181.2 lineto
+521.6 187.6 lineto
+520.8 191.6 lineto
+527.2 195.6 lineto
+524 198 lineto
+521.6 202 lineto
+520 207.6 lineto
+524 210 lineto
+525.6 206.8 lineto
+530.4 206.8 lineto
+534.4 205.2 lineto
+538.4 203.6 lineto
+543.2 205.2 lineto
+547.2 202.8 lineto
+555.2 204.4 lineto
+560.8 209.2 lineto
+567.2 213.2 lineto
+576 214 lineto
+583.2 212.4 lineto
+589.6 209.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+519 276 moveto
+513.4 270.4 lineto
+507.8 264 lineto
+505.4 256.8 lineto
+499 250.4 lineto
+496.6 244.8 lineto
+492.6 240.8 lineto
+499.2 237.2 lineto
+501.6 229.2 lineto
+505.6 226.8 lineto
+509.6 222.8 lineto
+507.2 219.6 lineto
+515.2 217.2 lineto
+518.4 219.6 lineto
+523.2 216.4 lineto
+520 214 lineto
+524 210 lineto
+524 210.8 lineto
+525.6 206.8 lineto
+530.4 206.8 lineto
+534.4 205.2 lineto
+538.4 203.6 lineto
+543.2 205.2 lineto
+547.2 202.8 lineto
+555.2 204.4 lineto
+560.8 209.2 lineto
+567.2 213.2 lineto
+576 214 lineto
+583.2 212.4 lineto
+589.6 209.2 lineto
+588.8 216.4 lineto
+590.4 220.4 lineto
+592 225.2 lineto
+592 229.2 lineto
+592.8 233.2 lineto
+595.2 226.8 lineto
+599.2 230 lineto
+599.2 234.8 lineto
+600 239.6 lineto
+596 240.4 lineto
+592.8 238.8 lineto
+587.2 238 lineto
+581.6 241.2 lineto
+582.4 246.8 lineto
+582.4 254 lineto
+582.4 262 lineto
+578.4 268.4 lineto
+573.6 271.6 lineto
+569.6 274.8 lineto
+568.8 280.4 lineto
+564.8 284.4 lineto
+561.6 282.8 lineto
+556.8 281.2 lineto
+550.4 278 lineto
+545.6 276.4 lineto
+540 275.6 lineto
+533.6 276.4 lineto
+530.4 274.8 lineto
+527.2 274.8 lineto
+519 276 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+589.6 209.2 moveto
+589.6 210 lineto
+589.6 206.8 lineto
+585.6 206 lineto
+584 200.4 lineto
+583.2 194 lineto
+580 190.8 lineto
+583.2 189.2 lineto
+588 183.6 lineto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+539.2 154.8 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+569.6 179.6 moveto
+566.4 176.4 lineto
+566.4 172.4 lineto
+560.8 170.8 lineto
+557.6 168.4 lineto
+551.2 169.2 lineto
+546.4 170 lineto
+540.8 170 lineto
+538.4 167.6 lineto
+528.8 165.2 lineto
+528 161.2 lineto
+525.6 158 lineto
+519.2 162.8 lineto
+516 158.8 lineto
+511.2 157.2 lineto
+504 154 lineto
+504.8 149.2 lineto
+501.6 143.6 lineto
+496 142.8 lineto
+490.4 142 lineto
+487.2 140.4 lineto
+483.2 139.6 lineto
+481.6 133.2 lineto
+481.6 133.2 lineto
+485.6 130 lineto
+489.6 130 lineto
+495.2 130 lineto
+500 127.6 lineto
+504 125.2 lineto
+504 122 lineto
+507.2 119.6 lineto
+510.4 116.4 lineto
+516 115.6 lineto
+522.4 117.2 lineto
+527.2 116.4 lineto
+532 114.8 lineto
+533.6 111.6 lineto
+537.6 110.8 lineto
+540.8 111.6 lineto
+544.8 106.8 lineto
+547.2 104.4 lineto
+548.8 110 lineto
+545.6 114.8 lineto
+541.6 118 lineto
+537.6 120.4 lineto
+532.8 122.8 lineto
+528.8 123.6 lineto
+532 126.8 lineto
+530.4 130 lineto
+529.6 132.4 lineto
+532.8 133.2 lineto
+535.2 129.2 lineto
+537.6 128.4 lineto
+536.8 133.2 lineto
+532 136.4 lineto
+528 139.6 lineto
+525.6 146 lineto
+526.4 150.8 lineto
+529.6 153.2 lineto
+529.6 149.2 lineto
+532.8 147.6 lineto
+536 143.6 lineto
+539.2 140.4 lineto
+540.8 142 lineto
+536.8 146 lineto
+539.2 146 lineto
+543.2 141.2 lineto
+545.6 142.8 lineto
+543.2 146 lineto
+540 149.2 lineto
+540 150 lineto
+543.2 148.4 lineto
+548 144.4 lineto
+550.4 145.2 lineto
+548.8 148.4 lineto
+544.8 151.6 lineto
+544 152.4 lineto
+539.2 154 lineto
+544.8 154.8 lineto
+546.4 158 lineto
+552 158 lineto
+556 161.2 lineto
+558.4 158.8 lineto
+564 158.8 lineto
+568 156.4 lineto
+571.2 161.2 lineto
+572 166.8 lineto
+573.6 170.8 lineto
+571.2 174.8 lineto
+569.6 179.6 lineto
+569.6 179.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+504.8 110.8 moveto
+501.6 114 lineto
+501.6 116.4 lineto
+497.6 116.4 lineto
+497.6 113.2 lineto
+492.8 113.2 lineto
+494.4 110 lineto
+500 110.8 lineto
+504.8 110.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+519.2 114 moveto
+516.8 111.6 lineto
+512.8 111.6 lineto
+511.2 107.6 lineto
+517.6 101.2 lineto
+517.6 95.6 lineto
+518.4 91.6 lineto
+522.4 87.6 lineto
+524 93.2 lineto
+526.4 91.6 lineto
+527.2 87.6 lineto
+529.6 83.6 lineto
+531.2 87.6 lineto
+532 90.8 lineto
+534.4 86.8 lineto
+540 84.4 lineto
+537.6 88.4 lineto
+536 93.2 lineto
+532 99.6 lineto
+530.4 103.6 lineto
+534.4 102.8 lineto
+537.6 98.8 lineto
+541.6 101.2 lineto
+538.4 104.4 lineto
+537.6 104.4 lineto
+534.4 108.4 lineto
+529.6 110 lineto
+519.2 114 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+548 74 moveto
+551.2 70 lineto
+552 71.6 lineto
+555.2 71.6 lineto
+558.4 70 lineto
+563.2 71.6 lineto
+568.8 70 lineto
+576 71.6 lineto
+575.2 69.2 lineto
+579.2 68.4 lineto
+584.8 71.6 lineto
+584.8 66.8 lineto
+579.2 66 lineto
+573.6 66 lineto
+570.4 65.2 lineto
+568 63.6 lineto
+564 62 lineto
+561.6 66.8 lineto
+555.2 67.6 lineto
+554.4 69.2 lineto
+548 66.8 lineto
+548 74 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+456.8 83.6 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+569.6 179.6 moveto
+566.4 176.4 lineto
+566.4 172.4 lineto
+560.8 170.8 lineto
+557.6 168.4 lineto
+551.2 169.2 lineto
+546.4 170 lineto
+540.8 170 lineto
+538.4 167.6 lineto
+528.8 165.2 lineto
+529.2 165.6 lineto
+529.6 169.2 lineto
+530.4 169.2 lineto
+530.4 169.2 lineto
+528 173.2 lineto
+524 177.2 lineto
+520.8 181.2 lineto
+521.6 187.6 lineto
+520.8 191.6 lineto
+527.2 195.6 lineto
+524 198 lineto
+521.6 202 lineto
+520 207.6 lineto
+524 210 lineto
+525.6 206.8 lineto
+530.4 206.8 lineto
+534.4 205.2 lineto
+538.4 203.6 lineto
+543.2 205.2 lineto
+547.2 202.8 lineto
+555.2 204.4 lineto
+560.8 209.2 lineto
+567.2 213.2 lineto
+576 214 lineto
+583.2 212.4 lineto
+589.6 209.2 lineto
+589.6 210 lineto
+589.6 206.8 lineto
+585.6 206 lineto
+584 200.4 lineto
+583.2 194 lineto
+580 190.8 lineto
+583.2 189.2 lineto
+588 183.6 lineto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+576 158 moveto
+571.2 150.8 lineto
+570.4 147.6 lineto
+577.6 154.8 lineto
+581.6 158 lineto
+586.4 163.6 lineto
+592.8 168.4 lineto
+599.2 167.6 lineto
+602.4 168.4 lineto
+603.2 172.4 lineto
+595.2 174.8 lineto
+589.6 178.8 lineto
+588 184.4 lineto
+588 183.6 lineto
+584 182.8 lineto
+578.4 183.6 lineto
+574.4 182.8 lineto
+569.6 179.6 lineto
+571.2 174.8 lineto
+573.6 170.8 lineto
+572 166.8 lineto
+571.2 161.2 lineto
+568 156.4 lineto
+576 158 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+424 110 moveto
+424 106.8 lineto
+421.6 103.6 lineto
+420 98.8 lineto
+420.8 93.2 lineto
+421.6 89.2 lineto
+418.4 86 lineto
+412.8 86.8 lineto
+408.8 90 lineto
+405.6 92.4 lineto
+399.2 93.2 lineto
+395.2 98 lineto
+388.8 102 lineto
+385.6 106 lineto
+388.8 110.8 lineto
+391.2 108.4 lineto
+396 110.8 lineto
+400.8 109.2 lineto
+404.8 106.8 lineto
+410.4 106.8 lineto
+416 110 lineto
+420 110 lineto
+424 110 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+353.6 195.6 moveto
+352.8 184.4 lineto
+352.8 178.8 lineto
+350.4 174.8 lineto
+347.2 167.6 lineto
+343.2 170.8 lineto
+342.4 175.6 lineto
+344 179.6 lineto
+341.6 184.4 lineto
+343.2 188.4 lineto
+347.2 190.8 lineto
+353.6 195.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+348 165.2 moveto
+342.4 162.8 lineto
+337.6 161.2 lineto
+333.6 162.8 lineto
+332.8 158.8 lineto
+335.2 155.6 lineto
+334.4 151.6 lineto
+334.4 147.6 lineto
+335.2 144.4 lineto
+335.2 144.4 lineto
+333.6 138.8 lineto
+333.6 134 lineto
+336.8 131.6 lineto
+340.8 131.6 lineto
+341.6 135.6 lineto
+346.4 132.4 lineto
+349.6 134 lineto
+348.8 140.4 lineto
+351.2 147.6 lineto
+350.4 152.4 lineto
+352.8 154.8 lineto
+352.8 161.2 lineto
+348 165.2 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+674.4 250.8 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+661.6 253.2 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+645.6 264.4 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+600 239.6 moveto
+600 244.4 lineto
+598.4 247.6 lineto
+602.4 246 lineto
+604.8 249.2 lineto
+608.8 251.6 lineto
+604.8 254.8 lineto
+605.6 258.8 lineto
+609.6 255.6 lineto
+611.2 262 lineto
+616 265.2 lineto
+620.8 266 lineto
+622.4 272.4 lineto
+624.8 267.6 lineto
+627.2 264.4 lineto
+623.2 262.8 lineto
+624.8 261.2 lineto
+628.8 258.8 lineto
+633.6 260.4 lineto
+638.4 261.2 lineto
+641.6 262.8 lineto
+640.8 262.8 lineto
+644 260.4 lineto
+644 257.2 lineto
+640.8 254.8 lineto
+640.8 255.6 lineto
+635.2 248.4 lineto
+639.2 248.4 lineto
+639.2 248.4 lineto
+640.8 244.4 lineto
+644 246 lineto
+647.2 242 lineto
+646.4 234.8 lineto
+650.4 233.2 lineto
+653.6 235.6 lineto
+657.6 240.4 lineto
+663.2 243.6 lineto
+665.6 247.6 lineto
+668.8 250 lineto
+668.8 250 lineto
+672.8 250 lineto
+676 253.2 lineto
+677.6 257.2 lineto
+674.4 258 lineto
+672 255.6 lineto
+668 256.4 lineto
+668 257.2 lineto
+665.6 254 lineto
+660.8 253.2 lineto
+656.8 255.6 lineto
+656 258.8 lineto
+651.2 261.2 lineto
+650.4 262 lineto
+647.2 264.4 lineto
+652 266 lineto
+656 262.8 lineto
+661.6 269.2 lineto
+661.6 264.4 lineto
+665.6 268.4 lineto
+668.8 274 lineto
+678.4 278 lineto
+680 282.8 lineto
+679.2 284.4 lineto
+684 283.6 lineto
+684.8 287.6 lineto
+691.2 289.2 lineto
+694.4 290.8 lineto
+700 294.8 lineto
+700 288.4 lineto
+696 284.4 lineto
+696 284.4 lineto
+697.6 281.2 lineto
+692.8 281.2 lineto
+688 279.6 lineto
+691.2 277.2 lineto
+696.8 274.8 lineto
+698.4 270.8 lineto
+694.4 270.8 lineto
+695.2 266.8 lineto
+691.2 270 lineto
+690.4 264.4 lineto
+690.4 258.8 lineto
+687.2 255.6 lineto
+683.2 258 lineto
+683.2 255.6 lineto
+681.6 250.8 lineto
+685.6 253.2 lineto
+688.8 250.8 lineto
+693.6 249.2 lineto
+700.8 248.4 lineto
+709.6 245.2 lineto
+716 242 lineto
+721.6 238 lineto
+728.8 234 lineto
+733.6 234 lineto
+740.8 231.6 lineto
+746.4 226.8 lineto
+746.4 226.8 lineto
+746.4 535.6 lineto
+557.7 535.7 lineto
+562.2 532.8 lineto
+565.4 528 lineto
+563 520.8 lineto
+559 512.8 lineto
+558.2 507.2 lineto
+554.2 503.2 lineto
+547 488 lineto
+545.6 485.2 lineto
+553.6 490 lineto
+553.6 484.4 lineto
+558.4 482 lineto
+562.4 483.6 lineto
+568 480.4 lineto
+566.4 477.2 lineto
+562.4 478.8 lineto
+557.6 478 lineto
+556 475.6 lineto
+552 476.4 lineto
+552 471.6 lineto
+549.6 474 lineto
+549.6 473.2 lineto
+549.6 466.8 lineto
+543.2 466.8 lineto
+535.2 466 lineto
+532 467.6 lineto
+527.2 464.4 lineto
+521.6 464.4 lineto
+517.6 460.4 lineto
+513.6 456.4 lineto
+516.8 451.6 lineto
+514.4 449.2 lineto
+518.4 447.6 lineto
+517.6 443.6 lineto
+523.2 446 lineto
+523.2 446 lineto
+524 445.2 lineto
+522.4 438.8 lineto
+521.6 432.4 lineto
+522.4 424.4 lineto
+518.4 423.6 lineto
+514.4 426.8 lineto
+510.4 430.8 lineto
+507.2 435.6 lineto
+504 431.6 lineto
+499.2 430.8 lineto
+499.2 426 lineto
+497.6 418.8 lineto
+495.2 412.4 lineto
+496.8 402.8 lineto
+499.2 394.8 lineto
+496.8 387.6 lineto
+494.4 386.8 lineto
+496 396.4 lineto
+493.6 390 lineto
+488.8 386.8 lineto
+483.2 385.2 lineto
+477.6 386 lineto
+473.6 384.4 lineto
+475.2 378.8 lineto
+475 378.4 lineto
+480.6 378.4 lineto
+491 379.2 lineto
+499 380 lineto
+504.6 379.2 lineto
+511 379.2 lineto
+515.8 381.6 lineto
+519.8 377.6 lineto
+523.8 370.4 lineto
+527 362.4 lineto
+528.6 354.4 lineto
+524.6 345.6 lineto
+526.2 340.8 lineto
+526.2 333.6 lineto
+528.6 329.6 lineto
+529.4 325.6 lineto
+531.8 322.4 lineto
+531.8 316 lineto
+525.4 311.2 lineto
+519.8 304.8 lineto
+518.2 299.2 lineto
+516.6 292.8 lineto
+515 288 lineto
+512.6 282.4 lineto
+512.6 283.2 lineto
+512.6 278.4 lineto
+518.4 277.2 lineto
+527.2 274.8 lineto
+530.4 274.8 lineto
+533.6 276.4 lineto
+540 275.6 lineto
+545.6 276.4 lineto
+550.4 278 lineto
+556.8 281.2 lineto
+561.6 282.8 lineto
+564.8 284.4 lineto
+568.8 280.4 lineto
+569.6 274.8 lineto
+573.6 271.6 lineto
+578.4 268.4 lineto
+582.4 262 lineto
+582.4 254 lineto
+582.4 246.8 lineto
+581.6 241.2 lineto
+587.2 238 lineto
+592.8 238.8 lineto
+596 240.4 lineto
+600 239.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+746.4 208.4 moveto
+739.2 202.8 lineto
+733.6 198 lineto
+726.4 199.6 lineto
+717.6 194.8 lineto
+708.8 190.8 lineto
+704.8 193.2 lineto
+699.2 190.8 lineto
+694.4 193.2 lineto
+689.6 191.6 lineto
+683.2 196.4 lineto
+677.6 194 lineto
+671.2 198 lineto
+669.6 201.2 lineto
+665.6 196.4 lineto
+651.2 193.2 lineto
+640.8 187.6 lineto
+633.6 182 lineto
+629.6 176.4 lineto
+622.4 173.2 lineto
+616 173.2 lineto
+608.8 171.6 lineto
+604.8 170 lineto
+605.6 167.6 lineto
+612 166.8 lineto
+607.2 163.6 lineto
+600 161.2 lineto
+600 161.2 lineto
+596.8 158 lineto
+590.4 157.2 lineto
+586.4 155.6 lineto
+580.8 154.8 lineto
+576.8 151.6 lineto
+572 146 lineto
+572 142.8 lineto
+570.4 138 lineto
+575.2 140.4 lineto
+579.2 141.2 lineto
+580.8 142 lineto
+579.2 138 lineto
+581.6 133.2 lineto
+580.8 132.4 lineto
+584 131.6 lineto
+580.8 127.6 lineto
+585.6 123.6 lineto
+581.6 122 lineto
+578.4 125.2 lineto
+575.2 126 lineto
+577.6 121.2 lineto
+574.4 119.6 lineto
+579.2 117.2 lineto
+582.4 118.8 lineto
+582.4 118 lineto
+586.4 116.4 lineto
+586.4 116.4 lineto
+588 115.6 lineto
+588 111.6 lineto
+589.6 107.6 lineto
+592.8 106 lineto
+588.8 102.8 lineto
+594.4 102.8 lineto
+602.4 104.4 lineto
+595.2 98 lineto
+600.8 98.8 lineto
+600.8 95.6 lineto
+604.8 100.4 lineto
+609.6 98 lineto
+608.8 98 lineto
+612 98.8 lineto
+615.2 94 lineto
+620 91.6 lineto
+625.6 91.6 lineto
+629.6 94.8 lineto
+635.2 95.6 lineto
+634.4 101.2 lineto
+637.6 105.2 lineto
+644.8 104.4 lineto
+652.8 102 lineto
+656 98.8 lineto
+661.6 98.8 lineto
+668 99.6 lineto
+674.4 102 lineto
+680 104.4 lineto
+682.4 109.2 lineto
+685.6 114.8 lineto
+689.6 113.2 lineto
+696 112.4 lineto
+699.2 115.6 lineto
+702.4 120.4 lineto
+705.6 116.4 lineto
+702.4 110.8 lineto
+704.8 106.8 lineto
+704 99.6 lineto
+706.4 94 lineto
+708 86.8 lineto
+709.6 82.8 lineto
+705 62 lineto
+746 62 lineto
+746.4 208.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+278.4 196.4 moveto
+272.8 196.4 lineto
+266.4 198 lineto
+261.6 199.2 lineto
+258.4 203.6 lineto
+254.4 207.6 lineto
+250.4 210 lineto
+250.4 210 lineto
+242.4 210.8 lineto
+240 214 lineto
+235.2 215.6 lineto
+232 219.6 lineto
+228 222 lineto
+225.6 227.6 lineto
+225.6 228.4 lineto
+220.8 228.4 lineto
+215.2 231.6 lineto
+208.8 232.4 lineto
+202.4 235.6 lineto
+196 237.2 lineto
+188 240.4 lineto
+180.8 246 lineto
+174.4 246 lineto
+165.6 250 lineto
+161.6 255.6 lineto
+155.2 254.8 lineto
+155.2 254.8 lineto
+155.2 251.6 lineto
+148 252.4 lineto
+141.6 249.2 lineto
+145.6 246 lineto
+142.4 242.8 lineto
+142.4 242.8 lineto
+146.4 242 lineto
+144 238.8 lineto
+146.4 237.2 lineto
+143.2 234.8 lineto
+141.6 231.6 lineto
+148 233.2 lineto
+151.2 230.8 lineto
+149.6 226.8 lineto
+154.4 227.6 lineto
+157.6 224.4 lineto
+156.8 224.4 lineto
+160 222.8 lineto
+163.2 224.4 lineto
+167.2 221.2 lineto
+166.4 221.2 lineto
+167.2 218 lineto
+170.4 214.8 lineto
+168 212.4 lineto
+162.4 210.8 lineto
+156.8 210.8 lineto
+158.4 206.8 lineto
+157.6 201.2 lineto
+156 196.4 lineto
+153.6 195.6 lineto
+152.8 195.6 lineto
+152.8 190.8 lineto
+150.4 186.8 lineto
+146.4 187.6 lineto
+145.6 182.8 lineto
+147.2 178 lineto
+144 174 lineto
+141.6 170.8 lineto
+142.4 166.8 lineto
+139.2 161.2 lineto
+136 158 lineto
+134.4 151.6 lineto
+140 146.8 lineto
+143.2 142 lineto
+143.2 137.2 lineto
+142.4 133.2 lineto
+146.4 128.4 lineto
+149.6 124.4 lineto
+154.4 126 lineto
+158.4 129.2 lineto
+162.4 128.4 lineto
+167.2 130 lineto
+173.6 128.4 lineto
+180 126.8 lineto
+187.2 124.4 lineto
+193.6 124.4 lineto
+196.8 122 lineto
+201.6 128.4 lineto
+208.8 130.8 lineto
+215.2 130.8 lineto
+219.2 137.2 lineto
+224 140.4 lineto
+231.2 144.4 lineto
+228.8 151.6 lineto
+228.8 158 lineto
+236 164.4 lineto
+242.4 171.6 lineto
+248 174 lineto
+252 178 lineto
+259.2 178.8 lineto
+268 181.2 lineto
+275.2 184.4 lineto
+278 188 lineto
+278 193 lineto
+278.4 196.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmrs
+0 sf
+newpath
+166.4 218 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+128.8 150.8 moveto
+124 153.2 lineto
+119.2 155.6 lineto
+113.6 154.8 lineto
+114.4 154.8 lineto
+120.8 168.4 lineto
+123.2 174.8 lineto
+125.6 176.4 lineto
+124.8 178.8 lineto
+120.8 178 lineto
+118.4 181.2 lineto
+119.2 181.2 lineto
+120 181.2 lineto
+124.8 182.8 lineto
+123.2 186 lineto
+123.2 185.2 lineto
+117.6 184.4 lineto
+120.8 188.4 lineto
+122.4 194 lineto
+126.4 194.8 lineto
+129.6 200.4 lineto
+133.6 206.8 lineto
+136.8 212.4 lineto
+140.8 224.4 lineto
+141.6 231.6 lineto
+141.6 231.6 lineto
+148 233.2 lineto
+151.2 230.8 lineto
+149.6 226.8 lineto
+154.4 227.6 lineto
+157.6 224.4 lineto
+156.8 224.4 lineto
+160 222.8 lineto
+163.2 224.4 lineto
+167.2 221.2 lineto
+166.4 221.2 lineto
+167.2 218 lineto
+170.4 214.8 lineto
+168 212.4 lineto
+162.4 210.8 lineto
+156.8 210.8 lineto
+158.4 206.8 lineto
+157.6 201.2 lineto
+156 196.4 lineto
+153.6 195.6 lineto
+152.8 195.6 lineto
+152.8 190.8 lineto
+150.4 186.8 lineto
+146.4 187.6 lineto
+145.6 182.8 lineto
+147.2 178 lineto
+144 174 lineto
+141.6 170.8 lineto
+142.4 166.8 lineto
+139.2 161.2 lineto
+136 158 lineto
+134.4 151.6 lineto
+128.8 150.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+106 62 moveto
+105.8 96.2 lineto
+105.6 96.4 lineto
+116 97.2 lineto
+125.6 100.4 lineto
+133.6 107.6 lineto
+137.6 113.2 lineto
+141.6 118.8 lineto
+145.6 122 lineto
+151.2 122 lineto
+151.2 117.2 lineto
+152 110 lineto
+156 106.8 lineto
+165.6 104.4 lineto
+172 102 lineto
+178.4 102.8 lineto
+180.8 98 lineto
+186.4 96.4 lineto
+195.2 98 lineto
+200 97.2 lineto
+205.6 100.4 lineto
+212 100.4 lineto
+216 98.8 lineto
+224.8 102 lineto
+236 104.4 lineto
+246.4 104.4 lineto
+256.8 104.4 lineto
+264 102.8 lineto
+268.8 103.6 lineto
+273.6 102 lineto
+279.2 102.8 lineto
+286.4 98.8 lineto
+292.8 97.2 lineto
+300 98.8 lineto
+304.8 99.6 lineto
+309.6 95.6 lineto
+314.4 97.2 lineto
+319.2 96.4 lineto
+324 93.2 lineto
+331.2 93.2 lineto
+339.2 95.6 lineto
+345.6 98 lineto
+350.4 94 lineto
+350.4 94 lineto
+348.8 90.8 lineto
+351.2 87.6 lineto
+355.2 88.4 lineto
+361.6 90 lineto
+361.6 90 lineto
+360.8 86 lineto
+357.6 81.2 lineto
+352.8 77.2 lineto
+352.8 78 lineto
+351.2 74 lineto
+355.2 70.8 lineto
+359.2 67.6 lineto
+359 62 lineto
+106 62 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+257.6 202.4 moveto
+257.6 203.4 258.9 204.4 260.4 204.4 curveto
+261.9 204.4 263.2 203.4 263.2 202.4 curveto
+263.2 201.4 261.9 200.4 260.4 200.4 curveto
+258.9 200.4 257.6 201.4 257.6 202.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+704 100 moveto
+711 99 lineto
+713 106 lineto
+715 115 lineto
+722 122 lineto
+732 118 lineto
+746 119 lineto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+268 154 moveto
+256 152 lineto
+259 151 lineto
+265 148 lineto
+265 143 lineto
+271 149 lineto
+268 154 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+252 145 moveto
+251 146 lineto
+246 142 lineto
+250 140 lineto
+252 145 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+281 153 moveto
+281 153 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+281 152 moveto
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+278 154 moveto
+282 156 lineto
+285 155 lineto
+284 152 lineto
+278 154 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+330 305.5 moveto
+331.2 304.7 332.7 304.9 334 305.5 curveto
+335.9 306.4 336.7 308.4 336.5 310.5 curveto
+336.4 312.3 334.9 313 334 314.5 curveto
+333.3 315.6 333.4 317.5 332 317.5 curveto
+330.3 317.5 332.2 314.5 331.5 313 curveto
+331.1 312 329.9 311.6 329.5 310.5 curveto
+328.9 308.8 328.5 306.6 330 305.5 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.2 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmr
+end % FreeHandDict
+%%EndDocument: _
diff --git a/Master/texmf-dist/doc/latex3/xor/outline.eps b/Master/texmf-dist/doc/latex3/xor/outline.eps
new file mode 100644
index 00000000000..09c0713c8db
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/outline.eps
@@ -0,0 +1,19 @@
+%!PS
+%%BoundingBox: 90 38 425 78
+.91 .91 scale
+50 50 translate
+%% Hand made example to show outline and shaded fonts
+/Palatino-Bold findfont 36 scalefont setfont
+47 0 moveto (Der) true charpath stroke
+117 0 moveto .7 setgray (L) show
+144 0 moveto .7 setgray (T) show
+162 -8 moveto .7 setgray (E) show
+181 0 moveto .7 setgray (X) show
+/Palatino-Bold findfont 28 scalefont setfont
+128 6 moveto .7 setgray (A) show
+/Palatino-Bold findfont 36 scalefont setfont
+200 5 moveto (-) true charpath stroke
+218 9 translate
+.95 -.1 0 { setgray 0 0 moveto (Begleiter) show
+ -1 -1 translate} for
+showpage
diff --git a/Master/texmf-dist/doc/latex3/xor/outline2.eps b/Master/texmf-dist/doc/latex3/xor/outline2.eps
new file mode 100644
index 00000000000..aeeff807a5e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/outline2.eps
@@ -0,0 +1,19 @@
+%!PS
+%%BoundingBox: 90 38 485 78
+.91 .91 scale
+50 50 translate
+%% Hand made example to show outline and shaded fonts
+/Palatino-Bold findfont 36 scalefont setfont
+47 0 moveto (The) true charpath stroke
+117 0 moveto .7 setgray (L) show
+144 0 moveto .7 setgray (T) show
+162 -8 moveto .7 setgray (E) show
+181 0 moveto .7 setgray (X) show
+/Palatino-Bold findfont 28 scalefont setfont
+128 6 moveto .7 setgray (A) show
+/Palatino-Bold findfont 36 scalefont setfont
+200 5 moveto (-) true charpath stroke
+218 9 translate
+.95 -.1 0 { setgray 0 0 moveto (Output Routine !) show
+ -1 -1 translate} for
+showpage
diff --git a/Master/texmf-dist/doc/latex3/xor/oxford-trial.tex b/Master/texmf-dist/doc/latex3/xor/oxford-trial.tex
new file mode 100644
index 00000000000..bbeb7ec22b1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/oxford-trial.tex
@@ -0,0 +1,298 @@
+% $Id: oxford-trial.tex,v 1.1 2000/08/11 06:58:43 latex3 Exp $
+%
+
+\documentclass{article}
+
+%
+% File to make the trial pages for the talk in Oxford.
+% Run with different numbers to get the floats added to the page (0-8);
+% 9 will give grid layout;
+% 10 requires a corresponding .fpc file.
+
+\typein[\TRIAL]{trial?}
+
+\usepackage{xoutput}
+
+\makeatletter
+\def\doif#1{\relax
+ \ifnum#1>\TRIAL\relax
+ \expandafter\@gobble \else \expandafter \@firstofone \fi
+}
+\makeatother
+
+
+\savefloatplacements
+\doif{10}{\readfloatplacements}
+
+\usepackage{graphicx}
+
+\DeclareFloatSequenceClass{figure}
+\DeclareFloatSequenceClass{table}
+\DeclareFloatSequenceClass{algorithm}
+
+\DeclareFloatType{figure}
+ {
+ sequence-class-id = figure,
+ toc-extension = lof,
+ caption-text = \figurename,
+ numbered-boolean = true,
+ numbered-id = figure,
+ numbered-action = \arabic{figure},
+ body-decls = ,
+ }
+
+\DeclareFloatType{table}
+ {
+ sequence-class-id = table,
+ toc-extension = lot,
+ caption-text = \tablename,
+ numbered-boolean = true,
+ numbered-id = table,
+ numbered-action = \arabic{table},
+ body-decls = ,
+ }
+
+\DeclareFloatType{algorithms}
+ {
+ sequence-class-id = algorithm,
+ toc-extension = lot,
+ caption-text = Algorithm,
+ numbered-boolean = true,
+ numbered-id = algorithm,
+ body-decls = ,
+ }
+
+\DeclareFloatArea {t11}
+ {
+ class-close-list = ,
+ all-close-list = {b11},
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {b11}
+ {
+ class-close-list = {t11},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {t21}
+ {
+ class-close-list = {t11,b11},
+ all-close-list = {t22},
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {b21}
+ {
+ class-close-list = {t11,b11,t21},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {t31}
+ {
+ class-close-list = {t11,b11,t21,b21},
+ all-close-list = {t22},
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {b31}
+ {
+ class-close-list = {t11,b11,t21,b21,t31},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {b22}
+ {
+ class-close-list = {t11,b11,t21},
+ all-close-list = {b21,b31},
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea{t22}
+ {
+ class-close-list = {t11},
+ all-close-list = {t21,t31},
+ max-float-num = 1,
+ }
+
+
+\ShowGridfalse
+
+\topskip=12pt
+
+\DeclareInstance{pagesetup2}{normal}{std}{
+ column-num = 3,
+ column-width = 160pt,
+ column-height = 552pt,
+ float-callout-constraint = column,
+ bottom-float-footnote-constraint=forbidden,
+ flush-bottom-float-footnote-constraint=none,
+ max-float-num =4,
+ float-float-sep = 15pt,
+ float-text-sep = 20pt minus 5pt,
+ float-area-sep = 15pt,
+ float-inline-sep = 10pt minus 2pt,
+ area-list = {t22,t11,b11,t21,b21,b22,t31,b31},
+ grid-point-sep = 0pt,
+ }
+
+
+% with TRIAL > 8 we do grid layout:
+
+\doif{9}{
+ \parskip=0pt
+ \DeclareInstance{pagesetup2}{normal}{std}{
+ column-num = 3,
+ column-width = 160pt,
+ column-height = 552pt,
+ float-callout-constraint = column,
+ bottom-float-footnote-constraint=forbidden,
+ flush-bottom-float-footnote-constraint=none,
+ max-float-num =4,
+ float-float-sep = 15pt,
+ float-text-sep = 20pt minus 5pt,
+ float-area-sep = 15pt,
+ float-inline-sep = 10pt minus 2pt,
+ area-list = {t22,t11,b11,t21,b21,b22,t31,b31},
+ grid-point-sep = 12pt,
+ }
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Stuff for producing test pages
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcount\bc
+
+\newcommand\startpar{\par\global\advance\bc1 [\the\bc] }
+
+
+\newcommand\sample{%
+ Infandum, re\-gi\-na, iu\-b\-es re\-no\-va\-re do\-lo\-rem,
+ Troi\-a\-n\-as ut op\-es et
+ la\-men\-ta\-bile re\-g\-num cru\-e\-rint Da\-nai;
+ qua\-e\-que ip\-se mis\-er\-ri\-ma vi\-di, et
+ qu\-o\-rum pa\-rs ma\-g\-na fui.}
+
+
+\newcommand\dofigure[1]{%
+ \startpar callout (#1) to a figure.
+ \doif{#1}{\begin{figure}
+ \caption{Belongs to callout (#1)}\label{mylab:fig#1}
+ \ifcase\value{figure}
+ \or
+ \includegraphics[totalheight=4\baselineskip]{escher.eps}
+ \or
+ \includegraphics[totalheight=4\baselineskip]{cat.eps}
+ \or
+ \includegraphics[width=\columnwidth]{europe.eps}
+ \or
+ \includegraphics[angle=90,width=.7\columnwidth]{rahtz18.eps}
+ \or
+ \includegraphics[angle=180,width=.7\columnwidth]{rahtz18.eps}
+ \else
+ \includegraphics[width=.7\columnwidth]{rahtz18.eps}
+ \fi
+ \end{figure}}
+ \sample\footnote{A footnote figure #1}
+ \par
+ }
+
+\newcommand\doalg[1]{\startpar
+ callout (#1) to an algorithm.%
+ \doif{#1}{\begin{algorithms}
+ \caption{Belongs to callout (#1)}
+ $ A \to B \to C $
+% \includegraphics[totalheight=3\baselineskip,width=\columnwidth]{feynman.eps}
+ \end{algorithms}}\par}
+
+
+\newcommand\dotable[1]{%
+ \startpar
+ callout (#1) to a table.
+ \doif{#1}{\begin{table}
+ \caption{Belongs to callout (#1)}
+ \ifcase\value{table}
+ \or
+ \reflectbox{\includegraphics[width=.8\columnwidth]{theworld.eps}}
+ \else
+ \includegraphics[width=.9\columnwidth]{europe.eps}
+ \fi
+ \end{table}}%
+ \sample\footnote{a footnote table #1}
+ \par
+ }
+
+\newcommand\bb{\startpar \sample\sample\par \sample\sample\sample \par}
+
+
+% where's the interface to spanning floats? :-)
+%
+\newcommand\dospanfigure[1]{%
+ \startpar callout (#1) to a figure.%
+ \doif{4}{\def\SPANCNT{2}%
+ \begin{figure}
+ \includegraphics[width=1.5\columnwidth]{outline2.eps}
+ \caption{Belongs to callout (#1)}
+ \end{figure}\par
+ \def\SPANCNT{}}%
+}
+
+
+\begin{document}
+
+\UseInstance{pagesetup2}{normal}
+
+
+
+
+\startpar callout (1) to a figure.%
+\doif{1}{%
+ \begin{figure}[t21]
+ \reflectbox{\includegraphics[totalheight=4\baselineskip]{cat.eps}}
+ \caption{Forced into t21}
+ \end{figure}}\par
+
+\dofigure2
+\sample
+\doalg3
+
+\dospanfigure{4}
+
+\dofigure5
+
+
+\doalg{6}
+\dotable{7}
+\startpar callout to a here table.%
+\flushfloats[table]
+\begin{table}[h]
+ \includegraphics[width=.8\columnwidth]{europe.eps}
+ \caption{The here table example}
+\end{table}
+
+\bb
+
+\dotable{8}
+
+\bb
+\bb
+\bb
+
+
+\bb
+
+
+THE END % just to make sure we don't lose text
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex3/xor/rahtz18.eps b/Master/texmf-dist/doc/latex3/xor/rahtz18.eps
new file mode 100644
index 00000000000..24644c33307
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/rahtz18.eps
@@ -0,0 +1,174 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator:Adobe Illustrator(TM) 1.1
+%%For:Jim Williams Williams and Helde, Inc.
+%%Title:sgrp2
+%%CreationDate:9/6/88 11:39 am
+%%DocumentProcSets:Adobe_Illustrator_1.1 0 0
+%%DocumentSuppliedProcSets:Adobe_Illustrator_1.1 0 0
+%%DocumentFonts:Courier
+%%BoundingBox: 100 -247 388 -9
+%%TemplateBox:0 -720 576 0
+%%EndComments
+%%BeginProcSet:Adobe_Illustrator_1.1 0 0
+% Copyright (C) 1987 Adobe Systems Incorporated.
+% All Rights Reserved.
+% Adobe Illustrator is a trademark of Adobe Systems Incorporated.
+/Adobe_Illustrator_1.1 dup 100 dict def load begin
+/Version 0 def
+/Revision 0 def
+% definition operators
+/bdef {bind def} bind def
+/ldef {load def} bdef
+/xdef {exch def} bdef
+% graphic state operators
+/_K {3 index add neg dup 0 lt {pop 0} if 3 1 roll} bdef
+/_k /setcmybcolor where
+{/setcmybcolor get} {{1 sub 4 1 roll _K _K _K setrgbcolor pop} bind} ifelse def
+/g {/_b xdef /p {_b setgray} def} bdef
+/G {/_B xdef /P {_B setgray} def} bdef
+/k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef
+/K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef
+/d /setdash ldef
+/_i currentflat def
+/i {dup 0 eq {pop _i} if setflat} bdef
+/j /setlinejoin ldef
+/J /setlinecap ldef
+/M /setmiterlimit ldef
+/w /setlinewidth ldef
+% path construction operators
+/_R {.25 sub round .25 add} bdef
+/_r {transform _R exch _R exch itransform} bdef
+/c {_r curveto} bdef
+/C /c ldef
+/v {currentpoint 6 2 roll _r curveto} bdef
+/V /v ldef
+/y {_r 2 copy curveto} bdef
+/Y /y ldef
+/l {_r lineto} bdef
+/L /l ldef
+/m {_r moveto} bdef
+% error operators
+/_e [] def
+/_E {_e length 0 ne {gsave 0 g 0 G 0 i 0 J 0 j 1 w 10 M [] 0 d
+/Courier 20 0 0 1 z [0.966 0.259 -0.259 0.966
+_e 0 get _e 2 get add 2 div _e 1 get _e 3 get add 2 div] e _f t T grestore} if} bdef
+/_fill {{fill} stopped
+{/_e [pathbbox] def /_f (ERROR: can't fill, increase flatness) def n _E} if} bdef
+/_stroke {{stroke} stopped
+{/_e [pathbbox] def /_f (ERROR: can't stroke, increase flatness) def n _E} if} bdef
+% path painting operators
+/n /newpath ldef
+/N /n ldef
+/F {p _fill} bdef
+/f {closepath F} bdef
+/S {P _stroke} bdef
+/s {closepath S} bdef
+/B {gsave F grestore S} bdef
+/b {closepath B} bdef
+% text block construction and painting operators
+/_s /ashow ldef
+/_S {(?) exch {2 copy 0 exch put pop dup false charpath currentpoint _g setmatrix
+_stroke _G setmatrix moveto 3 copy pop rmoveto} forall pop pop pop n} bdef
+/_A {_a moveto _t exch 0 exch} bdef
+/_L {0 _l neg translate _G currentmatrix pop} bdef
+/_w {dup stringwidth exch 3 -1 roll length 1 sub _t mul add exch} bdef
+/_z [{0 0} bind {dup _w exch neg 2 div exch neg 2 div} bind {dup _w exch neg exch neg} bind] def
+/z {_z exch get /_a xdef /_t xdef /_l xdef exch findfont exch scalefont setfont} bdef
+/_g matrix def
+/_G matrix def
+/_D {_g currentmatrix pop gsave concat _G currentmatrix pop} bdef
+/e {_D p /t {_A _s _L} def} bdef
+/r {_D P /t {_A _S _L} def} bdef
+/a {_D /t {dup p _A _s P _A _S _L} def} bdef
+/o {_D /t {pop _L} def} bdef
+/T {grestore} bdef
+% group construction operators
+/u {} bdef
+/U {} bdef
+% font construction operators
+/Z {findfont begin currentdict dup length dict begin
+{1 index /FID ne {def} {pop pop} ifelse} forall /FontName exch def dup length 0 ne
+{/Encoding Encoding 256 array copy def 0 exch {dup type /nametype eq
+{Encoding 2 index 2 index put pop 1 add} {exch pop} ifelse} forall} if pop
+currentdict dup end end /FontName get exch definefont pop} bdef
+end
+%%EndProcSet
+%%EndProlog
+%%BeginSetup
+Adobe_Illustrator_1.1 begin
+n
+%%EndSetup
+0 g
+0 G
+0 i
+0 J
+0 j
+1 w
+10 M
+[]0 d
+%%Note:
+190.75 -108.496 m
+190.5 -108.498 l
+F
+190.5 -108.498 m
+190.312 -108.5 l
+F
+u
+254.191 -224.829 m
+253.647 -224.865 252.943 -224.908 252.312 -224.958 c
+230.826 -226.686 101.318 -178.083 209.143 -74.959 C
+211.852 -72.161 L
+213.375 -70.875 215.375 -72 217.25 -71.5 c
+228.27 -68.561 245.818 -35.618 243.893 -30.472 c
+243.73 -30.04 242.081 -16.192 238.793 -15.994 C
+238.793 -15.994 L
+232.562 -15.625 226.74 -18.263 227 -19.25 c
+227.625 -21.625 231.076 -23.371 230.5 -23.125 c
+232.687 -24.062 237.25 -30.125 229.125 -28.25 c
+202.504 -22.106 203.75 -66.75 202.75 -73.25 c
+202.696 -73.597 199.682 -76.507 182.092 -99.362 c
+126.468 -171.641 202.374 -213.323 210.25 -219 c
+216.395 -223.43 230.25 -227.25 240.169 -233.447 c
+244.205 -235.969 248.5 -240.25 254 -239 c
+254.191 -224.829 l
+F
+1 g
+217.975 -60.152 m
+223.723 -60.28 232.739 -48.478 v
+234.373 -46.339 230.007 -36.414 223.397 -41.268 c
+216.787 -46.122 217.975 -60.152 y
+f
+U
+0 g
+256 -235 m
+S
+253.808 -224.829 m
+F
+290.024 -60.152 m
+284.276 -60.28 275.261 -48.478 v
+273.626 -46.339 277.992 -36.414 284.602 -41.268 c
+291.212 -46.122 290.024 -60.152 y
+s
+u
+u
+254.25 -15.75 m
+254.25 -238.75 l
+S
+U
+242.5 -16 m
+269.206 -15.994 L
+S
+U
+269.206 -15.994 m
+269.206 -15.994 L
+275.437 -15.625 281.259 -18.263 281 -19.25 c
+280.375 -21.625 276.923 -23.371 277.5 -23.125 c
+275.312 -24.062 270.75 -30.125 278.875 -28.25 c
+305.495 -22.106 304.25 -66.75 305.25 -73.25 c
+305.303 -73.597 308.318 -76.507 325.907 -99.362 c
+381.531 -171.641 305.625 -213.323 297.75 -219 c
+291.604 -223.43 277.75 -227.25 267.83 -233.447 c
+263.794 -235.969 259.5 -240.25 254 -239 c
+S
+%%Trailer
+_E end
diff --git a/Master/texmf-dist/doc/latex3/xor/theworld.eps b/Master/texmf-dist/doc/latex3/xor/theworld.eps
new file mode 100644
index 00000000000..f82b50edb3e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/theworld.eps
@@ -0,0 +1,3058 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: FreeHand
+%%Title: #1
+%%CreationDate: 12/3/90 15:57
+%%BoundingBox: 28 74 814 536
+%%DocumentProcSets: FreeHand_header 2 0
+%%DocumentSuppliedProcSets: FreeHand_header 2 0
+%%EndComments
+%%BeginProcSet: FreeHand_header 2 0
+/FreeHandDict 200 dict def
+FreeHandDict begin
+/currentpacking where{pop true setpacking}if
+/bdf{bind def}bind def
+/bdef{bind def}bdf
+/xdf{exch def}bdf
+/ndf{1 index where{pop pop pop}{dup xcheck{bind}if def}ifelse}bdf
+/min{2 copy gt{exch}if pop}bdf
+/max{2 copy lt{exch}if pop}bdf
+/dr{transform .25 sub round .25 add
+exch .25 sub round .25 add exch itransform}bdf
+/curveto{dr curveto}bdf
+/lineto{dr lineto}bdf
+/moveto{dr moveto}bdf
+/graystep 1 256 div def
+/bottom -0 def
+/delta -0 def
+/frac -0 def
+/left -0 def
+/numsteps -0 def
+/numsteps1 -0 def
+/radius -0 def
+/right -0 def
+/top -0 def
+/x -0 def
+/y -0 def
+/df currentflat def
+/tempstr 1 string def
+/clipflatness 3 def
+/inverted?
+0 currenttransfer exec .5 ge def
+/concatprocs{
+/proc2 exch cvlit def/proc1 exch cvlit def
+/newproc proc1 length proc2 length add array def
+newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval
+newproc cvx}bdf
+/storerect{/top xdf/right xdf/bottom xdf/left xdf}bdf
+/rectpath{newpath left bottom moveto left top lineto
+right top lineto right bottom lineto closepath}bdf
+/sf{dup 0 eq{pop df dup 3 mul}{dup} ifelse /clipflatness xdf setflat}bdf
+version cvr 38.0 le
+{/setrgbcolor{
+currenttransfer exec 3 1 roll
+currenttransfer exec 3 1 roll
+currenttransfer exec 3 1 roll
+setrgbcolor}bdf}if
+/gettint{0 get}bdf
+/puttint{0 exch put}bdf
+/vms{/vmsv save def}bdf
+/vmr{vmsv restore}bdf
+/vmrs{vmr vms}bdf
+/CD{/NF exch def
+{exch dup/FID ne{exch NF 3 1 roll put}
+{pop pop}ifelse}forall NF}bdf
+/MN{1 index length/Len exch def
+dup length Len add string dup
+Len 4 -1 roll putinterval dup 0 4 -1 roll putinterval}bdf
+/RC{256 string cvs(|______)anchorsearch
+{1 index MN cvn/NewN exch def cvn
+findfont dup maxlength dict CD dup/FontName NewN put dup
+/Encoding MacVec put NewN exch definefont pop}{pop}ifelse}bdf
+/RF{dup FontDirectory exch known{pop}{RC}ifelse}bdf
+/FF{dup 256 string cvs(|______)exch MN cvn dup FontDirectory exch known
+{exch}if pop findfont}bdf
+userdict begin /BDFontDict 20 dict def end
+BDFontDict begin
+/bu{}def
+/bn{}def
+/setTxMode{pop}def
+/gm{moveto}def
+/show{pop}def
+/gr{pop}def
+/fnt{pop pop pop}def
+/fs{pop}def
+/fz{pop}def
+/lin{pop pop}def
+end
+/MacVec 256 array def
+MacVec 0 /Helvetica findfont
+/Encoding get 0 128 getinterval putinterval
+MacVec 127 /DEL put MacVec 16#27 /quotesingle put MacVec 16#60 /grave put
+/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI
+/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US
+MacVec 0 32 getinterval astore pop
+/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute
+/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave
+/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute
+/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis
+/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
+/register/copyright/trademark/acute/dieresis/notequal/AE/Oslash
+/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation
+/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash
+/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft
+/guillemotright/ellipsis/nbspace/Agrave/Atilde/Otilde/OE/oe
+/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge
+/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl
+/daggerdbl/periodcentered/quotesinglbase/quotedblbase
+/perthousand/Acircumflex/Ecircumflex/Aacute
+/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex
+/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde
+/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron
+MacVec 128 128 getinterval astore pop
+/fps{currentflat exch dup 0 le{pop 1}if
+{dup setflat 3 index stopped
+{1.3 mul dup 3 index gt{pop setflat pop pop stop}if}{exit}ifelse
+}loop pop setflat pop pop
+}bdf
+/fp{100 currentflat fps}bdf
+/rfp{clipflatness currentflat fps}bdf
+/fcp{100 clipflatness fps}bdf
+/fclip{{clip}fcp}bdf
+/feoclip{{eoclip}fcp}bdf
+end %. FreeHandDict
+%%EndProcSet
+%%BeginSetup
+FreeHandDict begin
+/ccmyk{dup 5 -1 roll sub 0 max exch}ndf
+/setcmykcolor{1 exch sub ccmyk ccmyk ccmyk pop setrgbcolor}ndf
+/setcmykcoloroverprint{4{dup -1 eq{pop 0}if 4 1 roll}repeat setcmykcolor}ndf
+/findcmykcustomcolor{5 /packedarray where{pop packedarray}{array astore readonly}ifelse}ndf
+/setcustomcolor{exch aload pop pop 4{4 index mul 4 1 roll}repeat setcmykcolor pop}ndf
+/setseparationgray{1 exch sub dup dup dup setcmykcolor}ndf
+/setoverprint{pop}ndf
+/currentoverprint false ndf
+/colorimage{pop pop
+[5 -1 roll/exec cvx 6 -1 roll/exec cvx 7 -1 roll/exec cvx 8 -1 roll/exec cvx
+/exch cvx/pop cvx/exch cvx/pop cvx/exch cvx/pop cvx/invbuf cvx]cvx image}
+%. version 47.1 of Postscript defines colorimage incorrectly (rgb model only)
+version cvr 47.1 le{userdict begin bdf end}{ndf}ifelse
+/customcolorimage{pop image}ndf
+/separationimage{image}ndf
+/newcmykcustomcolor{6 /packedarray where{pop packedarray}{array astore readonly}ifelse}ndf
+/inkoverprint false ndf
+/setinkoverprint{pop}ndf
+/overprintprocess{pop}ndf
+/setspotcolor
+{spots exch get 0 5 getinterval exch setcustomcolor}ndf
+/currentcolortransfer{currenttransfer dup dup dup}ndf
+/setcolortransfer{systemdict begin settransfer end pop pop pop}ndf
+/setimagecmyk{dup length 4 eq
+{aload pop}
+{aload pop spots exch get 0 4 getinterval aload pop 4
+{4 index mul 4 1 roll}repeat 5 -1 roll pop} ifelse
+systemdict /colorimage known{version cvr 47.1 gt}{false}ifelse
+not{pop 1 currentgray sub}if
+/ik xdf /iy xdf /im xdf /ic xdf
+}ndf
+/setcolor{dup length 4 eq
+{aload overprintprocess setcmykcolor}
+{aload 1 get spots exch get 5 get setinkoverprint setspotcolor}
+ifelse}ndf
+/bc2[0 0]def
+/bc4[0 0 0 0]def
+/c1[0 0 0 0]def
+/c2[0 0 0 0]def
+/absmax{2 copy abs exch abs gt{exch}if pop}bdf
+/calcstep
+{c1 length 4 eq
+{
+0 1 3
+{c1 1 index get
+c2 3 -1 roll get
+sub
+}for
+absmax absmax absmax
+}
+{
+bc2 c1 1 get 1 exch put
+c1 gettint c2 gettint
+sub abs
+}ifelse
+graystep div abs round dup 0 eq{pop 1}if
+dup /numsteps xdf 1 sub dup 0 eq{pop 1}if /numsteps1 xdf
+}bdf
+/cblend{
+c1 length 4 eq
+{
+0 1 3
+{bc4 exch
+c1 1 index get
+c2 2 index get
+1 index sub
+frac mul add put
+}for bc4
+}{
+bc2
+c1 gettint
+c2 gettint
+1 index sub
+frac mul add
+puttint bc2
+}ifelse
+setcolor
+}bdf
+/logtaper{/frac frac 9 mul 1 add log def}bdf
+/imbits 1 def
+/iminv false def
+/invbuf{0 1 2 index length 1 sub{dup 2 index exch get 255 exch sub 2 index 3 1 roll put}for}bdf
+/cyanrp{currentfile cyanbuf readhexstring pop iminv{invbuf}if}def
+/magentarp{cyanbuf magentabuf copy}bdf
+/yellowrp{cyanbuf yellowbuf copy}bdf
+/blackrp{cyanbuf blackbuf copy}bdf
+/fixtransfer{
+dup{ic mul ic sub 1 add}concatprocs exch
+dup{im mul im sub 1 add}concatprocs exch
+dup{iy mul iy sub 1 add}concatprocs exch
+{ik mul ik sub 1 add}concatprocs
+currentcolortransfer
+5 -1 roll exch concatprocs 7 1 roll
+4 -1 roll exch concatprocs 6 1 roll
+3 -1 roll exch concatprocs 5 1 roll
+concatprocs 4 1 roll
+setcolortransfer
+}bdf
+/currentpacking where{pop false setpacking}if
+%%EndSetup
+/spots[1 0 0 0 (Process Cyan) false newcmykcustomcolor
+0 1 0 0 (Process Magenta) false newcmykcustomcolor
+0 0 1 0 (Process Yellow) false newcmykcustomcolor
+0 0 0 1 (Process Black) false newcmykcustomcolor
+]def
+vms
+0 sf
+newpath
+28.6 534.9 moveto
+812.7 534.9 lineto
+812.7 74.6 lineto
+28.6 74.6 lineto
+closepath
+gsave
+[0 0 0 0.1]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+343.1 534.7 moveto
+300.3 534.7 lineto
+300.3 534.7 lineto
+300.1 533.3 300.5 531.9 299.7 530.9 curveto
+298 528.9 295.9 533.1 293.4 533.4 curveto
+291.8 533.6 289.6 535 289 533.4 curveto
+288.6 532.3 290.5 531.4 290.2 530.3 curveto
+289.7 528.5 285.4 528.4 285.2 530.3 curveto
+285.2 530.5 285.2 530.7 285.2 530.9 curveto
+285 532.9 282.1 532.2 280.1 532.2 curveto
+277.4 532.2 275.5 531.6 273.2 530.3 curveto
+271.6 529.4 271 527.9 269.4 527.1 curveto
+267.9 526.4 266.5 526.5 265 525.9 curveto
+262.9 525 258.2 523.6 260 522.1 curveto
+260.9 521.4 262.3 522.3 263.1 521.5 curveto
+264.5 520.1 261.6 518.2 260 517.1 curveto
+258.2 515.9 256.4 516.3 254.3 515.8 curveto
+251.2 515 244.8 516.3 246.1 513.3 curveto
+246.7 511.8 248.4 511.3 249.9 510.8 curveto
+251.4 510.3 252.7 510.4 254.3 510.1 curveto
+255.7 509.8 258.2 510.4 258.1 508.9 curveto
+258 507.5 255.6 508.3 254.3 508.2 curveto
+252.2 507.9 248.3 509.8 248.6 507.6 curveto
+248.9 505.8 253 505.7 253 505.7 curveto
+253 505.7 lineto
+252.4 504.8 251.1 504.3 251.2 503.2 curveto
+251.4 501.5 254 503.1 255.6 503.2 curveto
+257.4 503.4 258.7 504.4 260.6 504.5 curveto
+263.2 504.7 265 504.3 267.5 503.8 curveto
+269.7 503.4 271.3 503.1 273.2 501.9 curveto
+275.4 500.5 276.6 498.7 277.6 496.3 curveto
+278.5 494.1 278.9 492.4 278.9 490 curveto
+278.9 487.5 274.9 485 277 483.7 curveto
+278.4 482.8 279.8 484.7 281.4 484.3 curveto
+283.5 483.7 287 481.2 285.2 479.9 curveto
+283.9 479 281.9 482.3 280.8 481.1 curveto
+280.4 480.6 280.1 480 280.1 479.3 curveto
+280.1 477.7 282.9 478.6 283.9 477.4 curveto
+284.9 476.2 285.5 474.6 285.2 473 curveto
+284.8 470.7 281.2 471.2 280.1 469.2 curveto
+279.1 467.5 279 466.1 278.9 464.1 curveto
+278.8 462 279 460.5 279.5 458.5 curveto
+280 456.5 281.4 455.3 282 453.4 curveto
+282.6 451.7 282.6 450.1 283.3 448.4 curveto
+284.2 446.3 285.3 444.8 287.1 443.3 curveto
+288.9 441.8 290.8 441.5 292.7 440.2 curveto
+293.9 439.4 294.4 437.7 295.9 437.7 curveto
+297.9 437.6 298.9 439.8 299.7 441.5 curveto
+300.7 443.6 299.5 445.6 300.3 447.8 curveto
+300.9 449.6 302.4 450.6 303.4 452.2 curveto
+304.3 453.7 304.6 455.4 306 456.6 curveto
+307 457.5 308 457.8 309.1 458.5 curveto
+310.6 459.5 311.2 460.9 312.9 461.6 curveto
+314.6 462.3 316.2 461.6 317.9 462.2 curveto
+320.9 463.4 320.9 467 323.6 468.5 curveto
+325.5 469.6 327.2 469.6 329.3 470.4 curveto
+330.9 471 332.1 471.6 333.7 472.3 curveto
+336.6 473.6 342.1 473 341.2 476.1 curveto
+340.5 478.7 336.5 476.6 334.3 478 curveto
+333 478.8 330.8 479.6 331.2 481.1 curveto
+331.6 482.7 333.9 482 335.6 481.8 curveto
+336.8 481.7 337.6 480.9 338.7 480.5 curveto
+340.1 480 341.3 478.4 342.5 479.3 curveto
+343.4 480 343.3 481.2 343.1 482.4 curveto
+342.8 484.2 340.6 484.4 339.4 485.6 curveto
+338.2 486.8 336 487.5 336.2 489.3 curveto
+336.3 490.5 337.1 491.4 338.1 491.9 curveto
+339.6 492.6 341 490.6 342.5 491.2 curveto
+344 491.8 344.5 493.5 345 495 curveto
+345.6 496.7 344.8 498.4 345.7 500 curveto
+346.4 501.2 348.7 501.1 348.8 502.6 curveto
+348.9 504.5 344.3 504 345 505.7 curveto
+345.5 506.8 347 506.8 348.2 507 curveto
+350 507.4 351.4 506.5 353.2 507 curveto
+354.5 507.4 355.9 507.7 356.4 508.9 curveto
+357.4 511.1 352.5 510.4 350.1 510.8 curveto
+348.3 511.1 345.9 509.7 345 511.4 curveto
+344.2 512.9 345.1 514.6 346.3 515.8 curveto
+347.5 517 349.2 516.6 350.7 517.1 curveto
+352.1 517.6 354.5 517.3 354.5 518.9 curveto
+354.5 520.6 350.8 518.7 350.1 520.2 curveto
+349.1 522.3 353 522.9 355.1 524 curveto
+356.8 524.9 358.4 525 360.1 525.9 curveto
+362.2 527 366 527.5 365.2 529.7 curveto
+364.4 531.7 361.7 530.3 359.5 530.3 curveto
+357.6 530.3 356.3 530 354.5 529.7 curveto
+352.6 529.4 351.3 528.7 349.4 528.4 curveto
+348.1 528.2 347 528.2 345.7 527.8 curveto
+343.8 527.2 342.6 523.1 341.2 524.6 curveto
+340.1 525.8 342.9 527.6 341.9 529 curveto
+341.4 529.8 340.4 530.3 339.4 530.3 curveto
+338.1 530.4 337.5 529.1 336.2 529 curveto
+334.5 528.8 333.4 529.5 331.8 529.7 curveto
+330.2 529.9 328 528.7 327.4 530.3 curveto
+326.7 532.1 330 532.5 331.8 532.8 curveto
+333.6 533.1 334.9 532.1 336.8 532.2 curveto
+339.4 532.4 341.1 533.2 343.1 534.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+257.5 534.7 moveto
+237.3 534.7 lineto
+237.2 534.9 236.9 535.2 236.7 535.3 curveto
+235.1 536.5 233.7 533 231.6 532.8 curveto
+229.4 532.6 228.2 534.2 226 534.1 curveto
+223.9 534 222.9 532.6 220.9 532.2 curveto
+219.1 531.8 217.7 531.9 215.9 531.5 curveto
+214.5 531.2 211.7 531.8 212.1 530.3 curveto
+212.4 529.3 214 529.7 214.6 529 curveto
+215.3 528.2 215.2 526.7 215.9 525.9 curveto
+216.8 524.9 218.3 524.8 219.7 524.6 curveto
+221.5 524.3 222.9 524.4 224.7 524.6 curveto
+226.5 524.8 228 525.3 229.7 525.9 curveto
+231.6 526.5 233.2 529.6 234.8 528.4 curveto
+235.6 527.8 236.1 526.9 236 525.9 curveto
+235.9 524.5 234 524.6 232.9 524 curveto
+231.8 523.4 229.8 523.5 229.7 522.1 curveto
+229.7 521.4 230.5 520.9 230.4 520.2 curveto
+230.2 518.7 228 521.2 226.6 521.5 curveto
+225.3 521.8 223.5 523.2 222.8 522.1 curveto
+222.4 521.4 222.5 520.4 222.8 519.6 curveto
+223.2 518.5 225.3 518.9 225.3 517.7 curveto
+225.3 516.3 223.3 516.5 222.2 515.8 curveto
+220.7 514.8 216.9 513.7 218.4 512.6 curveto
+219.3 512 220.6 513.3 221.5 512.6 curveto
+222.1 512.1 222.5 510.9 222.2 510.1 curveto
+221.9 509.2 220.7 509 219.7 508.9 curveto
+218.2 508.7 217.4 510.4 215.9 510.1 curveto
+214.7 509.9 214.3 508.9 213.4 508.2 curveto
+212.4 507.4 210.8 507.1 210.8 505.7 curveto
+210.8 504.1 213.1 504 214.6 503.8 curveto
+216.4 503.5 217.8 504.5 219.7 504.5 curveto
+221.6 504.5 222.9 504 224.7 503.8 curveto
+226.5 503.6 227.9 502.7 229.7 503.2 curveto
+231.1 503.6 232.4 504.4 232.9 505.7 curveto
+233.5 507.2 231.5 508.7 232.3 510.1 curveto
+233.1 511.5 235.2 510.8 236.7 511.4 curveto
+238.5 512.2 240.2 512.8 241.1 514.5 curveto
+241.9 516 240.6 517.6 241.7 518.9 curveto
+242.6 520 244.1 520 245.5 520.2 curveto
+246.8 520.4 248 519.8 249.3 520.2 curveto
+251 520.7 251.6 522.4 253 523.4 curveto
+255.4 525.2 262.9 526.7 260 527.8 curveto
+258.7 528.3 256.7 526.5 256.2 527.8 curveto
+255.7 529.2 258 529.8 259.3 530.3 curveto
+260.8 530.9 262.2 530.7 263.8 530.9 curveto
+265.4 531.1 266.7 530.9 268.2 531.5 curveto
+272.2 533.1 260.6 534.7 257.5 534.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+134 483.7 moveto
+133.2 485.8 135.1 487.2 135.9 489.3 curveto
+136.7 491.5 136.4 493.8 138.4 495 curveto
+139.8 495.8 141.1 495.7 142.8 495.6 curveto
+144.5 495.5 145.5 494.4 147.2 494.4 curveto
+148.7 494.4 149.6 496 151 495.6 curveto
+152.6 495.2 153.9 493.6 153.5 491.9 curveto
+153.1 490.1 150.6 490.9 149.1 490 curveto
+147.3 489 146.2 487.7 144.7 486.2 curveto
+143.2 484.7 142.9 482.5 140.9 481.8 curveto
+138.4 480.9 135 481.2 134 483.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+147.2 482.4 moveto
+147 484 148.3 485 149.1 486.2 curveto
+150.3 487.9 151.3 489.7 153.5 490 curveto
+155.2 490.2 156.2 488.9 157.9 488.7 curveto
+159.1 488.6 160.2 489.3 161.1 488.7 curveto
+161.9 488.2 161.5 486.6 162.3 486.2 curveto
+163.9 485.3 164.3 489.9 166.1 489.3 curveto
+167.4 488.9 167.9 484.8 168 486.2 curveto
+168 486.4 168 486.6 168 486.8 curveto
+168 488.5 165.8 483 167.4 482.4 curveto
+168.8 481.9 169.8 483.7 170.5 484.9 curveto
+171.7 486.9 168.1 490.8 170.5 491.2 curveto
+172.2 491.5 173.3 490 174.3 488.7 curveto
+175.5 487.2 175.8 485.6 176.2 483.7 curveto
+176.5 482.1 175.8 480.5 176.8 479.3 curveto
+177.6 478.4 179.6 479.2 180 478 curveto
+180.2 477.2 179.8 476.1 179.3 475.5 curveto
+178.6 474.7 176.6 475.9 176.2 474.8 curveto
+175.8 473.6 178.7 473.6 178.7 472.3 curveto
+178.7 470.4 175.5 471.5 173.7 471.7 curveto
+172 471.9 171.1 473.6 169.3 473.6 curveto
+167.2 473.6 166.2 472.3 164.2 471.7 curveto
+162.4 471.2 161 470.7 159.2 470.4 curveto
+157.6 470.1 156.2 468.9 154.8 469.8 curveto
+153.6 470.6 154.4 472.5 153.5 473.6 curveto
+152.3 475.1 148 473.5 148.5 475.5 curveto
+148.9 477.2 151.2 476.6 152.9 476.7 curveto
+155 476.9 158 474 158.5 476.1 curveto
+158.8 477.4 158.2 478.5 157.3 479.3 curveto
+156.1 480.4 154.5 479.5 152.9 479.9 curveto
+150.6 480.4 147.5 480 147.2 482.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+145.3 501.9 moveto
+145.4 504 147.9 504.1 149.7 505.1 curveto
+151.7 506.2 153.1 507.3 155.4 507.6 curveto
+156.7 507.8 158.4 508.7 159.2 507.6 curveto
+160.3 506.1 156.7 505.7 155.4 504.5 curveto
+154.1 503.3 153.9 501.5 152.2 500.7 curveto
+149.8 499.6 145.2 499.2 145.3 501.9 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+154.8 496.9 moveto
+154.5 498.6 156.1 499.5 157.3 500.7 curveto
+158.5 501.9 159.4 503.2 161.1 503.2 curveto
+162.6 503.2 163.5 501.9 164.8 501.3 curveto
+166.2 500.6 167 499.1 168.6 499.4 curveto
+170.3 499.7 169.4 503.2 171.1 503.2 curveto
+172.3 503.2 172.7 501.8 173.7 501.3 curveto
+175.2 500.6 178.3 501.7 178.1 500 curveto
+178 498.6 176.1 498.7 174.9 498.2 curveto
+172.9 497.4 171.3 497.8 169.3 496.9 curveto
+167.8 496.3 167 495 165.5 494.4 curveto
+163.7 493.6 161.3 491.3 160.4 493.1 curveto
+160 493.9 160.2 494.8 160.4 495.6 curveto
+161 497.7 166 496 165.5 498.2 curveto
+165 500.2 162.4 499.5 160.4 499.4 curveto
+158.1 499.3 155.3 494.6 154.8 496.9 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+181.9 486.8 moveto
+181.9 486.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+183.7 484.9 moveto
+183.7 484.9 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+182.5 488.1 moveto
+182.2 490 184 491 185.6 491.9 curveto
+187.6 493 192.2 494.9 191.9 492.5 curveto
+191.8 491.3 190 491.2 190 490 curveto
+190 488.6 192.3 488.8 192.6 487.4 curveto
+192.8 486.2 192.5 485.3 191.9 484.3 curveto
+191.2 483.2 190.2 482.4 188.8 482.4 curveto
+187.1 482.4 186.8 484.6 185.6 485.6 curveto
+184.5 486.5 182.8 486.6 182.5 488.1 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+195.7 486.8 moveto
+194 487.9 195.6 490.6 197 491.9 curveto
+198.3 493.1 200.1 493.1 202 493.1 curveto
+203.4 493.1 205.3 493.7 205.8 492.5 curveto
+206.3 491.4 205.5 490.1 204.5 489.3 curveto
+203.2 488.3 201.7 489.6 200.1 489.3 curveto
+198.3 488.9 197.3 485.8 195.7 486.8 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+183.7 500 moveto
+183.3 501.4 184.9 502.9 186.3 503.2 curveto
+187.4 503.4 188.3 502.2 189.4 502.6 curveto
+190.5 503 190.1 504.8 191.3 505.1 curveto
+192.7 505.4 194.2 504.6 194.5 503.2 curveto
+194.8 501.9 194 501 193.2 500 curveto
+191.6 497.9 188.8 497.3 186.3 498.2 curveto
+185.2 498.5 184 498.9 183.7 500 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+183.1 517.7 moveto
+183.9 518.8 185.5 518.5 186.9 518.3 curveto
+188.6 518.1 189.5 516.9 190.7 515.8 curveto
+191.7 514.9 193.6 514 193.2 512.6 curveto
+192.8 511.2 190.9 511.4 189.4 511.4 curveto
+187.8 511.4 186.7 512.4 185.6 513.3 curveto
+184.2 514.5 182.1 516.2 183.1 517.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+197.6 505.7 moveto
+197.6 505.7 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+200.1 503.8 moveto
+200.6 501.9 204.1 504.1 205.2 502.6 curveto
+206.2 501.3 204.9 499.5 205.8 498.2 curveto
+206.7 496.9 208.1 496.7 209.6 496.3 curveto
+211.9 495.7 213.6 496.2 215.9 496.3 curveto
+217.7 496.4 219 497 220.9 496.9 curveto
+222.6 496.8 223.6 495.6 225.3 495.6 curveto
+227.1 495.6 229.5 495.7 229.7 497.5 curveto
+229.9 499.2 228.1 500 226.6 500.7 curveto
+224.5 501.7 222.7 500.8 220.3 500.7 curveto
+217.9 500.6 216.3 499.6 214 500 curveto
+211.9 500.4 210.1 500.9 208.9 502.6 curveto
+208.3 503.5 208.4 504.8 207.7 505.7 curveto
+206.5 507.3 204.5 508.3 202.6 507.6 curveto
+201 507 199.7 505.4 200.1 503.8 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+213.4 477.4 moveto
+211.4 477.5 209.9 477.6 208.3 478.6 curveto
+206.7 479.6 205.4 481 205.2 483 curveto
+205 485.1 205.9 486.4 207.1 488.1 curveto
+208.1 489.5 209.4 490.3 210.8 491.2 curveto
+211.9 491.9 212.8 493.7 214 493.1 curveto
+215.4 492.4 212.3 490.9 212.1 489.3 curveto
+211.9 487.6 212.1 486.4 212.7 484.9 curveto
+213.2 483.6 213.7 481.8 215.2 481.8 curveto
+216.9 481.8 216.3 484.6 216.5 486.2 curveto
+216.7 487.8 215.6 489.2 216.5 490.6 curveto
+217.6 492.2 219.8 492.5 221.5 491.9 curveto
+222.8 491.4 223.3 489.8 224.1 488.7 curveto
+224.9 487.6 225.3 486.1 226.6 485.6 curveto
+228.8 484.7 229.9 488.2 232.3 488.1 curveto
+234.1 488.1 235.5 487.4 236.7 486.2 curveto
+237.8 485.1 237.3 483.2 238.6 482.4 curveto
+240.2 481.5 242.3 484.3 243.6 483 curveto
+244.5 482.1 243.5 480.4 244.2 479.3 curveto
+245.2 477.8 247.4 478.6 248.6 477.4 curveto
+249.8 476.2 251.2 474.6 250.5 473 curveto
+250.1 471.9 248.3 472.3 248 471.1 curveto
+247.5 469.2 250.8 469.4 252.4 468.5 curveto
+254.3 467.4 256.1 467.1 257.5 465.4 curveto
+258.3 464.4 259.3 463.6 259.3 462.2 curveto
+259.3 460.4 258 458.5 256.2 458.5 curveto
+254.8 458.5 254.2 459.8 253 460.4 curveto
+251.7 461.1 250.7 462.6 249.3 462.2 curveto
+248.2 461.9 247.4 460.9 247.4 459.7 curveto
+247.3 458.2 249.1 457.8 249.9 456.6 curveto
+250.9 455.1 252.2 454.1 252.4 452.2 curveto
+252.5 450.8 252.5 449.5 251.8 448.4 curveto
+249.9 445.5 244.9 456.8 244.2 453.4 curveto
+243.8 451.5 245 450 246.1 448.4 curveto
+247.1 446.9 250.6 446.9 249.9 445.2 curveto
+249.3 443.7 247.2 444.5 245.5 444.6 curveto
+241.9 444.8 239.7 446.4 237.3 449 curveto
+235.8 450.6 236.1 453 234.1 454.1 curveto
+232.1 455.2 230.1 453.6 227.8 454.1 curveto
+226.1 454.4 223.4 454.1 223.4 455.9 curveto
+223.4 457.4 225.3 458 226.6 458.5 curveto
+228.6 459.3 230.5 457.4 232.3 458.5 curveto
+233.9 459.4 234 461.2 234.8 462.9 curveto
+235.5 464.5 236.8 465.5 236.7 467.3 curveto
+236.7 468.5 236.5 470 235.4 470.4 curveto
+234.1 470.8 232.9 469.7 232.3 468.5 curveto
+231.8 467.5 233 466.4 232.3 465.4 curveto
+231.6 464.3 229.3 463.8 228.5 464.8 curveto
+227.8 465.7 228.2 466.8 228.5 467.9 curveto
+229 469.8 232.1 469.7 232.3 471.7 curveto
+232.5 473.5 231.7 475 230.4 476.1 curveto
+229.2 477.1 227.6 477.1 226 477.4 curveto
+224.4 477.7 223.2 478 221.5 478 curveto
+219.8 478 218.8 477.5 217.1 477.4 curveto
+215.7 477.4 214.8 477.3 213.4 477.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+338.1 459.1 moveto
+338 461 338.7 463.5 340.6 463.5 curveto
+342.3 463.5 342.1 460.5 343.8 460.4 curveto
+345.5 460.3 345.8 462.7 347.5 462.9 curveto
+348.9 463.1 350 462.4 351.3 462.2 curveto
+352.9 462 354.1 461.3 355.7 461.6 curveto
+357.3 461.9 358 464.7 359.5 464.1 curveto
+360.8 463.6 360.1 461.6 360.8 460.4 curveto
+361.6 459 363.8 458.9 363.9 457.2 curveto
+364.1 454.8 360.9 454.6 358.9 453.4 curveto
+356.9 452.2 355.6 450.4 353.2 450.3 curveto
+350.9 450.2 349.7 451.9 347.5 452.2 curveto
+345.2 452.5 341.5 449.8 341.2 452.2 curveto
+341.1 453.4 342.5 454.1 342.5 455.3 curveto
+342.5 457.5 338.3 456.9 338.1 459.1 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+205.8 450.3 moveto
+205.5 451.8 207.6 452.2 208.3 453.4 curveto
+209.2 454.9 208.4 457.6 210.2 457.8 curveto
+211.6 458 212.2 456.4 213.4 455.9 curveto
+214.4 455.5 216 455.7 216.5 454.7 curveto
+216.8 454 216.1 453 216.5 452.2 curveto
+217 451.1 219.7 452.2 219.7 450.9 curveto
+219.7 449.9 218.7 449.2 217.8 449 curveto
+216.3 448.6 215.6 450.9 214 450.9 curveto
+212.4 450.9 211.8 449.1 210.2 449 curveto
+208.5 448.9 206.1 448.6 205.8 450.3 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+212.1 444 moveto
+211.7 445.1 211.9 446.3 212.7 447.1 curveto
+213.7 448.1 215.5 448.1 216.5 447.1 curveto
+217.9 445.7 212.8 442.2 212.1 444 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+183.1 471.7 moveto
+182.4 473.4 184.4 475.6 186.3 475.5 curveto
+187.5 475.4 188.1 474.4 188.8 473.6 curveto
+189.7 472.6 191.3 471.6 190.7 470.4 curveto
+190.1 469.2 188.2 470.2 186.9 470.4 curveto
+185.5 470.6 183.6 470.4 183.1 471.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmrs
+0 sf
+newpath
+192.6 316.1 moveto
+192 317.7 194.8 318.1 196.3 318.6 curveto
+197.8 319.1 199.1 319.3 200.8 319.2 curveto
+202.5 319.1 203.7 318.6 205.2 318 curveto
+206.9 317.4 208.1 316.4 209.6 315.5 curveto
+211.3 314.5 212.3 313.4 214 312.3 curveto
+215.1 311.6 217 311.8 217.1 310.4 curveto
+217.2 308.7 214.4 309.2 212.7 309.2 curveto
+211.3 309.2 209.3 308.5 208.9 309.8 curveto
+208.7 310.6 209.7 311.4 209.6 312.3 curveto
+209.4 313.8 207.7 314.2 206.4 314.8 curveto
+204.8 315.6 203.2 315.8 201.4 316.1 curveto
+199.8 316.4 198.7 316.7 197 316.7 curveto
+195.3 316.7 193.2 314.5 192.6 316.1 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+217.1 305.4 moveto
+217.1 306.8 219.8 306 220.3 307.3 curveto
+220.6 308.1 219.9 309.1 220.3 309.8 curveto
+221 310.9 222.8 309.4 224.1 309.2 curveto
+225.4 309 226.6 309 227.8 308.5 curveto
+229.3 307.8 231.6 307 231 305.4 curveto
+230.6 304.2 229 304.4 227.8 304.1 curveto
+226.7 303.8 225.9 303.5 224.7 303.5 curveto
+223.4 303.5 222.7 304.4 221.5 304.7 curveto
+219.9 305.1 217.1 303.7 217.1 305.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+119.5 347 moveto
+119.5 350.1 lineto
+113.8 353.3 lineto
+110.7 360.2 lineto
+110 365.2 lineto
+108.1 371.5 lineto
+109.4 378.5 lineto
+111.3 384.8 lineto
+111.9 394.8 lineto
+117 394.8 lineto
+115.7 398.6 lineto
+113.2 403 lineto
+108.8 404.9 lineto
+108.1 411.8 lineto
+105 416.9 lineto
+103.7 420.7 lineto
+102.5 425.1 lineto
+99.3 426.3 lineto
+96.2 430.7 lineto
+93 430.1 lineto
+89.9 433.3 lineto
+85.5 435.8 lineto
+79.2 437 lineto
+75.4 440.2 lineto
+72.2 440.2 lineto
+71.6 437 lineto
+68.5 435.2 lineto
+63.4 430.7 lineto
+64.7 434.5 lineto
+66.6 438.3 lineto
+69.1 440.8 lineto
+64.7 440.2 lineto
+62.2 437 lineto
+58.4 433.9 lineto
+59 430.7 lineto
+53.3 427 lineto
+48.3 423.8 lineto
+42 420 lineto
+37.6 419.4 lineto
+30 415.6 lineto
+32.5 420 lineto
+38.2 421.9 lineto
+43.9 425.1 lineto
+48.9 428.9 lineto
+49.6 431.4 lineto
+45.8 431.4 lineto
+43.9 432 lineto
+40.1 431.4 lineto
+40.7 435.2 lineto
+42.6 438.3 lineto
+37.6 435.2 lineto
+36.3 437.7 lineto
+40.1 439.6 lineto
+36.3 441.5 lineto
+33.8 444.6 lineto
+38.2 446.5 lineto
+41.4 448.4 lineto
+45.8 449 lineto
+50.2 454.1 lineto
+44.5 452.8 lineto
+40.1 453.4 lineto
+38.8 456.6 lineto
+35.1 457.8 lineto
+40.1 459.7 lineto
+43.9 461.6 lineto
+47 459.7 lineto
+50.8 460.4 lineto
+54.6 460.4 lineto
+52.1 463.5 lineto
+47 466 lineto
+45.1 469.8 lineto
+48.9 470.4 lineto
+53.3 475.5 lineto
+57.1 475.5 lineto
+61.5 478 lineto
+65.9 479.3 lineto
+69.7 479.9 lineto
+70.3 476.1 lineto
+74.1 478 lineto
+77.9 476.7 lineto
+82.3 476.7 lineto
+88.6 475.5 lineto
+96.8 474.8 lineto
+103.7 472.3 lineto
+110 469.8 lineto
+110 473.6 lineto
+112.6 474.8 lineto
+116.3 474.2 lineto
+122 477.4 lineto
+120.1 474.2 lineto
+117 471.1 lineto
+120.7 473 lineto
+123.9 474.2 lineto
+126.4 478 lineto
+127.7 474.8 lineto
+129.6 471.7 lineto
+131.5 476.1 lineto
+132.7 472.3 lineto
+135.9 474.2 lineto
+139.6 473 lineto
+145.3 470.4 lineto
+148.5 471.1 lineto
+152.2 469.2 lineto
+149.1 466.7 lineto
+152.9 466 lineto
+159.2 466 lineto
+163 465.4 lineto
+163 462.2 lineto
+165.5 461.6 lineto
+165.5 465.4 lineto
+167.4 467.3 lineto
+164.2 468.5 lineto
+166.7 469.8 lineto
+170.5 468.5 lineto
+174.3 466.7 lineto
+180.6 466.7 lineto
+186.3 467.9 lineto
+190 465.4 lineto
+193.2 468.5 lineto
+195.1 473 lineto
+191.3 475.5 lineto
+192.6 479.9 lineto
+194.5 482.4 lineto
+197.6 481.8 lineto
+198.9 477.4 lineto
+199.5 473 lineto
+201.4 468.5 lineto
+203.9 473 lineto
+205.8 470.4 lineto
+207.1 465.4 lineto
+210.2 467.9 lineto
+212.7 470.4 lineto
+212.7 474.2 lineto
+212.7 475.4 213.5 476.4 214.6 476.7 curveto
+216.2 477.2 217.4 475.4 218.4 474.2 curveto
+219.3 473.2 220.5 472.5 220.3 471.1 curveto
+220.1 469.7 217.2 470.6 217.1 469.2 curveto
+217 467.8 219.2 467.9 219.7 466.7 curveto
+220.2 465.5 220.4 464.1 219.7 462.9 curveto
+218.7 461.2 216.4 462.3 214.6 461.6 curveto
+213.7 461.3 213.1 460.4 212.1 460.4 curveto
+210.8 460.3 210.2 461.9 208.9 461.6 curveto
+208.1 461.5 207.4 461.1 207.1 460.4 curveto
+206.9 459.8 207.5 459.1 207.1 458.5 curveto
+206.6 457.7 205.5 458.4 204.5 458.5 curveto
+203.1 458.6 201.8 460.5 200.8 459.7 curveto
+200.2 459.3 199.9 458.1 200.1 457.2 curveto
+200.4 455.8 202.8 456.6 203.3 455.3 curveto
+203.8 453.9 202.9 452.5 202 451.5 curveto
+200.4 449.8 196.3 453.2 195.7 450.9 curveto
+195.4 449.8 196.5 449 196.3 447.8 curveto
+195.9 445.5 193 446 191.3 444.6 curveto
+189.4 443 188.1 441.7 186.9 439.6 curveto
+185.5 437.2 182.8 434.9 184.4 432.6 curveto
+185.1 431.5 186.7 431.7 187.5 430.7 curveto
+188.5 429.4 187.9 427.6 188.8 426.3 curveto
+190.3 424.3 192.8 424.8 195.1 423.8 curveto
+197.5 422.8 199.1 422 201.4 420.7 curveto
+202.8 419.9 203.6 418.5 205.2 418.1 curveto
+206.5 417.8 207.9 419.1 208.9 418.1 curveto
+209.9 417.1 208.9 415.8 208.9 414.4 curveto
+208.9 412.5 208.3 411 208.9 409.3 curveto
+209.4 407.9 210.4 407 211.5 406.2 curveto
+212.6 405.4 213.8 403.9 215.2 404.3 curveto
+217 404.8 216.4 407.5 216.5 409.3 curveto
+216.7 411.9 214.7 414 215.9 416.3 curveto
+216.8 418 219.1 418 220.3 419.4 curveto
+221.8 421.1 223.3 422.7 223.4 425.1 curveto
+223.5 427.7 220.9 428.8 220.9 431.4 curveto
+220.9 433.7 222.4 434.8 222.8 437 curveto
+223.4 439.8 221.3 442.7 223.4 444.6 curveto
+225 446.1 227 445.4 229.1 445.9 curveto
+230.7 446.3 231.9 447.6 233.5 447.1 curveto
+235.6 446.4 233.7 443 235.4 441.5 curveto
+237 440.1 240.6 442.3 241.1 440.2 curveto
+241.4 439.1 240.6 438.1 240.4 437 curveto
+239.9 435.1 237.7 433.7 238.6 432 curveto
+239.4 430.6 241.3 430.8 243 430.7 curveto
+244.7 430.6 245.9 430.8 247.4 431.4 curveto
+250 432.5 249.9 438.5 252.4 437 curveto
+254 436 253.1 433.8 253.7 432 curveto
+254.2 430.3 255.2 429.3 255.6 427.6 curveto
+256 426 255.6 424.7 256.2 423.2 curveto
+256.7 421.9 257.6 420.8 258.7 420 curveto
+260.3 418.8 263.8 420.2 263.8 418.1 curveto
+263.8 416.4 261.2 416.8 260 415.6 curveto
+258.8 414.4 256.8 413.2 257.5 411.8 curveto
+258.3 410.2 260 414.2 261.9 414.4 curveto
+263.8 414.6 266.2 414.8 266.9 413.1 curveto
+267.4 411.9 266.8 410.5 266.3 409.3 curveto
+265.6 407.8 264.4 407.2 263.1 406.2 curveto
+261 404.5 259.5 403 256.8 402.4 curveto
+254.8 402 253.3 402.4 251.2 402.4 curveto
+249 402.4 247.6 402.7 245.5 402.4 curveto
+243.5 402.1 242.2 401.4 240.4 400.5 curveto
+236.1 398.3 226.1 391.8 231 391.7 curveto
+231.2 391.7 231.5 391.7 231.6 391.7 curveto
+237.3 396.1 lineto
+243 398.6 lineto
+246.7 398 lineto
+244.2 395.5 lineto
+244.2 391.7 lineto
+246.7 389.2 lineto
+250.5 387.9 lineto
+253 386 lineto
+250.5 384.8 lineto
+246.1 383.5 lineto
+241.7 379.7 lineto
+241.7 383.5 lineto
+246.1 386 lineto
+241.7 386.6 lineto
+238.6 383.5 lineto
+234.1 381.6 lineto
+231 378.5 lineto
+229.7 374.7 lineto
+224.1 372.2 lineto
+220.3 368.4 lineto
+218.4 362.1 lineto
+216.5 367.7 lineto
+215.9 363.3 lineto
+215.9 358.3 lineto
+214 355.1 lineto
+211.5 351.4 lineto
+207.1 348.2 lineto
+203.3 344.4 lineto
+202 340.7 lineto
+203.3 335 lineto
+203.9 329.9 lineto
+201.4 324.9 lineto
+199.5 328.7 lineto
+198.2 333.1 lineto
+198.9 337.5 lineto
+195.1 339.4 lineto
+190.7 340.7 lineto
+186.9 338.8 lineto
+181.9 340 lineto
+178.7 338.1 lineto
+175.6 339.4 lineto
+171.8 338.1 lineto
+168.6 336.2 lineto
+164.2 333.7 lineto
+164.2 327.4 lineto
+159.8 330.6 lineto
+157.3 335.6 lineto
+154.1 338.1 lineto
+151 336.9 lineto
+147.2 338.8 lineto
+145.9 342.5 lineto
+142.2 343.8 lineto
+138.4 343.2 lineto
+132.7 343.8 lineto
+119.5 347 lineto
+119.5 347 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+164.2 327.4 moveto
+159.8 330.6 lineto
+157.3 335.6 lineto
+154.1 338.1 lineto
+151 336.9 lineto
+147.2 338.8 lineto
+145.9 342.5 lineto
+142.2 343.8 lineto
+138.4 343.2 lineto
+132.7 343.8 lineto
+119.5 347 lineto
+118.9 347 lineto
+120.7 342.5 lineto
+122.6 338.1 lineto
+125.2 333.7 lineto
+122.6 331.8 lineto
+125.8 329.9 lineto
+128.9 327.4 lineto
+129.6 324.3 lineto
+134.6 318.6 lineto
+134 323 lineto
+132.1 328.1 lineto
+130.2 332.5 lineto
+127 336.2 lineto
+125.8 340.7 lineto
+128.3 341.9 lineto
+131.5 337.5 lineto
+133.3 332.5 lineto
+136.5 328.7 lineto
+138.4 324.9 lineto
+142.2 320.5 lineto
+145.3 316.1 lineto
+145.3 311.7 lineto
+145.3 307.3 lineto
+149.7 304.7 lineto
+155.4 301 lineto
+159.8 299.7 lineto
+164.8 297.2 lineto
+169.3 298.4 lineto
+174.3 294.7 lineto
+180 291.5 lineto
+185.6 290.3 lineto
+189.4 286.5 lineto
+188.8 282.7 lineto
+192.6 280.2 lineto
+195.7 277 lineto
+200.1 275.1 lineto
+202.6 277 lineto
+205.2 278.3 lineto
+207.7 274.5 lineto
+210.2 276.4 lineto
+208.3 279.5 lineto
+205.2 280.8 lineto
+201.4 279.5 lineto
+197.6 279.5 lineto
+195.1 283.3 lineto
+195.1 289 lineto
+195.7 294.7 lineto
+193.2 297.8 lineto
+189.4 299.1 lineto
+185.6 297.8 lineto
+183.1 299.1 lineto
+185 302.9 lineto
+186.3 306 lineto
+188.2 309.8 lineto
+187.5 312.9 lineto
+183.7 313.6 lineto
+179.3 311.7 lineto
+177.4 308.5 lineto
+173.7 306 lineto
+168.6 306.6 lineto
+165.5 309.2 lineto
+164.2 312.9 lineto
+162.3 318 lineto
+164.2 323 lineto
+164.2 327.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+265 405.5 moveto
+263.7 405 263 403.7 262.5 402.4 curveto
+262 401.2 262.7 399.6 261.9 398.6 curveto
+261.1 397.6 259.4 398.4 258.7 397.4 curveto
+257.9 396.3 257.6 394.4 258.7 393.6 curveto
+259.9 392.8 261.1 394.6 262.5 394.8 curveto
+264.1 395 266.3 396.4 266.9 394.8 curveto
+267.3 393.7 265.1 392.7 265.6 391.7 curveto
+266.3 390.3 268 394.3 269.4 393.6 curveto
+270.2 393.2 269.9 391.7 270.7 391.1 curveto
+271.8 390.3 273.6 390.1 274.5 391.1 curveto
+275.7 392.4 271.9 393.6 271.9 395.5 curveto
+271.9 396.4 272.7 397.1 272.6 398 curveto
+272.3 399.8 268.1 398.1 268.2 399.9 curveto
+268.2 400.7 269.6 401 269.4 401.8 curveto
+269.2 402.7 267.4 401.7 266.9 402.4 curveto
+266.2 403.4 268.8 404.5 268.2 405.5 curveto
+267.6 406.5 266.1 405.9 265 405.5 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+463.5 167.4 moveto
+466.6 170.6 lineto
+469.1 173.7 lineto
+472.3 178.7 lineto
+474.8 183.2 lineto
+474.8 187.6 lineto
+478.6 190.1 lineto
+480.5 193.9 lineto
+480.5 198.3 lineto
+479.8 203.9 lineto
+483 207.7 lineto
+486.8 210.9 lineto
+491.8 214.7 lineto
+493.7 219.1 lineto
+493.7 226 lineto
+492.4 231.7 lineto
+491.2 238 lineto
+490.6 243.6 lineto
+492.4 249.3 lineto
+496.9 255 lineto
+500.6 261.3 lineto
+505.7 265.7 lineto
+510.1 270.1 lineto
+513.2 275.1 lineto
+515.8 281.4 lineto
+518.3 287.1 lineto
+517.6 290.9 lineto
+513.9 289 lineto
+510.1 289.6 lineto
+503.8 287.1 lineto
+499.4 290.9 lineto
+496.9 295.9 lineto
+493.7 299.1 lineto
+489.9 301 lineto
+487.4 307.3 lineto
+484.3 310.4 lineto
+483.6 314.8 lineto
+483 319.9 lineto
+479.8 322.4 lineto
+479.8 325.5 lineto
+476.7 331.2 lineto
+472.9 336.9 lineto
+471 342.5 lineto
+469.8 347.6 lineto
+464.1 345.7 lineto
+459.1 347 lineto
+452.8 348.8 lineto
+447.1 351.4 lineto
+445.2 352 lineto
+442 350.7 lineto
+442.7 345.7 lineto
+439.5 345.1 lineto
+433.9 347.6 lineto
+428.8 350.7 lineto
+422.5 352.6 lineto
+418.7 356.4 lineto
+418.7 360.2 lineto
+420 364 lineto
+416.2 365.9 lineto
+409.9 364.6 lineto
+402.4 364 lineto
+396.7 362.7 lineto
+391.6 358.9 lineto
+387.2 358.9 lineto
+382.2 360.2 lineto
+379 355.8 lineto
+375.3 352 lineto
+372.1 348.2 lineto
+371.5 342.5 lineto
+368.3 338.8 lineto
+368.3 338.8 lineto
+366 336.2 363.8 334.9 362 331.8 curveto
+360.8 329.6 360.7 327.7 359.5 325.5 curveto
+357.9 322.6 355.1 321.7 353.8 318.6 curveto
+352.8 316 352.6 313.9 352.6 311 curveto
+352.6 308.6 354 307.1 353.8 304.7 curveto
+353.6 302.7 351.9 301.7 352 299.7 curveto
+352.1 298.1 353.3 297.4 353.8 295.9 curveto
+354.4 294.2 354 292.4 355.1 290.9 curveto
+356.3 289.3 358.6 289.7 360.1 288.4 curveto
+361.9 286.8 362 284.7 363.3 282.7 curveto
+364.8 280.4 371.2 277.1 368.3 277 curveto
+368.1 277 367.6 277 367.7 277 curveto
+371.5 274.5 lineto
+375.9 270.1 lineto
+380.3 269.5 lineto
+384.7 271.4 lineto
+389.8 270.1 lineto
+395.4 272 lineto
+398.6 273.9 lineto
+403.6 275.1 lineto
+409.3 273.9 lineto
+411.2 269.5 lineto
+416.8 268.8 lineto
+420.6 265.7 lineto
+419.4 260 lineto
+418.7 254.3 lineto
+421.9 249.9 lineto
+425 244.9 lineto
+427.6 239.9 lineto
+428.8 234.2 lineto
+430.1 227.9 lineto
+428.8 222.8 lineto
+426.3 217.2 lineto
+426.3 210.9 lineto
+425.7 204.6 lineto
+428.8 200.8 lineto
+432 195.8 lineto
+432 189.5 lineto
+433.2 183.2 lineto
+435.7 179.4 lineto
+439.5 175 lineto
+440.2 170.6 lineto
+440.8 166.8 lineto
+440.2 168 lineto
+443.3 163.6 lineto
+445.8 159.9 lineto
+449.6 161.1 lineto
+455.3 163.6 lineto
+459.7 163.6 lineto
+463.5 167.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+207.7 274.5 moveto
+210.2 272 lineto
+210.2 267.6 lineto
+210.2 263.2 lineto
+207.1 258.8 lineto
+203.9 255 lineto
+202.6 249.3 lineto
+205.2 246.2 lineto
+202.6 241.7 lineto
+202.6 236.1 lineto
+206.4 232.3 lineto
+211.5 226.6 lineto
+214 220.3 lineto
+215.9 216.5 lineto
+219 211.5 lineto
+224.1 207.7 lineto
+230.4 203.3 lineto
+231.6 197.6 lineto
+232.9 191.3 lineto
+231.6 185.7 lineto
+233.5 180 lineto
+232.3 174.3 lineto
+231 169.3 lineto
+232.3 163.6 lineto
+231.6 157.3 lineto
+231 150.4 lineto
+229.1 146 lineto
+229.7 141 lineto
+231 136.5 lineto
+232.9 132.8 lineto
+233.5 129 lineto
+234.1 124.6 lineto
+232.9 120.8 lineto
+230.4 120.2 lineto
+232.3 117.6 lineto
+233.5 114.5 lineto
+232.3 112 lineto
+234.1 108.2 lineto
+235.4 104.4 lineto
+238.6 101.9 lineto
+238.6 103.2 lineto
+237.9 99.4 lineto
+241.7 99.4 lineto
+242.3 96.2 lineto
+244.2 95.6 lineto
+245.5 99.4 lineto
+246.1 95.6 lineto
+247.4 93.7 lineto
+244.2 91.8 lineto
+249.3 91.2 lineto
+253 90.6 lineto
+258.1 90.6 lineto
+254.9 93.1 lineto
+250.5 95.6 lineto
+248 99.4 lineto
+246.1 106.3 lineto
+249.3 108.8 lineto
+252.4 114.5 lineto
+249.3 118.3 lineto
+248.6 123.3 lineto
+251.8 125.8 lineto
+254.3 132.1 lineto
+251.8 135.3 lineto
+251.8 138.4 lineto
+256.2 137.8 lineto
+257.5 142.2 lineto
+260.6 144.7 lineto
+265.6 146 lineto
+268.2 149.1 lineto
+268.2 153.6 lineto
+265.6 158.6 lineto
+269.4 156.7 lineto
+273.2 157.3 lineto
+276.4 159.2 lineto
+277 164.3 lineto
+280.1 171.2 lineto
+279.5 167.4 lineto
+279.5 164.9 lineto
+282 169.9 lineto
+284.5 174.3 lineto
+284.5 180.6 lineto
+285.8 185 lineto
+289.6 188.8 lineto
+294 191.3 lineto
+299.7 193.2 lineto
+301.6 198.3 lineto
+305.3 204.6 lineto
+304.7 211.5 lineto
+305.3 219.1 lineto
+309.7 226 lineto
+312.3 231.7 lineto
+314.2 238.6 lineto
+311 243 lineto
+306.6 243.6 lineto
+304.7 247.4 lineto
+299.7 248.7 lineto
+294.6 249.9 lineto
+291.5 248.7 lineto
+289.6 251.8 lineto
+285.8 252.5 lineto
+283.3 253.7 lineto
+280.1 251.8 lineto
+280.1 256.2 lineto
+275.7 253.7 lineto
+273.8 251.8 lineto
+273.2 255 lineto
+275.7 258.8 lineto
+275.1 262.5 lineto
+271.9 266.9 lineto
+268.8 270.7 lineto
+265 272 lineto
+259.3 272.6 lineto
+253.7 276.4 lineto
+249.3 280.2 lineto
+243.6 282.7 lineto
+237.9 284 lineto
+232.3 284.6 lineto
+227.8 287.1 lineto
+223.4 288.4 lineto
+220.3 285.2 lineto
+216.5 282.7 lineto
+214 278.9 lineto
+210.8 277 lineto
+207.7 274.5 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+210.8 305.1 moveto
+210.8 305.6 211.8 306 213 306 curveto
+214.2 306 215.2 305.6 215.2 305.1 curveto
+215.2 304.6 214.2 304.2 213 304.2 curveto
+211.8 304.2 210.8 304.6 210.8 305.1 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+237.8 305.7 moveto
+237.8 306.2 238.4 306.7 239.1 306.7 curveto
+239.8 306.7 240.4 306.2 240.4 305.7 curveto
+240.4 305.2 239.8 304.8 239.1 304.8 curveto
+238.4 304.8 237.8 305.2 237.8 305.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+513.2 226 moveto
+516.4 223.5 lineto
+518.3 219.1 lineto
+517 215.3 lineto
+515.1 212.8 lineto
+514.5 208.4 lineto
+512.6 203.9 lineto
+510.7 197.6 lineto
+510.1 192.6 lineto
+506.9 188.8 lineto
+501.9 190.1 lineto
+500.6 195.8 lineto
+500 200.2 lineto
+503.2 204.6 lineto
+503.2 209.6 lineto
+503.8 214.7 lineto
+508.8 216.5 lineto
+512 221.6 lineto
+513.2 226 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+384.1 362.1 moveto
+380.9 364.6 lineto
+377.2 365.2 lineto
+375.9 368.4 lineto
+375.3 371.5 lineto
+377.8 377.2 lineto
+377.2 381.6 lineto
+375.9 383.5 lineto
+380.3 384.8 lineto
+386 384.1 lineto
+391 384.1 lineto
+394.2 386.6 lineto
+394.2 391.7 lineto
+391 396.1 lineto
+387.2 399.9 lineto
+391 401.1 lineto
+393.5 404.9 lineto
+396.1 403.7 lineto
+398.6 404.9 lineto
+402.4 407.4 lineto
+406.1 409.3 lineto
+406.8 413.1 lineto
+409.9 415 lineto
+411.8 417.5 lineto
+416.2 417.5 lineto
+416.8 421.3 lineto
+415 425.1 lineto
+415.6 428.9 lineto
+418.1 428.9 lineto
+420.6 427 lineto
+418.7 423.8 lineto
+420 420.7 lineto
+425 420 lineto
+429.4 418.8 lineto
+433.9 420.7 lineto
+438.9 421.3 lineto
+442 423.8 lineto
+442.7 428.2 lineto
+443.9 432 lineto
+447.7 430.1 lineto
+448.3 433.9 lineto
+449.6 437 lineto
+453.4 437.7 lineto
+457.8 438.9 lineto
+460.9 440.8 lineto
+457.2 442.1 lineto
+452.1 442.1 lineto
+449.6 440.2 lineto
+445.2 441.5 lineto
+442.7 444.6 lineto
+441.4 449 lineto
+441.4 452.8 lineto
+444.6 453.4 lineto
+446.5 456.6 lineto
+449.6 460.4 lineto
+448.3 463.5 lineto
+443.9 462.9 lineto
+441.4 460.4 lineto
+438.9 455.9 lineto
+435.7 452.2 lineto
+433.2 448.4 lineto
+433.9 443.3 lineto
+436.4 440.8 lineto
+433.9 439.6 lineto
+435.1 437 lineto
+433.2 433.3 lineto
+432 428.9 lineto
+427.6 426.3 lineto
+424.4 426.3 lineto
+422.5 431.4 lineto
+421.9 436.4 lineto
+419.4 440.8 lineto
+417.5 437.7 lineto
+414.3 435.2 lineto
+411.8 433.9 lineto
+408.7 437 lineto
+408.7 440.8 lineto
+407.4 445.9 lineto
+410.5 450.9 lineto
+414.3 453.4 lineto
+420 459.1 lineto
+423.1 462.9 lineto
+425 467.9 lineto
+428.2 471.1 lineto
+432 475.5 lineto
+437 479.3 lineto
+441.4 483 lineto
+444.6 481.8 lineto
+447.7 486.2 lineto
+449 483 lineto
+451.5 484.9 lineto
+455.3 485.6 lineto
+459.7 484.9 lineto
+457.2 481.8 lineto
+460.3 479.9 lineto
+464.7 478.6 lineto
+468.5 478 lineto
+472.9 476.1 lineto
+478 473.6 lineto
+481.7 471.7 lineto
+482.4 467.9 lineto
+479.2 465.4 lineto
+474.2 465.4 lineto
+471 467.9 lineto
+465.4 468.5 lineto
+467.2 465.4 lineto
+469.8 462.2 lineto
+471 458.5 lineto
+475.4 455.9 lineto
+473.5 459.7 lineto
+476.7 461 lineto
+481.1 459.7 lineto
+482.4 463.5 lineto
+486.1 466 lineto
+488.7 469.2 lineto
+487.4 474.2 lineto
+486.1 477.4 lineto
+490.6 476.1 lineto
+492.4 473.6 lineto
+491.2 470.4 lineto
+493.7 467.3 lineto
+496.2 470.4 lineto
+500.6 473 lineto
+505.7 475.5 lineto
+508.8 473.6 lineto
+512.6 475.5 lineto
+517 476.7 lineto
+520.8 475.5 lineto
+522.1 479.3 lineto
+525.2 480.5 lineto
+529 478 lineto
+532.1 476.1 lineto
+536.5 473.6 lineto
+518.9 408.7 lineto
+503.2 404.9 lineto
+505 392.9 lineto
+501.9 390.4 lineto
+500.6 386.6 lineto
+502.5 383.5 lineto
+505 380.3 lineto
+488.7 377.2 lineto
+488.7 380.3 lineto
+485.5 384.1 lineto
+483 386.6 lineto
+479.8 388.5 lineto
+480.5 391.7 lineto
+482.4 395.5 lineto
+478.6 394.8 lineto
+474.8 394.8 lineto
+472.9 392.9 lineto
+474.8 391.7 lineto
+476.1 389.8 lineto
+473.5 388.5 lineto
+471 387.9 lineto
+468.5 390.4 lineto
+470.4 392.9 lineto
+467.2 393.6 lineto
+465.4 396.1 lineto
+462.2 393.6 lineto
+460.9 389.2 lineto
+459.1 385.4 lineto
+457.2 382.9 lineto
+458.4 379.7 lineto
+459.1 377.2 lineto
+455.9 375.9 lineto
+450.9 375.3 lineto
+448.3 372.8 lineto
+447.7 370.3 lineto
+449.6 368.4 lineto
+445.2 369 lineto
+442 372.2 lineto
+440.2 375.9 lineto
+438.3 380.3 lineto
+433.9 384.1 lineto
+429.4 387.9 lineto
+426.9 391.1 lineto
+423.1 392.3 lineto
+422.5 389.2 lineto
+425.7 385.4 lineto
+428.8 381 lineto
+432.6 378.5 lineto
+435.1 376.6 lineto
+437.6 372.8 lineto
+434.5 374.7 lineto
+434.5 372.2 lineto
+434.5 369 lineto
+431.3 367.1 lineto
+431.3 371.5 lineto
+427.6 375.9 lineto
+424.4 379.7 lineto
+420.6 382.2 lineto
+419.4 385.4 lineto
+416.8 387.3 lineto
+412.4 386 lineto
+409.3 384.8 lineto
+404.9 384.8 lineto
+402.4 381.6 lineto
+401.1 377.8 lineto
+397.3 376.6 lineto
+396.1 373.4 lineto
+395.4 370.3 lineto
+392.9 367.7 lineto
+391 365.2 lineto
+387.2 363.3 lineto
+384.1 362.1 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+377.2 423.8 moveto
+379.7 422.6 lineto
+377.8 423.2 lineto
+375.9 420.7 lineto
+373.4 420 lineto
+373.4 417.5 lineto
+374.6 415.6 lineto
+372.7 413.7 lineto
+373.4 410.6 lineto
+375.9 411.8 lineto
+379.7 412.5 lineto
+382.2 412.5 lineto
+382.2 416.3 lineto
+382.8 420 lineto
+377.2 423.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+415.6 370.9 moveto
+415 374 lineto
+415.6 376.6 lineto
+418.1 376.6 lineto
+418.7 374 lineto
+415.6 370.9 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+416.2 382.9 moveto
+416.2 382.2 lineto
+415 379.7 lineto
+416.2 382.9 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+504.4 493.7 moveto
+505.6 494 506.7 493.4 507.6 492.5 curveto
+508.3 491.8 508.5 490.9 508.8 490 curveto
+509.3 488.7 509.5 487.5 510.1 486.2 curveto
+510.9 484.4 514.4 483.4 513.2 481.8 curveto
+512.1 480.3 509.8 482.1 508.2 483 curveto
+506.8 483.8 506.4 485.4 505 486.2 curveto
+503.6 487 501 485.7 500.6 487.4 curveto
+500.3 488.8 501.9 489.5 502.5 490.6 curveto
+503.1 491.7 503.1 493.3 504.4 493.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+532.8 509.5 moveto
+531.4 510.7 529.5 509.8 527.7 509.5 curveto
+525.8 509.2 524.6 508 522.7 507.6 curveto
+520.6 507.1 519 507.7 517 507 curveto
+515.5 506.5 514.6 505.2 513.2 504.5 curveto
+511.7 503.7 509.8 504.1 508.8 502.6 curveto
+508.1 501.5 508.7 500 508.2 498.8 curveto
+507.8 497.8 506.3 497.5 506.3 496.3 curveto
+506.3 494.6 509 494.8 510.7 495 curveto
+512.4 495.2 513.5 496.3 514.5 497.5 curveto
+515.5 498.7 515.3 500.2 516.4 501.3 curveto
+517.6 502.5 519.2 502.6 520.8 503.2 curveto
+523 504.1 524.4 504.7 526.5 505.7 curveto
+528.9 506.9 534.9 507.7 532.8 509.5 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+447.7 367.7 moveto
+448.8 367.7 450.2 367 450.2 365.9 curveto
+450.2 364.5 448.5 363.7 447.1 364 curveto
+446.1 364.2 445.2 364.9 445.2 365.9 curveto
+445.2 367 446.6 367.7 447.7 367.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+536.5 473.6 moveto
+518.9 408.7 lineto
+503.2 404.9 lineto
+505 392.9 lineto
+501.9 390.4 lineto
+500.6 386.6 lineto
+502.5 383.5 lineto
+505 380.3 lineto
+488.7 377.2 lineto
+486.8 375.3 lineto
+483 376.6 lineto
+478 377.8 lineto
+474.8 379.1 lineto
+471.7 378.5 lineto
+466.6 377.2 lineto
+462.2 375.9 lineto
+459.7 374 lineto
+455.9 371.5 lineto
+457.8 369 lineto
+457.2 365.2 lineto
+460.3 362.1 lineto
+463.5 360.8 lineto
+467.2 362.7 lineto
+469.8 361.4 lineto
+471.7 362.7 lineto
+474.2 361.4 lineto
+479.2 362.7 lineto
+478 357.7 lineto
+477.3 352 lineto
+476.1 347.6 lineto
+474.2 345.7 lineto
+471.7 347 lineto
+471 347.6 lineto
+471.7 343.8 lineto
+474.2 340 lineto
+476.7 335.6 lineto
+478 341.9 lineto
+479.2 337.5 lineto
+482.4 331.8 lineto
+486.1 324.3 lineto
+489.3 320.5 lineto
+489.3 316.7 lineto
+492.4 312.3 lineto
+496.9 306.6 lineto
+498.1 302.2 lineto
+498.1 299.1 lineto
+500 297.2 lineto
+501.3 294 lineto
+505.7 296.6 lineto
+510.7 298.4 lineto
+516.4 301 lineto
+521.4 304.7 lineto
+526.5 306.6 lineto
+530.2 310.4 lineto
+533.4 315.5 lineto
+536.5 319.9 lineto
+535.3 324.9 lineto
+530.2 324.9 lineto
+528.4 331.2 lineto
+525.8 327.4 lineto
+521.4 326.8 lineto
+517.6 328.7 lineto
+513.2 331.8 lineto
+509.5 336.2 lineto
+507.6 340.7 lineto
+505.7 344.4 lineto
+508.8 345.7 lineto
+512 343.2 lineto
+515.1 340 lineto
+517.6 336.9 lineto
+521.4 335.6 lineto
+526.5 335 lineto
+530.2 333.7 lineto
+531.5 330.6 lineto
+535.3 328.7 lineto
+541.6 328.7 lineto
+546.6 329.9 lineto
+551.7 329.3 lineto
+554.2 325.5 lineto
+558.6 323 lineto
+560.5 319.9 lineto
+563.6 317.3 lineto
+567.4 318.6 lineto
+567.4 313.6 lineto
+568.7 309.2 lineto
+569.3 304.7 lineto
+569.3 300.3 lineto
+571.2 295.9 lineto
+573.7 292.1 lineto
+573.7 287.7 lineto
+576.2 285.2 lineto
+576.9 281.4 lineto
+580 278.9 lineto
+582.5 282.1 lineto
+584.4 285.2 lineto
+583.8 289.6 lineto
+585.7 294 lineto
+585.7 300.3 lineto
+589.5 303.5 lineto
+592.6 306.6 lineto
+596.4 310.4 lineto
+599.5 314.2 lineto
+600.2 316.7 lineto
+604 318 lineto
+606.5 318 lineto
+607.7 322.4 lineto
+610.3 319.2 lineto
+612.8 314.2 lineto
+615.9 311.7 lineto
+618.4 307.3 lineto
+618.4 301.6 lineto
+622.2 301.6 lineto
+624.7 303.5 lineto
+627.3 300.3 lineto
+627.3 295.9 lineto
+627.3 292.8 lineto
+629.2 287.7 lineto
+628.5 284 lineto
+627.9 279.5 lineto
+630.4 277.7 lineto
+632.3 273.2 lineto
+632.3 268.8 lineto
+634.8 263.8 lineto
+638.6 261.9 lineto
+644.3 259.4 lineto
+641.1 265.7 lineto
+638.6 271.4 lineto
+636.1 275.1 lineto
+632.9 278.9 lineto
+631 282.7 lineto
+631 288.4 lineto
+632.3 295.3 lineto
+635.5 292.1 lineto
+639.9 290.3 lineto
+640.5 287.1 lineto
+644.3 284.6 lineto
+644.9 280.8 lineto
+648.1 283.3 lineto
+651.2 286.5 lineto
+653.7 292.1 lineto
+653.7 297.8 lineto
+650.6 304.1 lineto
+646.8 307.9 lineto
+643 311.7 lineto
+644.3 316.7 lineto
+647.4 318 lineto
+651.2 318.6 lineto
+652.5 315.5 lineto
+655.6 318 lineto
+660 320.5 lineto
+665.7 321.1 lineto
+668.8 324.3 lineto
+672 328.7 lineto
+674.5 335.6 lineto
+676.4 341.3 lineto
+675.1 347.6 lineto
+672.6 352.6 lineto
+669.5 358.3 lineto
+672.6 362.7 lineto
+675.8 366.5 lineto
+672 367.1 lineto
+669.5 365.9 lineto
+666.3 367.1 lineto
+664.4 370.9 lineto
+667 372.8 lineto
+672 377.2 lineto
+673.9 375.3 lineto
+672 371.5 lineto
+675.1 371.5 lineto
+678.3 373.4 lineto
+682.1 372.2 lineto
+682.7 369 lineto
+683.3 365.9 lineto
+685.9 362.7 lineto
+687.1 358.9 lineto
+687.1 354.5 lineto
+690.9 356.4 lineto
+693.4 360.2 lineto
+691.5 365.9 lineto
+689 370.3 lineto
+687.7 374 lineto
+691.5 377.2 lineto
+691.5 382.9 lineto
+696.6 383.5 lineto
+701.6 386.6 lineto
+704.1 391.7 lineto
+706 398 lineto
+706.6 403 lineto
+707.3 408.1 lineto
+706.6 413.7 lineto
+704.1 418.8 lineto
+701 420.7 lineto
+699.1 418.8 lineto
+695.9 421.3 lineto
+693.4 422.6 lineto
+696.6 427.6 lineto
+699.1 432 lineto
+703.5 437 lineto
+707.9 438.3 lineto
+712.9 437.7 lineto
+716.7 438.3 lineto
+719.2 439.6 lineto
+722.4 438.9 lineto
+723 436.4 lineto
+726.8 437.7 lineto
+729.3 437 lineto
+731.8 438.3 lineto
+730 441.5 lineto
+730.6 445.9 lineto
+736.9 447.8 lineto
+737.5 444.6 lineto
+740.7 444.6 lineto
+743.2 447.1 lineto
+744.4 449.6 lineto
+747 450.3 lineto
+746.3 446.5 lineto
+743.8 442.7 lineto
+743.2 438.9 lineto
+740.7 435.8 lineto
+737.5 432 lineto
+735 427.6 lineto
+736.9 423.2 lineto
+738.1 418.8 lineto
+738.8 415 lineto
+743.2 409.3 lineto
+745.7 414.4 lineto
+747.6 416.9 lineto
+747.6 420 lineto
+750.1 421.3 lineto
+749.5 425.1 lineto
+752 428.2 lineto
+749.5 431.4 lineto
+747.6 434.5 lineto
+749.5 439.6 lineto
+752.6 442.7 lineto
+754.5 440.2 lineto
+758.3 442.1 lineto
+762.7 440.2 lineto
+764 445.9 lineto
+768.4 447.8 lineto
+773.4 449.6 lineto
+777.2 450.3 lineto
+773.4 453.4 lineto
+769.6 457.2 lineto
+772.8 459.1 lineto
+772.8 462.2 lineto
+775.3 464.1 lineto
+776.6 461 lineto
+781 460.4 lineto
+784.1 458.5 lineto
+787.9 456.6 lineto
+791.7 456.6 lineto
+789.2 460.4 lineto
+793 461 lineto
+794.2 463.5 lineto
+790.4 466 lineto
+786.7 467.9 lineto
+784.1 465.4 lineto
+780.4 468.5 lineto
+775.9 471.7 lineto
+769 474.2 lineto
+762.1 477.4 lineto
+755.8 479.9 lineto
+751.4 480.5 lineto
+746.3 479.9 lineto
+748.2 476.1 lineto
+745.1 476.1 lineto
+741.9 476.1 lineto
+740 479.3 lineto
+735 478.6 lineto
+730 479.3 lineto
+727.4 476.7 lineto
+723.7 479.3 lineto
+720.5 483 lineto
+714.8 483.7 lineto
+709.2 483.7 lineto
+703.5 485.6 lineto
+699.1 486.8 lineto
+697.2 489.3 lineto
+693.4 489.3 lineto
+690.3 488.1 lineto
+687.7 489.3 lineto
+689 491.2 lineto
+684 491.9 lineto
+678.9 491.2 lineto
+678.9 488.1 lineto
+674.5 486.2 lineto
+668.8 486.8 lineto
+663.8 488.1 lineto
+661.3 485.6 lineto
+658.1 487.4 lineto
+653.7 489.3 lineto
+655 492.5 lineto
+653.7 495 lineto
+648.7 496.9 lineto
+644.3 496.9 lineto
+645.5 493.7 lineto
+644.9 491.2 lineto
+640.5 492.5 lineto
+635.5 493.1 lineto
+632.3 495.6 lineto
+626.6 495.6 lineto
+621.6 495 lineto
+617.2 496.3 lineto
+614.7 493.7 lineto
+607.1 490.6 lineto
+609.6 494.4 lineto
+613.4 497.5 lineto
+617.2 499.4 lineto
+619.7 503.2 lineto
+619.7 507 lineto
+616.6 508.9 lineto
+612.8 511.4 lineto
+607.7 509.5 lineto
+604.6 512 lineto
+601.4 514.5 lineto
+597 512.6 lineto
+598.3 509.5 lineto
+595.1 508.9 lineto
+592 509.5 lineto
+593.2 507 lineto
+588.2 506.3 lineto
+583.8 507.6 lineto
+579.4 507 lineto
+579.4 503.2 lineto
+574.3 503.8 lineto
+569.9 502.6 lineto
+568 500 lineto
+570.6 496.9 lineto
+567.4 495.6 lineto
+564.9 494.4 lineto
+561.7 496.3 lineto
+559.2 494.4 lineto
+561.1 491.9 lineto
+564.3 489.3 lineto
+567.4 485.6 lineto
+566.8 481.8 lineto
+564.3 483 lineto
+563 486.2 lineto
+560.5 488.7 lineto
+557.3 490.6 lineto
+556.1 488.1 lineto
+552.9 488.7 lineto
+554.8 484.9 lineto
+551.7 485.6 lineto
+549.8 488.7 lineto
+547.9 491.9 lineto
+547.3 488.1 lineto
+546 484.9 lineto
+548.5 482.4 lineto
+547.9 479.3 lineto
+551 476.7 lineto
+554.8 476.1 lineto
+558 471.1 lineto
+555.4 471.7 lineto
+552.9 474.2 lineto
+551 473 lineto
+550.4 468.5 lineto
+547.9 465.4 lineto
+542.8 464.1 lineto
+541.6 466.7 lineto
+544.7 468.5 lineto
+546.6 472.3 lineto
+546.6 476.1 lineto
+545.4 481.1 lineto
+542.8 485.6 lineto
+542.8 492.5 lineto
+539.1 493.1 lineto
+537.2 490 lineto
+534.7 486.2 lineto
+533.4 483.7 lineto
+535.3 479.9 lineto
+537.8 477.4 lineto
+539.7 473.6 lineto
+536.5 473.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+670.1 503.8 moveto
+670.1 505 671 505.9 672 506.3 curveto
+673.2 506.8 674.4 505.6 675.8 505.7 curveto
+677.3 505.8 678.1 507 679.6 507 curveto
+681.6 507 685.1 507.1 684.6 505.1 curveto
+684.3 503.7 682.6 503.8 681.4 503.2 curveto
+679.8 502.3 678.9 501 677 500.7 curveto
+675.3 500.5 674.1 500.5 672.6 501.3 curveto
+671.5 501.8 670.1 502.5 670.1 503.8 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+679.6 494.4 moveto
+679.5 495.9 680.6 497.4 682.1 497.5 curveto
+683.6 497.6 685.1 496.5 685.2 495 curveto
+685.4 492.9 679.8 492.3 679.6 494.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmrs
+0 sf
+newpath
+689 503.2 moveto
+690 504.4 691.8 503.4 693.4 503.2 curveto
+695 503 697.8 503.6 697.8 501.9 curveto
+697.8 500.3 695.6 500 694 500 curveto
+691.7 500 687.5 501.5 689 503.2 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+761.5 483 moveto
+760.8 484.1 762.1 485.5 763.3 486.2 curveto
+764.5 486.9 765.8 486.6 767.1 486.2 curveto
+768.2 485.8 769.5 485.5 769.6 484.3 curveto
+769.8 482.6 766.8 483.9 765.2 483.7 curveto
+763.9 483.5 762.2 481.9 761.5 483 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+709.2 419.4 moveto
+708.5 419 708.6 417.8 708.5 416.9 curveto
+708.3 415 708.9 413.6 709.2 411.8 curveto
+709.6 409.4 710.7 407.9 711.1 405.5 curveto
+711.4 403.7 711.4 402.3 711.7 400.5 curveto
+712.2 397.5 711.5 391.4 714.2 392.9 curveto
+715.2 393.4 715.9 394.4 716.1 395.5 curveto
+716.4 397.2 714.2 398.1 714.2 399.9 curveto
+714.2 400.8 714.1 402.1 714.8 402.4 curveto
+715.8 402.9 716.2 400.2 717.4 400.5 curveto
+718.8 400.9 717.9 403 717.4 404.3 curveto
+716.8 405.9 715.1 406 714.2 407.4 curveto
+713.1 409.1 712.7 410.5 712.3 412.5 curveto
+712 413.8 712.2 415.1 711.7 416.3 curveto
+711.2 417.6 710.4 420.2 709.2 419.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+713.6 389.8 moveto
+712.4 389.1 712.8 387.4 712.9 386 curveto
+713.1 383.9 714.5 382.9 716.1 381.6 curveto
+717.1 380.8 717.8 379.7 719.2 379.7 curveto
+720.4 379.7 721 380.9 721.8 381.6 curveto
+723.2 382.9 726.1 384.4 724.9 386 curveto
+723.9 387.3 722.1 385.9 720.5 386 curveto
+719.4 386.1 718.5 386.2 717.4 386.6 curveto
+715.7 387.2 715.2 390.7 713.6 389.8 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+715.5 377.8 moveto
+714 377.8 713.4 376.1 712.9 374.7 curveto
+712.4 373.2 712.9 372 712.9 370.3 curveto
+712.9 369.1 713.1 368.2 712.9 367.1 curveto
+712.6 365.9 712.2 364.5 711.1 364 curveto
+710.1 363.5 708.9 364.6 707.9 364 curveto
+707 363.4 707.2 362.2 706.6 361.4 curveto
+706 360.6 705 360 704.1 359.6 curveto
+702.8 359 701.6 359 700.3 358.3 curveto
+699 357.6 696.7 357.2 697.2 355.8 curveto
+697.5 354.9 698.7 354.5 699.7 354.5 curveto
+701.2 354.5 701.5 356.7 702.9 357 curveto
+703.7 357.2 704.7 357.4 705.4 357 curveto
+706.6 356.4 704.8 353.9 706 353.3 curveto
+706.7 352.9 707.8 352.9 708.5 353.3 curveto
+709.7 353.9 708.3 356 709.2 357 curveto
+710.3 358.2 712 357.4 713.6 357.7 curveto
+715 358 716.6 357.7 717.4 358.9 curveto
+718.3 360.3 716.7 361.6 716.7 363.3 curveto
+716.7 364.7 717.1 365.8 717.4 367.1 curveto
+717.7 368.3 718.6 369 718.6 370.3 curveto
+718.6 371.7 717.8 372.8 717.4 374 curveto
+716.9 375.4 717.1 377.8 715.5 377.8 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+694.7 353.3 moveto
+695.4 353.8 696.3 354.1 697.2 353.9 curveto
+698.4 353.6 698.7 352.5 699.1 351.4 curveto
+699.8 349.4 700.7 346.2 698.5 345.7 curveto
+696.8 345.3 695.4 346.8 694.7 348.2 curveto
+693.8 349.8 693.2 352.2 694.7 353.3 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+677 329.3 moveto
+675.3 329.1 676.5 326.6 676.4 324.9 curveto
+676.4 323.5 675.1 321.6 676.4 321.1 curveto
+677.8 320.6 678.4 323 678.9 324.3 curveto
+679.3 325.4 680 326.3 679.6 327.4 curveto
+679.2 328.5 678.2 329.4 677 329.3 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+651.8 314.8 moveto
+650.5 315.3 649.1 314.2 648.7 312.9 curveto
+648.3 311.8 648.5 310.7 649.3 309.8 curveto
+650.2 308.8 652.3 308.2 653.1 309.2 curveto
+653.8 310.1 653.3 311.2 653.1 312.3 curveto
+652.9 313.2 652.7 314.5 651.8 314.8 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+677.7 310.4 moveto
+676.5 309.7 678 307.9 677.7 306.6 curveto
+677.4 305.3 675.8 304.9 675.8 303.5 curveto
+675.8 302.1 676.9 301.3 677.7 300.3 curveto
+678.6 299.2 679.6 298.5 680.8 297.8 curveto
+682.3 296.9 683.6 296.5 685.2 295.9 curveto
+686.4 295.5 687.5 293.8 688.4 294.7 curveto
+689.4 295.7 687.4 296.8 686.5 297.8 curveto
+685.3 299.1 682.8 298.6 682.1 300.3 curveto
+681.5 301.8 682.6 303.1 682.7 304.7 curveto
+682.9 306.8 685.2 309.4 683.3 310.4 curveto
+682.3 310.9 681.4 310.4 680.2 310.4 curveto
+679.3 310.4 678.4 310.8 677.7 310.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+671.4 282.7 moveto
+671 284.2 672.5 285.2 673.3 286.5 curveto
+673.8 287.4 674 289 675.1 289 curveto
+676.4 289 676.5 287.1 676.4 285.8 curveto
+676.3 283.6 672 280.6 671.4 282.7 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+683.3 279.5 moveto
+682.6 280.6 684 282.2 685.2 282.7 curveto
+686.4 283.2 687.8 281.6 689 282.1 curveto
+690 282.5 689.7 284.4 690.9 284.6 curveto
+691.9 284.7 692.8 284 693.4 283.3 curveto
+694.4 282.1 695.2 280.1 694 278.9 curveto
+693.2 278.1 691.7 279.1 690.9 278.3 curveto
+689.7 277.1 693.1 274.5 691.5 273.9 curveto
+690.2 273.5 689.1 274.7 688.4 275.8 curveto
+688 276.5 687.9 277.5 687.7 278.3 curveto
+687.5 279.1 687.7 280.3 687.1 280.8 curveto
+686 281.8 684 278.3 683.3 279.5 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+593.2 516.4 moveto
+592.6 517.5 594.2 518.4 594.5 519.6 curveto
+594.8 520.7 594.1 522.1 595.1 522.7 curveto
+596.2 523.3 597.2 522 598.3 521.5 curveto
+600.3 520.6 605 519.8 603.3 518.3 curveto
+602.4 517.5 601.3 518 600.2 517.7 curveto
+598.7 517.3 598 515.9 596.4 515.8 curveto
+595.2 515.7 593.8 515.4 593.2 516.4 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+591.4 524.6 moveto
+590.7 525.7 588.9 523.7 587.6 524 curveto
+586.9 524.2 586.4 525 585.7 525.2 curveto
+584.2 525.8 582.7 526.1 581.3 525.2 curveto
+580.2 524.5 579.1 523.5 579.4 522.1 curveto
+579.8 520.2 582.6 522.5 584.4 522.1 curveto
+585.6 521.9 586.5 521.2 587.6 520.8 curveto
+589 520.2 590.2 517.8 591.4 518.9 curveto
+592.3 519.7 591.4 520.9 591.4 522.1 curveto
+591.4 523 591.8 523.9 591.4 524.6 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+574.3 527.8 moveto
+574.7 529.2 576.2 529.8 577.5 530.3 curveto
+579 530.9 580.2 531.1 581.9 530.9 curveto
+583.5 530.7 585.7 530.6 585.7 529 curveto
+585.7 527.3 582.9 528 581.3 527.8 curveto
+578.7 527.4 573.5 525.2 574.3 527.8 curveto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+505 380.3 moveto
+505.7 379.2 506.6 378.5 506.9 377.2 curveto
+507.2 375.9 507 374.8 506.9 373.4 curveto
+506.8 372 506.1 371 506.3 369.6 curveto
+506.5 368.1 506.9 366.6 508.2 365.9 curveto
+509.4 365.3 510.8 366.4 512 365.9 curveto
+513.2 365.4 513.3 363.8 514.5 363.3 curveto
+516 362.6 517.6 362.3 518.9 363.3 curveto
+519.7 363.9 520.2 364.8 520.2 365.9 curveto
+520.2 367.7 517.4 367.9 517 369.6 curveto
+516.7 370.7 517.3 371.7 517 372.8 curveto
+516.7 373.9 515 374.1 515.1 375.3 curveto
+515.2 376.8 518.2 375.3 518.9 376.6 curveto
+519.7 378.2 518.8 381.3 517 381 curveto
+515.8 380.8 516.3 378.7 515.1 378.5 curveto
+513.3 378.2 514.5 381.7 513.2 382.9 curveto
+512.7 383.3 511.9 383.7 511.3 384.1 curveto
+510.6 384.6 509.8 385.1 509.5 386 curveto
+509 387.3 509 389.1 510.1 389.8 curveto
+511.1 390.5 512.1 389.4 513.2 389.8 curveto
+514.1 390.1 514.9 390.8 515.1 391.7 curveto
+515.5 393.3 514.1 394.8 512.6 395.5 curveto
+511.4 396 510.1 395.8 508.8 395.5 curveto
+507.2 395.1 506.2 394 505 392.9 curveto
+504.8 392.8 504.6 392.4 504.4 392.3 curveto
+503.6 391.6 501.9 390.4 501.9 390.4 curveto
+501.9 390.4 lineto
+500.6 386.6 lineto
+499.7 383.9 503.5 382.7 505 380.3 curveto
+closepath
+gsave
+[0 0 0 0.1]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+621 272.6 moveto
+624.7 268.2 lineto
+628.5 264.4 lineto
+631.7 258.8 lineto
+634.2 251.8 lineto
+638 247.4 lineto
+643.6 241.1 lineto
+646.8 244.9 lineto
+644.9 249.9 lineto
+641.1 255 lineto
+636.7 260 lineto
+632.9 263.2 lineto
+629.8 266.9 lineto
+626 270.1 lineto
+621 272.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+655 255.6 moveto
+654.4 261.9 lineto
+658.8 263.8 lineto
+661.3 266.3 lineto
+665.7 270.1 lineto
+670.1 273.9 lineto
+673.3 276.4 lineto
+674.5 273.2 lineto
+677 271.4 lineto
+673.9 269.5 lineto
+673.9 265.1 lineto
+677 261.9 lineto
+674.5 259.4 lineto
+673.3 255.6 lineto
+672.6 251.8 lineto
+668.2 247.4 lineto
+665.7 249.9 lineto
+661.3 249.3 lineto
+657.5 250.6 lineto
+655 255.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+692.2 263.8 moveto
+689 261.3 lineto
+685.2 262.5 lineto
+681.4 261.9 lineto
+678.9 258.1 lineto
+678.3 253.7 lineto
+676.4 250.6 lineto
+677.7 247.4 lineto
+677.7 241.7 lineto
+680.2 244.3 lineto
+680.8 248 lineto
+681.4 251.2 lineto
+683.3 248.7 lineto
+683.3 244.9 lineto
+685.9 246.8 lineto
+684 253.1 lineto
+687.1 255.6 lineto
+682.7 255.6 lineto
+682.7 258.8 lineto
+685.9 259.4 lineto
+689 258.8 lineto
+692.2 263.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+697.2 263.8 moveto
+697.2 263.8 lineto
+696.6 260 lineto
+698.5 257.5 lineto
+700.3 259.4 lineto
+697.2 263.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+697.8 249.3 moveto
+700.3 251.2 lineto
+704.1 249.9 lineto
+701 248.7 lineto
+697.8 249.3 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmrs
+0 sf
+newpath
+694 235.4 moveto
+691.5 234.2 lineto
+687.7 232.3 lineto
+689.6 229.8 lineto
+693.4 232.9 lineto
+694 235.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+646.2 240.5 moveto
+649.3 242.4 lineto
+653.7 241.1 lineto
+658.8 241.1 lineto
+661.9 238.6 lineto
+667 236.1 lineto
+663.2 235.4 lineto
+658.1 236.1 lineto
+654.4 237.3 lineto
+649.9 238.6 lineto
+646.2 240.5 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+678.3 236.1 moveto
+681.4 236.7 lineto
+687.1 236.7 lineto
+684 234.8 lineto
+678.3 236.1 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+680.8 230.4 moveto
+678.9 231.7 lineto
+680.8 232.9 lineto
+680.8 230.4 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+673.9 236.7 moveto
+676.4 234.8 lineto
+672.6 234.2 lineto
+673.9 236.7 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+704.8 258.8 moveto
+709.8 258.1 lineto
+714.2 256.9 lineto
+714.8 253.1 lineto
+716.7 251.2 lineto
+721.1 252.5 lineto
+723.7 254.3 lineto
+730 251.2 lineto
+738.1 248.7 lineto
+741.3 244.9 lineto
+745.1 241.7 lineto
+744.4 238.6 lineto
+747 235.4 lineto
+752 232.3 lineto
+752 231.7 lineto
+746.3 232.3 lineto
+747 231.7 lineto
+743.2 233.6 lineto
+741.3 236.7 lineto
+738.8 238.6 lineto
+736.3 236.7 lineto
+736.3 234.2 lineto
+732.5 235.4 lineto
+728.1 235.4 lineto
+725.5 237.3 lineto
+722.4 236.7 lineto
+723 240.5 lineto
+721.1 244.3 lineto
+717.4 247.4 lineto
+713.6 248 lineto
+709.8 248 lineto
+708.5 251.2 lineto
+709.8 253.7 lineto
+706 254.3 lineto
+704.8 258.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+748.2 243.6 moveto
+747.6 243.6 lineto
+750.7 245.5 lineto
+753.3 245.5 lineto
+756.4 247.4 lineto
+757 244.3 lineto
+753.3 243.6 lineto
+748.2 243.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+661.9 159.9 moveto
+666.3 157.3 lineto
+670.1 159.2 lineto
+674.5 160.5 lineto
+680.8 161.1 lineto
+684 164.3 lineto
+689 166.8 lineto
+695.3 168 lineto
+701 168 lineto
+704.8 164.9 lineto
+707.9 160.5 lineto
+710.4 163 lineto
+713.6 164.3 lineto
+714.2 159.9 lineto
+715.5 156.1 lineto
+718 151.7 lineto
+723 149.1 lineto
+728.1 149.8 lineto
+733.1 148.5 lineto
+735.6 150.4 lineto
+738.8 152.9 lineto
+741.9 154.2 lineto
+741.9 158 lineto
+743.8 161.7 lineto
+746.3 166.8 lineto
+750.1 170.6 lineto
+751.4 175.6 lineto
+752.6 181.9 lineto
+751.4 186.9 lineto
+752 190.7 lineto
+748.9 194.5 lineto
+746.3 198.3 lineto
+743.8 200.2 lineto
+741.9 204.6 lineto
+739.4 207.7 lineto
+738.8 212.8 lineto
+738.1 216.5 lineto
+736.9 219.7 lineto
+734.4 218.4 lineto
+733.7 222.2 lineto
+734.4 226.6 lineto
+731.8 228.5 lineto
+731.8 227.9 lineto
+730.6 222.8 lineto
+731.2 219.1 lineto
+731.2 215.3 lineto
+729.3 212.8 lineto
+726.2 210.2 lineto
+722.4 213.4 lineto
+718 215.9 lineto
+715.5 219.1 lineto
+716.7 222.2 lineto
+718 224.1 lineto
+714.2 225.4 lineto
+709.8 226 lineto
+704.1 224.7 lineto
+701.6 221 lineto
+699.7 217.8 lineto
+695.9 218.4 lineto
+693.4 221 lineto
+690.9 217.8 lineto
+688.4 214 lineto
+684 212.8 lineto
+682.1 209.6 lineto
+679.6 204.6 lineto
+675.1 202.7 lineto
+670.1 201.4 lineto
+666.3 198.9 lineto
+661.9 196.4 lineto
+660 192.6 lineto
+659.4 187.6 lineto
+661.3 183.2 lineto
+659.4 179.4 lineto
+660.7 175 lineto
+662.5 170.6 lineto
+660.7 164.9 lineto
+661.9 159.9 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+735.6 141.6 moveto
+731.2 140.3 lineto
+728.7 139.7 lineto
+728.7 136.5 lineto
+730.6 132.8 lineto
+733.1 135.3 lineto
+735.6 138.4 lineto
+735.6 141.6 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+793 146 moveto
+790.4 141 lineto
+787.3 137.2 lineto
+782.9 134.7 lineto
+779.1 131.5 lineto
+775.9 127.7 lineto
+779.7 126.5 lineto
+782.2 125.2 lineto
+785.4 129.6 lineto
+788.5 134.7 lineto
+792.3 136.5 lineto
+794.2 141 lineto
+796.1 144.1 lineto
+793 146 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+797.4 166.8 moveto
+798 162.4 lineto
+799.9 159.9 lineto
+799.9 156.1 lineto
+796.7 152.3 lineto
+798.6 149.8 lineto
+799.9 147.9 lineto
+798.6 144.1 lineto
+801.8 144.1 lineto
+803.7 149.8 lineto
+806.8 152.9 lineto
+809.3 154.8 lineto
+806.8 156.7 lineto
+804.3 155.4 lineto
+803 158.6 lineto
+801.8 163.6 lineto
+797.4 166.8 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+391.6 406 moveto
+388.1 404.5 lineto
+385.6 404.5 lineto
+381.6 403 lineto
+383.6 407 lineto
+386.6 408.5 lineto
+386.6 410 lineto
+383.6 411 lineto
+385.6 414.5 lineto
+385.6 416 lineto
+388.6 416.5 lineto
+387.1 421 lineto
+384.1 422 lineto
+384.1 424.5 lineto
+385.1 428 lineto
+386.6 430.5 lineto
+388.6 427.5 lineto
+389.1 423 lineto
+391.1 420 lineto
+391.6 416 lineto
+393.6 412.5 lineto
+394.1 408.5 lineto
+391.6 406 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+474.1 358 moveto
+470.6 357 lineto
+469.6 355 lineto
+472.6 355.5 lineto
+474.1 358 lineto
+closepath
+gsave
+[0 0 0 0]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+530.1 390.5 moveto
+527.7 389.6 525.6 386.9 526.6 384.5 curveto
+527.2 383.1 528.6 382.4 530.1 382 curveto
+531.9 381.5 534.4 380.8 535.1 382.5 curveto
+535.6 383.8 534.1 384.6 534.1 386 curveto
+534.1 387.6 536.2 388.6 535.6 390 curveto
+534.8 391.9 532 391.2 530.1 390.5 curveto
+closepath
+gsave
+[0 0 0 0.1]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+222.1 390 moveto
+220.9 390.7 219.9 388.9 218.6 388.5 curveto
+217.3 388.1 216.3 388 215.1 387.5 curveto
+213.7 386.9 211.4 386.6 211.6 385 curveto
+211.8 383.3 214.5 384.3 216.1 384.5 curveto
+217.4 384.7 218.5 385.2 219.6 386 curveto
+221 387.1 223.6 389.1 222.1 390 curveto
+closepath
+gsave
+[0 0 0 0.1]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+207.1 389.5 moveto
+207.6 390.8 206.7 391.8 206.1 393 curveto
+205.4 394.5 204.6 396 203.1 396.5 curveto
+201.9 396.9 200.8 396.8 199.6 396.5 curveto
+198.3 396.2 197.6 395.4 196.6 394.5 curveto
+195.4 393.4 194.6 392.2 194.1 390.5 curveto
+193.7 389.1 192.4 387.3 193.6 386.5 curveto
+194.7 385.8 196.3 386.4 197.1 387.5 curveto
+197.7 388.3 197.3 389.5 197.6 390.5 curveto
+198 391.9 198.3 393.4 199.6 394 curveto
+201.1 394.7 202.7 394.2 204.1 393.5 curveto
+205.7 392.7 206.4 387.8 207.1 389.5 curveto
+closepath
+gsave
+[0 0 0 0.1]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+0 sf
+newpath
+198.6 399.5 moveto
+196.9 399 196.2 401.1 194.6 401.5 curveto
+192.6 402.1 191.1 402.3 189.1 402 curveto
+187.6 401.8 184.7 402.1 185.1 400.5 curveto
+185.3 399.4 186.5 399.1 187.6 399 curveto
+189.2 398.8 190 400.7 191.6 400.5 curveto
+192.4 400.4 193 399.9 193.6 399.5 curveto
+193.9 399.3 194.2 398.7 194.6 398.5 curveto
+195.8 397.8 200.1 400 198.6 399.5 curveto
+closepath
+gsave
+[0 0 0 0.1]setcolor {fill}fp
+grestore
+gsave
+0.4 setlinewidth 0 setlinecap 0 setlinejoin 3.863693 setmiterlimit [0 0 0 1]setcolor {stroke}fp
+grestore
+vmr
+end % FreeHandDict
+%%EndDocument: _
diff --git a/Master/texmf-dist/doc/latex3/xor/xo-README.txt b/Master/texmf-dist/doc/latex3/xor/xo-README.txt
new file mode 100644
index 00000000000..26135c36ebd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/xo-README.txt
@@ -0,0 +1,219 @@
+%
+% $Id: xo-README.txt,v 1.1 2000/08/11 07:04:34 latex3 Exp $
+%
+%
+
+INTRODUCTION
+============
+
+This directory contains the first prototype implementation of the new
+output routine (OR) for LaTeX2e*.
+
+It is not a finished product, thus it is very likely that using it
+will result in errors or problems.
+
+Especially error recovery is more or less nil, eg, there are a lot of
+places which simply say \ErrorFooBar (which is undefined). So if this
+happens to you, you might have to search in the code to see why this
+is supposed to be a user error.
+
+Nevertheless, I hope that playing around with it will give you some
+idea about how the finished OR might look like and what it will be
+able to do.
+
+Suggestions, comments, ... are welcome, especially on the already
+available functionality or on missing functionality.
+
+enjoy
+Frank
+
+August 2000
+
+
+
+
+
+INSTALLATION
+============
+
+This set of packages builds on the basic packages
+
+ templates.sty
+ ldcsetup.sty
+ xparse.sty
+
+so you need to pick those up from the project web site as well.
+
+To unpack the distribution use one of the three distributed .ins
+files:
+
+ xo.ins % unpacks without any tracing code whatsoever
+ xoprogress.ins % unpacks with progress information code (recommended)
+ xotrace.ins % unpacks with tracing code (for those who like to see
+ % what the algorithm really does)
+
+
+DOCUMENTATION
+=============
+
+The sequence
+
+ pdflatex xoutput.drv
+ makeindex -s gind.ist xoutput
+ pdflatex xoutput.drv
+
+will produce a pdf file of roughly 150 pages with the (somewhat)
+documented code --- there is still a lot to do there.
+
+To produce some overview article on the OR run
+
+ latex xo-pfloat
+
+three times.
+
+There will be a question asked which you can answer with either
+
+ 0 % run with normal latex
+ 1 % run using the new OR
+
+
+There is also a sample file for you to play with:
+
+ xo-sample.tex
+
+but is is more or less a template file.
+
+There is also the file I used for the examples for my talk at Oxford:
+
+ oxford-trial.tex
+
+This file asks for a "trial" number:
+
+ 0-8 shows how the algorithm adds float after float to the page
+ 9 same as 8 but uses grid layout
+ 10 manual float control using an .fpc file
+
+
+
+IMPLEMENTED FEATURES
+====================
+
+Plenty I hope, for important ones see xo-pfloat and of course the
+documented code :-)
+
+
+MISSING FEATURES
+================
+
+Plenty I fear. Here are a few important ones.
+
+ - Interface for specifying spanning floats is missing
+
+ - Interface for specifying which areas are allowed for a float
+
+ - Interface for specifying the look and setup of a float page
+
+ - Most of the page layout things like folio, running headers, etc
+
+ - More float placement control (what is wanted, needed)
+
+ - Balancing of columns, what are the appropriate concepts with
+ respect to floats?
+
+ - page style concepts: how are page styles changed, how are they
+ specified?
+
+
+
+KNOWN BUGS
+==========
+
+Plenty I fear. Here are a few important ones.
+
+ - There are many footnotes in the code that say CHECK! or FIX! or
+ ... they are all places where further work is most likely
+ necessary, or known bugs are already documented.
+
+ - Because of the unfinished work in xo-final/xo-new there are two
+ hardwired lists \bot@areas and \top@areas. Top areas are mounted
+ first on the page, thus entries for list of figures etc, will be
+ sort of strangely ordered :-)
+
+ - If a special penalty such as the flush point penalty ends up at the
+ top of a column any glue after it isn't properly removed. This
+ needs fixing and while the way to proceed is clear it is not yet
+ implemented.
+
+ - If we have to relax the float placement conditions due to a flush
+ point the current code reverts to tight conditions the moment the
+ last affected float has been placed (the idea was to ensure that we
+ don't place too many floats on such a page since the relaxed
+ conditions do not have a restriction there). But the problem with
+ that approach is that in fact in most cases this will result in no
+ further floats being allowed at all since typically the already
+ placed floats make any further trials fail now. So this needs some
+ change, eg only to check columns after the flush point with the
+ tight conditions or ... for the moment it has only be partially
+ resolved by enabling basically only the restrictions on number of
+ floats per column or space available in columns (which are only
+ checked for areas under trial)
+
+ - If the design allows strange placements in various areas, then ".lot"
+ files etc will as a result always be ordered strangely. There is
+ not much you can do about that on this stage (even if the above
+ problem is fixed) other than ensuring that at some later stage such
+ files get sorted automatically.
+
+ - Float pages are at best strange. what are good concepts to
+ construct them in multi-column layouts? Are there any?
+
+ - Size of a here float is not properly calculated when it get
+ initialized
+
+ - Grid layout requires that \topskip=\baselineskip (or so it seems
+ --- it shouldn't but there is somewhere a bug lurking)
+
+ - Definition of grid layout point commands need one more indirection
+ to allow turning them off for a single page setup. Right now, the
+ moment they are disabled they are gone.
+
+ - Initialization of the various data structures is not yet properly
+ done --- this needs further sorting out. As a result it is likely
+ that some setups run into undefined variables.
+
+ - If \readfloatplacements is used (ie float are manually placed) then
+ the positioning of the float areas is done incorrectly because I
+ forgot to add the necessary code to that part of the processing
+ (just found out while finishing the examples for the Oxford talk)
+
+
+FOUND A BUG?
+============
+
+If you think you have found a real bug (not just something that is
+simply not yet implemented) I would be glad if you report it using
+
+ latex latexbug
+
+from the standard LaTeX distribution and select option
+
+ 7) expl3: Experimental packages for TeX programmers. (expl3)
+
+or alternatively by discussing it on LATEX-L (see below)
+
+
+
+DISCUSSION OF FEATURES (MISSING OR ELSE)
+========================================
+
+Discussion of features, either those implemented or those missing
+should be directed to the discussion list
+
+ LATEX-L
+
+so that others can participate in the discussion. You can subscribe to
+this list by sending a mail with the line
+
+ SUBSCRIBE LATEX-L Your Name
+
+to listserv@URZ.UNI-HEIDELBERG.DE
diff --git a/Master/texmf-dist/doc/latex3/xor/xo-pfloat.tex b/Master/texmf-dist/doc/latex3/xor/xo-pfloat.tex
new file mode 100644
index 00000000000..2835b0ed017
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/xo-pfloat.tex
@@ -0,0 +1,1623 @@
+% Copyright 2000 Frank Mittelbach
+% All rights reserved
+%
+%
+% NOTE: the text contains reference to the fact that it is typeset
+% using the new OR!
+%
+\def\rcsdata$#1: #2,v #3${
+ \def\rcsdata{#2 #3}}
+\rcsdata$Id: xo-pfloat.tex,v 1.19 2000/08/11 07:08:04 latex3 Exp $
+
+% next lines needs pdflatex 0.14f+ !!!!
+\ifx\rpcode\undefinedcsname
+\else
+ \input protcode.tex
+ \pdfprotrudechars=2
+% \pdfoutput=0
+\fi
+
+\tolerance=6000
+\emergencystretch=1cm
+
+%\tracingonline=1
+%\tracingpages=1
+%\showoutput
+
+\newcount\ProcessControl
+
+% 0 means std LaTeX, 1 new OR, 2 new OR + galley2 (not functional)
+
+\ProcessControl=1
+
+\typein[\ProcessControl]
+ {^^J^^J0 means std LaTeX, 1 new OR
+%, 2 new OR + galley2 (needs *new* LaTeX)
+ }
+
+
+\newcommand\ORspecial[1]{\ifnum\ProcessControl>0\relax#1\fi}
+
+
+
+\ifnum\ProcessControl=0
+ \documentclass[twocolumn]{article}
+% \documentclass[preprint]{ltugproc}
+ \renewcommand\floatpagefraction{0.9}
+ \setlength\belowcaptionskip{10pt}
+\else
+ \documentclass{article}
+\fi
+
+\parskip=0pt
+\widowpenalty=5000
+
+
+\usepackage{array,url,varioref}
+\usepackage{times}
+
+\ifcase\ProcessControl
+% \usepackage{hyperref}
+ \usepackage{calc}
+\or
+% \usepackage{trace}
+ \usepackage{xoutput}
+ \usepackage{xo-grid}
+ \ShowGridfalse
+\else
+ \usepackage{trace,
+ galley2,xcontents,xlists-samples,
+ xoutput}
+ \usepackage{xo-grid}
+ \ShowGridfalse
+
+ \let\thetable\thefigure % needed to be able to use old xcontents.sty
+\fi
+
+
+
+
+\ifnum\ProcessControl=2
+
+\makeatletter
+\def\l@v@lalgorithms{0}
+\makeatother
+
+\DeclareInstance{contentsobject}{section}{std}{
+ pre-v-action = \DelayEvaluation{\addpenalty{10000}
+ \addvspace{1em plus 1pt}},
+ right-margin-sep = 15pt,
+ title-format = \textbf{#1},
+ number-format = \textbf{#1\hfil},
+ pnum-format = \textbf{\hfil#1},
+ leaders-action = ~,
+ number-width = \DelayEvaluation{1.5em}}
+
+\DeclareInstance{contentsobject}{subsection}{std}{
+ object-indent = \DelayEvaluation{1.5em},
+ number-width = \DelayEvaluation{2.3em}}
+
+\DeclareInstance{contentsobject}{subsubsection}{std}{
+ object-indent = \DelayEvaluation{3.8em},
+ number-width = \DelayEvaluation{3.2em}}
+
+
+\DeclareInstance{contentsobject}{figure}{std}{
+ pre-v-action = ,
+ right-margin-sep = 20pt,
+ title-format = \textit{#1},
+ number-format = \textrm{\hfil#1},
+ pnum-format = \textbf{\hfil#1},
+ leaders-action = ~,
+ number-width = \DelayEvaluation{1.5em}}
+
+
+\DeclareInstance{contentsobject}{table}{std}{
+ pre-v-action = ,
+ right-margin-sep = 15pt,
+ title-format = \textrm{#1},
+ number-format = \textbf{#1\hfil},
+ pnum-format = \textbf{\hfil#1},
+ leaders-action = ~,
+ number-width = \DelayEvaluation{1.5em}}
+
+\fi
+
+
+
+\ifnum\ProcessControl> 0
+
+
+\DeclareFloatSequenceClass{floats} % this will vanish again
+
+\DeclareFloatType{figure}
+ {
+ sequence-class-id = floats,
+ toc-extension = lof,
+ caption-text = \figurename,
+ numbered-boolean = true,
+ numbered-id = figure,
+ numbered-within-id = ,
+ numbered-action = \arabic{figure},
+ body-decls =
+ }
+
+
+\DeclareFloatType{table}
+ {
+ sequence-class-id = floats,
+ toc-extension = lot,
+ caption-text = \tablename,
+ numbered-boolean = true,
+ numbered-id = figure,
+ body-decls = \footnotesize,
+ }
+
+\DeclareFloatArea {t12}
+ {
+ class-close-list = ,
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {b12}
+ {
+ class-close-list = {t12,t11,b11},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {t11}
+ {
+ class-close-list = ,
+ all-close-list = {b11},
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {b11}
+ {
+ class-close-list = {t12,t11},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {t21}
+ {
+ class-close-list = {t12,t11,b11},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {b21}
+ {
+ class-close-list = {t12,t11,b11},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\topskip=12pt
+
+\DeclareInstance{pagesetup2}{twocol}{std}{
+ column-num = 2,
+ column-width = 229.5pt, % this strange value is what LaTeX2e
+ % uses for two column article
+ column-height = \DelayEvaluation 50\baselineskip + \topskip,
+ column-sep = 20pt,
+%
+ float-callout-constraint = after,
+ float-callout-span-constraint = flexible,
+ bottom-float-footnote-constraint=forbidden,
+% bottom-float-footnote-constraint=none,
+ max-float-num =2,
+%
+ area-list = {t12,t11,b11,b12,t21},
+ area-list = {b12,b11,b21},
+%
+% footnote-setup = \UseTemplate{footnotesetup}{ftnright}{},
+% footnote-setup = \UseTemplate{footnotesetup}{margin}{},
+ footnote-setup = \UseTemplate{footnotesetup}{std}{},
+%
+ float-text-sep = 36pt minus 8pt,
+ float-area-sep = 20pt,
+ float-float-sep = 20pt,
+%
+ grid-point-sep = 12pt,
+ }
+
+\fi
+
+
+\newcommand\meta[1]{\mbox{$\langle$\textit{#1}$\rangle$}}
+\usepackage{shortvrb}
+\MakeShortVerb\|
+
+\title{Formatting documents with floats\\
+ A new algorithm for \LaTeXe$^*$}
+\author{\copyright{} Frank Mittelbach}
+\date{\rcsdata}
+
+
+
+\begin{document}
+
+\ORspecial{\UseInstance{pagesetup2}{twocol}}
+
+
+\maketitle
+
+\tableofcontents
+
+\ORspecial\vfill
+
+\begin{abstract}
+This paper describes an approach to placement of floats in
+multicolumn documents.
+
+The current version of \LaTeX{} was originally written for
+single-column documents and extended to support two-column documents by
+essentially building each column independently from the other. As a
+result the current system shows severe limitations in two column mode,
+such as the fact that spanning floats are always deferred to at least the
+next page or that numbering between column floats and spanning floats
+can get out of sequence.
+
+The new algorithm is intended to overcome these limitations and at the
+same time extend the supported class of document layouts to multiple
+columns with floats spanning an arbitrary number of columns.
+\end{abstract}
+
+%\ORspecial\vfill
+\ORspecial\newpage
+
+\section{Introduction}
+
+One problem with formatting documents containing floats is the number
+of potential formatting solutions that need to be checked out. The
+number of trials grows combinatorially in the number of floats and
+areas which can receive them. If we have $n$ floats waiting to be
+placed and $m$ areas in which we can place them on the current page
+being built (not counting the ``deferred area'') then the number of
+different placements is given by
+\begin{equation}
+ \#\mbox{trials} =
+ { n+m \atopwithdelims() m} =
+ \frac{(n+m)!}{n! \, m!}
+ \label{eq:binom}
+\end{equation}
+assuming that the order of floats has to be preserved, i.e., if the
+call-out of float $f_i$ is before the call-out of $f_j$ in the text
+stream then the float $f_i$ will be placed in earlier than float $f_j$
+where ``earlier'' is a defined relation of float areas.
+
+
+For example, if we have 8 floats waiting to be distributed among 12
+areas (which corresponds to a three column page with float areas at the
+top and bottom allowing for partial spans) then we have to check
+125970 possible distributions; if two additional floats appear we end
+up with 646646 trials.
+
+Even though a large number of these distributions would be
+unacceptable and discardable straight away, after some initial test,
+the resulting running time of the algorithm would clearly be beyond
+any acceptable speed. (Assuming we could do 1000 trials per second,
+which is ridiculous high since many of them would require
+trial-typesetting the whole page, then the case of 646646 trials would
+still take roughly 10 minutes to form a decision.)
+
+ Thus it is important to find algorithms with
+complexity that is at worst linear in both the number of floats on the
+trial list and the number of possible float areas, even if this means
+that in a few cases a relatively good layout will not be found.
+It is even better if they have minimal redundancy.
+
+
+Note that assessing the actual running time of \TeX{} code is not
+straightforward since some activities are very much faster than
+others. For example, performing a test by using a reasonable number
+of macro expansions and register assignments may be very much slower
+than running through a long typeset list and then doing a simple test.
+
+
+The algorithm we have implemented fulfills the requirement of being
+(essentially) linear in the number of floats and the number of float
+areas.
+
+
+\section{The document source model}
+
+The document source is a single stream of continuous text containing
+call-outs to floating objects. (At the moment the call-outs are marked
+by placing the objects into the stream but it would be possible to
+provide them as separate objects.)
+Floating objects (as of today) come in three incarnations:
+\begin{itemize}
+\item Objects where the call-out and the placement requires a strict
+spatial relationship, e.g., same line in the margin. An example would
+be marginal notes as implemented by |\marginpar| in \LaTeXe.
+\item Objects where the call-out and the placement are required to fall
+onto the same column/\allowbreak page/\allowbreak spread, e.g.,
+footnotes.
+\item Objects where there is a defined relation between call-out and
+object placement, e.g., ``not in an earlier column'', or ``on the same
+page or later'', etc. These are the traditional floats.
+\end{itemize}
+Float objects in the last group are typed where the type is defined by
+the logical content of the object, e.g., ``figure'', ``table'', and so on.
+
+
+The document formatting is achieved using a minimal but customizable
+lookahead (typically the considered galley material is the equivalent
+of one page/\allowbreak spread of textual material ignoring the
+additional size taken up by embedded float objects).
+
+While making up pages the main ``quality'' guidance for the algorithm
+is to try to place each float as early as possible without violating
+defined constraints.
+
+
+\ORspecial\ShowGridtrue
+
+
+\section{The document layout model}
+
+\subsection{Page layout grid}
+
+The algorithm supports the specification of a page grid on which it
+will align text columns and other elements. This will allow (if
+suitable parameters for various elements are chosen) to have text
+lines of different columns all lying on grid points.\footnote{On the
+current page lines are drawn to highlight the grid. Note that
+headings, lists, and other ``display'' objects are not aligned.}
+
+\subsection{Columns}
+
+The page layouts which are supported by the new algorithm support
+an arbitrary number of text columns of equal width.
+
+The number of columns per page as well as their width can be changed
+at forced page breaks such as the start of chapters.
+
+\subsection{Balanced columns}
+
+Balancing columns (as done by the \texttt{multicol} package) is planned
+but not implemented. The major problem in that area is the handling of
+column floats during the balancing process.
+
+
+\subsection{Float areas}\label{overlap}
+
+Float objects are distributed into float areas which are
+rectangular in shape. Float areas span one or more text columns, their
+horizontal size is therefore given by the following formula (where
+$c$ is the number of columns spanned):
+\[
+ \meta{area-width} = c \times
+ \bigl( \meta{col-width} + \meta{col-sep}\bigr)
+ - \meta{col-sep}
+\]
+The naming conventions for float areas is as follows:
+\[
+\meta{identifier}\meta{start-column}\meta{span-count}.
+\]
+The \meta{identifier} is a single letter denoting the type of area,
+e.g., |t| for top, |b| for bottom. The \meta{span-count} is a single
+digit denoting the number of columns to span. The
+\meta{start-column} is a single digit\footnote{With a bit of care in
+the code this could be extended to allow more than one digit.}
+denoting the start column of the area. Thus |t23| is a top area
+starting at column two and spanning three columns, i.e., two, three
+and four.
+A restriction due to the naming scheme is that currently no more than
+9 columns are possible.\footnote{The scheme is different from the
+original one used, where \texttt{t23} would have denoted an area
+starting at column two and spanning until column three.}
+
+Only a subset of the float areas is allowed to be populated on a
+page. In essence the new algorithm does not support placements
+that result in ``splitting'' the text of a column due to a float (other
+than column `here' floats).\footnote{Perhaps this restriction will be
+lifted one day.} This means that population of some float areas
+must be prevented, namely those satisfying these conditions
+when $pcs$ (where $p=\textrm{pos}$,
+$c=\textrm{column}$, $s=\textrm{span}$) has just been populated:
+\[
+ pij \textrm{ with } i < c \leq i+j < c+s
+\]
+or
+\[
+ pij \textrm{ with } i \leq c+s < i+j \leq
+ \mbox{\meta{number-of-columns}}
+\]
+The first formula describes the areas which partly overlap from the
+left, the second formula describes those that partly overlap from
+the right. Areas which are sub- or super-areas, e.g., \texttt{t13}
+and \texttt{t22} do not affect each other. The above restriction is
+necessary to prevent situations like the one shown in
+figure~\vref{fig:overlap}
+%
+\begin{figure}
+\footnotesize
+\caption{Overlapping float areas}\label{fig:overlap}
+\begin{minipage}{.6\columnwidth}
+\begin{verbatim}
+ aaaaaaaaaaa 444
+ aaaaaaaaaaa 444
+ aaaaaaaaaaa 444
+ 111 222
+ 111 222 bbbbbbb
+ 111 222 bbbbbbb
+ 111 222 bbbbbbb
+ 111 222
+ 111 222 333 444
+ 111 222 333 444
+ 111 222 333 444
+\end{verbatim}
+\end{minipage}
+\end{figure}
+%
+i.e., where the float area \texttt{t32} (represented as b's) would
+result in splitting the fourth column into two independent text areas.
+
+The possibilities, as well as the restrictions, are equal for both top
+and bottom areas. This means that the new scheme in particular
+supports spanning bottom areas.
+
+\ORspecial\ShowGridfalse
+
+\subsection{Float pages and columns}
+
+Float pages, i.e., pages consisting only of floats, will be supported
+as well as float columns.
+
+
+\subsection{Float types}
+
+The type of float influences the formatting, e.g., where the caption
+is placed in relation to the float body, how it is formatted, what
+kind of fixed strings are added, etc. It also restricts the placement
+algorithm in respect to which float areas can be populated as
+explained below.
+
+
+\subsection{Margins}
+
+The marginal areas can receive marginal notes which are aligned with
+the corresponding text line. In documents with more than two columns
+marginal notes are currently not supported though one could envision
+allowing them even there. If marginals have to compete for space the
+later marginal will be moved downwards if there is enough space on the
+page, otherwise the line containing the marginal will be moved to the
+next column/\allowbreak page.\footnote{This is not yet implemented ---
+right now they overprint each other.}
+
+An alternative usage of the margin is to place footnotes into it. A
+prototype version of this is provided already, see
+section~\vref{footnotes}.
+
+Another potential use of the margin areas is to use them (or parts
+thereof) as float areas in their own right. The problem with this
+would be that these float areas would have a horizontal width which is
+different from the column width, thus allowing only a limited class of
+floats to appear therein.
+
+Another potential extension would be to allow float areas that border
+on a margin to use the marginal space as part of the float area,
+thereby allowing the filling of such an area with floats which are
+wider than the nominal float area. A special case of this, the
+placement of the caption in the margin beside the float body, is
+already provided by choosing a suitable caption formatting instance.
+
+
+
+
+\subsection{Footnotes}\label{footnotes}
+
+Footnotes can be regarded as a special type of floats. They are objects
+which are associated with lines of text (their call-out) but in
+contrast to normal floats such as ``figures'' or ``tables'' their placement
+constraints are stronger, e.g., they typically have to appear at the
+bottom of the column which contains their call-outs, or at least they
+have to appear on the same page as their call-outs.
+
+In its current version, the model supports footnotes beneath the
+call-out column (normal behavior); all footnotes in the last column
+(as with the \texttt{ftnright} package for two-column mode); all
+footnotes in the outer (or inner) margin.
+
+Without an extension to the page makeup algorithm (but instead with a
+suitable redefinition of the footnote commands) they could be processed
+as marginal notes or alternatively as ``end-notes''.
+
+
+\subsection{Headers and footers}
+
+The header and footer areas may use data received from individual
+columns. An extended version of \TeX's mark mechanism is made
+available which allows the definition of arbitrarily many independent
+classes of marks. Within each mark class information about the top
+mark (i.e., the mark active at the top of the column) the first mark
+and the last mark is made available for retrieval.
+
+This allows the production of correct running headers and footers for
+various types of applications such as dictionaries, manuals, etc.
+
+
+
+
+\section{The processing model}
+
+\subsection{Float placement concepts}\label{sec:float-place}
+
+To build a page(-spread) the algorithm first assembles enough textual
+material to be able to fill the page without placing any floats.
+During this process all floats that have their call-outs within the
+assembled galley are collected. They form, together with unplaced
+floats from previous pages, an ordered trial list of floats.
+
+The allowed float areas on the page under construction are totally
+ordered as well.
+
+The algorithm proceeds by taking the first float from the trial list
+and trying to place it into the first float area from the area
+list. It then checks if all constraints (see below) are met and if not
+the algorithm
+will try to place the float into the next area until either all
+constraints are met or the areas in the float area list are exhausted.
+A trial that does not fail means that
+this distribution of floats becomes the best solution so far and all
+further trials will be based on adding to this solution (no
+backtracking). If the algorithm fails to place the float into any
+area it means that the float will be deferred to a later page.
+
+As floats are added to areas, the constraints for further trials
+are changed. There are several reasons for this:
+on one hand, the call-out positions of
+various floats move
+since the float will occupy space on the page; on the other hand,
+placing a float in some area might result in disallowing the placement
+of other floats in the same or in other areas.
+
+
+\subsection{Float pages and columns}
+
+At the moment there is only rudimentary support for float pages
+available: at the start of each page the algorithm will try to form a
+float page out of all floats that have been deferred from previous
+pages. However there is no layout control available to define the
+conditions under which such a trial will succeed.
+
+
+\subsection{Float storage}
+
+Float bodies are typeset into boxes at the point of `call-out', as
+with the \texttt{figure} and \texttt{table} environments in the standard
+\LaTeX; it may also be possible to specify at the call-out point a
+logical pointer to a float whose typesetting is specified elsewhere
+(e.g., an external file).
+
+However, text sub-elements such as the caption, etc., (e.g., from
+|\caption|) are not typeset at this stage but are stored as token
+lists; this allows for trying different possible layout specifications,
+e.g., for its measure, during the float-positioning trials. At present
+this is confined to at most a single caption element per float.
+
+\subsection{Caption processing}
+
+When a float is placed into an area the caption is trial formatted and
+mounted onto the float body. This process can take into account
+various information about the float positioning trial, such as the
+area to format it into, the fact that it formats onto a verso or recto
+page, etc. It might try several possibilities before making a decision,
+e.g., if one formatting of the float results in violating some
+constraint(s) it might try a different formatting at this point.
+
+
+
+\subsection{Flushing floats}
+
+It is possible to mark points in the source document as boundaries beyond
+which floats whose call-outs are prior to the boundary cannot pass. In
+other words a ``flush point'' directs the algorithm to place all
+affected floats into areas which are ``before'' the flush point.
+
+If due to other constraints the float could not be placed in such an
+area the algorithm first retries all potential areas using a less
+rigid set of constraints (for example, restrictions on the number of
+allowed floats per area are dropped) and if this still doesn't enable
+the algorithm to place the float properly it will as a last resort
+move the flush point to a later column, which means breaking the
+column text before the flush point.
+
+Flushing of floats can be done either for all floats or on a
+per float type basis, e.g., it is possible to flush only floats of
+type ``figure''.
+
+A flush point can be given an additional attribute which controls the
+``fuzziness'' used by the algorithm. By default the flush point
+algorithm uses |strict| flushing as described above. The attribute
+|column| modifies the algorithms behaviour by enabling a float to move
+past the flush point as long as it will be placed on the same
+column. Similarily the attribute values |page| and |spread| will
+enforce that the float will not be deferred further than the current
+page or the current spread. This way it can be guaranteed that a float
+is always visible from its call-out.
+
+
+\subsection{Float sequence classes}
+
+Float sequence classes are collections of float types; each float type
+belongs to exactly one float sequence class. Within each sequence
+class the call-out order in the document is always preserved by the
+float placement algorithm, e.g., if $c_1,c_2,\ldots,c_n$ are the
+call-outs of all floats of a float sequence class then the
+corrsponding floats will be placed such that $f_i$ will be placed
+before $f_j$ whenever $i<j$. Thus by putting all float types into a
+single float sequence class all floats are placed in the order of
+their call-outs. As the other extreme, if each float type has its own
+sequence class\footnote{This is the \LaTeXe{} default.} then floats
+from one type might move before floats of other types even though the
+corresponding call-outs are in a different order.
+
+
+
+\subsection{Float and call-out relations} \label{fl-callout-relations}
+
+The algorithm also keeps track of the relation between an individual
+float and its call-out. This allows one to define constraints which
+guide the algorithm during the float placement phase. It is always
+permissible to place a float ``after'' its call-out, e.g., in a later
+column/\allowbreak page. At the moment the following constraints can
+be specified:
+\begin{description}
+\item[none] which means that the relation between call-out and float
+placement is not relevant for placing floats.
+\item[page] which means that the float can be placed anywhere on the
+page with the call-out (it is visible from the call-out).
+\item[column] which means that the float can be placed before the
+call-out as long as it is placed in the same column.
+\item[after] which means that the float has to be placed strictly
+after the call-out.
+\end{description}
+When extending the algorithm to directly support spreads the
+above list is going to be extended by an option that allows floats to
+move backwards on the whole spread.
+
+
+
+
+\subsection{Spanning float and call-out relations} \label{fl-span-relation}
+
+For floats that span two or more columns there are several
+possibilities to interpret the spatial relationship between call-out
+and float areas. For example, if a float, whose call-out is in the
+second column, has been placed into area |b12|, is this float
+``before'' or ``after'' its call-out? The answer to this question
+depends on whether we consider the float being placed into the first
+or the second column, both of which are valid interpretations.
+
+At the moment the following behaviour can be specified:
+\begin{description}
+\item[strict] which means that the leftmost column spanned
+ by the float is being regarded as the column in which the float was placed.
+\item[flexible] which means that the rightmost column spanned
+ by the float is being regarded as the column in which the float was placed.
+\end{description}
+These settings are only relevant if the main float/call-out relations
+are set to |column| or |after|.
+
+
+\subsection{Float and footnote relations}
+
+It is possible to direct the algorithm to check on each column if
+there are footnotes, and if so to prevent it from placing floats in
+the bottom
+area. In theory it might be possible that a forbidden constellation
+might resolve itself once the algorithm has added further floats,
+e.g., it could be the case that by adding additional floats the
+offending footnote gets moved to a different column. However, checking
+for this would mean potentially large backtracking so the algorithm
+uses a conservative approach and simply considers a trial as failed if
+footnotes and bottom areas collide.
+
+It is planned to allow a designer the choice of specifying where the
+footnotes should be placed in relation to any bottom floats (if the
+combination is allowed). Right now this is not implemented and
+column footnotes will always appear below the text column, i.e., above
+any bottom floats.
+
+
+
+
+\subsection{Area statuses}
+
+For each area the algorithm keeps track about whether or not it is
+closed for individual float types, e.g., is not accepting any more
+floats of type ``figure'' or closed for all types. The status of an
+area can change due to floats being placed into other areas (this
+might, for example, close earlier areas, or areas that overlap) or it
+can change due to the fact that the area became too full in some way
+(e.g., a size constraint or a number of floats constraint).
+
+Some of these constraints can be ``relaxed'' in certain situations,
+e.g., if the algorithm is directed to flush out remaining floats prior
+to a certain point in the galley it will drop constraints related to
+number of floats per area or size restrictions. However, if an area
+was closed due to a different float being placed into some other area,
+this area will stay closed in all circumstances to ensure proper
+sequential placement of floats and to ensure that overlapping areas
+that are forbidden as explained in section~\vref{overlap} will not
+receive floats at the same time.
+
+
+
+
+\subsection{Area constraints}
+
+The algorithm offers several possibilities for the designer to
+specify how and under what circumstances a float is allowed to be
+added to a certain area on the page.
+
+As explained above all areas on a page are tried in a specific
+order. This order can be specified and changed for specific parts of
+the document. Areas that are closed for the current type will be
+bypassed as well as areas which do not span the right number of
+columns to fit the horizontal size of the float. If these initial
+tests succeed the float may still fail to be placed into a certain
+area if it doesn't fulfill the following set of constraints:
+\begin{itemize}
+\item There is an upper limit on the total number of floats that can
+be placed on an individual page.
+\item Each area has an upper limit of floats that can go into it.
+\item After placing the float the remaining space in the text column
+must be larger than a specified value.
+\end{itemize}
+All such constraints are customizable.
+
+Additional constraints will probably be implemented
+once there has been some experience of what controls are actually
+needed to allow the specification for a reasonable number of layouts.
+
+For example, \LaTeXe{} allows the designer to restrict the maximum size of
+an area, but should one provide this or should there be a constraint
+on the size of all stacked areas? Or should there be both?
+
+
+
+\subsection{To ``Here'' or not to ``Here''}
+
+\LaTeXe{} allows the user to control the placement of an individual float by
+specifying one or more areas into which the float would be
+allowed to move using single letters. As a special notation an
+\texttt{h} would denote a so-called ``here'' float. Its advertised
+semantics is to try placing the float ``at the position in the text
+where the environment appears'' \cite[p.~197]{A-W:LLa94}.
+If this is not feasible \LaTeXe{} would try the remaining
+allowed possibilities on the next page, thus a float with a
+\texttt{ht} specification would either appear within the text or
+at the top of the next or a later
+page.\footnote{\clubpenalty=100 In two-column mode
+this can in fact result in a placement on the top of the second column
+even though the call-out position finally falls into the middle of
+that column.}
+
+In many cases people however prefer a ``here'' which always means
+``here''. The latter form is implemented in some add-on packages for
+\LaTeXe{}, however usually at the cost of allowing floats to appear out
+of order.
+
+The new model supports only the absolute ``here'' form for floats;
+however, correct ordering of floats in the output is guaranteed (if
+the tag generating the here float issues flushing of floats for the
+current type). If
+there is not enough space to place the float in a column, the float
+plus the preceding text line\footnote{More precisely the column is
+broken at the last breakpoint preceding the current position which is
+normally one line above but could be more (or less).} is moved to the
+next column/\allowbreak page.
+
+
+\subsection{Grid layout}
+
+To produce layouts with elements placed on an underlying grid
+(typically with grid points vertically separated by |\baselineskip|)
+the algorithm assumes that certain parts of the text column, e.g.,
+normal text will automatically align on the grid as long as the first
+line is positioned on the grid. A further assumption is that such
+parts of the column do not contain stretchable amounts of vertical
+glue so that they are not subject to stretching or shrinking if the
+material is adjusted to fit a given size.
+
+Given these assumptions, the algorithm proceeds by ensuring that the
+space taking up by floats (including their separating white spaces) is
+always of a size such that the remaining space for the text part of the
+columns is allowing for an integral number of grid lines. This is
+achieved by stretching or shrinking the space separating the areas
+from the text appropriately while building the page as explained in
+section\vref{sec:float-place}.
+
+Within the text column there are typically a number of ``display
+objects'' such as headings, equations, quotations, lists, etc\@. which
+should not be aligned on the grid. Instead, typically the text before
+and after is supposed to lie on the grid\footnote{In some cases,
+depending on the design, parts of the structure might be supposed to
+aligned as well.} This is supported by allowing to mark lines of text
+(or more generally points in the galley) to ``snap to the nearest grid
+point''. One can think of the implementation working by taking the
+column material up to the marked line and putting it into a vertical
+box of the size of the nearest possible grid point. By this approach
+stretchable glue around such a display object will allow the text line
+that should snap to the grid move into the correct position. This box
+is then given back to the page builder to assemble more material for
+the column. Since this way the preceding part of the column becomes
+rigid; thus a later request for snapping to the grid will only stretch
+or shrink material further down the column.
+
+A prototype implementation that makes most standard \LaTeX{} objects,
+like headings, displays, etc.\ support grid design is available with
+the package \texttt{xo-grid}. It is used for typesetting this
+document.
+
+
+\section{User control}
+
+
+\subsection{Column and page breaks}
+
+Breaking of columns and pages can be controlled from the source
+document by placing special tags into it. The |\columnbreak| command
+ends the current column after the current line (if used in horizontal
+mode). Similarly the |\pagebreak| command ends the current
+page.\footnote{At the moment these commands force a break; there is no
+possibility, as in \LaTeXe{} to suggest only that the current point
+is a good or bad break.}
+
+
+\subsection{Manual float flushing}
+
+The flush float functionality is available within the source document
+via the command |\flushfloats|. This command takes two optional arguments
+which, if present, denote the float type to flush (by default all) and the
+``fuzziness'' of the flush (by default |strict|). Other allowed values
+for the fuzziness are |column|, |page|, or |spread|. If a type is
+specified for flushing, effectively all types with the same float
+sequence class are flushed to preserve the ordering.
+
+
+
+\subsection{Specifying preferred areas}
+
+At the time of writing the document source interface for specifying
+the group of areas into which a float is allowed to move is not yet
+decided. One could envision keeping the original \LaTeX{} interface to
+float environments with optional argument. In that case something like
+|[t]| could be internally interpreted as ``any top area that exists''
+and translated into a list such as |t12 t11 t21|. But other interfaces
+are conceivable as well.
+
+
+
+\subsection{Manually position all floats}
+
+Any algorithm that automatically places all floats may fail to produce
+adequate results in some situations. In \LaTeXe{} the user was offered
+only the optional arguments of the float environments and by this
+method and by moving floats slightly in the source document one was
+finally able to change the formatting as needed.
+
+This was a time consuming and error prone manual task and any slight
+change in the source document text was likely to result in making this
+work obsolete.
+
+To improve on this situation the new algorithm can be directed to
+write out a file containing all of its float\footnote{Floats in this
+contect mean ``traditional'' floats, not footnotes or marginpars.}
+selections (an example is
+shown in table~\vref{fig:fpl}).
+%
+\begin{table}
+\begin{minipage}{\columnwidth-24pt}
+\footnotesize
+\begin{verbatim}
+Page: 1 (1)
+ Area: t13
+ Float: 4 (figure 4) []
+ Area: b21
+ Float: 2 (figure 2) [mylab:fig1]
+ Area: t31
+ Float: 3 (figure 3) [mylab:fig2]
+
+ Area: hhh
+ Float: 11 (table 1) []
+
+Page: 2 (2)
+ Area: t13
+ Float: 8 (figure 8) []
+ Area: t22
+ Float: 5 (figure 5) []
+ Area: b11
+ Float: 6 (figure 6) [mylab:fig3]
+ Area: b31
+ Float: 7 (figure 7) [mylab:fig4]
+\end{verbatim}
+\end{minipage}
+\caption{An example \texttt{fpl} file}\label{fig:fpl}
+\end{table}
+%
+By simple drag and drop the user can produce alterations to this
+selection. If such a modified file is stored as |\jobname.fpc| then
+the algorithm will use these selections without attempting to apply
+any of its internal rules. Thus the formatting will happen exactly as
+specified.\footnote{If the floats are stored within the source
+document at the point of their call-outs, the algorithm will be able
+to position a float only if it has already encountered the float in the
+source document. This means that one can move a float arbitrarily
+forward but only to a limited extent before its call-out position. If
+the floats are stored externally to the source document this
+restriction does not apply.}
+
+Beside moving floats between float areas it will be possible to move
+floats in and out of the special area called |hhh| which represents a
+list of all ``here'' floats on the page. If a float is moved into the
+``here'' area it means that it will be positioned as a here float at
+the point of its call-out.
+
+
+As an extension to this method we are experimenting with restricting
+the manual control only to parts of the document, e.g., allowing the
+user to manually fix a single chapter but have the algorithm determine
+the remainder. We also plan to integrate column length control in this
+way, so that it becomes easily possible to run a page or double-spread
+long or short by specifying this externally rather than via tags in
+the source document.
+
+
+
+\subsection[Tracing the algorithm's behavior]
+ {Tracing the algorithm's\\ behavior}
+
+In contrast to the \LaTeXe{} output routine, which is a black box as far
+as the user is concerned, the new algorithm tries hard to make its
+decision process comprehensible. Table~\vref{tab:progress} shows
+\ifnum\ProcessControl=0
+ \begin{table*}
+ \caption{Progress output of the algorithm}\label{tab:progress}
+\else
+%
+% FMi: people reading the source will notice that there isn't yet any
+% interface for spanning floats ... so we have to do this by hand
+%
+ \def\SPANCNT{2}%
+ \begin{table}[t12,b12]
+ \caption{Progress output of the algorithm}\label{tab:progress}
+ \begin{minipage}{1.3\columnwidth}
+\fi
+%
+\footnotesize
+\begin{verbatim}
+=======================================================================
+ STATS: floats waiting = 2 on page 13
+=======================================================================
+Float: \bx@E {5} {table} (floats) {5} {Statistics from the algorithm}
+ area trial: b12 -> failed: span count b12 /= 1
+ area trial: b11 -> accepted
+Float: \bx@F {6} {table} (floats) {6} {Running times of the algorithm}
+ area trial: b12 -> failed: span count b12 /= 1
+ area trial: b11 -> failed: b11 float num reached (1)
+ area trial: b21 -> failed: area below flush point (2=2, b21)
+ -> failed: --> retry with relaxed conditions
+
+ area trial: b12 -> failed: span count b12 /= 1
+ area trial: b11 -> accepted
+ STATS: trials = 7
+\end{verbatim}
+\ifnum\ProcessControl=0
+ \end{table*}
+\else
+ \end{minipage}
+ \end{table}\def\SPANCNT{}%
+\fi
+%
+a sample output produced by it. It shows for each float which areas
+have been tried, why they were rejected etc. There is also an option
+which produces about 1000 times as much information but the latter is
+probably useful only for debugging the system in case there are errors
+in the code.
+
+
+
+\subsection{Manually aligning text in grid layout}
+
+If the algorithm produces grid layout it automatically aligns certain
+text lines on the underlying grid. For manual control this
+functionality is also provided with the command |\TextAlignGrid| which
+will align the current text line on the grid. By issuing a
+|\IgnoreAlignToGrid| command grid alignment will be temporarily
+disabled, while |\ObeyAlignToGrid| will reestablish automatic grid
+processing.
+
+
+\section{Layout Specification}
+
+In the class file the designer is given control over the algorithm's
+behavior in all the aspects described above (and several more).
+
+The layout specifications are done through the new template and
+instance concept, see~\cite{tub:MCR99-3}.
+Additional information such as experimental code, further
+documentation, etc.\ can
+be found on the \LaTeX{} project web site at:
+\begin{quote}
+\url{http://www.latex-project.org}
+\end{quote}
+
+In contrast to the algorithm itself, which in its basic functionality
+now seems to be stable and reliable, the design interface is far
+more experimental. Thus the example declarations given below represent
+only the current state of thought (or of implementation)
+and are likely to be modified at any moment.
+
+
+\subsection{Float type declarations}
+
+Float types are declared using the command |\DeclareFloatType| which
+takes two arguments: the name of the type which is declared and in the
+second argument a list of key value pair which describe the
+properties of the float type, e.g.,
+\begin{verbatim}
+ \DeclareFloatType{figure}
+ {
+ sequence-class-id = floats,
+ toc-extension = lof,
+ caption-text = \figurename,
+ numbered-boolean = true,
+ numbered-id = figure,
+ numbered-within-id = section,
+ numbered-action =
+ \thesection.\arabic{figure},
+ body-decls = ,
+ }
+\end{verbatim}
+The \texttt{sequence-class-id} key defines to which float sequence
+class the type belongs to. If it is absent a sequence class with the
+same name as the type is assumed. The sequence class will be
+automatically initialized if not referenced before.
+
+The \texttt{toc-extension} key defines the extension to be used to
+write the caption to when generating ``List of floats'' listings. By
+using the same extension with different types it is possible to
+generate combined listings, such as ``List of table and figures''.
+
+The \texttt{caption-text} key defines the fixed text to be used as
+part of the caption text together with the float number if present,
+e.g., |Figure|. This information is passed to the caption formatting
+template so the actual formatting is defined there.
+
+The \texttt{numbered-boolean} defines whether or not floats of this
+type are numbered.
+
+The \texttt{numbered-id} key defines the name of the counter to use
+when numbering floats. If absent a counter with the same name as the
+type is assumed. By using the same counter with different types it is
+possible to use a single numbering scheme---in that case the
+\texttt{sequence-class-id} for these types should probably be
+identical as well to avoid strange numbering sequences within the
+document.
+
+The \texttt{numbered-within-id} key defines the name of the ``within''
+counter, i.e., the counter which if stepped resets the numbering. If
+the value is empty or not set the float type is numbered in a single
+sequence throughout the document.
+
+The \texttt{numbered-action} key defines the representation of the
+float number, as used in the caption and by the |\ref|, |\label|
+mechanism. The default is |\arabic{|\meta{counter}|}|.
+
+The \texttt{body-decls} key can hold formating instructions that
+should apply to the float body. They can assume a normalized
+formatting environment already set up by the algorithm.
+
+The declaration of a new float type automatically defines the
+necessary user document environments.
+
+
+\subsection{Float area declarations}
+
+Any float area that is going to be used at some stage by the algorithm
+needs to be declared beforehand. This is done through the
+|\DeclareFloatArea| command which takes two arguments: the name of the
+area (which has to follow the conventions explained in
+section~\vref{overlap}) and a list of key/value pairs describing the
+characteristics of the area.
+\begin{verbatim}
+ \DeclareFloatArea{t22}
+ {
+ class-close-list = {t11,b11},
+ all-close-list = {t12,t32},
+ max-float-num = 2,
+ }
+\end{verbatim}
+ As of today an area is characterized through the maximum number of
+floats it is allowed to receive (\texttt{max-float-num}) and through
+two lists which tell the algorithm which other areas are affected by
+adding a float to the current area. The list \texttt{class-close-list}
+enumerates all areas which are not allowed to receive additional
+floats of the same sequence class as the float that has been placed
+into the current area, while
+the list \texttt{all-close-list} contains the information about all
+areas that are to be completely closed the moment a float is received
+in the current area.
+
+The \texttt{class-close-list} key is primarily intended to specify a
+partial order on the areas to ensure that floats are not getting out
+of sequence in the output. For example, the above declaration says: if
+a float is placed into area |t22|, i.e., a top area starting at column
+two and spanning two columns, then the single column areas |t11| and
+|b11| (i.e., those of the first column) are closed for floats of the
+same class. However, assuming this example is part of a declaration for
+a four column layout which could have areas like |t14| or |t13|, there
+is nothing said about closing those areas. Thus in this particular
+layout a float spanning three or four columns would still be allowed
+to go on top.
+
+On the other hand the \texttt{all-close-list} key is available to
+ensure more visual constraints, e.g, ``if |t12| gets filled we don't
+want to have |b12| filled as well, we only want |b22| in this
+case''. In addition it is needed to implement the restriction about
+overlapping float areas as described in section~\vref{overlap}, e.g.,
+in the example declaration |t12| and |t32| are closed since they
+partly overlap with |t22|.\footnote{As mentioned before, this
+restriction might be lifted in a later version of the algorithm; as
+long as it is required one could alternatively add those areas behind
+the scenes to avoid runtime problems.}
+
+
+
+
+
+\subsection{Footnote formatting declarations}
+
+The formatting of footnotes is specified by declaring instance(s) of
+type |footnotesetup|. At the moment three templates are available
+though they should be considered only as prototypes: the template
+|std| produces conventional footnotes below each column, the template
+|ftnright| collects all footnotes and typesets them in the rightmost
+column, and the |margin| template collects and typesets them in the
+right outer margin.
+
+The keys of the above templates are providing only a rudimentary
+flexibility (to say it positively), in a production version all of
+them would need a large number of extensions.
+As an example
+\begin{verbatim}
+ \DeclareInstance{footnotesetup}
+ {mainmatter}{std}
+ {
+ text-sep = 14pt plus 3pt,
+ max-height = 8in,
+ }
+\end{verbatim}
+would declare the named instance |mainmatter| that provides footnotes
+below columns with a separation of |14pt+| and a maximum height for
+footnotes per column being |8in|.
+
+Instances like this can then be used in the declaration for a
+particular page layout as explained below. Alternatively one could use
+unnamed instances there using the |\UseTemplate| method.
+
+
+\subsection{Page setup declarations}
+
+At the heart of the layout declaration are instances of the type
+|pagesetup2.|\footnote{The number 2 has historical reasons and will
+vanish again at some point in the future.}
+An example setup showing all currently available keys is given in
+%
+\ifnum\ProcessControl=0
+ \begin{table*}
+ \caption{Example declaration for the \texttt{pagesetup2} template
+ showing all currently available keys}\label{tab:pagesetup2}
+\else
+ \def\SPANCNT{2}%
+ \begin{table}[t12,b12]
+ \caption{Example declaration for the \texttt{pagesetup2} template
+ showing all currently available keys}\label{tab:pagesetup2}
+ \begin{minipage}{1.3\columnwidth}
+\fi
+%
+\footnotesize
+\begin{verbatim}
+ \DeclareInstance{pagesetup2}{mainmatter}{std}
+ {
+% column specification
+ column-num = 2,
+ column-width = 220pt,
+ column-height = 610pt,
+ column-sep = 20pt,
+% float constraint specification
+ max-float-num = 3,
+ float-callout-constraint = after,
+ float-callout-span-constraint = strict,
+ bottom-float-footnote-constraint = forbidden,
+ flush-float-callout-constraint = page,
+ flush-float-callout-span-constraint = flexible,
+ flush-bottom-float-footnote-constraint = none,
+% area specification
+ area-list = {t12,t11,b11,b12,t21,b21},
+ defer-class-close-list = {t12,t11,b11,b12,t21,b21},
+ defer-all-close-list = ,
+ float-float-sep = 15pt,
+ float-text-sep = 30pt minus 8pt,
+ float-area-sep = 15pt,
+ float-inline-sep = 6pt minus 2pt,
+% grid specification
+ grid-point-sep = 12pt,
+% footnote etc specification
+ footnote-setup = mainmatter,
+ }
+\end{verbatim}
+\ifnum\ProcessControl=0
+ \end{table*}
+\else
+ \end{minipage}
+ \end{table}\def\SPANCNT{}%
+\fi
+%
+table~\vref{tab:pagesetup2}.
+
+
+\subsubsection{Column specification}
+
+The first four keys (|column-num|, |column-width|, |column-height|,
+and |column-sep|) describe the column structure of the page layout
+being defined, i.e., in this case a two-column layout.
+
+\subsubsection{Float constraint specification}
+
+The following four keys define the standard constraints for the
+algorithm when placing floats: \texttt{max-\allowbreak
+float-\allowbreak num} is the maximum number of floats that can go on
+a normal page,
+\texttt{float-\allowbreak callout-\allowbreak constraint} defines
+what kind of relations between float and call-out are allowed,
+possible values are explained on~\vpageref{fl-callout-relations}.
+
+\texttt{float-\allowbreak callout-\allowbreak span-\allowbreak
+constraint} handles the interpretation of spanning floats and is
+explained on~\vpageref{fl-span-relation}, and
+\texttt{bottom-\allowbreak float-\allowbreak footnote-\allowbreak
+constraint} defines whether or not bottom floats are allowed in case
+of footnotes.
+
+The last three constraints are replaced by
+\texttt{flush-\allowbreak float-\allowbreak callout-\allowbreak
+constraint}, \texttt{flush-\allowbreak float-\allowbreak
+ callout-\allowbreak span-\allowbreak constraint}, and
+\texttt{flush-\allowbreak bottom-\allowbreak float-\allowbreak
+footnote-\allowbreak constraint} in case flushing can't be done
+without relaxing the conditions (\texttt{max-\allowbreak
+float-\allowbreak num} is disregarded in that case automatically).
+
+\subsubsection{Float area specification}
+
+The key |area-list| defines all float areas that are allowed in this
+page layout as well as defining the order in which the areas are tried
+when placing floats.
+The keys \texttt{defer-class-close-list} and
+\texttt{defer-all-close-list} define the ``closing actions'' for the
+special area which receives the floats that could not be placed. E.g.,
+if a float of a certain class can't be placed then all areas listed in
+\texttt{defer-class-close-list} will be closed for this class of
+floats. In other
+words the two keys are comparable to the ones available for area
+declarations.
+
+Thus these keys together with the keys from the area
+declarations are most important to guarantee a sensible order of
+floats on the formatted page.
+
+In an earlier implementation of the algorithm a simpler scheme was
+used: there was a single area list which was shortened whenever a
+float couldn't be placed into it thereby confining the remaining
+floats to this restricted selection. This works fine as long as there
+are mainly single column floats since in this case the area can be
+reasonably ordered into a single sequence. However the moment spanning
+floats are supported the situation gets less straightforward. Is it
+allowed to place a later float into |t12| if there is already a float
+in the area |t11|?
+%% bb -- that's easy! a wider float always takes precedence over a
+%% narrower one in the same column span, so t21 wins.
+%% FMi -- so if there is a t11 float t21 is always closed and a later
+%% spanning float will always be deferred -> i doubt that all
+%% designers/editors would like to see this as a forced rule
+%% :-)
+
+It is quite likely that the current controls will turn out to be too
+crude. This will be seen once a suitable number of layouts have been
+produced under this scheme (or couldn't be produced because they
+turned out to be unspecifiable).
+
+There needs to be space between floats in an area and areas need to be
+separated from each other, as well as from the column text. For this we
+have the following keys:
+\texttt{float-float-sep} is the separation between two floats in an area,
+\texttt{float-area-sep} is the separation between two vertically
+adjacent areas, and \texttt{float-text-sep} finally is the separation
+between a float area and the column text.\footnote{A possible
+extension would be to allow ornamental material in place of white space.}
+The separation between inline floats and surrounding text is given by
+\texttt{float-inline-sep}.
+
+\subsubsection{Grid specification}
+
+To produce a grid based design the \texttt{grid-point-sep} needs to be
+given a positive dimension. This defines the distance between grid
+points on which the algorithm aligns column text, inline floats,
+etc.\footnote{Setting this parameter is not sufficient: to make grid
+setting possible several other parameters need to be set to suitable
+values as well, e.g., the distance between baselines should be
+compatible and the column height need to be a multiple of this value.}
+
+To align column text at a grid point the algorithm will extend the
+\texttt{float-text-sep} space. Alternatively, if the nearest grid
+point can be reached by shrinking that space (assuming its
+specification contains a |minus| component) the algorithm will use
+that grid point instead. In a similar fashion the space around an
+inline float will be determined by the value of
+\texttt{float-inline-sep}.
+
+
+
+\subsubsection{Footnote, etc.~specification}
+
+Finally the key \texttt{footnote-setup} receives an instance of a
+\texttt{footnotesetup} template, therby defining how footnotes are
+handled and presented.
+
+What is clearly missing here is handling of other page elements such
+as running headers and footers, the folio, etc. This will be added
+soon.
+
+
+\subsection{Float formatting declarations}
+
+For the attachment of captions to floats there exists a prototype
+interface using templates of the type |buildfloat|. At the time of
+writing, available templates are |centeredbelow|, |centeredabove|, and
+|bottomright|, which center the caption below or above the float body
+or place it to the right of it, aligned with the bottom of the float
+body. All of them would need to be generalized for a production
+system to become more flexible.
+
+When trial-formatting a float the algorithm checks for the existence
+of a number of |buildfloat| instances and uses the first one that
+exists to build the float. More precisely it first checks if an
+instance with the name \meta{area}|-|\meta{type} exists, then it looks
+for \meta{area}, then for \meta{type}, and finally, if none of them
+exists, for an instance with the name |default|. So at least the latter
+instance has to be declared by the class.
+\begin{verbatim}
+ \DeclareInstance{buildfloat}{default}
+ {centeredbelow}{}
+ \DeclareInstance{buildfloat}{table}
+ {centeredabove}{}
+ \DeclareInstance{buildfloat}{t31}
+ {bottomright}{}
+ \DeclareInstance{buildfloat}{t22}
+ {bottomright}{}
+\end{verbatim}
+The example declaration above defines the placement of captions above
+tables and below for all other types, with the exception of the areas |t31|
+and |t22| where the captions are set to the side.
+
+
+\section[Performance of the algorithm]
+ {Performance of the\\algorithm}
+
+To test the performance of the algorithm we prepared a somewhat
+ridiculous test file containing three types of floats (``figures'',
+``tables'', and ``algorithms'') with a total number of 47 floats.
+The chosen
+layout had 3 columns and 11 potential float areas. Figure captions
+have been placed below the float while with tables and algorithms the
+caption was placed on top. The exception was the top areas adjacent to
+the outer margin: floats placed there got their captions placed to
+the right and partly into the margin. Footnotes were collected for all
+columns and placed in the outer margin.
+
+Floats had to strictly follow their call-out and a maximum of
+ten floats was allowed per page, i.e., roughly three per column.
+
+Since the document contained many floats early on (24 on page one) and
+the first of these was especially constructed to be not placeable the
+first time around, the algorithm had to work hard to place all the
+dangling floats. Table~\vref{tab:stats}
+%
+\begin{table}
+\footnotesize
+\begin{minipage}{\columnwidth}
+\begin{verbatim}
+ STATS: floats waiting = 24 on page 1
+ STATS: trials = 286
+ STATS: floats waiting = 19 on page 2 (float page)
+ STATS: trials = 159
+ STATS: floats waiting = 37 on page 2
+ STATS: trials = 397
+ STATS: floats waiting = 19 on page 3 (float page)
+ STATS: trials = 166
+ STATS: floats waiting = 7 on page 4 (float page)
+ STATS: trials = 41
+ STATS: floats waiting = 20 on page 4
+ STATS: trials = 204
+ STATS: floats waiting = 5 on page 5 (float page)
+ STATS: trials = 27
+ STATS: floats waiting = 12 on page 5
+ STATS: trials = 108
+ STATS: floats waiting = 0 on page 6 (float page)
+ STATS: trials = 0
+ STATS: floats waiting = 6 on page 6
+ STATS: trials = 57
+ ...
+ STATS: floats waiting = 6 on page 12 (float page)
+ STATS: trials = 26
+ STATS: floats waiting = 6 on page 12
+ STATS: trials = 37
+ STATS: floats waiting = 0 on page 13
+ STATS: trials = 0
+\end{verbatim}
+\end{minipage}
+\caption{Statistics from the algorithm}\label{tab:stats}
+\end{table}
+%
+shows some statistics as produced by the algorithm on the number of
+trials necessary (the highest number was $397$ for $37$ floats; by
+comparison, equation~(\ref{eq:binom})~\vpageref{eq:binom} would give
+$22595200368$ which would probably take a bit longer to
+evaluate). Note that on the third page the algorithm was able to
+produce a float page, on all other pages the float page trial was
+unsuccessful.
+
+Table~\vref{tab:runs} shows the running times
+%
+\begin{table}
+\footnotesize
+\begin{tabular}{rrr}
+ & \llap{P\textsc{iii}} (650MHz) & 486DX4 (75MHz)\\[6pt]
+&\multicolumn2{c}{no tracing} \\[4pt]
+real & 0m1.533s & 0m27.633s \\
+user & 0m1.460s & 0m26.940s \\
+sys & 0m0.050s & 0m0.690s \\[6pt]
+&\multicolumn2{c}{progress information} \\[4pt]
+real & 0m3.116s & 0m36.885s \\
+user & 0m1.740s & 0m34.470s \\
+sys & 0m0.080s & 0m2.420s \\[6pt]
+&\multicolumn2{c}{full tracing} \\[4pt]
+real & 0m7.833s & 1m22.480s \\
+user & 0m2.720s & 1m7.890s \\
+sys & 0m0.280s & 0m12.360s \\
+\end{tabular}
+\caption{Running times of the algorithm}\label{tab:runs}
+\end{table}
+%
+needed to produce the final document of 13 pages when the algorithm is
+used with different tracing settings. The test machines were a Pentium
+\textsc{iii}
+650 machine and an older laptop with a 486 processor. In both cases
+\TeX{} was run straight from a \TeX{} Live~4 CD.
+
+These times show that the algorithm has an acceptable time performance
+since even on a 486 the average time to produce a page is roughly 2
+seconds.
+
+
+
+\section{Outlook}
+
+While the current algorithm performs well there are several areas in
+which its functionality could and probably should be extended. The most
+important points are given in the following list.
+\begin{itemize}
+\item
+ Balancing of partial pages, comparable to the way the
+ \texttt{multicol} package works, should be implemented to allow for
+ layouts where, for example, a heading should span across all
+ columns.
+\item
+ We intend to provide more control over the marginal areas, allowing
+ for marginal floats as well as other objects in the margin, properly
+ interacting with each other.
+\item
+ Without much effort the algorithm could be extended to properly
+ support double-spreads so this should be added some time soon.
+\item
+ Once the algorithm has decided which floats to place onto a page one
+ could add a post-processing step in which the placement could be
+ reconsidered according to different rules. For example, if the
+ call-out relation is |page| then floats will tend to be placed in the
+ left-hand columns. This is fine as long as there are many floats to
+ process but on a page with only a few floats one might want to
+ redistribute them differently once it is clear which floats could go
+ onto the page.
+\item
+ Since it is known beforehand how many floats are actively waiting to
+ be placed, one could use a different algorithm that tries all
+ possible combinations as long as there are only a limited number of
+ floats to be placed. The boundary at which the algorithm changes
+ behavior could be made customizable so that people with faster
+ machines (or more patience) could have the search for optimum running
+ for as many floats as they like.
+\end{itemize}
+
+
+
+
+\bibliographystyle{plain}
+\bibliography{string,book,tub99}
+
+\vfill
+
+\end{document}
+
+
+% $Log: xo-pfloat.tex,v $
+% Revision 1.19 2000/08/11 07:08:04 latex3
+% small updates
+%
+% Revision 1.18 2000/08/04 15:39:04 latex3
+% added documentation on grid layout
+%
+% Revision 1.17 2000/07/22 06:29:55 latex3
+% documentation float class sequence
+% documentation float type options
+% documentation new page setup options
+%
+% Revision 1.16 2000/07/02 19:33:15 latex3
+% as send off to TUG 2000
+%
+% Revision 1.15 2000/06/29 17:13:56 latex3
+% corrections by David
+%
+% Revision 1.14 2000/06/22 20:41:58 latex3
+% made formatting possibilities interactive
+%
+% Revision 1.13 2000/06/16 10:10:30 latex3
+% added handling of spanning floats / call-out constraints
+%
+% Revision 1.12 2000/06/15 15:19:03 latex3
+% documented new syntax for area names
+%
+% Revision 1.11 2000/06/15 09:16:51 latex3
+% added documentation on fuzzy flushing
+%
+% Revision 1.10 2000/06/08 15:32:37 latex3
+% fixing typo in the math display
+%
+% Revision 1.9 2000/05/19 08:23:11 latex3
+% incorporated Barbara's and Phil's copy-editing suggestions
+%
+% Revision 1.8 2000/05/09 19:02:42 latex3
+% not integrated BB's edits yet
+%
+% Revision 1.7 2000/05/09 13:35:01 latex3
+% next version to BB
+%
+% Revision 1.6 2000/05/08 20:41:57 latex3
+% my additions before folding in Barbara's edits
+%
+% Revision 1.5 2000/05/08 15:33:25 latex3
+% as send to Barbara
+%
+% Revision 1.4 2000/05/08 11:22:37 latex3
+% *** empty log message ***
+%
+% Revision 1.3 2000/05/04 08:53:37 latex3
+% update title
+%
+% Revision 1.2 2000/05/04 08:51:12 latex3
+% first draft as send to David and Chris
+%
diff --git a/Master/texmf-dist/doc/latex3/xor/xo-sample.tex b/Master/texmf-dist/doc/latex3/xor/xo-sample.tex
new file mode 100644
index 00000000000..557522959e0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xor/xo-sample.tex
@@ -0,0 +1,578 @@
+\documentclass{article}
+
+
+
+\usepackage{xoutput}
+\usepackage{xo-grid}
+
+\usepackage{graphicx}
+\usepackage{trace}
+
+%\showoutput
+%\tracingpages=1
+%\tracingonline=1
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% PLAY AROUND WITH MANUAL FLOAT CONTROL
+%
+% \savefloatplacements writes the file \jobname.fpl
+% \readfloatplacements reads in \jobname.fpc
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%\savefloatplacements
+%\readfloatplacements
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DECLARING FLOAT TYPES
+%
+% \DeclareFloatSequenceClass currently needed for each name used in
+% the sequence-class-id key (will vanish)
+%
+% \DeclareFloatType defines type
+%
+% Example below is a bit strange: all floats are in one
+% sequence class and share the same numbering but go in different tocs
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareFloatSequenceClass{figure}
+\DeclareFloatSequenceClass{tabalg} % tables and algorithms
+
+\DeclareFloatType{figure}
+ {
+ sequence-class-id = figure,
+ toc-extension = lof,
+ caption-text = \figurename,
+ numbered-boolean = true,
+ numbered-id = figure,
+ numbered-within-id = section,
+ numbered-action = \thesection.\arabic{figure},
+ body-decls = \footnotesize,
+ }
+
+\DeclareFloatType{table}
+ {
+ sequence-class-id = tabalg,
+ toc-extension = lot,
+ caption-text = \tablename,
+ numbered-boolean = true,
+ numbered-id = table,
+ numbered-within-id = section,
+ numbered-action = \thesection.\arabic{table},
+ body-decls = \footnotesize,
+ }
+
+\DeclareFloatType{algorithms}
+ {
+ sequence-class-id = tabalg,
+ toc-extension = lot,
+ caption-text = Algorithm,
+ numbered-boolean = true,
+ numbered-id = table,
+ body-decls = \footnotesize,
+ }
+
+\makeatletter
+\newcommand*\l@algorithms{\@dottedtocline{1}{1.5em}{2.3em}}
+\makeatother
+
+\renewcommand\listtablename{List of Tables and Algorithms}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DECLARING FLOAT AREAS
+%
+% \DeclareFloatArea defines a float area (which can be referenced in
+% pagesetup2 instances below)
+%
+% Ensure that partial overlapping areas close each other!
+%
+% The example is for three columns.
+%
+% Actually, don't try to use additional float areas unless you update
+% the currently hardwired \top@areas and \bot@areas lists (in xo-new)
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% spanning all three columns
+
+\DeclareFloatArea {t13}
+ {
+ class-close-list = ,
+ all-close-list = {b13}, % don't want top and bottom floats
+ max-float-num = 2,
+ }
+
+\DeclareFloatArea {b13}
+ {
+ class-close-list = {t13,t12,t11,b11},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+% spanning two columns
+
+
+\DeclareFloatArea{t12}
+ {
+ class-close-list = ,
+ all-close-list = {t22}, % this is a must! partial span
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea{t22}
+ {
+ class-close-list = {t11,b11}, % b12 still open
+ all-close-list = {t12},
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea{b12}
+ {
+ class-close-list = {t11,b11},
+ all-close-list = {},
+ max-float-num = 1,
+ }
+
+% this strange design doesn't have b22
+
+
+% single columns
+
+\DeclareFloatArea {t11}
+ {
+ class-close-list = ,
+ all-close-list = ,
+ max-float-num = 2,
+ }
+
+
+\DeclareFloatArea {b11}
+ {
+ class-close-list = {t11},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {t21}
+ {
+ class-close-list = {t11,b11},
+ all-close-list = {t22}, % don't ask me why just to make a
+ % change :-)
+ max-float-num = 2,
+ }
+
+
+\DeclareFloatArea {b21}
+ {
+ class-close-list = {t11,b11,t21},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+\DeclareFloatArea {t31}
+ {
+ class-close-list = {t11,b11,t21,b21},
+ all-close-list = {t22}, % we don't like this one
+ max-float-num = 2,
+ }
+
+
+\DeclareFloatArea {b31}
+ {
+ class-close-list = {t11,b11,t21,b21,t31,t22},
+ all-close-list = ,
+ max-float-num = 1,
+ }
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DECLARING CAPTION ATTACHMENTS
+%
+% The buildfloat templates aren't yet real templates, i.e., nearly
+% everything is fixed with them. The only key they offer is the
+% distance between float body and caption.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareInstance{buildfloat}{default}{centeredabove}
+ {
+ body-caption-sep = 10pt,
+ }
+
+\DeclareInstance{buildfloat}{figure}{centeredbelow}
+ {
+ body-caption-sep = 10pt,
+ }
+
+% with bottomright the body-caption-sep key is the horizontal
+% separation
+
+\DeclareInstance{buildfloat}{t31}{bottomright}
+ {
+ body-caption-sep = 24pt,
+ }
+\DeclareInstance{buildfloat}{t22}{bottomright}
+ {
+ body-caption-sep = 24pt,
+ }
+\DeclareInstance{buildfloat}{t13}{bottomright}
+ {
+ body-caption-sep = 24pt,
+ }
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DECLARING FOOTNOTE HANDLING
+%
+% The situation with footnotesetup is even worse, there are no usable
+% keys yet. But three different ``pseudo'' templates: std, ftnright,
+% and margin.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\DeclareInstance{footnotesetup}{mainmatterstyle}{margin}{}
+%\DeclareInstance{footnotesetup}{mainmatterstyle}{std}{}
+%\DeclareInstance{footnotesetup}{mainmatterstyle}{ftnright}{}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DECLARING PAGE LAYOUT
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\raggedbottom
+
+\setlength\topskip{12pt} % for grid layout make this = \baselineskip
+ % there is some bug which will otherwise show up
+
+
+\ShowGridtrue % show the grid
+\ShowGridfalse
+
+\DeclareInstance{pagesetup2}{normal}{std}{
+%%%%%%%%%%%%%%%%%%%%%%
+% setting up columns:
+%
+ column-num = 3,
+ column-width = 156pt,
+ column-sep = 25pt,
+ column-height = 552pt,
+%%%%%%%%%%%%%%%%%%%%%%
+% constraining the float placement:
+%
+ float-callout-constraint = after,
+ bottom-float-footnote-constraint = forbidden,
+ flush-float-callout-constraint = column,
+ max-float-num =10,
+%%%%%%%%%%%%%%%%%%%%%%
+% list should pick from the above:
+%
+ area-list = {t13,t12,t22,t11,b12,b11,t21,b21,t31,b31},
+%%%%%%%%%%%%%%%%%%%%%%
+% footnote placement:
+%
+ footnote-setup = mainmatterstyle,
+%
+% or inline:
+%
+% footnote-setup = \UseTemplate{footnotesetup}{std}{},
+%
+%%%%%%%%%%%%%%%%%%%%%%
+% float area placement:
+%
+ float-float-sep = 15pt,
+ float-text-sep = 30pt minus 8pt,
+ float-area-sep = 15pt,
+ float-inline-sep = 6pt minus 2pt,
+%%%%%%%%%%%%%%%%%%%%%%
+% grid points?
+ grid-point-sep = 12pt,
+ }
+
+
+
+
+
+
+\DeclareInstance{pagesetup2}{frontmatter}{std}{
+%%%%%%%%%%%%%%%%%%%%%%
+% setting up columns:
+%
+ column-num = 2,
+ column-width = 237.5pt,
+ column-sep = 25pt,
+ column-height = 552pt + 12pt,
+%%%%%%%%%%%%%%%%%%%%%%
+% constraining the float placement:
+%
+ float-callout-constraint = after,
+ bottom-float-footnote-constraint = forbidden,
+ max-float-num =0,
+%%%%%%%%%%%%%%%%%%%%%%
+% list should pick from the above:
+%
+ area-list = {},
+%%%%%%%%%%%%%%%%%%%%%%
+% footnote placement:
+%
+ footnote-setup = mainmatterstyle,
+%%%%%%%%%%%%%%%%%%%%%%
+% float area placement:
+%
+ float-float-sep = 15pt,
+ float-text-sep = 30pt minus 8pt,
+ float-area-sep = 15pt,
+ float-inline-sep = 6pt minus 2pt,
+%%%%%%%%%%%%%%%%%%%%%%
+% grid points?
+ grid-point-sep = 12pt,
+ }
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Stuff for producing test pages
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\newcount\bc
+
+\newcommand\startpar{\par\global\advance\bc1 [\the\bc] }
+
+
+\newcommand\dofigure[1]{\startpar
+ callout (#1) to a figure.
+ \aa\footnote{A footnote near callout #1.}
+ \par
+ \begin{figure}
+ \ifcase\value{figure}\relax
+ \or
+ \includegraphics[angle=180,width=.7\columnwidth]{rahtz18.eps}
+ \or
+ \includegraphics[angle=90,width=.7\columnwidth]{rahtz18.eps}
+ \or
+ \includegraphics[angle=180,totalheight=4\baselineskip]{escher.eps}
+ \or
+ \includegraphics
+ [width=.9\columnwidth]{rahtz18.eps}
+ \else
+ \ifodd\value{figure}\relax
+ \includegraphics[totalheight=4\baselineskip]{escher.eps}
+ \else
+ \includegraphics[angle=180,totalheight=4\baselineskip]{escher.eps}
+ \fi
+ \fi
+ \caption{Belongs to callout (#1)}\label{mylab:fig#1}
+ \end{figure}
+ }
+
+\newcommand\dospanfigure[3]{%
+ \startpar
+ callout (#3) to a figure.
+ \aa\footnote{A footnote near callout #3.}
+ \par
+ \def\SPANCNT{#1}
+ \begin{figure}[#2]
+ \ifodd\value{figure}\relax
+ \ifodd\value{page}\relax
+ \includegraphics[width=#1\columnwidth]{outline.eps}
+ \else
+ \ifnum #1=3\relax
+ \includegraphics
+ [totalheight=4\baselineskip,width=2.5\columnwidth]{rahtz18.eps}
+ \else
+ \includegraphics
+ [totalheight=4\baselineskip,width=1.5\columnwidth]{rahtz18.eps}
+ \fi
+ \fi
+ \else
+ \ifodd\value{page}\relax
+ \includegraphics[width=1.3\columnwidth]{cat.eps}
+ \else
+ \includegraphics[width=#1\columnwidth]{outline2.eps}
+ \fi
+ \fi
+ \caption{Belongs to callout (#3)}\label{mylab:fig#3}
+ \end{figure}\par
+ \def\SPANCNT{}
+ }
+
+\newcommand\doalg[1]{\startpar
+ callout (#1) to an algorithm.%
+ \begin{algorithms}
+ \caption{Belongs to (#1)}
+ \ifnum #1<20\relax
+ \includegraphics[totalheight=#1\baselineskip]{cat.eps}
+ \else
+ \includegraphics[totalheight=20\baselineskip]{cat.eps}
+ \fi
+ \end{algorithms}\par}
+
+
+\newcommand\dotable[1]{\par
+ \par
+ \global\advance\bc1 [\the\bc] callout (#1) to a table.
+ \aa
+ \par
+\begin{table}
+\caption{Belongs to callout (#1)}\label{mylab:tab#1}
+\includegraphics[width=\columnwidth]{europe.eps}
+\end{table}
+ }
+
+\newcommand\bb{\startpar \aa\aa\aa \par}
+
+\newcommand\sample{%
+ Infandum, re\-gi\-na, iu\-b\-es re\-no\-va\-re do\-lo\-rem,
+ Troi\-a\-n\-as ut op\-es et
+ la\-men\-ta\-bile re\-g\-num cru\-e\-rint Da\-nai;
+ qua\-e\-que ip\-se mis\-er\-ri\-ma vi\-di, et
+ qu\-o\-rum pa\-rs ma\-g\-na fui.}
+
+\newcommand\smallsample{%
+ Infandum, re\-gi\-na, iubes renovare do\-lo\-rem, Troi\-a\-n\-as ut opes et
+ la\-men\-ta\-bile regnum cru\-e\-rint Da\-nai; qua\-e\-que \ldots}
+
+\renewcommand\aa{\space\sample}
+
+
+\begin{document}
+
+\UseInstance{pagesetup2}{frontmatter}
+
+
+\listoffigures
+\columnbreak
+
+\listoftables
+
+\vfil
+
+Note the strange ordering above due to the way the areas are visually
+ordered---sorting isn't yet implemented.
+
+\UseInstance{pagesetup2}{normal}
+
+%
+
+
+\section{First section}
+
+
+\begin{figure}[t21]
+ \frame{\parbox{\columnwidth}{
+ figure forced into t21
+ figure forced into t21
+ }}
+ \caption{A special one}
+\end{figure}
+
+
+\dofigure2
+\dofigure3
+\dospanfigure{3}{t13}{4}
+\dofigure5
+\dofigure6
+\dospanfigure{3}{t13}{7}
+\dofigure8
+\dofigure9
+\doalg{10}
+\doalg{11}
+\doalg{12}
+\doalg{13}
+\doalg{14}
+\doalg{15}
+\doalg{16}
+\doalg{17}
+\doalg{18}
+\dofigure{19}
+\dofigure{20}
+\dospanfigure{2}{b12}{21}
+\dofigure{22}
+\dofigure{23}
+\dofigure{24}
+\dofigure{25}
+
+\flushfloats % this could be part of \section setup one day
+\section{Another section}
+
+\dofigure{26}
+\dofigure{27}
+\dofigure{28}
+\dofigure{29}
+\dofigure{30}
+\dofigure{31}
+
+\bb
+\bb
+
+\dotable{32}
+\dotable{33}
+\dotable{34}
+
+\dofigure{35}
+\dofigure{36}
+
+\bb\bb
+
+\bb
+
+\dospanfigure{2}{t22}{37}
+\dospanfigure{2}{b12}{38}
+\dospanfigure{2}{t12}{39}
+\dotable{40}
+\dofigure{41}
+
+\bb
+\bb
+\dofigure{42}
+\dospanfigure{2}{t12}{43}
+
+\bb
+
+
+\bb
+\bb
+
+\bb
+\bb
+\bb
+
+
+
+\dospanfigure{2}{t32}{44} %AREA DOES NOT EXIST!
+\dofigure{45}
+
+
+\bb\bb\bb\bb
+
+\dotable{46}
+
+\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb
+
+\doalg{47}
+\bb\bb\bb\bb\bb\bb\bb\bb\bb
+\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb\bb
+
+THE END % just to make sure we don't lose text
+
+
+
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex3/xparse/xparse-test.tex b/Master/texmf-dist/doc/latex3/xparse/xparse-test.tex
new file mode 100644
index 00000000000..96fd7f4c48a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xparse/xparse-test.tex
@@ -0,0 +1,230 @@
+% xparse-test.tex
+
+\RequirePackage{xparse}
+
+\typeout{Testing the complicated makebox setup}
+\typeout{*****************************}
+\typeout{* look at dvi output for this part}
+\typeout{*****************************}
+
+\IgnoreWhiteSpace
+
+\DeclareDocumentCommand \makebox { C{\NoValue} o O{c} m}
+ {
+ \IfNoValueTF{#1}
+ { \ltx@maketextbox{#2}{#3}{#4}\mbox }
+ { \ltx@makepicbox #1 {#2}{#4}\@firstofone }
+ }
+
+\DeclareDocumentCommand \framebox { C{\NoValue} o O{c} m}
+ {
+ \IfNoValueTF{#1}
+ { \ltx@maketextbox{#2}{#3}{#4}\fbox }
+ { \ltx@makepicbox #1 {#2}{#4}\frame }
+ }
+
+\def\ltx@maketextbox#1#2#3#4
+ {
+ \IfNoValueTF{#1}
+ {#4{#3}}
+ {
+ \leavevmode
+ \@begin@tempboxa\hbox{#3}
+ \setlength\@tempdima{#1}
+ \ifx#4\fbox
+ \setbox\@tempboxa\hb@xt@\@tempdima
+ {\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}
+ \@frameb@x{\kern-\fboxrule}
+ \else
+ \hb@xt@\@tempdima{\csname bm@#2\endcsname}
+ \fi
+ \@end@tempboxa
+ }
+ }
+
+\def\ltx@makepicbox#1#2#3#4#5
+ {
+ #5{
+ \vbox to#2\unitlength
+ {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
+ \let\mb@t\vss
+ \IfNoValueF{#3}
+ {
+ \@tfor\reserved@a :=#3\do{
+ \if s\reserved@a
+ \let\mb@l\relax\let\mb@r\relax
+ \else
+ \expandafter\let\csname mb@\reserved@a\endcsname\relax
+ \fi}%
+ }
+ \mb@t
+ \hb@xt@ #1\unitlength{\mb@l #4\mb@r}
+ \mb@b
+ \kern\z@}
+ }
+ }
+
+\documentclass{minimal}
+
+\begin{document}
+
+\thicklines
+
+\makebox{A}
+\makebox(1,2){B}
+\makebox(0,0)[lt]{C}
+\makebox[20pt]{D}
+\makebox[30pt][r]{E}
+
+\vspace{1cm}
+
+\framebox{A}
+\framebox(1,2){B}
+\framebox(0,0)[lt]{C}
+\framebox[20pt]{D}
+\framebox[30pt][r]{E}
+
+
+\typeout{Testing optional coordinates}
+
+\DeclareDocumentCommand \foo { m C{{0}{0}} m }
+{ \typeout{1:#1}
+ \typeout{2:#2}
+ \typeout{3:#3}
+}
+
+\show\foo
+
+\foo A (1,2) B
+
+\foo A B
+
+\typeout{Testing mandatory coordinates (gives error on second examples)}
+
+\DeclareDocumentCommand \foo { m c m }
+{ \typeout{1:#1}
+ \typeout{2:#2}
+ \typeout{3:#3}
+}
+
+\show\foo
+
+\foo A (1,2) B
+
+\foo A B
+
+\typeout{Testing normal optional arguments}
+
+
+\DeclareDocumentCommand \foo { mmmm o mm o }
+{ \typeout{1:#1}
+ \typeout{2:#2}
+ \typeout{3:#3}
+ \typeout{4:#4}
+ \typeout{5:#5}
+ \typeout{6:#6}
+ \typeout{7:#7}
+ \typeout{8:#8}
+}
+
+\foo 1234[5]67[8]
+\foo 123467
+
+\show\foo
+\expandafter\show\csname\string\foo\endcsname
+
+
+\typeout{Testing optional arguments with default}
+
+\DeclareDocumentCommand \baz { O{?}mmm o mm m }
+{ \typeout{1:#1}
+ \typeout{2:#2}
+ \typeout{3:#3}
+ \typeout{4:#4}
+ \typeout{5:#5}
+ \typeout{6:#6}
+ \typeout{7:#7}
+ \typeout{8:#8}
+}
+
+\show\baz
+\expandafter\show\csname\string\baz\endcsname
+
+\baz [1]234[5]678
+\makeatletter\showthe\toks@
+\baz 234678
+\makeatletter\showthe\toks@
+
+%\tracingall\tracingassigns=1
+\DeclareDocumentCommand \bar { mmmm mmmm m}
+{ \typeout{1:#1}
+ \typeout{2:#2}
+ \typeout{3:#3}
+ \typeout{4:#4}
+ \typeout{5:#5}
+ \typeout{6:#6}
+ \typeout{7:#7}
+ \typeout{8:#8}
+ \typeout{9:#9}
+}
+
+\show\bar
+\expandafter\show\csname\string\bar\endcsname
+
+\bar 123456789
+\makeatletter\showthe\toks@
+
+\DeclareDocumentCommand\chapter{soom}
+{\typeout{a{#1}^^Jb{#2}^^Jc{#3}^^Jd{#4}^^Je}}
+
+\show\chapter
+\expandafter\show\csname\string\chapter\endcsname
+
+\typeout{1:}
+\chapter*[xxx][yyy]{zzz}
+
+\typeout{2:}
+\chapter[xxx][yyy]{zzz}
+
+\typeout{3:}
+\chapter*[xxx]{zzz}
+
+\typeout{4:}
+\typeout{\chapter*[xxx][yyy]{zzz}}
+
+
+\typeout{Testing environments with args passed to end env}
+\typeout{****************}
+\typeout{* This works only if xparse is compiled with `perhaps'
+ docstrip guard}
+\typeout{* This part of the code is not activated by default!}
+\typeout{****************}
+
+
+
+\DeclareDocumentCommand\chapter{soom}
+{\typeout{a{#1}^^Jb{#2}^^Jc{#3}^^Jd{#4}^^Je}}
+
+\DeclareDocumentEnvironment{hello}{ooo}
+ {\typeout{B1(#1)^^JB2(#2)^^JB3(#3)^^J}}
+ {\typeout{E1(#1)^^JE2(#2)^^JE3(#3)^^J}}
+
+
+\show\hello
+\expandafter\show\csname\string\hello\endcsname
+
+\show\endhello
+\expandafter\show\csname end\string\\hello\endcsname
+
+\begin{hello}[abc][aabbcc]
+\typeout{body}
+\typeout{5:}
+\chapter[xxx][yyy]{zzz}
+\end{hello}
+
+\begin{hello}[1]
+\typeout{outer body}
+\hello [2] \typeout{inner body} \endhello
+\end{hello}
+
+\stop
diff --git a/Master/texmf-dist/doc/latex3/xtheorem/readme.txt b/Master/texmf-dist/doc/latex3/xtheorem/readme.txt
new file mode 100644
index 00000000000..723f9df72af
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xtheorem/readme.txt
@@ -0,0 +1,40 @@
+Module xtheorem
+===============
+
+
+Purpose:
+--------
+
+This is a prototype reimplementation of the AMS-LaTeX theorem
+environments by Achim Blumensath.
+
+
+To produce the documentation run:
+---------------------------------
+
+ latex xtheorem.dtx
+
+
+To produce the package file xtheorem.sty run:
+---------------------------------------------
+
+ latex xtheorem.ins
+
+
+To run the test file do:
+------------------------
+
+ latex xtheorem-test
+
+You need the packages
+
+ template.sty (module template)
+ xparse.sty (module xparse)
+ ldcsetup.sty (module xparse)
+
+to run the example file.
+
+
+
+Enjoy
+Frank Mittelbach 2000/01/02
diff --git a/Master/texmf-dist/doc/latex3/xtheorem/xtheorem-test.tex b/Master/texmf-dist/doc/latex3/xtheorem/xtheorem-test.tex
new file mode 100644
index 00000000000..df97778dd7b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex3/xtheorem/xtheorem-test.tex
@@ -0,0 +1,58 @@
+\documentclass{article}
+
+\usepackage{xtheorem}
+
+\DeclareInstance{theoremstyle}{example}{std}
+{
+ pre-skip = 1cm,
+ post-skip = 1cm,
+ body-style = \ttfamily,
+ head-style = \sffamily,
+ post-head-action = \newline,
+}
+
+
+\newtheorem{plain}{Thm}{Theorem}[section]
+\newtheorem{plain}{Prop}[Thm]{Proposition}
+\newtheorem{plain}{Lem}[Thm]{Lemma}
+\newtheorem{plain}{Cor}[Thm]{Corollary}
+\newtheorem{definition}{Def}[Thm]{Definition}
+\newtheorem*{remark}{Rem}{Remark}
+\newtheorem*{example}{Exam}{Example}
+
+\begin{document}
+
+\section{First Section}
+
+\begin{Def}
+\emph{My package} is the \textsf{xtheorem} package.
+\end{Def}
+\begin{Thm}
+My package works as advertised.
+\end{Thm}
+\begin{Cor}[Achim]
+It can be used.
+\end{Cor}
+\begin{Rem}
+This is good.
+\end{Rem}
+
+\section{Second Section}
+
+\begin{Def}
+\emph{My package} is the \textsf{xtheorem} package.
+\end{Def}
+\begin{Thm}
+My package works as advertised.
+\end{Thm}
+\begin{Cor}[Achim]
+It can be used.
+\end{Cor}
+\begin{Exam}[Frank]
+An this shows a new style.
+\end{Exam}
+\begin{Rem}
+This is good.
+\end{Rem}
+
+\stop
diff --git a/Master/texmf-dist/doc/metapost/base/Makefile b/Master/texmf-dist/doc/metapost/base/Makefile
new file mode 100644
index 00000000000..18eff80e6b2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/Makefile
@@ -0,0 +1,125 @@
+# Makefile for texmf/doc/metapost:
+# ================================
+
+MP = mp
+
+#DVIPS = dvips -Pold
+DVIPS = dvips -Pold -D300
+
+LATEX = latex
+BIBTEX = bibtex
+
+TROFF = troff -Tpost -ms -mpictures | dpost
+GROFF = groff -Tps -mgs
+
+###
+
+MPMAN_FIGS = \
+ manfig.0 manfig.2 manfig.3 manfig.104 manfig.204 manfig.5 \
+ manfig.6 manfig.7 manfig.8 manfig.109 manfig.209 manfig.110 \
+ manfig.210 manfig.310 manfig.111 manfig.211 manfig.311 manfig.411 \
+ manfig.13 manfig.14 manfig.17 manfig.18 manfig.19 manfig.20 \
+ manfig.21 manfig.22 manfig.123 manfig.223 manfig.24 manfig.25 \
+ manfig.26 manfig.28 manfig.29 manfig.30 manfig.31 manfig.32 \
+ manfig.33 manfig.34 manfig.35 manfig.36 manfig.37 manfig.38 \
+ manfig.40 manfig.42 manfig.45 manfig.48 manfig.49 manfig.50 \
+ manfig.51 manfig.52
+
+MPGRAPH_FIGS = \
+ mpgraph.1 mpgraph.2 mpgraph.3 mpgraph.4 mpgraph.5 mpgraph.6 \
+ mpgraph.7 mpgraph.8 mpgraph.9 mpgraph.10 mpgraph.11
+MPGRPAH_DATA = \
+ agepop91.d agepopm.d countries.d energy.d lead.d matmul.d timepop.d
+
+EXAMPLE_FIGS = \
+ examples.1 examples.2 examples.3 examples.4 examples.5 examples.6 \
+ examples.7 examples.8 examples.9
+
+###
+
+default: all
+all: mpman.ps mpgraph.ps mpintro.ps
+
+### MetaPost manuals
+
+mpman.ps: mpman.dvi $(MPMAN_FIGS)
+ @echo "WARNING: mpman.dvi was build using the obsolete font rpsyr."
+ @echo "You can safely ignore one warning about a checksum mismatch."
+ $(DVIPS) mpman.dvi -o mpman.ps
+
+mpgraph.ps: mpgraph.dvi $(MPGRAPH_FIGS)
+ @echo "WARNING: mpgraph.dvi was build using the obsolete versions of"
+ @echo "the fonts logo10 logo8 logosl10. You can safely ignore dvips's"
+ @echo "checksum warnings for these fonts."
+ $(DVIPS) mpgraph.dvi -o mpgraph.ps
+
+$(MPMAN_FIGS): manfig.mp
+ $(MP) manfig.mp
+
+$(MPGRAPH_FIGS): mpgraph.mp $(MPGRAPH_DATA)
+ $(MP) mpgraph.mp
+
+### LaTeX example
+
+mpintro.ps: mpintro.dvi $(EXAMPLE_FIGS)
+
+mpintro.dvi: mpintro.tex mpintro.bib
+ $(LATEX) mpintro
+ $(BIBTEX) mpintro
+ $(LATEX) mpintro
+ $(LATEX) mpintro
+
+$(EXAMPLE_FIGS): examples.mp
+ $(MP) examples.mp
+
+### troff and/or groff example
+
+grdemo.ps: grdemo.ms figs.1
+ cat grdemo.ms | $(GROFF) > grdemo.ps
+
+demo.ps: demo.ms figs.1 /usr/lib/tmac/tmac.pictures
+ cat demo.ms | $(TROFF) > demo.ps
+
+figs.1: figs.mp
+ test -d /usr/lib/font/devpost || $(MAKE) /usr/lib/font/devpost
+ test -d /usr/lib/font/devpost && $(MP) -T figs.mp
+
+/usr/lib/tmac/tmac.pictures:
+ @echo
+ @echo "WARNING: You don't seem to have the troff \`mpictures' macros"
+ @echo "which are needed to typeset the \`demo.ps' example document."
+ @echo "If your troff implementation doesn't provide these macros"
+ @echo "you're out of luck, I'm afraid. Sorry, I can't help you!"
+ @echo
+ @echo "Perhaps you may want to try \`grdemo.ps' as an alternative"
+ @echo "if you have GNU groff installed on your system?"
+ @echo
+ @false
+
+/usr/lib/font/devpost:
+ @echo
+ @echo "WARNING: You don't seem to have a suitable troff implementation"
+ @echo "on your system that matches the assumptions built into the"
+ @echo "MetaPost support programs. To run MetaPost in troff mode"
+ @echo "you'll probably need a troff implementation from Bell Labs."
+ @echo "Using GNU groff as an alternative won't work, I'm afraid."
+ @echo
+ @false
+
+
+### pattern rules
+
+.dvi.ps:
+ $(DVIPS) $< -o $@
+
+### cleanup targets
+
+clean:
+ rm -f $(MPMAN_FIGS) $(MPGRAPH_FIGS) $(EXAMPLE_FIGS)
+ rm -f *.mpx *.log *.aux mpxerr*
+
+distclean: clean
+ rm -f mpman.ps mpgraph.ps mpintro.ps
+
+.PHONY: clean
+.SUFFIXES: .dvi .ps
diff --git a/Master/texmf-dist/doc/metapost/base/grdemo.pdf b/Master/texmf-dist/doc/metapost/base/grdemo.pdf
new file mode 100644
index 00000000000..2769c05b35a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/grdemo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/base/index.html b/Master/texmf-dist/doc/metapost/base/index.html
new file mode 100644
index 00000000000..3880ff99aa8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/index.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<HTML>
+<HEAD>
+<TITLE>Index of texmf/doc/metapost/</TITLE>
+<!-- Created: UV, 1996/12/27 -->
+<!-- $Id: //depot/Master/texmf-dist/doc/metapost/base/index.html#3 $ $Date: 2004/06/20 $ $Author: karl $ -->
+</HEAD>
+
+<BODY>
+<H1>Index of <CODE>texmf/doc/metapost/</CODE></H1>
+
+<HR>
+
+<P> This page provides access to documentation about the MetaPost
+system by John Hobby, including the MetaPost program and standard
+MetaPost macro packages.
+</P>
+
+<P> Additional information about the MetaPost system
+can be found on John Hobby's WWW pages at
+<A HREF="http://plan9.bell-labs.com/who/hobby/MetaPost.html">
+http://plan9.bell-labs.com/who/hobby/MetaPost.html</A>. Other links are
+available from <A HREF="http://tug.org/metapost.html">TUG's MetaPost web
+page</A>.
+</P>
+
+<H2>Index</H2>
+<DL>
+ <DT><A HREF="mpintro.pdf">
+ <CITE>The MetaPost System</CITE></A> (PDF)<BR>
+ <DD>Introduction to MetaPost, and also an example document for using
+ MetaPost with LaTeX.
+
+ <DT><A HREF="mpman.pdf">
+ <CITE>A User's Manual for MetaPost</CITE></A> (PDF)<BR>
+ <DD>AT&amp;T Bell Labs, CSTR 162, by John Hobby, 1992.<BR>
+ The primary manual for the MetaPost system, which includes
+ a description of most standard MetaPost macro packages.
+
+ <DT><A HREF="mpgraph.pdf">
+ <CITE>Drawing Graphs with MetaPost</CITE></A> (PDF)<BR>
+ <DD>AT&amp;T Bell Labs, CSTR 164, by John Hobby, 1993.<BR>
+ The manual for the MetaPost <code>graph.mp</code> package
+ and a few specialized features of the MetaPost program
+ that were added after the publication of the user manual.
+
+ <DT><A HREF="grdemo.pdf">
+ <CITE>MetaPost with groff</CITE></A> (PDF)<BR>
+ <DD>Example of using MetaPost with groff.
+
+ <DT><A HREF="source/">source</A><BR>
+ <DD>Subdirectory with all the MetaPost, TeX, and roff sources.
+
+</DL>
+<BR>
+
+
+<!-- hhmts start -->
+Last modified: $Date: 2004/06/20 $
+<!-- hhmts end -->
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/metapost/base/mpgraph.pdf b/Master/texmf-dist/doc/metapost/base/mpgraph.pdf
new file mode 100644
index 00000000000..d4b2b3df1d0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/mpgraph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/base/mpintro.pdf b/Master/texmf-dist/doc/metapost/base/mpintro.pdf
new file mode 100644
index 00000000000..b6c896c5de4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/mpintro.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/base/mpman.pdf b/Master/texmf-dist/doc/metapost/base/mpman.pdf
new file mode 100644
index 00000000000..c9546984f9e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/mpman.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/base/source/Makefile b/Master/texmf-dist/doc/metapost/base/source/Makefile
new file mode 100644
index 00000000000..ce7f3098a02
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/Makefile
@@ -0,0 +1,31 @@
+# Makefile for mpman and mpgraph.
+# (../Makefile has rules for building grdemo and mpintro.)
+#
+%.pdf: %.ps
+ ps2pdf $< || rm -f $@
+
+%.ps: %.dvi
+ dvips -t letter $< -o $@ || rm -f $@
+
+all: mpman.pdf mpgraph.pdf
+
+mpgraph.dvi: mpgraph.tex mpgraph.bib mpgraph.mp
+ mpost mpgraph
+ latex mpgraph
+ bibtex mpgraph
+ latex mpgraph
+ latex mpgraph
+
+mpman.dvi: mpman.tex mpman.bib mpman.ist manfig.mp
+ mpost manfig
+ latex mpman
+ bibtex mpman
+ latex mpman
+ latex mpman
+ makeindex -s mpman.ist mpman
+ latex mpman
+
+clean distclean:
+ rm -f manfig.[0-9]* mpgraph.[0-9]*
+ rm -f *.aux *.bbl *.blg *.dvi *.log *.mpx *.pdf *.ps
+ rm -f *.idx *.ilg *.ind *.toc
diff --git a/Master/texmf-dist/doc/metapost/base/source/README b/Master/texmf-dist/doc/metapost/base/source/README
new file mode 100644
index 00000000000..117f8773fa7
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/README
@@ -0,0 +1,32 @@
+This is the source for the documentation for MetaPost, consisting of
+"A User's Manual for MetaPost" and "Drawing Graphs with MetaPost",
+written by John D. Hobby. They were converted to more modern LaTeX by
+Dylan Thurston. The manual may be freely used and modified, but John
+Hobby makes these requests:
+
+ - I request that it remain clear that I am the author of
+ "A User's Manual for MetaPost" and "Drawing Graphs with MetaPost".
+ - I request to be consulted before significant changes are made.
+
+See the end of mpman.tex or mpgraph.tex for the precise conditions.
+
+Included files:
+
+README
+agepop91.d
+agepopm.d
+countries.d
+ctabbing.sty
+energy.d
+lead.d
+manfig.mp
+matmul.d
+mpgraph.bib
+mpgraph.mp
+mpgraph.tex
+mpman.bib
+mpman.ist
+mpman.tex
+timepop.d
+
+See the Makefile for the sequence of commands to create the DVI/PS/PDF output.
diff --git a/Master/texmf-dist/doc/metapost/base/source/agepop91.d b/Master/texmf-dist/doc/metapost/base/source/agepop91.d
new file mode 100644
index 00000000000..5dfaeb31449
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/agepop91.d
@@ -0,0 +1,85 @@
+00 4011000
+01 3969000
+02 3806000
+03 3718000
+04 3717000
+05 3702000
+06 3681000
+07 3575000
+08 3512000
+09 3767000
+10 3703000
+11 3662000
+12 3484000
+13 3414000
+14 3409000
+15 3293000
+16 3362000
+17 3360000
+18 3391000
+19 3836000
+20 4120000
+21 4009000
+22 3767000
+23 3664000
+24 3812000
+25 3866000
+26 4069000
+27 4242000
+28 4086000
+29 4580000
+30 4501000
+31 4432000
+32 4387000
+33 4387000
+34 4534000
+35 4325000
+36 4201000
+37 4132000
+38 3788000
+39 4127000
+40 3836000
+41 3721000
+42 3634000
+43 3589000
+44 3998000
+45 2834000
+46 2823000
+47 2850000
+48 2857000
+49 2737000
+50 2528000
+51 2340000
+52 2298000
+53 2280000
+54 2200000
+55 2129000
+56 2195000
+57 2068000
+58 1946000
+59 2085000
+60 2124000
+61 2100000
+62 2076000
+63 2145000
+64 2138000
+65 2072000
+66 2069000
+67 2026000
+68 1911000
+69 1960000
+70 1886000
+71 1731000
+72 1649000
+73 1518000
+74 1458000
+75 1405000
+76 1334000
+77 1244000
+78 1204000
+79 1091000
+80 970000
+81 883000
+82 799000
+83 739000
+84 644000 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/agepopm.d b/Master/texmf-dist/doc/metapost/base/source/agepopm.d
new file mode 100644
index 00000000000..85c86e1b52a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/agepopm.d
@@ -0,0 +1,85 @@
+00 4.011
+01 3.969
+02 3.806
+03 3.718
+04 3.717
+05 3.702
+06 3.681
+07 3.575
+08 3.512
+09 3.767
+10 3.703
+11 3.662
+12 3.484
+13 3.414
+14 3.409
+15 3.293
+16 3.362
+17 3.36
+18 3.391
+19 3.836
+20 4.12
+21 4.009
+22 3.767
+23 3.664
+24 3.812
+25 3.866
+26 4.069
+27 4.242
+28 4.086
+29 4.58
+30 4.501
+31 4.432
+32 4.387
+33 4.387
+34 4.534
+35 4.325
+36 4.201
+37 4.132
+38 3.788
+39 4.127
+40 3.836
+41 3.721
+42 3.634
+43 3.589
+44 3.998
+45 2.834
+46 2.823
+47 2.85
+48 2.857
+49 2.737
+50 2.528
+51 2.34
+52 2.298
+53 2.28
+54 2.2
+55 2.129
+56 2.195
+57 2.068
+58 1.946
+59 2.085
+60 2.124
+61 2.1
+62 2.076
+63 2.145
+64 2.138
+65 2.072
+66 2.069
+67 2.026
+68 1.911
+69 1.96
+70 1.886
+71 1.731
+72 1.649
+73 1.518
+74 1.458
+75 1.405
+76 1.334
+77 1.244
+78 1.204
+79 1.091
+80 0.97
+81 0.883
+82 0.799
+83 0.739
+84 0.644 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/countries.d b/Master/texmf-dist/doc/metapost/base/source/countries.d
new file mode 100644
index 00000000000..d1e43598200
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/countries.d
@@ -0,0 +1,60 @@
+20.910 75.7 US
+ 1.831 66.7 Alg
+ 1.694 70.9 Arg
+16.430 77.3 Aus
+ 0.180 53.0 Ban
+15.620 77.1 Bel
+ 3.090 65.2 Brz
+ 5.530 72.7 Bul
+ 0.404 54.9 Bur
+20.240 77.5 Can
+ 1.809 73.4 Chl
+ 0.547 70.0 Chn
+ 7.390 74.6 Tai
+ 1.139 71.0 Col
+ 7.876 72.9 Cze
+ 1.342 60.8 Egy
+ 0.120 51.3 Eth
+17.000 77.8 Fra
+17.446 75.8 Ger
+ 0.350 54.6 Gha
+ 5.286 77.7 Gre
+ 6.119 71.6 Hun
+ 0.321 57.2 Ind
+ 0.479 61.0 Inn
+ 1.440 64.5 Irn
+14.940 78.1 Ita
+22.900 79.2 Jap
+ 0.338 61.5 Ken
+ 0.205 52.6 Mad
+ 2.099 68.1 Mal
+ 2.170 72.2 Mex
+ 0.866 64.6 Mor
+ 0.078 47.4 Moz
+ 0.150 50.6 Nep
+14.980 77.8 Nth
+ 0.239 48.9 Nig
+ 1.427 69.0 NKo
+ 0.330 56.6 Pak
+ 1.903 64.3 Per
+ 0.697 64.6 Phi
+ 4.625 72.9 Pol
+ 4.323 74.7 Por
+ 4.896 71.9 Rom
+ 2.253 64.2 SAf
+ 4.920 69.7 SKo
+ 9.226 69.8 USS
+ 9.471 78.3 Spn
+ 0.409 71.1 Sri
+ 0.608 53.0 Sud
+21.900 77.8 Swe
+27.510 79.1 Swi
+ 1.608 69.4 Syr
+ 0.105 52.0 Tnz
+ 1.246 68.5 Tha
+ 1.380 69.8 Tur
+ 0.233 51.0 Uga
+14.580 76.5 UK
+ 2.158 74.2 Ven
+ 2.474 73.0 Yug
+ 0.258 53.9 Zai \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/ctabbing.sty b/Master/texmf-dist/doc/metapost/base/source/ctabbing.sty
new file mode 100644
index 00000000000..2f60af48011
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/ctabbing.sty
@@ -0,0 +1,17 @@
+
+% The ctabbing environment is a centered tabbing environment suitable for
+% displaying program fragments. The vertical spacing is exactly like that
+% for normal text in a center environment. This is achieved by setting
+% \@minipagetrue to fool \tabbing into thinking that it starts a minipage
+% and should therefore avoid all vertical space at the top. (Note that any
+% space at all would defeat the \vtop command in \ctabbing.) The
+% \vskip-\lastskip and \prevdepth saving commands avoid extra space after
+% \endtabbing
+
+\newdimen\ct@pd
+
+\def\ctabbing{\center\leavevmode\vtop\bgroup\@minipagetrue\begingroup\tabbing}
+
+\def\endctabbing{\endtabbing\endgroup\vskip-\lastskip
+ \global\ct@pd\prevdepth \egroup
+ \endcenter \global\prevdepth\ct@pd}
diff --git a/Master/texmf-dist/doc/metapost/base/source/demo.ms b/Master/texmf-dist/doc/metapost/base/source/demo.ms
new file mode 100644
index 00000000000..736c8641fbd
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/demo.ms
@@ -0,0 +1,105 @@
+.so /usr/lib/tmac/tmac.pictures
+.nr PS 11
+.nr VS 13
+.TL
+MetaPost with troff
+.LP
+Since MetaPost is a picture-drawing language that outputs PostScript, it is
+necessary to use the
+.ft CW
+-mpictures
+.ft
+macro package. Suppose you have written some figures in MetaPost and placed
+the input in a file \f(CWfigures.mp\fR.
+Running
+.nf
+.ft CW
+ mp -T figures
+.ft
+.fi
+to invoke the MetaPost interpreter produces output files
+\f(CWfigures.1\fR, \f(CWfigures.2\fR, .\|.\|.
+via macro calls such as
+.nf
+.ft CW
+ .BP figures.1 height width
+.ft
+.fi
+as explained in the
+.ft CW
+-mpictures
+.ft
+documentation. Note that the picture gets rescaled if the height and width
+in the \f(CW.BP\fR command don't match \fImp\fR's idea of the picture dimensions.
+.PP
+For instance,
+.BP figs.1 1.08i 1.5i
+this figure was derived from a file
+.ft CW
+figs.mp
+.ft
+and included at this point by invoking the \f(CW.BP\fR
+macro with height 1.08 inches and width 1.5 inches. The macro tries to run text
+around the picture, but this can be stopped
+by using the \f(CW.EP\fR macro as was done here.
+.EP
+The file
+.ft CW
+figs.mp
+.ft
+looks like this:
+.nf
+.ft CW
+.nr PS 9
+.nr VS 11
+prologues:=1;
+input boxes
+beginfig(1);
+pair shadowshift; shadowshift=(1,-1)*bp;
+
+def drawshadowed(text t) =
+ forsuffixes $=t:
+ fill bpath$ shifted shadowshift;
+ unfill bpath$;
+ drawboxed($);
+ endfor
+enddef;
+
+boxit.a(btex \\s8A\\s+2 \\(lh a etex);
+circleit.b(btex $e sup {i omega t}$ etex rotated 20);
+b.w - a.e = (10bp,0);
+drawshadowed(a,b);
+draw a.e..b.w;
+
+draw bbox currentpicture dashed evenly;
+endfig;
+.nr PS 11
+.nr VS 13
+.ft
+.fi
+.PP
+Note that the typesetting commands in the
+\f(CWbtex\fR.\|.\|.\f(CWetex\fR blocks in the above example are processed by
+.nf
+.ft CW
+ eqn -d\\$\\$ | troff;
+.ft
+.fi
+If a different \fItroff\fR pipeline is desired, it can be specified via the
+.ft CW
+TROFF
+.ft
+environment variable. For example,
+.nf
+.ft CW
+ TROFF='tbl | eqn -d\\$\\$ | troff -Tpost'
+.ft
+.fi
+adds \fItbl\fR to the pipeline.
+.PP
+Macro definitions and such can be added via the standard
+\f(CWverbatimtex\fR.\|.\|.\f(CWetex\fR mechanism that adds the given material
+to the \fItroff\fR input. Such material should not generate any output since
+this would get mixed up with the next \f(CWbtex\fR.\|.\|.\f(CWetex\fR block.
+Thus, newlines between \f(CWverbatimtex\fR and \f(CWetex\fR must be
+protected with \f(CW\\\fR.
diff --git a/Master/texmf-dist/doc/metapost/base/source/energy.d b/Master/texmf-dist/doc/metapost/base/source/energy.d
new file mode 100644
index 00000000000..5b0b25596c7
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/energy.d
@@ -0,0 +1,75 @@
+1900 7.02 0.369 0.254 0.25
+1901 7.631 0.402 0.283 0.264
+1902 7.869 0.515 0.301 0.289
+1903 9.303 0.583 0.319 0.321
+1904 9.159 0.679 0.333 0.354
+1905 10.228 0.781 0.377 0.386
+1906 10.794 0.734 0.418 0.414
+1907 12.517 0.963 0.437 0.441
+1908 10.828 1.035 0.432 0.476
+1909 12.008 1.062 0.517 0.513
+1910 13.074 1.215 0.547 0.539
+1911 12.933 1.279 0.551 0.565
+1912 13.936 1.293 0.604 0.585
+1913 14.86 1.441 0.626 0.609
+1914 13.382 1.541 0.636 0.636
+1915 13.857 1.63 0.676 0.659
+1916 15.39 1.744 0.81 0.681
+1917 16.987 1.945 0.855 0.7
+1918 17.69 2.064 0.775 0.701
+1919 14.444 2.195 0.802 0.718
+1920 17.175 2.569 0.883 0.738
+1921 13.195 2.739 0.732 0.62
+1922 12.452 3.234 0.843 0.643
+1923 17.163 4.248 1.113 0.685
+1924 14.905 4.141 1.263 0.648
+1925 15.195 4.43 1.314 0.668
+1926 17.165 4.471 1.452 0.728
+1927 15.599 5.227 1.598 0.776
+1928 15.034 5.229 1.734 0.854
+1929 15.892 5.842 2.118 0.816
+1930 14.011 5.208 2.148 0.752
+1931 11.526 4.936 1.869 0.668
+1932 9.38 4.554 1.729 0.713
+1933 9.999 5.253 1.733 0.711
+1934 10.867 5.267 1.97 0.698
+1935 11.081 5.78 2.136 0.806
+1936 12.89 6.378 2.411 0.812
+1937 12.99 7.419 2.684 0.871
+1938 10.303 7.043 2.565 0.866
+1939 11.653 7.337 2.763 0.838
+1940 13.38 7.849 2.979 0.88
+1941 14.903 8.133 3.162 0.934
+1942 16.799 8.043 3.436 1.136
+1943 17.003 8.733 3.839 1.304
+1944 17.851 9.732 4.176 1.344
+1945 16.529 9.939 4.423 1.442
+1946 15.526 10.057 4.55 1.406
+1947 17.975 10.771 5.012 1.296
+1948 17.158 11.717 5.615 1.369
+1949 12.557 10.683 5.911 1.425
+1950 14.647 11.449 6.841 1.415
+1951 15.066 13.037 8.106 1.424
+1952 13.262 13.282 8.705 1.466
+1953 12.767 13.671 9.116 1.413
+1954 11.001 13.247 9.488 1.36
+1955 12.745 14.445 10.532 1.36
+1956 13.747 15.344 11.252 1.435
+1957 13.444 15.346 11.885 1.422
+1958 11.201 14.154 12.244 1.592
+1959 11.105 14.662 13.361 1.551
+1960 11.14 14.664 14.135 1.608
+1961 10.751 15.185 14.691 1.656
+1962 11.211 15.495 15.365 1.816
+1963 12.176 15.741 16.271 1.768
+1964 12.854 15.691 17.138 1.886
+1965 13.485 15.93 17.652 2.059
+1966 13.836 16.925 18.984 2.062
+1967 14.215 18.1 20.087 2.347
+1968 13.955 18.593 21.548 2.349
+1969 14.223 18.886 22.838 2.648
+1970 15.248 19.772 24.154 2.63
+
+Cols 2-5: U.S. annual production of
+2) coal, 3) crude oil, 4) natural gas, 5) hydroelectric power
+in quadrillions of British thermal units. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/examples.mp b/Master/texmf-dist/doc/metapost/base/source/examples.mp
new file mode 100644
index 00000000000..0e2a8dc0a65
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/examples.mp
@@ -0,0 +1,247 @@
+beginfig(1);
+a=.7in; b=0.5in;
+z0=(0,0); z1=(a,0); z2=(0,b);
+z0=.5[z1,z3]=.5[z2,z4];
+draw z1..z2..z3..z4..cycle;
+drawarrow z0..z1;
+drawarrow z0..z2;
+label.top(btex $a$ etex, .5[z0,z1]);
+label.lft(btex $b$ etex, .5[z0,z2]);
+endfig;
+
+
+
+
+beginfig(2);
+
+h=2in; w=2.7in;
+path p[], q[], pp;
+for i=1.5,2,4:
+ ii := i**2;
+ p[i] = (w/ii,h){1/ii,-1}...(w/i,h/i)...(w,h/ii){1,-1/ii};
+endfor
+for i=.5,1.5:
+ q[i] = origin..(w,i*h) cutafter p1.5;
+endfor
+
+pp = buildcycle(q0.5, p2, q1.5, p4);
+
+fill pp withcolor .8white;
+z0=center pp;
+picture lab; lab=thelabel(btex $f>0$ etex, z0);
+unfill bbox lab; draw lab;
+draw q0.5; draw p2; draw q1.5; draw p4;
+makelabel.top(btex $P$ etex, p2 intersectionpoint q0.5);
+makelabel.rt(btex $Q$ etex, p2 intersectionpoint q1.5);
+endfig;
+
+
+
+
+beginfig(3);
+
+3.2scf = 2.4in;
+path fun;
+# = .1; % Keep the function single-valued
+fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}..{curl .1}(3.2,2#))
+ scaled scf yscaled(1/#);
+
+vardef vertline primary x = (x,-infinity)..(x,infinity) enddef;
+primarydef f atx x = (f intersectionpoint vertline x) enddef;
+primarydef f whenx x = xpart(f intersectiontimes vertline x) enddef;
+
+z1a = (2.5scf,0);
+z1 = fun atx x1a;
+y2a=0; z1-z2a=whatever*direction fun whenx x1 of fun;
+z2 = fun atx x2a;
+y3a=0; z2-z3a=whatever*direction fun whenx x2 of fun;
+
+draw fun withpen pencircle scaled 1pt;
+drawarrow (0,0)..(3.2scf,0);
+
+label.bot(btex $x_1$ etex, z1a);
+draw z1a..z1 dashed evenly;
+makelabel(nullpicture, z1);
+draw z1..z2a withpen pencircle scaled .3;
+label.bot(btex $x_2$ etex, z2a);
+draw z2a..z2 dashed evenly;
+makelabel(nullpicture, z2);
+draw z2..z3a withpen pencircle scaled .3;
+label.bot(btex $x_3$ etex, z3a);
+endfig;
+
+
+
+beginfig(4);
+for i=0 upto 2:
+ z[i]=(0,40i); z[i+3]-z[i]=(100,30);
+endfor
+pickup pencircle scaled 18;
+def gray = withcolor .8white enddef;
+draw z0..z3 gray;
+linecap:=butt; draw z1..z4 gray;
+linecap:=squared; draw z2..z5 gray;
+labels.top(0,1,2,3,4,5);
+endfig; linecap:=rounded;
+
+
+
+beginfig(5);
+for i=0 upto 2:
+ z[i]=(0,50i); z[i+3]-z[i]=(60,40);
+ z[i+6]-z[i]=(120,0);
+endfor
+pickup pencircle scaled 24;
+def gray = withcolor .8white enddef;
+draw z0--z3--z6 gray;
+linejoin:=mitered; draw z1..z4--z7 gray;
+linejoin:=beveled; draw z2..z5--z8 gray;
+labels.bot(0,1,2,3,4,5,6,7,8);
+endfig; linejoin:=rounded;
+
+
+
+input boxes
+
+
+\beginfig(6);
+fill unitsquare xscaled 1.1in yscaled .7in withcolor .9white;
+boxit(currentpicture);
+dx = dy = .25in;
+clearit; drawboxed();
+forsuffixes $=n,c: makelabel.top(str $, $); endfor
+makelabel.bot("s",s);
+forsuffixes $=ne,e,se: makelabel.rt(str $, $); endfor
+forsuffixes $=nw,w,sw: makelabel.lft(str $, $); endfor
+pickup pencircle scaled .3bp;
+vardef larrow@#(expr a, da, s) =
+ drawdblarrow a..a+da; label@#(s,a+.5da); enddef;
+larrow.rt(n, (0,-dy), "dy");
+larrow.rt(s, (0,dy), "dy");
+larrow.top(e, (-dx,0), "dx");
+larrow.top(w, (dx,0), "dx");
+endfig;
+
+
+
+beginfig(7);
+boxjoin(a.se=b.sw; a.ne=b.nw );
+boxit.a(btex $\cdots$ etex);
+boxit.ni(btex $n_i$ etex);
+boxit.di(btex $d_i$ etex);
+boxit.nii(btex $n_{i+1}$ etex);
+boxit.dii(btex $d_{i+1}$ etex);
+boxit.aa(pic_.a);
+boxit.nk(btex $n_k$ etex);
+boxit.dk(btex $d_k$ etex);
+
+di.dy = 2;
+drawboxed(a,ni,di,nii,dii,aa,nk,dk);
+label.lft("ndtable:", a.w);
+
+boxjoin(a.sw=b.nw; a.se=b.ne);
+interim defaultdy:=7;
+boxit.ba();
+boxit.bb();
+boxit.bc();
+boxit.bd(btex $\vdots$ etex);
+boxit.be();
+boxit.bf();
+bd.dx = 8;
+ba.ne = a.sw - (15,10);
+
+drawboxed(ba,bb,bc,bd,be,bf);
+label.lft("hashtab:", ba.w);
+
+def ndblock suffix $ =
+ boxjoin(a.sw=b.nw; a.se=b.ne);
+ forsuffixes $$=$a,$b,$c:
+ boxit$$(); ($$dx,$$dy)=(5.5,4);
+ endfor;
+enddef;
+
+ndblock nda;
+ndblock ndb;
+ndblock ndc;
+nda.a.c - bb.c = ndb.a.c - nda.c.c = (whatever,0);
+xpart ndb.c.se = xpart ndc.a.ne = xpart di.c;
+ndc.a.c - be.c = (whatever,0);
+
+drawboxes(nda.a,nda.b,nda.c, ndb.a,ndb.b,ndb.c, ndc.a,ndc.b,ndc.c);
+
+drawarrow bb.c .. nda.a.w;
+drawarrow be.c .. ndc.a.w;
+drawarrow nda.c.c .. ndb.a.w;
+drawarrow nda.a.c{right}..{curl0}ni.c cutafter bpath ni;
+drawarrow nda.b.c{right}..{curl0}di.c cutafter bpath di;
+drawarrow ndc.a.c{right}..{curl0}nii.c cutafter bpath nii;
+drawarrow ndc.b.c{right}..{curl0}dii.c cutafter bpath dii;
+drawarrow ndb.a.c{right}..nk.c cutafter bpath nk;
+drawarrow ndb.b.c{right}..dk.c cutafter bpath dk;
+
+x.ptr = xpart aa.c;
+y.ptr = ypart ndc.a.ne;
+drawarrow subpath (0,.7) of (z.ptr..{left}ndc.c.c) dashed evenly;
+label.rt(btex ndblock etex, z.ptr);
+endfig;
+
+
+
+
+beginfig(8)
+interim circmargin := .07in;
+fill unitsquare xscaled 1.1in yscaled .7in withcolor .9white;
+circleit(currentpicture);
+dx = dy;
+clearit; drawboxed();
+forsuffixes $=n,c: makelabel.top(str $, $); endfor
+makelabel.bot("s",s);
+makelabel.rt("e", e);
+makelabel.lft("w", w);
+pickup pencircle scaled .3bp;
+vardef larrow@#(expr a, da, s) =
+ drawdblarrow a..a+da; label@#(s,a+.5da); enddef;
+larrow.rt(n, (0,-dy), "dy");
+larrow.rt(s, (0,dy), "dy");
+larrow.top(e, (-dx,0), "dx");
+larrow.top(w, (dx,0), "dx");
+endfig;
+
+
+
+
+beginfig(9);
+vardef cuta(suffix a,b) expr p =
+ drawarrow p cutbefore bpath.a cutafter bpath.b;
+ point .5*length p of p
+enddef;
+
+vardef self@# expr p =
+ cuta(@#,@#) @#.c{curl0}..@#.c+p..{curl0}@#.c enddef;
+
+verbatimtex \def\stk#1#2{$\displaystyle{\matrix{#1\cr#2\cr}}$} etex
+circleit.aa("Start"); aa.dx=aa.dy;
+circleit.bb(btex \stk B{(a|b)^*a} etex);
+circleit.cc(btex \stk C{b^*} etex);
+circleit.dd(btex \stk D{(a|b)^*ab} etex);
+circleit.ee("Stop"); ee.dx=ee.dy;
+
+numeric hsep;
+bb.c-aa.c = dd.c-bb.c = ee.c-dd.c = (hsep,0);
+cc.c-bb.c = (0,.8hsep);
+xpart(ee.e - aa.w) = 3.8in;
+drawboxed(aa,bb,cc,dd,ee);
+
+label.ulft(btex$b$etex, cuta(aa,cc) aa.c{dir50}..cc.c);
+label.top(btex$b$etex, self.cc(0,30pt));
+label.rt(btex$a$etex, cuta(cc,bb) cc.c..bb.c);
+label.top(btex$a$etex, cuta(aa,bb) aa.c..bb.c);
+label.llft(btex$a$etex, self.bb(-20pt,-35pt));
+label.top(btex$b$etex, cuta(bb,dd) bb.c..dd.c);
+label.top(btex$b$etex, cuta(dd,ee) dd.c..ee.c);
+label.lrt(btex$a$etex, cuta(dd,bb) dd.c..{dir140}bb.c);
+label.bot(btex$a$etex, cuta(ee,bb) ee.c..tension1.3 ..{dir115}bb.c);
+label.urt(btex$b$etex, cuta(ee,cc) ee.c{(cc.c-ee.c)rotated-15}..cc.c);
+endfig;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/base/source/figs.mp b/Master/texmf-dist/doc/metapost/base/source/figs.mp
new file mode 100644
index 00000000000..67c86a098d1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/figs.mp
@@ -0,0 +1,22 @@
+input boxes
+beginfig(1);
+pair shadowshift; shadowshift=(1,-1)*bp;
+
+def drawshadowed(text t) =
+ forsuffixes $=t:
+ fill bpath$ shifted shadowshift;
+ unfill bpath$;
+ drawboxed($);
+ endfor
+enddef;
+
+boxit.a(btex \s8A\s+2 \(lh a etex);
+circleit.b(btex $e sup {i omega t}$ etex rotated 20);
+b.w - a.e = (10,0)*bp;
+drawshadowed(a,b);
+draw a.e..b.w;
+
+draw bbox currentpicture dashed evenly;
+endfig;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/base/source/grdemo.ms b/Master/texmf-dist/doc/metapost/base/source/grdemo.ms
new file mode 100644
index 00000000000..fbcbfaceff4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/grdemo.ms
@@ -0,0 +1,124 @@
+.nr PS 11
+.nr VS 13
+.TL
+MetaPost with groff
+.LP
+Since MetaPost is a picture-drawing language that outputs PostScript,
+it is necessary to use the
+.ft CW
+-mpspic
+.ft
+macro package, which is automatically included when \fIgroff\fR
+is invoked with the
+.ft CW
+-Tps
+.ft
+option to prepare output for PostScript printers or previewers.
+.PP
+Suppose you have written some figures in MetaPost and placed
+the input in a file \f(CWfigures.mp\fR.
+Running
+.nf
+.ft CW
+ mp -T figures
+.ft
+.fi
+to invoke the MetaPost interpreter produces output files
+\f(CWfigures.1\fR, \f(CWfigures.2\fR, .\|.\|.
+which can be included in a \fIgroff\fR document via macro calls
+such as
+.nf
+.ft CW
+ .PSPIC figures.1 width height
+.ft
+.fi
+as explained in the \fIgrops\fR(1) documentation.
+Note that the picture gets rescaled if the height and width
+in the \f(CW.PSPIC\fR command don't match \fImp\fR's idea of
+the picture dimensions.
+.PP
+For instance,
+.PSPIC figs.1 1.5i 1.08i
+this figure was derived from a file
+.ft CW
+figs.mp
+.ft
+and included at this point by invoking the \f(CW.PSPIC\fR macro
+with height 1.08 inches and width 1.5 inches.
+.PP
+The file
+.ft CW
+figs.mp
+.ft
+looks like this:
+.nf
+.ft CW
+.nr PS 9
+.nr VS 11
+prologues:=1;
+input boxes
+beginfig(1);
+pair shadowshift; shadowshift=(1,-1)*bp;
+
+def drawshadowed(text t) =
+ forsuffixes $=t:
+ fill bpath$ shifted shadowshift;
+ unfill bpath$;
+ drawboxed($);
+ endfor
+enddef;
+
+boxit.a(btex \\s8A\\s+2 \\(lh a etex);
+circleit.b(btex $e sup {i omega t}$ etex rotated 20);
+b.w - a.e = (10bp,0);
+drawshadowed(a,b);
+draw a.e..b.w;
+
+draw bbox currentpicture dashed evenly;
+endfig;
+.nr PS 11
+.nr VS 13
+.ft
+.fi
+.PP
+Note that the typesetting commands in the
+\f(CWbtex\fR.\|.\|.\f(CWetex\fR blocks in the above example
+are processed by
+.nf
+.ft CW
+ eqn -d\\$\\$ | troff -Tpost
+.ft
+.fi
+If a different \fItroff\fR pipeline is desired, it can be specified
+via the
+.ft CW
+TROFF
+.ft
+environment variable. For example,
+.nf
+.ft CW
+ TROFF='tbl | eqn -d\\$\\$ | troff -Tpost'
+.ft
+.fi
+adds \fItbl\fR to the pipeline in addition to \fIeqn\fR.
+.PP
+Macro definitions and such can be added via the standard
+\f(CWverbatimtex\fR.\|.\|.\f(CWetex\fR mechanism that adds the
+given material to the \fItroff\fR input. Such material should
+not generate any output since this would get mixed up with the
+next \f(CWbtex\fR.\|.\|.\f(CWetex\fR block. Thus, newlines between
+\f(CWverbatimtex\fR and \f(CWetex\fR must be protected with \f(CW\\\fR.
+.PP
+Unfortunately, typesetting of \f(CWbtex\fR.\|.\|.\f(CWetex\fR blocks
+currently doesn't work with \fIgroff\fR and equires a UNIX
+\fItroff\fR implementation, because MetaPost's \f(CWdmp\fR
+post-processor can't handle \fIgroff\fR's extended font and output
+file formats documented in \fIgroff_font\fR(5) and \fIgroff_out\fR(5).
+Nevertheless, using \fItroff\fR to prepare figures with MetaPost
+and \fIgroff\fR to typeset them may still be a useful combination
+if your \fItroff\fR implementation doesn't provide the
+.ft CW
+-mpictures
+.ft
+macro packages.
+
diff --git a/Master/texmf-dist/doc/metapost/base/source/lead.d b/Master/texmf-dist/doc/metapost/base/source/lead.d
new file mode 100644
index 00000000000..8e95355af1c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/lead.d
@@ -0,0 +1,24 @@
+80 70.6
+81 56.4
+82 54.4
+83 46.4
+84 40.1
+85 20.1
+86 8.4
+87 8.0
+88 7.6
+89 7.2
+90 7.1
+
+82 .484
+83 .413
+84 .381
+85 .258
+86 .151
+87 .108
+88 .087
+89 .074
+90 .070
+
+First: National lead emissions in thousands of metric tons
+Second: Average lead level in micrograms per cubic meter of air \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/manfig.mp b/Master/texmf-dist/doc/metapost/base/source/manfig.mp
new file mode 100644
index 00000000000..e024f62ffb5
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/manfig.mp
@@ -0,0 +1,859 @@
+%% This is for the MathTime version that uses PostScript outline fonts
+%% ----------------------------------------------------------------
+%verbatimtex \documentstyle[times]{article}
+% \begin{document}
+%etex
+%defaultfont := "rptmr";
+%% ----------------------------------------------------------------
+
+beginfig(0);
+draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0);
+endfig;
+
+
+beginfig(2); numeric u;
+u=1cm;
+draw (2u,2u)--(0,0)--(0,3u)--(3u,0)--(0,0);
+pickup pencircle scaled 4pt;
+for i=0 upto 2:
+ for j=0 upto 2:
+ draw (i*u,j*u);
+ endfor
+endfor
+endfig;
+
+
+beginfig(3);
+z0 = (0,0); z1 = (60,40);
+z2 = (40,90); z3 = (10,70);
+z4 = (30,50);
+draw z0..z1..z2..z3..z4;
+dotlabels.top(0,2,4);
+dotlabels.lft(3);
+dotlabels.lrt(1);
+endfig;
+
+
+beginfig(104);
+z0 = (0,0); z1 = (60,40);
+z2 = (40,90); z3 = (10,70);
+z4 = (30,50);
+draw z0..z1..z2..z3..z4..cycle;
+dotlabels.top(2,4);
+dotlabels.lft(0,3);
+dotlabels.lrt(1);
+endfig;
+
+
+beginfig(204);
+z0 = (0,0); z1 = (60,40);
+z2 = (40,90); z3 = (10,70);
+z4 = (30,50);
+draw z0..z1..z2..z3--z4--cycle;
+dotlabels.top(2,4);
+dotlabels.lft(0,3);
+dotlabels.lrt(1);
+endfig;
+
+
+beginfig(5);
+z0 = (0,0); z1 = (60,40);
+z2 = (40,90); z3 = (10,70);
+z4 = (30,50);
+path p; p = z0..z1..z2..z3..z4;
+draw p;
+for t=0 upto 3:
+ draw point t of p--postcontrol t of p
+ --precontrol t+1 of p--point t+1 of p
+ dashed (evenly scaled .5);
+endfor
+dotlabels.top(0,2,4);
+dotlabels.lft(3);
+dotlabels.lrt(1);
+endfig;
+
+
+beginfig(6);
+z0 = (0,0); z1 = (60,40);
+z2 = (40,90); z3 = (10,70);
+z4 = (30,50);
+draw z0..z1{up}..z2{left}..z3..z4;
+dotlabels.top(0,2,4);
+dotlabels.lft(3);
+dotlabels.lrt(1);
+endfig;
+
+
+beginfig(7)
+for a=0 upto 9:
+ draw (0,0){dir 45}..{dir -10a}(6cm,0);
+endfor
+endfig;
+
+beginfig(8)
+for a=0 upto 7:
+ draw (0,0){dir 45}..{dir 10a}(6cm,0);
+endfor
+endfig;
+
+
+beginfig(109);
+z2=-z0=(1in,0); z1=(0,.2in);
+draw z0{up}..z1{right}..z2{down};
+dotlabels.bot(0,1,2);
+endfig;
+
+
+beginfig(209);
+z2=-z0=(1in,0); z1=(0,.2in);
+draw z0{up}...z1{right}...z2{down};
+dotlabels.bot(0,1,2);
+endfig;
+
+
+beginfig(110);
+numeric u; 10u=1.5in;
+-z0=z3=(5u,0);
+(-x1,y1)=z2=(3u,2u);
+draw z0..z1..z2..z3;
+dotlabels.bot(0,1,2,3);
+endfig;
+
+
+beginfig(210);
+numeric u; 10u=1.5in;
+-z0=z3=(5u,0);
+(-x1,y1)=z2=(3u,2u);
+draw z0..z1..tension 1.3..z2..z3;
+dotlabels.bot(0,1,2,3);
+endfig;
+
+
+beginfig(310);
+numeric u; 10u=1.5in;
+-z0=z3=(5u,0);
+(-x1,y1)=z2=(3u,2u);
+draw z0..z1..tension 1.5 and 1..z2..z3;
+dotlabels.bot(0,1,2,3);
+endfig;
+
+
+beginfig(111);
+numeric u, c; 10u=1.4in; c=0;
+z1=(0,0); (x0,-y0)=z2=(2u,5u);
+draw z0{curl c}..z1..{curl c}z2;
+dotlabels.rt(0,1,2);
+endfig;
+
+
+beginfig(211);
+numeric u, c; 10u=1.4in; c=1;
+z1=(0,0); (x0,-y0)=z2=(2u,5u);
+draw z0{curl c}..z1..{curl c}z2;
+dotlabels.rt(0,1,2);
+endfig;
+
+
+beginfig(311);
+numeric u, c; 10u=1.4in; c=2;
+z1=(0,0); (x0,-y0)=z2=(2u,5u);
+draw z0{curl c}..z1..{curl c}z2;
+dotlabels.rt(0,1,2);
+endfig;
+
+
+beginfig(411);
+numeric u, c; 10u=1.4in; c=infinity;
+z1=(0,0); (x0,-y0)=z2=(2u,5u);
+draw z0{curl c}..z1..{curl c}z2;
+dotlabels.rt(0,1,2);
+endfig;
+
+
+beginfig(13);
+z1=-z2=(.2in,0);
+x3=-x6=.3in;
+x3+y3=x6+y6=1.1in;
+z4=1/3[z3,z6];
+z5=2/3[z3,z6];
+z20=whatever[z1,z3]=whatever[z2,z4];
+z30=whatever[z1,z4]=whatever[z2,z5];
+z40=whatever[z1,z5]=whatever[z2,z6];
+draw z1--z20--z2--z30--z1--z40--z2;
+pickup pencircle scaled 1pt;
+draw z1--z2;
+draw z3--z6;
+%
+dotlabels.bot(1,2);
+dotlabels.rt(3);
+dotlabels.lft(6);
+dotlabels.top(20,30,40);
+endfig;
+
+
+vardef llet(expr c) =
+ c infont defaultfont scaled magstep3
+enddef;
+
+primarydef p centered h =
+ (p shifted (h - xpart .5[llcorner p,lrcorner p], 0))
+enddef;
+
+beginfig(14);
+string s; s = "abcde";
+numeric u,n, ytop, ybot;
+n = 5;
+ytop = 3bp + ypart urcorner llet(s);
+ybot = -3bp + ypart llcorner llet(s);
+ytop - ybot = u;
+draw (n*u,ybot)--(0,ybot)--(0,ytop)--(n*u,ytop);
+for i=1 upto n:
+ draw (i*u,ybot)..(i*u,ytop);
+ draw llet(substring (i-1,i) of s) centered ((i-.5)*u);
+ label.bot(decimal i, (i*u,ybot));
+endfor
+picture llab; llab = btex \llap{$x={}$}0 etex;
+z0 = urcorner llab;
+draw llab shifted (-.5*x0, ybot-labeloffset-y0);
+endfig;
+
+
+beginfig(17);
+a=.7in; b=.5in;
+z0=(0,0);
+z1=-z3=(a,0);
+z2=-z4=(0,b);
+draw z1..z2..z3..z4..cycle;
+draw z1--z0--z2;
+label.top("a", .5[z0,z1]);
+label.lft("b", .5[z0,z2]);
+dotlabel.bot("(0,0)", z0);
+endfig;
+
+
+beginfig(18);
+numeric u;
+u = 1cm;
+draw (0,2u)--(0,0)--(4u,0);
+pickup pencircle scaled 1pt;
+draw (0,0){up}
+ for i=1 upto 8: ..(i/2,sqrt(i/2))*u endfor;
+label.lrt(btex $\sqrt x$ etex, (3,sqrt 3)*u);
+label.bot(btex $x$ etex, (2u,0));
+label.lft(btex $y$ etex, (0,u));
+endfig;
+
+
+beginfig(19);
+numeric ux, uy;
+120ux=1.2in; 4uy=2.4in;
+draw (0,4uy)--(0,0)--(120ux,0);
+pickup pencircle scaled 1pt;
+draw (0,uy){right}
+ for ix=1 upto 8:
+ ..(15ix*ux, uy*2/(1+cosd 15ix))
+ endfor;
+label.bot(btex $x$ axis etex, (60ux,0));
+label.lft(btex $y$ axis etex rotated 90,
+ (0,2uy));
+label.lft(
+ btex $\displaystyle y={2\over1+\cos x}$ etex,
+ (120ux, 4uy));
+endfig;
+
+
+beginfig(20);
+picture p;
+p = "testing" infont "rptmr" scaled 7;
+draw p;
+draw llcorner p--lrcorner p--urcorner p--ulcorner p--cycle;
+dotlabel.lft(btex \tt llcorner etex, llcorner p);
+dotlabel.rt(btex \tt lrcorner etex, lrcorner p);
+dotlabel.lft(btex \tt ulcorner etex, ulcorner p);
+dotlabel.rt(btex \tt urcorner etex, urcorner p);
+endfig;
+
+
+beginfig(21);
+path p;
+p = (-1cm,0)..(0,-1cm)..(1cm,0);
+fill p{up}..(0,0){-1,-2}..{up}cycle;
+draw p..(0,1cm)..cycle;
+endfig;
+
+
+beginfig(22);
+path a, b, aa, ab;
+a = fullcircle scaled 2cm;
+b = a shifted (0,1cm);
+aa = halfcircle scaled 2cm;
+ab = buildcycle(aa, b);
+picture pa, pb;
+pa = thelabel(btex $A$ etex, (0,-.5cm));
+pb = thelabel(btex $B$ etex, (0,1.5cm));
+fill a withcolor .7white;
+fill b withcolor .7white;
+fill ab withcolor .4white;
+unfill bbox pa;
+draw pa;
+unfill bbox pb;
+draw pb;
+label.lft(btex $U$ etex, (-1cm,.5cm));
+draw bbox currentpicture;
+endfig;
+
+
+beginfig(123);
+path aa, b;
+b = a shifted (0,1cm);
+aa = halfcircle scaled 2cm;
+draw aa;
+draw b dashed evenly;
+z1 = aa intersectionpoint reverse b;
+z2 = reverse aa intersectionpoint b;
+dotlabel.rt(btex 1 etex, z1);
+dotlabel.lft(btex 2 etex, z2);
+label.bot(btex \tt aa etex, point 0 of aa);
+label.bot(btex \tt b etex, point 2 of b);
+endfig;
+
+beginfig(223);
+path aa, b;
+b = a shifted (0,1cm);
+aa = halfcircle scaled 2cm;
+numeric t[], tt[];
+(t1,8-tt1) = aa intersectiontimes reverse b;
+(4-t2,tt2) = reverse aa intersectiontimes b;
+pickup(pencircle scaled .3);
+draw aa;
+draw b;
+pickup(pencircle scaled .8);
+draw subpath (t1,t2) of aa;
+draw subpath (tt2,tt1) of b;
+dotlabel.rt(btex 1 etex, point t1 of aa);
+dotlabel.lft(btex 2 etex, point t2 of aa);
+label.bot(btex \tt aa etex, point 0 of aa);
+label.bot(btex \tt b etex, point 2 of b);
+endfig;
+
+
+beginfig(24);
+h=2in; w=2.7in;
+path p[], q[], pp;
+for i=2 upto 4: ii:=i**2;
+ p[i] = (w/ii,h){1,-ii}...(w/i,h/i)...(w,h/ii){ii,-1};
+endfor
+q0.5 = (0,0)--(w,0.5h);
+q1.5 = (0,0)--(w/1.5,h);
+pp = buildcycle(q0.5, p2, q1.5, p4);
+fill pp withcolor .7white;
+z0=center pp;
+picture lab; lab=thelabel(btex $f>0$ etex, z0);
+unfill bbox lab; draw lab;
+draw q0.5; draw p2; draw q1.5; draw p4;
+dotlabel.top(btex $P$ etex, p2 intersectionpoint q0.5);
+dotlabel.rt(btex $Q$ etex, p2 intersectionpoint q1.5);
+dotlabel.lft(btex $R$ etex, p4 intersectionpoint q1.5);
+dotlabel.bot(btex $S$ etex, p4 intersectionpoint q0.5);
+endfig;
+
+
+beginfig(25);
+numeric u;
+u = .2in;
+path a, b;
+a = (0,0){up}..(4u,0)..(8u,0)..(8u,4u);
+b = (10u,3u)..(5u,u)..(-u,u);
+numeric t; t=0;
+forsuffixes $=bot, llft, lrt, lft:
+ dotlabel$(decimal t, point t of a);
+ t:=t+1;
+endfor
+for i=0 upto 2:
+ dotlabel.top(decimal i, point i of b);
+endfor
+pickup(pencircle scaled .3);
+draw a;
+pickup(pencircle scaled .8);
+draw b;
+% intersections (atime, btime):
+% (0.2501,1.77225)
+% (2.58316,0.23619)
+% (0.75288,1.40094)
+endfig;
+
+
+beginfig(26);
+numeric scf, #, t[];
+3.2scf = 2.4in;
+path fun;
+# = .1; % Keep the function single-valued
+fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}..{curl .1}(3.2,2#))
+ yscaled(1/#) scaled scf;
+x1 = 2.5scf;
+for i=1 upto 2:
+ (t[i],whatever) =
+ fun intersectiontimes ((x[i],-infinity)--(x[i],infinity));
+ z[i] = point t[i] of fun;
+ z[i]-(x[i+1],0) = whatever*direction t[i] of fun;
+ draw (x[i],0)--z[i]--(x[i+1],0);
+ fill fullcircle scaled 3bp shifted z[i];
+endfor
+label.bot(btex $x_1$ etex, (x1,0));
+label.bot(btex $x_2$ etex, (x2,0));
+label.bot(btex $x_3$ etex, (x3,0));
+draw (0,0)--(3.2scf,0);
+pickup pencircle scaled 1pt;
+draw fun;
+endfig;
+
+
+beginfig(28);
+path p[];
+p1 = fullcircle scaled .6in;
+z1=(.75in,0)=-z3;
+z2=directionpoint left of p1=-z4;
+p2 = z1..z2..{curl1}z3..z4..{curl 1}cycle;
+fill p2 withcolor .4[white,black];
+unfill p1;
+draw p1;
+transform T;
+z1 transformed T = z2;
+z3 transformed T = z4;
+xxpart T=yypart T; yxpart T=-xypart T;
+picture pic;
+pic = currentpicture;
+for i=1 upto 2:
+ pic:=pic transformed T;
+ draw pic;
+endfor
+dotlabels.top(1,2,3); dotlabels.bot(4);
+endfig;
+
+
+beginfig(29);
+if unknown withdots: % So this works w/o MetaPost version 0.5
+ picture withdots; withdots=dashpattern(off 2.5 on 0 off 2.5);
+fi
+z0 = (0,0);
+z1 = (2in-2bp,0);
+for i=1 upto 4:
+ z[2i]-z[2i-2] = z[2i+1]-z[2i-1] = (0,14pt);
+endfor
+draw z0..z1 dashed evenly;
+label.rt(btex \tt dashed evenly etex, z1);
+draw z2..z3 dashed evenly scaled 2;
+label.rt(btex \tt dashed evenly scaled 2 etex, z3);
+draw z4..z5 dashed evenly scaled 4;
+label.rt(btex \tt dashed evenly scaled 4 etex, z5);
+draw z6..z7 dashed withdots;
+label.rt(btex \tt dashed withdots etex, z7);
+draw z8..z9 dashed withdots scaled 2;
+label.rt(btex \tt dashed withdots scaled 2 etex, z9);
+endfig;
+
+
+beginfig(30);
+picture e[]; e4=evenly scaled 4;
+z0 = (0,0);
+z1 = (2in,0);
+for i=1 upto 3:
+ z[2i]-z[2i-2] = z[2i+1]-z[2i-1] = (0,14pt);
+endfor
+dotlabels.lft(0,2,4,6);
+draw z0..z1 dashed e4;
+dotlabel.rt(btex 1 \tt\ draw z0..z1 dashed e4 etex, z1);
+draw z2..z3 dashed e4 shifted (6bp,0);
+dotlabel.rt(btex 3 \tt\ draw z2..z3 dashed e4 shifted (6bp,0) etex, z3);
+draw z4..z5 dashed e4 shifted (12bp,0);
+dotlabel.rt(btex 5 \tt\ draw z4..z5 dashed e4 shifted (12bp,0) etex, z5);
+draw z6..z7 dashed e4 shifted (18bp,0);
+dotlabel.rt(btex 7 \tt\ draw z6..z7 dashed e4 shifted (18bp,0) etex, z7);
+endfig;
+
+
+beginfig(31);
+picture d; d = dashpattern(on 6bp off 12bp on 6bp);
+draw d;
+endfig;
+
+
+beginfig(32);
+draw dashpattern(on 15bp off 15bp) dashed evenly;
+picture p;
+p=currentpicture;
+currentpicture:=nullpicture;
+draw fullcircle scaled 1cm xscaled 3 dashed p;
+endfig;
+
+
+beginfig(33);
+for i=0 upto 2:
+ z[i]=(0,-40i); z[i+3]-z[i]=(100,30);
+endfor
+pickup pencircle scaled 18;
+draw z0..z3 withcolor .8white;
+linecap:=butt;
+draw z1..z4 withcolor .8white;
+linecap:=squared;
+draw z2..z5 withcolor .8white;
+dotlabels.top(0,1,2,3,4,5);
+endfig; linecap:=rounded;
+
+
+beginfig(34);
+for i=0 upto 2:
+ z[i]=(0,-50i); z[i+3]-z[i]=(60,40);
+ z[i+6]-z[i]=(120,0);
+endfor
+pickup pencircle scaled 24;
+draw z0--z3--z6 withcolor .8white;
+linejoin:=mitered;
+draw z1..z4--z7 withcolor .8white;
+linejoin:=beveled;
+draw z2..z5--z8 withcolor .8white;
+dotlabels.bot(0,1,2,3,4,5,6,7,8);
+endfig; linejoin:=rounded;
+
+
+beginfig(35);
+z2a=(0,0);
+(-x1a,y1a) = -z3a = .5in*unitvector(6,1);
+z1b - z1a = .75*z1a rotated -90;
+z2b - z1b = whatever*(z2a-z1a);
+z3b - z2b = whatever*(z3a-z2a);
+y2b = 0;
+z3b - z3a = whatever*(z3a rotated 90);
+z0b-z1b = z0a-z1a = z1a;
+x4a=x2a; x4b=x2b;
+y4a = y4b = 1.3*y3b;
+fill z1a--z2a--z3a--z3b--z2b--z1b--cycle withcolor .8 white;
+for p= z2a--z4a, z2b--z4b, z0a--z1a, z0b--z1b:
+ draw p dashed evenly;
+endfor
+drawdblarrow z4a--z4b;
+drawdblarrow z0a--z0b;
+label.bot(btex miter length etex, .5[z4a,z4b]);
+label.ulft(btex line width etex, .5[z0a,z0b]);
+endfig;
+
+
+beginfig(36);
+z[-1]=(0,0); z0=(1in,0);
+for i=1 upto 6:
+ z[i]-z[i-2] = (0,-15pt);
+ if x[i]=0: label.lft(decimal i, z[i]);
+ fi
+endfor
+drawarrow z1..z2;
+drawarrow reverse(z3..z4);
+drawdblarrow z5..z6;
+label.rt(btex 2 \tt\ drawarrow z1..z2 etex, z2);
+label.rt(btex 4 \tt\ drawarrow reverse(z3..z4) etex, z4);
+label.rt(btex 6 \tt\ drawdblarrow z5..z6 etex, z6);
+endfig;
+
+
+beginfig(37);
+path p, q, r;
+ahlength := 1.5cm;
+pickup pencircle scaled .2cm;
+p = (0,0)..{right}(2.5cm,2cm);
+q = counterclockwise arrowhead p;
+z0 = directionpoint up of q;
+z.a = directionpoint right of q;
+z.b = directionpoint (-1,-1) of q;
+drawarrow p withcolor .4white;
+pickup defaultpen;
+undraw p;
+undraw q;
+ahlength:=4bp;
+z.a1-z0 = .3cm*unitvector(z.a-z0) rotated 90;
+z.a1-z.a2 = z0-z.a;
+z.b1-z0 = .3cm*unitvector(z.b-z0) rotated -90;
+z.b1-z.b2 = z0-z.b;
+z.ab = whatever[z.a1,z.a2] = whatever[z.b1,z.b2];
+z.a0-z.ab = .4cm*unitvector(z.a1-z.a2);
+z.b0-z.ab = .4cm*unitvector(z.b1-z.b2);
+drawdblarrow z.a1..z.a2;
+label.lrt(btex \tt ahlength etex, .9[z.a1,z.a2]);
+draw z.a1..z.a0 dashed evenly;
+drawdblarrow z.b1..z.b2;
+label.urt(btex \tt ahlength etex, .9[z.b1,z.b2]);
+draw z.b1..z.b0 dashed evenly;
+r = z.a0{(z.a2-z.a0) rotated 90}..{(z.b2-z.b0)rotated 90}z.b0;
+draw r;
+label.rt(btex \tt ahangle etex, point .5 of r);
+endfig;
+
+
+beginfig(38);
+pickup pencircle scaled .2in yscaled .08 rotated 30;
+x0=x3=x4;
+z1-z0 = .45in*dir 30;
+z2-z3 = whatever*(z1-z0);
+z6-z5 = whatever*(z1-z0);
+z1-z6 = 1.2*(z3-z0);
+rt x3 = lft x2;
+x5 = .55[x4,x6];
+y4 = y6;
+lft x3 = bot y5 = 0;
+top y2 = .9in;
+draw z0--z1--z2--z3--z4--z5--z6 withcolor .7white;
+dotlabels.top(0,1,2,3,4,5,6);
+endfig;
+
+
+beginfig(40);
+path p[];
+p1 = (0,0){curl 0}..(5pt,-3pt)..{curl 0}(10pt,0);
+p2 = p1..(p1 yscaled-1 shifted(10pt,0));
+p0 = p2;
+for i=1 upto 3: p0:=p0.. p2 shifted (i*20pt,0);
+ endfor
+for j=0 upto 8: draw p0 shifted (0,j*10pt);
+ endfor
+p3 = fullcircle shifted (.5,.5) scaled 72pt;
+clip currentpicture to p3;
+draw p3;
+endfig;
+
+
+marksize=4pt;
+angle_radius=8pt;
+
+def draw_mark(expr p, a) =
+ begingroup
+ save t, dm; pair dm;
+ t = arctime a of p;
+ dm = marksize*unitvector direction t of p
+ rotated 90;
+ draw (-.5dm.. .5dm) shifted point t of p;
+ endgroup
+enddef;
+
+def draw_marked(expr p, n) =
+ begingroup
+ save amid;
+ amid = .5*arclength p;
+ for i=-(n-1)/2 upto (n-1)/2:
+ draw_mark(p, amid+.6marksize*i);
+ endfor
+ draw p;
+ endgroup
+enddef;
+
+def mark_angle(expr a, b, c, n) =
+ begingroup
+ save s, p; path p;
+ p = unitvector(a-b){(a-b)rotated 90}..unitvector(c-b);
+ s = .9marksize/length(point 1 of p - point 0 of p);
+ if s<angle_radius: s:=angle_radius; fi
+ draw_marked(p scaled s shifted b, n);
+ endgroup
+enddef;
+
+def mark_rt_angle(expr a, b, c) =
+ draw ((1,0)--(1,1)--(0,1))
+ zscaled (angle_radius*unitvector(a-b)) shifted b
+enddef;
+
+beginfig(42);
+pair a,b,c,d;
+b=(0,0); c=(1.5in,0); a=(0,.6in);
+d-c = (a-b) rotated 25;
+dotlabel.lft("a",a);
+dotlabel.lft("b",b);
+dotlabel.bot("c",c);
+dotlabel.llft("d",d);
+z0=.5[a,d];
+z1=.5[b,c];
+(z.p-z0) dotprod (d-a) = 0;
+(z.p-z1) dotprod (c-b) = 0;
+draw a--d;
+draw b--c;
+draw z0--z.p--z1;
+draw_marked(a--b, 1);
+draw_marked(c--d, 1);
+draw_marked(a--z.p, 2);
+draw_marked(d--z.p, 2);
+draw_marked(b--z.p, 3);
+draw_marked(c--z.p, 3);
+mark_angle(z.p, b, a, 1);
+mark_angle(z.p, c, d, 1);
+mark_angle(z.p, c, b, 2);
+mark_angle(c, b, z.p, 2);
+mark_rt_angle(z.p, z0, a);
+mark_rt_angle(z.p, z1, b);
+endfig;
+
+
+def getmid(suffix p) =
+ pair p.mid[], p.off[], p.dir[];
+ for i=0 upto 36:
+ p.dir[i] = dir(5*i);
+ p.mid[i]+p.off[i] = directionpoint p.dir[i] of p;
+ p.mid[i]-p.off[i] = directionpoint -p.dir[i] of p;
+ endfor
+enddef;
+
+def joinup(suffix pt, d)(expr n) =
+ begingroup
+ save res, g; path res;
+ res = pt[0]{d[0]};
+ for i=1 upto n:
+ g:= if (pt[i]-pt[i-1]) dotprod d[i] <0: - fi 1;
+ res := res{g*d[i-1]}...{g*d[i]}pt[i];
+ endfor
+ res
+ endgroup
+enddef;
+
+beginfig(45)
+path p, q;
+p = ((5,2)...(3,4)...(1,3)...(-2,-3)...(0,-5)...(3,-4)
+ ...(5,-3)...cycle) scaled .3cm shifted (0,5cm);
+getmid(p);
+draw p;
+draw joinup(p.mid, p.dir, 36)..cycle;
+q = joinup(p.off, p.dir, 36);
+draw q..(q rotated 180)..cycle;
+drawoptions(dashed evenly);
+for i=0 upto 3:
+ draw p.mid[9i]-p.off[9i]..p.mid[9i]+p.off[9i];
+ draw -p.off[9i]..p.off[9i];
+endfor
+endfig;
+
+
+input boxes
+
+
+\beginfig(48);
+fill unitsquare xscaled 1.1in yscaled .7in withcolor .9white;
+boxit(currentpicture);
+dx = dy = .25in;
+clearit; drawboxed();
+forsuffixes $=n,c: makelabel.top(str $, $); endfor
+makelabel.bot("s",s);
+forsuffixes $=ne,e,se: makelabel.rt(str $, $); endfor
+forsuffixes $=nw,w,sw: makelabel.lft(str $, $); endfor
+pickup pencircle scaled .3bp;
+vardef larrow@#(expr a, da, s) =
+ drawdblarrow a..a+da; label@#(s,a+.5da); enddef;
+larrow.rt(n, (0,-dy), "dy");
+larrow.rt(s, (0,dy), "dy");
+larrow.top(e, (-dx,0), "dx");
+larrow.top(w, (dx,0), "dx");
+endfig;
+
+
+beginfig(49);
+boxjoin(a.se=b.sw; a.ne=b.nw);
+boxit.a(btex\strut$\cdots$ etex); boxit.ni(btex\strut$n_i$ etex);
+boxit.di(btex\strut$d_i$ etex); boxit.ni1(btex\strut$n_{i+1}$ etex);
+boxit.di1(btex\strut$d_{i+1}$ etex); boxit.aa(btex\strut$\cdots$ etex);
+boxit.nk(btex\strut$n_k$ etex); boxit.dk(btex\strut$d_k$ etex);
+drawboxed(di,a,ni,ni1,di1,aa,nk,dk); label.lft("ndtable:", a.w);
+interim defaultdy:=7bp;
+boxjoin(a.sw=b.nw; a.se=b.ne);
+boxit.ba(); boxit.bb(); boxit.bc();
+boxit.bd(btex $\vdots$ etex); boxit.be(); boxit.bf();
+bd.dx=8bp; ba.ne=a.sw-(15bp,10bp);
+drawboxed(ba,bb,bc,bd,be,bf); label.lft("hashtab:",ba.w);
+vardef ndblock suffix $ =
+ boxjoin(a.sw=b.nw; a.se=b.ne);
+ forsuffixes $$=$1,$2,$3: boxit$$(); ($$dx,$$dy)=(5.5bp,4bp);
+ endfor; enddef;
+ndblock nda; ndblock ndb; ndblock ndc;
+nda1.c-bb.c = ndb1.c-nda3.c = (whatever,0);
+xpart ndb3.se = xpart ndc1.ne = xpart di.c;
+ndc1.c - be.c = (whatever,0);
+drawboxed(nda1,nda2,nda3, ndb1,ndb2,ndb3, ndc1,ndc2,ndc3);
+drawarrow bb.c -- nda1.w;
+drawarrow be.c -- ndc1.w;
+drawarrow nda3.c -- ndb1.w;
+drawarrow nda1.c{right}..{curl0}ni.c cutafter bpath ni;
+drawarrow nda2.c{right}..{curl0}di.c cutafter bpath di;
+drawarrow ndc1.c{right}..{curl0}ni1.c cutafter bpath ni1;
+drawarrow ndc2.c{right}..{curl0}di1.c cutafter bpath di1;
+drawarrow ndb1.c{right}..nk.c cutafter bpath nk;
+drawarrow ndb2.c{right}..dk.c cutafter bpath dk;
+x.ptr=xpart aa.c; y.ptr=ypart ndc1.ne;
+drawarrow subpath (0,.7) of (z.ptr..{left}ndc3.c) dashed evenly;
+label.rt(btex \strut ndblock etex, z.ptr); endfig;
+
+
+\beginfig(50)
+interim circmargin := .07in;
+fill unitsquare xscaled 1.1in yscaled .7in withcolor .9white;
+circleit(currentpicture);
+dx = dy;
+clearit; drawboxed();
+forsuffixes $=n,c: makelabel.top(str $, $); endfor
+makelabel.bot("s",s);
+makelabel.rt("e", e);
+makelabel.lft("w", w);
+pickup pencircle scaled .3bp;
+vardef larrow@#(expr a, da, s) =
+ drawdblarrow a..a+da; label@#(s,a+.5da); enddef;
+larrow.rt(n, (0,-dy), "dy");
+larrow.rt(s, (0,dy), "dy");
+larrow.top(e, (-dx,0), "dx");
+larrow.top(w, (dx,0), "dx");
+endfig;
+
+
+
+vardef drawshadowed(text t) =
+ fixsize(t);
+ forsuffixes s=t:
+ fill bpath.s shifted (1pt,-1pt);
+ unfill bpath.s;
+ drawboxed(s);
+ endfor
+enddef;
+
+beginfig(51)
+circleit.a(btex Box 1 etex);
+circleit.b(btex Box 2 etex);
+b.n = a.s - (0,20pt);
+drawshadowed(a,b);
+drawarrow a.s -- b.n;
+endfig;
+
+
+vardef cuta(suffix a,b) expr p =
+ drawarrow p cutbefore bpath.a cutafter bpath.b;
+ point .5*length p of p
+enddef;
+
+vardef self@# expr p =
+ cuta(@#,@#) @#.c{curl0}..@#.c+p..{curl0}@#.c enddef;
+
+beginfig(52);
+verbatimtex \def\stk#1#2{$\displaystyle{\matrix{#1\cr#2\cr}}$} etex
+circleit.aa(btex\strut Start etex); aa.dx=aa.dy;
+circleit.bb(btex \stk B{(a|b)^*a} etex);
+circleit.cc(btex \stk C{b^*} etex);
+circleit.dd(btex \stk D{(a|b)^*ab} etex);
+circleit.ee(btex\strut Stop etex); ee.dx=ee.dy;
+numeric hsep;
+bb.c-aa.c = dd.c-bb.c = ee.c-dd.c = (hsep,0);
+cc.c-bb.c = (0,.8hsep);
+xpart(ee.e - aa.w) = 3.8in;
+drawboxed(aa,bb,cc,dd,ee);
+label.ulft(btex$b$etex, cuta(aa,cc) aa.c{dir50}..cc.c);
+label.top(btex$b$etex, self.cc(0,30pt));
+label.rt(btex$a$etex, cuta(cc,bb) cc.c..bb.c);
+label.top(btex$a$etex, cuta(aa,bb) aa.c..bb.c);
+label.llft(btex$a$etex, self.bb(-20pt,-35pt));
+label.top(btex$b$etex, cuta(bb,dd) bb.c..dd.c);
+label.top(btex$b$etex, cuta(dd,ee) dd.c..ee.c);
+label.lrt(btex$a$etex, cuta(dd,bb) dd.c..{dir140}bb.c);
+label.bot(btex$a$etex, cuta(ee,bb) ee.c..tension1.3 ..{dir115}bb.c);
+label.urt(btex$b$etex, cuta(ee,cc) ee.c{(cc.c-ee.c)rotated-15}..cc.c);
+endfig;
+
+
+end \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/matmul.d b/Master/texmf-dist/doc/metapost/base/source/matmul.d
new file mode 100644
index 00000000000..c0e781d4a51
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/matmul.d
@@ -0,0 +1,21 @@
+20 .007861 ordinary MM: size, seconds
+30 .022051
+40 .050391
+60 .15922
+80 .4031
+120 1.53
+160 3.915
+240 18.55
+320 78.28
+480 279.24
+
+20 .006611 Strassen: size, seconds
+30 .020820
+40 .049219
+60 .163281
+80 .3975
+120 1.3125
+160 3.04
+240 9.95
+320 22.17
+480 72.60 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpgraph.bib b/Master/texmf-dist/doc/metapost/base/source/mpgraph.bib
new file mode 100644
index 00000000000..b95ad5af223
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpgraph.bib
@@ -0,0 +1,96 @@
+@string{jcompstatg = {Journal of Computational and Statistical Graphics}}
+
+@incollection{BenKer90,
+ author = "Jon L. Bentley and Brian W. Kernighan",
+ title = "Grap---A language for Typesetting Graphs",
+ booktitle = "Unix Research System Papers",
+ publisher = "{AT\&T} Bell Laboratories",
+ address = "Murray Hill, New Jersey",
+ edition = "Tenth",
+ volume = "{II}",
+ pages = "109--146",
+ year = 1990
+}
+@book{Cleve85,
+ author = "William S. Cleveland",
+ title = "The Elements of Graphing Data",
+ publisher = "Hobart Press",
+ address = "Summit, New Jersey",
+ year = 1985
+}
+@book{Cleve93,
+ author = "Cleveland, William S.",
+ title = "Visualizing Data",
+ publisher = "Hobart Press",
+ address = "Summit, New Jersey",
+ year= "to appear",
+}
+@book{Tufte83,
+ author = "Edward R. Tufte",
+ title = "Visual Display of Quantitative Information",
+ publisher = "Graphics Press",
+ address = "Box 430, Cheshire, Connecticut 06410",
+ year = 1983
+}
+@article{Cleve93a,
+ author = "Cleveland, William S.",
+ title = "A Model for Studying Display Methods of Statistical
+ Graphics (with discussion)",
+ journal = jcompstatg,
+ year = "to appear",
+ volume = 3
+}
+@book{Census92,
+ author = "U.S. Bureau of the Census",
+ title = "Statistical Abstracts of the United States: 1992",
+ edition = "112th",
+ address = "Washington, D.C.",
+ year = 1992
+}
+@book{LaTeXman,
+ author = "Leslie Lamport",
+ title = "{\LaTeX}: A Document Preparation System",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+}
+@book{ad:red,
+ author = "Adobe Systems Inc.",
+ title = "{P}ost{S}cript Language Reference Manual",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ edition = "second",
+ year = 1990
+}
+
+@inproceedings{ho:mp4,
+ author = "John D. Hobby",
+ title = "Introduction to {MetaPost}",
+ booktitle = "Euro{\TeX} '92 Proceedings",
+ month = sep,
+ year = 1992,
+ pages = "21--36"
+}
+[An updated version appeared in the April 1999 Issue of "Eutupon",
+ the news lettter for the Greek TeX friends group.
+]
+
+@techreport{ho:mp3,
+ title = "A User's manual for {MetaPost}",
+ author = "John D. Hobby",
+ institution = "AT\&T Bell Laboratories",
+ address = "Murray Hill, New Jersey",
+ type = "Computing Science Technical Report",
+ number = "no.~162",
+ note = {Available as http://cm.bell-labs.com/cs/cstr/162.ps.gz},
+ month = apr,
+ year = 1992
+}
+@book{kn:d,
+ author = "Donald E. Knuth",
+ note = "Volume D of {\it Computers and Typesetting}",
+ title = "{\MF} the Program",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpgraph.mp b/Master/texmf-dist/doc/metapost/base/source/mpgraph.mp
new file mode 100644
index 00000000000..1621f3a8605
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpgraph.mp
@@ -0,0 +1,129 @@
+input graph
+
+
+beginfig(1);
+draw begingraph(3in,2in);
+ gdraw "agepop91.d";
+ endgraph;
+endfig;
+
+
+beginfig(2);
+draw begingraph(3in,2in);
+ gdraw "agepop91.d" plot btex$\bullet$etex;
+ endgraph;
+endfig;
+
+
+beginfig(3);
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
+ glabel.bot(btex Age in years etex, OUT);
+ gdraw "agepopm.d";
+ endgraph;
+endfig;
+
+
+beginfig(4);
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
+ glabel.bot(btex Age in years etex, OUT);
+ setrange(origin, whatever,whatever);
+ gdraw "agepopm.d";
+ endgraph;
+endfig;
+
+
+beginfig(5);
+draw begingraph(2.3in,2in);
+ setcoords(log,log);
+ glabel.lft(btex Seconds etex,OUT);
+ glabel.bot(btex Matrix size etex,
+ OUT);
+ gdraw "matmul.d" dashed evenly;
+ glabel.ulft(btex Standard etex,8);
+ gdraw "matmul.d";
+ glabel.lrt(btex Strassen etex,7);
+ endgraph;
+endfig;
+
+
+beginfig(6);
+draw begingraph(6.5cm,4.5cm);
+ setrange(80,0, 90,whatever);
+ glabel.bot(btex Year etex, OUT);
+ glabel.lft(btex \vbox{\hbox{Emissions in} \hbox{thousands of}
+ \hbox{metric tons} \hbox{(heavy line)}}etex, OUT);
+ gdraw "lead.d" withpen pencircle scaled 1.5pt;
+ autogrid(,otick.lft);
+ setcoords(linear,linear);
+ setrange(80,0, 90,whatever);
+ glabel.rt(btex \vbox{\hbox{Micrograms} \hbox{per cubic}
+ \hbox{meter of air} \hbox{(thin line)}}etex, OUT);
+ gdraw "lead.d";
+ autogrid(otick.bot,otick.rt);
+ endgraph;
+endfig;
+
+
+input sarith
+
+beginfig(7);
+vardef newy(expr y) = (256/75)*y + mlog y enddef;
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
+ path p;
+ gdata("timepop.d", $, augment.p($1, newy(Scvnum $2)); );
+ gdraw p;
+ for y=5,10,20,50,100,150,200,250:
+ grid.lft(format("%g",y), newy(y)) withcolor .85white;
+ endfor
+ autogrid(grid.bot,) withcolor .85white;
+ frame.llft;
+ endgraph;
+endfig;
+
+beginfig(8);
+defaultfont:="cmr7";
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Life}\hbox{expectancy}} etex, OUT);
+ glabel.bot(btex Per capita G.N.P. (thousands of dollars) etex, OUT);
+ setcoords(log,linear);
+ gdata("countries.d", s,
+ glabel(s3, s1, s2);
+ )
+ endgraph;
+endfig;
+
+
+beginfig(9);
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Quadrillions}\hbox{of BTU}} etex, OUT);
+ path p[];
+ numeric t;
+ gdata("energy.d", $,
+ t:=0; augment.p1($1,0);
+ for j=2 upto 5:
+ t:=t+scantokens $[j]; augment.p[j]($1,t);
+ endfor)
+ picture lab[];
+ lab2=btex coal etex; lab3=btex crude oil etex;
+ lab4=btex natural gas etex; lab5=btex hydroelectric etex;
+ for j=5 downto 2:
+ gfill p[j]--reverse p[j-1]--cycle withcolor .16j*white;
+ glabel.lft(image(unfill bbox lab[j]; draw lab[j]), .7+length p[j]);
+ endfor
+ endgraph;
+endfig;
+
+
+beginfig(10);
+draw format("%g",2+2);
+endfig;
+
+beginfig(11);
+draw format("%3g","6.022e23");
+endfig;
+
+
+end \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpgraph.tex b/Master/texmf-dist/doc/metapost/base/source/mpgraph.tex
new file mode 100644
index 00000000000..104b70bf917
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpgraph.tex
@@ -0,0 +1,1109 @@
+\documentclass{article} % article is NOT the original style
+\usepackage{makeidx}
+\usepackage{fancyvrb}
+\usepackage{ctabbing}
+\RecustomVerbatimEnvironment{verbatim}{BVerbatim}{baseline=c}
+\usepackage{epsf}
+\usepackage[textwidth=6in,textheight=8.75in]{geometry}
+
+\newcommand\descr[1]{{\langle\hbox{\rm#1}\rangle}}
+\newcommand\invisgap{\nobreak\hskip0pt\relax}
+\newcommand\tdescr[1]{$\langle$\invisgap{\rm#1}\invisgap$\rangle$}
+\newcommand\Ignore[1]{} % For fooling delatex so spell will work
+
+\newfont\psyvii{rpsyr at 7pt}
+\newcommand\regmark{$^{\hbox{\psyvii\char'322}}$} % Registered trademark
+\newcommand\logofn{\global\font\logofn=logo8 \logofn}
+\newcommand\logo{\global\font\logo=logo10 \logo}
+\newcommand\logosl{\global\font\logosl=logosl10 \logosl}
+\newcommand\MF{{\ifdim \fontdimen6\font <9pt \def\logo{\logofn}\fi
+ \ifdim \fontdimen1\font >0pt \def\logo{\logosl}\fi
+ {\logo META}\-{\logo FONT}}}
+
+\newcommand\mathcenter[1]{\vcenter{\hbox{#1}}}
+
+\author{John D. Hobby}
+\title{Drawing Graphs with {MetaPost}}
+\date{}
+
+
+\newcommand\myabstract{%
+This paper describes a graph-drawing package that has been implemented
+as an extension to the MetaPost graphics language. MetaPost has
+a powerful macro facility for implementing such extensions. There are
+also some new language features that support the graph macros.
+Existing features for generating and manipulating pictures
+allow the user to do things that would be difficult to achieve
+in a stand-alone graph package.}
+
+\newcommand\mykeywords{%
+ typesetting; graphs; MetaPost}
+
+
+
+\begin{document}
+ \maketitle
+ \begin{abstract} \myabstract \end{abstract}
+ \ifx\keywords\undefined \else
+ \begin{keywords} \mykeywords \end{keywords}
+ \fi
+
+
+\section{Introduction}
+\label{intro}
+
+MetaPost is a batch-oriented graphics language based on Knuth's \MF\footnote{\MF\
+is a trademark of Addison Wesley Publishing Company.}, but with
+PostScript\footnote{PostScript is a registered trademark of Adobe Systems Inc.}
+output and numerous features for integrating text and graphics.
+The author has tried to make this paper as independent as possible of the
+user's manual~\cite{ho:mp3}, but fully appreciating all the material requires
+some knowledge of the MetaPost language.
+
+We concentrate on the mechanics of producing particular kinds of graphs
+because the question of what type of graph is best in a given situation
+is covered elsewhere; e.g., Cleveland~\cite{Cleve85,Cleve93,Cleve93a} and
+Tufte~\cite{Tufte83}.
+The goal is to provide at least the power of UNIX\footnote{UNIX is a registered
+trademark of UNIX System Laboratories, Inc.} {\it
+grap\/}~\cite{BenKer90}, but within the MetaPost language.
+Hence the package is implemented using MetaPost's powerful macro facility.
+
+The graph macros provide the following functionality:
+\begin{enumerate}
+\item Automatic scaling
+\item Automatic generation and labeling of tick marks or grid lines
+\item Multiple coordinate systems
+\item Linear and logarithmic scales
+\item Separate data files
+\item Ability to handle numbers outside the usual range
+\item Arbitrary plotting symbols
+\item Drawing, filling, and labeling commands for graphs
+\end{enumerate}
+In addition to these items, the user also has access to all the features
+described in the MetaPost user's manual~\cite{ho:mp3}.
+These include access to almost all the features of PostScript\regmark,
+ability to use and manipulate typeset text,
+ability to solve linear equations,
+and data types for points, curves, pictures, and coordinate transformations.
+
+Section~\ref{grmac} describes the graph macros from a user's perspective
+and presents several examples. Sections \ref{nummac} and~\ref{formsec} discuss
+auxiliary packages for manipulating and typesetting numbers and Section~\ref{concl}
+gives some concluding remarks. Appendix~\ref{summsec} summarizes the graph-drawing
+macros, and Appendix~\ref{nfeats} describes some recent additions to the MetaPost
+language that have not been presented elsewhere.
+
+
+\section{Using the Graph Macros}
+\label{grmac}
+
+A MetaPost input file that uses the graph macros should begin with
+$$ \hbox{\tt input graph} $$
+This reads a macro file {\tt graph.mp} and defines the graph-drawing commands
+explained below. The rest of the file should be one or more instances of
+$$ \vbox{\hbox{\tt beginfig($\descr{figure number}$);}
+ \hbox{\tt $\descr{graphics commands}$ endfig;}}
+$$
+followed by {\tt end}.
+
+The following \tdescr{graphics commands} suffice to generate the graph in
+Figure~\ref{fig1} from the data file {\tt agepop91.d}:
+$$\begin{verbatim}
+draw begingraph(3in,2in);
+ gdraw "agepop91.d";
+ endgraph;
+\end{verbatim}
+$$
+(Each line of {\tt agepop91.d} gives an age followed the estimated number of
+Americans of that age in 1991 \cite{Census92}.)
+
+\begin{figure}[htp]
+$$ \epsfbox{mpgraph.1} $$
+\caption{A graph of the 1991 age distribution in the United States}
+\label{fig1}
+\end{figure}
+
+\subsection{Basic Graph-Drawing Commands}
+
+% begingraph, endgraph, gdraw
+
+All graphs should begin with
+$$ \hbox{\tt begingraph($\descr{width}$,$\descr{height}$);} $$
+and end with {\tt endgraph}. This is syntactically a \tdescr{picture expression},
+so it should be preceded by {\tt draw} and followed by a semicolon as in the
+example.\footnote{See the User's Manual~\cite{ho:mp3} for explanations of {\tt draw}
+commands and syntactic elements like \tdescr{picture expression}.}
+The \tdescr{width} and \tdescr{height} give the dimensions of the
+graph itself without the axis labels.
+
+The command
+$$ {\tt gdraw}\ \descr{expression}\ \descr{option list} $$
+draws a graph line. If the \tdescr{expression} is of type string, it names a data
+file; otherwise it is a path that gives the function to draw. The
+\tdescr{option list} is zero or more drawing options
+$$ {\tt withpen} \descr{pen expression}
+ \mid {\tt withcolor} \descr{color expression}
+ \mid {\tt dashed} \descr{picture expression}
+$$
+that give the line width, color, or dash pattern as explained in the User's
+Manual~\cite{ho:mp3}.
+
+% plot <picture>
+
+In addition to the standard drawing options, the \tdescr{option list} in a
+{\tt gdraw} statement can contain
+$$ {\tt plot}\ \descr{picture expression} $$
+The \tdescr{picture expression} gives a plotting symbol to be drawn at each
+path knot. The {\tt plot} option suppresses line drawing so that%
+\footnote{Troff users should replace {\tt btex \$\string\bullet\$ etex} with
+{\tt btex \string\(bu etex}.}
+\Ignore{\)}% Help delatex so spell will work
+$$ \hbox{\verb|gdraw "agepop91.d" plot btex $\bullet$ etex|} $$
+generates only bullets as shown in Figure~\ref{fig2}.
+(Following the {\tt plot} option with a {\tt withpen} option would
+cause the line to reappear superimposed on the plotting symbols.)
+
+\begin{figure}[htp]
+$$ \epsfbox{mpgraph.2} $$
+\caption{The 1991 age distribution plotted with bullets}
+\label{fig2}
+\end{figure}
+
+% glabel, gdotlabel, OUT
+
+The {\tt glabel} and {\tt gdotlabel} commands add labels to a graph. The
+syntax for {\tt glabel} is
+$$ {\tt glabel.}\ \descr{label suffix}
+ \hbox{\tt ($\descr{string or picture expression}$, $\descr{location}$)}
+ \ \descr{option list}
+$$
+where \tdescr{location} identifies the location being labeled and
+\tdescr{label suffix} tells how the label is offset relative to that location.
+The {\tt gdotlabel} command is identical, except it marks the location with a
+dot. A \tdescr{label suffix} is as in plain MetaPost:
+\tdescr{empty} centers the label on the location;
+{\tt lft}, {\tt rt}, {\tt top}, {\tt bot} offset the label horizontally or
+vertically; and {\tt ulft}, {\tt urt}, {\tt llft}, {\tt lrt} give diagonal
+offsets. The \tdescr{location} can be a pair of graph coordinates, a knot
+number on the last {\tt gdraw} path, or the special location {\tt OUT}.
+Thus
+$$ \hbox{\verb|gdotlabel.top(btex $(50,0)$ etex, 50,0)|} $$
+would put a dot at graph coordinates {\tt(50,0)} and place the typeset text
+``$(50,0)$'' above it. Alternatively,
+$$ \hbox{\verb|glabel.ulft("Knot3", 3)|} $$
+typesets the string {\tt "Knot3"} and places it above and to the left of
+Knot~3 of the last {\tt gdraw} path. (The knot number 3 the path's ``time''
+parameter~\cite[Section 8.2]{ho:mp3}.)
+
+The \tdescr{location} {\tt OUT} places a label relative to the whole graph.
+For example, replacing ``{\tt gdraw "agepop91.d"}'' with
+$$\begin{verbatim}
+glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
+glabel.bot(btex Age in years etex, OUT);
+gdraw "agepopm.d";
+\end{verbatim}
+$$
+in the input for Figure~\ref{fig1} generates Figure~\ref{fig3}.
+This improves the graph by adding axis labels and using a new data file
+{\tt agepopm.d} where the populations have been divided by one million to avoid
+large numbers. We shall see later that simple transformations such as this can
+be achieved without generating new data files.
+
+\begin{figure}[htp]
+$$ \epsfbox{mpgraph.3} $$
+\caption{An improved version of the 1991 age distribution graph}
+\label{fig3}
+\end{figure}
+
+All flavors of \TeX\ can handle multi-line labels via the \verb|\hbox| within
+\verb|\vbox| arrangement used above, but \LaTeX\ users will find it more natural
+to use the {\tt tabular} environment~\cite{LaTeXman}.
+Troff user's can use nofill mode:
+$$\begin{verbatim}
+btex .nf
+Population
+in millions etex
+\end{verbatim}
+$$
+
+
+\subsection{Coordinate Systems}
+\label{coords}
+
+The graph macros automatically shift and rescale coordinates from data files,
+{\tt gdraw} paths, and {\tt glabel} locations to fit the graph. Whether the
+range of $y$~coordinates is 0.64 to 4.6 or 640,000 to 4,600,000, they
+get scaled to fill about 88\% of the height specified in the {\tt begingraph}
+statement. Of course line widths, labels, and plotting symbols are not
+rescaled.
+
+% setrange
+
+The {\tt setrange} command controls the shifting and rescaling process by
+specifying the minimum and maximum graph coordinates:
+$$ \hbox{\tt setrange($\descr{coordinates}$,\,$\descr{coordinates}$)} $$
+where
+\begin{ctabbing}
+$\tt \descr{coordinates} \rightarrow \descr{pair expression}$\\
+$\tt \qquad \;|\; \descr{numeric or string expression}\hbox{\tt ,}
+ \descr{numeric or string expression}$
+\end{ctabbing}
+The first \tdescr{coordinates} give $(x_{\rm min},y_{\rm min})$ and the second give
+$(x_{\rm max},y_{\rm max})$. The lines $x=x_{\rm min}$, $x=x_{\rm max}$,
+$y=y_{\rm min}$, and $y=y_{\rm max}$ define the rectangular frame around the graph
+in Figures \ref{fig1}--\ref{fig3}. For example, an adding a statement
+$$ \hbox{\tt setrange(origin, whatever,\,whatever)} $$
+to the input for Figure~\ref{fig3} yields Figure~\ref{fig4}.
+The first \tdescr{coordinates} are given by the predefined pair constant
+{\tt origin}, and the other coordinates are left unspecified. Any unknown
+value would work as well, but {\tt whatever} is the standard MetaPost
+representation for an anonymous unknown value.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
+ glabel.bot(btex Age in years etex, OUT);
+ setrange(origin, whatever,whatever);
+ gdraw "agepopm.d";
+ endgraph;
+\end{verbatim}
+\atop
+\epsfbox{mpgraph.4}
+$$
+\caption{The 1991 age distribution graph and the input that creates it.}
+\label{fig4}
+\end{figure}
+
+% strings for big coordinates
+
+Notice that the syntax for {\tt setrange} allows coordinate values to be given
+as strings. Many commands in the graph package allow this option. It is
+provided because the MetaPost language uses fixed point numbers that must be
+less than 32768. This limitation is not as serious as it sounds because good
+graph design dictates that coordinate values should be ``of reasonable
+magnitude''~\cite{Cleve85,Tufte83}. If you really want $x$ and $y$
+to range from 0 to 1,000,000,
+$$ \hbox{\tt setrange(origin, "1e6",\,"1e6")} $$
+does the job. Any fixed or floating point representation is acceptable
+as long as the exponent is introduced by the letter ``{\tt e}''.
+
+% setcoords
+
+Coordinate systems need not be linear. The {\tt setcoords} command allows
+either or both axes to have logarithmic spacing:
+\begin{ctabbing}
+$\tt \descr{coordinate setting} \rightarrow setcoords\hbox{\tt (}
+ \descr{coordinate type}\hbox{\tt ,}\,\descr{coordinate type}\hbox{\tt )}$\\
+$\tt \descr{coordinate type} \rightarrow
+ log \;|\; linear \;|\; \hbox{\tt -}log \;|\; \hbox{\tt -}linear$
+\end{ctabbing}
+A negative \tdescr{coordinate type} makes $x$ (or $y$) run backwards so it is
+largest on the left side (or bottom) of the graph.
+
+Figure~\ref{fig5} graphs execution times for two matrix multiplication algorithms
+using
+$$ \hbox{\tt setcoords(log,log)} $$
+to specify logarithmic spacing on both axes. The data file {\tt matmul.d} gives
+timings for both algorithms:\\
+\hbox to\hsize{\footnotesize\hfil$
+\begin{verbatim}
+20 .007861 standard MM: size, seconds
+30 .022051
+40 .050391
+60 .15922
+80 .4031
+120 1.53
+160 3.915
+240 18.55
+320 78.28
+480 279.24
+
+20 .006611 Strassen: size, seconds
+30 .020820
+40 .049219
+60 .163281
+80 .3975
+120 1.3125
+160 3.04
+240 9.95
+320 22.17
+480 72.60
+\end{verbatim}
+\hfil$}
+A blank line in a data file ends a data set. Subsequent {\tt gdraw} commands
+access additional data sets by just naming the same data file again.
+Since each line gives one $x$~coordinate and one $y$~coordinate, commentary
+material after the second data field on a line is ignored.
+
+\begin{figure}[htp]
+$$ \mathcenter{\epsfbox{mpgraph.5}}
+ \quad
+\begin{BVerbatim}[baseline=c]
+draw begingraph(2.3in,2in);
+ setcoords(log,log);
+ glabel.lft(btex Seconds etex,OUT);
+ glabel.bot(btex Matrix size etex,
+ OUT);
+ gdraw "matmul.d" dashed evenly;
+ glabel.ulft(btex Standard etex,8);
+ gdraw "matmul.d";
+ glabel.lrt(btex Strassen etex,7);
+ endgraph;
+\end{BVerbatim}
+$$
+\caption{Timings for two matrix multiplication algorithms with the corresponding
+ MetaPost input.}
+\label{fig5}
+\end{figure}
+
+Placing a {\tt setcoords} command between two {\tt gdraw} commands graphs two
+functions in different coordinate systems as shown in Figure~\ref{fig6}.
+Whenever you give a {\tt setcoords} command, the interpreter examines what has
+been drawn, selects appropriate $x$ and $y$ ranges, and scales everything to
+fit. Everything drawn afterward is in a new coordinate system that need not
+have anything in common with the old coordinates unless {\tt setrange} commands
+enforce similar coordinate ranges. For instance, the two {\tt setrange}
+commands force both coordinate systems to have $x$ ranging from 80 to~90 and
+$y$~starting at 0.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+draw begingraph(6.5cm,4.5cm);
+ setrange(80,0, 90,whatever);
+ glabel.bot(btex Year etex, OUT);
+ glabel.lft(btex \vbox{\hbox{Emissions in} \hbox{thousands of}
+ \hbox{metric tons} \hbox{(heavy line)}}etex, OUT);
+ gdraw "lead.d" withpen pencircle scaled 1.5pt;
+ autogrid(,otick.lft);
+ setcoords(linear,linear);
+ setrange(80,0, 90,whatever);
+ glabel.rt(btex \vbox{\hbox{Micrograms} \hbox{per cubic}
+ \hbox{meter of air} \hbox{(thin line)}}etex, OUT);
+ gdraw "lead.d";
+ autogrid(otick.bot,otick.rt);
+ endgraph;
+\end{verbatim}
+ \atop
+\mathcenter{\epsfbox{mpgraph.6}}
+$$
+\caption{Annual lead emissions and average level at atmospheric monitoring
+ stations in the United States. The MetaPost input is shown above
+ the graph.}
+\label{fig6}
+\end{figure}
+
+% autogrid
+
+When you use multiple coordinate systems, you have to specify where the axis
+labels go. The default is to put tick marks on the bottom and the left side of
+the frame using the coordinate system in effect when the {\tt endgraph} command
+is interpreted. Figure~\ref{fig6} uses the
+$$ \hbox{\tt autogrid(,otick.lft)} $$
+to label the left side of the graph with the $y$~coordinates in effect before
+the {\tt setcoords} command. This suppresses the default axis labels, so another
+{\tt autogrid} command is needed to label the bottom and right sides of the
+graph using the new coordinate system. The general syntax is
+$$ \hbox{$\tt autogrid\hbox{\tt (}\descr{axis label command}\hbox{\tt ,}\,
+ \descr{axis label command}\hbox{\tt )}\ \descr{option list}$}
+$$
+where
+\begin{ctabbing}
+$\tt \descr{axis label command} \rightarrow \descr{empty}
+ \;|\; \descr{grid or tick}\, \descr{label suffix}$\\
+$\tt \descr{grid or tick} \rightarrow grid \;|\; itick \;|\; otick$
+\end{ctabbing}
+The \tdescr{label suffix} should be {\tt lft}, {\tt rt}, {\tt top},
+or {\tt bot}.
+
+The first argument to {\tt autogrid} tells how to label the $x$~axis and the
+second argument does the same for~$y$. An \tdescr{empty} argument suppresses
+labeling for that axis. Otherwise, the \tdescr{label suffix} tells which side
+of the graph gets the numeric label. Be careful to use {\tt bot} or {\tt top}
+for the $x$~axis and {\tt lft} or {\tt rt} for the $y$~axis. Use {\tt otick}
+for outward tick marks, {\tt itick} for inward tick marks, and {\tt grid} for
+grid lines. The \tdescr{option list} tells how to draw the tick marks or grid
+lines. Grid lines tend to be a little overpowering, so it is a good idea to
+give a {\tt withcolor} option to make them light gray so they do not make the
+graph too busy.
+
+
+\subsection{Explicit Grids and Framing}
+
+% otick, itick, grid, (format)
+
+In case {\tt autogrid} is not flexible enough, axis label commands generate
+grid lines or tick marks one at a time. The syntax is
+$$ \descr{grid or tick}\hbox{\tt .}\descr{label suffix}
+ \hbox{\tt ($\descr{label format}$,\,$\descr{numeric or string expression}$)}
+ \ \descr{option list}
+$$
+where \tdescr{grid or tick} and \tdescr{label suffix} are as in {\tt autogrid},
+and \tdescr{label format} is either a format string like \verb|"%g"| or a
+picture containing the typeset numeric label.
+
+The axis label commands use a macro
+$$ \hbox{\tt format($
+ \descr{format string}$,\,$\descr{numeric or string expression}$)}
+$$
+to typeset numeric labels. Full details appear in Section~\ref{formsec},
+but when the \tdescr{format string} is \verb|"%g"|, it uses decimal notation
+unless the number is large enough or small enough to require scientific notation.
+
+The example in Figure~\ref{fig7} invokes
+$$ \hbox{\verb|format("%g",y)|} $$
+explicitly so that grid lines can be placed at transformed coordinates.
+It defines the transformation ${\tt newy}(y)=y/75+\ln y$ and shows that
+this function increases almost linearly.\footnote{The manual~\cite{ho:mp3}
+explains how {\tt vardef} defines functions and {\tt mlog} computes logarithms.}
+This is a little like using logarithmic $y$-coordinates, except that $y$ is
+mapped to $y/75+\ln y$ instead of just $\ln y$.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+vardef newy(expr y) = (256/75)*y + mlog y enddef;
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Population} \hbox{in millions}} etex, OUT);
+ gdraw "ttimepop.d";
+ for y=5,10,20,50,100,150,200,250:
+ grid.lft(format("%g",y), newy(y)) withcolor .85white;
+ endfor
+ autogrid(grid.bot,) withcolor .85white;
+ frame.llft;
+ endgraph;
+\end{verbatim}
+ \atop
+ \epsfbox{mpgraph.7}
+$$
+\caption{Population of the United States in millions versus time with the
+ population re-expressed as $p/75+\ln p$. The MetaPost input shown
+ above the graph assumes a data file {\tt ttimepop.d} that gives
+ (year, $p/75+\ln p$) pairs.}
+\label{fig7}
+\end{figure}
+
+% frame
+
+Figure~\ref{fig7} uses the command
+$$ \hbox{\tt frame.} \descr{label suffix}\ \descr{option list} $$
+to draw a special frame around the graph. In this case the \tdescr{label suffix}
+is {\tt llft} to draw just the bottom and left sides of the frame. Suffixes
+{\tt lrt}, {\tt ulft}, and {\tt urt} draw other combinations of two sides;
+suffixes {\tt lft}, {\tt rt}, {\tt top}, {\tt bot} draw one side, and \tdescr{empty}
+draws the whole frame. For example
+$$ \hbox{\verb|frame dashed evenly|} $$
+draws all four sides with dashed lines. The default four-sided frame is drawn
+only when there is no explicit {\tt frame} command.
+
+% auto, (sarith.mp)
+
+To label an axis as {\tt autogrid} does but with the labels transformed
+somehow, use
+$$ \hbox{{\tt auto.x}\quad or\quad {\tt auto.y}} $$
+for positioning tick marks or grid lines. These macros produce comma-separated
+lists for use in {\tt for} loops. Any $x$ or $y$ values in these lists that
+cannot be represented accurately within MetaPost's fixed-point number system
+are given as strings. A standard macro package that is loaded via
+$$ \hbox{\tt input sarith} $$
+defines arithmetic operators that work on numbers or strings. Binary operators
+{\tt Sadd}, {\tt Ssub}, {\tt Smul}, and {\tt Sdiv} do addition, subtraction
+multiplication, and division.
+
+One possible application is rescaling data.
+Figure~\ref{fig4} used a special data file {\tt agepopm.d} that had $y$~values
+divided by one million. This could be avoided by replacing
+``{\tt gdraw "agepopm.d"}'' by
+$$\begin{verbatim}
+gdraw "agepop91.d";
+for u=auto.y: otick.lft(format("%g",u Sdiv "1e6"), u); endfor
+autogrid(otick.bot,)
+\end{verbatim}
+$$
+
+
+\subsection{Processing Data Files}
+\label{dfilesec}
+
+% gdata
+
+The most general tool for processing data files is the {\tt gdata} command:
+$$ \hbox{\tt gdata(} \descr{string expression} \hbox{\tt,}\, \descr{variable}
+ \hbox{\tt,}\, \descr{commands} \hbox{\tt )}
+$$
+It takes a file name, a variable~$v$, and a list of commands to be executed for
+each line of the data file. The commands are executed with {\tt i} set to the
+input line number and strings $v${\tt 1}, $v${\tt 2}, $v${\tt 3}, \ldots\ set
+to the input fields on the current line. A null string marks the end of the
+$v$ array.
+
+Using a {\tt glabel} command inside of {\tt gdata} generates a scatter plot
+as shown in Figure~\ref{fig8}. The data file {\tt countries.d} begins
+$$\begin{verbatim}
+20.910 75.7 US
+ 1.831 66.7 Alg
+\end{verbatim}
+$$
+where the last field in each line gives the label to be plotted. Setting
+{\tt defaultfont} in the first line of input selects a small font for these
+labels. Without these labels, no {\tt gdata} command would be needed.
+Replacing the {\tt gdata} command with
+$$ \hbox{\verb|gdraw "countries.d" plot btex$\circ$etex|} $$
+would change the abbreviated country names to open circles.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+defaultfont:="cmr7";
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Life}\hbox{expectancy}} etex, OUT);
+ glabel.bot(btex Per capita G.N.P. (thousands of dollars) etex, OUT);
+ setcoords(log,linear);
+ gdata("countries.d", s,
+ glabel(s3, s1, s2);
+ )
+ endgraph;
+\end{verbatim}
+ \atop
+ \epsfbox{mpgraph.8}
+$$
+\caption{A scatter plot and the commands that generated it}
+\label{fig8}
+\end{figure}
+
+Both {\tt gdraw} and {\tt gdata} ignore an optional initial `\%' on each input
+line, parse data fields separated by white space, and stop if they encounter an
+input line with no data fields. Leading percent signs make graph data
+look like MetaPost comments so that numeric data can be placed at the beginning
+of a MetaPost input file.
+
+% augment
+
+It is often useful to construct one or more paths when reading a data file
+with {\tt gdata}. The {\tt augment} command is designed for this:
+$$ \hbox{\tt augment.} \descr{path variable} \hbox{\tt(}\descr{coordinates}\hbox{\tt)}
+$$
+If the path variable does not have a known value, it becomes a path of length
+zero at the given coordinates; otherwise a line segment to the given coordinates
+is appended to the path. The \tdescr{coordinates} may be a pair expression or
+any combination of strings and numerics as explained at the beginning of
+Section~\ref{coords}.
+
+If a file {\tt timepop.d} gives $t$,~$p$ pairs, {\tt augment} can be used like
+this to graph {\tt newy(}$p${\tt)} versus~$t$:
+$$\begin{verbatim}
+path p;
+gdata("timepop.d", s, augment.p(s1, newy(scantokens s2)); );
+gdraw p;
+\end{verbatim}
+$$
+(MetaPost's {\tt scantokens} primitive interprets a string as if it were the
+contents of an input file. This finds the numeric value of data field
+{\tt s2}.)
+
+% gfill (energy.d)
+
+Figure~\ref{fig9} shows how to use {\tt augment} to read multiple column data
+and make multiple paths. Paths {\tt p2}, {\tt p3}, {\tt p4}, {\tt p5} give
+cumulative totals for columns 2 through 5 and pictures {\tt lab2} through
+{\tt lab5} give corresponding labels. The expression
+$$ \hbox{\verb|image(unfill bbox lab[j]; draw lab[j])|} $$
+executes the given drawing commands and returns the resulting picture:
+``{\tt unfill bbox lab[j]}'' puts down a white background and ``{\tt draw
+lab[j]}'' puts the label on the background.
+The {\tt gfill} command is just like {\tt gdraw}, except it takes a cyclic
+path and fills the interior with a solid color. The color is black unless
+a {\tt withcolor} clause specifies another color.
+See the manual~\cite{ho:mp3} for
+explanations of {\tt for} loops, arrays, colors, and path construction
+operators like \verb|--|, {\tt cycle}, and {\tt reverse}.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+draw begingraph(3in,2in);
+ glabel.lft(btex \vbox{\hbox{Quadrillions}\hbox{of BTU}} etex, OUT);
+ path p[];
+ numeric t;
+ gdata("energy.d", $,
+ t:=0; augment.p1($1,0);
+ for j=2 upto 5:
+ t:=t+scantokens $[j]; augment.p[j]($1,t);
+ endfor)
+ picture lab[];
+ lab2=btex coal etex; lab3=btex crude oil etex;
+ lab4=btex natural gas etex; lab5=btex hydroelectric etex;
+ for j=5 downto 2:
+ gfill p[j]--reverse p[j-1]--cycle withcolor .16j*white;
+ glabel.lft(image(unfill bbox lab[j]; draw lab[j]), .7+length p[j]);
+ endfor
+ endgraph;
+\end{verbatim}
+ \atop
+ \epsfbox{mpgraph.9}
+$$
+\caption{A graph of U.S. annual energy production
+ and the commands that generated it}
+\label{fig9}
+\end{figure}
+
+
+\section{Manipulating Big Numbers}
+\label{nummac}
+
+MetaPost inherits a fixed-point number system from Knuth's \MF~\cite{kn:d}.
+Numbers are expressed in multiples of $2^{-16}$ and they must have absolute
+value less than 32768. Knuth chose this system because it is perfectly adequate
+for font design, and it guaranteed to give identical results on all types of
+computers. Fixed-point numbers are seldom a problem in MetaPost because all
+computations are based on coordinates that are limited by the size the paper on
+which the output is to be printed. This does not hold for the input data in a
+graph-drawing application. Although graphs look best when coordinate axes are
+labeled with numbers of reasonable magnitude, the strict limits of fixed-point
+arithmetic would be inconvenient.
+
+% Sadd, Ssub, Smul, Sdiv
+
+A simple way to handle large numbers is to include the line
+$$ \hbox{\tt input sarith} $$
+and then use binary operators {\tt Sadd}, {\tt Ssub}, {\tt Smul}, and {\tt Sdiv}
+in place of \verb|+|, \verb|-|, \verb|*|, and \verb|/|. These operators are
+inefficient but very flexible. They accept numbers or strings and return
+strings in exponential notation with the exponent marked by ``{\tt e}'';
+e.g., \verb|"6.7e-11"| means $6.7\times10^{-11}$.
+
+% Sabs, Sleq, Sneq
+
+The unary operator\footnote{The argument to a unary operator need not be
+parenthesized unless it is an expression involving binary operators.}
+$$ {\tt Sabs}\ \descr{string} $$
+finds a string the represents the absolute value. Binary operators {\tt Sleq}
+and {\tt Sneq} perform numeric comparisons on strings and return boolean
+results.
+
+% Scvnum
+
+The operation
+$$ {\tt Scvnum}\ \descr{string} $$
+finds the numeric value for a string if this can be done without overflowing
+MetaPost's fixed-point number system. If the string does not contain
+``{\tt e}'', it is much more efficient to use the primitive operation
+$$ {\tt scantokens}\ \descr{string} $$
+
+% Mten
+
+The above operators are based on a low-level package that manipulates numbers
+in ``{\tt Mlog} form.'' A number $x$ in {\tt Mlog} form represents
+$$ \mu^{2^{16}x}, \quad {\rm where\ } \mu=-e^{2^{-24}}. $$
+Any value between $1.61\times10^{-28}$ and $3.88\times10^{55}$ can be
+represented this way. (There is a constant {\tt Mten} such that $k*{\tt Mten}$
+represents $10^k$ for any integer~$k$ in the interval $[-29,55]$.)
+
+% Mreadpath, Gpaths
+
+The main reason for mentioning {\tt Mlog} form is that it allows graph data
+to be manipulated as a MetaPost path. The function
+$$ \hbox{\tt Mreadpath($\descr{file name}$)} $$
+reads a data file and returns a path where all the coordinates are in
+{\tt Mlog} form. An internal variable {\tt Gpaths} determines whether
+{\tt gdraw} and {\tt gfill} expect paths to be given in {\tt Mlog} form.
+For example, this graphs the data in {\tt agepop91.d} with $y$ coordinates
+divided by one million:
+$$\begin{verbatim}
+interim Gpaths:=log;
+gdraw Mreadpath("agepop91.d") shifted (0,-6*Mten);
+\end{verbatim}
+$$
+
+
+\section{Typesetting Numbers}
+\label{formsec}
+
+% format
+
+The graph package needs to compute axis labels and then typeset them.
+The macro
+$$ \hbox{\tt format($\descr{string expression}$,\,%
+ $\descr{numeric or string expression}$)} $$
+does this. You must first {\tt input graph} or {\tt input format} to load the
+macro file. The macro takes a format string and a number to typeset and returns
+a picture containing the typeset result. Thus
+$$ \hbox{\verb|format("%g",2+2)|}\quad {\rm yields}\quad \epsfbox{mpgraph.10} $$
+and
+$$ \hbox{\verb|format("%3g","6.022e23")|}
+ \quad {\rm yields}\quad \epsfbox{mpgraph.11}
+$$
+
+A format string consists of
+\begin{itemize}
+\item an optional initial string not containing a percent sign,
+\item a percent sign,
+\item an optional numeric precision $p$,
+\item one of the conversion letters {\tt e}, {\tt f}, {\tt g}, {\tt G},
+\item an optional final string $\beta$.
+\end{itemize}
+The initial and final strings are typeset in the default font (usually
+{\tt cmr10}), and the typeset number is placed between them. For the {\tt e}
+and {\tt g} formats, the precision~$p$ is the number of significant digits
+allowed after rounding; for {\tt f} and {\tt G}, the number is rounded to the
+nearest multiple of $10^{-p}$. If the precision is not specified, the default
+is $p=3$. The {\tt e} format always uses scientific
+notation and the {\tt f} format uses ordinary decimal notation but reverts to
+scientific notation if the number is at least 10000. The {\tt g} and {\tt G}
+formats also revert to scientific notation for non-zero numbers of magnitude
+less than 0.001.
+
+% init_numbers
+
+The {\tt format} macro needs a set of templates to determine what font to use,
+how to position the exponent, etc. The templates are normally initialized
+automatically, but it is possible to set them explicitly by passing five picture
+expressions to {\tt init\_numbers}. For instance, the default definition for
+\TeX\ users is
+$$\begin{verbatim}
+init_numbers(btex$-$etex, btex$1$etex, btex${\times}10$etex,
+ btex${}^-$etex, btex${}^2$etex)
+\end{verbatim}
+$$
+The first argument tells how to typeset a leading minus sign;
+the second argument is an example of a 1-digit mantissa;
+third comes whatever to put after the mantissa in scientific notation;
+next come a leading minus sign for the exponent and a sample 1-digit exponent.
+
+% Fe_plus, Fe_base
+
+Picture variable \verb|Fe_plus| gives a leading plus sign for positive numbers,
+and \verb|Fe_base| gives whatever should precede the exponent when typesetting
+a power of ten. Calling \verb|init_numbers| initializes \verb|Fe_plus| to an
+empty picture and constructs \verb|Fe_base| from its second and third arguments.
+
+
+
+\section{Conclusion}
+\label{concl}
+
+The graph package makes it convenient to generate graphs from within the MetaPost
+language. The primary benefits are the power of the MetaPost language and its
+ability to interact with \TeX\ or troff for typesetting labels. Typeset labels
+can be stored in picture variables and manipulated in various ways such measuring
+the bounding box and providing a white background.
+
+We have seen how to generate shaded regions and control line width, color, and
+styles of dashed lines. Numerous other variations are possible.
+The full MetaPost language~\cite{ho:mp3} provides many other potentially useful
+features. It also has enough computing power to be useful for generating and
+processing data.
+
+
+
+\appendix
+\section{Summary of the Graph Package}
+\label{summsec}
+
+% Not described elsewhere: gdrawarrow, gdrawdblarrow, Gmarks, Gminlog, Autoform
+
+In the following descriptions, italic letters such as $w$ and $h$ denote
+expression parameters and words in angle brackets denote other syntactic
+elements. Unless specified otherwise, expression parameters can be either
+numerics or strings. An \tdescr{option list} is a list of drawing options such
+as {\tt withcolor .5white} or {\tt dashed evenly};
+a \tdescr{label suffix} is one of {\tt lft}, {\tt rt}, {\tt top}, {\tt bot},
+{\tt ulft}, {\tt urt}, {\tt llft}, {\tt lrt}.
+
+\subsection{Graph Administration}
+
+\begin{description}
+\item[{\tt begingraph($w$,$h$)}]
+ Begin a new graph with the frame width and height given by numeric
+ parameters $w$ and $h$.
+\item[{\tt endgraph}]
+ End a graph and return the resulting picture.
+\item[{\tt setcoords($t_x$,\,$t_y$)}]
+ Set up a new coordinate system as specified by numeric flags $t_x$,
+ $t_y$. Flag values are $\pm{\tt linear}$ and $\pm{\tt log}$.
+\item[{\tt setrange($\descr{coordinates}$,\,$\descr{coordinates}$)}]
+ Set the lower and upper limits for the current coordinate system.
+ Each \tdescr{coordinates} can be a single pair expression or two
+ numeric or string expressions.
+\end{description}
+
+\subsection{Drawing and Labeling}
+
+All of the drawing and labeling commands can be followed by an
+\tdescr{option list}. In addition to the usual MetaPost drawing options, the
+list can contain a {\tt plot} \tdescr{picture} clause to plot a specified
+picture at each data point.
+
+The drawing and labeling commands are closely related to a set of similarly
+named commands in plain MetaPost. The {\tt gdrawarrow} and {\tt gdrawdblarrow}
+commands are included to maintain this relationship.
+
+\begin{description}
+\item[{\tt gdotlabel.$\descr{label suffix}$($p$,\,$\descr{location}$)}]
+ This is like {\tt glabel} except it also puts a dot at the location
+ being labeled.
+\item[{\tt gdraw $p$}]
+ Draw path $p$, or if $p$ is a string, read coordinate pairs from
+ file~$p$ and draw a polygonal line through them.
+\item[{\tt gdrawarrow $p$}]
+ This is like {\tt dgraw} $p$ except it adds an arrowhead at the end of
+ the path.
+\item[{\tt gdrawdblarrow $p$}]
+ This is like {\tt dgraw} $p$ except it adds an arrowheads at each end of
+ the path.
+\item[{\tt gfill $p$}]
+ Fill cyclic path~$p$ or read coordinates from the file named by
+ string~$p$ and fill the resulting polygonal outline.
+\item[{\tt glabel.$\descr{label suffix}$($p$,\,$\descr{location}$)}]
+ If $p$ is not a picture, it should be a string. Typeset it using
+ {\tt defaultfont}, then place it near the given location and offset as
+ specified by the \tdescr{label suffix}. The \tdescr{location} can be
+ $x$~and $y$ coordinates, a pair giving $x$~and $y$, a numerc value giving
+ a time on the last path drawn, or {\tt OUT} to label the outside of the
+ graph.
+\end{description}
+
+\subsection{Grids, Tick Marks, and Framing}
+
+\begin{description}
+\item[{\tt auto.}$\descr{{\tt x} or {\tt y}}$]
+ Generate default $x$ or $y$ coordinates for tick marks.
+\item[{\tt autogrid($\descr{axis label command}$,\,$\descr{axis label command}$)}]
+ Draw default axis labels using the specified commands for the $x$ and
+ $y$ axes. An \tdescr{axis label command} may be \tdescr{empty} or it
+ may be {\tt itick}, {\tt otick}, or {\tt grid} followed by a
+ \tdescr{label suffix}.
+\item[{\tt frame.}$\descr{label suffix}$\ $\descr{option list}$]
+ Draw a frame around the graph, or draw the part of the frame specified
+ by the \tdescr{label suffix}.
+\item[{\tt grid.}$\descr{label suffix}$($f$,$z$)]
+ Draw a grid line across the graph from the side specified by the
+ \tdescr{label suffix}, and label it there using format string~$f$ and
+ coordinate value~$z$. If $f$ is a picture, it gives the label.
+\item[{\tt itick.}$\descr{label suffix}$($f$,$z$)]
+ This is like {\tt grid} except it draws an inward tick mark.
+\item[{\tt otick.}$\descr{label suffix}$($f$,$z$)]
+ This is like {\tt grid} except it draws an outward tick mark.
+\end{description}
+
+\subsection{Miscellaneous Commands}
+
+\begin{description}
+\item[{\tt augment.$\descr{variable}$($\descr{coordinates}$)}]
+ Append \tdescr{coordinates} to the path stored in \tdescr{variable}.
+\item[{\tt format($f$,\,$x$)}]
+ Typeset $x$ according to format string~$f$ and return the resulting
+ picture.
+\item[{\tt gdata($f$,\,$\descr{variable}$,\,$\descr{commands}$)}]
+ Read the file named by string~$f$ and execute \tdescr{commands} for each
+ input line using the \tdescr{variable} as an array to store data fields.
+\item[{\tt init\_numbers($s$,\,$m$,\,$x$,\,$t$,\,$e$)}]
+ Provide five pictures as templates for future {\tt format} operations:
+ $s$ is a leading minus; $m$ is a sample mantissa; $x$ follows the
+ mantissa; $t$ is a leading minus for the exponent~$e$.
+\item[{\tt Mreadpath($f$)}]
+ Read a path for the data file named by string~$f$ and return it in
+ ``{\tt Mlog} form''.
+\end{description}
+
+\subsection{Arithmetic on Numeric Strings}
+
+It is necessary to {\tt input sarith} before using the following macros:
+\begin{description}
+\item[{\tt Sabs $x$}]
+ Compute $|x|$ and return a numeric string.
+\item[{\tt $x$ Sadd $y$}]
+ Compute $x+y$ and return a numeric string.
+\item[{\tt Scvnum $x$}]
+ Return the numeric value for string $x$.
+\item[{\tt $x$ Sdiv $y$}]
+ Compute $x/y$ and return a numeric string.
+\item[{\tt $x$ Sleq $y$}]
+ Return the boolean result of the comparison $x\leq y$.
+\item[{\tt $x$ Smul $y$}]
+ Compute $x*y$ and return a numeric string.
+\item[{\tt $x$ Sneq $y$}]
+ Return the boolean result of the comparison $x\neq y$.
+\item[{\tt $x$ Ssub $y$}]
+ Compute $x-y$ and return a numeric string.
+\end{description}
+
+\subsection{Internal Variables and Constants}
+
+\begin{description}
+\item[{\tt Autoform}]
+ Format string used by {\tt autogrid}. Default: \verb|"%g"|.
+\item[{\tt Fe\_base}]
+ What precedes the exponent when typesetting a power of ten.
+\item[{\tt Fe\_plus}]
+ Picture of the leading plus sign for positive exponents.
+\item[{\tt Gmarks}]
+ Minimum number of tick marks per axis for {\tt auto} and {\tt autogrid}.
+ Default: 4.
+\item[{\tt Gminlog}]
+ Minimum largest/smallest ratio for logarithmic spacing with {\tt auto}
+ and {\tt autogrid}. Default: 3.0.
+\item[{\tt Gpaths}]
+ Code for coordinates used in {\tt gdraw} and {\tt gfill} paths:
+ {\tt linear} for standard form, {log} for ``{\tt Mlog} form''.
+\item[{\tt Mten}]
+ The ``{\tt Mlog} form'' for 10.0
+\end{description}
+
+
+
+\section{New Language Features}
+\label{nfeats}
+
+The {\tt graph.mp} macros and the arithmetic routines in {\tt marith.mp}
+and {\tt sarith.mp} use various language features that were introduced
+in Version 0.60 of the MetaPost language. We summarize these features here
+because they are not covered in existing documentation \cite{ho:mp3,ho:mp4}.
+Also new is the built-in macro
+$$ \hbox{\tt image($\descr{drawing commands}$)} $$
+that was used in Section~\ref{dfilesec} to find the picture produced by a
+sequence of drawing commands.
+
+\subsection{Reading and Writing Files}
+
+A new operator
+$$ {\tt readfrom}\ \descr{file name} $$
+returns a string giving the next line of input from the named file. The
+\tdescr{file name} can be any primary expression of type string. If the file
+has ended or cannot be read, the result is a string consisting of a single
+null character. The preloaded {\tt plain} macro package introduces the name
+{\tt EOF} for this string. After {\tt readfrom} has returned {\tt EOF},
+additional reads from the same file cause the file to be reread from the
+start.
+
+The opposite of {\tt readfrom} is the command
+$$ {\tt write}\ \descr{string expression}\ {\tt to} \descr{file name} $$
+This writes a line of text to the specified output file, opening the file
+first if necessary. All such files are closed automatically when the
+program terminates. They can also be closed explicitly by using {\tt EOF}
+as the \tdescr{string expression}. The only way to tell if a {\tt write}
+command has succeeded is to close the file and use {\tt readfrom} to look
+at it.
+
+\subsection{Extracting Information from Pictures}
+
+MetaPost pictures are composed of stroked lines, filled outlines, pieces
+of typeset text, clipping paths, and {\tt setbounds} paths. (A {\tt setbounds}
+path gives an artificial bounding box as is needed for \TeX\ output.)
+A picture can have many components of each type. They can be accessed via
+an iteration of the form
+$$ {\tt for}\ \descr{symbolic token}\ {\tt within}\
+ \descr{picture expression}\hbox{\tt:}\ \descr{loop text}\ {\tt endfor}
+$$
+The \tdescr{loop text} can be anything that is balanced with respect to
+{\tt for} and {\tt endfor}. The \tdescr{symbolic token} is a loop variable that
+scans the components of the picture in the order in which they were drawn. The
+component for a clipping or {\tt setbounds} path includes everything the path
+applies to. Thus if a single clipping or {\tt setbounds} path applies to
+everything in the \tdescr{picture expression}, the whole picture could be
+thought of as one big component. In order to make the contents of such a picture
+accessible, the {\tt for}\ldots{\tt within} iteration ignores the enclosing
+clipping or {\tt setbounds} path in this case.
+
+Once the {\tt for}\ldots{\tt within} iteration has found a picture component,
+there are numerous operators for identifying it and extracting relevant
+information. The operator
+$$ {\tt stroked}\ \descr{primary expression} $$
+tests whether the expression is a known picture whose first component is a
+stroked line. Similarly, the {\tt filled} and {\tt textual} operators
+return {\tt true} if the first component is a filled outline or a piece of
+typeset text. The {\tt clipped} and {\tt bounded} operators test whether
+the argument is a known picture that starts with a clipping path or a
+{\tt setbounds} path. This is true if the first component is clipped or
+bounded or if the entire picture is enclosed in a clipping or {\tt setbounds}
+path.
+
+There are also numerous part extraction operators that test the first component
+of a picture. If {\tt p} is a picture and {\tt stroked p} is true,
+{\tt pathpart p} is the path describing the line that got stroked,
+{\tt penpart p} is the pen that was used, {\tt dashpart p} is the dash
+pattern, and the color is
+$$ \hbox{\tt (redpart p, greenpart p, bluepart p)} $$
+If the line is not dashed, {\tt dashpart p} returns an empty picture.
+
+The same part extraction operators work when {\tt filled p} is true, except
+that {\tt dashpart p} is not meaningful in that case. For text components,
+{\tt textual p} is true, {\tt textpart p} gives the text that got
+typeset, {\tt fontpart p} gives the font that was used, and {\tt xpart~p},
+{\tt ypart~p}, {\tt xxpart~p}, {\tt xypart~p}, {\tt yxpart~p}, {\tt yypart~p}
+tell how the text has been shifted, rotated, and scaled. The {\tt redpart},
+{\tt greenpart}, and {\tt bluepart} operators also work for text components.
+
+When {\tt clipped p} or {\tt bounded p} is true, {\tt pathpart p} gives the
+clipping or {\tt setbounds} path and the other part extraction operators are
+not meaningful. Such non-meaningful part extractions do not generate
+errors---they return null values instead:
+the trivial path {\tt (0,0)} for {\tt pathpart},
+{\tt nullpen} for {\tt penpart},
+an empty picture for {\tt dashpart},
+zero for {\tt redpart}, {\tt greenpart}, {\tt bluepart},
+and the null string for {\tt textpart} or {\tt fontpart}.
+
+One final operator for extracting information from a picture is
+$$ {\tt length}\ \descr{picture primary} $$
+This returns the number of components that a {\tt for}\ldots {\tt within}
+iteration would find.
+
+\subsection{Other New Features}
+
+The {\tt marith.mp} and {\tt sarith.mp} packages use numbers of magnitude
+4096 more. Since such numbers can cause overflow problems in MetaPost's
+linear equation solving and path fitting algorithms, they are normally
+allowed only as intermediate results. This limitation is removed when
+the internal variable {\tt warningcheck} is zero. In earlier versions
+of MetaPost, the limitation could be removed for variables but explicit
+constants were always restricted to be less than 4096.
+
+For completeness, we also mention one other new feature of MetaPost
+Version 0.60. When \TeX\ material is included in a picture via the
+{\tt btex}\ldots{\tt etex} feature, the thickness of horizontal and
+vertical rules gets rounded to exactly the right number of pixels; i.e.,
+interpreting MetaPost output according to the PostScript\regmark\ scan
+conversion rules~\cite{ad:red} makes the pixel width equal to the ceiling
+of the unrounded width. In fact, a similar relationship holds for all line
+widths. The generated PostScript sets line widths by first transforming
+to device coordinates and rounding appropriately.
+
+
+
+
+
+
+\bibliographystyle{plain}
+\bibliography{mpgraph}
+
+
+
+
+\end{document}
+
+
+
+% Copyright 1990 - 1995 by AT&T Bell Laboratories.
+
+% Permission to use, copy, modify, and distribute this software
+% and its documentation for any purpose and without fee is hereby
+% granted, provided that the above copyright notice appear in all
+% copies and that both that the copyright notice and this
+% permission notice and warranty disclaimer appear in supporting
+% documentation, and that the names of AT&T Bell Laboratories or
+% any of its entities not be used in advertising or publicity
+% pertaining to distribution of the software without specific,
+% written prior permission.
+
+% AT&T disclaims all warranties with regard to this software,
+% including all implied warranties of merchantability and fitness.
+% In no event shall AT&T be liable for any special, indirect or
+% consequential damages or any damages whatsoever resulting from
+% loss of use, data or profits, whether in an action of contract,
+% negligence or other tortious action, arising out of or in
+% connection with the use or performance of this software.
+
+% In addition, John Hobby, the original author of MetaPost and this
+% manual, makes the following requests:
+% - I request that it remain clear that I am the author of
+% "A User's Manual for MetaPost" and "Drawing Graphs with MetaPost".
+% - I request to be consulted before significant changes are made.
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpintro.bib b/Master/texmf-dist/doc/metapost/base/source/mpintro.bib
new file mode 100644
index 00000000000..dc90248f30b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpintro.bib
@@ -0,0 +1,48 @@
+@techreport{CSTR116,
+ author = "Kernighan, Brian W.",
+ title = "{PIC}---A Graphics Language for Typesetting",
+ type = "Computing Science Technical Report",
+ number = 116,
+ institution = "AT\&T Bell Laboratories",
+ address = "Murray Hill, New Jersey",
+ year = 1984
+}
+@incollection{ke:pic,
+ author = "Kernighan, Brian W.",
+ title = "Pic---A Graphics Language for Typesetting",
+ booktitle = "Unix Research System Papers, Tenth Edition",
+ publisher = "AT\&T Bell Laboratories",
+ pages = "53--77",
+ year = 1990
+}
+@book{kn:c,
+ key = "Knuth",
+ author = "D. E. Knuth",
+ title = "Computers and Typesetting",
+ volume = "C",
+ subtitle = "The {\MF}book",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+}
+@article{ho:mp1,
+ key = "Hobby",
+ author = "J. D. Hobby",
+ title = "A {\MF}-like System with {P}ost{S}cript Output",
+ journal = "Tugboat, the\/ {\TeX} User's Group Newsletter",
+ volume = 10,
+ number = 4,
+ pages = "505--512",
+ month = dec,
+ year = 1989
+}
+@book{kn:d,
+ key = "Knuth",
+ author = "D. E. Knuth",
+ title = "Computers and Typesetting",
+ volume = "D",
+ subtitle = "{\MF} the Program",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+}
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpintro.tex b/Master/texmf-dist/doc/metapost/base/source/mpintro.tex
new file mode 100644
index 00000000000..99e487c46dd
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpintro.tex
@@ -0,0 +1,878 @@
+\documentstyle{article}
+\input epsf
+
+\author{John D. Hobby}
+\title{The MetaPost System}
+
+\font\textt=cmtex10
+
+\makeatletter
+\def\logo{\global\font\logo=logo10 at1\@ptsize\p@ \logo}
+\def\logosl{\global\font\logosl=logosl10 at1\@ptsize\p@ \logosl}
+\def\MF{{\ifdim \fontdimen\@ne\font >\z@ \def\logo{\logosl}\fi
+ {\logo META}\-{\logo FONT}}}
+\makeatother
+
+\def\descr#1{{\langle\hbox{#1}\rangle}}
+\def\lit#1{{\hbox{\textt#1}}}
+\def\okbreak{\vfil\penalty2000 \vfilneg}
+
+{\obeylines\obeyspaces\gdef\startverbatim{%
+\vcenter\bgroup\textt\catcode`\$=12\catcode`\}=12\catcode`\{=12\catcode`\_=12%
+\catcode`\\=12\catcode`\#=12\catcode`\^=12\catcode`\%=0%
+\obeyspaces\let =\ \obeylines\let^^M=\cr\halign\bgroup##\hfil}}
+\def\stopverbatim{\egroup\egroup}
+
+\begin{document}
+\maketitle
+
+\begin{abstract}
+The MetaPost system implements a picture-drawing language very much like Knuth's
+\MF\ except that it outputs PostScript commands instead of run-length-encoded
+bitmaps. MetaPost is a powerful language for producing figures for documents
+to be printed on PostScript printers. It provides easy access to all the
+features of PostScript and it includes facilities for integrating text and
+graphics.
+
+This document describes the system and its implementation. It also includes
+basic user documentation to be used in conjunction with {\it The \MF book}.
+Much of the source code was copied from the \MF\ sources by permission from
+the author.
+\end{abstract}
+
+
+\section{Overview}
+The MetaPost system is based on Knuth's \MF\footnote{\MF\ is a trademark
+of Addison Wesley Publishing company.}~\cite{kn:c} and much of the source
+code is copied with permission from the \MF\ sources. MetaPost is a graphics
+language like \MF, but with new primitives for integrating text and graphics and
+for accessing special features of PostScript\footnote{PostScript is a
+trademark of Adobe Systems Inc.} such as clipping, shading, and
+dashed lines. The language has the main features of \MF\ including first-class
+objects for curves, pictures, affine transformations, and pen shapes.
+Another feature borrowed from \MF\ is the ability to solve linear equations
+that are given implicitly, thus allowing many programs to be written in a
+largely declarative style.
+
+While MetaPost could be used as a tool for generating PostScript fonts,
+the intended application is to generate figures for \TeX\footnote{\TeX\ is a
+trademark of the American Mathematical Society.} and {\it troff\/} documents.
+The figures can be integrated into a \TeX\ document via a freely available
+program called {\tt dvips} as shown in Figure~1.\footnote{The C source for
+{\tt dvips} comes with the web2c \TeX\ distribution. Similar programs are
+available from other sources.} A similar procedure works with troff: the
+{\tt dpost} output processor includes PostScript figures when they are
+requested via troff's {\tt \char`\\X} command.
+
+\begin{figure}[htp]
+$$ \def\fbox#1{\hbox{\vrule
+ \vbox{\hrule\kern5pt\hbox{\kern5pt\hbox{#1}\kern5pt}\kern5pt\hrule}%
+ \vrule}}
+ \vbox{
+ \halign{$\hfil#\hfil$&\hskip1in$\hfil#\hfil$\cr
+ \hbox{Figures in MetaPost}&
+ \hbox{\TeX\ Document}
+ \cr
+ \bigg\downarrow&
+ \bigg\downarrow
+ \cr
+ \fbox{\vrule height.2in depth.133in width0pt
+ \kern .1in MetaPost\kern.1in}
+ &
+ \fbox{\vrule height.2in depth.133in width0pt
+ \kern .167in \TeX\kern.167in}
+ \cr
+ \bigg\downarrow&
+ \bigg\downarrow
+ \cr
+ \hbox{Figures in PostScript}&
+ \hbox{{\tt dvi} file}
+ \cr
+ \bigg\downarrow&
+ \bigg\downarrow
+ \cr
+ \fbox{\vrule height.2in depth.133in width0pt
+ \kern 1in {\tt dvips} \kern1in}
+ \span\omit\cr
+ \bigg\downarrow\span\omit\cr
+ \hbox{PostScript}\span\omit\cr}}
+ \atop
+ \vbox{\noindent Fig.~1: A diagram of the processing for a \TeX\ document with figures
+ done in Meta\-Post}
+$$
+\end{figure}
+
+Other than the new commands for integrating text and accessing features of
+PostScript, the main difference between the \MF\ and MetaPost languages is
+that the latter deals with continuous pictures rather than discrete ones.
+This affects the coordinate system and some of the subtler aspects of the
+language as outlined in the next two sections.
+
+Sections \ref{basic} and \ref{advanced} give a short summary of the language
+with numerous examples. Then Section~\ref{impsec} describes the implementation.
+A preliminary description of the language has already appeared~\cite{ho:mp1}.
+
+\section{Introduction to MetaPost}
+\label{basic}
+MetaPost is a lot like Knuth's \MF\
+except that it outputs PostScript programs instead
+of bitmaps. Knuth describes the \MF\ language in {\sl The \MF book\/}.~\cite{kn:d}
+
+This document introduces MetaPost via examples and references to key parts of
+{\sl The \MF book}. It is a good idea to start by reading chapters 2~and 3
+in {\sl The \MF book}. The introductory material in these chapters applies
+to MetaPost except that coordinates are in units of
+PostScript points by default (72 units per inch).
+
+To see MetaPost in action, consider a file \lit{fig.mp} containing the
+following text:\vadjust{\okbreak}
+$$ \startverbatim
+beginfig(1);
+a=.7in; b=0.5in;
+z0=(0,0); z1=(a,0); z2=(0,b);
+z0=.5[z1,z3]=.5[z2,z4];
+draw z1..z2..z3..z4..cycle;
+drawarrow z0..z1;
+drawarrow z0..z2;
+label.top(btex $a$ etex, .5[z0,z1]);
+label.lft(btex $b$ etex, .5[z0,z2]);
+endfig;
+end
+%stopverbatim$$
+Then the command \lit{mp} \lit{fig} produces an output file \lit{fig.1}
+that can be included in a
+\TeX\ document. After \lit{\string\input} \lit{epsf} the \TeX\ commands
+\lit{\$\$\string\epsfbox\char`\{fig.1\char`\}\$\$} produce
+$$ \epsfbox{examples.1} $$
+The \lit{beginfig(1)} line means that everything up to the next
+\lit{endfig} is to be used to create \lit{fig.1}. If there
+were more than one figure in \lit{fig.mp}, there would be additional
+\lit{beginfig} $\ldots$ \lit{endfig} blocks.
+
+The \lit{drawarrow} macro has been specially developed for MetaPost.
+There is also a command called \lit{drawdblarrow} that draws the
+following path with arrowheads on both ends. The line beginning with
+\lit{label.top} is a call to a standard macro for positioning text just
+above a given point. In this case, the point \lit{.5[z0,z1]} is the
+midpoint of the segment from \lit{z0} to \lit{z1} and the text is
+generated by the \TeX\ commands \lit{\$a\$}. In addition to \lit{label.top}
+and \lit{label.lft}, there is also \lit{label.bot}, \lit{label.rt},
+and four other versions \lit{label.ulft} for upper-left etc. Just
+plain \lit{label} without any suffix centers the
+label on the given point.
+
+The discussion of pens in Chapter~4 of {\sl The \MF book\/} applies
+to MetaPost as well, but simple figures often do not need to refer to
+pens explicitly because they can just use the default pen which is a
+circle $0.5{\it bp}$ in diameter.\footnote{The letters ``{\it bp}''
+stand for ``big point'' ($1\over72$ inch). This is one of the standard
+units of measure in \TeX\ and \MF\ and it is the default unit for
+MetaPost. A complete listing of predefined units is given on page~92 of
+{\sl The \MF book}.} This produces lines of uniform thickness
+$0.5{\it bp}$ regardless of the direction of the line.
+
+Chapter 5 of {\sl The \MF book\/} does not apply to MetaPost.
+In particular, there is no \lit{mode\_setup} macro or ``sharped units''
+and \lit{mp} does not output \lit{gf} files. MetaPost does have
+a set of preloaded macros but they are not the same as \MF's plain base.
+If there were an
+analogous chapter about running MetaPost, it would probably mention that
+\lit{mp} skips over \lit{btex} $\ldots$ \lit{etex} blocks
+and depends on a preprocessor to translate them into low level MetaPost
+commands. If the main file is \lit{fig.mp}, the translated \TeX\
+material is placed in a file named \lit{fig.mpx}. This is normally
+done silently without any user intervention but it could fail if one of
+the \lit{btex} $\ldots$ \lit{etex} blocks contains an erroneous
+\TeX\ command. If this happens, the erroneous \TeX\ input is saved in
+the file \lit{mpxerr.tex} and the error messages appear in
+\lit{mpxerr.log}.
+
+If there is a need for \TeX\ macro definitions or any other auxiliary
+\TeX\ commands, they can be enclosed in a
+\lit{verbatimtex} $\ldots$ \lit{etex} block. The difference between
+\lit{btex} and \lit{verbatimtex} is that the former generates a picture
+expression while the latter does not.
+
+On Unix systems, an environment variable can be used to specify that
+\lit{btex} $\ldots$ \lit{etex} and \lit{verbatimtex} $\ldots$ \lit{etex}
+blocks are in {\it troff\/} instead of \TeX. When using this option,
+it is a good idea to give the MetaPost command \lit{prologues:=1}.
+This tells \lit{mp} to output structured PostScript and assume that
+text comes from built-in PostScript fonts.
+
+Chapters 6--10 of {\sl The \MF book\/} cover important aspects of \MF\
+that are almost identical in MetaPost. The only change to the tokenization
+process described in Chapter~6 is that \TeX\ material can contain
+percent signs and unmatched double quote characters so these are
+treated like spaces when skipping \TeX\ material. The preprocessor gives
+\TeX\ everything between \lit{btex} and \lit{etex} except for leading
+and trailing spaces.
+
+Chapters 7--10 discuss the types of variables and expressions that \MF\
+understands. MetaPost has an additional type ``\lit{color}'' that is
+a lot like \lit{pair} except that it has three components instead of
+two. The operations allowed on colors are addition, subtraction, scalar
+multiplication, and scalar division. MetaPost also understands mediation
+expressions involving colors since
+\lit{.3[w,b]} is equivalent to \lit{w+.3(b-w)} which is allowed
+even when \lit{w} and \lit{b} are colors. Colors can be specified
+in terms of the predefined constants \lit{black}, \lit{white},
+\lit{red}, \lit{green}, \lit{blue}, or the red, green, and blue
+components can be given explicitly. Black is \lit{(0,0,0)} and white
+is \lit{(1,1,1)}. There is no restriction against colors ``blacker
+than black'' or ``whiter than white'' except all components are snapped
+back to the $[0,1]$ range when a color is given in an output file.
+MetaPost solves linear equations involving colors the same way it does
+so for pairs. (This is explained in Chapter~9).
+
+Let's consider another example that uses some of the ideas discussed above.
+The MetaPost program\vadjust{\okbreak}
+$$ \startverbatim
+beginfig(2);
+h=2in; w=2.7in;
+path p[], q[], pp;
+for i=1.5,2,4: ii:=i**2;
+ p[i] = (w/ii,h){1/ii,-1}...(w/i,h/i)...(w,h/ii){1,-1/ii};
+endfor
+for i=.5,1.5: q[i] = origin..(w,i*h) cutafter p1.5; endfor
+pp = buildcycle(q0.5, p2, q1.5, p4);
+fill pp withcolor .8white;
+z0=center pp;
+picture lab; lab=thelabel(btex $f>0$ etex, z0);
+unfill bbox lab; draw lab;
+draw q0.5; draw p2; draw q1.5; draw p4;
+makelabel.top(btex $P$ etex, p2 intersectionpoint q0.5);
+makelabel.rt(btex $Q$ etex, p2 intersectionpoint q1.5);
+endfig;
+%stopverbatim$$
+produces the following figure:\vadjust{\okbreak}
+$$ \epsfbox{examples.2} $$
+
+The third line declares arrays of paths \lit{p} and \lit{q} as explained
+in Chapter~7. Note that \lit{q1.5} is the same as \lit{q[i]} when
+$\lit{i}=1.5$. The \lit{for} loops make each \lit{p[i]}
+an approximation to an arc of the hyperbola
+$$xy={wh\over i^2} $$
+and each \lit{q[i]} a segment of slope $ih/w$. (Loops are discussed in
+Chapter~19 of {\sl The \MF book\/}).
+
+The \lit{cutafter} operator is used to cut off the part of \lit{q[i]} after
+the intersection with \lit{p1.5}. (There is no ``\lit{draw} \lit{p1.5}'' in
+the input for the above figure so this hyperbola is invisible). There is also a
+\lit{cutbefore} operator defined to make
+$$ a \lit{ cutbefore } b $$
+what's left of path~$a$ when everything before its intersection with~$b$ is
+removed. In case of multiple intersections \lit{cutbefore} and \lit{cutafter}
+try to cut off as little as possible.
+
+The shaded region in the above figure is due to the line
+$$ \lit{fill pp withcolor .8white} $$
+The boundary of this region is the path \lit{pp} that the \lit{buildcycle}
+macro creates by piecing together the four paths given as arguments. In other
+words, \lit{pp} is constructed by going along \lit{q0.5} until it
+intersects \lit{p2}, then going along \lit{p2} until hitting
+\lit{q1.5}, etc. It turns out that this requires going backwards along
+\lit{p2} and \lit{q1.5}. The \lit{buildcycle} macro tries to avoid
+going backwards if it has a choice as to which intersection points to choose,
+but in this example each pair of consecutive path arguments has a unique
+intersection point. It is generally a good idea to avoid multiple intersections
+because they can lead to unpleasant surprises.
+
+The \lit{fill} and \lit{unfill} macros in plain MetaPost are similar to
+the corresponding macros discussed in Chapter~13 of {\sl The \MF book\/}
+but MetaPost assigns colors to regions rather than assigning weights to pixels.
+There is no \lit{cull} command or \lit{withweight} option in MetaPost.
+The \lit{unfill} macro used to erase the rectangle containing the label
+``$f>0$'' in the above figure works by specifying ``\lit{withcolor}
+\lit{background}''
+where \lit{background}'' is usually equal to \lit{white}. The complete
+syntax for primitive drawing commands in MetaPost is as follows:
+$$\tabskip=0.0pt plus 1000.0pt minus 1000.0pt
+ \halign to\hsize{$#$\hfil\cr
+ \descr{picture command} \rightarrow
+ \descr{addto command} \mid \descr{clip command} \cr
+ \descr{addto command} \rightarrow {} \cr
+ \qquad \lit{addto }\descr{picture variable} \lit{ also }
+ \descr{picture expression} \descr{with list} \cr
+ \qquad {}\mid \lit{addto } \descr{picture variable} \lit{ contour }
+ \descr{path expression} \descr{with list} \cr
+ \qquad {}\mid \lit{addto } \descr{picture variable} \lit{ doublepath }
+ \descr{path expression} \descr{with list} \cr
+ \descr{with list} \rightarrow \descr{empty} \mid
+ \descr{with clause} \descr{with list} \cr
+ \descr{with clause} \rightarrow \lit{withcolor } \descr{color expression}\cr
+ \qquad {} \mid \lit{withpen } \descr{pen expression}
+ \mid \lit{dashed } \descr{picture expression}\cr
+ \descr{clip command} \rightarrow \lit{clip }
+ \descr{picture variable} \lit{ to } \descr{path expression} \cr}
+$$
+If $P$ stands for \lit{currentpicture}, $q$ stands for
+\lit{currentpen}, and $b$ stands for \lit{background}, the standard
+drawing macros have roughly the following meanings:
+$$ \tabskip=0.0pt plus 1000.0pt minus 1000.0pt
+ \halign to\hsize{$#$\hfil&\quad means\quad $#$\hfil\cr
+ \lit{draw }p& \lit{addto }P\lit{ doublepath }p\lit{ withpen }q\cr
+ \lit{fill }c& \lit{addto }P\lit{ contour }c\cr
+ \lit{filldraw }c& \lit{addto }P\lit{ contour }c\lit{ withpen }q\cr
+ \lit{undraw }p& \lit{addto }P\lit{ doublepath }p\lit{ withpen }q
+ \lit{ withcolor }b\cr
+ \lit{unfill }c& \lit{addto }P\lit{ contour }c\lit{ withcolor }b\cr
+ \lit{unfilldraw }c& \lit{addto }P\lit{ contour }c\lit{ withpen }q
+ \lit{ withcolor }b\cr}
+$$
+The expressions denoted by $c$ in the table must be cyclic paths, while path
+expressions $p$ need not be cyclic. It is also possible to use \lit{draw}
+and \lit{undraw} when the argument is a picture~$r$:
+$$ \tabskip=0.0pt plus 1000.0pt minus 1000.0pt
+ \halign to\hsize{$#$\hfil&\quad means\quad $#$\hfil\cr
+ \lit{draw }r& \lit{addto }P\lit{ also }r\cr
+ \lit{undraw }r& \lit{addto }P\lit{ also }r\lit{ withcolor }b\cr}
+$$
+
+The argument to \lit{unfill} in the last example is \lit{bbox lab}.
+This is a call to a standard macro that gives the bounding box of a picture
+as a rectangular path. The \lit{center} macro used two lines previously
+makes \lit{z0} the center of the bounding box for path \lit{pp}. (This
+works for paths and pictures). The expression
+$$ \lit{thelabel(btex \$f>0\$ etex, z0)} $$
+computes a picture containing the text ``$f>0$'' centered on the point
+\lit{z0}.
+
+Here is the complete syntax for labeling commands:
+$$\tabskip=0.0pt plus 1000.0pt minus 1000.0pt
+ \halign to\hsize{$#$\hfil\cr
+ \descr{label command} \rightarrow
+ \descr{command name} \descr{position suffix}
+ (\descr{label text},\ \descr{label loc}) \cr
+ \qquad {}\mid \lit{labels} \descr{position suffix} (\descr{suffix list}) \cr
+ \descr{command name} \rightarrow \lit{label}
+ \mid \lit{thelabel} \mid \lit{makelabel} \cr
+ \descr{position suffix} \rightarrow
+ \descr{empty} \mid \lit{.lft} \mid \lit{.rt} \mid \lit{.top}
+ \mid \lit{.bot} \cr
+ \qquad {}\mid \lit{.ulft} \mid \lit{.urt} \mid \lit{.llft}
+ \mid \lit{.lrt}\cr
+ \descr{label text} \rightarrow \descr{picture expression}
+ \mid \descr{string expression} \cr
+ \descr{label loc} \rightarrow \descr{pair expression} \cr
+ \descr{suffix list} \rightarrow \descr{suffix}
+ \mid \descr{suffix}, \descr{suffix list} \cr}
+$$
+The \lit{label} command adds text to \lit{currentpicture} near the
+position $\descr{label loc}$ as determined by the $\descr{position suffix}$.
+An empty suffix centers the label and the other options offset it slightly so
+that it does not overlap the $\descr{label loc}$. Using \lit{thelabel} just
+creates a picture expression rather than actually adding it to
+\lit{currentpicture}. Using \lit{makelabel} instead of \lit{label} adds a dot
+at the location being labeled. Finally, the \lit{labels}
+command does
+$$ \lit{makelabel} \descr{position suffix}
+ (\lit{str}\,\descr{suffix},\,\lit{z}\descr{suffix})
+$$
+for each $\descr{suffix}$ in the $\descr{suffix list}$, using the \lit{str}
+operator to convert the suffix to a string. Thus \lit{labels.top(1,2a)} places
+labels ``\lit{1}'' and ``\lit{2a}'' just above \lit{z1} and \lit{z2a}.
+
+The examples given so far have all used $\descr{label text}$ of the form
+$$ \lit{btex}\ \descr{\TeX\ commands}\ \lit{etex}.
+$$
+This gets converted into a picture expression. If the label is simple enough,
+it can be given directly as a string expression in which case it is typeset
+in \lit{defaultfont} at \lit{defaultscale} times its design size.
+Normally,
+$$ \lit{defaultfont="cmr10"}
+ \quad{\rm and}\quad \lit{defaultscale=1},
+$$
+but these can be reset if desired. Using \lit{cmtex10} instead of
+\lit{cmr10} would allow the label to contain spaces and special characters.
+If there is any doubt about what the design size is, use the \lit{fontsize}
+operator to find it as follows:
+$$ \lit{defaultfont:="Times";}
+ \qquad \lit{defaultscale:=10/fontsize "Times"}
+$$
+
+Notice that a $\descr{with clause}$ can be
+``\lit{dashed} $\descr{picture expression}$.'' The picture
+gives a template that tells how the line being drawn is to be dashed. There
+is a standard template called \lit{evenly} that makes dashes $3bp$ long
+separated by gaps of length $3bp$. It is possible to scale the template in
+order to get a finer or coarser pattern. Thus
+$$ \lit{draw z1..z2 dashed evenly scaled 2} $$
+draws a line with dashes $6bp$ long with gaps of $6bp$.
+
+The following MetaPost input illustrates the use of dashed
+lines:\vadjust{\okbreak}
+$$ \startverbatim
+beginfig(3);
+3.2scf = 2.4in;
+path fun;
+# = .1;
+fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}
+ ..{curl .1}(3.2,2#)) scaled scf yscaled(1/#);
+vardef vertline primary x = (x,-infinity)..(x,infinity) enddef;
+primarydef f atx x = (f intersectionpoint vertline x) enddef;
+primarydef f whenx x = xpart(f intersectiontimes vertline x)
+ enddef;
+z1a = (2.5scf,0);
+z1 = fun atx x1a;
+y2a=0; z1-z2a=whatever*direction fun whenx x1 of fun;
+z2 = fun atx x2a;
+y3a=0; z2-z3a=whatever*direction fun whenx x2 of fun;
+draw fun withpen pencircle scaled 1pt;
+drawarrow (0,0)..(3.2scf,0);
+label.bot(btex $x_1$ etex, z1a);
+draw z1a..z1 dashed evenly;
+makelabel(nullpicture, z1);
+draw z1..z2a withpen pencircle scaled .3;
+label.bot(btex $x_2$ etex, z2a);
+draw z2a..z2 dashed evenly;
+makelabel(nullpicture, z2);
+draw z2..z3a withpen pencircle scaled .3;
+label.bot(btex $x_3$ etex, z3a);
+endfig;
+%stopverbatim$$
+This produces the following figure:\vadjust{\okbreak}
+$$ \epsfbox{examples.3} $$
+
+The above figure uses some of the more advanced properties of paths discussed
+in Chapter~14 of {\sl The \MF book}. All of this material applies to
+MetaPost as well as \MF\ except for the explanation of ``strange paths'' which
+fortunately cannot occur in MetaPost. The parts most relevant to this figure
+are the explanation of ``curl'' specifications and the \lit{direction},
+\lit{intersectiontimes}, and \lit{intersectionpoint} operators.
+In order to ensure that the path \lit{fun} makes $y$ a unique function
+of~$x$, the path is first constructed with the $y$-coordinates compressed
+by a factor of ten. The final ``\lit{yscaled(1/\char`\#)}'' restores
+the original aspect ratio after MetaPost has chosen a cubic spline that
+interpolates the given points.
+
+The \lit{yscaled} operator is an example of a very important class of
+operators that apply affine transformations to pairs, paths, pens, pictures,
+and other transforms. The discussion in Chapter~15 is relevant and
+important. The only differences are that MetaPost has no
+{\it currenttransform} and there is no restriction on the type of
+transformations that can be applied to pictures.
+
+\section{More Advanced Topics}
+\label{advanced}
+MetaPost does have pens like those in \MF\ but they aren't very important
+to the casual user except occasionally to specify changes in line widths
+as in the preceding figure. Anyone reading the description in Chapter~16 of
+{\sl The \MF book} should beware that there is no such thing as a
+``future pen'' in MetaPost and elliptical pens are never converted into
+polygons. Furthermore, there is no need for \lit{cutoff} and
+\lit{cutdraw} because the same effect can be achieved by setting the
+internal parameter \lit{linecap:=butt}.\vadjust{\okbreak}
+$$\startverbatim
+beginfig(4);
+for i=0 upto 2:
+ z[i]=(0,40i); z[i+3]-z[i]=(100,30);
+endfor
+pickup pencircle scaled 18;
+def gray = withcolor .8white enddef;
+draw z0..z3 gray;
+linecap:=butt; draw z1..z4 gray;
+linecap:=squared; draw z2..z5 gray;
+labels.top(0,1,2,3,4,5);
+endfig; linecap:=rounded;
+%stopverbatim
+\qquad
+\vcenter{\epsfbox{examples.4}}
+$$
+
+There is also a \lit{linejoin} parameter as illustrated below.
+The default values of \lit{linecap} and \lit{linejoin} are both
+\lit{rounded}.\vadjust{\okbreak}
+$$ \startverbatim
+beginfig(5);
+for i=0 upto 2:
+ z[i]=(0,50i); z[i+3]-z[i]=(60,40);
+ z[i+6]-z[i]=(120,0);
+endfor
+pickup pencircle scaled 24;
+def gray = withcolor .8white enddef;
+draw z0--z3--z6 gray;
+linejoin:=mitered; draw z1..z4--z7 gray;
+linejoin:=beveled; draw z2..z5--z8 gray;
+labels.bot(0,1,2,3,4,5,6,7,8);
+endfig; linejoin:=rounded;
+%stopverbatim
+\qquad
+\vcenter{\epsfbox{examples.5}}
+\mskip-54mu % allow it to hang into the margin
+$$
+
+Another way to adjust the behavior of drawing commands is by giving the
+declaration
+$$ \lit{drawoptions}(\descr{with list}) $$
+For instance,
+$$ \lit{drawoptions(withcolor blue)} $$
+gives subsequent drawing commands the default color blue. This can still
+be overridden by giving another \lit{withcolor} clause as in
+$$ \lit{draw p withcolor red} $$
+The options apply only to relevant drawing commands:
+$$ \lit{drawoptions(dashed dd)} $$
+will affect \lit{draw} commands but not fill commands.
+
+Chapters 17--20 of {\sl The \MF book} describe the programming constructs
+necessary to customize the language to a particular problem. These features
+work the same way in MetaPost but a few additional comments are needed.
+These chapters mention certain macros from plain \MF\ that are not in the
+plain macro package for MetaPost. Generally if it sounds as though it's
+for making fonts, MetaPost doesn't have it. Remember that \lit{beginfig}
+and \lit{endfig} play the role of \MF's \lit{beginchar} and \lit{endchar}.
+Look in the file \lit{plain.mp} in the standard macro area if there is any
+doubt about what macros are predefined. This file is also a good source of
+examples.
+
+Chapter 17 explains how the \lit{interim} statement makes temporary changes
+to internal quantities. This works the same way in MetaPost except that
+the example involving {\it autorounding} is inappropriate because MetaPost
+doesn't have that particular quantity. Here is a complete list of the
+internal quantities found in \MF\ but not MetaPost:
+$$\vcenter{\hsize=.8\hsize \raggedright \multiply\rightskip by3 \textt\noindent
+ \lit{autorounding}, \lit{fillin}, \lit{granularity}, \lit{hppp},
+ \lit{proofing}, \lit{smoothing}, \lit{tracingedges},
+ \lit{tracingpens}, \lit{turningcheck}, \lit{vppp}, \lit{xoffset},
+ \lit{yoffset}}
+$$
+The following additional quantities are defined in plain \MF\ but not in
+plain MetaPost:
+$$\vcenter{\hsize=.8\hsize \raggedright \multiply\rightskip by3 \textt\noindent
+ \lit{pixels\_per\_inch}, \lit{blacker}, \lit{o\_correction},
+ \lit{displaying}, \lit{screen\_rows}, \lit{screen\_cols},
+ \lit{currentwindow}}
+$$
+
+There are also some internal quantities that are unique to MetaPost.
+The \lit{linecap} and \lit{linejoin} parameters have already been mentioned.
+There is also a \lit{miterlimit} parameter that behaves like the similarly
+named parameter in PostScript. Another parameter, \lit{tracing\_lost\_chars}
+suppresses error messages about attempts to typeset missing characters.
+This is probably only relevant when using string parameters in the labeling
+macros since expressions generated by \lit{btex} $\ldots$ \lit{etex}
+blocks are not likely to use missing characters.
+
+The \lit{prologues} parameter was referred to earlier when we recommended
+setting it to one when including MetaPost output in a {\it troff\/} document.
+Any positivie value causes the output files to be ``conforming PostScript''
+that assumes only standard Adobe fonts are used. This makes the output
+more portable but on most implementations, it precludes the use of the use
+of \TeX\ fonts such as \lit{cmr10}. Software for sending \TeX\ output to
+PostScript printers generally downloads such fonts one character at a time
+and does not make them available in included PostScript figures.
+
+Plain MetaPost also has
+internals \lit{bboxmargin}, \lit{labeloffset} and \lit{ahangle}
+as well as \lit{defaultscale} which controls the size of the default label
+font as explained above. The \lit{bboxmargin} parameter is the amount of
+extra space that the \lit{bbox} operator leaves; \lit{labeloffset} gives the
+distance by which labels are offset from the point being labeled;
+\lit{ahangle} is the angle of the pointed ends of arrowheads
+($45^\circ$ by default). There is also a path \lit{ahcirc} that controls
+the size of the arrowheads. The statement
+$$ \lit{ahcirc := fullcircle scaled d} $$
+changes the arrowhead length to $\lit{d}/2$.
+
+The only relevant new material in {\sl The \MF book\/} not mentioned so far
+is in Chapters 21--22 and Appendix~D. Chapters 23 and~24 do not apply to
+MetaPost at all. The grammar given in Chapters 25 and~26 isn't exactly a
+grammar of MetaPost, but most of the differences have been mentioned above.
+There are \lit{redpart}, \lit{bluepart}, and \lit{greenpart} operators for
+colors and there is no \lit{totalweight} operator. The new primitive for
+label text in pictures is
+$$ \descr{picture secondary} \rightarrow
+ \descr{picture secondary} \lit{ infont } \descr{string primary}
+$$
+Bounding box information can be obtained via the operators
+\begin{eqnarray*}
+ \descr{pair primary} &\rightarrow& \descr{corner selector}
+ \descr{picture primary}\\
+ \descr{corner selector} &\rightarrow& \lit{llcorner} \mid \lit{urcorner}
+ \mid \lit{lrcorner} \mid \lit{urcorner}
+\end{eqnarray*}
+The main reason for having these in the MetaPost language is for measuring
+text but they work for pictures containing any mixture of text and graphics.
+
+The command
+$$ \lit{special }\descr{string expression} $$
+adds a line of text at the beginning of the next output file. For instance,
+the following commands add PostScript definitions that allow MetaPost output
+to use the built-in font \lit{Times-Roman}.
+$$ \startverbatim
+special "/Times-Roman /Times-Roman def";
+special "/fshow {exch findfont exch scalefont setfont show}";
+special " bind def";
+%stopverbatim
+$$
+A similar definition is generated automatically when you set \lit{prologues:=1}.
+With \lit{prologues=0}, it is assumed that the program that translates \TeX\
+output and includes PostScript figures will add the necessary definition.%
+\footnote{A full description of how to avoid including your
+output in a \TeX\ document is beyond the scope of this documentation.
+MetaPost output generated with \lit{prologues:=1} can be sent directly to a
+PostScript printer if it uses only built-in fonts like \lit{Helvetica}.}
+
+Another new feature of MetaPost that needs further explanation is the idea of
+a dash pattern. It is easiest if you can just get by with the dash pattern
+called \lit{evenly} that is defined in plain MetaPost, but it seems necessary
+to give the exact rules just in case they are needed.
+
+A dash pattern is a picture containing one or more horizontal
+line segments. It doesn't matter what pen is used to draw the line segments.
+MetaPost behaves as though the dash pattern is replicated to form an
+infinitely long horizontal dashed line to be used as a template for dashed
+lines. For example, the following commands create a dash pattern~\lit{dd}:
+$$\startverbatim
+draw (1,0)..(3.0); draw (5,0)..(6,0);
+picture dd; dd=currentpicture; clearit;
+%stopverbatim
+$$
+Lining up an infinite number of copies of \lit{dd} produces a set of line
+segments
+$$ \{\,(5i,0)\ldots(5i+3,0) \mid \hbox{for all integer $i$}\,\}. $$
+This template is used by starting from the $y$-axis and going to the right,
+producing dashes $3bp$ long separated by gaps of length $2bp$.
+
+In this example, successive copies of \lit{dd} are offset by $5bp$ because
+the range of $x$ coordinates covered by the line segments in \lit{dd} is
+$6-1$ or $5bp$. The offset can be increased by shifting the dash pattern
+vertically so that it lies at a $y$-coordinate greater that $5bp$ in
+absolute value. The rule is that the horizontal offset between copies of
+the dash pattern is the maximum of $|y|$ and the range of $x$-coordinates.
+
+\bigbreak
+\centerline{\bf Making Boxes}
+\nobreak\medskip
+There are auxiliary macros not included in plain MetaPost that make it
+convenient to do things that {\it pic} is good at. What follows
+is a description of how to use the macros contained in the file \lit{boxes.mp}.
+This may be of some interest to users who don't need these macros but want to
+see additional examples of what can be done in MetaPost.
+
+The main idea is that one should say
+$$ \lit{boxit} \descr{suffix}(\descr{picture expression}) $$
+in order to create pair variables $\descr{suffix}\lit{.c}$,
+$\descr{suffix}\lit{.n}$, $\descr{suffix}\lit{.e}$, etc. These can then be
+used for positioning the picture before drawing it with a separate command such
+as
+$$ \lit{drawboxed}(\descr{suffix}) $$
+The command \lit{boxit.bb(pic)} makes \lit{bb.c} the position where the center
+of picture \lit{pic} is to be placed and defines \lit{bb.sw}, \lit{bb.se},
+\lit{bb.ne}, and \lit{bb.nw} to be the corners of a rectangular path that will
+surround the resulting picture. Variables \lit{bb.dx} and \lit{bb.dy} give
+the spacing between the shifted version of \lit{pic} and the surrounding
+rectangle and \lit{bb.off} is the amount by which \lit{pic} has to be shifted
+to achieve all this.
+
+The \lit{boxit} macro gives linear equations that force \lit{bb.sw},
+\lit{bb.se}, $\ldots$ to be the corners of a rectangle aligned on the $x$ and
+$y$ axes with the picture \lit{pic} centered inside. The values of \lit{bb.dx},
+\lit{bb.dy}, and \lit{bb.c} are left unspecified so that the user can give
+equations for positioning the boxes. If no such equations are given, macros
+such as \lit{drawbox} can detect this and give default values.\vadjust{\okbreak}
+$$ \epsfbox{examples.6} $$
+
+\okbreak
+
+The following example shows how this works in practice.
+$$ \startverbatim
+input boxes
+beginfig(7); boxjoin(a.se=b.sw; a.ne=b.nw);
+boxit.a(btex $\cdots$ etex); boxit.ni(btex $n_i$ etex);
+boxit.di(btex $d_i$ etex); boxit.nii(btex $n_{i+1}$ etex);
+boxit.dii(btex $d_{i+1}$ etex); boxit.aa(pic_.a);
+boxit.nk(btex $n_k$ etex); boxit.dk(btex $d_k$ etex);
+di.dy = 2;
+drawboxed(a,ni,di,nii,dii,aa,nk,dk); label.lft("ndtable:", a.w);
+boxjoin(a.sw=b.nw; a.se=b.ne);
+interim defaultdy:=7;
+boxit.ba(); boxit.bb(); boxit.bc();
+boxit.bd(btex $\vdots$ etex); boxit.be(); boxit.bf();
+bd.dx=8; ba.ne=a.sw-(15,10);
+drawboxed(ba,bb,bc,bd,be,bf); label.lft("hashtab:",ba.w);
+def ndblock suffix $ =
+ boxjoin(a.sw=b.nw; a.se=b.ne);
+ forsuffixes $$=$a,$b,$c: boxit$$(); ($$dx,$$dy)=(5.5,4);
+ endfor; enddef;
+ndblock nda; ndblock ndb; ndblock ndc;
+nda.a.c-bb.c = ndb.a.c-nda.c.c = (whatever,0);
+xpart ndb.c.se = xpart ndc.a.ne = xpart di.c;
+ndc.a.c - be.c = (whatever,0);
+drawboxes(nda.a,nda.b,nda.c,ndb.a,ndb.b,ndb.c,ndc.a,ndc.b,ndc.c);
+drawarrow bb.c .. nda.a.w;
+drawarrow be.c .. ndc.a.w;
+drawarrow nda.c.c .. ndb.a.w;
+drawarrow nda.a.c{right}..{curl0}ni.c cutafter bpath ni;
+drawarrow nda.b.c{right}..{curl0}di.c cutafter bpath di;
+drawarrow ndc.a.c{right}..{curl0}nii.c cutafter bpath nii;
+drawarrow ndc.b.c{right}..{curl0}dii.c cutafter bpath dii;
+drawarrow ndb.a.c{right}..nk.c cutafter bpath nk;
+drawarrow ndb.b.c{right}..dk.c cutafter bpath dk;
+x.ptr=xpart aa.c; y.ptr=ypart ndc.a.ne;
+drawarrow subpath (0,.7) of (z.ptr..{left}ndc.c.c);
+label.rt(btex ndblock etex, z.ptr); endfig;
+%stopverbatim
+$$
+It is instructive to compare the MetaPost output below with the similar figure
+in the {\it pic} manual \cite{ke:pic}.\vadjust{\okbreak}
+$$ \epsfbox{examples.7} $$
+
+The second line of input for the above figure contains
+$$ \lit{boxjoin(a.se=b.sw; a.ne=b.nw)} $$
+This causes boxes to line up horizontally by giving additional equations that
+are invoked each time some box \lit{a} is followed by some other box~\lit{b}.
+These equations are first invoked on the next line when box~\lit{a} is followed
+by box~\lit{ni}. This yields
+$$ \lit{a.se=ni.sw; a.ne=ni.nw} $$
+The next pair of boxes is box~\lit{ni} and box~\lit{di}. This time the
+implicitly generated equations are
+$$ \lit{ni.se=di.sw; ni.ne=di.nw} $$
+This process continues until a new \lit{boxjoin} is given. In this case the
+new declaration is
+$$ \lit{boxjoin(a.sw=b.nw; a.se=b.ne)} $$
+which causes boxes to be stacked below each other.
+
+After calling \lit{boxit} for the first eight boxes \lit{a} through \lit{dk},
+the example gives the single equation $\lit{di.dy}=2$ followed by a call to
+\lit{drawboxed} that draws the eight boxes with the given text inside of them.
+The equation forces there to be $2bp$ of space above and below the contents
+of box~\lit{di} (the label ``$d_i$''). Since this doesn't fully specify the
+sizes and positions of the boxes, the \lit{drawboxed} macro starts by
+selecting default values, setting \lit{a.dx} through \lit{dk.dx} equal to
+the default value of $3bp$.
+
+The argument to boxit can be omitted as in \lit{boxit.ba()}
+or \lit{boxit.bb()}. This is like calling \lit{boxit} with an empty picture.
+Alternatively the argument can be a string expression instead of a picture
+expression in which case the string is typeset in the default font.
+
+In addition to the corner points \lit{a.sw}, \lit{a.se}, $\ldots$, a command
+like \lit{boxit.a} defines points \lit{a.w}, \lit{a.s}, \lit{a.e} and
+\lit{a.n} at the midpoints of the outer rectangle.
+If this bounding rectangle is needed for something other than just being drawn
+by the \lit{drawboxed} macro, it can be referred to as \lit{bpath.a} or in
+general
+$$ \lit{bpath} \descr{box name} $$
+
+The \lit{bpath} macro is used in the arguments to \lit{drawarrow} in the
+previous example. For instance
+$$ \lit{nda.a.c\char`\{right\char`\}..\char`\{curl0\char`\}ni.c} $$
+is a path from the center of box \lit{nda.a} to the center of box \lit{ni}.
+Following this with ``\lit{cutafter} \lit{bpath.ni}'' makes the arrow
+go towards the center of the box but stop when it hits the outer rectangle.
+
+The next example also uses this technique of cutting connecting arrows when
+they hit a bounding path, but in this case the bounding paths are circles
+and ovals instead of rectangles. The circles and ovals are created by using
+\lit{circleit} in place of \lit{boxit}. Saying \lit{circleit.a(pic)}
+defines points \lit{a.c}, \lit{a.s}, \lit{a.e}, \lit{a.n}, \lit{a.w}
+and distances \lit{a.dx} and \lit{a.dy}. These variables describe how the
+picture is centered in an oval as can be seen from the following
+diagram:\vadjust{\okbreak}
+$$ \epsfbox{examples.8} $$
+
+\okbreak
+
+Here is the input for the figure that uses \lit{circleit}:
+$$\startverbatim
+beginfig(9);
+vardef cuta(suffix a,b) expr p =
+ drawarrow p cutbefore bpath.a cutafter bpath.b;
+ point .5*length p of p
+enddef;
+vardef self@# expr p =
+ cuta(@#,@#) @#.c{curl0}..@#.c+p..{curl0}@#.c enddef;
+verbatimtex
+ \def\stk#1#2{$\displaystyle{\matrix{#1\cr#2\cr}}$} etex
+circleit.aa("Start"); aa.dx=aa.dy;
+circleit.bb(btex \stk B{(a|b)^*a} etex);
+circleit.cc(btex \stk C{b^*} etex);
+circleit.dd(btex \stk D{(a|b)^*ab} etex);
+circleit.ee("Stop"); ee.dx=ee.dy;
+numeric hsep;
+bb.c-aa.c = dd.c-bb.c = ee.c-dd.c = (hsep,0);
+cc.c-bb.c = (0,.8hsep);
+xpart(ee.e - aa.w) = 3.8in;
+drawboxed(aa,bb,cc,dd,ee);
+label.ulft(btex$b$etex, cuta(aa,cc) aa.c{dir50}..cc.c);
+label.top(btex$b$etex, self.cc(0,30pt));
+label.rt(btex$a$etex, cuta(cc,bb) cc.c..bb.c);
+label.top(btex$a$etex, cuta(aa,bb) aa.c..bb.c);
+label.llft(btex$a$etex, self.bb(-20pt,-35pt));
+label.top(btex$b$etex, cuta(bb,dd) bb.c..dd.c);
+label.top(btex$b$etex, cuta(dd,ee) dd.c..ee.c);
+label.lrt(btex$a$etex, cuta(dd,bb) dd.c..{dir140}bb.c);
+label.bot(btex$a$etex,
+ cuta(ee,bb) ee.c..tension1.3 ..{dir115}bb.c);
+label.urt(btex$b$etex,
+ cuta(ee,cc) ee.c{(cc.c-ee.c)rotated-15}..cc.c);
+endfig;
+%stopverbatim
+$$
+The ``boxes'' produced when using \lit{circleit} come out circular unless
+something forces a different aspect ratio.\vadjust{\okbreak}
+$$ \epsfbox{examples.9} $$
+
+In the above figure, the equations \lit{aa.dx=aa.dy} and \lit{ee.dx=ee.dy} after
+$$ \lit{circleit.aa("Start")}
+ \quad{\rm and}\quad \lit{circleit.ee("Stop")}
+$$
+make the start and stop nodes non-circular.
+
+The general rule is that $\lit{bpath.}c$ comes out circular if
+$c\lit{.dx}$, $c\lit{.dy}$, and $c\lit{.dx}-c\lit{.dy}$ are all unspecified.
+Otherwise the macros select an oval just big enough to contain the given
+picture. (The margin of safety is given by the internal parameter
+\lit{circmargin}).
+
+There is also a \lit{pic} macro that makes $\lit{pic.}c$ the picture that
+goes inside $\lit{bpath.}c$ In addition to the \lit{drawboxed} macro
+that draws the picture and the surrounding rectangle or oval, there are
+\lit{drawunboxed} and \lit{drawboxes} macros that draw the pictures and
+the surrounding paths separately.
+
+\section{Implementation}
+\label{impsec}
+
+The MetaPost interpreter is written in Knuth's {\tt WEB} language which
+can be thought of as PASCAL with macros. This choice allows the
+sharing of code with the \MF\ interpreter.~\cite{kn:d} Indeed, about
+three fourths of the code in the main source file {\tt mp.web} is copied
+from this source by permission from the author.
+
+In accordance with the standard methodology for {\tt WEB} programs,
+parts of the program that are specific to the UNIX\footnote{UNIX is a
+registered trademark of UNIX System Laboratories.} system are given in a
+separate file {\tt mp.ch} that
+the {\tt tangle} processor merges with {\tt mp.web} to form a PASCAL
+program. (It is then automatically translated into C using a
+special-purpose translator that is included with the UNIX version
+of \TeX.) The only other code required by the MetaPost interpreter
+is a short external C program {\tt mpext.c} and a small include file
+{\tt mp.h} to tie it all together.
+
+In addition to the main interpreter, there are some programs that control
+the translation of typesetting commands in \lit{btex} $\ldots$ \lit{etex}
+blocks. When the interpreter encounters \lit{btex} in some input file
+\lit{foo.mp}, it needs to start reading from an auxiliary file \lit{foo.mpx}.
+This file should contain translations of the \lit{btex} $\ldots$ \lit{etex}
+blocks in \lit{foo.mp} into low-level MetaPost commands. If \lit{foo.mpx} is
+out of date or does not exist, the MetaPost interpreter invokes a shell script
+that generates the file.
+
+The generation of an auxiliary file \lit{foo.mpx} from an input file
+\lit{foo.mp} is a three step process: a C~program called \lit{mptotex}
+strips out the \TeX\ commands; then \TeX\ produces a binary file that
+gives low-level typesetting instructions; and finally, a {\tt WEB} program
+\lit{dvitomp} writes equivalent MetaPost commands in the \lit{foo.mpx}
+file. When using troff, C~programs \lit{mptotr} and \lit{dmp} replace
+\lit{mptotex} and \lit{dvitomp}.
+
+
+
+\bibliographystyle{plain}
+\bibliography{mpintro}
+
+
+\end{document}
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpman.bib b/Master/texmf-dist/doc/metapost/base/source/mpman.bib
new file mode 100644
index 00000000000..ef846d5a79b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpman.bib
@@ -0,0 +1,80 @@
+@string{dcg = "Discrete and Computational Geometry"}
+
+@techreport{CSTR116,
+ author = "Kernighan, Brian W.",
+ title = "{PIC}---A Graphics Language for Typesetting",
+ type = "Computing Science Technical Report",
+ number = 116,
+ institution = "AT\&T Bell Laboratories",
+ address = "Murray Hill, New Jersey",
+ year = 1984
+}
+@incollection{ke:pic,
+ author = "Kernighan, Brian W.",
+ title = "Pic---A Graphics Language for Typesetting",
+ booktitle = "Unix Research System Papers, Tenth Edition",
+ publisher = "AT\&T Bell Laboratories",
+ pages = "53--77",
+ year = 1990
+}
+@book{kn:a,
+ author = "D. E. Knuth",
+ note = "Volume A of {\it Computers and Typesetting}",
+ title = "The {\TeX}book",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+}
+@book{kn:c,
+ author = "D. E. Knuth",
+ note = "Volume C of {\it Computers and Typesetting}",
+ title = "The {\MF}book",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+}
+@article{kn:mf3,
+ author = "D. E. Knuth",
+ title = "The New Versions of {\TeX} and {\MF}",
+ journal = "{TUG}boat, the\/ {\TeX} User's Group Newsletter",
+ volume = 10,
+ number = 3,
+ pages = "325--328",
+ month = nov,
+ year = 1989
+}
+@book{kn:e,
+ author = "D. E. Knuth",
+ note = "Volume E of {\it Computers and Typesetting}",
+ title = "Computer Modern Typefaces",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+}
+@book{ad:red,
+ author = "{Adobe Systems Inc.}",
+ title = "{P}ost{S}cript Language Reference Manual",
+ publisher = "Addison Wesley",
+ address = "Reading, Massachusetts",
+ year = 1986
+}
+@article{ho:mp1,
+ author = "J. D. Hobby",
+ title = "A {\MF}-like System with {P}ost{S}cript Output",
+ journal = "{TUG}boat, the\/ {\TeX} User's Group Newsletter",
+ volume = 10,
+ number = 4,
+ pages = "505--512",
+ month = dec,
+ year = 1989
+}
+@article{ho:splin,
+ key = "Hobby",
+ author = "J. D. Hobby",
+ title = "Smooth, Easy to Compute Interpolating Splines",
+ journal = dcg,
+ volume = 1,
+ number = 2,
+ pagest = "123--140",
+ year = 1986
+} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpman.ist b/Master/texmf-dist/doc/metapost/base/source/mpman.ist
new file mode 100644
index 00000000000..c808a5544bf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpman.ist
@@ -0,0 +1,4 @@
+% MakeIndex style file mpman.ist
+
+% @ is a valid character in some entries
+actual '?' % ? instead of @
diff --git a/Master/texmf-dist/doc/metapost/base/source/mpman.tex b/Master/texmf-dist/doc/metapost/base/source/mpman.tex
new file mode 100644
index 00000000000..4c75733f3ba
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mpman.tex
@@ -0,0 +1,5483 @@
+\documentclass{article} % article is NOT the original style
+\usepackage{makeidx}
+\usepackage{fancyvrb}
+\usepackage{ctabbing}
+\RecustomVerbatimEnvironment
+ {verbatim}{BVerbatim}{baseline=c}
+\usepackage{epsf}
+\usepackage[textwidth=6in,textheight=8.75in]{geometry}
+\usepackage{tocloft}
+\setlength\cftbeforesecskip{1.5ex plus 0.2ex minus 0.1ex}
+
+ \makeatletter
+ \def\logo{\global\font\logo=logo10 at1\@ptsize\p@ \logo}
+ \def\logosl{\global\font\logosl=logosl10 at1\@ptsize\p@ \logosl}
+ \def\MF{{\ifdim \fontdimen\@ne\font >\z@ \def\logo{\logosl}\fi
+ {\logo META}\-{\logo FONT}}}
+ \makeatother
+
+% \def\MF{{META\-FONT}} % Replacement for the above when using times.sty
+
+
+\newfont\psyvii{rpsyr at 7pt}
+\newcommand\reg{$^{\hbox{\psyvii\char'322}}$} % Registered trademark
+
+\newcommand\descr[1]{{\langle\hbox{#1}\rangle}}
+\newcommand\invisgap{\nobreak\hskip0pt\relax}
+\newcommand\tdescr[1]{$\langle$\invisgap#1\invisgap$\rangle$}
+
+\newcommand\pl{\dag}
+\newcommand\bx{\ddag}
+
+\newcommand\mathcenter[1]{\vcenter{\hbox{#1}}}
+
+
+\renewcommand{\topfraction}{.85}
+\renewcommand{\bottomfraction}{.7}
+\renewcommand{\textfraction}{.15}
+\renewcommand{\floatpagefraction}{.66}
+\renewcommand{\dbltopfraction}{.66}
+\renewcommand{\dblfloatpagefraction}{.66}
+\setcounter{topnumber}{9}
+\setcounter{bottomnumber}{9}
+\setcounter{totalnumber}{20}
+\setcounter{dbltopnumber}{9}
+
+\makeindex
+
+\begin{document}
+\VerbatimFootnotes
+\author{John D. Hobby}
+\title{A User's Manual for MetaPost}
+\date{}
+\maketitle
+
+\begin{abstract}
+The MetaPost system implements a picture-drawing language very much like Knuth's
+\MF\ except that it outputs PostScript commands instead of run-length-encoded
+bitmaps. MetaPost is a powerful language for producing figures for documents
+to be printed on PostScript printers. It provides easy access to all the
+features of PostScript and it includes facilities for integrating text and
+graphics.
+
+This document serves as an introductory user's manual. It does not require
+knowledge of \MF\ or access to {\it The \MF book}, but both are beneficial.
+An appendix explains the differences between MetaPost and \MF.
+\end{abstract}
+\thispagestyle{empty}
+\newpage
+\setcounter{page}{1}
+\pagestyle{plain}
+\pagenumbering{roman}
+\tableofcontents
+\newpage
+\setcounter{page}{1}
+\pagestyle{headings}
+\pagenumbering{arabic}
+\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
+
+\section{Introduction}
+\label{intro}
+
+MetaPost is a programming language much like Knuth's \MF\footnote{\MF\ is a
+trademark of Addison Wesley Publishing company.}\index{metafont?\MF}~\cite{kn:c}
+except that it outputs PostScript programs instead of bitmaps. Borrowed from \MF\
+are the basic tools for creating and manipulating pictures. These include numbers,
+coordinate pairs, cubic splines, affine transformations, text strings, and boolean
+quantities. Additional features facilitate integrating text and graphics and
+accessing special features of PostScript\footnote{PostScript is a
+trademark of Adobe Systems Inc.}\index{PostScript} such as clipping, shading, and
+dashed lines.
+Another feature borrowed from \MF\ is the ability to solve linear equations
+that are given implicitly, thus allowing many programs to be written in a
+largely declarative style. By building complex operations
+from simpler ones, MetaPost achieves both power and flexibility.
+
+MetaPost is particularly
+well-suited to generating figures for technical documents where some aspects of a
+picture may be controlled by mathematical or geometrical constraints that are
+best expressed symbolically. In other words, MetaPost is not meant to take the
+place of a freehand drawing tool or even an interactive graphics editor.
+It is really a programming language for generating graphics, especially figures
+for \TeX\footnote{\TeX\ is a trademark of the American Mathematical
+Society.}\index{TeX?\TeX} and troff\index{troff} documents.
+The figures can be integrated into a \TeX\ document via a freely available
+program called {\tt dvips}\index{dvips} as shown in
+Figure~\ref{fig0}.\footnote{The C
+source for {\tt dvips} comes with the web2c \TeX\ distribution. Similar programs
+are available from other sources.} A similar procedure works with troff: the
+{\tt dpost} output processor includes PostScript figures when they are
+requested via troff's {\tt \char`\\X} command.
+
+\begin{figure}[htp]
+$$ \def\fbox#1{\hbox{\vrule
+ \vbox{\hrule\kern5pt\hbox{\kern5pt\hbox{#1}\kern5pt}\kern5pt\hrule}%
+ \vrule}}
+ \vbox{
+ \halign{$\hfil#\hfil$&\hskip1in$\hfil#\hfil$\cr
+ \hbox{Figures in MetaPost}&
+ \hbox{\TeX\ Document}
+ \cr
+ \bigg\downarrow&
+ \bigg\downarrow
+ \cr
+ \fbox{\vrule height.2in depth.133in width0pt
+ \kern .1in MetaPost\kern.1in}
+ &
+ \fbox{\vrule height.2in depth.133in width0pt
+ \kern .167in \TeX\kern.167in}
+ \cr
+ \bigg\downarrow&
+ \bigg\downarrow
+ \cr
+ \hbox{Figures in PostScript}&
+ \hbox{{\tt dvi} file}
+ \cr
+ \bigg\downarrow&
+ \bigg\downarrow
+ \cr
+ \fbox{\vrule height.2in depth.133in width0pt
+ \kern 1in {\tt dvips} \kern1in}
+ \span\omit\cr
+ \bigg\downarrow\span\omit\cr
+ \hbox{PostScript}\span\omit\cr}}
+$$
+\caption[A diagram of the processing for a document with MetaPost figures]
+ {A diagram of the processing for a \TeX\ document with figures
+ in MetaPost}
+\label{fig0}
+\end{figure}
+
+To use MetaPost, you prepare an input file containing MetaPost code and then
+invoke MetaPost, usually by giving a command of the form\index{mp?\texttt{mp}}
+$$ {\tt mp}\, \descr{file name} $$
+(This syntax could be system dependent).
+MetaPost input files\index{files!input} normally have names ending ``{\tt .mp}''
+but this part of the name can be omitted when invoking MetaPost. For an input
+file {\tt foo.mp}
+$$ \hbox{\tt mp foo} $$
+invokes MetaPost and produces output files with names like {\tt foo.1} and
+{\tt foo.2}. Any terminal I/O is summarized in a
+transcript\index{files!transcript}\index{transcript file}
+file called {\tt foo.log}. This includes
+error messages and any MetaPost commands entered interactively.%
+\footnote{A {\tt *}\index{*?\texttt{*}} prompt is used for interactive input and a
+{\tt **}\index{**?\texttt{**}} prompt
+indicates that an input file name is expected. This can be avoided by invoking
+MetaPost on a file that ends with an {\tt end}\index{end?\texttt{end}} command.}
+The transcript file starts with a banner line that tells what version of MetaPost
+you are using.
+
+This document introduces the MetaPost language, beginning with the features that
+are easiest to use and most important for simple applications. The first few
+sections describe the language as it appears to the novice user with key parameters
+at their default values. Some features described in these sections are part of a
+predefined macro package called Plain. Later sections summarize the
+complete language and distinguish between primitives and preloaded macros
+from the Plain macro package\index{Plain macros}.
+Since much of the language is identical to Knuth's \MF, the appendix gives a
+detailed comparison so that advanced users can learn more about MetaPost by
+reading {\sl The \MF book\/}.~\cite{kn:c}
+
+
+\section{Basic Drawing Statements}
+\label{basic}
+
+The simplest drawing statements are the ones that generate straight lines.
+Thus\index{draw?\texttt{draw}}\index{--?\texttt{--}}
+$$ \hbox{\verb|draw (20,20)--(0,0)|} $$
+draws\index{draw?\texttt{draw}} a diagonal line and
+$$ \hbox{\verb|draw (20,20)--(0,0)--(0,30)--(30,0)--(0,0)|} $$
+draws a polygonal line like this:
+$$ \epsfbox{manfig.0} $$
+
+What is meant by coordinates like \verb|(30,0)|? MetaPost uses the same default
+coordinate system that PostScript\index{PostScript} does. This means that
+\verb|(30,0)| is 30 units
+to the right of the origin, where a unit is $1\over72$ of an inch. We shall refer
+to this default unit as a
+{\sl PostScript point\/}\index{PostScript!point}\index{point!PostScript}
+to distinguish it from the standard printer's point\index{point!printer's}
+which is $1\over72.27$ inches.
+
+MetaPost uses the same names for units of measure that \TeX\ and \MF\ do. Thus
+\verb|bp|\index{bp?\texttt{bp}}\label{Dbp} refers to PostScript points (``big points'')
+and \verb|pt|\index{pt?\texttt{pt}}\label{Dpt} refers to printer's points.
+Other units of measure
+include \verb|in|\index{in?\texttt{in}}\label{Din} for inches,
+\verb|cm|\index{cm?\texttt{cm}}\label{Dcm} for centimeters,
+and \verb|mm|\index{mm?\texttt{mm}}\label{Dmm} for
+millimeters. For example,
+$$ \hbox{\verb|(2cm,2cm)--(0,0)--(0,3cm)--(3cm,0)--(0,0)|} $$
+generates a larger version of the above diagram. It is OK to say \verb|0| instead
+\verb|0cm| because {\tt cm} is really just a conversion factor and {\tt 0cm} just
+multiplies the conversion factor by zero. (MetaPost understands constructions
+like {\tt 2cm}\index{multiplication!implicit} as shorthand for \verb|2*cm|).
+
+It is often convenient to introduce your own scale factor, say $u$.
+Then you can define coordinates in terms of $u$ and decide later whether you want
+to begin with \verb|u=1cm| or \verb|u=0.5cm|. This gives you control over what
+gets scaled and what does not so that changing $u$ will not affect features such
+as line widths.
+
+There are many ways to affect the appearance of a line besides just changing its
+width, so the width-control mechanisms allow a lot of generality that we do not need
+yet.
+This leads to the strange looking statement\index{pickup?\texttt{pickup}}\index{pencircle?\texttt{pencircle}}%
+\index{scaled?\texttt{scaled}}
+$$ \hbox{\verb|pickup pencircle scaled 4pt|} $$
+for setting the line width for subsequent \verb|draw| statements to 4 points.
+(This is about eight times the default line width).
+
+With such a wide line width, even a line of zero length comes out as a big bold
+dot\index{dots}. We can use this to make a grid of bold dots by having one
+\verb|draw| statement
+for each grid point. Such a repetitive sequence of \verb|draw| statements is
+best written as a pair of nested loops:\index{loops}%
+\index{for?\texttt{for}}\index{endfor?\texttt{endfor}}
+$$\begin{verbatim}
+for i=0 upto 2:
+ for j=0 upto 2: draw (i*u,j*u); endfor
+endfor
+\end{verbatim}
+$$
+The outer loop runs for $i=0,1,2$ and the inner loop runs for $j=0,1,2$.
+The result is a three-by-three grid of bold dots as shown in Figure~\ref{fig1}.
+The figure also includes a larger version of the polygonal line diagram that we
+saw before.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+beginfig(2);
+u=1cm;
+draw (2u,2u)--(0,0)--(0,3u)--(3u,0)--(0,0);
+pickup pencircle scaled 4pt;
+for i=0 upto 2:
+ for j=0 upto 2: draw (i*u,j*u); endfor
+endfor
+endfig;
+\end{verbatim}
+\quad \mathcenter{\epsfbox{manfig.2}}
+$$
+\caption{MetaPost commands and the resulting output}
+\label{fig1}
+\end{figure}
+
+Note that the program in Figure~\ref{fig1} starts with
+\verb|beginfig(2)|\index{beginfig?\texttt{beginfig}} and
+ends with \verb|endfig|\index{endfig?\texttt{endfig}}.
+These are macros that perform various administrative
+functions and ensure that the results of all the \verb|draw| statements get
+packaged up and translated into PostScript. A MetaPost input file normally
+contains a sequence of \verb|beginfig|, \verb|endfig| pairs with an
+{\tt end}\index{end?\texttt{end}}
+statement after the last one. If this file is named {\tt fig.mp}, the output
+from \verb|draw| statements between \verb|beginfig(1)| and the next \verb|endfig|
+is written in a file {\tt fig.1}\index{files!output}.
+In other words, the numeric argument to the \verb|beginfig| macro determines the
+name of the corresponding output file.
+
+What does one do with all the PostScript files? They can be included as figures
+in a \TeX\index{TeX?\TeX} or troff\index{troff} document if you have an
+output driver that can handle
+encapsulated PostScript figures. If your standard \TeX\ macro directory contains
+a file {\tt epsf.tex}\index{epsf.tex?\texttt{epsf.tex}}, you can probably include {\tt fig.1}
+in a \TeX\ document as follows:
+$$ \begin{array}{c}
+ \hbox{\verb|\input epsf |}\\
+ \vdots\\
+ \hbox{\verb|$$\epsfbox{fig.1}$$|}
+ \end{array}
+$$
+The \verb|\epsfbox| macro figures out how much room to leave for the figure and
+uses \TeX's \verb|\special| command to insert a request for {\tt fig.1}.
+
+It is also possible to include MetaPost output in a {\em troff\/} document.
+The {\tt -mpictures\/} macro package defines a command \verb|.BP| that includes
+an encapsulated PostScript file. For instance, the {\em troff\/} command
+$$ \hbox{\verb|.BP fig.1 3c 3c|} $$
+includes {\tt fig.1} and specifies that its height and width are both three
+centimeters.
+
+
+\section{Curves}
+\label{curves}
+
+MetaPost is perfectly happy to draw curved lines as well as straight ones.
+A \verb|draw| statement with the points separated by \verb|..| draws
+a smooth curve through the points. For example consider the result of
+$$ \hbox{\verb|draw z0..z1..z2..z3..z4|} $$
+after defining five points as follows:
+$$\begin{verbatim}
+z0 = (0,0); z1 = (60,40);
+z2 = (40,90); z3 = (10,70);
+z4 = (30,50);
+\end{verbatim}
+$$
+Figure~\ref{fig2} shows the curve with points \verb|z0| through \verb|z4|
+labeled.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.3}
+$$
+\caption[A curve through points 0, 1, 2, 3, and 4]
+ {The result of {\tt draw z0..z1..z2..z3..z4}}
+\label{fig2}
+\end{figure}
+
+There are many other ways to draw a curved path through the same five points.
+To make a smooth closed curve, connect \verb|z4| back to the beginning by
+appending \verb|..cycle|\index{cycle?\texttt{cycle}} to the \verb|draw| statement as shown
+in Figure~\ref{fig3}a. It is also possible in a single \verb|draw| statement
+to mix curves and straight lines as shown in Figure~\ref{fig3}b. Just use
+\verb|--| where you want straight lines and \verb|..| where you want curves.
+Thus
+$$ \hbox{\verb|draw z0..z1..z2..z3--z4--cycle|} $$
+produces a curve through points 0,~1, 2, and~3, then a polygonal line from
+point~3 to point~4 and back to point~0. The result is essentially the same
+as having two draw statements
+\begin{eqnarray*}
+ \hbox{\verb|draw z0..z1..z2..z3|}\\
+\noalign{\hbox{and}}
+ \hbox{\verb|draw z3--z4--z0|}
+\end{eqnarray*}
+
+\begin{figure}[htp]
+$$ {\epsfbox{manfig.104} \atop (a)}
+ \qquad {\epsfbox{manfig.204} \atop (b)}
+$$
+\caption[Closed curves through five points]
+ {(a)~The result of {\tt draw z0..\linebreak[0]z1..\linebreak[0]%
+ z2..\linebreak[0]z3..\linebreak[0]z4..\linebreak[0]cycle};
+ (b)~the result of {\tt draw z0..\linebreak[0]z1..\linebreak[0]%
+ z2..\linebreak[0]z3--\linebreak[0]z4--\linebreak[0]cycle}.}
+\label{fig3}
+\end{figure}
+
+\subsection{B\'ezier Cubic Curves}
+
+When MetaPost is asked to draw a smooth curve through a sequence of points,
+it constructs a piecewise cubic curve with continuous slope and approximately
+continuous curvature\index{curvature}. This means that a path specification such
+as
+$$ \hbox{\verb|z0..z1..z2..z3..z4..z5|} $$
+results in a curve that can be defined parametrically\index{parameterization}
+as $(X(t),Y(t))$ for
+$0\le t\le5$, where $X(t)$ and $Y(t)$ are piecewise cubic functions. That is,
+there is a different pair of cubic functions for each integer-bounded
+$t$-interval. If ${\tt z0}=(x_0,y_0)$, ${\tt z1}=(x_1,y_1)$,
+${\tt z2}=(x_2,y_2)$, \ldots, MetaPost selects
+B\'ezier control\index{control points} points
+$(x_0^+,y_0^+)$, $(x_1^-,y_1^-)$, $(x_1^+,y_1^+)$, \ldots, where
+\begin{eqnarray*}
+ X(t+i) &=& (1-t)^3x_i + 3t(1-t)^2x_i^+ + 3t^2(1-t)x_{i+1}^- + t^3x_{i+1},\\
+ Y(t+i) &=& (1-t)^3y_i + 3t(1-t)^2y_i^+ + 3t^2(1-t)y_{i+1}^- + t^3y_{i+1}
+\end{eqnarray*}
+for $0\le t\le1$. The precise rules for choosing the B\'ezier control points
+are described in \cite{ho:splin} and in {\sl The \MF book\/}~\cite{kn:c}.
+
+In order for the path to have a continuous slope at $(x_i,y_i)$, the incoming
+and outgoing directions at $(X(i),Y(i))$ must match. Thus the vectors
+$$ (x_i-x_i^-,\,y_i-y_i^-) \qquad \hbox{and}
+ \qquad (x_i^+-x_i,\,y_i^+-y_i)
+$$
+must have the same direction; i.e., $(x_i,y_i)$ must be on the line segment
+between $(x_i^-,y_i^-)$ and $(x_i^+,y_i^+)$. This situation is illustrated
+in Figure~\ref{fig4} where the B\'ezier control points selected by MetaPost
+are connected by dashed lines. For those who are familiar with the interesting
+properties of this construction, MetaPost allows the control points to be
+specified directly in the following format:\index{controls?\texttt{controls}}
+$$ \begin{verbatim}
+draw (0,0)..controls (26.8,-1.8) and (51.4,14.6)
+ ..(60,40)..controls (67.1,61.0) and (59.8,84.6)
+ ..(40,90)..controls (25.4,94.0) and (10.5,84.5)
+ ..(10,70)..controls ( 9.6,58.8) and (18.8,49.6)
+ ..(30,50);
+\end{verbatim}
+$$
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.5}
+$$
+\caption[A curve and the control polygon]
+ {The result of {\tt draw z0..z1..z2..z3..z4} with the
+ automatically-selected B\'ezier control polygon illustrated by dashed
+ lines.}
+\label{fig4}
+\end{figure}
+
+\subsection{Specifying Direction, Tension, and Curl}
+\label{tenscurl}
+
+MetaPost provides many ways of controlling the behavior of a curved path without
+actually specifying the control points. For instance, some points on the path
+may be selected as vertical or horizontal extrema. If \verb|z1| is to be a
+horizontal extreme and \verb|z2| is to be a vertical extreme, you can specify
+that $(X(t),Y(t))$ should go upward at \verb|z1| and to the left at \verb|z2|:
+$$ \hbox{\verb|draw z0..z1{up}..z2{left}..z3..z4;|} $$
+The resulting shown in Figure~\ref{fig5} has the desired vertical and horizontal
+directions at \verb|z1| and \verb|z2|, but it does not look as smooth as the
+curve in Figure~\ref{fig2}. The reason is the large discontinuity in
+curvature\index{curvature}
+at \verb|z1|. If it were not for the specified direction at \verb|z1|, the
+MetaPost interpreter would have chosen a direction designed to make the curvature
+above \verb|z1| almost the same as the curvature below that point.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.6}
+$$
+\caption[A curve and the control polygon]
+ {The result of {\tt draw z0..z1\char`\{up\char`\}..z2\char`\{left\char`\}%
+ ..z3..z4}.}
+\label{fig5}
+\end{figure}
+
+How can the choice of directions at given points on a curve determine whether
+the curvature will be continuous? The reason is that curves used in MetaPost
+come from a family where a path is determined by its endpoints and the
+directions there. Figures \ref{fig6} and~\ref{fig7} give a good idea of what
+this family of curves is like.
+
+\begin{figure}[htp]
+$$ \mathcenter{\epsfbox{manfig.7}} \quad
+\begin{verbatim}
+beginfig(7)
+for a=0 upto 9:
+ draw (0,0){dir 45}..{dir -10a}(6cm,0);
+endfor
+endfig;
+\end{verbatim}
+$$
+\caption{A curve family and the MetaPost instructions for generating it}
+\label{fig6}
+\end{figure}
+
+\begin{figure}[htp]
+$$ \mathcenter{\epsfbox{manfig.8}} \quad
+\begin{verbatim}
+beginfig(8)
+for a=0 upto 7:
+ draw (0,0){dir 45}..{dir 10a}(6cm,0);
+endfor
+endfig;
+\end{verbatim}
+$$
+\caption{Another curve family with the corresponding MetaPost instructions}
+\label{fig7}
+\end{figure}
+
+Figures \ref{fig6} and~\ref{fig7} illustrate a few new MetaPost features.
+The first is the {\tt dir}\index{dir?\texttt{dir}}\label{Ddirop} operator that takes an
+angle in degrees
+and generates a unit vector in that direction. Thus \verb|dir 0| is equivalent
+to {\tt right}\index{right?\texttt{right}}\label{Dright} and \verb|dir 90| is equivalent to
+{\tt up}\index{up?\texttt{up}}\label{Dup}. There are also predefined direction vectors
+{\tt left}\index{left?\texttt{left}}\label{Dleft}
+and {\tt down}\index{down?\texttt{down}}\label{Ddown} for {\tt dir 180}
+and {\tt dir 270}.
+
+The direction
+vectors given in \verb|{}| can be of any length, and they can come before a
+point as well as after one. It is even possible for a path specification
+to have directions given before and after a point. For example a path
+specification containing
+$$ \hbox{\verb|..{dir 60}(10,0){up}..|} $$
+produces a curve with a corner at $(10,0)$.
+
+Note that some of the curves in Figure~\ref{fig6} have points of
+inflection\index{inflections}.
+This is necessary in order to produce smooth curves in situations like
+Figure~\ref{fig3}a, but it is probably not desirable when dealing with vertical
+and horizontal extreme points as in Figure~\ref{fig8}a. If \verb|z1| is supposed
+to be the topmost point on the curve, this can be achieved by using
+\verb|...|\index{...?\texttt{...}}
+instead of \verb|..| in the path specification as shown in Figure~\ref{fig8}b.
+The meaning of \verb|...| is ``choose an inflection-free path between these
+points unless the endpoint directions make this impossible.'' (It would be
+possible to avoid inflections in Figure~\ref{fig6}, but not in Figure~\ref{fig7}).
+
+\begin{figure}[htp]
+$$ {\mathcenter{\epsfbox{manfig.109}} \atop
+ \hbox{\verb|draw z0{up}..z1{right}..z2{down}|}}
+ \quad
+ {\mathcenter{\epsfbox{manfig.209}} \atop
+ \hbox{\verb|draw z0{up}...z1{right}...z2{down}|}}
+$$
+\caption{Two {\tt draw} statements and the resulting curves.}
+\label{fig8}
+\end{figure}
+
+Another way to control a misbehaving path is to increase the
+``tension''\index{tension} parameter.
+Using \verb|..| in a path specification sets the tension parameter to the default
+value~1. If this makes some part of a path a little too wild, we can selectively
+increase the tension. If Figure~\ref{fig9}a is considered ``too wild,'' a
+{\tt draw} statement of the following form increases the tension between
+{\tt z1} and {\tt z2}:
+$$ \hbox{\verb|draw z0..z1..tension 1.3..z2..z3|} $$
+This produces Figure~\ref{fig9}b. For an asymmetrical effect like
+Figure~\ref{fig9}c, the \verb|draw| statement becomes
+$$ \hbox{\verb|draw z0..z1..tension 1.6 and 1..z2..z3|} $$
+The tension parameter can be less than one, but it must be at least $3\over4$.
+
+\begin{figure}[htp]
+$$ {\mathcenter{\epsfbox{manfig.110}} \atop (a)}
+ \quad
+ {\mathcenter{\epsfbox{manfig.210}} \atop (b)}
+ \quad
+ {\mathcenter{\epsfbox{manfig.310}} \atop (c)}
+$$
+\caption[Effects of changing the tension parameter]
+ {Results of {\tt draw z0..z1..tension} $\alpha$ {\tt and} $\beta$
+ {\tt ..z2..z3} for various $\alpha$ and $\beta$:
+ (a)~$\alpha=\beta=1$; (b)~$\alpha=\beta=1.3$;
+ (c)~$\alpha=1.5$, $\beta=1$.}
+\label{fig9}
+\end{figure}
+
+MetaPost paths also have a parameter called ``curl''\index{curl?\texttt{curl}} that affects
+the ends of a
+path. In the absence of any direction specifications, the first and last segments
+of a non-cyclic path are approximately circular arcs as in the $c=1$ case of
+Figure~\ref{fig10}. To use a different value for the curl parameter, specify
+\verb|{curl c}| for some other value of $c$. Thus
+$$ \hbox{\verb|draw z0{curl c}..z1..{curl c}z2|} $$
+sets the curl parameter for \verb|z0| and \verb|z2|. Small values of the curl
+parameter reduce the curvature\index{curvature} at the indicated path endpoints,
+while large values
+increase the curvature as shown in Figure~\ref{fig10}. In particular, a curl value
+of zero makes the curvature approach zero.
+
+\begin{figure}[htp]
+$$ {\mathcenter{\epsfbox{manfig.111}} \atop c=0}
+ \qquad
+ {\mathcenter{\epsfbox{manfig.211}} \atop c=1}
+ \qquad
+ {\mathcenter{\epsfbox{manfig.311}} \atop c=2}
+ \qquad
+ {\mathcenter{\epsfbox{manfig.411}} \atop c=\infty}
+$$
+\caption[Effects of changing the curl parameter]
+ {Results of {\tt draw z0\char`\{curl c\char`\}..z1..%
+ \char`\{curl c\char`\}z2} for various values
+ of the curl parameter~$c$.}
+\label{fig10}
+\end{figure}
+
+\subsection{Summary of Path Syntax}
+
+There are a few other features of MetaPost path syntax, but they are relatively
+unimportant. Since \MF\ uses the same path syntax, interested readers can refer
+to \cite[chapter 14]{kn:c}. The summary of path syntax in Figure~\ref{sypath}
+includes everything discussed so far including the \verb|--| and \verb|...|
+constructions which \cite{kn:c} shows to be macros rather than primitives.
+A few comments on the semantics are in order here: If there is a non-empty
+$\descr{direction specifier}$ before a $\descr{path knot}$ but not after it,
+or vice versa, the specified direction (or curl amount) applies to both the
+incoming and outgoing path segments. A similar arrangement applies when a
+$\descr{controls}$ specification gives only one $\descr{pair primary}$.
+Thus
+$$ \hbox{\verb|..controls (30,20)..|} $$
+is equivalent to
+$$ \hbox{\verb|...controls (30,20) and (30,20)..|} $$
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\descr{path expression} \rightarrow
+ \descr{path subexpression}$\\
+\qquad \= ${}\mid \descr{path subexpression} \descr{direction specifier}$\\
+\> ${}\mid \descr{path subexpression} \descr{path join}$ \verb|cycle|\\
+$\descr{path subexpression} \rightarrow
+ \descr{path knot}$\\
+\> ${}\mid \descr{path expression} \descr{path join} \descr{path knot}$\\
+$\descr{path join} \rightarrow
+ \hbox{\verb|--|}$\\
+\> ${}\mid \descr{direction specifier} \descr{basic path join}
+ \descr{direction specifier}$\\
+$\descr{direction specifier} \rightarrow
+ \descr{empty}$\\
+\> ${}\mid {}$\verb|{curl| $\descr{numeric expression}$\verb|}|\\
+\> ${}\mid {}$\verb|{|$\descr{pair expression}$\verb|}|\\
+\> ${}\mid {}$\verb|{|$\descr{numeric expression}$\verb|,|%
+ $\descr{numeric expression}$\verb|}|\\
+$\descr{basic path join} \rightarrow
+ \hbox{\verb|..|}
+ \mid \hbox{\verb|...|}
+ \mid \hbox{\verb|..|}\descr{tension}\hbox{\verb|..|}
+ \mid \hbox{\verb|..|}\descr{controls}\hbox{\verb|..|}$\\
+$\descr{tension} \rightarrow
+ \hbox{\verb|tension|}\descr{numeric primary}$\\
+\> ${}\mid \hbox{\verb|tension|}\descr{numeric primary}
+ \hbox{\verb|and|}\descr{numeric primary}$\\
+$\descr{controls} \rightarrow
+ \hbox{\verb|controls|}\descr{pair primary}$\\
+\> ${}\mid \hbox{\verb|controls|}\descr{pair primary}
+ \hbox{\verb|and|}\descr{pair primary}$
+\end{ctabbing}
+\caption{The syntax for path construction}
+\label{sypath}
+\end{figure}
+
+A pair of coordinates like \verb|(30,20)| or a \verb|z| variable that represents a
+coordinate pair is what Figure~\ref{sypath} calls a $\descr{pair primary}$.
+A $\descr{path knot}$ is similar except that it can take on other forms such as
+a path expression in parentheses. Primaries and expressions of various types will
+be discussed in full generality in Section~\ref{exprs}.
+
+
+\section{Linear Equations}
+\label{lin.eq}
+
+An important feature taken from \MF\ is the ability to solve linear
+equations so that programs can be written in a partially declarative fashion.
+For example, the MetaPost interpreter can read
+$$ \hbox{\verb|a+b=3; 2*a=b+3;|} $$
+and deduce that $a=2$ and $b=1$. The same equations can be written slightly more
+compactly by stringing them together with multiple equal signs:
+$$ \hbox{\verb|a+b = 2*a-b = 3;|} $$
+Whichever way you give the equations, you can then give the command\index{show?\texttt{show}}
+$$ \hbox{\tt show a,b;} $$
+to see the values of {\tt a} and {\tt b}. MetaPost responds by typing
+$$\begin{verbatim}
+>> 2
+>> 1
+\end{verbatim}
+$$
+
+Note that {\tt =}\index{=?\texttt{=}} is not an assignment operator; it simply declares
+that the left-hand side equals the right-hand side. Thus {\tt a=a+1} produces an
+error message complaining about an
+``inconsistent equation\index{Inconsistent equation?\texttt{Inconsistent equation}}.'' The way to increase
+the value of {\tt a} is to use the assignment\index{assignment} operator
+{\tt :=}\index{:=?\texttt{:=}} as follows:
+$$ \hbox{\tt a:=a+1;} $$
+In other words, {\tt :=} is for changing existing values while {\tt =} is for
+giving linear equations to solve.
+
+There is no restriction against mixing equations and assignment operations as in
+the following example:
+$$ \hbox{\tt a = 2; b = a; a := 3; c = a;} $$
+After the first two equations set {\tt a} and~{\tt b} equal to 2, the assignment
+operation changes {\tt a} to~3 without affecting {\tt b}. The final value of
+{\tt c} is 3 since it is equated to the new value of {\tt a}. In general, an
+assignment operation is interpreted by first computing the new value, then
+eliminating the old value from all existing equations before actually assigning
+the new value.
+
+\subsection{Equations and Coordinate Pairs}
+
+MetaPost can also solve linear equations involving coordinate pairs. We have
+already seen many trivial examples of this in the form of equations like
+$$ \hbox{\verb|z1=(0,.2in)|} $$
+Each side of the equation must be formed by adding or subtracting coordinate pairs
+and multiplying or dividing them by known numeric quantities. Other ways of
+naming pair-valued variables will be discussed later, but the
+${\tt z}\descr{number}$\index{z convention?{\tt z} convention} is convenient because it is
+an abbreviation for
+$$ \hbox{\tt (x}\descr{number} \hbox{\tt, y}\descr{number}\hbox{\tt)} $$
+This makes it possible to give values to \verb|z| variables by giving equations
+involving their coordinates. For instance, points {\tt z1}, {\tt z2}, {\tt z3},
+and~{\tt z6} in Figure~\ref{fig12} were initialized via the following equations:
+\begin{eqnarray*}
+ &&\hbox{\verb|z1=-z2=(.2in,0);|} \\
+ &&\hbox{\verb|x3=-x6=.3in;|} \\
+ &&\hbox{\verb|x3+y3=x6+y6=1.1in;|}
+\end{eqnarray*}
+Exactly the same points could be obtained by setting their values directly:
+$$ \begin{verbatim}
+z1=(.2in,0); z2=(-.2in,0);
+z3=(.3in,.6in); z6=(-.3in,1.2in);
+\end{verbatim}
+$$
+
+After reading the equations, the MetaPost interpreter knows the values of
+{\tt z1}, {\tt z2},
+{\tt z3}, and~{\tt z6}. The next step in the construction of Figure~\ref{fig12}
+is to define points {\tt z4} and {\tt z5} equally spaced along the line from
+{\tt z3} to {\tt z6}. Since this operation comes up often, MetaPost has a special
+syntax for it. This mediation construction\index{mediation}
+$$ \hbox{\verb|z4=1/3[z3,z6]|} $$
+means that {\tt z4} is $1\over3$ of the way from $z3$ to $z6$; i.e.,
+$$ {\tt z4}={\tt z3}+{1\over3}({\tt z6}-{\tt z3}). $$
+Similarly
+$$ \hbox{\verb|z5=2/3[z3,z6]|} $$
+makes {\tt z5} $2\over3$ of the way from $z3$ to $z6$.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+beginfig(13);
+z1=-z2=(.2in,0);
+x3=-x6=.3in;
+x3+y3=x6+y6=1.1in;
+z4=1/3[z3,z6];
+z5=2/3[z3,z6];
+z20=whatever[z1,z3]=whatever[z2,z4];
+z30=whatever[z1,z4]=whatever[z2,z5];
+z40=whatever[z1,z5]=whatever[z2,z6];
+draw z1--z20--z2--z30--z1--z40--z2;
+pickup pencircle scaled 1pt;
+draw z1--z2;
+draw z3--z6;
+endfig;
+\end{verbatim}
+\quad \mathcenter{\epsfbox{manfig.13}}
+$$
+\caption[MetaPost code and figure using linear equations]
+ {MetaPost commands and the resulting figure. Point labels have been
+ added to the figure for clarity.}
+\label{fig12}
+\end{figure}
+
+Mediation can also be used to say that some point is at an unknown position along
+the line between two known points. For instance, we could a introduce new
+variable {\tt aa} and write something like
+$$ \hbox{\verb|z20=aa[z1,z3];|} $$
+This says that {\tt z20} is some unknown fraction {\tt aa} of the way along the
+line between {\tt z1} and {\tt z3}. Another such equation involving a different
+line is sufficient to fix the value of {\tt z20}. To say that {\tt z20} is at
+the intersection of the {\tt z1}-{\tt z3} line and the {\tt z2}-{\tt z4} line,
+introduce another variable {\tt ab} and set
+$$ \hbox{\verb|z20=ab[z2,z4];|} $$
+This allows MetaPost to solve for {\tt x20}, {\tt y20}, {\tt aa}, and {\tt ab}.
+
+It is a little painful to keep
+thinking up new names like {\tt aa} and {\tt ab}. This can be avoided by using
+a special feature called {\tt whatever}\index{whatever?\texttt{whatever}}\label{Dwhatev}.
+This macro generates a new anonymous
+variable each time it appears. Thus the statement
+$$ \hbox{\verb|z20=whatever[z1,z3]=whatever[z2,z4]|} $$
+sets {\tt z20} as before, except it uses {\tt whatever} to generate two
+{\em different\/} anonymous variables instead of {\tt aa} and {\tt ab}.
+This is how Figure~\ref{fig12} sets {\tt z20}, {\tt z30}, and
+{\tt z40}.
+
+\subsection{Dealing with Unknowns}
+
+A system of equations such as those used in Figure~\ref{fig12} can be given in
+any order as long as all the equations are linear and all the variables can
+be determined before they are needed. This means that the equations
+\begin{eqnarray*}
+ && \hbox{\verb|z1=-z2=(.2in,0);|}\\
+ && \hbox{\verb|x3=-x6=.3in;|}\\
+ && \hbox{\verb|x3+y3=x6+y6=1.1in;|}\\
+ && \hbox{\verb|z4=1/3[z3,z6];|}\\
+ && \hbox{\verb|z5=2/3[z3,z6];|}
+\end{eqnarray*}
+suffice to determine {\tt z1} through {\tt z6}, no matter what order the equations
+are given in. On the other hand
+$$ \hbox{\verb|z20=whatever[z1,z3]|} $$
+is legal only when a known value has previously been specified for the difference
+${\tt z3}-{\tt z1}$, because the equation is equivalent
+to\index{mediation}
+$$ \hbox{\verb|z20 = z1 + whatever*(z3-z1)|} $$
+and the linearity requirement disallows multiplying unknown components of
+${\tt z3}-{\tt z1}$ by the anonymous unknown result of {\tt whatever}. The general
+rule is that you cannot multiply two unknown quantities or divide by an unknown
+quantity, nor can an unknown quantity be used in a {\tt draw} statement.
+Since only linear equations are allowed, the MetaPost interpreter can easily solve
+the equations and keep track of what values are known.
+
+The most natural way to ensure that MetaPost can handle an expression like
+$$ \hbox{\verb|whatever[z1,z3]|} $$
+is to ensure that {\tt z1} and {\tt z3} are both known. However this is not
+actually required since MetaPost may be able to deduce a known value for
+${\tt z3}-{\tt z1}$ before either of {\tt z1} and {\tt z3} are known.
+For instance, MetaPost will accept the equations
+$$ \hbox{\verb|z3=z1+(.1in,.6in); z20=whatever[z1,z3];|} $$
+but it will not be able to determine any of the components of {\tt z1}, {\tt z3},
+or {\tt z20}.
+
+These equations do give partial information about {\tt z1}, {\tt z3},
+and {\tt z20}. A good way to see this is to give another equation such as
+$$ \hbox{\verb|x20-x1=(y20-y1)/6;|} $$
+This produces the error message
+``{\tt ! Redundant equation}\index{Redundant equation?\texttt{Redundant equation}}.''
+MetaPost assumes that you are trying to tell it something new, so it will usually
+warn you when you give a redundant equation. If the new equation had been
+$$ \hbox{\verb|(x20-x1)-(y20-y1)/6=1in;|} $$
+the error message would have been\index{Inconsistent equation?\texttt{Inconsistent equation}}
+$$ \hbox{\verb|! Inconsistent equation (off by 71.99979).|} $$
+This error message illustrates
+roundoff\index{roundoff error} error in MetaPost's linear equation solving
+mechanism. Roundoff error
+is normally not a serious problem. but it is likely to cause trouble if you are
+trying to do something like find the intersection of two lines that are almost
+parallel.
+
+
+\section{Expressions}
+\label{exprs}
+
+It is now time for a more systematic view of the MetaPost language. We have seen
+that there are numeric quantities and coordinate pairs, and that these can be
+combined to specify paths for {\tt draw} statements.
+We have also seen how variables can be used in linear equations, but we have not
+discussed all the operations and data types that can be used in equations.
+
+It is possible to experiment with expressions involving any of the data types
+mentioned below by using the statement\index{show?\texttt{show}}\label{Dshow}
+$$ {\tt show}\, \descr{expression} $$
+to ask MetaPost to print a symbolic representation of the value of each expression.
+For known numeric values, each is printed on a new line preceded by ``{\tt >>} ''.
+Other types of results are printed similarly, except that complicated values are
+sometimes not printed on standard output. This produces a reference to the
+transcript file\index{files!transcript} that looks like this:
+$$ \hbox{\tt >> picture (see the transcript file)} $$
+If you want to the full results of {\tt show} statements to be printed on your
+terminal, assign a positive value to the
+internal\index{internal variables} variable\index{variables!internal}
+{\tt tracingonline}\index{tracingonline?\texttt{tracingonline}}\label{Dtonline}.
+
+\subsection{Data Types}
+
+MetaPost actually has nine basic data types\index{types}: numeric,
+pair, path, transform,
+color, string, boolean, picture, and pen. Let us consider these one at a time
+beginning with the numeric type.
+
+Numeric\index{numeric type} quantities in MetaPost are represented in fixed
+point arithmetic\index{arithmetic} as
+integer multiples of $1\over65536$. They must normally have absolute values
+less than 4096 but intermediate results can be eight times larger.
+This should not be a problem for distances or coordinate values since 4096
+PostScript points is more than 1.4~meters. If you need to work with numbers
+of magnitude 4096 or more, setting the internal variable
+{\tt warningcheck}\index{warningcheck}\label{Dwarncheck} to zero
+suppresses the warning messages about large numeric quantities.
+
+The pair\index{pair type} type is represented as a pair of numeric quantities.
+We have seen that pairs
+are used to give coordinates in {\tt draw} statements. Pairs can be added,
+subtracted, used in mediation expressions, or multiplied or divided by numerics.
+
+Paths\index{path type} have already been discussed in the context of {\tt draw}
+statements, but
+that discussion did not mention that paths are first-class objects that can be
+stored and manipulated. A path represents a straight or curved line that is
+defined parametrically.
+
+Another data type represents an arbitrary affine
+transformation\index{transform type}. A {\em transform\/} can be any combination
+of rotating, scaling, slanting,
+and shifting. If ${\tt p}=(p_x,p_y)$ is a pair and {\tt T} is a
+transform,\index{transformed?\texttt{transformed}}
+$$ \hbox{\tt p transformed T} $$
+is a pair of the form
+$$ (t_x+t_{xx}p_x+t_{xy}p_y, t_y+t_{yx}p_x+t_{yy}p_y), $$
+where the six numeric quantities $(t_x,t_y,t_{xx},t_{xy},t_{yx},t_{yy})$
+determine {\tt T}. Transforms can also be applied to paths, pictures, pens,
+and transforms.
+
+The color\index{color type} type is a lot like the pair type, except that it
+has three components
+instead of two. Like pairs, colors can be added, subtracted, used in mediation
+expressions, or multiplied or divided by numerics. Colors can be specified
+in terms of the predefined constants {\tt black}\index{black?\texttt{black}}\label{Dblack},
+{\tt white}\index{white?\texttt{white}}\label{Dwhite}, {\tt red}\index{red?\texttt{red}}\label{Dred},
+{\tt green}\index{green?\texttt{green}}\label{Dgreen},
+{\tt blue}\index{blue?\texttt{blue}}\label{Dblue}, or the red, green,
+and blue components can be given explicitly. Black is {\tt (0,0,0)} and white
+is {\tt (1,1,1)}. A level of gray such as {\tt (.4,.4,.4)} can be specified
+as {\tt 0.4white}. There is no restriction against colors ``blacker
+than black'' or ``whiter than white'' except all components are snapped
+back to the $[0,1]$ range when a color is given in a PostScript\index{PostScript}
+output file. MetaPost solves linear equations involving colors the same way it
+does for pairs.
+
+A string\index{string type} represents a sequence of characters.
+String constants\index{string constants} are given
+in double quotes \hbox{\verb|"like this"|}. String constants cannot contain
+double quotes or newlines, but there is a way to construct a string containing
+any sequence of eight-bit characters.
+
+The boolean\index{boolean type} type has the constants
+{\tt true}\index{true?\texttt{true}}\label{Dtrue} and
+{\tt false}\index{false}\label{Dfalse} and the
+operators {\tt and}\index{and?\texttt{and}}\label{Dand}, {\tt or}\index{or?\texttt{or}}\label{Dor},
+{\tt not}\index{not?\texttt{not}}\label{Dnot}. The relations \verb|=| and
+\verb|<>|\index{<>?\texttt{<>}}\label{Dcmpar}
+test objects of any type for equality and inequality\index{inequality}.
+Comparison\index{comparison} relations \verb|<|\index{<?\texttt{<}},
+\verb|<=|\index{<=?\texttt{<=}}, \verb|>|\index{>?\texttt{>}}, and \verb|>=|\index{>=?\texttt{>=}}
+are defined lexicographically for
+strings and in the obvious way for numerics. Ordering relations are also
+defined for booleans, pairs, colors, and transforms, but the comparison rules
+are not worth discussing here.
+
+The picture\index{picture type} data type is just what the name implies.
+Anything that can be drawn in MetaPost can be stored in a picture variable.
+In fact, the {\tt draw}\index{draw?\texttt{draw}}
+statement actually stores its results in a special picture variable called
+{\tt currentpicture}\index{currentpicture?\texttt{currentpicture}}. Pictures can be added to other
+pictures and operated on by transforms.
+
+Finally, there is a data type called a pen\index{pen type}. The main function
+of pens in
+MetaPost is to determine line thickness, but they can also be used to achieve
+calligraphic effects. The statement\index{pickup?\texttt{pickup}}\label{Dpickup}
+$$ {\tt pickup\ }\descr{pen expression} $$
+causes the given pen to be used in subsequent {\tt draw} statements.
+Normally, the pen expression is of the form
+$$ {\tt pencircle\ scaled\ }\descr{numeric primary}. $$
+This defines a circular pen that produces lines of constant thickness.
+If calligraphic effects are desired, the pen expression can be adjusted to give
+an elliptical pen or a polygonal pen.
+
+\subsection{Operators}
+
+There are many different ways to make expressions of the nine basic types, but
+most of the operations fit into a fairly simple syntax with four levels of
+precedence as shown in Figure~\ref{syexpr}. There are
+primaries\index{primary?\tdescr{primary}}, secondaries\index{secondary?\tdescr{secondary}},
+tertiaries\index{tertiary?\tdescr{tertiary}}, and expressions\index{expression?\tdescr{expression}}
+of each of the basic types, so the syntax rules could
+be specialized to deal with items such as \tdescr{numeric primary},
+\tdescr{boolean tertiary}, etc. This allows the result type for an operation
+to depend on the choice of operator and the types of its operands. For example,
+the {\tt <} relation is a \tdescr{tertiary binary} that can be applied
+to a \tdescr{numeric expression} and a \tdescr{numeric tertiary} to give a
+\tdescr{boolean expression}. The same operator can accept other operand types
+such as \tdescr{string expression} and \tdescr{string tertiary}, but an error
+message results if the operand types do not match.
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{primary} \rightarrow \descr{variable}$\\
+$\tt \qquad \;|\; \hbox{\tt (}\descr{expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; \descr{nullary op}$\\
+$\tt \qquad \;|\; \descr{of operator} \descr{expression}
+ of \descr{primary}$\\
+$\tt \qquad \;|\; \descr{unary op} \descr{primary}$\\
+$\tt \descr{secondary} \rightarrow \descr{primary}$\\
+$\tt \qquad \;|\; \descr{secondary} \descr{primary binop} \descr{primary}$\\
+$\tt \descr{tertiary} \rightarrow \descr{secondary}$\\
+$\tt \qquad \;|\; \descr{tertiary} \descr{secondary binop}
+ \descr{secondary}$\\
+$\tt \descr{expression} \rightarrow \descr{tertiary}$\\
+$\tt \qquad \;|\; \descr{expression} \descr{tertiary binop}
+ \descr{tertiary}$
+\end{ctabbing}
+\caption{The overall syntax rules for expressions}
+\index{unary op?\tdescr{unary op}} \index{nullary op?\tdescr{nullary op}}
+\index{primary binop?\tdescr{primary binop}} \index{secondary binop?\tdescr{secondary binop}}
+\index{tertiary binop?\tdescr{tertiary binop}}
+\label{syexpr}
+\end{figure}
+
+The multiplication and division operators {\tt *}\label{Dmldiv}
+and~{\tt /} are examples of what
+Figure~\ref{syexpr} calls a \tdescr{primary binop}. Each can accept two numeric
+operands or one numeric operand and one operand of type pair or color.
+The exponentiation operator \verb|**|\index{**?\texttt{**}}\index{exponentiation}\label{Dpow}
+is a \tdescr{primary binop} that requires two numeric operands.
+Placing this at the
+same level of precedence as multiplication
+and division has the unfortunate consequence that \verb|3*a**2| means $(3a)^2$,
+not $3(a^2)$\index{parsing irregularities}. Since unary negation\label{Dneg}
+applies at the primary level, it also turns
+out that \verb|-a**2| means $(-a)^2$. Fortunately, subtraction has lower
+precedence so that \verb|a-b**2| does mean $a-(b^2)$ instead of $(a-b)^2$.
+
+Another \tdescr{primary binop} is the
+{\tt dotprod}\index{dotprod?\texttt{dotprod}}\label{Ddprod} operator that computes the
+vector dot product of two pairs. For example, {\tt z1 dotprod z2} is equivalent
+to {\tt x1*y1 + x2*y2}.
+
+The additive operators {\tt +} and {\tt -}\label{Dadd} are
+\tdescr{secondary binops} that
+operate on numerics, pairs, or colors and produce results of the same type.
+Other operators that fall in this category are ``Pythagorean addition''
+\verb|++|\index{++?\texttt{++}}\label{Dpyadd} and
+``Pythagorean subtraction'' \verb|+-+|\index{+-+?\texttt{+-+}}\label{Dpysub}:
+\verb|a++b| means $\sqrt{a^2+b^2}$ and \verb|a+-+b| means $\sqrt{a^2-b^2}$.
+There are too many other operators to list here, but some of the most important
+are the boolean operators {\tt and}\index{and?\texttt{and}} and {\tt or}\index{or?\texttt{or}}.
+The {\tt and} operator is a
+\tdescr{primary binop} and the {\tt or} operator is a \tdescr{secondary binop}.
+
+The basic operations on strings are concatenation\index{concatenation} and
+substring construction.
+The \tdescr{tertiary binop} \verb|&|\index{&?\texttt{\&}}\label{Damp}
+implements concatenation; e.g.,
+$$ \hbox{\verb|"abc" & "de"|} $$
+produces the string \verb|"abcde"|.
+For substring construction, the
+\tdescr{of operator} {\tt substring}\index{substring of?\texttt{substring of}}\label{Dsubstr}
+is used like this:
+$$ {\tt substring}\, \descr{pair expression} \,{\tt of}\, \descr{string primary} $$
+The \tdescr{pair expression} determines what part of the string to select. For
+this purpose, the string is indexed\index{indexing} so that integer positions
+fall {\em between\/} characters. Pretend the string is written on a piece of
+graph paper
+so that the first character occupies $x$~coordinates between zero and one and the
+next character covers the range $1\le x\le2$, etc. Thus the string \verb|"abcde"|
+should be thought of like this
+$$ \epsfbox{manfig.14} $$
+and {\tt substring (2,4) of "abcde"} is {\tt "cd"}. This takes a little getting
+used to but it tends to avoid annoying ``off by one'' errors.
+
+Some operators take no arguments at all. An example of what Figure~\ref{syexpr}
+calls a \tdescr{nullary op} is
+{\tt nullpicture}\index{nullpicture?\texttt{nullpicture}}\label{Dnlpic} which
+returns a completely blank picture.
+
+The basic syntax in Figure~\ref{syexpr} only covers aspects of the expression
+syntax that are relatively type-independent. For instance, the complicated path
+syntax given in Figure~\ref{sypath} gives alternative rules for constructing a
+\tdescr{path expression}. An additional rule\index{path knot?\tdescr{path knot}}
+$$ \descr{path knot} \rightarrow \descr{pair tertiary} \;|\; \descr{path tertiary}
+$$
+explains the meaning of \tdescr{path knot} in Figure~\ref{sypath}. This means
+that the path expression
+$$ \hbox{\verb|z1+(1,1){right}..z2|} $$
+does not need parentheses around {\tt z1+(1,1)}.
+
+\subsection{Fractions, Mediation, and Unary Operators}
+
+Mediation\index{mediation} expressions do not appear in the basic expression
+syntax of Figure~\ref{syexpr}. Mediation expressions are parsed at the
+\tdescr{primary} level, so the general rule for constructing them is
+$$ \descr{primary} \rightarrow
+ \descr{numeric atom} \hbox{\tt [} \descr{expression}
+ \hbox{\tt ,} \descr{expression} \hbox{\tt ]}
+$$
+where each \tdescr{expression} can be of type numeric, pair, or color.
+The \tdescr{numeric atom}\index{numeric atom?\tdescr{numeric atom}} in a mediation
+expression is an extra simple type of \tdescr{numeric primary} as
+shown in Figure~\ref{synprim}. The meaning of all this is that the initial
+parameter in a mediation expression needs to be parenthesized when it is not
+just a variable, a positive number, or a positive fraction.
+For example,\index{parsing irregularities}
+$$ \hbox{\tt -1[a,b]} \quad {\rm and}\quad \hbox{\tt (-1)[a,b]} $$
+are very different: the former is $-b$ since it is equivalent to
+{\tt -(1[a,b])}; the latter is $a-(b-a)$ or $2a-b$.
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{numeric primary} \rightarrow \descr{numeric atom}$\\
+$\tt \qquad \;|\; \descr{numeric atom}\hbox{\tt [}
+ \descr{numeric expression}\hbox{\tt ,}\descr{numeric expression}\hbox{\tt ]}$\\
+$\tt \qquad \;|\; \descr{of operator} \descr{expression} of \descr{primary}$\\
+$\tt \qquad \;|\; \descr{unary op} \descr{primary}$\\
+$\tt \descr{numeric atom} \rightarrow \descr{numeric variable}$\\
+$\tt \qquad \;|\; \descr{number or fraction}$\\
+$\tt \qquad \;|\; \hbox{\tt (}\descr{numeric expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; \descr{numeric nullary op}$\\
+$\tt \descr{number or fraction} \rightarrow \descr{number}
+ \hbox{\tt /}\descr{number}$\\
+$\tt \qquad \;|\; \descr{number not followed by
+ `$\hbox{\tt /}\descr{number}$'}$\\
+\end{ctabbing}
+\caption{Syntax rules for numeric primaries}
+\label{synprim}
+\end{figure}
+
+A noteworthy feature of the syntax rules in Figure~\ref{synprim} is that the
+{\tt /}\index{fractions} operator binds most tightly when its operands are
+numbers. Thus {\tt 2/3} is a
+\tdescr{numeric atom}\index{numeric atom?\tdescr{numeric atom}}\index{parsing irregularities}
+while {\tt (1+1)/3} is only a \tdescr{numeric secondary}. Applying a
+\tdescr{primary binop} such as {\tt sqrt}\index{sqrt?\texttt{sqrt}}\label{Dsqrt}
+makes the difference clear:
+$$ \hbox{\tt sqrt 2/3} $$
+means $\sqrt{2\over3}$ while
+$$ \hbox{\tt sqrt(1+1)/3} $$
+means $\sqrt 2/3$.
+Operators such as {\tt sqrt} can be written in standard functional notation,
+but it is often unnecessary to parenthesize the argument. This applies to any
+function that is parsed as a \tdescr{primary binop}. For instance
+{\tt abs(x)}\index{abs?\texttt{abs}}\label{Dabs} and {\tt abs x} both compute the
+absolute value of {\tt x}. The same holds for the
+{\tt round}\index{round?\texttt{round}}\label{Dround},
+{\tt floor}\index{floor?\texttt{floor}}\label{Dfloor},
+{\tt ceiling}\index{ceiling?\texttt{ceiling}}\label{Dceil},
+{\tt sind}\index{sind?\texttt{sind}}\label{Dsind},
+and {\tt cosd}\index{cosd?\texttt{cosd}}\label{Dcosd}
+functions. The last two of these compute trigonometric functions of angles in
+degrees.
+
+Not all unary operators take numeric arguments and return numeric results.
+For instance, the {\tt abs}\index{abs?\texttt{abs}} operator can be applied to a pair
+to compute the Euclidean length of a vector. Applying the
+{\tt unitvector}\index{unitvector?\texttt{unitvector}}\label{Duvec} operator to a pair produces
+the same pair rescaled so that its Euclidean length is~1.
+The {\tt decimal}\index{decimal?\texttt{decimal}}\label{Ddecop}
+operator takes a number and returns the string representation.
+The {\tt angle}\index{angle?\texttt{angle}}\label{Dangle}
+operator takes a pair and computes the two-argument arctangent; i.e., {\tt angle}
+is the inverse of the {\tt dir} operator that was discussed in
+Section~\ref{tenscurl}. There is also an operator
+{\tt cycle}\index{cycle?\texttt{cycle}}\label{Dcycop}
+that takes a \tdescr{path primary} and returns a boolean result indicating whether
+the path is a closed curve.
+
+There is a whole class of other operators that classify expressions and return
+boolean results. A type name such as {\tt pair}\index{pair?\texttt{pair}} can operate on
+any type of \tdescr{primary} and return a boolean result indicating whether the
+argument is a {\tt pair}\label{Dpairop}. Similarly, each of the following can
+be used as a unary operator:
+{\tt numeric}\index{numeric?\texttt{numeric}}\label{Dnumop},
+{\tt boolean}\index{boolean?\texttt{boolean}}\label{Dboolop},
+{\tt color}\index{color?\texttt{color}}\label{Dcolrop},
+{\tt string}\index{string?\texttt{string}}\label{Dstrgop},
+{\tt transform}\index{transform?\texttt{transform}}\label{Dtrnfop},
+{\tt path}\index{path?\texttt{path}}\label{Dpathop},
+{\tt pen}\index{pen?\texttt{pen}}\label{Dpenop},
+and {\tt picture}\index{picture?\texttt{picture}}\label{Dpictop}.
+Besides just testing the type of a \tdescr{primary}, you can use the
+{\tt known}\index{known?\texttt{known}}\label{Dknown} and
+{\tt unknown}\index{unknown?\texttt{unknown}}\label{Dunknwn} operators to
+test if it has a completely known value.
+
+Even a number can behave like an operator in some contexts.
+This refers to the trick that allows {\tt 3x}\index{multiplication, implicit} and
+{\tt 3cm} as alternatives to {\tt 3*x} and {\tt 3*cm}. The rule is that a
+\tdescr{number or fraction} that is not followed by {\tt +}, {\tt -}, or another
+\tdescr{number or fraction} can serve as a \tdescr{primary binop}.
+Thus {\tt 2/3x}\index{parsing irregularities}
+is two thirds of {\tt x} but {\tt (2)/3x} is $2\over3x$ and {\tt 3 3} is illegal.
+
+There are also operators for extracting numeric subfields from pairs, colors,
+and even transforms. If {\tt p} is a \tdescr{pair primary},
+{\tt xpart p}\index{xpart?\texttt{xpart}}\label{Dxprt} and
+{\tt ypart p}\index{ypart}\label{Dyprt} extract its
+components so that
+$$ \hbox{\tt (xpart p, ypart p)} $$
+is equivalent to~{\tt p} even if {\tt p} is an unknown pair that is being used
+in a linear equation. Similarly, a color {\tt c} is equivalent
+to\index{redpart?\texttt{redpart}}\index{greenpart?\texttt{greenpart}}\index{bluepart?\texttt{bluepart}}\label{Drgbprt}
+$$ \hbox{\tt (redpart c, greenpart c, bluepart c)} $$
+The part specifiers for transforms will be discussed later.
+
+
+\section{Variables}
+\label{vars}
+
+MetaPost allows compound variable names such as {x.a}, {\tt x2r}, {\tt y2r},
+and {\tt z2r}, where {\tt z2r} means {\tt (x2r,y2r)} and {\tt z.a} means
+{\tt (x.a,y.a)}. In fact there is a broad class of suffixes such that
+{\tt z}\tdescr{suffix}\index{suffix?\tdescr{suffix}} means
+$$ (x\descr{suffix},\, y\descr{suffix}). $$
+Since a \tdescr{suffix} is composed of tokens, it is best to begin with a few
+comments about tokens.
+
+\subsection{Tokens}
+
+A MetaPost input file is treated as a sequence of numbers, string constants, and
+symbolic tokens\index{tokens}\index{tokens!symbolic}. A number consists of a
+sequence of digits possibly containing
+a decimal point. Technically, the minus sign in front of a negative number is
+a separate token. Since MetaPost uses fixed point arithmetic\index{arithmetic},
+it does not understand exponential notation such as {\tt 6.02E23}. MetaPost
+would interpret this as the number 6.02, followed by the symbolic token {\tt E},
+followed by the number~23.
+
+Anything between a pair of double quotes {\tt "} is a
+string constant\index{string constants}. It is
+illegal for a string constant to start on one line and end on a later line.
+Nor can a string constant contain double quotes {\tt "} or anything other than
+printable ASCII characters.
+
+Everything in a line of input other than numbers and string constants is broken
+into symbolic tokens\index{tokens!symbolic}. A symbolic token is a sequence of
+one or more similar characters, where characters are ``similar'' if they occur
+on the same row of Table~\ref{classes}.
+
+\begin{table}
+$$\begin{tabular}{c}
+\verb|ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz|\\
+{\tt :<=>|}\\
+\verb|#&@$|\\
+\verb|/*\|\\
+{\tt +-}\\
+{\tt !?}\\
+{\tt '`}\\
+\verb|^~|\\
+\verb|{}|\\
+{\tt [}\\
+{\tt ]}\\
+\end{tabular}
+$$
+\caption{Character classes for tokenization}
+\label{classes}
+\end{table}
+
+Thus \verb|A_alpha| and {\tt +-+} are symbolic tokens but {\tt !=} is interpreted
+as two tokens and {\tt x34} is a symbolic token followed by a number. Since the
+brackets {\tt [} and {\tt ]} are listed on lines by themselves, the only symbolic
+tokens involving them are {\tt [}, {\tt [[}, {\tt [[[}, etc.\ and
+{\tt ]}, {\tt ]]}, etc.
+
+Some characters are not listed in Table~\ref{classes} because they need special
+treatment. The four characters {\tt ,;()} are ``loners'': each comma, semicolon,
+or parenthesis is a separate token even when they occur consecutively. Thus
+{\tt (())} is four tokens, not one or two. The percent sign is very special
+because it introduces comments\index{comments}. The percent sign and everything
+after it up to the end of the line are ignored.
+
+Another special character is the period. Two or more periods
+together form a symbolic token, but a single period is ignored, and a period
+preceded or followed by digits is part of a number Thus {\tt ..}
+and {\tt ...} are symbolic tokens while {\tt a.b} is just two tokens {\tt a}
+and {\tt b}. It conventional to use periods to separate tokens in this fashion
+when naming a variable that is more than one token long.
+
+\subsection{Variable Declarations}
+\label{vardecl}
+
+A variable name is a symbolic token or a sequence of symbolic tokens.
+Most symbolic
+tokens are legitimate variable names, but anything with a predefined meaning like
+{\tt draw}, {\tt +}, or {\tt ..} is disallowed; i.e., variable names cannot be
+macros or MetaPost primitives. This minor restriction allows an amazingly broad
+class of variable names: {\tt alpha}, \verb|==>|, \verb|@&#$&|, and \verb|~~| are
+all legitimate variable names. Such symbolic tokens without special meanings
+are called {\em tags}\index{tags}.
+
+A variable name can be a sequence of tags like {\tt f.bot} or {\tt f.top}.
+The idea is to provide some of the functionality of Pascal records or C structures.
+It is also possible to simulate arrays by using variable names that contain
+numbers as well as symbolic tokens. For example, the variable name {\tt x2r}
+consists of the tag {\tt x}, the number 2, and the tag~{\tt r}. There can also
+be variables named {\tt x3r} and even {\tt x3.14r}. These variables can be
+treated as an array\index{arrays} via constructions like {\tt x[i]r},
+where {\tt i} has an appropriate numeric value. The overall syntax for
+variable names is shown in Figure~\ref{syvar}.
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{variable} \rightarrow \descr{tag}\descr{suffix}$\\
+$\tt \descr{suffix} \rightarrow \descr{empty} \;|\;
+ \descr{suffix}\descr{subscript} \;|\; \descr{suffix}\descr{tag}$\\
+$\tt \descr{subscript} \rightarrow \descr{number} \;|\;
+ \hbox{\tt [}\descr{numeric expression}\hbox{\tt ]}$
+\end{ctabbing}
+\caption{The syntax for variable names.}
+\index{suffix?\tdescr{suffix}}\index{subscript?\tdescr{subscript}}
+\label{syvar}
+\end{figure}
+
+Variables like {\tt x2} and {\tt y2} take on numeric values by default, so we
+can use the fact that {\tt z}\tdescr{suffix} is an abbreviation for\index{z convention?{\tt z} convention}\label{Dzconv}
+$$ (x\descr{suffix},\, y\descr{suffix}) $$
+to generate pair-valued variables when needed. It turns out that the
+{\tt beginfig}\index{beginfig?\texttt{beginfig}} macro wipes out pre-existing values variables
+that begin with the tags {\tt x} or {\tt y} so that
+{\tt beginfig} \ldots\ {\tt endfig}
+blocks do not interfere with each other when this naming scheme is used.
+In other words, variables that start with {\tt x}, {\tt y}, {\tt z} are
+local\index{variables!local}\index{locality}
+to the figure they are used in. General mechanisms for making variables local
+will be discussed in Section~\ref{grsec}.
+
+Type declarations\index{declarations}\index{type declarations}
+make it possible to use almost any naming scheme while still
+wiping out any previous value that might cause interference. For example, the
+declaration
+$$ \hbox{\tt pair pp, a.b;} $$
+makes {\tt pp} and {\tt a.b} unknown pairs. Such a declaration is not strictly
+local since {\tt pp} and {\tt a.b} are not automatically restored to their
+previous values at the end of the current figure. Of course, they are restored
+to unknown pairs if the declaration is repeated.
+
+Declarations work the same way for any of
+the other eight types: numeric, path, transform, color, string, boolean, picture,
+and pen. The only restriction is that you cannot give explicit numeric subscripts
+in a variable declaration. Do not give the illegal declaration
+$$ \hbox{\tt numeric q1, q2, q3;} $$
+use the generic subscript\index{subscript!generic} symbol {\tt []}\index{[]?\texttt{[]}}
+instead, to declare the whole array:
+$$ \hbox{\tt numeric q[];} $$
+You can also declare ``multidimensional'' arrays\index{arrays!multidimensional}.
+After the declaration
+$$ \hbox{\tt path p[]q[], pq[][];} $$
+{\tt p2q3} and {\tt pq1.4 5} are both paths.
+
+Internal\index{internal variables}\index{variables!internal}
+variables like {\tt tracingonline} cannot be declared in
+the normal fashion. All the internal variables discussed in this manual are
+predefined and do not have to be declared at all, but there is a way to declare
+that a variable should behave like a newly-created internal variable.
+The declaration is {\tt newinternal}\index{newinternal?\texttt{newinternal}}\label{Dnewint}
+followed by a list of symbolic tokens. For example,
+$$ \hbox{\tt newinternal a, b, c;} $$
+causes {\tt a}, {\tt b}, and {\tt c} to behave like internal variables. Such
+variables always have known numeric values, and these values can only be changed
+by using the assignment\index{assignment} operator {\tt:=}\index{:=?\texttt{:=}}.
+Internal variables are initially zero
+except that the Plain\index{Plain macros} macro package gives some of them nonzero
+initial values. (The Plain macros are normally preloaded automatically as
+explained in Section~\ref{intro}.)
+
+
+\section{Integrating Text and Graphics}
+\label{text}
+
+MetaPost has a number of features for including labels and other
+text\index{text and graphics}
+in the figures it generates. The simplest way to do this is to use the
+{\tt label}\index{label?\texttt{label}}\label{Dlabel} statement\index{label suffix?\tdescr{label suffix}}
+$$ {\tt label}\descr{label suffix} \hbox{\tt (}
+ \descr{string or picture expression} \hbox{\tt,}\, \descr{pair expression}
+ \hbox{\tt );}
+$$
+The \tdescr{string or picture expression} gives the label and the
+\tdescr{pair expression} says where to put it. The \tdescr{label suffix} can be
+\tdescr{empty} in which case the label is just centered on the given coordinates.
+If you are labeling some feature of a diagram you probably want to offset the
+label slightly to avoid overlapping. This is illustrated in Figure~\ref{fig16}
+where the {\tt "a"} label is placed above the midpoint of the line it refers to
+and the {\tt "b"} label is to the left of the midpoint of its line. This is
+achieved by using {\tt label.top}\index{top?\texttt{top}} for the {\tt "a"} label and
+{\tt label.lft}\index{lft?\texttt{lft}}
+for the {\tt "b"} label as shown in the figure. The \tdescr{label suffix}
+specifies the position of the label relative to the specified coordinates.
+The complete set of possibilities is\index{rt?\texttt{rt}}\index{bot?\texttt{bot}}%
+\index{ulft?\texttt{ulft}}\index{urt?\texttt{urt}}\index{llft?\texttt{llft}}\index{lrt?\texttt{lrt}}
+$$ \tt \descr{label suffix} \rightarrow
+ \descr{empty} \;|\; lft \;|\; rt \;|\; top \;|\; bot \;|\;
+ ulft \;|\;urt \;|\; llft \;|\; lrt
+$$
+where {\tt lft} and {\tt rt} mean left and right and {\tt llft}, {\tt ulft}, etc.\
+mean lower left, upper left, etc. The actual amount by which the label is offset
+in whatever direction is determined by the
+internal variable\index{internal variables}\index{variables!internal}
+{\tt labeloffset}\index{labeloffset?\texttt{labeloffset}}\label{Dlaboff}.
+
+\begin{figure}[htp]
+$$
+\begin{verbatim}
+beginfig(17);
+a=.7in; b=.5in;
+z0=(0,0);
+z1=-z3=(a,0);
+z2=-z4=(0,b);
+draw z1..z2..z3..z4..cycle;
+draw z1--z0--z2;
+label.top("a", .5[z0,z1]);
+label.lft("b", .5[z0,z2]);
+dotlabel.bot("(0,0)", z0);
+endfig;
+\end{verbatim}
+\qquad \mathcenter{\epsfbox{manfig.17}}
+$$
+\caption{MetaPost code and the resulting output}
+\label{fig16}
+\end{figure}
+
+Figure~\ref{fig16} also illustrates the
+{\tt dotlabel}\index{dotlabel?\texttt{dotlabel}}\label{Ddotlab}
+statement. This is exactly
+like the {\tt label} statement except that it adds a dot at the indicated
+coordinates. For example
+$$ \hbox{\tt dotlabel.bot("(0,0)", z0)} $$
+places a dot at {\tt z0} and then puts the label ``(0,0)'' just below the dot.
+Another alternative is the macro
+{\tt thelabel}\index{thelabel?\texttt{thelabel}}\label{Dthelab}. This has
+the same syntax as the {\tt label} and {\tt dotlabel} statements except that it
+returns the label as a \tdescr{picture primary} instead of actually drawing it.
+Thus
+$$ \hbox{\tt label.bot("(0,0)", z0)} $$
+is equivalent to
+$$ \hbox{\tt draw thelabel.bot("(0,0)", z0)} $$
+
+For simple applications of labeled figures, you can normally get by with just
+{\tt label} and {\tt dotlabel}. In fact, you may be able to use a short form of
+the {\tt dotlabel} statement that saves a lot of typing
+when you have many points {\tt z0}, {\tt z1}, {\tt z.a}, {\tt z.b}, etc.\
+and you want to use the {\tt z} suffixes as labels.
+The statement\index{dotlabels?\texttt{dotlabels}}\label{Ddotlbs}
+$$ \hbox{\tt dotlabels.rt(0, 1, a);} $$
+is equivalent to
+$$ \hbox{\tt dotlabel.rt("0",z0); dotlabel.rt("1",z1); dotlabel.rt("a",z.a);} $$
+Thus the argument to {\tt dotlabels} is a list of suffixes for which {\tt z}
+variables are known, and the \tdescr{label suffix} given with {\tt dotlabels}
+is used to position all the labels.
+
+There is also a {\tt labels}\index{labels?\texttt{labels}}\label{Dlabels} statement that is
+analogous to
+{\tt dotlabels} but its use is discouraged because it presents compatibility
+problems with \MF\index{metafont?\MF}. Some versions of the preloaded
+Plain\index{Plain macros} macro package define {\tt labels} to be synonymous
+with {\tt dotlabels}.
+
+For labeling statements such as {\tt label} and {\tt dotlabel} that use a
+string expression for the label text,
+the string gets typeset in a default font as determined by
+the string variable {\tt defaultfont}\index{defaultfont?\texttt{defaultfont}}\label{Ddffont}.
+The initial value of {\tt defaultfont}
+is likely to be {\tt "cmr10"}, but it can be changed to a different font name
+by giving an assignment such as
+$$ \hbox{\tt defaultfont:="Times-Roman"} $$
+There is also a numeric quantity called
+{\tt defaultscale}\index{defaultscale?\texttt{defaultscale}}\label{Ddfscale}
+that determines the type size.
+When {\tt default\-scale} is 1, you get the ``normal size'' which is
+usually 10 point, but this can also be changed. For instance
+$$ \hbox{\tt defaultscale := 1.2} $$
+makes labels come out twenty percent larger. If you do not know the normal size
+and you want to be sure the text comes out at some specific size, say 12 points,
+you can use the {\tt fontsize}\index{fontsize?\texttt{fontsize}}\label{Dfntsiz}
+operator to determine the normal size: e.g.,
+$$ \hbox{\tt defaultscale := 12pt/fontsize defaultfont;} $$
+
+When you change {\tt defaultfont}, the new font name should be something that
+\TeX\ would understand since MetaPost gets height and width information by reading
+the {\tt tfm}\index{tfm file?{\tt tfm} file}\index{files!tfm?{\tt tfm}} file.
+(This is explained in {\it The \TeX book\/}.~\cite{kn:a})
+It should be possible to use built-in PostScript fonts, but the names for them
+are system-dependent. Some systems may use {\tt rptmr} or {\tt ps-times-roman}
+instead of {\tt Times-Roman}.
+A \TeX\index{TeX?\TeX} font such as {\tt cmr10} is a little dangerous because it does
+not have a space character or certain ASCII symbols. In addition, MetaPost does
+not use the ligatures\index{ligatures} and kerning\index{kerning} information
+that comes with a \TeX\ font.
+
+
+\subsection{Typesetting Your Labels}
+
+\TeX\index{TeX?\TeX} may be used to format complex labels.
+If you say\index{btex?\texttt{btex}}\index{etex?\texttt{etex}}
+$$ {\tt btex}\, \descr{typesetting commands}\, {\tt etex} $$
+in a MetaPost input file, the \tdescr{typesetting commands} get processed by
+\TeX\ and translated into a picture expression
+(actually a \tdescr{picture primary}) that can be used in a {\tt label}
+or {\tt dotlabel} statement. Any spaces after {\tt btex} or before {\tt etex}
+are ignored. For instance, the statement
+$$ \hbox{\verb|label.lrt(btex $\sqrt x$ etex, (3,sqrt 3)*u)|} $$
+in Figure~\ref{fig17} places the label $\sqrt x$ at the lower right of the
+point {\tt (3,sqrt 3)*u}.
+
+\begin{figure}[htp]
+$$
+\begin{verbatim}
+beginfig(18);
+numeric u;
+u = 1cm;
+draw (0,2u)--(0,0)--(4u,0);
+pickup pencircle scaled 1pt;
+draw (0,0){up}
+ for i=1 upto 8: ..(i/2,sqrt(i/2))*u endfor;
+label.lrt(btex $\sqrt x$ etex, (3,sqrt 3)*u);
+label.bot(btex $x$ etex, (2u,0));
+label.lft(btex $y$ etex, (0,u));
+endfig;
+\end{verbatim}
+\qquad \mathcenter{\epsfbox{manfig.18}}
+$$
+\caption{MetaPost code and the resulting output}
+\label{fig17}
+\end{figure}
+
+Figure~\ref{fig18} illustrates some of the more complicated things that can
+be done with labels. Since the result of {\tt btex} \ldots {\tt etex} is
+a picture, it can be operated on like a picture. In particular, it is possible
+to apply transformations to pictures. We have not discussed the syntax for
+this yet, but a \tdescr{picture secondary}
+can be\index{rotated text}\index{rotated?\texttt{rotated}}
+$$ \descr{picture secondary}\, {\tt rotated}\, \descr{numeric primary} $$
+This is used in Figure~\ref{fig18} to rotate the label ``$y$ axis'' so that
+it runs vertically.
+
+\begin{figure}[htp]
+$$
+\begin{verbatim}
+beginfig(19);
+numeric ux, uy;
+120ux=1.2in; 4uy=2.4in;
+draw (0,4uy)--(0,0)--(120ux,0);
+pickup pencircle scaled 1pt;
+draw (0,uy){right}
+ for ix=1 upto 8:
+ ..(15ix*ux, uy*2/(1+cosd 15ix))
+ endfor;
+label.bot(btex $x$ axis etex, (60ux,0));
+label.lft(btex $y$ axis etex rotated 90,
+ (0,2uy));
+label.lft(
+ btex $\displaystyle y={2\over1+\cos x}$ etex,
+ (120ux, 4uy));
+endfig;
+\end{verbatim}
+\qquad \mathcenter{\epsfbox{manfig.19}}
+$$
+\caption{MetaPost code and the resulting output}
+\label{fig18}
+\end{figure}
+
+Another complication in Figure~\ref{fig18} is the use of the displayed equation
+$$y={2\over 1+\cos x}$$
+as a label. It would be more natural to code this as
+$$ \hbox{\verb|$$y={2\over 1+\cos x}$$|} $$
+but this would not work because
+\TeX\ typesets the labels in ``horizontal mode.''
+
+Here is how \TeX\ material gets translated into a form MetaPost understands:
+The MetaPost processor skips over
+{\tt btex}\index{btex?\texttt{btex}} \ldots\ {\tt etex}\index{etex?\texttt{etex}} blocks
+and depends on a preprocessor to translate them into low level MetaPost
+commands. If the main file is {\tt fig.mp}, the translated \TeX\
+material is placed in a file named {\tt fig.mpx}\index{files!mpx?{\tt mpx}}.
+This is normally
+done silently without any user intervention but it could fail if one of
+the {\tt btex} $\ldots$ {\tt etex} blocks contains an erroneous
+\TeX\index{TeX?\TeX!errors} command. Then the erroneous \TeX\ input
+is saved in the file {\tt mpxerr.tex}\index{mpxerr.tex?\texttt{mpxerr.tex}} and the error
+messages appear in {\tt mpxerr.log}\index{mpxerr.log?\texttt{mpxerr.log}}.
+
+\TeX\ macro definitions or any other auxiliary
+\TeX\ commands can be enclosed in a
+{\tt verbatimtex}\index{verbatimtex?\texttt{verbatimtex}} \ldots\ {\tt etex}\index{etex?\texttt{etex}} block.
+The difference between
+{\tt btex} and {\tt verbatimtex} is that the former generates a picture
+expression while the latter only adds material for \TeX\ to process.
+For instance, if you want \TeX\ to typeset labels using macros defined in
+{\tt mymac.tex}, your MetaPost input file would look something like this:
+\begin{eqnarray*}
+&& \verb|verbatimtex \input mymac etex|\\
+&& \verb|beginfig(1);|\\
+&& \qquad \vdots\\
+&& \verb|label(btex|\, \descr{\TeX\ material using \hbox{\tt mymac.tex}}\,
+ \verb|etex, | \descr{some coordinates} \hbox{\tt );}\\
+&& \qquad \vdots
+\end{eqnarray*}
+
+On Unix\footnote{Unix is a registered trademark of Unix Systems
+Laboratories.}\index{Unix\reg}
+systems, an environment variable can be used to specify that
+{\tt btex} $\ldots$ {\tt etex} and {\tt verbatimtex} $\ldots$ {\tt etex}
+blocks are in troff\index{troff} instead of \TeX. When using this option,
+it is a good idea to start your MetaPost input file with the assignment
+{\tt prologues:=1}\index{prologues?\texttt{prologues}}\label{Dprologs}. Giving this
+internal variable\index{internal variables}\index{variables!internal}
+a positive value causes causes output to be formatted as
+``structured PostScript''\index{PostScript!structured} generated on the
+assumption that text comes from built-in PostScript fonts. This makes MetaPost
+output much more portable, but it has an important drawback: It generally
+does not work when you use \TeX\ fonts, since programs that translate \TeX\
+output into PostScript\index{PostScript} need to make special provisions for
+\TeX\index{TeX?\TeX!fonts} fonts in
+included figures and the standard PostScript structuring rules do not allow
+for this. The details on how to include PostScript figures in a paper done
+in \TeX\ or troff are system-dependent. They can generally be found in
+manual pages and other on-line documentation. A file called {\tt dvips.tex}
+is distributed electronically along with the dvips\index{dvips} \TeX\ output
+processor.
+
+
+\subsection{The {\tt infont} operator}
+\label{Sinfont}
+
+Regardless of whether you use \TeX\ or troff, all the real work of adding
+text to pictures is done by a MetaPost primitive operator called
+{\tt infont}\index{infont?\texttt{infont}}. It is a
+\tdescr{primary binop}\index{primary binop?\tdescr{primary binop}} that takes a
+\tdescr{string secondary} as its
+left argument and a \tdescr{string primary} as its right argument. The left
+argument is text, and the right argument is a font name.
+The result of the operation is a \tdescr{picture secondary} that can then be
+transformed in various ways. One possibility is enlargement by a given factor
+via the syntax\index{scaled?\texttt{scaled}}
+$$ \descr{picture secondary}\, \hbox{\tt scaled}\, \descr{numeric primary} $$
+Thus {\tt label("text",z0)} is equivalent to
+$$ \hbox{\tt label("text" infont defaultfont scaled defaultscale, z0)} $$
+
+If it is not convenient to use a string constant for the left argument of
+{\tt infont}, you can use\index{char?\texttt{char}}\label{Dchar}
+$$ {\tt char}\, \descr{numeric primary} $$
+to select a character based on its numeric position in the font.
+Thus
+$$ \hbox{\tt char(n+64) infont "Times-Roman"} $$
+is a picture containing character {\tt n+64} of the Times-Roman font.
+
+\subsection{Measuring Text}
+\label{meas}
+
+MetaPost makes readily available the physical dimensions\index{size}
+of pictures generated by the {\tt infont} operator. There are
+unary operators {\tt llcorner}\index{llcorner?\texttt{llcorner}}\label{Dcornop},
+{\tt lrcorner}\index{lrcorner?\texttt{lrcorner}}, {\tt urcorner}\index{urcorner?\texttt{urcorner}},
+{\tt ulcorner}\index{ulcorner?\texttt{ulcorner}}, and {\tt center}\index{center}\label{Dcenter}
+that take a \tdescr{picture primary} and return the corners of its ``bounding
+box'' as illustrated in Figure~\ref{bbox}. The {\tt center} operator also
+accepts \tdescr{path primary} and \tdescr{pen primary} operands.
+In MetaPost Version 0.30 and higher, {\tt llcorner}, {\tt lrcorner}, etc.
+accept all three argument types as well.
+
+The argument type restrictions on the corner operators are not very important
+because their main purpose is to allow {\tt label} and {\tt dotlabel} statements
+to center their text properly.
+The predefined macro\index{bbox?\texttt{bbox}}\label{Dbbox}
+$$ {\tt bbox}\, \descr{picture primary} $$
+finds a rectangular path that represents the bounding box of a given picture.
+If {\tt p} is a picture, {\tt bbox p} equivalent to
+$$ \hbox{\tt (llcorner p--lrcorner p--urcorner p--ulcorner p--cycle)} $$
+except that it allows for a small amount of extra space around {\tt p} as specified
+by the internal variable\index{internal variables}\index{variables!internal}
+{\tt bboxmargin}\index{bboxmargin?\texttt{bboxmargin}}\label{Dbbmargin}.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.20} $$
+\caption{A bounding box and its corner points.}
+\label{bbox}
+\end{figure}
+
+Note that MetaPost computes the bounding box of a {\tt btex}\index{btex?\texttt{btex}}
+\ldots\ {\tt etex}\index{etex?\texttt{etex}} picture just the way \TeX\index{TeX?\TeX} does.
+This is quite natural, but it has certain implications in view of the fact that
+\TeX\ has features like {\tt\string\strut}\index{strut?{\tt\string\strut}} and
+{\tt\string\rlap}\index{rlap?{\tt\string\rlap}} that allow \TeX\ users to lie about the
+dimensions of a box.
+
+When \TeX\ commands that lie about the dimensions of a box are translated in to
+low-level MetaPost code, a {\tt setbounds}\index{setbounds?\texttt{setbounds}}\label{Dsetbnd}
+statement does the lying:\index{picture variable?\tdescr{picture variable}}
+$$ {\tt setbounds}\, \descr{picture variable}\, {\tt to}\, \descr{path expression}
+$$
+makes the \tdescr{picture variable} behave as if its bounding box were the same
+as the given path. To get the true bounding box of such a picture, assign a
+positive value to the
+internal variable\index{internal variables}\index{variables!internal}
+{\tt truecorners}\index{truecorners?\texttt{truecorners}}\label{Dtruecorn}:\footnote{The
+{\tt setbounds} and
+{\tt truecorners} features are only found in MetaPost version 0.30 and higher.}
+i.e.,
+$$ \hbox{\verb|show urcorner btex $\bullet$\rlap{ A} etex|} $$
+produces ``\verb|>> (4.9813,6.8078)|'' while
+$$ \hbox{\verb|truecorners:=1; show urcorner btex $\bullet$\rlap{ A} etex|} $$
+produces ``\verb|>> (15.7742,6.8078)|.''
+
+
+\section{Advanced Graphics}
+\label{adv.gr}
+
+All the examples in the previous sections have been simple line drawings with
+labels added. This section describes shading and tools for generating
+not-so-simple line drawings.
+Shading is done with the {\tt fill}\index{fill?\texttt{fill}}\label{Dfill} statement.
+In its simplest
+form, the {\tt fill} statement requires a \tdescr{path expression} that gives
+the boundary of the region to be filled. In the syntax
+$$ {\tt fill}\, \descr{path expression} $$
+the argument should be a cyclic path, i.e., a path that describes a closed curve
+via the {\tt ..cycle} or {\tt --cycle} notation. For example, the {\tt fill}
+statement in Figure~\ref{fig20} builds a closed path by extending the roughly
+semicircular path~{\tt p}.
+This path has a counter-clockwise orientation, but that does not matter because
+the {\tt fill} statement uses PostScript's\index{PostScript} non-zero
+winding\index{winding number} number rule~\cite{ad:red}.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+beginfig(21);
+path p;
+p = (-1cm,0)..(0,-1cm)..(1cm,0);
+fill p{up}..(0,0){-1,-2}..{up}cycle;
+draw p..(0,1cm)..cycle;
+endfig;
+\end{verbatim}
+\qquad \mathcenter{\epsfbox{manfig.21}}
+$$
+\caption{MetaPost code and the corresponding output.}
+\label{fig20}
+\end{figure}
+
+The general {\tt fill} statement\index{withcolor?\texttt{withcolor}}
+$$ {\tt fill}\, \descr{path expression}\,
+ {\tt withcolor}\, \descr{color expression}
+$$
+specifies a shade of gray or (if you have a color printer) some
+rainbow color.
+
+Figure~\ref{fig21} illustrates several applications of the fill command to fill
+areas with shades of gray. The paths involved are intersecting circles {\tt a}
+and {\tt b} and a path {\tt ab} that bounds the region inside both circles.
+Circles {\tt a} and {\tt b} are derived from a predefined path
+{\tt fullcircle}\index{fullcircle?\texttt{fullcircle}}\label{Dfcirc}
+that approximates a circle of unit diameter centered on the origin. There is
+also a predefined path {\tt halfcircle}\index{halfcircle?\texttt{halfcircle}}\label{Dhcirc}
+that is the part
+of {\tt fullcircle} above the $x$ axis. Path~{\tt ab} is the initialized
+using a predefined macro {\tt buildcycle} that will be discussed shortly.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+beginfig(22);
+path a, b, aa, ab;
+a = fullcircle scaled 2cm;
+b = a shifted (0,1cm);
+aa = halfcircle scaled 2cm;
+ab = buildcycle(aa, b);
+picture pa, pb;
+pa = thelabel(btex $A$ etex, (0,-.5cm));
+pb = thelabel(btex $B$ etex, (0,1.5cm));
+fill a withcolor .7white;
+fill b withcolor .7white;
+fill ab withcolor .4white;
+unfill bbox pa;
+draw pa;
+unfill bbox pb;
+draw pb;
+label.lft(btex $U$ etex, (-1cm,.5cm));
+draw bbox currentpicture;
+endfig;
+\end{verbatim}
+\qquad \mathcenter{\epsfbox{manfig.22}}
+$$
+\caption{MetaPost code and the corresponding output.}
+\index{fullcircle?\texttt{fullcircle}}\index{halfcircle?\texttt{halfcircle}}\index{buildcycle?\texttt{buildcycle}}
+\label{fig21}
+\end{figure}
+
+Filling circle {\tt a} with the light gray color {\tt .7white} and then doing the
+same with circle {\tt b} doubly fills the region where the disks overlap. The
+rule is that each {\tt fill} statement assigns the given color to all points in
+the region covered, wiping out whatever was there previously including lines and
+text as well as filled regions. Thus it is important to give {\tt fill} commands
+in the right order.
+In the above example, the overlap region gets the same color twice,
+leaving it light gray after the first two {\tt fill} statements. The third fill
+statement assigns the darker color {\tt .4white} to the overlap region.
+
+At this point the circles and the overlap region have their final colors but
+there are no cutouts for the labels. The cutouts are achieved by the
+{\tt unfill}\index{unfill?\texttt{unfill}}\label{Dunfill}
+statements that effectively erase\index{erasing}
+the regions bounded by {\tt bbox pa}\index{bbox?\texttt{bbox}} and
+{\tt bbox pb}. More precisely, {\tt unfill} is shorthand for filling
+{\tt withcolor background}, where {\tt background} is normally equal to {\tt white}
+as is appropriate for printing on white paper. If necessary, you can assign a new
+color value to {\tt background}\index{background?\texttt{background}}\label{Dbground}.
+
+The labels need to be stored in pictures {\tt pa} and {\tt pb} to allow
+for measuring their bounding box before actually drawing them. The macro
+{\tt thelabel}\index{thelabel?\texttt{thelabel}} creates such
+pictures and shifts them into position so that they are ready to draw. Using the
+resulting pictures in {\tt draw} statements of the form\index{draw?\texttt{draw}}
+$$ {\tt draw}\, \descr{picture expression} $$
+adds them to {\tt currentpicture}\index{currentpicture?\texttt{currentpicture}}
+so that they overwrite a portion of what has
+already been drawn. In Figure~\ref{fig21} just the white rectangles produced by
+{\tt unfill} get overwritten.
+
+\subsection{Building Cycles}
+\label{buildcy}
+
+The {\tt buildcycle}\index{buildcycle?\texttt{buildcycle}} command constructs paths for use with
+the {\tt fill} or {\tt unfill} macros. When given two or more paths such as
+{\tt aa} and {\tt b},
+the {\tt buildcycle} macro tries to piece them together so as to form a cyclic
+path. In this case path {\tt aa} is a semicircle that starts just to the right
+of the intersection with path {\tt b}, then passes through {\tt b} and ends just
+outside the circle on the left as shown in Figure~\ref{fig22}a.
+
+Figure~\ref{fig22}b shows how {\tt buildcycle} forms a closed
+cycle from pieces of paths {\tt aa} and {\tt b}.
+The {\tt buildcycle} macro detects the two intersections\index{intersections}
+labeled 1 and 2 in
+Figure~\ref{fig22}b. Then it constructs the cyclic path shown in bold in the
+figure by going forward along path {\tt aa} from intersection~1 to
+intersection~2 and then forward around the counter-clockwise path {\tt b} back to
+intersection~1. It turns out that {\tt buildcycle(a,b)} would have produced the
+same result, but the reasoning behind this is a little confusing.
+
+
+\begin{figure}[htp]
+$$ {\epsfbox{manfig.123} \atop (a)}
+ \qquad {\epsfbox{manfig.223} \atop (b)}
+$$
+\caption[A demonstration of cycle building]
+ {(a)~The semicircular path~{\tt aa}
+ with a dashed line marking path {\tt b}; (b)~paths~{\tt aa} and {\tt b}
+ with the portions selected by {\tt buildcycle} shown by heavy lines.}
+\label{fig22}
+\end{figure}
+
+It is a easier to use the {\tt buildcycle} macro in situations like
+Figure~\ref{fig23} where there are more than two path arguments and each pair
+of consecutive paths has a unique intersection. For instance, the line~{\tt q0.5}
+and the curve~{\tt p2} intersect only at point~$P$; and the curve {\tt p2} and the
+line~{\tt q1.5} intersect only at point~$Q$. In fact, each of the points $P$,
+$Q$, $R$, $S$ is a unique intersection, and the result of\index{buildcycle?\texttt{buildcycle}}
+$$ \hbox{\tt buildcycle(q0.5, p2, q1.5, p4)} $$
+takes {\tt q0.5} from $S$ to~$P$, then {\tt p2} from $P$ to~$Q$, then {\tt q1.5}
+from $Q$ to~$R$, and finally {\tt p4} from $R$ back to~$S$. An examination of the
+MetaPost code for Figure~\ref{fig23} reveals that you have to go backwards along
+{\tt p2} in order to get from $P$ to~$Q$. This works perfectly well as long as
+the intersection\index{intersection} points are uniquely defined but it can cause
+unexpected results when pairs of paths intersect more than once.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+beginfig(24);
+h=2in; w=2.7in;
+path p[], q[], pp;
+for i=2 upto 4: ii:=i**2;
+ p[i] = (w/ii,h){1,-ii}...(w/i,h/i)...(w,h/ii){ii,-1};
+endfor
+q0.5 = (0,0)--(w,0.5h);
+q1.5 = (0,0)--(w/1.5,h);
+pp = buildcycle(q0.5, p2, q1.5, p4);
+fill pp withcolor .7white;
+z0=center pp;
+picture lab; lab=thelabel(btex $f>0$ etex, z0);
+unfill bbox lab; draw lab;
+draw q0.5; draw p2; draw q1.5; draw p4;
+dotlabel.top(btex $P$ etex, p2 intersectionpoint q0.5);
+dotlabel.rt(btex $Q$ etex, p2 intersectionpoint q1.5);
+dotlabel.lft(btex $R$ etex, p4 intersectionpoint q1.5);
+dotlabel.bot(btex $S$ etex, p4 intersectionpoint q0.5);
+endfig;
+\end{verbatim}
+\atop \mathcenter{\epsfbox{manfig.24}}
+$$
+\caption{MetaPost code and the corresponding output.}
+\label{fig23}
+\end{figure}
+
+The general rule for the {\tt buildcycle} macro is that
+$$ \hbox{\tt buildcycle(}p_1\hbox{\tt,}\, p_2\hbox{\tt,}\,
+ p_3\hbox{\tt,}\, \ldots \hbox{\tt,} p_k \hbox{\tt )}
+$$
+chooses the intersection between each $p_i$ and $p_{i+1}$ to be as late as possible
+on $p_i$ and as early as possible on $p_{i+1}$. There is no
+simple rule for resolving conflicts between these two goals, so you should avoid
+cases where one intersection point occurs later on $p_i$ and another
+intersection\index{intersection} point occurs earlier on $p_{i+1}$.
+
+The preference for intersections as late as possible
+on $p_i$ and as early as possible on $p_{i+1}$ leads to ambiguity resolution in
+favor of forward-going subpaths. For cyclic paths such as path~{\tt b} in
+Figure~\ref{fig22} ``early'' and ``late'' are relative to a start/finish point
+which is where you get back to when you say ``{\tt ..cycle}''.
+For the path~{\tt b}, this turns out to be the rightmost point on the circle.
+
+A more direct way to deal with path intersections is via the
+\tdescr{secondary binop}\index{secondary binop?\tdescr{secondary binop}}
+{\tt intersection\-point}\index{intersectionpoint?\texttt{intersectionpoint}}\label{Disecpt}
+that finds the points $P$, $Q$, $R$, and~$S$ in Figure~\ref{fig23}.
+This macro finds a point where two given
+paths intersect. If there is more than one intersection point, it just chooses
+one; if there is no intersection, the macro generates an error message.
+
+\subsection{Dealing with Paths Parametrically}
+
+The {\tt intersectionpoint}\index{intersectionpoint?\texttt{intersectionpoint}} macro is based on a
+primitive operation called
+{\tt intersectiontimes}\index{intersectiontimes?\texttt{intersectiontimes}}\label{Disectt}.
+This \tdescr{secondary binop} is one of several
+operations that deal with paths parametrically. It locates an intersection
+between two paths by giving the ``time'' parameter on each path. This refers to
+the parameterization scheme from Section~\ref{curves} that described paths as
+piecewise cubic curves $\bigl(X(t),Y(t)\bigr)$ where $t$ ranges from zero to the
+number of curve segments. In other words, when a path is specified as passing
+through a sequence of points, where $t=0$ at the first point,
+then $t=1$ at the next, and $t=2$ at the next, etc. The result of
+$$ \hbox{\tt a intersectiontimes b} $$
+is $(-1,-1)$ if there is no intersection; otherwise you get
+a pair $(t_a,t_b)$, where $t_a$ is a time on path {\tt a} when it intersects
+path~{\tt b}, and $t_b$ is the corresponding time on path~{\tt b}.
+
+For example, suppose path~{\tt a} is denoted by the thin line in Figure~\ref{fig24}
+and path~{\tt b} is denoted by the thicker line. If the labels indicate time
+values on the paths, the pair of time values computed by
+$$ \hbox{\tt a intersectiontimes b} $$
+must be one of
+$$ (0.25,1.77),\ (0.75,1.40), {\rm or}\ (2.58,0.24), $$
+depending on which of the three intersection points is chosen by the MetaPost
+interpreter. The exact rules for choosing among multiple intersection points
+are a little complicated, but it turns out that you get the time values
+$(0.25,1.77)$ in this example. Smaller time values are preferred over larger
+ones so that $(t_a,t_b)$ is preferred to $(t'_a,t'_b)$ whenever $t'_a<t_a$ and
+$t_b<t'_b$. When no single alternative minimizes both the $t_a$ and $t_b$
+components the $t_a$ component tends to get priority, but the rules get more
+complicated when there are no integers between $t_a$
+and $t'_a$\index{intersection}.
+(For more details, see {\it The \MF book}.\cite[Chapter 14]{kn:c})
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.25} $$
+\caption{Two intersecting paths with time values marked on each path.}
+\label{fig24}
+\end{figure}
+
+The {\tt intersectiontimes} operator is more flexible than {\tt intersectionpoint}
+because there are a number of things that can be done with time values on a path.
+One of the most important is just to ask ``where is path {\tt p} at
+time {\tt t}?'' The construction\index{point of?\texttt{point of}}\label{Dpntof}
+$$ {\tt point}\, \descr{numeric expression}\, {\tt of}\, \descr{path primary} $$
+answers this question. If the \tdescr{numeric expression} is less than zero or
+greater than the time value assigned to the last point on the path, the
+{\tt point of} construction normally yields an endpoint of the path. Hence, it
+is common to use the predefined constant
+{\tt infinity}\index{infinity?\texttt{infinity}}\label{Dinf}
+(equal to 4095.99998) as the
+\tdescr{numeric expression} in a {\tt point of} construction when dealing with
+the end of a path.
+
+Such ``infinite'' time values do not work for a cyclic path, since
+time values outside of the normal range can be handled by modular arithmetic in
+that case; i.e., a cyclic path~{\tt p} through points $z_0$, $z_1$, $z_2$,
+\ldots, $z_{n-1}$ has the normal parameter range $0\le t<n$, but
+$$ \hbox{\tt point t of p} $$
+can be computed for any~$t$ by first reducing $t$ modulo~$n$. If the modulus~$n$
+is not readily available,\index{length?\texttt{length}}\label{Dlength}
+$$ {\tt length}\, \descr{path primary} $$
+gives the integer value of the upper limit of the normal time parameter range
+for the specified path.
+
+MetaPost uses the same correspondence between time values and points on a path to
+evaluate the {\tt subpath}\index{subpath?\texttt{subpath}}\label{Dsubpth} operator.
+The syntax for this operator is
+$$ {\tt subpath}\, \descr{pair expression}\, {\tt of}\, \descr{path primary} $$
+If the value of the \tdescr{pair expression} is $(t_1,t_2)$ and the
+\tdescr{path primary} is $p$, the result is a path that follows $p$ from
+{\tt point $t_1$ of $p$} to {\tt point $t_2$ of $p$}. If $t_2<t_1$, the subpath
+runs backwards along~$p$.
+
+An important operation based on the {\tt subpath} operator is the
+\tdescr{tertiary binop}\index{tertiary binop?\tdescr{tertiary binop}}
+{\tt cutbefore}\index{cutbefore?\texttt{cutbefore}}\label{Dcutb}. For intersecting
+paths $p_1$ and $p_2$,
+$$ p_1\ {\tt cutbefore}\ p_2 $$
+is equivalent to
+$$ \hbox{\tt subpath (xpart($p_1$ intersectiontimes $p_2$), length $p_1$) of $p_1$}
+$$
+except that it also sets the path variable
+{\tt cuttings}\index{cuttings?\texttt{cuttings}}\label{Dcuttings} to
+the portion of $p_1$ that gets cut off. In other words, {\tt cutbefore} returns
+its first argument with the part before the intersection cut off. With multiple
+intersections, it tries to cut off as little as possible. If the paths do not
+intersect, {\tt cutbefore} returns its first argument.
+
+There is also an analogous \tdescr{tertiary binop}\index{tertiary binop?\tdescr{tertiary binop}}
+called {\tt cutafter}\index{cutafter?\texttt{cutafter}}\label{Dcuta} that works by applying
+{\tt cutbefore} with
+time reversed along its first argument. Thus
+$$ p_1\ {\tt cutafter}\ p_2 $$
+tries to cut off the part of $p_1$ after its last intersection with $p_2$.
+
+Another operator\index{direction of?\texttt{direction of}}\label{Ddirof}
+$$ {\tt direction}\, \descr{numeric expression}\, {\tt of}\, \descr{path primary}
+$$
+finds a vector in the direction of the \tdescr{path primary}. This is defined
+for any time value analogously to the {\tt point of} construction. The resulting
+direction vector has the correct orientation and a somewhat arbitrary magnitude.
+Combining {\tt point of} and {\tt direction of} constructions yields the equation
+for a tangent line as illustrated in Figure~\ref{fig25}.
+
+\begin{figure}[htp]
+$$ \begin{verbatim}
+beginfig(26);
+numeric scf, #, t[];
+3.2scf = 2.4in;
+path fun;
+# = .1; % Keep the function single-valued
+fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}..{curl .1}(3.2,2#))
+ yscaled(1/#) scaled scf;
+x1 = 2.5scf;
+for i=1 upto 2:
+ (t[i],whatever) =
+ fun intersectiontimes ((x[i],-infinity)--(x[i],infinity));
+ z[i] = point t[i] of fun;
+ z[i]-(x[i+1],0) = whatever*direction t[i] of fun;
+ draw (x[i],0)--z[i]--(x[i+1],0);
+ fill fullcircle scaled 3bp shifted z[i];
+endfor
+label.bot(btex $x_1$ etex, (x1,0));
+label.bot(btex $x_2$ etex, (x2,0));
+label.bot(btex $x_3$ etex, (x3,0));
+draw (0,0)--(3.2scf,0);
+pickup pencircle scaled 1pt;
+draw fun;
+endfig;
+\end{verbatim}
+\atop \epsfbox{manfig.26}
+$$
+\caption{MetaPost code and the resulting figure}
+\label{fig25}
+\end{figure}
+
+If you know a slope and you want to find a point on a curve where the tangent
+line has that slope,
+the {\tt directiontime}\index{directiontime of?\texttt{directiontime of}}\label{Ddtimof}
+operator inverts the {\tt direction
+of} operation. Given a direction vector and a path,
+$$ {\tt directiontime}\, \descr{pair expression}\, {\tt of}\,
+ \descr{path primary}
+$$
+returns a numeric value that gives the first time~$t$ when the path has the
+indicated direction. (If there is no such time, the result is $-1$).
+For example, if {\tt a} is the path drawn as a thin curve in Figure~\ref{fig24},
+{\tt directiontime (1,1) of a} returns 0.2084.
+
+There is also an predefined macro \index{directionpoint of?\texttt{directionpoint of}}\label{Ddpntof}
+$$ {\tt directionpoint}\, \descr{pair expression}\, {\tt of}\,
+ \descr{path primary}
+$$
+that finds the first point on a path where a given direction is achieved. The
+{\tt directionpoint} macro produces an error message if the direction does not
+occur on the path.
+
+Operators {\tt arclength}\index{arclength?\texttt{arclength}}\label{Darclng} and
+{\tt arctime of}\index{arctime of?\texttt{arctime of}}\label{Darctim} relate the ``time''
+on a path is related to the more familiar concept of
+arc length.\index{arc length}\footnote{The
+{\tt arclength} and {\tt arctime} operators are only found in MetaPost
+version 0.50 and higher.}
+The expression
+$$ \hbox{{\tt arclength} \tdescr{path primary}} $$
+gives the arc length of a path. If {\tt p} is a path and {\tt a} is a number
+between 0 and {\tt arclength p},
+$$ \hbox{\tt arctime a of p} $$
+gives the time~{\tt t} such that
+$$ \hbox{\tt arclength subpath (0,t) of p} = {\tt a}. $$
+
+\subsection{Affine Transformations}
+\label{transsec}
+\index{transform type}
+
+Note how path {\tt fun} in Figure~\ref{fig25} is first constructed as
+$$ \hbox{\verb|(0,-.1)..(1,.05){right}..(1.9,.02){right}..{curl .1}(3.2,.2)|} $$
+and then the {\tt yscaled}\index{yscaled?\texttt{yscaled}} and {\tt scaled}\index{scaled?\texttt{scaled}}
+operators are used to adjust the
+shape and size of the path. As the name suggests, an expression involving
+``{\tt yscaled 10}'' multiplies $y$ coordinates by ten so that every point $(x,y)$
+on the original path corresponds to a point $(x,10y)$ on the transformed path.
+
+Including {\tt scaled} and {\tt yscaled}, there are seven transformation
+operators that take a numeric or pair argument:\index{shifted?\texttt{shifted}}%
+\index{rotated?\texttt{rotated}}\index{slanted?\texttt{slanted}}\index{scaled?\texttt{scaled}}\index{xscaled?\texttt{xscaled}}%
+\index{yscaled?\texttt{yscaled}}\index{zscaled?\texttt{zscaled}}\label{Dtranop}
+\begin{eqnarray*}
+ (x,y){\tt\ shifted\ }(a,b) &=& (x+a,\, y+b); \\
+ (x,y){\tt\ rotated\ }\theta &=& (x\cos\theta-y\sin\theta,\,
+ x\sin\theta+y\cos\theta); \\
+ (x,y){\tt\ slanted\ }a &=& (x+ay,\, y); \\
+ (x,y){\tt\ scaled\ }a &=& (ax,\, ay); \\
+ (x,y){\tt\ xscaled\ }a &=& (ax,\, y); \\
+ (x,y){\tt\ yscaled\ }a &=& (x,\, ay); \\
+ (x,y){\tt\ zscaled\ }(a,b) &=& (ax-by,\, bx+ay).
+\end{eqnarray*}
+Most of these operations are self-explanatory except for {\tt zscaled} which can
+be thought of as multiplication of complex numbers. The effect of {\tt zscaled}
+$(a,b)$ is to rotate and scale so as to map $(1,0)$ into $(a,b)$. The effect of
+{\tt rotated}~$\theta$ is rotate $\theta$ degrees counter-clockwise.
+
+Any combination of shifting, rotating, slanting, etc.\ is an affine transformation,
+the net effect of which is to transform any pair $(x,y)$ into
+$$ (t_x+t_{xx}x+t_{xy}y,\, t_y+t_{yx}x+t_{yy}y), $$
+for some sextuple $(t_x,t_y,t_{xx},t_{xy},t_{yx},t_{yy})$. This information can
+be stored in a variable of type transform so that
+{\tt transformed T}\index{transformed?\texttt{transformed}}\label{Dtrfrmd} might be equivalent to
+$$ \hbox{\tt xscaled -1 rotated 90 shifted (1,1)} $$
+if {\tt T} is an appropriate transform variable. The
+transform~{\tt T} could then be initialized with an
+expression of type transform as follows:
+$$ \begin{verbatim}
+transform T;
+T = identity xscaled -1 rotated 90 shifted (1,1);
+\end{verbatim}
+$$
+As this example indicates, transform expressions can be built up by applying
+transformation operators to other transforms. The predefined transformation
+{\tt identity}\index{identity?\texttt{identity}}\label{Dident} is a useful starting point
+for this process.
+This can be illustrated by paraphrasing the above equation for {\tt T} into
+English: ``{\tt T} should be the transform obtained by doing whatever
+{\tt identity} does, then scaling $x$~coordinates by $-1$, rotating $45^\circ$,
+and shifting by $(1,1)$.'' This works because {\tt identity} is the identity
+transformation which does nothing; i.e., {\tt transformed identity} is a no-op.
+
+The syntax for transform expressions and transformation operators is given in
+Figure~\ref{sytrans}. It includes two more options for
+\tdescr{transformer}:\index{reflectedabout?\texttt{reflectedabout}}
+$$ \hbox{\tt reflectededabout(}p, q\hbox{\tt )} $$
+reflects about the line defined by points $p$ and $q$; and\index{rotatedaround?\texttt{rotatedaround}}
+$$ \hbox{\tt rotatedaround(}p,\theta\hbox{\tt )} $$
+rotates $\theta$ degrees counter-clockwise around point $p$. For example,
+the equation for initializing transform~{\tt T} could have been
+$$ \hbox{\tt T = identity reflectedabout((2,0), (0,2))}. $$
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{pair secondary} \rightarrow
+ \descr{pair secondary} \descr{transformer}$\\
+$\tt \descr{path secondary} \rightarrow
+ \descr{path secondary} \descr{transformer}$\\
+$\tt \descr{picture secondary} \rightarrow
+ \descr{picture secondary} \descr{transformer}$\\
+$\tt \descr{pen secondary} \rightarrow
+ \descr{pen secondary} \descr{transformer}$\\
+$\tt \descr{transform secondary} \rightarrow
+ \descr{transform secondary} \descr{transformer}$\\[6pt]
+$\tt \descr{transformer} \rightarrow rotated \descr{numeric primary}$\\
+$\tt \qquad \;|\; scaled \descr{numeric primary}$\\
+$\tt \qquad \;|\; shifted \descr{pair primary}$\\
+$\tt \qquad \;|\; slanted \descr{numeric primary}$\\
+$\tt \qquad \;|\; transformed \descr{transform primary}$\\
+$\tt \qquad \;|\; xscaled \descr{numeric primary}$\\
+$\tt \qquad \;|\; yscaled \descr{numeric primary}$\\
+$\tt \qquad \;|\; zscaled \descr{pair primary}$\\
+$\tt \qquad \;|\; reflectedabout\hbox{\tt (}\descr{pair expression}
+ \hbox{\tt ,}\descr{pair expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; rotatedaround\hbox{\tt (}\descr{pair expression}
+ \hbox{\tt ,}\descr{numeric expression}\hbox{\tt )}$\\
+\end{ctabbing}
+\caption{The syntax for transforms and related operators}
+\label{sytrans}
+\end{figure}
+
+There is also a unary operator {\tt inverse}\index{inverse?\texttt{inverse}}\label{Dinv}
+that takes a
+transform and finds another transform that undoes the effect of the first
+transform. Thus if
+$$ p = q{\tt\ transformed\ }T $$
+then
+$$ q = p{\tt\ transformed\ inverse\ }T. $$
+
+It is not legal to take the {\tt inverse} of an
+unknown transform\index{transformation!unknown} but we
+have already seen that you can say
+$$ \hbox{\tt T = } \descr{transform expression} $$
+when {\tt T} has not been given a value yet. It is also possible to apply
+an unknown transform to a known pair or transform and use the result in a linear
+equation. Three such equations are sufficient to determine a transform. Thus
+the equations
+$$ \begin{verbatim}
+(0,1) transformed T' = (3,4);
+(1,1) transformed T' = (7,1);
+(1,0) transformed T' = (4,-3);
+\end{verbatim}
+$$
+allow MetaPost to determine that the transform {\tt T'} is a combination of
+rotation and scaling with
+$$\openup\jot
+ \tabskip=0pt plus 1fil
+ \halign to\displaywidth{\tabskip=0pt
+ \hfil$\displaystyle{#}$& $\displaystyle{{}#}$\hfil \qquad&
+ \hfil$\displaystyle{#}$& $\displaystyle{{}#}$\hfil
+ \tabskip=0pt plus 1fil\cr
+\noalign{\vskip-\jot}
+ t_{xx}&=4,& t_{yx}&=-3,\cr
+ t_{yx}&=3,& t_{yy}&=4,\cr
+ t_x&=0,& t_y&=0.\cr}
+$$
+
+Equations involving an unknown transform are treated as linear equations in the
+six parameters that define the transform. These six parameters can also be
+referred to directly as\index{xpart?\texttt{xpart}}\index{ypart?\texttt{ypart}}\index{xxpart?\texttt{xxpart}}%
+\index{xypart?\texttt{xypart}}\index{yxpart?\texttt{yxpart}}\index{yypart?\texttt{yypart}}\label{Dtrprt}
+$$ {\tt xpart\ T},\ {\tt ypart\ T},\ {\tt xxpart\ T},\ {\tt xypart\ T},\
+ {\tt yxpart\ T},\ {\tt yypart\ T},
+$$
+where {\tt T} is a transform. For instance, Figure~\ref{fig27} uses the
+equations
+$$ \hbox{\tt xxpart T=yypart T; yxpart T=-xypart T} $$
+to specify that {\tt T} is shape preserving; i.e., it is a combination of
+rotating, shifting, and uniform scaling.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+beginfig(28);
+path p[];
+p1 = fullcircle scaled .6in;
+z1=(.75in,0)=-z3;
+z2=directionpoint left of p1=-z4;
+p2 = z1..z2..{curl1}z3..z4..{curl 1}cycle;
+fill p2 withcolor .4[white,black];
+unfill p1;
+draw p1;
+transform T;
+z1 transformed T = z2;
+z3 transformed T = z4;
+xxpart T=yypart T; yxpart T=-xypart T;
+picture pic;
+pic = currentpicture;
+for i=1 upto 2:
+ pic:=pic transformed T;
+ draw pic;
+endfor
+dotlabels.top(1,2,3); dotlabels.bot(4);
+endfig;
+\end{verbatim}
+\quad \mathcenter{\epsfbox{manfig.28}}
+$$
+\caption{MetaPost code and the resulting ``fractal'' figure}
+\label{fig27}
+\end{figure}
+
+
+\subsection{Dashed Lines}
+
+The MetaPost language provides many ways of changing the appearance of a line
+besides just changing its width. One way is to use dashed lines as was done in
+Figures \ref{fig4} and~\ref{fig22}. The syntax for this is\index{dashed?\texttt{dashed}}
+$$ {\tt draw}\, \descr{path expression}\, {\tt dashed}\, \descr{dash pattern} $$
+where a \tdescr{dash pattern}\index{dash pattern?\tdescr{dash pattern}} is really a special
+type of \tdescr{picture expression}. There is a predefined \tdescr{dash pattern}
+called {\tt evenly}\index{evenly?\texttt{evenly}}\label{Devenly} that makes dashes 3 PostScript
+points long separated by gaps of the same size.
+Another predefined dash pattern {\tt withdots}\index{withdots?\texttt{withdots}}\label{Dwdots}
+produces dotted lines with dots 5 PostScript points apart.\footnote{{\tt withdots}
+is only found in MetaPost version 0.50 and higher.}
+For dots further apart or longer dashes further apart, the
+\tdescr{dash pattern} can be
+scaled\index{scaled?\texttt{scaled}} as shown in Figure~\ref{fig28}
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.29} $$
+\caption[Dashed lines and the corresponding dash patters]
+ {Dashed lines each labeled with the \tdescr{dash pattern} used to create
+ it.}
+\label{fig28}
+\end{figure}
+
+Another way to change a dash pattern is to alter its phase by shifting it
+horizontally. Shifting to the right makes the dashes move forward along the
+path and shifting to the left moves them backward. Figure~\ref{fig29} illustrates
+this effect. The dash pattern can be thought of as an infinitely repeating pattern
+strung out along a horizontal line where the portion of the line to the right of
+the $y$~axis is laid out along the path to be dashed\index{dash pattern?\tdescr{dash pattern}}.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.30} $$
+\caption[Dashed lines and the corresponding dash patters]
+ {Dashed lines and the MetaPost statements for drawing them where {\tt e4}
+ refers to the dash pattern {\tt evenly scaled 4}.}
+\label{fig29}
+\end{figure}
+
+When you shift a dash pattern so that the $y$~axis crosses the middle of a dash,
+the first dash gets truncated. Thus the line with dash pattern {\tt e4} starts
+with a dash of length 12bp followed by a 12bp gap and another 12bp dash, etc.,
+while {\tt e4 shifted (-6bp,0)} produces a 6bp dash, a 12 bp gap, then a
+12bp dash, etc. This dash pattern could be specified more directly via the
+{\tt dashpattern}\index{dash pattern?\texttt{dash pattern}}\label{Ddshpat} function:
+$$ \hbox{\tt dashpattern(on 6bp off 12bp on 6bp)} $$
+This means ``draw the first 6bp of the line, then skip the next 12bp, then draw
+another 6bp and repeat.'' If the line to be dashed is more than 30bp long, the
+last 6bp of the first copy of the dash pattern will merge with the first 6bp of
+the next copy to form a dash 12bp long. The general syntax for the
+{\tt dashpattern} function is shown in Figure~\ref{sydash}.
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{dash pattern} \rightarrow dashpattern
+ \hbox{\tt (}\descr{on/off list}\hbox{\tt )}$\\
+$\tt \descr{on/off list} \rightarrow
+ \descr{on/off list}\descr{on/off clause} \;|\; \descr{on/off clause}$\\
+$\tt \descr{on/off clause} \rightarrow on \descr{numeric tertiary}
+ \;|\; off \descr{numeric tertiary}$
+\end{ctabbing}
+\caption{The syntax for the {\tt dashpattern} function}
+\label{sydash}
+\end{figure}
+
+Since a dash pattern is really just a special kind of picture, the
+{\tt dashpattern} function returns a picture. It is not really necessary to know
+the structure of such a picture, so the casual reader will probably want to skip
+on to Section~\ref{oopt}. For those who want to know, a little experimentation
+shows that if {\tt d} is
+$$ \hbox{\tt dashpattern(on 6bp off 12bp on 6bp)}, $$
+then {\tt llcorner d} is $(0,24)$ and {\tt urcorner d} is $(24,24)$. Drawing
+{\tt d} directly without using it as a dash pattern produces two thin horizontal
+line segments like this:
+$$ \epsfbox{manfig.31} $$
+The lines in this example are specified as having width zero, but this does not
+matter because the line width is ignored when a picture is used as a dash pattern.
+
+The general rule for interpreting a picture {\tt d} as a dash pattern is that
+the line segments in {\tt d} are projected onto the $x$-axis and the resulting
+pattern is replicated to infinity in both directions by placing copies of the
+pattern end-to-end. The actual dash lengths are obtained by starting at $x=0$
+and scanning in the positive $x$ direction.
+
+To make the idea of ``replicating to infinity'' more precise, let $P({\tt d})$
+be the projection of {\tt d} onto the $x$~axis, and let
+${\rm shift}(P({\tt d}),x)$ be the result of shifting {\tt d} by~$x$.
+The pattern resulting from infinite replication is
+$$ \bigcup_{{\rm integers}\ n} {\rm shift}(P(d),\, n\cdot\ell(d)), $$
+where $\ell(d)$ measures the length of $P(d)$. The most restrictive possible
+definition of this length is $d_{\rm max}-d_{\rm min}$,
+where $[d_{\rm min},d_{\rm max}]$
+is the range of $x$~coordinates in $P(d)$. In fact, MetaPost uses
+$$ \max(\left|y_0({\tt d})\right|,\, d_{\rm max}-d_{\rm min}), $$
+where $y_0({\tt d})$ is the $y$ coordinate of the contents of {\tt d}.
+The contents of {\tt d} should lie on a horizontal line, but if they do not,
+the MetaPost interpreter just picks
+a $y$~coordinate that occurs in {\tt d}\index{dash pattern?\tdescr{dash pattern}}.
+
+A picture used as a dashed pattern must contain no text or filled regions,
+but it can contain lines that are themselves dashed. This can give small dashes
+inside of larger dashes as shown in
+Figure~\ref{fig32}\index{dash pattern?\tdescr{dash pattern}!recursive}
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+beginfig(32);
+draw dashpattern(on 15bp off 15bp) dashed evenly;
+picture p;
+p=currentpicture;
+currentpicture:=nullpicture;
+draw fullcircle scaled 1cm xscaled 3 dashed p;
+endfig;
+\end{verbatim}
+\quad \mathcenter{\epsfbox{manfig.32}}
+$$
+\caption{MetaPost code and the corresponding output}
+\label{fig32}
+\end{figure}
+
+
+\subsection{Other Options}
+\label{oopt}
+
+You might have noticed that the dashed lines produced by
+{\tt dashed evenly}\index{evenly?\texttt{evenly}} appear
+to have more black than white. This is an effect of the
+{\tt linecap}\index{linecap?\texttt{linecap}}\label{Dlinecap} parameter
+that controls the appearance of the ends of lines as well as the ends of dashes.
+There are also a number of other ways to affect the appearance of things drawn
+with MetaPost.
+
+The {\tt linecap} parameter has three different settings just as in PostScript.
+Plain MetaPost gives this
+internal variable\index{internal variables}\index{variables!internal} the
+default value {\tt rounded}\index{rounded?\texttt{rounded}}
+which causes line segments to be drawn with rounded ends like the segment from
+{\tt z0} to {\tt z3} in Figure~\ref{fig33}. Setting
+${\tt linecap}\mathrel{\hbox{\tt:=}}{\tt butt}$\index{butt?\texttt{butt}}\label{Dbutt}
+cuts the ends off
+flush so that dashes produced by {\tt dashed evenly}\index{evenly?\texttt{evenly}} have
+length 3bp, not 3bp plus the line width. You can also get squared-off ends
+that extend past the specified endpoints by setting
+${\tt linecap}\mathrel{\hbox{\tt:=}}{\tt squared}$\index{squared?\texttt{squared}}\label{Dsqred}
+as was done in the line from {\tt z2} to {\tt z5} in Figure~\ref{fig33}.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+beginfig(33);
+for i=0 upto 2:
+ z[i]=(0,40i); z[i+3]-z[i]=(100,30);
+endfor
+pickup pencircle scaled 18;
+draw z0..z3 withcolor .8white;
+linecap:=butt;
+draw z1..z4 withcolor .8white;
+linecap:=squared;
+draw z2..z5 withcolor .8white;
+dotlabels.top(0,1,2,3,4,5);
+endfig; linecap:=rounded;
+\end{verbatim}
+\qquad
+\mathcenter{\epsfbox{manfig.33}}
+$$
+\caption{MetaPost code and the corresponding output}
+\label{fig33}
+\end{figure}
+
+Another parameter borrowed from PostScript affects the way a {\tt draw} statement
+treats sharp corners\index{corners} in the path to be drawn.
+The {\tt linejoin}\index{linejoin?\texttt{linejoin}}\label{Dlinejoin} parameter can
+be {\tt rounded}\index{rounded?\texttt{rounded}}\label{Drnded},
+{\tt beveled}\index{beveled?\texttt{beveled}}\label{Dbvled},
+or {\tt mitered}\index{mitered?\texttt{mitered}}\label{Dmitred} as shown in Figure~\ref{fig34}.
+The default value for plain MetaPost is {\tt rounded} which gives the effect of
+drawing with a circular brush.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+beginfig(34);
+for i=0 upto 2:
+ z[i]=(0,50i); z[i+3]-z[i]=(60,40);
+ z[i+6]-z[i]=(120,0);
+endfor
+pickup pencircle scaled 24;
+draw z0--z3--z6 withcolor .8white;
+linejoin:=mitered;
+draw z1..z4--z7 withcolor .8white;
+linejoin:=beveled;
+draw z2..z5--z8 withcolor .8white;
+dotlabels.bot(0,1,2,3,4,5,6,7,8);
+endfig; linejoin:=rounded;
+\end{verbatim}
+\qquad
+\mathcenter{\epsfbox{manfig.34}}
+$$
+\caption{MetaPost code and the corresponding output}
+\label{fig34}
+\end{figure}
+
+When {\tt linejoin} is {\tt mitered}, sharp corners generate long pointed features
+as shown in Figure~\ref{fig35}. Since this might be undesirable, there is an
+internal variable\index{internal variables}\index{variables!internal}
+called {\tt miterlimit}\index{miterlimit?\texttt{miterlimit}}\label{Dmiterlim} that controls how
+extreme the situation can get before the mitered join is replaced by a beveled
+join. For Plain MetaPost, {\tt miterlimit} has a default value of 10.0 and line
+joins revert to beveled when the ratio of miter length to line width
+reaches this value.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.35} $$
+\caption{The miter length and line width whose ratio is limited by
+ {\tt miterlimit}.}
+\label{fig35}
+\end{figure}
+
+The {\tt linecap}, {\tt linejoin}, and {\tt miterlimit} parameters are especially
+important because they also affect things that get drawn behind the scenes.
+For instance, Plain MetaPost has statements for drawing
+arrows\index{arrows}, and the arrowheads are slightly rounded when {\tt linejoin}
+is {\tt rounded}. The effect depends on the line width and is quite subtle at the
+default line width of 0.5bp as shown in Figure~\ref{fig36}.
+
+\begin{figure}[htp]
+$$\epsfbox{manfig.36}$$
+\caption{Three ways of drawing arrows.}
+\label{fig36}
+\end{figure}
+
+Drawing arrows like the ones in Figure~\ref{fig36} is simply a matter of
+saying\index{drawarrow?\texttt{drawarrow}}\label{Ddrwarr}
+$$ {\tt drawarrow}\, \descr{path expression} $$
+instead of {\tt draw} \tdescr{path expression}. This draws the given path with
+an arrowhead at the last point on the path. If you want the arrowhead at the
+beginning of the path, just use the unary operator
+{\tt reverse}\index{reverse?\texttt{reverse}}\label{Drevrse} to take the
+original path and make a new one with its time sense reversed; i.e., for a
+path~{\tt p} with {\tt length p}${}=n$,
+$$ {\tt point\ } t {\tt\ of\ reverse\ p}
+ \quad {\rm and} \quad
+ {\tt point\ } n-t {\tt\ of\ p}
+$$ are synonymous.
+
+As shown in Figure~\ref{fig36}, a statement beginning\index{drawdblarrow?\texttt{drawdblarrow}}%
+\index{arrows!double-headed}\label{Ddrwdar}
+$$ {\tt drawdblarrow}\, \descr{path expression} $$
+draws a double-headed arrow. The size of the arrowhead is guaranteed to be
+larger than the line width, but it might need adjusting if the line width is
+very great. This is done by assigning a new value to the
+internal variable\index{internal variables}\index{variables!internal}
+{\tt ahlength}\index{ahlength?\texttt{ahlength}}\label{Dahlength}
+that determines arrowhead length as shown in Figure~\ref{fig37}.
+Increasing {\tt ahlength} from the default value of 4 PostScript points to
+1.5 centimeters produces the large arrowhead in Figure~\ref{fig37}. There
+is also an {\tt ahangle}\index{ahangle?\texttt{ahangle}}\label{Dahangle}
+parameter that controls the angle
+at the tip of the arrowhead. The default value of this angle is 45 degrees
+as shown in the figure.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.37} $$
+\caption[A large arrowhead with key parameters labeled.]
+ {A large arrowhead with key parameters labeled and paths used to
+ draw it marked with white lines.}
+\label{fig37}
+\end{figure}
+
+The arrowhead is created by filling the triangular region that is outlined
+in white in Figure~\ref{fig37} and then drawing around it with the currently
+picked up pen. This combination of filling and drawing can be combined into
+a single {\tt filldraw} statement\index{filldraw?\texttt{filldraw}}\label{Dfildrw}:
+$$ {\tt filldraw}\, \descr{path expression}\,
+ \descr{optional {\tt dashed} and {\tt withcolor} and {\tt withpen} clauses};
+$$
+The \tdescr{path expression} should be a closed cycle like the triangular path
+in Figure~\ref{fig37}. This path should not be confused with the path argument
+to {\tt drawarrow} which is indicated by a white line in the figure.
+
+White lines like the ones in the figure can be created by an
+{\tt undraw}\index{undraw?\texttt{undraw}}\label{Dundraw} statement.
+This is an erasing\index{erasing}
+version of {\tt draw} that draws {\tt withcolor background}\index{background?\texttt{background}}
+just as the {\tt unfill} statement does. There is also an
+{\tt unfilldraw}\index{unfilldraw?\texttt{unfilldraw}}\label{Dunfdrw}
+statement just in case someone finds a
+use for it.
+
+The {\tt filldraw}, {\tt undraw} and {\tt unfilldraw} statements and all the
+arrow drawing statements are like the {\tt fill} and {\tt draw} statements in that
+they take {\tt dashed}\index{dashed?\texttt{dashed}}, {\tt withpen}\index{withpen?\texttt{withpen}},
+and {\tt withcolor}\index{withcolor?\texttt{withcolor}} options.
+When you have a lot of drawing statements it is
+nice to be able to apply an option such as {\tt withcolor 0.8white} to all of
+them without having to type this repeatedly as was done in Figures \ref{fig33}
+and~\ref{fig34}. The statement for this purpose is\index{drawoptions?\texttt{drawoptions}}\label{Ddropts}
+$$ \hbox{\tt drawoptions(} \descr{text} \hbox{\tt )} $$
+where the \tdescr{text} argument gives a sequence of {\tt dashed}, {\tt withcolor},
+and {\tt withpen} options to be applied automatically to all drawing statements.
+If you specify
+$$ \hbox{\tt drawoptions(withcolor .5[black,white])} $$
+and then want to draw a black line, you can override the {\tt drawoptions}
+by specifying
+$$ {\tt draw}\, \descr{path expression}\, {\tt withcolor\ black} $$
+To turn off {\tt drawoptions} all together, just give an empty list:
+$$ \hbox{\tt drawoptions()} $$
+(This is done automatically by the {\tt beginfig}\index{beginfig?\texttt{beginfig}} macro).
+
+Since irrelevant options are ignored, there is no harm in giving a statement
+like
+$$ \hbox{\tt drawoptions(dashed evenly)} $$
+followed by a sequence of {\tt draw} and {\tt fill} commands. It does not make
+sense to use a dash pattern when filling so the {\tt dashed evenly} gets ignored
+for {\tt fill} statements. It turns out that
+$$ \hbox{\tt drawoptions(withpen } \descr{pen expression} \hbox{\tt )} $$
+does affect {\tt fill} statements as well as {\tt draw} statements.
+In fact there is a special pen variable called
+{\tt currentpen}\index{currentpen?\texttt{currentpen}} such that
+{\tt fill} \ldots\ {\tt withpen currentpen} is equivalent to a {\tt filldraw}
+statement.
+
+Precisely what does it mean to say that drawing options affect those statements
+where they make sense? The {\tt dashed} \tdescr{dash pattern} option only affects
+$$ {\tt draw}\, \descr{path expression} $$
+statements, and text appearing in the \tdescr{picture expression} argument to
+$$ {\tt draw}\, \descr{picture expression} $$
+statement is only affected by the {\tt withcolor} \tdescr{color expression} option.
+For all other combinations of drawing statements and options, there is some effect.
+An option applied to a {\tt draw} \tdescr{picture expression} statement will in
+general affect some parts of the picture but not others. For instance,
+a {\tt dashed} or {\tt withpen} option will affect all the lines in the picture
+but none of the labels.
+
+
+\subsection{Pens}
+
+Previous sections have given numerous examples of {\tt pickup}
+\tdescr{pen expression} and {\tt withpen} \tdescr{pen expression}, but there have
+not been any examples of pen expressions other than
+$$ {\tt pencircle\ scaled}\, \descr{numeric primary} $$
+which produces lines of a specified width. For calligraphic effects such in
+Figure~\ref{fig38}, you can apply any of the transformation operators discussed
+in Section~\ref{transsec}. The starting point for such transformations is
+{\tt pencircle}\index{pencircle?\texttt{pencircle}}\label{Dpncirc},
+a circle one PostScript point in diameter. Thus affine
+transformations produce a circular or elliptical\index{pens!elliptical} pen shape.
+The width of lines drawn with the pen depends on how nearly perpendicular the line
+is to the long axis of the ellipse.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+beginfig(38);
+pickup pencircle scaled .2in yscaled .08 rotated 30;
+x0=x3=x4;
+z1-z0 = .45in*dir 30;
+z2-z3 = whatever*(z1-z0);
+z6-z5 = whatever*(z1-z0);
+z1-z6 = 1.2*(z3-z0);
+rt x3 = lft x2;
+x5 = .55[x4,x6];
+y4 = y6;
+lft x3 = bot y5 = 0;
+top y2 = .9in;
+draw z0--z1--z2--z3--z4--z5--z6 withcolor .7white;
+dotlabels.top(0,1,2,3,4,5,6);
+endfig;
+\end{verbatim}
+\quad \mathcenter{\epsfbox{manfig.38}}
+$$
+\caption{MetaPost code and the resulting ``calligraphic'' figure.}
+\label{fig38}\index{lft?\texttt{lft}}\index{bot?\texttt{bot}}\index{top?\texttt{top}}
+\end{figure}
+
+Figure~\ref{fig38} demonstrates operators {\tt lft}\index{lft?\texttt{lft}}\label{Dlft},
+{\tt rt}\index{rt?\texttt{rt}}\label{Drt}, {\tt top}\index{top?\texttt{top}}\label{Dtop},
+and {\tt bot}\index{bot?\texttt{bot}}\label{Dbot}
+that answer the question, ``If the current pen is placed at the position
+given by the argument, where will its left, right, top, or bottom edge be?''
+In this case the current pen is the ellipse given in the {\tt pickup} statement
+and its bounding box is 0.1734 inches wide and 0.1010 inches high, so
+{\tt rt x3} is ${\tt x3}+{\tt 0.0867in}$ and {\tt bot y5} is
+${\tt y5}-{\tt 0.0505in}$.
+The {\tt lft}, {\tt rt}, {\tt top}, and {\tt bot} operators also accept arguments
+of type pair in which case they compute the $x$ and~$y$ coordinates of the
+leftmost, rightmost, topmost, or bottommost point on the pen shape. For example,
+$$ {\tt rt}(x,y) = (x,y)+({\tt 0.0867in}, {\tt 0.0496in}) $$
+for the pen in Figure~\ref{fig38}. Note that {\tt beginfig}\index{beginfig?\texttt{beginfig}}
+resets the current pen to a default value of
+$$ \hbox{\tt pencircle scaled 0.5bp} $$
+at the beginning of each figure. This value can be reselected at any time
+by giving the command
+{\tt pickup defaultpen}\index{defaultpen?\texttt{defaultpen}}\label{Ddefaultpen}.
+
+This would be the end of the story on pens, except that
+for compatibility with \MF\index{metafont?\MF}, MetaPost also allows pen shapes to be
+polygonal\index{pens!polygonal}.
+There is a predefined pen called
+{\tt pensquare}\index{pensquare?\texttt{pensquare}}\label{Dpnsqr} that
+can be transformed to yield pens shaped like parallelograms. In fact, there is
+even an operator called {\tt makepen}\index{makepen?\texttt{makepen}}\label{Dmkpen} that takes
+a convex-polygon-shaped path and makes a pen that shape and size. If the path is
+not exactly convex or polygonal, the {\tt makepen} operator will straighten the
+edges and/or drop some of the vertices.
+In particular, {\tt pensquare} is equivalent to
+$$ \hbox{\tt makepen((-.5,-.5)--(.5,-.5)--(.5,.5)--(-.5,.5)--cycle)} $$
+
+The inverse of {\tt makepen} is the
+{\tt makepath}\index{makepath?\texttt{makepath}}\label{Dmkpath} operator
+that takes a \tdescr{pen primary} and returns the corresponding path. Thus
+{\tt makepath pencircle} produces a circular path identical to
+{\tt fullcircle}\index{fullcircle?\texttt{fullcircle}}. This also works for a polygonal pen
+so that
+$$ {\tt makepath\ makepen}\, \descr{path expression} $$
+will take any cyclic path and turn it into a convex polygon\index{convex polygons}.
+
+
+\subsection{Clipping and Low-Level Drawing Commands}
+
+Drawing statements such as {\tt draw}, {\tt fill}, {\tt filldraw}, and {\tt unfill}
+are part of the Plain macro\index{Plain macros} package and are defined in terms
+of more primitive statements. The main difference between the drawing
+statements discussed in previous sections and the more primitive versions is that
+the primitive drawing statements all require you to specify a picture variable to
+hold the results. For {\tt fill}, {\tt draw}, and related statements, the results
+always go to a picture variable called
+{\tt currentpicture}\index{currentpicture?\texttt{currentpicture}}\label{Dcurpic}.
+The syntax for the primitive
+drawing statements that allow you to specify a picture variable is shown in
+Figure~\ref{sydraw}.
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{addto command} \rightarrow$\\
+$\tt \qquad addto \descr{picture variable} also
+ \descr{picture expression} \descr{option list}$\\
+$\tt \qquad \;|\; addto \descr{picture variable}
+ contour \descr{path expression} \descr{option list}$\\
+$\tt \qquad \;|\; addto \descr{picture variable}
+ doublepath \descr{path expression} \descr{option list}$\\
+$\tt \descr{option list} \rightarrow \descr{empty} \;|\;
+ \descr{drawing option} \descr{option list}$\\
+$\tt \descr{drawing option} \rightarrow withcolor \descr{color expression}$\\
+$\tt \qquad \;|\; withpen \descr{pen expression} \;|\;
+ dashed \descr{picture expression}$
+\end{ctabbing}
+\caption{The syntax for primitive drawing statements}
+\label{sydraw}
+\index{option list?\tdescr{option list}}\index{addto also?\texttt{addto also}}\index{addto contour?\texttt{addto contour}}%
+\index{addto doublepath?\texttt{addto doublepath}}\index{withcolor?\texttt{withcolor}}\index{withpen?\texttt{withpen}}%
+\index{dashed?\texttt{dashed}}\index{drawing option?\tdescr{drawing option}}
+\end{figure}
+
+The syntax for primitive drawing commands is compatible with
+\MF\index{metafont?\MF}. Table~\ref{draweqv} shows how the primitive drawing statements
+relate to the familiar {\tt draw} and {\tt fill} statements. Each of the
+statements in the first column of the table could be ended with an
+\tdescr{option list} of its own, which is equivalent to appending the
+\tdescr{option list} to the corresponding entry in the second column of the table.
+For example,
+$$ {\tt draw}\ p\ {\tt withpen\ pencircle} $$
+is equivalent to
+$$ {\tt addto\ currentpicture\ doublepath}\ p\
+ {\tt withpen\ currentpen\ withpen\ pencircle}
+$$
+where {\tt currentpen}\index{currentpen?\texttt{currentpen}}\label{Dcurpen} is a special
+pen variable that always holds the last pen picked up.
+The second {\tt withpen} option silently overrides the {\tt withpen currentpen}
+from the expansion of {\tt draw}.
+
+\begin{table}[htp]
+$$\begin{tabular}{|l|l|} \hline
+\multicolumn1{|c|}{statement}& \multicolumn1{c|}{equivalent primitives}\\ \hline
+{\tt draw} {\it pic}& {\tt addto currentpicture also} {\it pic}\\
+{\tt draw} $p$& {\tt addto currentpicture doublepath} $p$
+ {\tt withpen} $q$\\
+{\tt fill} $c$& {\tt addto currentpicture contour} $c$\\
+{\tt filldraw} $c$& {\tt addto currentpicture contour} $c$ {\tt withpen} $q$\\
+{\tt undraw} {\it pic}& {\tt addto currentpicture also} {\it pic}
+ {\tt withcolor} $b$\\
+{\tt undraw} $p$& {\tt addto currentpicture doublepath} $p$
+ {\tt withpen} $q$
+ {\tt withcolor} $b$\\
+{\tt unfill} $c$& {\tt addto currentpicture contour} $c$
+ {\tt withcolor} $b$\\
+{\tt unfilldraw} $c$& {\tt addto currentpicture contour} $c$ {\tt withpen} $q$
+ {\tt withcolor} $b$\\ \hline
+\end{tabular}
+$$
+\caption[Drawing statements and equivalent primitive commands]
+ {Common drawing statements and equivalent primitive versions, where
+ $q$ stands for {\tt currentpen}, $b$ stands for {\tt background},
+ $p$ stands for any path, $c$ stands for a cyclic path, and {\it pic} stands
+ for a \tdescr{picture expression}. Note that nonempty {\tt drawoptions}
+ would complicate the entries in the second column.}
+\label{draweqv}
+\index{drawoptions?\texttt{drawoptions}}
+\end{table}
+
+There are two more primitive drawing commands that do not accept any drawing
+options. One is the {\tt setbounds} command that was discussed in
+Section~\ref{meas}; the other is the
+{\tt clip} command\index{clip?\texttt{clip}}\label{Dclip}:
+$$ {\tt clip}\, \descr{picture variable}\, {\tt to}\, \descr{path expression} $$
+Given a cyclic path, this statement trims the contents of the
+\tdescr{picture variable} to eliminate everything outside of the cyclic path.
+There is no ``high level'' version of this statement, so you have to use
+$$ {\tt clip\ currentpicture\ to}\, \descr{path expression} $$
+if you want to clip {\tt currentpicture}\index{currentpicture?\texttt{currentpicture}}.
+Figure~\ref{fig40} illustrates clipping.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+beginfig(40);
+path p[];
+p1 = (0,0){curl 0}..(5pt,-3pt)..{curl 0}(10pt,0);
+p2 = p1..(p1 yscaled-1 shifted(10pt,0));
+p0 = p2;
+for i=1 upto 3: p0:=p0.. p2 shifted (i*20pt,0);
+ endfor
+for j=0 upto 8: draw p0 shifted (0,j*10pt);
+ endfor
+p3 = fullcircle shifted (.5,.5) scaled 72pt;
+clip currentpicture to p3;
+draw p3;
+endfig;
+\end{verbatim}
+\qquad
+\mathcenter{\epsfbox{manfig.40}}
+$$
+\caption{MetaPost code and the resulting ``clipped'' figure.}
+\label{fig40}
+\end{figure}
+
+All the primitive drawing operations would be useless without one last operation
+called {\tt shipout}. The statement\index{shipout?\texttt{shipout}}\label{Dship}
+$$ {\tt shipout}\, \descr{picture expression} $$
+This writes out a picture as a PostScript\index{PostScript} file whose name ends
+{\tt.}{\it nnn}, where {\tt nnn} is the decimal representation of the value of
+the internal variable\index{internal variables}\index{variables!internal}
+{\tt charcode}\index{charcode?\texttt{charcode}}\label{Dcharcode}.
+(The name ``{\tt charcode}'' is for compatibility with \MF\index{metafont?\MF}.)
+Normally, {\tt beginfig}\index{beginfig?\texttt{beginfig}} sets {\tt charcode}, and
+{\tt endfig}\index{endfig?\texttt{endfig}} invokes {\tt shipout}.
+
+\section{Macros}
+\label{macros}
+
+As alluded to earlier, MetaPost has a set of automatically included macros called
+the Plain macro package\index{Plain macros}, and some of the commands discussed in
+previous sections are defined as macros instead of being built into MetaPost.
+The purpose of this section is to explain how to write such macros.
+
+Macros with no arguments are very simple.
+A macro definition\index{replacement text?\tdescr{replacement text}}%
+\index{def?\texttt{def}}\index{enddef?\texttt{enddef}}
+$$ {\tt def}\, \descr{symbolic token}\, \hbox{\tt =}\,
+ \descr{replacement text}\, {\tt enddef}
+$$
+makes the \tdescr{symbolic token} an abbreviation for the \tdescr{replacement text},
+where the \tdescr{replacement text} can be virtually any sequence of tokens. For
+example, the Plain macro package could almost define the {\tt fill} statement like
+this\index{fill?\texttt{fill}}:
+$$ \hbox{\tt def fill = addto currentpicture contour enddef} $$
+
+Macros with arguments are similar, except they have formal parameters that tell
+how to use the arguments in the \tdescr{replacement text}. For example, the
+{\tt rotatedaround}\index{rotatedaround?\texttt{rotatedaround}} macro is defined like this:
+$$\begin{verbatim}
+def rotatedaround(expr z, d) =
+ shifted -z rotated d shifted z enddef;
+\end{verbatim}
+$$
+The {\tt expr}\index{expr?\texttt{expr}} in this definition means that formal parameters
+{\tt z} and {\tt d} can be arbitrary expressions. (They should be pair expressions
+but the MetaPost interpreter does not immediately check for that.)
+
+Since MetaPost is an interpreted language, macros with arguments are a lot like
+subroutines\index{subroutines}. MetaPost macros are often used like subroutines,
+so the language includes programming concepts to support this.
+These concepts include local variables, loops, and conditional statements.
+
+\subsection{Grouping}
+\label{grsec}
+
+Grouping in MetaPost is essential for functions\index{functions} and
+local\index{variables!local}\index{locality} variables.
+The basic idea is that a group is
+a sequence of statements possibly followed by an expression with the provision
+that certain symbolic tokens\index{tokens!symbolic} can have their old meanings
+restored at the end of the group. If the group ends with an expression, the
+group behaves like a function call that returns that expression. Otherwise,
+the group is just a compound statement\index{compound statement}.
+The syntax for a group is\index{begingroup?\texttt{begingroup}}\index{endgroup?\texttt{endgroup}}
+$$ {\tt begingroup}\, \descr{statement list}\, {\tt endgroup} $$
+or
+$$ {\tt begingroup}\, \descr{statement list}\, \descr{expression}\, {\tt endgroup}
+$$
+where a \tdescr{statement list} is a sequence of statements each followed by a
+semicolon. A group with an \tdescr{expression} after the \tdescr{statement list}
+behaves like a \tdescr{primary} in Figure~\ref{syexpr} or like a
+\tdescr{numeric atom} in Figure~\ref{synprim}.
+
+Since the \tdescr{replacement text} for the {\tt beginfig}\index{beginfig?\texttt{beginfig}}
+macro starts with {\tt begingroup} and the \tdescr{replacement text} for
+{\tt endfig}\index{endfig?\texttt{endfig}} ends with {\tt endgroup},
+each figure in a MetaPost input file behaves like a
+group. This is what allows figures can have local variables.
+We have already seen in Section~\ref{vardecl} that
+variable names beginning with {\tt x} or {\tt y} are local in the sense that they
+have unknown values at the beginning of each figure and these values are forgotten
+at the end of each figure. The following example illustrates how locality works:
+\begin{eqnarray*}
+&& \hbox{\tt x23 = 3.1;}\\
+&& \hbox{\tt beginfig(17);}\\
+&& \qquad \vdots\\
+&& \hbox{\tt y3a=1; x23=2;}\\
+&& \qquad \vdots\\
+&& \hbox{\tt endfig;}\\
+&& \hbox{\tt show x23, y3a;}
+\end{eqnarray*}
+The result of the {\tt show}\index{show} command is
+$$\begin{verbatim}
+>> 3.1
+>> y3a
+\end{verbatim}
+$$
+indicating that {\tt x23} has returned to its former value of {\tt 3.1} and
+{\tt y3a} is completely unknown as it was at {\tt beginfig(17)}.
+
+The locality of {\tt x} and {\tt y} variables is achieved by the
+statement\index{save?\texttt{save}}\label{Dsave}
+$$ \hbox{\tt save x,y} $$
+in the \tdescr{replacement text} for {\tt beginfig}\index{beginfig?\texttt{beginfig}}.
+In general, variables are made local by the statement
+$$ {\tt save}\, \descr{symbolic token list} $$
+where \tdescr{symbolic token list} is a comma-separated list of
+tokens:\index{tokens!symbolic}
+\begin{ctabbing}
+$\tt \descr{symbolic token list} \rightarrow \descr{symbolic token}$\\
+ $\tt \qquad \;|\; \descr{symbolic token}\hbox{\tt ,}
+ \descr{symbolic token list}$
+\end{ctabbing}
+All variables whose names begin with one of the specified symbolic tokens become
+unknown numerics and their present values are saved for restoration at the end
+of the current group. If the {\tt save} statement is used outside of a group, the
+original values are simply discarded.
+
+The main purpose of the {\tt save} statement is to allow macros to use variables
+without interfering with existing variables or variables in other calls to the
+same macro. For example, the predefined macro {\tt whatever}\index{whatever}
+has the \tdescr{replacement text}
+$$ \hbox{\tt begingroup save ?; ? endgroup} $$
+This returns an unknown numeric quantity, but it is no longer called question
+mark since that name was local to the group. Asking the name via
+{\tt show\index{show?\texttt{show}} whatever} yields\index{CAPSULE?\texttt{CAPSULE}}
+$$ \hbox{\tt >> \%CAPSULE}{\it nnnn} $$
+where {\it nnnn} is an identification number that is chosen when {\tt save}
+makes the name question mark disappear.
+
+In spite of the versatility of {\tt save}, it cannot be used to make local changes
+to any of MetaPost's
+internal variables\index{internal variables}\index{variables!internal}.
+A statement such as\index{linecap?\texttt{linecap}}
+$$ \hbox{\tt save linecap} $$
+would cause MetaPost to temporarily forget the special meaning of this variable
+and just make it an unknown numeric. If you want to draw one dashed line with
+{\tt linecap:=butt} and then go back to the previous value, you can use the
+{\tt interim}\index{interim?\texttt{interim}}\label{Dinterm} statement as follows:
+\begin{eqnarray*}
+&& \hbox{\tt begingroup interim linecap:=butt;}\\
+&& {\tt draw}\, \descr{path expression}\, \hbox{\tt dashed evenly; endgroup}
+\end{eqnarray*}
+This saves the value of the
+internal variable\index{internal variables}\index{variables!internal}
+{\tt linecap} and temporarily
+gives it a new value without forgetting that {\tt linecap} is an internal
+variable. The general syntax is
+$$ {\tt interim}\, \descr{internal variable} \mathrel{\hbox{\tt:=}}
+ \descr{numeric expression}
+$$
+
+
+\subsection{Parameterized Macros}
+
+The basic idea behind parameterized macros is to achieve greater flexibility by
+allowing auxiliary information to be passed to a macro. We have already seen
+that macro definitions can have formal parameters that represent expressions
+to be given when the macro is called. For instance a definition such as
+$$ \hbox{\tt def rotatedaround(expr z, d) = } \descr{replacement text}\,
+ {\tt enddef}
+$$
+allows the MetaPost interpreter to understand macro calls of the form
+$$\tt rotatedaround\hbox{\tt (}
+ \descr{expression}\hbox{\tt ,} \descr{expression}\hbox{\tt )}
+$$
+
+The keyword {\tt expr}\index{expr?\texttt{expr}}\index{parameter!expr} in the macro
+definition means that the
+parameters can be expressions of any type. When the definition specifies
+{\tt (expr z, d)}, the formal parameters {\tt z} and {\tt d} behave like
+variables of the appropriate
+types. Within the \tdescr{replacement text}, they can be used in expressions
+just like variables, but they cannot be redeclared or assigned to. There is no
+restriction against unknown or partially known arguments. Thus the
+definition\index{midpoint?\texttt{midpoint}}
+$$ \hbox{\tt def midpoint(expr a, b) = (.5[a,b]) enddef} $$
+works perfectly well when {\tt a} and {\tt b} are unknown. An
+equation such as
+$$ \hbox{\tt midpoint(z1,z2) = (1,1)} $$
+could be used to help determine {\tt z1} and {\tt z2}.
+
+Notice that the above definition for {\tt midpoint} works for numerics, pairs,
+or colors as long as both parameters have the same type. If for some reason we
+want a {\tt middlepoint}\index{middlepoint?\texttt{middlepoint}} macro that works for
+a single path or picture, it would be
+necessary to do an {\tt if}\index{if?\texttt{if}} test on the argument type. This uses
+the fact there is a unary operator\index{path?\texttt{path}}
+$$ {\tt path}\, \descr{primary} $$
+that returns a boolean result indicating whether its argument is a path. Since
+the basic {\tt if} test has the syntax\index{else?\texttt{else}}\index{fi?\texttt{fi}}
+$$ {\tt if}\, \descr{boolean expression}\hbox{\tt:}\, \descr{balanced tokens}\,
+ \hbox{\tt else:}\, \descr{balanced tokens}\, {\tt fi}
+$$
+where the \tdescr{balanced tokens}\index{balanced tokens?\tdescr{balanced tokens}} can be anything
+that is balanced with respect to {\tt if} and {\tt fi}, the complete
+{\tt middlepoint}\index{midpoint?\texttt{midpoint}} macro with type test looks like this:
+$$\begin{verbatim}
+def middlepoint(expr a) = if path a: (point .5*length a of a)
+ else: .5(llcorner a + urcorner a) fi enddef;
+\end{verbatim}
+$$
+The complete syntax for {\tt if} tests is shown in Figure~\ref{syif}.
+It allows multiple {\tt if} tests like
+$$ \hbox{\tt if $e_1$: \ldots\ else: if $e_2$: \ldots\ else: \ldots\ fi fi} $$
+to be shortened to\index{elseif?\texttt{elseif}}
+$$ \hbox{\tt if $e_1$: \ldots\ elseif $e_2$: \ldots\ else: \ldots\ fi} $$
+where $e_1$ and $e_2$ represent boolean expressions.
+
+Note that {\tt if} tests are not statements and the \tdescr{balanced tokens} in
+the syntax rules can be any sequence of balanced tokens even if they do not form
+a complete expression or statement. Thus we could have saved two tokens at the
+expense of clarity by defining {\tt midpoint} like this:
+$$\begin{verbatim}
+def midpoint(expr a) = if path a: (point .5*length a of
+ else: .5(llcorner a + urcorner fi a) enddef;
+\end{verbatim}
+$$
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{if test} \rightarrow if \descr{boolean expression} \hbox{\tt :}
+ \descr{balanced tokens} \descr{alternatives} fi$\\
+$\tt \descr{alternatives} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; else\hbox{\tt :} \descr{balanced tokens}$\\
+$\tt \qquad \;|\; elseif \descr{boolean expression} \hbox{\tt :}
+ \descr{balanced tokens} \descr{alternatives}$
+\end{ctabbing}
+\caption{The syntax for {\tt if} tests.}
+\label{syif}
+\end{figure}
+
+The real purpose of macros and {\tt if} tests is to automate repetitive tasks and
+allow important subtasks to be solved separately. For example, Figure~\ref{fig42}
+uses macros \verb|draw_marked|, \verb|mark_angle|, and \verb|mark_rt_angle| to
+mark lines and angles that appear in the figure.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+beginfig(42);
+pair a,b,c,d;
+b=(0,0); c=(1.5in,0); a=(0,.6in);
+d-c = (a-b) rotated 25;
+dotlabel.lft("a",a);
+dotlabel.lft("b",b);
+dotlabel.bot("c",c);
+dotlabel.llft("d",d);
+z0=.5[a,d];
+z1=.5[b,c];
+(z.p-z0) dotprod (d-a) = 0;
+(z.p-z1) dotprod (c-b) = 0;
+draw a--d;
+draw b--c;
+draw z0--z.p--z1;
+draw_marked(a--b, 1);
+draw_marked(c--d, 1);
+draw_marked(a--z.p, 2);
+draw_marked(d--z.p, 2);
+draw_marked(b--z.p, 3);
+draw_marked(c--z.p, 3);
+mark_angle(z.p, b, a, 1);
+mark_angle(z.p, c, d, 1);
+mark_angle(z.p, c, b, 2);
+mark_angle(c, b, z.p, 2);
+mark_rt_angle(z.p, z0, a);
+mark_rt_angle(z.p, z1, b);
+endfig;
+\end{verbatim}
+\quad \mathcenter{\epsfbox{manfig.42}}
+$$
+\caption{MetaPost code and the corresponding figure}
+\label{fig42}
+\end{figure}
+
+The task of the \verb|draw_marked|\index{draw_marked?\texttt{draw\_marked}} macro is to draw a path
+with a given number of cross marks near its midpoint. A convenient starting place
+is the subproblem of drawing a single cross mark perpendicular to a path {\tt p}
+at some time {\tt t}. The \verb|draw_mark|\index{draw_mark?\texttt{draw\_mark}} macro in
+Figure~\ref{drawmarked} does this by first finding a vector {\tt dm} perpendicular
+to~{\tt p} at~{\tt t}. To simplify positioning the cross mark,
+the \verb|draw_marked| macro is defined to take an arc length\index{arc length}
+{\tt a} along {\tt p} and use the {\tt arctime}\index{arctime} operator to
+compute~{\tt t}
+
+With the subproblem of drawing a single mark out of the way, the \verb|draw_marked|
+macro only needs to draw the path and call \verb|draw_mark| with the appropriate
+arc length values. The \verb|draw_marked| macro in Figure~\ref{drawmarked}
+uses {\tt n} equally-spaced {\tt a} values centered on
+{\tt .5*arclength~p}\index{arclength?\texttt{arclength}}.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+marksize=4pt;
+
+def draw_mark(expr p, a) =
+ begingroup
+ save t, dm; pair dm;
+ t = arctime a of p;
+ dm = marksize*unitvector direction t of p
+ rotated 90;
+ draw (-.5dm.. .5dm) shifted point t of p;
+ endgroup
+enddef;
+
+def draw_marked(expr p, n) =
+ begingroup
+ save amid;
+ amid = .5*arclength p;
+ for i=-(n-1)/2 upto (n-1)/2:
+ draw_mark(p, amid+.6marksize*i);
+ endfor
+ draw p;
+ endgroup
+enddef;
+\end{verbatim}
+$$
+\caption{Macros for drawing a path {\tt p} with {\tt n} cross marks.}
+\label{drawmarked}
+\end{figure}
+
+Since \verb|draw_marked| works for curved lines, it can be used to draw the arcs
+that the \verb|mark_angle|\index{mark_angle?\texttt{mark\_angle}} macro generates. Given points
+{\tt a}, {\tt b}, and {\tt c} that define a counter-clockwise angle at {\tt b},
+the \verb|mark_angle| needs to generate a small arc from segment {\tt ba} to
+segment {\tt bc}. The macro definition in Figure~\ref{markangle} does this by
+creating an arc {\tt p} of radius one and then computing a scale factor {\tt s}
+that makes it big enough to see clearly.
+
+The \verb|mark_rt_angle|\index{mark_rt_angle?\texttt{mark\_rt\_angle}} macro is much simpler.
+It takes a generic right-angle corner and uses the {\tt zscaled}\index{zscaled?\texttt{zscaled}}
+operator to rotate it and scale it as necessary.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+angle_radius=8pt;
+
+def mark_angle(expr a, b, c, n) =
+ begingroup
+ save s, p; path p;
+ p = unitvector(a-b){(a-b)rotated 90}..unitvector(c-b);
+ s = .9marksize/length(point 1 of p - point 0 of p);
+ if s<angle_radius: s:=angle_radius; fi
+ draw_marked(p scaled s shifted b, n);
+ endgroup
+enddef;
+
+def mark_rt_angle(expr a, b, c) =
+ draw ((1,0)--(1,1)--(0,1))
+ zscaled (angle_radius*unitvector(a-b)) shifted b
+enddef;
+\end{verbatim}
+$$
+\caption{Macros for marking angles.}
+\label{markangle}
+\end{figure}
+
+
+\subsection{Suffix and Text Parameters}
+
+Macro parameters need not always be expressions as in the previous examples.
+Replacing the keyword {\tt expr} with {\tt suffix}\index{suffix?\texttt{suffix}} or
+{\tt text}\index{text?\texttt{text}} in a macro definition declares the parameters to be
+variable names or arbitrary sequences of tokens. For example, there is a
+predefined macro called {\tt hide}\index{hide?\texttt{hide}} that takes a
+text parameter\index{parameter!text} and
+interprets it as a sequence of statements while ultimately producing an empty
+\tdescr{replacement text}. In other words, {\tt hide} executes its argument and
+then gets the next token as if nothing happened. Thus
+$$ \hbox{\tt show hide(numeric a,b; a+b=3; a-b=1) a;} $$
+prints ``\verb|>> 2|.''
+
+If the {\tt hide} macro were not predefined, it could be defined like this:
+$$\begin{verbatim}
+def ignore(expr a) = enddef;
+def hide(text t) = ignore(begingroup t; 0 endgroup) enddef;
+\end{verbatim}
+$$
+The statements represented by the text parameter {\tt t} would be evaluated as part
+of the group that forms the argument to {\tt ignore}. Since {\tt ignore} has an
+empty \tdescr{replacement text}, expansion of the {\tt hide} macro ultimately
+produces nothing.
+
+Another example of a predefined macro with a text parameter is
+{\tt dashpattern}\index{dashpattern?\texttt{dashpattern}}. The definition of {\tt dashpattern}
+starts
+$$\begin{verbatim}
+def dashpattern(text t) =
+ begingroup save on, off;
+\end{verbatim}
+$$
+then it defines {\tt on} and {\tt off} to be macros that create the desired
+picture when the text parameter~{\tt t} appears in the replacement text.
+
+Text parameters are very general, but their generality sometimes gets in the way.
+If you just want to pass a variable name to a macro, it is better to declare it
+as a suffix parameter\index{parameter!suffix}. For example,\index{incr?\texttt{incr}}
+$$ \hbox{\verb|def incr(suffix $) = begingroup $:=$+1; $ endgroup enddef;|} $$
+defines a macro that will take any numeric variable, add one to it, and return
+the new value. Since variable names can be more than one token long,
+$$ \hbox{\tt incr(a3b)} $$
+is perfectly acceptable if {\tt a3b} is a numeric variable.
+Suffix parameters are slightly more general than variable names because the
+definition in Figure~\ref{syvar} allows a \tdescr{suffix}\index{suffix?\tdescr{suffix}}
+to start with a \tdescr{subscript}\index{subscript?\tdescr{subscript}}.
+
+Figure~\ref{fig45} shows how suffix and expr parameters can be used together.
+The {\tt getmid}\index{getmid?\texttt{getmid}} macro takes a path variable and creates arrays
+of points and directions whose names are obtained by appending {\tt mid},
+{\tt off}, and {\tt dir} to the path variable. The {\tt joinup}\index{joinup?\texttt{joinup}}
+macro takes arrays of points and directions and creates a path of length {\tt n}
+that passes through each {\tt pt[i]} with direction {\tt d[i]} or
+$-\hbox{\tt d[i]}$.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+def getmid(suffix p) =
+ pair p.mid[], p.off[], p.dir[];
+ for i=0 upto 36:
+ p.dir[i] = dir(5*i);
+ p.mid[i]+p.off[i] = directionpoint p.dir[i] of p;
+ p.mid[i]-p.off[i] = directionpoint -p.dir[i] of p;
+ endfor
+enddef;
+
+def joinup(suffix pt, d)(expr n) =
+ begingroup
+ save res, g; path res;
+ res = pt[0]{d[0]};
+ for i=1 upto n:
+ g:= if (pt[i]-pt[i-1]) dotprod d[i] <0: - fi 1;
+ res := res{g*d[i-1]}...{g*d[i]}pt[i];
+ endfor
+ res
+ endgroup
+enddef;
+
+beginfig(45)
+path p, q;
+p = ((5,2)...(3,4)...(1,3)...(-2,-3)...(0,-5)...(3,-4)
+ ...(5,-3)...cycle) scaled .3cm shifted (0,5cm);
+getmid(p);
+draw p;
+draw joinup(p.mid, p.dir, 36)..cycle;
+q = joinup(p.off, p.dir, 36);
+draw q..(q rotated 180)..cycle;
+drawoptions(dashed evenly);
+for i=0 upto 3:
+ draw p.mid[9i]-p.off[9i]..p.mid[9i]+p.off[9i];
+ draw -p.off[9i]..p.off[9i];
+endfor
+endfig;
+\end{verbatim}
+\quad \mathcenter{\epsfbox{manfig.45}}
+$$
+\caption{MetaPost code and the corresponding figure}
+\label{fig45}
+\end{figure}
+
+A definition that starts
+$$ \hbox{\tt def joinup(suffix pt, d)(expr n) =} $$
+might suggest that calls to the {\tt joinup} macro should have two sets of
+parentheses as in
+$$ \hbox{\tt joinup(p.mid, p.dir)(36)} $$
+instead of
+$$ \hbox{\tt joinup(p.mid, p.dir, 36)} $$
+In fact, both forms are acceptable. Parameters in a macro call can be separated
+by commas or by {\tt )(} pairs. The only restriction is that a
+text parameter\index{parameter!text}
+must be followed by a right parenthesis. For instance, a macro {\tt foo} with one
+text parameter and one expr parameter can be called
+$$ \hbox{\tt foo(a,b)(c)} $$
+in which case the text parameter is ``{\tt a,b}'' and the expr parameter is
+{\tt c}, but
+$$ \hbox{\tt foo(a,b,c)} $$
+sets the text parameter to ``{\tt a,b,c}'' and leaves the MetaPost interpreter
+still looking for the expr parameter.
+
+
+\subsection{Vardef Macros}
+
+A macro definition can begin with {\tt vardef}\index{vardef?\texttt{vardef}} instead of
+{\tt def}. Macros defined in this way are called vardef macros. They are
+particularly well-suited to applications where macros are being used like functions
+or subroutines. The main idea is that a vardef macro is like a variable of type
+``macro.''
+
+Instead of {\tt def} \tdescr{symbolic token}, a vardef macro begins
+$$ {\tt vardef}\, \descr{generic variable} $$
+where a \tdescr{generic variable}\index{generic variable?\tdescr{generic variable}} is a variable
+name with numeric subscripts replaced by the
+generic subscript\index{subscript!generic} symbol {\tt []}\index{[]?\texttt{[]}}.
+In other words, the name following {\tt vardef} obeys exactly the same syntax as
+the name given in a variable declaration. It is a sequence of tags and generic
+subscript symbols starting with a tag, where a tag\index{tags} is a symbolic token
+that is not a macro or a primitive operator as explained in Section~\ref{vardecl}.
+
+The simplest case is when the name of a vardef macro consists of a single tag.
+Under such circumstances, {\tt def} and {\tt vardef} provide roughly the same
+functionality. The most obvious difference is that
+{\tt begingroup}\index{begingroup?\texttt{begingroup}} and {\tt endgroup}\index{endgroup?\texttt{endgroup}}
+are automatically inserted at the beginning and end of the
+\tdescr{replacement text} of every vardef macro. This makes the
+\tdescr{replacement text} a group so that a vardef
+macro behaves like a subroutine or a function call.
+
+Another property of vardef macros is that they allow multi-token macro
+names and macro names involving generic subscripts.
+When a vardef macro name has generic subscripts, numeric values have to be given
+when the macro is called. After a macro definition
+$$ \hbox{\tt vardef a[]b(expr p) =}\, \descr{replacement text}\,
+ \hbox{\tt enddef;}
+$$
+{\tt a2b((1,2))} and {\tt a3b((1,2)..(3,4))} are macro calls. But how can the
+\tdescr{replacement text} tell the difference between {\tt a2b} and {\tt a3b}?
+Two implicit suffix parameters\index{parameter!suffix} are automatically
+provided for this purpose.
+Every vardef macro has suffix parameters \verb|#@|\index{#@?\texttt{\#@}}
+and \verb|@|\index{@?\texttt{@}}, where \verb|@| is the last token in the name from the
+macro call and \verb|#@| is everything preceding the last token. Thus \verb|#@|
+is {\tt a2} when the name is given as {\tt a2b} and {\tt a3} when the name is
+given as {\tt a3b}.
+
+Suppose, for example, that the {\tt a[]b} macro is to take its argument and
+shift it by an amount that depends on the macro name. The macro could be defined
+like this:
+$$ \hbox{\verb|vardef a[]b(expr p) = p shifted (#@,b) enddef;|} $$
+Then {\tt a2b((1,2))} means {\tt (1,2) shifted (a2,b)}
+and {\tt a3b((1,2)..(3,4))} means
+$$ \hbox{\tt ((1,2)..(3,4)) shifted (a3,b)}. $$
+
+If the macro had been {\tt a.b[]}, \verb|#@| would always be {\tt a.b} and the
+\verb|@| parameter would give the numeric subscript. Then {\tt a@} would refer to
+an element of the array {\tt a[]}. Note that \verb|@| is a suffix parameter, not
+an expr parameter, so an expression like {\tt @+1} would be illegal. The only way
+to get at the numeric values of subscripts in a
+suffix parameter\index{parameter!suffix} is by extracting
+them from the string returned by the {\tt str}\index{str?\texttt{str}}\label{Dstr}
+operator. This operator takes a suffix and returns a string
+representation of a suffix. Thus {\tt str @} would be \verb|"3"| in {\tt a.b3}
+and \verb|"3.14"| in {\tt a.b3.14} or {\tt a.b[3.14]}. Since the syntax for a
+\tdescr{suffix}\index{suffix?\tdescr{suffix}} in Figure~\ref{syvar} requires negative
+subscripts to be in brackets, {\tt str @} returns {\tt "[-3]"} in {\tt a.b[-3]}.
+
+The {\tt str} operator is generally for emergency use only. It is better to
+use suffix parameters only as variable names or suffixes. The best example of a
+vardef macro involving suffixes is the {\tt z} macro that defines the
+{\tt z} convention\index{z convention?{\tt z} convention}. The definition involves a special
+token \verb|@#|\index{@#?\texttt{@\#}} that refers to the suffix following the macro name:
+$$ \hbox{\verb|vardef z@#=(x@#,y@#) enddef;|} $$
+This means that any variable name whose first token is {\tt z} is equivalent to
+a pair of variables whose names are obtained by replacing {\tt z} with {\tt x}
+and~{\tt y}. For instance, {\tt z.a1} calls the {\tt z} macro with the suffix
+parameter \verb|@#| set to {\tt a1}.
+
+In general,
+$$ {\tt vardef}\, \descr{generic variable} \hbox{\verb|@#|} $$
+is an alternative to {\tt vardef} \tdescr{generic variable} that causes the
+MetaPost interpreter
+to look for a suffix following the name given in the macro call and makes this
+available as the \verb|@#| suffix parameter.
+
+To summarize the special features of vardef macros, they allow a broad class of
+macro names as well as macro names followed by a special suffix parameter.
+Furthermore, {\tt begingroup} and {\tt endgroup} are automatically added to the
+\tdescr{replacement text} of a vardef macro. Thus using {\tt vardef}
+instead of {\tt def} to define the {\tt joinup}\index{joinup?\texttt{joinup}} macro in
+Figure~\ref{fig45} would have avoided the need to include {\tt begingroup} and
+{\tt endgroup} explicitly in the macro definition.
+
+In fact, most of the macro definitions given in previous examples could equally
+well use {\tt vardef} instead of {\tt def}. It usually does not matter very much
+which you use, but a good general rule is to use {\tt vardef} if you intend the
+macro to be used like a function or a subroutine. The following comparison
+should help in deciding when to use {\tt vardef}.
+
+\begin{itemize}
+\item Vardef macros are automatically surrounded by {\tt begingroup}
+and {\tt endgroup}.
+\item The name of a vardef macro can be more than one token long and it can
+contain subscripts.
+\item A vardef macro can have access to the suffix that follows the macro name
+when the macro is called.
+\item When a symbolic token is used in the name of a vardef macro it remains
+a tag\index{tags} and can still be used in other variable names. Thus {\tt p5dir}
+is a legal variable name even though {\tt dir} is a vardef macro, but an ordinary
+macro such as {\tt ...}\index{...?\texttt{...}} cannot be used in a variable name.
+(This is fortunate since {\tt z5...z6} is supposed to be a path expression, not
+an elaborate variable name).
+\end{itemize}
+
+
+\subsection{Defining Unary and Binary Macros}
+
+It has been mentioned several times that some of the operators and commands
+discussed so far are actually predefined macros. These include unary operators
+such as {\tt round}\index{round?\texttt{round}} and {\tt unitvector}\index{unitvector?\texttt{unitvector}},
+statements such as {\tt fill}\index{fill?\texttt{fill}} and {\tt draw}\index{draw?\texttt{draw}},
+and binary operators such as {\tt dotprod}\index{dotprod?\texttt{dotprod}} and
+{\tt intersectionpoint}\index{intersectionpoint?\texttt{intersectionpoint}}. The main difference
+between these macros and the ones we already know how to define is their argument
+syntax.
+
+The {\tt round} and {\tt unitvector} macros are examples of what
+Figure~\ref{syexpr} calls \tdescr{unary op}. That is, they are followed by a
+primary expression. To specify a macro argument of this type, the macro definition
+should look like this:
+$$ \hbox{\tt vardef round primary u =}\, \descr{replacement text}\,
+ \hbox{\tt enddef;}
+$$
+The {\tt u} parameter is an expr parameter\index{parameter!expr} and it can be
+used exactly like the expr parameter defined using the ordinary
+$$ \hbox{\tt (expr u)} $$
+syntax.
+
+As the {\tt round} example suggests, a macro can be defined to take a
+\tdescr{secondary}\index{secondary?\tdescr{secondary}},
+\tdescr{tertiary}\index{tertiary?\tdescr{tertiary}}, or an
+\tdescr{expression}\index{expression?\tdescr{expression}} parameter. For example, the
+predefined definition of the {\tt fill} macro is roughly\index{fill?\texttt{fill}}
+$$ \hbox{\tt def fill expr c = addto currentpicture contour c enddef;} $$
+
+It is even possible to define a macro to play the role of
+\tdescr{of operator}\index{of operator?\tdescr{of operator}} in Figure~\ref{syexpr}.
+For example, the {\tt direction of}\index{direction of?\texttt{direction of}} macro has a definition
+of this form:
+$$ \hbox{\tt vardef direction expr t of p =}\, \descr{replacement text}\,
+ \hbox{\tt enddef;}
+$$
+
+Macros can also be defined to behave like binary operators. For instance, the
+definition of the {\tt dotprod} macro has the
+form\index{dotprod?\texttt{dotprod}}\index{primarydef?\texttt{primarydef}}
+$$ \hbox{\tt primarydef w dotprod z =}\, \descr{replacement text}\,
+ \hbox{\tt enddef;}
+$$
+This makes {\tt dotprod} a \tdescr{primary binop}\index{primary binop?\tdescr{primary binop}}.
+Similarly, {\tt secondarydef}\index{secondarydef?\texttt{secondarydef}} and
+{\tt tertiarydef}\index{tertiarydef?\texttt{tertiarydef}} introduce
+\tdescr{secondary binop}\index{secondary binop?\tdescr{secondary binop}} and
+\tdescr{tertiary binop}\index{tertiary binop?\tdescr{tertiary binop}} definitions. These all
+define ordinary macros, not vardef macros; e.g., there is
+no ``{\tt primaryvardef}.''
+
+Thus macro definitions can be introduced by {\tt def}, {\tt vardef},
+{\tt primarydef}, {\tt secondarydef}, or {\tt tertiarydef}.
+A \tdescr{replacement text}\index{replacement text?\tdescr{replacement text}} is any list of tokens
+that is balanced with respect to {\tt def}-{\tt enddef} pairs where all five macro
+definition tokens are treated like {\tt def} for the purpose of
+{\tt def}-{\tt enddef} matching.
+
+The rest of the syntax for macro definitions is summarized in Figure~\ref{symacro}.
+The syntax contains a few surprises. The macro parameters can have a
+\tdescr{delimited part} and an \tdescr{undelimited part}. Normally, one of
+these is \tdescr{empty}, but it is possible to have both parts nonempty:
+$$ \hbox{\tt def foo(text a) expr b =}\, \descr{replacement text}\,
+ \hbox{\tt enddef;}
+$$
+This defines a macro {\tt foo} to take a text parameter in parentheses followed
+by an expression.
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{macro definition} \rightarrow
+ \descr{macro heading} \hbox{\tt =} \descr{replacement text}\, enddef$\\
+$\tt \descr{macro heading} \rightarrow def\, \descr{symbolic token}
+ \descr{delimited part} \descr{undelimited part}$\\
+$\tt \qquad \;|\; vardef\, \descr{generic variable} \descr{delimited part}
+ \descr{undelimited part}$\\
+$\tt \qquad \;|\; vardef\, \descr{generic variable} \hbox{\tt @\#}
+ \descr{delimited part} \descr{undelimited part}$\\
+$\tt \qquad \;|\; \descr{binary def} \descr{parameter}
+ \descr{symbolic token} \descr{parameter}$\\
+$\tt \descr{delimited part} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; \descr{delimited part}
+ \hbox{\tt (}\descr{parameter type} \descr{parameter tokens}\hbox{\tt )}$\\
+$\tt \descr{parameter type} \rightarrow expr \;|\; suffix \;|\; text$\\
+$\tt \descr{parameter tokens} \rightarrow \descr{parameter} \;|\;
+ \descr{parameter tokens}\hbox{\tt ,} \descr{parameter}$\\
+$\tt \descr{parameter} \rightarrow \descr{symbolic token}$\\
+$\tt \descr{undelimited part} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; \descr{parameter type} \descr{parameter}$\\
+$\tt \qquad \;|\; \descr{precedence level} \descr{parameter}$\\
+$\tt \qquad \;|\; expr\, \descr{parameter}\, of\, \descr{parameter}$\\
+$\tt \descr{precedence level} \rightarrow primary \;|\; secondary \;|\;
+ tertiary$\\
+$\tt \descr{binary def} \rightarrow primarydef \;|\; secondarydef \;|\;
+ tertiatydef$
+\end{ctabbing}
+\caption{The syntax for macro definitions}
+\label{symacro}
+\end{figure}
+
+The syntax also allows the \tdescr{undelimited part} to specify an argument type
+of {\tt suffix}\index{suffix?\texttt{suffix}} or {\tt text}\index{text?\texttt{text}}. An example of
+a macro with an undelimited suffix parameter\index{parameter!suffix}
+is the predefined macro {\tt incr}\index{incr?\texttt{incr}}\label{Dincr} that is actually
+defined like this:
+$$ \hbox{\verb|vardef incr suffix $ = $:=$+1; $ enddef;|} $$
+This makes {\tt incr} a function that takes a variable, increments it, and
+returns the new value. Undelimited suffix parameters may be parenthesized,
+so {\tt incr a} and {\tt incr(a)} are both legal if {\tt a} is a numeric
+variable. There is also a similar predefined macro {\tt decr}\index{decr?\texttt{decr}}
+that subtracts~1.
+
+Undelimited text parameters\index{parameter!text} run to the end of a statement.
+More precisely, an undelimited text parameter is the list of tokens following the
+macro call up to the first ``{\tt ;}\index{semicolon}'' or
+``{\tt endgroup}\index{endgroup?\texttt{endgroup}}'' or ``{\tt end}\index{end?\texttt{end}}''
+except that an argument containing ``{\tt begingroup}'' will always
+include the matching ``{\tt endgroup}.''
+An example of an undelimited text parameter comes from the predefined macro
+{\tt cutdraw}\index{cutdraw?\texttt{cutdraw}}\label{Dctdraw} whose definition is
+roughly\index{linecap?\texttt{linecap}}\index{butt?\texttt{butt}}\index{interim?\texttt{interim}}
+$$\begin{verbatim}
+def cutdraw text t =
+ begingroup interim linecap:=butt; draw t; endgroup enddef;
+\end{verbatim}
+$$
+This makes {\tt cutdraw} synonymous with {\tt draw} except for the {\tt linecap}
+value. (This macro is provided mainly for compatibility with \MF\index{metafont?\MF}.)
+
+
+\section{Loops}
+
+Numerous examples in previous sections have used simple {\tt for} loops of the
+form\index{loops}\index{for?\texttt{for}}\index{endfor?\texttt{endfor}}
+$$ {\tt for}\, \descr{symbolic token}\, \hbox{\tt =}\,
+ \descr{expression}\, {\tt upto}\, \descr{expression}:\
+ \descr{loop text}\, {\tt endfor}
+$$
+It is equally simple to construct a loop that counts downward: just replace
+{\tt upto} by {\tt downto}\index{downto?\texttt{downto}}\label{Ddwnto}
+make the second \tdescr{expression} smaller than the first.
+This section covers more complicated types of progressions, loops where the loop
+counter behaves like a suffix parameter, and ways of exiting from a loop.
+
+The first generalization is suggested by the fact that {\tt upto}\index{upto?\texttt{upto}}
+is a predefined macro for\index{step?\texttt{step}}\index{until?\texttt{until}}
+$$ \hbox{\tt step 1 until} $$
+and {\tt downto}\index{downto?\texttt{downto}} is a macro for {\tt step -1 until}.
+A loop begining
+$$ \hbox{\tt for i=a step b until c} $$
+scans a sequence of {\tt i} values {\tt a}, ${\tt a}+{\tt b}$, ${\tt a}+2{\tt b}$,
+\ldots, stopping before {\tt i} passes {\tt c}; i.e., the loop scans {\tt i} values
+where ${\tt i}\le {\tt c}$ if ${\tt b}>0$ and ${\tt i}\ge {\tt c}$ if ${\tt i}<0$.
+
+It is best to use this feature only when the step size is an integer or some
+number that can be represented exactly in fixed point arithmetic\index{arithmetic}
+as a multiple of $1\over65536$. Otherwise, error will accumulate and the loop
+index might not reach the expected termination value. For instance,
+$$ \hbox{\tt for i=0 step .1 until 1: show i; endfor} $$
+shows ten {\tt i} values the last of which is 0.90005.
+
+The standard way of avoid the problems associated with non-integer step sizes is
+to iterate over integer values and then multiply by a scale factor when using
+the loop index as was done in Figures \ref{fig1} and~\ref{fig40}.
+
+Alternatively, the values to iterate over can be given explicitly. Any sequence
+of zero or more expressions separated by commas can be used in place of
+{\tt a step b upto c}. In fact, the expressions need not all be the same type
+and they need not have known values. Thus
+$$ \hbox{\tt for t=3.14, 2.78, (a,2a), "hello": show a; endfor} $$
+shows the four values listed.
+
+Note that the loop body in the above example is a statement followed by a
+semicolon. It is common for the body of a loop to be one or more statements,
+but this need not be the case. A loop is like a macro definition followed by
+calls to the macro. The loop body can be virtually any sequence of tokens as
+long as they make sense together. Thus, the (ridiculous) statement
+$$ \hbox{\tt draw for p=(3,1),(6,2),(7,5),(4,6),(1,3): p-- endfor cycle;} $$
+is equivalent to
+$$ \hbox{\tt draw (3,1)--(6,2)--(7,5)--(4,6)--(1,3)--cycle;} $$
+(See Figure~\ref{fig17} for a more realistic example of this.)
+
+If a loop is like a macro definition, the loop index is like an
+expr parameter\index{parameter!expr}. It can represent any value, but it is
+not a variable and it cannot be changed by an assignment
+statement\index{assignment}. In order to do that, you need a
+{\tt forsuffixes}\index{forsuffixes?\texttt{forsuffixes}} loop. A {\tt forsuffixes} loop is
+a lot like a {\tt for} loop, except the loop index behaves like a
+suffix parameter\index{parameter!suffix}. The syntax is
+$$ {\tt forsuffixes}\, \descr{symbolic token}\, \hbox{\tt =}\,
+ \descr{suffix list}:\ \descr{loop text}\, {\tt endfor}
+$$
+where a \tdescr{suffix list} is a comma-separated list of suffixes.
+If some of the suffixes are \tdescr{empty}, the \tdescr{loop text} gets executed
+with the loop index parameter set to the empty suffix.
+
+A good example of a {\tt forsuffixes} loop is the definition of the
+{\tt dotlabels}\index{dotlabels?\texttt{dotlabels}} macro\index{str?\texttt{str}}:
+$$\begin{verbatim}
+vardef dotlabels@#(text t) =
+ forsuffixes $=t: dotlabel@#(str$,z$); endfor enddef;
+\end{verbatim}
+$$
+This should make it clear why the parameter to {\tt dotlabels} has to be a
+comma-separated list of suffixes. Most macros that accept variable-length
+comma-separated lists
+use them in {\tt for} or {\tt forsuffixes} loops in this fashion as values to
+iterate over.
+
+When there are no values to iterate over, you can use a
+{\tt forever}\index{forever?\texttt{forever}} loop:
+$$ {\tt forever}\hbox{\tt :}\, \descr{loop text}\, {\tt endfor} $$
+To terminate such a loop when a boolean condition becomes true, use an exit
+clause\index{exitif?\texttt{exitif}}:
+$$ {\tt exitif}\, \descr{boolean expression} \hbox{\tt ;} $$
+When the MetaPost interpreter encounters an exit clause, it evaluates the
+\tdescr{boolean expression} and exits the current loop if the expression is
+true. If it is more convenient to exit the loop when an expression becomes false,
+use the predefined macro {\tt exitunless}\index{exitunless?\texttt{exitunless}}.
+
+Thus MetaPost's version of a {\bf while} loop is
+$$ \hbox{\tt forever: exitunless}\, \descr{boolean expression} \hbox{\tt ;}\,
+ \descr{loop text}\, {\tt endfor}
+$$
+The exit clause could equally well come just before {\tt endfor} or anywhere
+in the \tdescr{loop text}. In fact any {\tt for}, {\tt forever}, or
+{\tt forsuffixes} loop can contain any number of exit clauses.
+
+The summary of loop syntax shown in Figure~\ref{syloop} does not mention
+exit clauses explicitly because a \tdescr{loop text} can be virtually any
+sequence of tokens. The only restriction is that a \tdescr{loop text} must
+be balanced with respect to {\tt for} and {\tt endfor}. Of course this balancing
+process treats {\tt forsuffixes} and {\tt forever} just like {\tt for}.
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{loop} \rightarrow \descr{loop header}\hbox{\tt :}\,
+ \descr{loop text} endfor$\\
+$\tt \descr{loop header} \rightarrow for\, \descr{symbolic token}\,
+ \hbox{\tt =}\, \descr{progression}$\\
+$\tt \qquad \;|\; for\, \descr{symbolic token}\, \hbox{\tt =}\,
+ \descr{for list}$\\
+$\tt \qquad \;|\; forsuffixes\, \descr{symbolic token}\, \hbox{\tt =}\,
+ \descr{suffix list}$\\
+$\tt \qquad \;|\; forever$\\
+$\tt \descr{progression} \rightarrow \descr{numeric expression}\, upto\,
+ \descr{numeric expression}$\\
+$\tt \qquad \;|\; \descr{numeric expression}\, downto\,
+ \descr{numeric expression}$\\
+$\tt \qquad \;|\; \descr{numeric expression}\, step\,
+ \descr{numeric expression}\, until\, \descr{numeric expression} $\\
+$\tt \descr{for list} \rightarrow \descr{expression}
+ \;|\; \descr{for list}\hbox{\tt ,}\, \descr{expression}$\\
+$\tt \descr{suffix list} \rightarrow \descr{suffix}
+ \;|\; \descr{suffix list}\hbox{\tt ,}\, \descr{suffix}$
+\end{ctabbing}
+\caption{The syntax for loops}
+\label{syloop}
+\end{figure}
+
+
+\section{Making Boxes}
+\label{boxessec}
+
+This section describes auxiliary macros not included in Plain MetaPost that
+make it convenient to do things that {\it pic} is good at \cite{ke:pic}. What
+follows is a description of how to use the macros contained in the
+file {\tt boxes.mp}\index{boxes.mp?\texttt{boxes.mp}}. This file is included in a special
+directory reserved for MetaPost macros and support software\footnote{The name
+of this directory is likely to be something like \verb|/usr/lib/mp/lib|, but
+this is system dependent.}
+and can be accessed by giving the MetaPost command {\tt input boxes} before any
+figures that use the box making macros.
+The syntax for the {\tt input} command is \index{input?\texttt{input}}
+$$ {\tt input}\, \descr{file name} $$
+where a final ``{\tt .mp}'' can be omitted from the file name. The {\tt input}
+command looks first in the current directory and then in the special macro
+directory. Users interested in writing macros may want to look at the
+{\tt boxes.mp} file in this directory.
+
+\subsection{Rectangular Boxes}
+
+The main idea of the box-making macros is that one should
+say\index{boxit?\texttt{boxit}}\label{Dboxit}
+$$ {\tt boxit.} \descr{suffix}
+ \hbox{\tt(} \descr{picture expression} \hbox{\tt)}
+$$
+where the \tdescr{suffix} does not start with a subscript.\footnote{Some early
+versions of the box making macros did not allow any subscripts in the
+{\tt boxit} suffix.}
+This creates pair variables \tdescr{suffix}{\tt.c},
+\tdescr{suffix}{\tt.n}, \tdescr{suffix}{\tt.e}, \ldots\ that can then be
+used for positioning the picture before drawing it with a separate command such
+as\index{drawboxed?\texttt{drawboxed}}\label{Ddrbxed}
+$$ \hbox{\tt drawboxed(} \descr{suffix list} \hbox{\tt )} $$
+The argument to {\tt drawboxed} should be a comma-separated list of box names,
+where a box name\index{box name} is a \tdescr{suffix} with which {\tt boxit}
+has been called.
+
+For the command {\tt boxit.bb(pic)}, the box name is {\tt bb} and the contents
+of the box is the picture {\tt pic}. In this case, {\tt bb.c} the position
+where the center of picture {\tt pic} is to be placed, and {\tt bb.sw},
+{\tt bb.se}, {\tt bb.ne}, and {\tt bb.nw} are the corners of a rectangular path
+that will surround the resulting picture. Variables {\tt bb.dx} and {\tt bb.dy}
+give the spacing between the shifted version of {\tt pic} and the surrounding
+rectangle, and {\tt bb.off} is the amount by which {\tt pic} has to be shifted
+to achieve all this.
+
+When the {\tt boxit} macro is called with box name~$b$, it gives linear equations
+that force $b${\tt.sw}, $b${\tt.se}, $b${\tt.ne}, and $b${\tt.nw} to be the
+corners of a rectangle
+aligned on the $x$ and $y$ axes with the box contents centered inside as
+indicated by the gray rectangle in Figure~\ref{fig48}. The values of $b${\tt.dx},
+$b${\tt.dy}, and $b${\tt.c} are left unspecified so that the user can give
+equations for positioning the boxes. If no such equations are given, macros
+such as {\tt drawboxed} can detect this and give default values.
+The default values for {\tt dx} and {\tt dy} variables are controlled by the
+internal variables\index{internal variables}\index{variables!internal}
+{\tt defaultdx}\index{defaultdx?\texttt{defaultdx}}\label{Ddefaultdx} and
+{\tt defaultdy}\index{defaultdy?\texttt{defaultdy}}\label{Ddefaultdy}.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.48} $$
+\caption[How a {\tt boxit} picture relates to the associated variables]
+ {The relationship between the picture given to {\tt boxit} and the
+ associated variables. The picture is indicated by a gray rectangle.}
+\label{fig48}
+\end{figure}
+
+If $b$ represents a box name, {\tt drawboxed($b$)} draws the rectangular boundary
+of box~$b$ and then the contents of the box. This bounding rectangle can be
+accessed separately as {\tt bpath~b}, or in general\index{bpath?\texttt{bpath}}\label{Dbpath}
+$$ {\tt bpath}\, \descr{box name} $$
+It is useful in combination with operators like
+{\tt cutbefore}\index{cutbefore?\texttt{cutbefore}} and {\tt cutafter}\index{cutafter?\texttt{cutafter}}
+in order to control paths that enter the box.
+For example, if $a$ and $b$ are box names and $p$ is a path from $a${\tt.c}
+to $b${\tt.c},\index{drawarrow?\texttt{drawarrow}}
+$$ \hbox{\tt drawarrow $p$ cutbefore bpath $a$ cutafter bpath $b$} $$
+draws an arrow from the edge of box $a$ to the edge of box $b$.
+
+Figure~\ref{fig49} shows a practical example including some arrows drawn with
+{\tt cutafter bpath} \tdescr{box name}. It is
+instructive to compare Figure~\ref{fig49} to the similar figure in the pic
+manual \cite{ke:pic}. The figure uses a macro\index{boxjoin?\texttt{boxjoin}}\label{Dbxjoin}
+$$ \hbox{\tt boxjoin(} \descr{equation text} \hbox{\tt )} $$
+to control the relationship between consecutive boxes. Within the
+\tdescr{equation text}, {\tt a} and {\tt b} represent the box names given in
+consecutive calls to {\tt boxit} and the \tdescr{equation text} gives equations
+to control the relative sizes and positions of the boxes.
+
+\begin{figure}[htp]
+$$\hbox{$\begin{verbatim}
+input boxes
+beginfig(49);
+boxjoin(a.se=b.sw; a.ne=b.nw);
+boxit.a(btex\strut$\cdots$ etex); boxit.ni(btex\strut$n_i$ etex);
+boxit.di(btex\strut$d_i$ etex); boxit.ni1(btex\strut$n_{i+1}$ etex);
+boxit.di1(btex\strut$d_{i+1}$ etex); boxit.aa(btex\strut$\cdots$ etex);
+boxit.nk(btex\strut$n_k$ etex); boxit.dk(btex\strut$d_k$ etex);
+drawboxed(di,a,ni,ni1,di1,aa,nk,dk); label.lft("ndtable:", a.w);
+interim defaultdy:=7bp;
+boxjoin(a.sw=b.nw; a.se=b.ne);
+boxit.ba(); boxit.bb(); boxit.bc();
+boxit.bd(btex $\vdots$ etex); boxit.be(); boxit.bf();
+bd.dx=8bp; ba.ne=a.sw-(15bp,10bp);
+drawboxed(ba,bb,bc,bd,be,bf); label.lft("hashtab:",ba.w);
+vardef ndblock suffix $ =
+ boxjoin(a.sw=b.nw; a.se=b.ne);
+ forsuffixes $$=$1,$2,$3: boxit$$(); ($$dx,$$dy)=(5.5bp,4bp);
+ endfor; enddef;
+ndblock nda; ndblock ndb; ndblock ndc;
+nda1.c-bb.c = ndb1.c-nda3.c = (whatever,0);
+xpart ndb3.se = xpart ndc1.ne = xpart di.c;
+ndc1.c - be.c = (whatever,0);
+drawboxed(nda1,nda2,nda3, ndb1,ndb2,ndb3, ndc1,ndc2,ndc3);
+drawarrow bb.c -- nda1.w;
+drawarrow be.c -- ndc1.w;
+drawarrow nda3.c -- ndb1.w;
+drawarrow nda1.c{right}..{curl0}ni.c cutafter bpath ni;
+drawarrow nda2.c{right}..{curl0}di.c cutafter bpath di;
+drawarrow ndc1.c{right}..{curl0}ni1.c cutafter bpath ni1;
+drawarrow ndc2.c{right}..{curl0}di1.c cutafter bpath di1;
+drawarrow ndb1.c{right}..nk.c cutafter bpath nk;
+drawarrow ndb2.c{right}..dk.c cutafter bpath dk;
+x.ptr=xpart aa.c; y.ptr=ypart ndc1.ne;
+drawarrow subpath (0,.7) of (z.ptr..{left}ndc3.c) dashed evenly;
+label.rt(btex \strut ndblock etex, z.ptr); endfig;
+\end{verbatim}
+$}
+\atop \vcenter{\vskip8pt\hbox{\epsfbox{manfig.49}}}
+$$
+\caption{MetaPost code and the corresponding figure}
+\label{fig49}
+\end{figure}
+
+For example, the second line of input for the above figure contains
+$$ \hbox{\tt boxjoin(a.se=b.sw; a.ne=b.nw)} $$
+This causes boxes to line up horizontally by giving additional equations that
+are invoked each time some box {\tt a} is followed by some other box~{\tt b}.
+These equations are first invoked on the next line when box~{\tt a} is followed
+by box~{\tt ni}. This yields
+$$ \hbox{\tt a.se=ni.sw; a.ne=ni.nw} $$
+The next pair of boxes is box~{\tt ni} and box~{\tt di}. This time the
+implicitly generated equations are
+$$ \hbox{\tt ni.se=di.sw; ni.ne=di.nw} $$
+This process continues until a new {\tt boxjoin}\index{boxjoin?\texttt{boxjoin}} is given.
+In this case the new declaration is
+$$ \hbox{\tt boxjoin(a.sw=b.nw; a.se=b.ne)} $$
+which causes boxes to be stacked below each other.
+
+After calling {\tt boxit} for the first eight boxes {\tt a} through {\tt dk},
+the box heights are constrained to match but the widths are still unknown.
+Thus the {\tt drawboxed}\index{drawboxed?\texttt{drawboxed}} macro needs to assign default
+values to the \tdescr{box name}{\tt.dx} and \tdescr{box name}{\tt.dy}
+variables. First, {\tt di.dx} and {\tt di.dy} get default values so that all
+the boxes are forced to be large enough to contain the contents of box~{\tt di}.
+
+The macro that actually assigns default values to {\tt dx} and {\tt dy} variables
+is called {\tt fixsize}\index{fixsize?\texttt{fixsize}}\label{Dfixsiz}.
+It takes a list of box names and
+considers them one at a time, making sure that each box has a fixed size and
+shape. A macro called {\tt fixpos}\index{fixpos?\texttt{fixpos}}\label{Dfixpos} then takes
+this same list
+of box names and assigns default values to the \tdescr{box name}{\tt.off}
+variables as needed to fix the position of each box. By using {\tt fixsize}
+to fix the dimensions of each box before assigning default positions to any
+of them, the number of needing default positions can usually be cut to at most
+one.
+
+Since the bounding path for a box cannot be computed until the size, shape, and
+position of the box is determined, the {\tt bpath}\index{bpath?\texttt{bpath}} macro applies
+{\tt fixsize} and {\tt fixpos} to its argument. Other macros that do this
+include\index{pic?\texttt{pic}}\label{Dpic}
+$$ {\tt pic}\, \descr{box name} $$
+where the \tdescr{box name} is a suffix, possibly in parentheses. This returns
+the contents of the named box as a picture positioned so that
+$$ {\tt draw\ pic} \descr{box name} $$
+draws the box contents without the bounding rectangle. This operation can also
+be accomplished by the {\tt drawunboxed}\index{drawunboxed?\texttt{drawunboxed}}\label{Ddrunbx}
+macro that takes a comma-separated list of box names. There is also a
+{\tt drawboxes}\index{drawboxes?\texttt{drawboxes}}\label{Ddrbxes} macro that draws just the
+bounding rectangles.
+
+Another way to draw empty rectangles is by just saying\label{Deboxit}
+$$ {\tt boxit} \descr{box name} \hbox{\tt ()} $$
+with no picture argument as is done several times in Figure~\ref{fig49}.
+This is like calling {\tt boxit} with an empty picture.
+Alternatively the argument can be a string\label{Dsboxit} expression
+instead of a picture
+expression in which case the string is typeset in the default font.
+
+
+\subsection{Circular and Oval Boxes}
+
+Circular and oval boxes are a lot like rectangular boxes except for the shape
+of the bounding path. Such boxes are set up by the
+{\tt circleit}\index{circleit?\texttt{circleit}}\label{Dcircit} macro:
+$$ {\tt circleit} \descr{box name}
+ \hbox{\tt(} \descr{box contents} \hbox{\tt)}
+$$
+where \tdescr{box name} is a suffix and \tdescr{box contents} is either a
+picture expression, a string expression, or \tdescr{empty}.
+
+The {\tt circleit} macro defines pair variable just as {\tt boxit} does, except
+that there are no corner points \tdescr{box name}{\tt.ne},
+\tdescr{box name}{\tt.sw}, etc. A call to
+$$ \hbox{\tt circleit.a(}\ldots \hbox{\tt )} $$
+gives relationships among points {\tt a.c}, {\tt a.s},
+{\tt a.e}, {\tt a.n}, {\tt a.w}
+and distances {\tt a.dx} and {\tt a.dy}. Together with {\tt a.c} and {\tt a.off},
+these variables describe how the picture is centered in an oval as can be seen
+from the Figure~\ref{fig50}.
+
+\begin{figure}[htp]
+$$ \epsfbox{manfig.50} $$
+\caption[How a {\tt circleit} picture relates to the associated variables]
+ {The relationship between the picture given to {\tt circleit} and the
+ associated variables. The picture is indicated by a gray rectangle.}
+\label{fig50}
+\end{figure}
+
+The {\tt drawboxed}\index{drawboxed?\texttt{drawboxed}}, {\tt drawunboxed}\index{drawunboxed?\texttt{drawunboxed}},
+{\tt drawboxes}\index{drawboxes?\texttt{drawboxes}}, {\tt pic}\index{pic?\texttt{pic}}, and
+{\tt bpath}\index{bpath?\texttt{bpath}} macros work for {\tt circleit} boxes just as they do
+for {\tt boxit} boxes. By default, the boundary path for a {\tt circleit} box is
+a circle large enough to surround the box contents with a small safety margin
+controlled by the
+internal variable\index{internal variables}\index{variables!internal}
+{\tt circmargin}\label{Dcmargin}. Figure~\ref{fig51} gives
+a basic example of the use of {\tt bpath} with {\tt circleit} boxes.
+
+\begin{figure}[htbp]
+$$\begin{verbatim}
+vardef drawshadowed(text t) =
+ fixsize(t);
+ forsuffixes s=t:
+ fill bpath.s shifted (1pt,-1pt);
+ unfill bpath.s;
+ drawboxed(s);
+ endfor
+enddef;
+
+beginfig(51)
+circleit.a(btex Box 1 etex);
+circleit.b(btex Box 2 etex);
+b.n = a.s - (0,20pt);
+drawshadowed(a,b);
+drawarrow a.s -- b.n;
+endfig;
+\end{verbatim}
+\qquad \mathcenter{\epsfbox{manfig.51}} $$
+\caption[MetaPost code and the resulting figure.]
+ {MetaPost code and the resulting figure. Note that the {\tt drawshadowed}
+ macro used here is not part of the {\tt boxit.mp} macro package.}
+\label{fig51}
+\index{drawshadowed?\texttt{drawshadowed}}
+\end{figure}
+
+A full example of {\tt circleit} boxes appears in Figure~\ref{fig52}.
+The oval boundary paths around ``Start'' and ``Stop'' are due to the equations
+$$ \hbox{\tt aa.dx=aa.dy;} \quad {\rm and}\quad \hbox{\tt ee.dx=ee.dy} $$
+after
+$$ \hbox{\verb|circleit.ee(btex\strut Stop etex)|}
+ \quad{\rm and}\quad
+ \hbox{\verb|circleit.ee(btex\strut Stop etex)|}.
+$$
+The general rule is that {\tt bpath.}$c$ comes out circular if $c${\tt.dx},
+$c${\tt.dy}, and $c\hbox{\tt.dx}-c\hbox{\tt.dy}$ are all unknown. Otherwise, the
+macros select an oval big enough to contain the given picture with the safety
+margin {\tt circmargin}\index{circmargin?\texttt{circmargin}}.
+
+
+\begin{figure}[htp]
+$$\hbox{$\begin{verbatim}
+vardef cuta(suffix a,b) expr p =
+ drawarrow p cutbefore bpath.a cutafter bpath.b;
+ point .5*length p of p
+enddef;
+
+vardef self@# expr p =
+ cuta(@#,@#) @#.c{curl0}..@#.c+p..{curl0}@#.c enddef;
+
+beginfig(52);
+verbatimtex \def\stk#1#2{$\displaystyle{\matrix{#1\cr#2\cr}}$} etex
+circleit.aa(btex\strut Start etex); aa.dx=aa.dy;
+circleit.bb(btex \stk B{(a|b)^*a} etex);
+circleit.cc(btex \stk C{b^*} etex);
+circleit.dd(btex \stk D{(a|b)^*ab} etex);
+circleit.ee(btex\strut Stop etex); ee.dx=ee.dy;
+numeric hsep;
+bb.c-aa.c = dd.c-bb.c = ee.c-dd.c = (hsep,0);
+cc.c-bb.c = (0,.8hsep);
+xpart(ee.e - aa.w) = 3.8in;
+drawboxed(aa,bb,cc,dd,ee);
+label.ulft(btex$b$etex, cuta(aa,cc) aa.c{dir50}..cc.c);
+label.top(btex$b$etex, self.cc(0,30pt));
+label.rt(btex$a$etex, cuta(cc,bb) cc.c..bb.c);
+label.top(btex$a$etex, cuta(aa,bb) aa.c..bb.c);
+label.llft(btex$a$etex, self.bb(-20pt,-35pt));
+label.top(btex$b$etex, cuta(bb,dd) bb.c..dd.c);
+label.top(btex$b$etex, cuta(dd,ee) dd.c..ee.c);
+label.lrt(btex$a$etex, cuta(dd,bb) dd.c..{dir140}bb.c);
+label.bot(btex$a$etex, cuta(ee,bb) ee.c..tension1.3 ..{dir115}bb.c);
+label.urt(btex$b$etex, cuta(ee,cc) ee.c{(cc.c-ee.c)rotated-15}..cc.c);
+endfig;
+\end{verbatim}
+$}
+\atop \vcenter{\vskip8pt\hbox{\epsfbox{manfig.52}}}
+$$
+\caption{MetaPost code and the corresponding figure}
+\label{fig52}
+\index{self?\texttt{self}}
+\end{figure}
+
+
+\section{Debugging}
+
+MetaPost inherits from \MF\index{metafont?\MF} numerous facilities for interactive
+debugging, most of which can only be mentioned briefly here. Further information
+on error messages, debugging, and generating tracing information can be found in
+{\it The\ \MF book} \cite{kn:c}.
+
+Suppose your input file says
+$$ \hbox{\tt draw z1--z2;} $$
+on line 17 without first giving known values to {\tt z1} and {\tt z2}.
+Figure~\ref{errmsg} shows what the MetaPost interpreter prints on your terminal
+when it finds the error. The actual error message is the line beginning with
+``{\tt !}''; the next six lines give the context that shows exactly what input
+was being read when the error was found; and the ``{\tt ?}'' on last line is a
+prompt for your response. Since the error message talks about an undefined
+$x$~coordinate, this value is printed on the first line after the ``{\tt >>}''.
+In this case the $x$~coordinate of {\tt z1} is just the unknown variable {\tt x1},
+so the interpreter prints the variable name {\tt x1} just as it would if it
+were told to\index{show?\texttt{show}} ``{\tt show x1}'' at this point.
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+>> x1
+! Undefined x coordinate has been replaced by 0.
+<to be read again>
+ {
+--->{
+ curl1}..{curl1}
+l.17 draw z1--
+ z2;
+?
+\end{verbatim}
+$$
+\caption{An example of an error message.}
+\label{errmsg}
+\end{figure}
+
+The context listing may seem a little confusing at first, but it really just
+gives a few lines of text showing how much of each line has been read so far.
+Each line of input is printed on two lines like this:
+\begin{eqnarray*}
+ \descr{descriptor}\ \hbox{Text read so far} \\
+ && \hbox{Text yet to be read}
+\end{eqnarray*}
+The \tdescr{descriptor} identifies the input source. It is either a line number
+like ``{\tt l.17}'' for line 17 of the current file; or it can be a macro name
+followed by ``{\tt ->}''; or it is a descriptive phrase in angle brackets.
+Thus, the meaning of the context listing in Figure~\ref{errmsg} is that the
+interpreter has just read line 17 of the input file up to ``{\tt --},'' the
+expansion of the {\tt --} macro has just started, and the initial
+``\verb|{|'' has been reinserted to allow for user input before scanning
+this token.
+
+Among the possible responses to a {\tt ?} prompt are the following:
+\begin{description}
+\item[x] terminates the run so that you can fix you input file and start over.
+\item[h] prints a help message followed by another {\tt ?} prompt.
+\item[\tdescr{return}] causes the interpreter to proceed as best it can.
+\item[?] prints a listing of the options available, followed by another
+ {\tt ?} prompt.
+\end{description}
+
+Error messages and responses to {\tt show} commands are also written into the
+transcript\index{files!transcript} file whose name is obtained from the name
+of the main input file by changing ``{\tt .mp}'' to ``{\tt .log}''. When the
+internal variable\index{internal variables}\index{variables!internal}
+{\tt tracingonline}\index{tracingonline?\texttt{tracingonline}} is at its default
+value of zero, some {\tt show} commands print their results in full detail only
+in transcript file.
+
+Only one type of {\tt show}\index{show?\texttt{show}} command has been discussed so far:
+{\tt show} followed by a comma-separated list of expressions prints symbolic
+representations of the expressions.
+
+The {\tt showtoken}\index{showtoken?\texttt{showtoken}}\label{Dshtok}
+command can be used to show the
+parameters and replacement text of a macro. It takes a comma-separated list of
+tokens and identifies each one. If the token is a primitive as in
+``\verb|showtoken +|'' it is just identified as being itself:
+$$ \hbox{\verb|> +=+|} $$
+Applying {\tt showtoken} to a variable or a {\tt vardef} macro yields
+$$ \hbox{\tt > } \descr{token}\hbox{\tt =variable} $$
+
+To get more information about a variable, use
+{\tt showvariable}\index{showvariable?\texttt{showvariable}}\label{Dshvar}
+instead of {\tt showtoken}. The
+argument to {\tt showvariable} is a comma-separated list of symbolic tokens
+and the result is a description of all the variables whose names begin with
+one of the listed tokens. This even works for {\tt vardef} macros. For
+example, {\tt showvariable z} yields
+$$ \hbox{\verb|z@#=macro:->begingroup(x(SUFFIX2),y(SUFFIX2))endgroup|} $$
+
+There is also a {\tt showdependencies}\index{showdependencies?\texttt{showdependencies}}\label{Dshdep}
+command that takes no arguments and prints a list of all {\em dependent} variables
+and how the linear equations given so far make them depend on other variables.
+Thus after
+$$ \hbox{\tt z2-z1=(5,10); z1+z2=(a,b);} $$
+{\tt showdependencies} prints what is shown in Figure~\ref{shdep}. This could
+be useful in answering a question like ``What does it mean
+`{\tt !\ Undefined x coordinate}?' I thought the equations given so far would
+determine {\tt x1}.''
+
+\begin{figure}[htp]
+$$\begin{verbatim}
+x2=0.5a+2.5
+y2=0.5b+5
+x1=0.5a-2.5
+y1=0.5b-5
+\end{verbatim}
+$$
+\caption{The result of {\tt z2-z1=(5,10); z1+z2=(a,b); showdependencies;}}
+\label{shdep}
+\end{figure}
+
+When all else fails, the predefined macro
+{\tt tracingall}\index{tracingall?\texttt{tracingall}}\label{Dtall}
+causes the interpreter to print a detailed listing of everything it is doing.
+Since the tracing information is often quite voluminous, it may be better to use
+the {\tt loggingall}\index{loggingall?\texttt{loggingall}}\label{Dlogall}
+macro that produces the same information
+but only writes it in the transcript\index{files!transcript} file. There is also
+a {\tt tracingnone}\index{tracingnone?\texttt{tracingnone}}\label{Dtnone}
+macro that turns off all the tracing output.
+
+Tracing output is controlled by the set of
+internal variables\index{internal variables}\index{variables!internal}
+summarized below.
+When any one of these variables is given a positive value, the corresponding form
+of tracing is turned on. Here is the set of tracing variables and what happens
+when each of them is positive:
+\begin{description}
+\item[{\tt tracingcapsules}]\index{tracingcapsules?\texttt{tracingcapsules}}\label{Dtcapsules}%
+shows the values of temporary quantities (capsules) when they become known.
+%
+\item[{\tt tracingchoices}]\index{tracingchoices?\texttt{tracingchoices}}\label{Dtchoices}%
+shows the B\'ezier control\index{control points} points of each new path when they
+are chosen.
+%
+\item[{\tt tracingcommands}]\index{tracingcommands?\texttt{tracingcommands}}\label{Dtcommands}%
+shows the commands before they are performed. A setting ${}>1$ also shows
+{\tt if}\index{if?\texttt{if}} tests and loops before they are expanded;
+a setting ${}>2$ shows algebraic operations before they are performed.
+%
+\item[{\tt tracingequations}]\index{tracingequations?\texttt{tracingequations}}\label{Dtequations}%
+shows each variable when it becomes known.
+%
+\item[{\tt tracinglostchars}]\index{tracinglostchars?\texttt{tracinglostchars}}\label{Dtlostchars}%
+warns about characters omitted from a picture because they are not in the font
+being used to typeset labels.
+%
+\item[{\tt tracingmacros}]\index{tracingmacros?\texttt{tracingmacros}}\label{Dtmacros}%
+shows macros before they are expanded.
+%
+\item[{\tt tracingoutput}]\index{tracingoutput?\texttt{tracingoutput}}\label{Dtoutput}%
+shows pictures as they are being shipped out as PostScript files.
+%
+\item[{\tt tracingrestores}]\index{tracingrestores?\texttt{tracingrestores}}\label{Dtrestores}%
+shows symbols and internal variables as they are being restored at the end
+of a group.
+%
+\item[{\tt tracingspecs}]\index{tracingspecs?\texttt{tracingspecs}}\label{Dtspecs}%
+shows the outlines generated when drawing with a
+polygonal pen\index{pens!polygonal}.
+%
+\item[{\tt tracingstats}]\index{tracingstats?\texttt{tracingstats}}\label{Dtstats}
+shows in the transcript file at the end of the job how many of the
+MetaPost interpreter's limited resources were used.
+\end{description}
+
+
+\section*{Acknowledgement}
+
+I would like to thank Don Knuth for making this work possible by developing
+\MF\ and placing it in the public domain. I am also indebted to him for helpful
+suggestions, particularly with regard to the treatment of included \TeX\ material.
+
+
+\appendix
+
+\section{Reference Manual}
+
+\let\svtopfrac=\topfraction % prepare to restore values at end of this appendix
+\let\svtxtfrac=\textfraction % grouping would fail because \setcounter is global
+\newcounter{svtopnum}
+\newcounter{svtotnum}
+\setcounter{svtopnum}{\value{topnumber}}
+\setcounter{svtotnum}{\value{totalnumber}}
+
+\renewcommand\topfraction{1.0} % set values to allow *lots* of figures and tables
+\renewcommand\textfraction{0.0}
+\setcounter{topnumber}{10}
+\setcounter{totalnumber}{10}
+
+Tables \ref{ivartab}--\ref{pseudotab} summarize the built-in features of
+Plain MetaPost and the features defined in the {\tt boxes.mp}\index{boxes.mp?\texttt{boxes.mp}}
+macro file. As explained in Section~\ref{boxessec}, the {\tt boxes.mp} macro
+file is not automatically preloaded and the macros defined there are not
+accessible until you ask for them via the command\index{input?\texttt{input}}
+$$ \hbox{\tt input boxes} $$
+
+Features that depend on {\tt boxes.mp} are marked by \bx\ symbols.
+Features from the Plain\index{Plain macros} macro package are marked are marked
+by \pl\ symbols, and MetaPost primitives are not marked by \bx\ or \pl.
+The distinction between primitives and plain macros can be ignored by the casual
+user, but it is important to remember that features marked by a \bx\ can only
+be used after reading in the {\tt boxes.mp}\index{boxes.mp?\texttt{boxes.mp}} macro file.
+
+The tables in this appendix give the name each feature, the page number where
+it is explained, and a short description. A few features are not explained
+elsewhere and have no page number listed. These features exist primarily for
+compatibility with \MF\index{metafont?\MF} and are intended to be self-explanatory.
+Certain other features from \MF\ are omitted entirely because they are of
+limited interest to the MetaPost users and/or would require long explanations.
+All of these are documented in {\it The \MF book} \cite{kn:c} as explained
+in Appendix~\ref{MPvsMF}.
+
+Table~\ref{ivartab} lists internal variables that take on numeric values.
+Table~\ref{pvartab} lists predefined variables of other types.
+Table~\ref{consttab} lists predefined constants. Some of these are implemented
+as variables whose values are intended to be left unchanged.
+
+Tables \ref{optabA}--\ref{optabD} summarize MetaPost operators and list the
+possible argument and result types for each one. A ``--'' entry for the left
+argument indicates a unary operator; ``--'' entries for both arguments indicate a
+nullary operator. Operators that take suffix parameters are not listed in
+these tables because they are treated as ``function-like macros''.
+
+The last two tables are Table~\ref{cmdtab} for commands and Table~\ref{pseudotab}
+macros that behave like functions or procedures. Such macros take parenthesized
+argument lists and/or suffix parameters, returning either a value whose type is
+listed in the table, or nothing. The latter case is for macros that behave
+like procedures. Their return values are listed as ``--''.
+
+The figures in this appendix present the syntax of the MetaPost language
+starting with expressions in Figures \ref{syexpr1}--\ref{sypseudo}.
+Although the productions sometimes specify types for expressions, primaries,
+secondaries, and tertiaries, no attempt is made to give separate syntaxes
+for \tdescr{numeric expression}, \tdescr{pair expression}, etc.
+The simplicity of the productions in Figure~\ref{sytypexpr} is due to this
+lack of type information. Type information
+can be found in Tables \ref{ivartab}--\ref{pseudotab}.
+
+Figures \ref{syprog} and \ref{sycmds} give the syntax for MetaPost programs,
+including statements and commands. They do not mention loops\index{loops}
+and {\tt if}\index{if?\texttt{if}}
+tests because these constructions do not behave like statements. The syntax
+given in Figures \ref{syexpr1}--\ref{pseudotab} applies to the result of
+expanding all conditionals and loops. Conditionals and loops do have a
+syntax, but they deal with almost arbitrary sequences of tokens.
+Figure~\ref{sycondloop} specifies conditionals in terms of
+\tdescr{balanced tokens} and loops in terms of \tdescr{loop text}, where
+\tdescr{balanced tokens} is any sequence of tokens balanced with respect
+to {\tt if} and {\tt fi}, and \tdescr{loop text} is a sequence of tokens
+balanced with respect to {\tt for}, {\tt forsuffixes}, {\tt forever},
+and {\tt endfor}.
+
+\begin{table}[htp]
+\caption{Internal variables with numeric values}
+$$\begin{tabular}{|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn1{|c}{Page}& \multicolumn1{|c|}{Explanation}\\
+\hline
+\hline
+\pl\tt ahangle& \pageref{Dahangle}&
+ angle for arrowheads in degrees (default: 45)\\\hline
+\pl\tt ahlength& \pageref{Dahlength}&
+ size of arrowheads (default: 4{\tt bp})\\\hline
+\pl\tt bboxmargin& \pageref{Dbbmargin}&
+ extra space allowed by {\tt bbox} (default 2{\tt bp})\\\hline
+\tt charcode& \pageref{Dcharcode}&
+ the number of the next character to be output\\\hline
+\bx\tt circmargin& \pageref{Dcmargin}&
+ clearance around contents of a circular or oval box\\\hline
+\tt day& --&
+ the current day of the month\\\hline
+\bx\tt defaultdx& \pageref{Ddefaultdx}&
+ usual horizontal space around box contents (default 3{\tt bp})\\\hline
+\bx\tt defaultdy& \pageref{Ddefaultdy}&
+ usual vertical space around box contents (default 3{\tt bp})\\\hline
+\pl\tt defaultpen& \pageref{Ddefaultpen}&
+ numeric index used by {\tt pickup} to select default pen\\\hline
+\pl\tt defaultscale& \pageref{Ddfscale}&
+ font scale factor for label strings (default 1)\\\hline
+\pl\tt labeloffset& \pageref{Dlaboff}&
+ offset distance for labels (default 3{\tt bp})\\\hline
+\tt linecap& \pageref{Dlinecap}&
+ 0 for butt, 1 for round, 2 for square\\\hline
+\tt linejoin& \pageref{Dlinejoin}&
+ 0 for mitered, 1 for round, 2 for beveled\\\hline
+\tt miterlimit& \pageref{Dmiterlim}&
+ controls miter length as in PostScript\\\hline
+\tt month& --&
+ the current month (e.g, 3 $\equiv$ March)\\\hline
+\tt pausing& --&
+ ${}>0$ to display lines on the terminal before they are read\\\hline
+\tt prologues& \pageref{Dprologs}&
+ ${}>0$ to output conforming PostScript using built-in fonts\\\hline
+\tt showstopping& --&
+ ${}>0$ to stop after each {\tt show} command\\\hline
+\tt time& --&
+ the number of minutes past midnight when this job started\\\hline
+\tt tracingcapsules& \pageref{Dtcapsules}&
+ ${}>0$ to show capsules too\\\hline
+\tt tracingchoices& \pageref{Dtchoices}&
+ ${}>0$ to show the control points chosen for paths\\\hline
+\tt tracingcommands& \pageref{Dtcommands}&
+ ${}>0$ to show commands and operations as they are performed\\\hline
+\tt tracingequations& \pageref{Dtequations}&
+ ${}>0$ to show each variable when it becomes known\\\hline
+\tt tracinglostchars& \pageref{Dtlostchars}&
+ ${}>0$ to show characters that aren't {\tt infont}\\\hline
+\tt tracingmacros& \pageref{Dtmacros}&
+ ${}>0$ to show macros before they are expanded\\\hline
+\tt tracingonline& \pageref{Dtonline}&
+ ${}>0$ to show long diagnostics on the terminal\\\hline
+\tt tracingoutput& \pageref{Dtoutput}&
+ ${}>0$ to show digitized edges as they are output\\\hline
+\tt tracingrestores& \pageref{Dtrestores}&
+ ${}>0$ to show when a variable or internal is restored\\\hline
+\tt tracingspecs& \pageref{Dtspecs}&
+ ${}>0$ to show path subdivision when using a polygonal a pen\\\hline
+\tt tracingstats& \pageref{Dtstats}&
+ ${}>0$ to show memory usage at end of job\\\hline
+\tt tracingtitles& --&
+ ${}>0$ to show titles online when they appear\\\hline
+\tt truecorners& \pageref{Dtruecorn}&
+ ${}>0$ to make {\tt llcorner} etc. ignore {\tt setbounds}\\\hline
+\tt warningcheck& \pageref{Dwarncheck}&
+ controls error message when variable value is large\\\hline
+\tt year& --&
+ the current year (e.g., 1992)\\\hline
+\end{tabular}
+$$
+\label{ivartab}%
+\index{day?\texttt{day}}\index{month?\texttt{month}}\index{pausing?\texttt{pausing}}\index{showstopping?\texttt{showstopping}}%
+\index{time?\texttt{time}}\index{tracingtitles?\texttt{tracingtitles}}\index{year?\texttt{year}}
+\end{table}
+
+\begin{table}[htp]
+\caption{Other Predefined Variables}
+$$\begin{tabular}{|l|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn1{|c}{Type}& \multicolumn1{|c}{Page}&
+ \multicolumn1{|c|}{Explanation}\\
+\hline
+\hline
+\pl\tt background& color& \pageref{Dbground}&
+ Color for {\tt unfill} and {\tt undraw} (usually white)\\\hline
+\pl\tt currentpen& pen& \pageref{Dcurpen}&
+ Last pen picked up (for use by the {\tt draw} command)\\\hline
+\pl\tt currentpicture& picture& \pageref{Dcurpic}&
+ Accumulate results of {\tt draw} and {\tt fill} commands\\\hline
+\pl\tt cuttings& path& \pageref{Dcuttings}&
+ subpath cut off by last {\tt cutbefore} or {\tt cutafter}\\\hline
+\pl\tt defaultfont& string& \pageref{Ddffont}&
+ Font used by label commands for typesetting strings\\\hline
+\pl\tt extra\_beginfig& string& \pageref{Dxbfig}&
+ Commands for {\tt beginfig} to scan\\\hline
+\pl\tt extra\_endfig& string& \pageref{Dxefig}&
+ Commands for {\tt endfig} to scan\\\hline
+\end{tabular}
+$$
+\label{pvartab}
+\end{table}
+
+\begin{table}[htp]
+\caption{Predefined Constants}
+$$\begin{tabular}{|l|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn1{|c}{Type}& \multicolumn1{|c}{Page}&
+ \multicolumn1{|c|}{Explanation}\\
+\hline
+\hline
+\pl\tt beveled& numeric& \pageref{Dbvled}&
+ {\tt linejoin} value for beveled joins [2]\\\hline
+\pl\tt black& color& \pageref{Dblack}&
+ Equivalent to {\tt (0,0,0)}\\\hline
+\pl\tt blue& color& \pageref{Dblue}&
+ Equivalent to {\tt (0,0,1)}\\\hline
+\pl\tt bp& numeric& \pageref{Dbp}&
+ One PostScript point in {\tt bp} units [1]\\\hline
+\pl\tt butt& numeric& \pageref{Dbutt}&
+ {\tt linecap} value for butt end caps [0]\\\hline
+\pl\tt cc& numeric& --&
+ One cicero in {\tt bp} units [12.79213]\\\hline
+\pl\tt cm& numeric& \pageref{Dcm}&
+ One centimeter in {\tt bp} units [28.34645]\\\hline
+\pl\tt dd& numeric& --&
+ One didot point in {\tt bp} units [1.06601]\\\hline
+\pl\tt ditto& string& --&
+ The {\tt "} character as a string of length 1\\\hline
+\pl\tt down& pair& \pageref{Ddown}&
+ Downward direction vector $(0,-1)$\\\hline
+\pl\tt epsilon& numeric& --&
+ Smallest positive MetaPost number [$1\over65536$]\\\hline
+\pl\tt evenly& picture& \pageref{Devenly}&
+ Dash pattern for equal length dashes\\\hline
+\tt false& boolean& \pageref{Dfalse}&
+ The boolean value {\it false\/}\\\hline
+\pl\tt fullcircle& path& \pageref{Dfcirc}&
+ Circle of diameter 1 centered on $(0,0)$\\\hline
+\pl\tt green& color& \pageref{Dgreen}&
+ Equivalent to {\tt (0,1,0)}\\\hline
+\pl\tt halfcircle& path& \pageref{Dhcirc}&
+ Upper half of a circle of diameter 1\\\hline
+\pl\tt identity& transform& \pageref{Dident}&
+ Identity transformation\\\hline
+\pl\tt in& numeric& \pageref{Din}&
+ One inch in {\tt bp} units [72]\\\hline
+\pl\tt infinity& numeric& \pageref{Dinf}&
+ Large positive value [4095.99998]\\\hline
+\pl\tt left& pair& \pageref{Dleft}&
+ Leftward direction $(-1,0)$\\\hline
+\pl\tt mitered& numeric& \pageref{Dmitred}&
+ {\tt linejoin} value for mitered joins [0]\\\hline
+\pl\tt mm& numeric& \pageref{Dmm}&
+ One millimeter in {\tt bp} units [2.83464]\\\hline
+\tt nullpicture& picture& \pageref{Dnlpic}&
+ Empty picture\\\hline
+\pl\tt origin& pair& --&
+ The pair $(0,0)$\\\hline
+\pl\tt pc& numeric& --&
+ One pica in {\tt bp} units [11.95517]\\\hline
+\tt pencircle& pen& \pageref{Dpncirc}&
+ Circular pen of diameter 1\\\hline
+\pl\tt pensquare& pen& \pageref{Dpnsqr}&
+ square pen of height 1 and width 1\\\hline
+\pl\tt pt& numeric& \pageref{Dpt}&
+ One printer's point in {\tt bp} units [0.99626]\\\hline
+\pl\tt quartercircle& path& --&
+ First quadrant of a circle of diameter 1\\\hline
+\pl\tt red& color& \pageref{Dred}&
+ Equivalent to {\tt (1,0,0)}\\\hline
+\pl\tt right& pair& \pageref{Dright}&
+ Rightward direction $(1,0)$\\\hline
+\pl\tt rounded& numeric& \pageref{Drnded}&
+ {\tt linecap} and {\tt linejoin} value for round joins\\
+\tt & & &
+ and end caps [1]\\\hline
+\pl\tt squared& numeric& \pageref{Dsqred}&
+ {\tt linecap} value for square end caps [2]\\\hline
+\tt true& boolean& \pageref{Dtrue}&
+ The boolean value {\tt true}\\\hline
+\pl\tt unitsquare& path& --&
+ The path {\tt (0,0)--(1,0)--(1,1)--(0,1)--cycle}\\\hline
+\pl\tt up& pair& \pageref{Dup}&
+ Upward direction $(0,1)$\\\hline
+\pl\tt white& color& \pageref{Dwhite}&
+ Equivalent to {\tt (1,1,1)}\\\hline
+\pl\tt withdots& picture& \pageref{Dwdots}&
+ Dash pattern that produces dotted lines\\\hline
+\end{tabular}
+$$
+\label{consttab}%
+\index{cc?\texttt{cc}}\index{dd?\texttt{dd}}\index{ditto?\texttt{ditto}}\index{epsilon?\texttt{epsilon}}%
+\index{origin?\texttt{origin}}\index{pc?\texttt{pc}}\index{quartercircle?\texttt{quartercircle}}%
+\index{unitsquare?\texttt{unitsquare}}
+\end{table}
+
+\begin{table}[htp]
+\caption{Operators (Part 1)}
+$$\begin{tabular}{|l|l|l|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn3{|c}{Argument/result types}&
+ \multicolumn1{|c}{Page}& \multicolumn1{|c|}{Explanation}\\
+\cline{2-4}
+& Left& Right& Result& & \\
+\hline
+\hline
+\tt \verb|&|& string& string& string& \pageref{Damp}&
+ Concatenation---works for paths $l\hbox{\tt\&}r$ if\\
+& path& path& path& &
+ $r$ starts exactly where the $l$ ends\\\hline
+\tt \verb|*|& numeric& color& color& \pageref{Dmldiv}&
+ Multiplication\\
+& & numeric& numeric& &
+ \\
+& & pair& pair& &
+ \\\hline
+\tt \verb|*|& color& numeric& color& \pageref{Dmldiv}&
+ Multiplication\\
+& numeric& & numeric& &
+ \\
+& pair& & pair& &
+ \\\hline
+\tt \verb|**|& numeric& numeric& numeric& \pageref{Dpow}&
+ Exponentiation\\\hline
+\tt \verb|+|& color& color& color& \pageref{Dadd}&
+ Addition\\
+& numeric& numeric& numeric& &
+ \\
+& pair& pair& pair& &
+ \\\hline
+\tt \verb|++|& numeric& numeric& numeric& \pageref{Dpyadd}&
+ Pythagorean addition $\sqrt{l^2+r^2}$\\\hline
+\tt \verb|+-+|& numeric& numeric& numeric& \pageref{Dpysub}&
+ Pythagorean subtraction $\sqrt{l^2-r^2}$\\\hline
+\tt \verb|-|& color& color& color& \pageref{Dadd}&
+ Subtraction\\
+& numeric& numeric& numeric& &
+ \\
+& pair& pair& pair& &
+ \\\hline
+\tt \verb|-|& --& color& color& \pageref{Dneg}&
+ Negation\\
+& & numeric& numeric& &
+ \\
+& & pair& pair& &
+ \\\hline
+\tt \verb|/|& color& numeric& color& \pageref{Dmldiv}&
+ Division\\
+& numeric& & numeric& &
+ \\
+& pair& & pair& &
+ \\\hline
+\tt \verb|< = >|& string& string& boolean& \pageref{Dcmpar}&
+ Comparison operators\\
+\tt \verb|<= >=|& numeric& numeric& & &
+ \\
+\tt \verb|<>|& pair& pair& & &
+ \\
+& color& color& & &
+ \\
+& transform& transform& & &
+ \\\hline
+\pl\tt \verb|abs|& --& numeric& numeric& \pageref{Dabs}&
+ Absolute value\\
+& & pair& & &
+ \\\hline
+\tt \verb|and|& boolean& boolean& boolean& \pageref{Dand}&
+ Logical and\\\hline
+\tt \verb|angle|& --& pair& numeric& \pageref{Dangle}&
+ 2$-$argument arctangent (in degrees)\\\hline
+\tt \verb|arclength|& --& path& numeric& \pageref{Darclng}&
+ Arc length of a path\\\hline
+\tt \verb|arctime|& numeric& path& numeric& \pageref{Darctim}&
+ Time on a path where arclength from\\
+\tt \verb|of|& & & & &
+ the start reaches a given value\\\hline
+\tt \verb|ASCII|& --& string& numeric& --&
+ ASCII value of first character in string\\\hline
+\pl\tt \verb|bbox|& --& picture& path& \pageref{Dbbox}&
+ A rectangular path for the bounding\\
+& & path& & &
+ box\\
+& & pen& & &
+ \\\hline
+\tt \verb|bluepart|& --& color& numeric& \pageref{Drgbprt}&
+ Extracts the third component\\\hline
+\tt \verb|boolean|& --& any& boolean& \pageref{Dboolop}&
+ Is the expression of type boolean?\\\hline
+\tt \verb|bot|& --& numeric& numeric& \pageref{Dbot}&
+ Bottom of current pen when centered\\
+& & pair& pair& &
+ at the given coordinate(s)\\\hline
+\pl\tt \verb|ceiling|& --& numeric& numeric& \pageref{Dceil}&
+ Least integer greater than or equal to\\\hline
+\pl\tt \verb|center|& --& picture& pair& \pageref{Dcenter}&
+ Center of the bounding box\\
+& & path& & &
+ \\
+& & pen& & &
+ \\\hline
+\end{tabular}
+$$
+\index{ASCII?\texttt{ASCII}}%
+\label{optabA}
+\end{table}
+
+\begin{table}[htp]
+\caption{Operators (Part 2)}
+$$\begin{tabular}{|l|l|l|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn3{|c}{Argument/result types}&
+ \multicolumn1{|c}{Page}& \multicolumn1{|c|}{Explanation}\\
+\cline{2-4}
+& Left& Right& Result& & \\
+\hline
+\hline
+\tt \verb|char|& --& numeric& string& \pageref{Dchar}&
+ Character with a given ASCII code\\\hline
+\tt \verb|color|& --& any& boolean& \pageref{Dcolrop}&
+ Is the expression of type color?\\\hline
+\tt \verb|cosd|& --& numeric& numeric& \pageref{Dcosd}&
+ Cosine of angle in degrees\\\hline
+\pl\tt \verb|cutafter|& path& path& path& \pageref{Dcuta}&
+ Left argument with part after the\\
+& & & & &
+ intersection dropped\\\hline
+\pl\tt \verb|cutbefore|& path& path& path& \pageref{Dcutb}&
+ Left argument with part before the\\
+& & & & &
+ intersection dropped\\\hline
+\tt \verb|cycle|& --& path& boolean& \pageref{Dcycop}&
+ Determines whether a path is cyclic\\\hline
+\tt \verb|decimal|& --& numeric& string& \pageref{Ddecop}&
+ The decimal representation\\\hline
+\pl\tt \verb|dir|& --& numeric& pair& \pageref{Ddirop}&
+ $(\cos\theta,\sin\theta)$ given $\theta$ in degrees\\\hline
+\pl\tt \verb|direction|& numeric& path& pair& \pageref{Ddirof}&
+ The direction of a path at a given\\
+\tt \verb| of|& & & & &
+ `time'\\\hline
+\pl\tt \verb|direction-|& pair& path& numeric& \pageref{Ddpntof}&
+ Point where a path has a given\\
+\tt \verb|point of|& & & & &
+ direction\\\hline
+\tt \verb|direction-|& pair& path& numeric& \pageref{Ddtimof}&
+ `Time' when a path has a given\\
+\tt \verb|time of|& & & & &
+ direction\\\hline
+\pl\tt \verb|div|& numeric& numeric& numeric& --&
+ Integer division $\lfloor l/r\rfloor$\\\hline
+\pl\tt \verb|dotprod|& pair& pair& numeric& \pageref{Ddprod}&
+ vector dot product\\\hline
+\tt \verb|floor|& --& numeric& numeric& \pageref{Dfloor}&
+ Greatest integer less than or equal to\\\hline
+\tt \verb|fontsize|& --& string& numeric& \pageref{Dfntsiz}&
+ The point size of a font\\\hline
+\tt \verb|greenpart|& --& color& numeric& \pageref{Drgbprt}&
+ Extract the second component\\\hline
+\tt \verb|hex|& --& string& numeric& --&
+ Interpret as a hexadecimal number\\\hline
+\tt \verb|infont|& string& string& picture& \pageref{Sinfont}&
+ Typeset string in given font\\\hline
+\pl\tt \verb|intersec-|& path& path& pair& \pageref{Disecpt}&
+ An intersection point\\
+\tt \verb| tionpoint|& & & & &
+ \\\hline
+\tt \verb|intersec-|& path& path& pair& \pageref{Disectt}&
+ Times ($t_l,t_r)$ on paths $l$ and $r$\\
+\tt \verb|tiontimes|& & & & &
+ when the paths intersect\\\hline
+\pl\tt \verb|inverse|& --& transform& transform& \pageref{Dinv}&
+ Invert a transformation\\\hline
+\tt \verb|known|& --& any& boolean& \pageref{Dknown}&
+ Does argument have a known value?\\\hline
+\tt \verb|length|& --& path& numeric& \pageref{Dlength}&
+ Number of arcs in a path\\\hline
+\pl\tt \verb|lft|& --& numeric& numeric& \pageref{Dlft}&
+ Left side of current pen when its\\
+& & pair& pair& &
+ center is at the given coordinate(s)\\\hline
+\tt \verb|llcorner|& --& picture& pair& \pageref{Dcornop}&
+ Lower-left corner of bounding box\\
+& & path& & &
+ \\
+& & pen& & &
+ \\\hline
+\tt \verb|lrcorner|& --& picture& pair& \pageref{Dcornop}&
+ Lower-left corner of bounding box\\
+& & path& & &
+ \\
+& & pen& & &
+ \\\hline
+\tt \verb|makepath|& --& pen& path& \pageref{Dmkpath}&
+ Cyclic path bounding the pen shape\\\hline
+\tt \verb|makepen|& --& path& pen& \pageref{Dmkpen}&
+ A polygonal pen made from the\\
+& & & & &
+ convex hull of the path knots\\\hline
+\tt \verb|mexp|& --& numeric& numeric& --&
+ The function $\exp(x/256)$\\\hline
+\tt \verb|mlog|& --& numeric& numeric& --&
+ The function $256\ln(x)$\\\hline
+\pl\tt \verb|mod|& --& numeric& numeric& --&
+ The remainder function $l-r\lfloor l/r\rfloor$\\\hline
+\tt \verb|normal-|& --& --& numeric& --&
+ Choose a random number with\\
+\tt \verb|deviate|& & & & &
+ mean 0 and standard deviation 1\\\hline
+\end{tabular}
+$$
+\index{div?\texttt{div}}\index{hex?\texttt{hex}}\index{mexp?\texttt{mexp}}\index{mlog?\texttt{mlog}}%
+\index{mod?\texttt{mod}}\index{normaldeviate?\texttt{normaldeviate}}%
+\label{optabB}
+\end{table}
+
+\begin{table}[htp]
+\caption{Operators (Part 3)}
+$$\begin{tabular}{|l|l|l|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn3{|c}{Argument/result types}&
+ \multicolumn1{|c}{Page}& \multicolumn1{|c|}{Explanation}\\
+\cline{2-4}
+& Left& Right& Result& & \\
+\hline
+\hline
+\tt \verb|not|& --& boolean& boolean& \pageref{Dnot}&
+ Logical negation\\\hline
+\tt \verb|numeric|& --& any& boolean& \pageref{Dnumop}&
+ Is the expression of type numeric?\\\hline
+\tt \verb|oct|& --& string& numeric& --&
+ Interpret a string as an octal number\\\hline
+\tt \verb|odd|& --& numeric& boolean& --&
+ Is the closest integer odd or even?\\\hline
+\tt \verb|or|& boolean& boolean& boolean& \pageref{Dor}&
+ Logical inclusive or\\\hline
+\tt \verb|pair|& --& any& boolean& \pageref{Dpairop}&
+ Is the expression of type pair?\\\hline
+\tt \verb|path|& --& any& boolean& \pageref{Dpathop}&
+ Is the expression of type path?\\\hline
+\tt \verb|pen|& --& any& boolean& \pageref{Dpenop}&
+ Is the expression of type pen?\\\hline
+\tt \verb|penoffset|& pair& pen& pair& --&
+ Point on the pen furthest to the\\
+\tt \verb|of|& & & & &
+ right of the given direction\\\hline
+\tt \verb|picture|& --& any& boolean& \pageref{Dpictop}&
+ Is the expression of type picture?\\\hline
+\tt \verb|point of|& numeric& path& pair& \pageref{Dpntof}&
+ Point on a path given a time value\\\hline
+\tt \verb|postcontrol|& numeric& path& pair& --&
+ First B\'ezier control point on path\\
+\tt \verb|of|& & & & &
+ segment starting at the given time\\\hline
+\tt \verb|precontrol|& numeric& path& pair& --&
+ Last B\'ezier control point on path\\
+\tt \verb|of|& & & & &
+ segment ending at the given time\\\hline
+\tt \verb|redpart|& --& color& numeric& \pageref{Drgbprt}&
+ Extract the first component\\\hline
+\tt \verb|reverse|& --& path& path& \pageref{Drevrse}&
+ `time'-reversed path with beginning\\
+& & & & &
+ swapped with ending\\\hline
+\tt \verb|rotated|& picture& numeric& picture& \pageref{Dtranop}&
+ Rotate counterclockwise a given\\
+& path& & path& &
+ number of degrees\\
+& pair& & pair& &
+ \\
+& pen& & pen& &
+ \\
+& transform& & transform& &
+ \\\hline
+\pl\tt \verb|round|& --& numeric& numeric& \pageref{Dround}&
+ round each component to the nearest\\
+& & pair& pair& &
+ integer\\\hline
+\pl\tt \verb|rt|& --& numeric& numeric& \pageref{Drt}&
+ Right side of current pen when\\
+& & pair& pair& &
+ centered at given coordinate(s)\\\hline
+\tt \verb|scaled|& picture& numeric& picture& \pageref{Dtranop}&
+ Scale all coordinates by the given\\
+& path& & path& &
+ amount\\
+& pair& & pair& &
+ \\
+& pen& & pen& &
+ \\
+& transform& & transform& &
+ \\\hline
+\tt \verb|shifted|& picture& pair& picture& \pageref{Dtranop}&
+ Add the given shift amount to each\\
+& path& & path& &
+ pair of coordinates\\
+& pair& & pair& &
+ \\
+& pen& & pen& &
+ \\
+& transform& & transform& &
+ \\\hline
+\tt \verb|sind|& --& numeric& numeric& \pageref{Dsind}&
+ Sine of an angle in degrees\\\hline
+\tt \verb|slanted|& picture& numeric& picture& \pageref{Dtranop}&
+ Apply the slanting transformation\\
+& path& & path& &
+ that maps $(x,y)$ into $(x+sy,y)$,\\
+& pair& & pair& &
+ where $s$ is the numeric argument\\
+& pen& & pen& &
+ \\
+& transform& & transform& &
+ \\\hline
+\tt \verb|sqrt|& --& numeric& numeric& \pageref{Dsqrt}&
+ Square root\\\hline
+\tt \verb|str|& --& suffix& string& \pageref{Dstr}&
+ String representation for a suffix\\\hline
+\end{tabular}
+$$
+\index{oct?\texttt{oct}}\index{odd?\texttt{odd}}\index{penoffset?\texttt{penoffset}}\index{postcontrol?\texttt{postcontrol}}%
+\index{precontrol?\texttt{precontrol}}%
+\label{optabC}
+\end{table}
+
+\begin{table}[htp]
+\caption{Operators (Part 4)}
+$$\begin{tabular}{|l|l|l|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn3{|c}{Argument/result types}&
+ \multicolumn1{|c}{Page}& \multicolumn1{|c|}{Explanation}\\
+\cline{2-4}
+& Left& Right& Result& & \\
+\hline
+\hline
+\tt \verb|string|& --& any& boolean& \pageref{Dstrgop}&
+ Is the expression of type string?\\\hline
+\tt \verb|subpath|& pair& path& path& \pageref{Dsubpth}&
+ Portion of a path for given range\\
+\tt \verb|of|& & & & &
+ of time values\\\hline
+\tt \verb|substring|& pair& string& string& \pageref{Dsubstr}&
+ Substring bounded by given indices\\
+\tt \verb|of|& & & & &
+ \\\hline
+\pl\tt \verb|top|& --& numeric& numeric& \pageref{Dtop}&
+ Top of current pen when centered\\
+& & pair& pair& &
+ at the given coordinate(s)\\\hline
+\tt \verb|transform|& --& any& boolean& \pageref{Dtrnfop}&
+ Is the argument of type transform?\\\hline
+\tt \verb|transformed|& picture& transform& picture& \pageref{Dtrfrmd}&
+ Apply the given transform to all\\
+& path& & path& &
+ coordinates\\
+& pair& & pair& &
+ \\
+& pen& & pen& &
+ \\
+& transform& & transform& &
+ \\\hline
+\tt \verb|ulcorner|& --& picture& pair& \pageref{Dcornop}&
+ Upper-left corner of bounding box\\
+& & path& & &
+ \\
+& & pen& & &
+ \\\hline
+\tt \verb|uniform-|& --& numeric& numeric& --&
+ Random number between zero and\\
+\tt \verb|deviate|& & & & &
+ the value of the argument\\\hline
+\pl\tt \verb|unitvector|& --& pair& pair& \pageref{Duvec}&
+ Rescale a vector so its length is 1\\\hline
+\tt \verb|unknown|& --& any& boolean& \pageref{Dunknwn}&
+ Is the value unknown?\\\hline
+\tt \verb|urcorner|& --& picture& pair& \pageref{Dcornop}&
+ Upper-left corner of bounding box\\
+& & path& & &
+ \\
+& & pen& & &
+ \\\hline
+\pl\tt \verb|whatever|& --& --& numeric& \pageref{Dwhatev}&
+ Create a new anonymous unknown\\\hline
+\tt \verb|xpart|& --& pair& number& \pageref{Dxprt}&
+ $x$ or $t_x$ component\\
+& & transform& & &
+ \\\hline
+\tt \verb|xscaled|& picture& numeric& picture& \pageref{Dtranop}&
+ Scale all $x$ coordinates by the\\
+& path& & path& &
+ given amount\\
+& pair& & pair& &
+ \\
+& pen& & pen& &
+ \\
+& transform& & transform& &
+ \\\hline
+\tt \verb|xxpart|& --& transform& number& \pageref{Dtrprt}&
+ $t_{xx}$ entry in transformation matrix\\\hline
+\tt \verb|xypart|& --& transform& number& \pageref{Dtrprt}&
+ $t_{xy}$ entry in transformation matrix\\\hline
+\tt \verb|ypart|& --& pair& number& \pageref{Dyprt}&
+ $y$ or $t_y$ component\\
+& & transform& & &
+ \\\hline
+\tt \verb|yscaled|& picture& numeric& picture& \pageref{Dtranop}&
+ Scale all $y$ coordinates by the\\
+& path& & path& &
+ given amount\\
+& pair& & pair& &
+ \\
+& pen& & pen& &
+ \\
+& transform& & transform& &
+ \\\hline
+\tt \verb|yxpart|& --& transform& number& \pageref{Dtrprt}&
+ $t_{yx}$ entry in transformation matrix\\\hline
+\tt \verb|yypart|& --& transform& number& \pageref{Dtrprt}&
+ $t_{yy}$ entry in transformation matrix\\\hline
+\tt \verb|zscaled|& picture& pair& picture& \pageref{Dtranop}&
+ Rotate and scale all coordinates so\\
+& path& & path& &
+ that $(1,0)$ is mapped into the\\
+& pair& & pair& &
+ given pair; i.e., do complex\\
+& pen& & pen& &
+ multiplication.\\
+& transform& & transform& &
+ \\\hline
+\end{tabular}
+$$
+\index{uniformdeviate?\texttt{uniformdeviate}}%
+\label{optabD}
+\end{table}
+
+\begin{table}[htp]
+\caption{Commands}
+$$\begin{tabular}{|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn1{|c}{Page}& \multicolumn1{|c|}{Explanation}\\
+\hline
+\hline
+\tt \verb|addto|& \pageref{sydraw}&
+ Low-level command for drawing and filling\\\hline
+\tt \verb|clip|& \pageref{Dclip}&
+ Applies a clipping path to a picture\\\hline
+\pl\tt \verb|cutdraw|& \pageref{Dctdraw}&
+ Draw with butt end caps\\\hline
+\pl\tt \verb|draw|& \pageref{curves}&
+ Draw a line or a picture\\\hline
+\pl\tt \verb|drawarrow|& \pageref{Ddrwarr}&
+ Draw a line with an arrowhead at the end\\\hline
+\pl\tt \verb|drawdblarrow|& \pageref{Ddrwdar}&
+ Draw a line with arrowheads at both ends\\\hline
+\pl\tt \verb|fill|& \pageref{Dfill}&
+ Fill inside a cyclic path\\\hline
+\pl\tt \verb|filldraw|& \pageref{Dfildrw}&
+ Draw a cyclic path and fill inside it\\\hline
+\tt \verb|interim|& \pageref{Dinterm}&
+ Make a local change to an internal variable\\\hline
+\tt \verb|let|& --&
+ Assign one symbolic token the meaning of another\\\hline
+\pl\tt \verb|loggingall|& \pageref{Dlogall}&
+ Turn on all tracing (log file only)\\\hline
+\tt \verb|newinternal|& \pageref{Dnewint}&
+ Declare new internal variables\\\hline
+\pl\tt \verb|pickup|& \pageref{Dpickup}&
+ Specify new pen for line drawing\\\hline
+\tt \verb|save|& \pageref{Dsave}&
+ Make variables local\\\hline
+\tt \verb|setbounds|& \pageref{Dsetbnd}&
+ Make a picture lie about its bounding box\\\hline
+\tt \verb|shipout|& \pageref{Dship}&
+ Low-level command to output a figure\\\hline
+\tt \verb|show|& \pageref{Dshow}&
+ print out expressions symbolically\\\hline
+\tt \verb|showdependencies|& \pageref{Dshdep}&
+ print out all unsolved equations\\\hline
+\tt \verb|showtoken|& \pageref{Dshtok}&
+ print an explanation of what a token is\\\hline
+\tt \verb|showvariable|& \pageref{Dshvar}&
+ print variables symbolically\\\hline
+\tt \verb|special|& \pageref{Dspecl}&
+ print a string directly in the PostScript output file\\\hline
+\pl\tt \verb|tracingall|& \pageref{Dtall}&
+ Turn on all tracing\\\hline
+\pl\tt \verb|tracingnone|& \pageref{Dtnone}&
+ Turn off all tracing\\\hline
+\pl\tt \verb|undraw|& \pageref{Dundraw}&
+ Erase a line or a picture\\\hline
+\pl\tt \verb|unfill|& \pageref{Dunfill}&
+ Erase inside a cyclic path\\\hline
+\pl\tt \verb|unfilldraw|& \pageref{Dunfdrw}&
+ Erase a cyclic path and its inside\\\hline
+\end{tabular}
+$$
+\index{let?\texttt{let}}%
+\label{cmdtab}
+\end{table}
+
+\begin{table}[htp]
+\caption{Function-Like Macros}
+$$\begin{tabular}{|l|l|l|r|l|}
+\hline
+\multicolumn1{|c}{Name}& \multicolumn1{|c}{Arguments}&
+ \multicolumn1{|c}{Result}& \multicolumn1{|c}{Page}&
+ \multicolumn1{|c|}{Explanation}\\
+\hline
+\hline
+\bx\tt \verb|boxit|& suffix, picture& --& \pageref{Dboxit}&
+ Define a box containing the picture\\\hline
+\bx\tt \verb|boxit|& suffix, string& --& \pageref{Dsboxit}&
+ Define a box containing text\\\hline
+\bx\tt \verb|boxit|& suffix, \tdescr{empty}& --& \pageref{Deboxit}&
+ Define an empty box\\\hline
+\bx\tt \verb|boxjoin|& equations& --& \pageref{Dbxjoin}&
+ Give equations for connecting boxes\\\hline
+\bx\tt \verb|bpath|& suffix& path& \pageref{Dbpath}&
+ A box's bounding circle or rectangle\\\hline
+\pl\tt \verb|buildcycle|& list of paths& path& \pageref{buildcy}&
+ Build a cyclic path\\\hline
+\bx\tt \verb|circleit|& suffix, picture& --& \pageref{Dcircit}&
+ Put picture in a circular box\\\hline
+\bx\tt \verb|circleit|& suffix, picture& --& \pageref{Dcircit}&
+ Put a string in a circular box\\\hline
+\bx\tt \verb|circleit|& suffix, \tdescr{empty}& --& \pageref{Dcircit}&
+ Define an empty circular box\\\hline
+\pl\tt \verb|dashpattern|& on/off distances& picture& \pageref{Ddshpat}&
+ Create a pattern for dashed lines\\\hline
+\pl\tt \verb|decr|& numeric variable& numeric& \pageref{Dincr}&
+ Decrement and return new value\\\hline
+\pl\tt \verb|dotlabel|& suffix, picture, pair& --& \pageref{Ddotlab}&
+ Mark point and draw picture nearby\\\hline
+\pl\tt \verb|dotlabel|& suffix, string, pair& --& \pageref{Ddotlab}&
+ Mark point and place text nearby\\\hline
+\pl\tt \verb|dotlabels|& suffix, point numbers& --& \pageref{Ddotlbs}&
+ Mark {\tt z} points with their numbers\\\hline
+\bx\tt \verb|drawboxed|& list of suffixes& --& \pageref{Ddrbxed}&
+ Draw the named boxes and their\\
+& & & &
+ contents\\\hline
+\bx\tt \verb|drawboxes|& list of suffixes& --& \pageref{Ddrbxes}&
+ Draw the named boxes\\\hline
+\pl\tt \verb|drawoptions|& drawing options& --& \pageref{Ddropts}&
+ Set options for drawing commands\\\hline
+\bx\tt \verb|drawunboxed|& list of suffixes& --& \pageref{Ddrunbx}&
+ Draw contents of named boxes\\\hline
+\bx\tt \verb|fixpos|& list of suffixes& --& \pageref{Dfixpos}&
+ Solve for the size and position of the\\
+& & & &
+ named boxes\\\hline
+\bx\tt \verb|fixsize|& list of suffixes& --& \pageref{Dfixsiz}&
+ Solve for size of named boxes\\\hline
+\pl\tt \verb|incr|& numeric variable& numeric& \pageref{Dincr}&
+ Increment and return new value\\\hline
+\pl\tt \verb|label|& suffix, picture, pair& --& \pageref{Dlabel}&
+ Draw picture near given point\\\hline
+\pl\tt \verb|label|& suffix, string, pair& --& \pageref{Dlabel}&
+ Place text near given point\\\hline
+\pl\tt \verb|labels|& suffix, point numbers& --& \pageref{Dlabels}&
+ Draw {\tt z} point numbers; no dots\\\hline
+\pl\tt \verb|max|& list of numerics& numeric& --&
+ Find the maximum\\\hline
+\pl\tt \verb|max|& list of strings& string& --&
+ Find the lexicographically last string\\\hline
+\pl\tt \verb|min|& list of numerics& numeric& --&
+ Find the minimum\\\hline
+\pl\tt \verb|min|& list of strings& string& --&
+ Find the lexicographically first string\\\hline
+\bx\tt \verb|pic|& suffix& picture& \pageref{Dpic}&
+ Box contents shifted into position\\\hline
+\pl\tt \verb|thelabel|& suffix, picture, pair& picture& \pageref{Dthelab}&
+ Picture shifted as if to label a point\\\hline
+\pl\tt \verb|thelabel|& suffix, string, pair& picture& \pageref{Dthelab}&
+ text positioned as if to label a point\\\hline
+\pl\tt \verb|z|& suffix& pair& \pageref{Dzconv}&
+ The pair ${\tt x}\descr{suffix},{\tt y}\descr{suffix})$\\\hline
+\end{tabular}
+$$
+\index{min?\texttt{min}}\index{max?\texttt{max}}%
+\label{pseudotab}
+\end{table}
+
+\clearpage
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{atom} \rightarrow \descr{variable} \;|\; \descr{argument}$\\
+$\tt \qquad \;|\; \descr{number or fraction}$\\
+$\tt \qquad \;|\; \descr{internal variable}$\\
+$\tt \qquad \;|\; \hbox{\tt (}\descr{expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; begingroup \descr{statement list} \descr{expression} endgroup$\\
+$\tt \qquad \;|\; \descr{nullary op}$\\
+$\tt \qquad \;|\; btex \descr{typesetting commands} etex$\\
+$\tt \qquad \;|\; \descr{pseudo function}$\\
+$\tt \descr{primary} \rightarrow \descr{atom}$\\
+$\tt \qquad \;|\; \hbox{\tt (}\descr{numeric expression}\hbox{\tt ,} \descr{numeric expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; \hbox{\tt (}\descr{numeric expression}\hbox{\tt ,} \descr{numeric expression}\hbox{\tt ,} \descr{numeric expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; \descr{of operator} \descr{expression} of \descr{primary}$\\
+$\tt \qquad \;|\; \descr{unary op} \descr{primary}$\\
+$\tt \qquad \;|\; str \descr{suffix}$\\
+$\tt \qquad \;|\; z \descr{suffix}$\\
+$\tt \qquad \;|\; \descr{numeric atom}\hbox{\tt [}\descr{expression}\hbox{\tt ,}\descr{expression}\hbox{\tt ]}$\\
+$\tt \qquad \;|\; \descr{scalar multiplication op} \descr{primary}$\\
+$\tt \descr{secondary} \rightarrow \descr{primary}$\\
+$\tt \qquad \;|\; \descr{secondary} \descr{primary binop} \descr{primary}$\\
+$\tt \qquad \;|\; \descr{secondary} \descr{transformer}$\\
+$\tt \descr{tertiary} \rightarrow \descr{secondary}$\\
+$\tt \qquad \;|\; \descr{tertiary} \descr{secondary binop} \descr{secondary}$\\
+$\tt \descr{subexpression} \rightarrow \descr{tertiary}$\\
+$\tt \qquad \;|\; \descr{path expression} \descr{path join} \descr{path knot}$\\
+$\tt \descr{expression} \rightarrow \descr{subexpression}$\\
+$\tt \qquad \;|\; \descr{expression} \descr{tertiary binop} \descr{tertiary}$\\
+$\tt \qquad \;|\; \descr{path subexpression} \descr{direction specifier}$\\
+$\tt \qquad \;|\; \descr{path subexpression} \descr{path join} cycle$\\
+$\tt $\\
+$\tt \descr{path knot} \rightarrow \descr{tertiary}$\\
+$\tt \descr{path join} \rightarrow --$\\
+$\tt \qquad \;|\; \descr{direction specifier} \descr{basic path join} \descr{direction specifier}$\\
+$\tt \descr{direction specifier} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; \char`\{curl \descr{numeric expression}\char`\}$\\
+$\tt \qquad \;|\; \char`\{\descr{pair expression}\char`\}$\\
+$\tt \qquad \;|\; \char`\{\descr{numeric expression}\hbox{\tt ,}\descr{numeric expression}\char`\}$\\
+$\tt \descr{basic path join} \rightarrow \hbox{\tt ..} \;|\; \hbox{\tt ...} \;|\; \hbox{\tt ..}\descr{tension}\hbox{\tt ..} \;|\; \hbox{\tt ..}\descr{controls}\hbox{\tt ..}$\\
+$\tt \descr{tension} \rightarrow tension \descr{numeric primary}$\\
+$\tt \qquad \;|\; tension \descr{numeric primary} and \descr{numeric primary}$\\
+$\tt \descr{controls} \rightarrow controls \descr{pair primary}$\\
+$\tt \qquad \;|\; controls \descr{pair primary} and \descr{pair primary}$\\
+$\tt $\\
+$\tt \descr{argument} \rightarrow \descr{symbolic token}$\\
+$\tt \descr{number or fraction} \rightarrow \descr{number}\hbox{\tt /}\descr{number}$\\
+$\tt \qquad \;|\; \descr{number not followed by `\hbox{\tt /}\tdescr{number}'}$\\
+$\tt \descr{scalar multiplication op} \rightarrow + \;|\; -$\\
+$\tt \qquad \;|\; \descr{`\tdescr{number or fraction}' not followed by `\tdescr{add op}\tdescr{number}'}$
+\end{ctabbing}
+\caption{Part 1 of the syntax for expressions}
+\index{expression?\tdescr{expression}}\index{nullary op?\tdescr{nullary op}}\index{of operator?\tdescr{of operator}}%
+\index{path knot?\tdescr{path knot}}\index{primary?\tdescr{primary}}\index{primary binop?\tdescr{primary binop}}%
+\index{secondary?\tdescr{secondary}}\index{secondary binop?\tdescr{secondary binop}}\index{suffix?\tdescr{suffix}}%
+\index{tertiary?\tdescr{tertiary}}\index{tertiary binop?\tdescr{tertiary binop}}\index{unary op?\tdescr{unary op}}%
+\label{syexpr1}
+\end{figure}
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{transformer} \rightarrow rotated \descr{numeric primary}$\\
+$\tt \qquad \;|\; scaled \descr{numeric primary}$\\
+$\tt \qquad \;|\; shifted \descr{pair primary}$\\
+$\tt \qquad \;|\; slanted \descr{numeric primary}$\\
+$\tt \qquad \;|\; transformed \descr{transform primary}$\\
+$\tt \qquad \;|\; xscaled \descr{numeric primary}$\\
+$\tt \qquad \;|\; yscaled \descr{numeric primary}$\\
+$\tt \qquad \;|\; zscaled \descr{pair primary}$\\
+$\tt \qquad \;|\; reflectedabout\hbox{\tt (}\descr{pair expression}\hbox{\tt ,} \descr{pair expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; rotatedaround\hbox{\tt (}\descr{pair expression}\hbox{\tt ,} \descr{numeric expression}\hbox{\tt )}$\\
+$\tt $\\
+$\tt \descr{nullary op} \rightarrow false \;|\; normaldeviate \;|\; nullpicture \;|\; pencircle$\\
+$\tt \qquad \;|\; true \;|\; whatever$\\
+$\tt \descr{unary op} \rightarrow \descr{type}$\\
+$\tt \qquad \;|\; abs \;|\; angle \;|\; arclength \;|\; ASCII \;|\; bbox \;|\; bluepart \;|\; bot \;|\; ceiling$\\
+$\tt \qquad \;|\; center \;|\; char \;|\; cosd \;|\; cycle \;|\; decimal \;|\; dir \;|\; floor \;|\; fontsize$\\
+$\tt \qquad \;|\; greenpart \;|\; hex \;|\; inverse \;|\; known \;|\; length \;|\; lft \;|\; llcorner$\\
+$\tt \qquad \;|\; lrcorner\;|\; makepath \;|\; makepen \;|\; mexp \;|\; mlog \;|\; not \;|\; oct \;|\; odd$\\
+$\tt \qquad \;|\; redpart \;|\; reverse \;|\; round \;|\; rt \;|\; sind \;|\; sqrt \;|\; top \;|\; ulcorner$\\
+$\tt \qquad \;|\; uniformdeviate \;|\; unitvector \;|\; unknown \;|\; urcorner \;|\; xpart \;|\; xxpart$\\
+$\tt \qquad \;|\; xypart \;|\; ypart \;|\; yxpart \;|\; yypart$\\
+$\tt \descr{type} \rightarrow boolean \;|\; color \;|\; numeric \;|\; pair$\\
+$\tt \qquad \;|\; path \;|\; pen \;|\; picture \;|\; string \;|\; transform$\\
+$\tt \descr{primary binop} \rightarrow \hbox{\tt *} \;|\; \hbox{\tt /} \;|\; \hbox{\tt **} \;|\; and$\\
+$\tt \qquad \;|\; dotprod \;|\; div \;|\; infont \;|\; mod$\\
+$\tt \descr{secondary binop} \rightarrow + \;|\; - \;|\; ++ \;|\; +-+ \;|\; or$\\
+$\tt \qquad \;|\; intersectionpoint \;|\; intersectiontimes$\\
+$\tt \descr{tertiary binop} \rightarrow \hbox{\tt \&} \;|\; \hbox{\verb|<|} \;|\; \hbox{\verb|<=|} \;|\; \hbox{\verb|<>|} \;|\; \hbox{\tt =} \;|\; \hbox{\verb|>|} \;|\; \hbox{\verb|>=|}$\\
+$\tt \qquad \;|\; cutafter \;|\; cutbefore$\\
+$\tt \descr{of operator} \rightarrow arctime \;|\; direction \;|\; directiontime \;|\; directionpoint$\\
+$\tt \qquad \;|\; penoffset \;|\; point \;|\; postcontrol \;|\; precontrol \;|\; subpath$\\
+$\tt \qquad \;|\; substring$\\
+$\tt $\\
+$\tt \descr{variable} \rightarrow \descr{tag}\descr{suffix}$\\
+$\tt \descr{suffix} \rightarrow \descr{empty} \;|\; \descr{suffix}\descr{subscript} \;|\; \descr{suffix}\descr{tag}$\\
+$\tt \qquad \;|\; \descr{suffix parameter}$\\
+$\tt \descr{subscript} \rightarrow \descr{number} \;|\; \hbox{\tt [}\descr{numeric expression}\hbox{\tt ]}$\\
+$\tt $\\
+$\tt \descr{internal variable} \rightarrow ahangle \;|\; ahlength \;|\; bboxmargin$\\
+$\tt \qquad \;|\; charcode \;|\; day \;|\; defaultpen \;|\; defaultscale \;|\; labeloffset$\\
+$\tt \qquad \;|\; linecap \;|\; linejoin \;|\; miterlimit \;|\; month \;|\; pausing$\\
+$\tt \qquad \;|\; prologues \;|\; showstopping \;|\; time \;|\; tracingoutput$\\
+$\tt \qquad \;|\; tracingcapsules \;|\; tracingchoices \;|\; tracingcommands$\\
+$\tt \qquad \;|\; tracingequations \;|\; tracinglostchars \;|\; tracingmacros$\\
+$\tt \qquad \;|\; tracingonline \;|\; tracingrestores \;|\; tracingspecs$\\
+$\tt \qquad \;|\; tracingstats \;|\; tracingtitles \;|\; truecorners$\\
+$\tt \qquad \;|\; warningcheck \;|\; year$\\
+$\tt \qquad \;|\; \descr{symbolic token defined by {\tt newinternal}}$
+\end{ctabbing}
+\caption{Part 2 of the syntax for expressions}
+\index{nullary op?\tdescr{nullary op}}\index{of operator?\tdescr{of operator}}\index{primary binop?\tdescr{primary binop}}%
+\index{secondary binop?\tdescr{secondary binop}}\index{subscript?\tdescr{subscript}}\index{suffix?\tdescr{suffix}}%
+\index{tertiary binop?\tdescr{tertiary binop}}\index{unary op?\tdescr{unary op}}%
+\label{syexpr2}
+\end{figure}
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{pseudo function} \rightarrow min\hbox{\tt (}\descr{expression list}\hbox{\tt )}$\\
+$\tt \qquad \;|\; max\hbox{\tt (}\descr{expression list}\hbox{\tt )}$\\
+$\tt \qquad \;|\; incr\hbox{\tt (}\descr{numeric variable}\hbox{\tt )}$\\
+$\tt \qquad \;|\; decr\hbox{\tt (}\descr{numeric variable}\hbox{\tt )}$\\
+$\tt \qquad \;|\; dashpattern\hbox{\tt (}\descr{on\hbox{\tt /}off list}\hbox{\tt )}$\\
+$\tt \qquad \;|\; interpath\hbox{\tt (}\descr{numeric expression}\hbox{\tt ,} \descr{path expression}\hbox{\tt ,} \descr{path expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; buildcycle\hbox{\tt (}\descr{path expression list}\hbox{\tt )}$\\
+$\tt \qquad \;|\; thelabel\descr{label suffix}\hbox{\tt (}\descr{expression}\hbox{\tt ,} \descr{pair expression}\hbox{\tt )}$\\
+$\tt \descr{path expression list} \rightarrow \descr{path expression}$\\
+$\tt \qquad \;|\; \descr{path expression list}\hbox{\tt ,} \descr{path expression}$\\
+$\tt \descr{on\hbox{\tt /}off list} \rightarrow \descr{on\hbox{\tt /}off list}\descr{on\hbox{\tt /}off clause} \;|\; \descr{on\hbox{\tt /}off clause}$\\
+$\tt \descr{on\hbox{\tt /}off clause} \rightarrow on \descr{numeric tertiary} \;|\; off \descr{numeric tertiary}$
+\end{ctabbing}
+\caption{The syntax for function-like macros}
+\index{label suffix?\tdescr{label suffix}}%
+\label{sypseudo}
+\end{figure}
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{boolean expression} \rightarrow \descr{expression}$\\
+$\tt \descr{color expression} \rightarrow \descr{expression}$\\
+$\tt \descr{numeric atom} \rightarrow \descr{atom}$\\
+$\tt \descr{numeric expression} \rightarrow \descr{expression}$\\
+$\tt \descr{numeric primary} \rightarrow \descr{primary}$\\
+$\tt \descr{numeric tertiary} \rightarrow \descr{tertiary}$\\
+$\tt \descr{numeric variable} \rightarrow \descr{variable} \;|\; \descr{internal variable}$\\
+$\tt \descr{pair expression} \rightarrow \descr{expression}$\\
+$\tt \descr{pair primary} \rightarrow \descr{primary}$\\
+$\tt \descr{path expression} \rightarrow \descr{expression}$\\
+$\tt \descr{path subexpression} \rightarrow \descr{subexpression}$\\
+$\tt \descr{pen expression} \rightarrow \descr{expression}$\\
+$\tt \descr{picture expression} \rightarrow \descr{expression}$\\
+$\tt \descr{picture variable} \rightarrow \descr{variable}$\\
+$\tt \descr{string expression} \rightarrow \descr{expression}$\\
+$\tt \descr{suffix parameter} \rightarrow \descr{parameter}$\\
+$\tt \descr{transform primary} \rightarrow \descr{primary}$
+\end{ctabbing}
+\caption{Miscellaneous productions needed to complete the BNF}
+\label{sytypexpr}
+\end{figure}
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{program} \rightarrow \descr{statement list} end$\\
+$\tt \descr{statement list} \rightarrow \descr{empty} \;|\; \descr{statement list} \hbox{\tt ;} \descr{statement}$\\
+$\tt \descr{statement} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; \descr{equation} \;|\; \descr{assignment}$\\
+$\tt \qquad \;|\; \descr{declaration} \;|\; \descr{macro definition}$\\
+$\tt \qquad \;|\; \descr{compound} \;|\; \descr{pseudo procedure}$\\
+$\tt \qquad \;|\; \descr{command}$\\
+$\tt \descr{compound} \rightarrow begingroup \descr{statement list} endgroup$\\
+$\tt \qquad \;|\; beginfig\hbox{\tt (}\descr{numeric expression}\hbox{\tt );} \descr{statement list}\hbox{\tt ;} endfig$\\
+$\tt $\\
+$\tt \descr{equation} \rightarrow \descr{expression} \hbox{\tt =} \descr{right-hand side}$\\
+$\tt \descr{assignment} \rightarrow \descr{variable} \hbox{\tt :=} \descr{right-hand side}$\\
+$\tt \qquad \;|\; \descr{internal variable} \hbox{\tt :=} \descr{right-hand side}$\\
+$\tt \descr{right-hand side} \rightarrow \descr{expression} \;|\; \descr{equation} \;|\; \descr{assignment}$\\
+$\tt $\\
+$\tt \descr{declaration} \rightarrow \descr{type} \descr{declaration list}$\\
+$\tt \descr{declaration list} \rightarrow \descr{generic variable}$\\
+$\tt \qquad \;|\; \descr{declaration list}\hbox{\tt ,} \descr{generic variable}$\\
+$\tt \descr{generic variable} \rightarrow \descr{symbolic token} \descr{generic suffix}$\\
+$\tt \descr{generic suffix} \rightarrow \descr{empty} \;|\; \descr{generic suffix} \descr{tag}$\\
+$\tt \qquad \;|\; \descr{generic suffix} \hbox{\tt []}$\\
+$\tt $\\
+$\tt \descr{macro definition} \rightarrow \descr{macro heading} \hbox{\tt =} \descr{replacement text} enddef$\\
+$\tt \descr{macro heading} \rightarrow def \descr{symbolic token} \descr{delimited part} \descr{undelimited part}$\\
+$\tt \qquad \;|\; vardef \descr{generic variable} \descr{delimited part} \descr{undelimited part}$\\
+$\tt \qquad \;|\; vardef \descr{generic variable} \hbox{\verb|@#|} \descr{delimited part} \descr{undelimited part}$\\
+$\tt \qquad \;|\; \descr{binary def} \descr{parameter} \descr{symbolic token} \descr{parameter}$\\
+$\tt \descr{delimited part} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; \descr{delimited part}\hbox{\tt (}\descr{parameter type} \descr{parameter tokens}\hbox{\tt )}$\\
+$\tt \descr{parameter type} \rightarrow expr \;|\; suffix \;|\; text$\\
+$\tt \descr{parameter tokens} \rightarrow \descr{parameter} \;|\; \descr{parameter tokens}\hbox{\tt ,} \descr{parameter}$\\
+$\tt \descr{parameter} \rightarrow \descr{symbolic token}$\\
+$\tt \descr{undelimited part} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; \descr{parameter type} \descr{parameter}$\\
+$\tt \qquad \;|\; \descr{precedence level} \descr{parameter}$\\
+$\tt \qquad \;|\; expr \descr{parameter} of \descr{parameter}$\\
+$\tt \descr{precedence level} \rightarrow primary \;|\; secondary \;|\; tertiary$\\
+$\tt \descr{binary def} \rightarrow primarydef \;|\; secondarydef \;|\; tertiarydef$\\
+$\tt $\\
+$\tt \descr{pseudo procedure} \rightarrow drawoptions\hbox{\tt (}\descr{option list}\hbox{\tt )}$\\
+$\tt \qquad \;|\; label\descr{label suffix}\hbox{\tt (}\descr{expression}\hbox{\tt ,} \descr{pair expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; dotlabel\descr{label suffix}\hbox{\tt (}\descr{expression}\hbox{\tt ,} \descr{pair expression}\hbox{\tt )}$\\
+$\tt \qquad \;|\; labels\descr{label suffix}\hbox{\tt (}\descr{point number list}\hbox{\tt )}$\\
+$\tt \qquad \;|\; dotlabels\descr{label suffix}\hbox{\tt (}\descr{point number list}\hbox{\tt )}$\\
+$\tt \descr{point number list} \rightarrow \descr{suffix} \;|\; \descr{point number list}\hbox{\tt ,} \descr{suffix}$\\
+$\tt \descr{label suffix} \rightarrow \descr{empty} \;|\; lft \;|\; rt \;|\; top \;|\; bot \;|\; ulft \;|\; urt \;|\; llft \;|\; lrt$
+\end{ctabbing}
+\caption{Overall syntax for MetaPost programs}
+\index{generic variable?\tdescr{generic variable}}\index{label suffix?\tdescr{label suffix}}\index{replacement text?\tdescr{replacement text}}%
+\index{suffix?\tdescr{suffix}}%
+\label{syprog}
+\end{figure}
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{command} \rightarrow clip \descr{picture variable} to \descr{path expression}$\\
+$\tt \qquad \;|\; interim \descr{internal variable} \hbox{\tt :=} \descr{right-hand side}$\\
+$\tt \qquad \;|\; let \descr{symbolic token} \hbox{\tt =} \descr{symbolic token}$\\
+$\tt \qquad \;|\; newinternal \descr{symbolic token list}$\\
+$\tt \qquad \;|\; pickup \descr{expression}$\\
+$\tt \qquad \;|\; randomseed \hbox{\tt :=} \descr{numeric expression}$\\
+$\tt \qquad \;|\; save \descr{symbolic token list}$\\
+$\tt \qquad \;|\; setbounds \descr{picture variable} to \descr{path expression}$\\
+$\tt \qquad \;|\; shipout \descr{picture expression}$\\
+$\tt \qquad \;|\; special \descr{string expression}$\\
+$\tt \qquad \;|\; \descr{addto command}$\\
+$\tt \qquad \;|\; \descr{drawing command}$\\
+$\tt \qquad \;|\; \descr{font metric command}$\\
+$\tt \qquad \;|\; \descr{show command}$\\
+$\tt \qquad \;|\; \descr{tracing command}$\\
+$\tt $\\
+$\tt \descr{show command} \rightarrow show \descr{expression list}$\\
+$\tt \qquad \;|\; showvariable \descr{symbolic token list}$\\
+$\tt \qquad \;|\; showtoken \descr{symbolic token list}$\\
+$\tt \qquad \;|\; showdependencies$\\
+$\tt $\\
+$\tt \descr{symbolic token list} \rightarrow \descr{symbolic token}$\\
+$\tt \qquad \;|\; \descr{symbolic token}\hbox{\tt ,} \descr{symbolic token list}$\\
+$\tt \descr{expression list} \rightarrow \descr{expression} \;|\; \descr{expression list}\hbox{\tt ,} \descr{expression}$\\
+$\tt $\\
+$\tt \descr{addto command} \rightarrow$\\
+$\tt \qquad addto \descr{picture variable} also \descr{picture expression} \descr{option list}$\\
+$\tt \qquad \;|\; addto \descr{picture variable} contour \descr{path expression} \descr{option list}$\\
+$\tt \qquad \;|\; addto \descr{picture variable} doublepath \descr{path expression} \descr{option list}$\\
+$\tt \descr{option list} \rightarrow \descr{empty} \;|\; \descr{drawing option} \descr{option list}$\\
+$\tt \descr{drawing option} \rightarrow withcolor \descr{color expression}$\\
+$\tt \qquad \;|\; withpen \descr{pen expression} \;|\; dashed \descr{picture expression}$\\
+$\tt $\\
+$\tt \descr{drawing command} \rightarrow draw \descr{picture expression} \descr{option list}$\\
+$\tt \qquad \;|\; \descr{fill type} \descr{path expression} \descr{option list}$\\
+$\tt \descr{fill type} \rightarrow fill \;|\; draw \;|\; filldraw \;|\; unfill \;|\; undraw \;|\; unfilldraw$\\
+$\tt \qquad \;|\; drawarrow \;|\; drawdblarrow \;|\; cutdraw$\\
+$\tt $\\
+$\tt \descr{tracing command} \rightarrow tracingall \;|\; loggingall \;|\; tracingnone$
+\end{ctabbing}
+\caption{The syntax for commands}
+\index{option list?\tdescr{option list}}\index{picture variable?\tdescr{picture variable}}%
+\label{sycmds}
+\end{figure}
+
+\begin{figure}[htp]
+\begin{ctabbing}
+$\tt \descr{if test} \rightarrow if \descr{boolean expression} \hbox{\tt :} \descr{balanced tokens} \descr{alternatives} fi$\\
+$\tt \descr{alternatives} \rightarrow \descr{empty}$\\
+$\tt \qquad \;|\; else\hbox{\tt :} \descr{balanced tokens}$\\
+$\tt \qquad \;|\; elseif \descr{boolean expression} \hbox{\tt :} \descr{balanced tokens} \descr{alternatives}$\\
+$\tt $\\
+$\tt \descr{loop} \rightarrow \descr{loop header}\hbox{\tt :} \descr{loop text} endfor$\\
+$\tt \descr{loop header} \rightarrow for \descr{symbolic token} \hbox{\tt =} \descr{progression}$\\
+$\tt \qquad \;|\; for \descr{symbolic token} \hbox{\tt =} \descr{for list}$\\
+$\tt \qquad \;|\; forsuffixes \descr{symbolic token} \hbox{\tt =} \descr{suffix list}$\\
+$\tt \qquad \;|\; forever$\\
+$\tt \descr{progression} \rightarrow \descr{numeric expression} upto \descr{numeric expression}$\\
+$\tt \qquad \;|\; \descr{numeric expression} downto \descr{numeric expression}$\\
+$\tt \qquad \;|\; \descr{numeric expression} step \descr{numeric expression} until \descr{numeric expression} $\\
+$\tt \descr{for list} \rightarrow \descr{expression} \;|\; \descr{for list}\hbox{\tt ,} \descr{expression}$\\
+$\tt \descr{suffix list} \rightarrow \descr{suffix} \;|\; \descr{suffix list}\hbox{\tt ,} \descr{suffix}$
+\end{ctabbing}
+\caption{The syntax for conditionals and loops}
+\index{balanced tokens?\tdescr{balanced tokens}}\index{suffix?\tdescr{suffix}}%
+\label{sycondloop}
+\end{figure}
+
+\clearpage
+
+\let\topfraction=\svtopfrac % restore values from the start of this appendix
+\let\textfraction=\svtxtfrac
+\setcounter{topnumber}{\value{svtopnum}}
+\setcounter{totalnumber}{\value{svtotnum}}
+
+
+\section{MetaPost Versus METAFONT}
+\label{MPvsMF}
+
+Since the \MF\index{metafont?\MF} and MetaPost languages have so much in common, expert
+users of \MF\ will want to skip most of the explanations in this document and
+concentrate on concepts that are unique to MetaPost. The comparisons in this
+appendix are intended to help experts that are familiar with {\it The\ \MF book}
+as well as other users that want to benefit from Knuth's more detailed
+explanations \cite{kn:c}.
+
+Since \MF\ is intended for making \TeX\ fonts, it has a number of primitives for
+generating the {\tt tfm}\index{tfm file?{\tt tfm} file}\index{files!tfm?{\tt tfm}} files that
+\TeX\ needs for character dimensions, spacing information,
+ligatures\index{ligatures} and kerning\index{kerning}. MetaPost can also be
+used for generating fonts, and it also has \MF's primitives for making
+{\tt tfm} files. These are listed in Table~\ref{tfmprim}. Explanations can be
+found in the \MF\ documentation \cite{kn:c,kn:mf3}
+
+\begin{table}[htp]
+$$\begin{tabular}{|l|l|} \hline
+commands& {\tt charlist}, {\tt extensible},
+ {\tt fontdimen}, {\tt headerbyte} \\
+ & {\tt kern}, {\tt ligtable} \\ \hline
+ligtable operators& \verb!::!, \verb!=:!, \verb!=:|!, \verb!=:|>!,
+ \verb!|=:!, \verb!|=:>!, \\
+ & \verb!|=:|!, \verb!|=:|>!, \verb!|=:|>>!,
+ \verb!||:! \\ \hline
+internal variables\index{internal variables}\index{variables!internal}&
+ {\tt boundarychar}, {\tt chardp},
+ {\tt charext}, {\tt charht}, \\
+ & {\tt charic}, {\tt charwd},
+ {\tt designsize}, {\tt fontmaking} \\ \hline
+other operators& {\tt charexists} \\ \hline
+\end{tabular}
+$$
+\caption{MetaPost primitives for making {\tt tfm} files.}
+\label{tfmprim}
+\end{table}
+
+Even though MetaPost has the primitives for generating fonts, many of the
+font-making primitives and internal variables that are part of Plain
+\MF\index{metafont?\MF} are not defined in Plain MetaPost\index{Plain macros}. Instead,
+there is a separate macro package called {\tt mfplain}\index{mfplain?\texttt{mfplain}} that
+defines the macros required to allow MetaPost to process Knuth's Computer Modern
+fonts as shown in Table~\ref{mfponly} \cite{kn:e}.
+To load these macros, put ``\verb|&mfplain|'' before the name of the
+input file. This can be done at the {\tt **} prompt after invoking the MetaPost
+interpreter with no arguments, or on a command line that looks something like
+this:\footnote{Command line syntax is system dependent. Quotes are needed on
+most Unix\reg systems to protect special characters like {\tt\&}.}
+$$ \hbox{\verb|mp '&mfplain' cmr10|} $$
+The analog of a \MF\ command line like
+$$ \hbox{\verb|mf '\mode=lowres; mag=1.2; input cmr10'|} $$
+is
+$$ \hbox{\verb|mp '&mfplain \mode=lowres; mag=1.2; input cmr10'|} $$
+The result is a set of PostScript files, one for each character in the font.
+Some editing would be required in order to merge them into a downloadable Type~3
+PostScript font \cite{ad:red}.
+
+\begin{table}[htp]
+$$
+\renewcommand{\FancyVerbFormatLine}[1]{\hbox{#1}\strut}
+\begin{tabular}{|l|} \hline
+\multicolumn 1{|c|}
+{Defined in the {\tt mfplain} package} \\ \hline
+\begin{verbatim}
+beginchar font_identifier
+blacker font_normal_shrink
+capsule_def font_normal_space
+change_width font_normal_stretch
+define_blacker_pixels font_quad
+define_corrected_pixels font_size
+define_good_x_pixels font_slant
+define_good_y_pixels font_x_height
+define_horizontal_corrected_pixels italcorr
+define_pixels labelfont
+define_whole_blacker_pixels makebox
+define_whole_pixels makegrid
+define_whole_vertical_blacker_pixels maketicks
+define_whole_vertical_pixels mode_def
+endchar mode_setup
+extra_beginchar o_correction
+extra_endchar proofrule
+extra_setup proofrulethickness
+font_coding_scheme rulepen
+font_extra_space smode
+\end{verbatim}
+ \\ \hline
+\multicolumn 1{|c|}
+{Defined as no-ops in the {\tt mfplain} package}\\ \hline
+\begin{verbatim}
+cullit proofoffset
+currenttransform screenchars
+gfcorners screenrule
+grayfont screenstrokes
+hround showit
+imagerules slantfont
+lowres_fix titlefont
+nodisplays unitpixel
+notransforms vround
+openit
+\end{verbatim}
+ \\ \hline
+\end{tabular}
+\renewcommand{\FancyVerbFormatLine}[1]{#1}
+$$
+\caption{Macros and internal variables defined only in the {\tt mfplain} package.}
+\label{mfponly}
+\end{table}
+
+Another limitation of the {\tt mfplain} package is that certain internal
+variables from Plain \MF\index{metafont?\MF} cannot be given reasonable MetaPost
+definitions. These include {\tt displaying}, {\tt currentwindow},
+\verb|screen_rows|, and \verb|screen_cols| which depend on \MF's ability to
+display images on the computer screen. In addition, \verb|pixels_per_inch| is
+irrelevant since MetaPost uses fixed units of PostScript points.
+
+The reason why some macros and
+internal variables\index{internal variables}\index{variables!internal}
+are not meaningful in MetaPost
+is that \MF\ primitive commands {\tt cull}, {\tt display}, {\tt openwindow},
+{\tt numspecial} and {\tt totalweight} are not implemented in MetaPost. Also not
+implemented are a number of internal variables as well as the
+\tdescr{drawing option} {\tt withweight}. Here is a complete listing of the
+internal variables whose primitive meanings in \MF\ do not make sense in MetaPost:
+$$\begin{verbatim}
+autorounding fillin proofing tracingpens xoffset
+chardx granularity smoothing turningcheck yoffset
+chardy hppp tracingedges vppp
+\end{verbatim}
+$$
+
+There is also one \MF\ primitive that has a slightly different meaning in
+MetaPost. Both languages allow statements of the
+form\index{special?\texttt{special}}\label{Dspecl}
+$$ {\tt special}\, \descr{string expression} \hbox{\tt;} $$
+but \MF\ copies the string into its ``generic font'' output file, while
+MetaPost interprets the string as a sequence of PostScript commands that are
+to be placed at the beginning of the next output file.
+
+All the other differences between \MF\ and MetaPost are features found only in
+MetaPost. These are listed in Table~\ref{mponly}. The only commands listed
+in this table that the preceding sections do not discuss are
+\verb|extra_beginfig|\index{extra_beginfig?\texttt{extra\_beginfig}}\label{Dxbfig},
+\verb|extra_endfig|\index{extra_endfig?\texttt{extra\_endfig}}\label{Dxefig}, and {\tt mpxbreak}.
+The first two are strings that contain extra commands to be processed
+by {\tt beginfig}\index{beginfig?\texttt{beginfig}} and {\tt endfig}\index{endfig?\texttt{endfig}}
+just as \verb|extra_beginchar| and \verb|extra_endchar| are processed by
+{\tt beginchar} and {\tt endchar}.
+(The file {\tt boxes.mp}\index{boxes.mp?\texttt{boxes.mp}} uses these features).
+
+The other new feature listed in Table~\ref{mponly} not listed in the index
+is {\tt mpxbreak}\index{mpxbreak?\texttt{mpxbreak}}. This is used to separate blocks of
+translated \TeX\index{TeX?\TeX} or troff\index{troff} commands in
+{\tt mpx}\index{files!mpx?{\tt mpx}} files. It should be of no concern to
+users since {\tt mpx} files are generated automatically.
+
+\begin{table}[htp]
+$$
+\renewcommand{\FancyVerbFormatLine}[1]{\hbox{#1}\strut}
+\begin{tabular}{|l|} \hline
+\multicolumn 1{|c|}
+{MetaPost primitives not found in \MF} \\ \hline
+$\begin{verbatim}
+bluepart infont redpart
+btex linecap setbounds
+clip linejoin tracinglostchars
+color llcorner truecorners
+dashed lrcorner ulcorner
+etex miterlimit urcorner
+fontsize mpxbreak verbatimtex
+greenpart prologues withcolor
+\end{verbatim}
+$ \\ \hline
+\multicolumn 1{|c|}
+{Variables and Macros defined only in Plain MetaPost}\\ \hline
+$\begin{verbatim}
+ahangle cutbefore extra_beginfig
+ahlength cuttings extra_endfig
+background dashpattern green
+bbox defaultfont label
+bboxmargin defaultpen labeloffset
+beginfig defaultscale mitered
+beveled dotlabel red
+black dotlabels rounded
+blue drawarrow squared
+buildcycle drawdblarrow thelabel
+butt drawoptions white
+center endfig
+cutafter evenly
+\end{verbatim}
+$ \\ \hline
+\end{tabular}
+\renewcommand{\FancyVerbFormatLine}[1]{#1}
+$$
+\caption{Macros and internal variables defined in MetaPost but not \MF.}
+\label{mponly}
+\end{table}
+
+
+
+
+\bibliographystyle{plain}
+\bibliography{mpman}
+
+
+\printindex
+
+
+\end{document}
+
+% Copyright 1990 - 1995 by AT&T Bell Laboratories.
+
+% Permission to use, copy, modify, and distribute this software
+% and its documentation for any purpose and without fee is hereby
+% granted, provided that the above copyright notice appear in all
+% copies and that both that the copyright notice and this
+% permission notice and warranty disclaimer appear in supporting
+% documentation, and that the names of AT&T Bell Laboratories or
+% any of its entities not be used in advertising or publicity
+% pertaining to distribution of the software without specific,
+% written prior permission.
+
+% AT&T disclaims all warranties with regard to this software,
+% including all implied warranties of merchantability and fitness.
+% In no event shall AT&T be liable for any special, indirect or
+% consequential damages or any damages whatsoever resulting from
+% loss of use, data or profits, whether in an action of contract,
+% negligence or other tortious action, arising out of or in
+% connection with the use or performance of this software.
+
+% In addition, John Hobby, the original author of MetaPost and this
+% manual, makes the following requests:
+% - I request that it remain clear that I am the author of
+% "A User's Manual for MetaPost" and "Drawing Graphs with MetaPost".
+% - I request to be consulted before significant changes are made.
diff --git a/Master/texmf-dist/doc/metapost/base/source/timepop.d b/Master/texmf-dist/doc/metapost/base/source/timepop.d
new file mode 100644
index 00000000000..2b1555289c2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/timepop.d
@@ -0,0 +1,21 @@
+1790 3.93
+1800 5.31
+1810 7.24
+1820 9.64
+1830 12.87
+1840 17.07
+1850 23.19
+1860 31.44
+1870 39.82
+1880 50.16
+1890 62.95
+1900 75.99
+1910 91.97
+1920 105.71
+1930 122.78
+1940 131.67
+1950 150.70
+1960 179.32
+1970 203.30
+1980 226.55
+1990 248.71 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/exteps/LICENSE b/Master/texmf-dist/doc/metapost/exteps/LICENSE
new file mode 100644
index 00000000000..6d45519c8c6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/exteps/LICENSE
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/Master/texmf-dist/doc/metapost/exteps/README b/Master/texmf-dist/doc/metapost/exteps/README
new file mode 100644
index 00000000000..e1f96065426
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/exteps/README
@@ -0,0 +1,5 @@
+exteps is a module for inclusion of external EPS figures into MetaPost
+figures. It is written solely in MetaPost, and whence does not require
+any post processing of the MetaPost output.
+
+Palle Jørgensen \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/exteps/exteps.pdf b/Master/texmf-dist/doc/metapost/exteps/exteps.pdf
new file mode 100644
index 00000000000..50bdeb3d7bf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/exteps/exteps.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/README.ctan b/Master/texmf-dist/doc/metapost/featpost/README.ctan
new file mode 100644
index 00000000000..5a7f3e02dd0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/README.ctan
@@ -0,0 +1,29 @@
+I've uploaded the file
+ featpost.tgz
+to
+ ftp://dante.ctan.org/incoming/
+
+This file contains, among other files and directories:
+
+ -An installation script
+ bashscript/dosome.sh
+
+ -Documentation
+ doc/featpost.sgml
+ doc/tug2004.pdf
+
+ -One set of macros
+ macro/featpost3Dplus2D.mp
+
+ -And lots of example programs in
+ example/
+
+It is meant to replace the actual
+ graphics/metapost/contrib/macros/featpost
+sub-tree. The description of this package is:
+"FeatPost is an extension of the MetaPost language,
+works in two and three dimensions
+and has several features to facilitate
+the production of physics diagrams."
+
+No change was introduced in the licensing: GPL.
diff --git a/Master/texmf-dist/doc/metapost/featpost/README.featpost b/Master/texmf-dist/doc/metapost/featpost/README.featpost
new file mode 100644
index 00000000000..412e68a7f46
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/README.featpost
@@ -0,0 +1,36 @@
+If you've just unpacked FEATPOST it's time to do
+ bashscript/dosome.sh < /dev/null
+You'll see many text lines rolling up your scren,
+some of them containing error messages.
+DON'T PANIC. This will just take quite
+some time and about 80MB of disk space.
+It is supposed that you've got, at least,
+ImageMagick and Linuxdoc installed. Galrey, dog and
+textutils are also in order. All software is available
+as Debian GNU/Linux packages (except FEATPOST).
+Well, this is a bit complicated. The simple way is
+to copy the file
+ macro/featpost3Dplus2D.mp
+to
+ /usr/TeX/texmf-local/metapost/local/
+or
+ /usr/share/texmf/metapost/misc/
+or something appropriate and to do
+ texhash
+
+If you're returning you should remember to do
+ export TEX=latex
+ mpost -mem featpost example/standard/someexamplefile.mp
+ bashscript/laproof someexamplefile N
+ gv someexamplefile.N.eps &
+but, again, if you chose the simple way you must uncomment
+ %input featpost3Dplus2D;
+in someexamplefile.mp
+
+Good luck!
+
+P.S. - The cutting-edge feature is
+ "Automatic Perspective Tuning"
+as processed by the macro "photoreverse".
+If you want to know more about this:
+ nobre@lince.cii.fc.ul.pt
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh
new file mode 100644
index 00000000000..ff908c37ed9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/dosome.sh
@@ -0,0 +1,95 @@
+#! /bin/bash
+# Execute this script with the command
+# bashscript/dosome.sh < /dev/null > dosome.log
+# (from the featpost root directory)
+# Don't worry about the error messages.
+# L. Nobre G.
+# IYP (2005)
+
+export TEX=latex
+mkdir alleps
+mkdir allpng
+mkdir allps
+mkdir ppm
+mkdir galreyimages
+cd macro
+mpost --ini featpost.mp
+cd ..
+ln -s macro/featpost.mem
+ln -s latex/mflogohack.sty
+echo \\documentclass[twocolumn]{article}\
+ \\usepackage[dvips]{epsfig}\
+ \\usepackage{mflogohack}\
+ \\begin{document}\
+ \\title{\\FP\\ Exemplifier}\
+ \\author{L.\\ Nobre G.}\
+ \\maketitle\
+ \\begin{center}\
+ > FeatPostExemplifier.tex
+for a in example/standard/*.mp
+do
+ b=`basename $a .mp`
+ mpost -mem featpost example/standard/$b
+ for c in $b.?
+ do
+ echo \\vfill\
+ \\begin\{tabular\}\{c\}\
+ \\epsfig\{file=$c\,width=0.9\\columnwidth\} \\\\\
+ \\texttt\{$c\}\
+ \\end\{tabular\} \\\\ >> FeatPostExemplifier.tex
+ echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\begin{document}\\pagestyle{empty}\\epsfig{file=$c,width=0.9\\textwidth}\\end{document} > $c.latex
+ latex $c.latex
+ dvips -E -o $c.PS $c.dvi
+ epstopdf --nogs $c.PS > $c.eps
+ gs -q -sDEVICE=png256 -r120 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dCOLORSCREEN -dNOPAUSE -sOutputFile=$c.gs.png $c.eps
+# composite -filter Lanczos -geometry 300x300 -gravity Center $c.gs.png png/borderframetest.png ppm/t_$c.ppm
+ composite -filter Lanczos -geometry 120x120 -gravity Center $c.gs.png png/border140.png ppm/t_$c.ppm
+ done
+ for ((num=0;num<10;num=num+1))
+ do
+ cp $b.$num.gs.png galreyimages/$b$num.png
+ mv ppm/t_$b.$num.ppm ppm/t_$b$num.ppm
+ done
+done
+echo \\end{center}\\end{document} >> FeatPostExemplifier.tex
+latex FeatPostExemplifier.tex
+dvips -o FeatPostExemplifier.ps FeatPostExemplifier.dvi
+bzip2 FeatPostExemplifier.ps
+mv FeatPostExemplifier.ps.bz2 doc/
+rm FeatPostExemplifier.*
+rm mflogohack.sty
+rm *.?.PS *.?.aux *.?.latex *.?.dvi *.log *.?.mgk *.?.orig
+rm example/standard/*.mpx
+mv *.? allps/
+mv *.?.gs.png allpng/
+mv *.?.png nontextualpng/
+mv *.?.eps alleps/
+#animate -delay 125 ppm/* &
+cd doc
+linuxdoc -B html --split=2 --toc=2 featpost.sgml
+linuxdoc -B latex featpost.sgml
+mv featpost.tex ../latex/
+cd ../latex
+latex featpost.tex
+latex featpost.tex
+dvips -o featpost.ps featpost.dvi
+ps2pdf featpost.ps
+mv featpost.ps featpost.pdf ../doc/
+#sed 's/article/ltugboat/' featpost.tex > tugboatMan.tex
+#latex tugboatMan.tex
+#latex tugboatMan.tex
+#dvips -o ../doc/tugboatMan.ps tugboatMan.dvi
+cd ../galrey
+source galrey.sh
+cd ..
+for a in ppm/t_*.ppm
+do
+ convert $a galreyimages/`basename $a ppm`png
+done
+pwd
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh
new file mode 100755
index 00000000000..4fe6fd4265a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/eps2j.sh
@@ -0,0 +1 @@
+gs -q -sDEVICE=jpeggray -dNOPAUSE -sOutputFile=eps.jpeg $1 </dev/null
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/fpost b/Master/texmf-dist/doc/metapost/featpost/bashscript/fpost
new file mode 100644
index 00000000000..63d3588a4c2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/fpost
@@ -0,0 +1 @@
+mpost -mem featpost example/standard/$1 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed
new file mode 100644
index 00000000000..6fe8c6ed0c2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sed
@@ -0,0 +1,5 @@
+4i\
+\
+%input featpost3D;\
+%input par3Dplotmacros; % Contributed by J. Schwaiger \
+%input featpost2D;
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh
new file mode 100755
index 00000000000..d562871aed7
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/insertinputcommands.sh
@@ -0,0 +1,6 @@
+for a in *.mp; do mv $a `basename $a mp`mpN; done
+for a in *.mpN
+ do sed -f ../bashscript/insertinputcommands.sed $a > `basename $a mpN`mp
+done
+#rm *.mpN
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/laproof b/Master/texmf-dist/doc/metapost/featpost/bashscript/laproof
new file mode 100755
index 00000000000..298e99a382e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/laproof
@@ -0,0 +1,13 @@
+#!/bin/sh
+name=`basename $1 .mp`
+figname=$name.$2
+echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\begin{document}\\pagestyle{empty}\\epsfig{file=$figname}\\end{document} > $figname.latex
+latex $figname.latex
+dvips -Pcmz -Pamz -E -o $figname.eps $figname.dvi
+# epstopdf -d --nogs $figname.eps > $name.eps
+# Modification of an original by J.M.C.Esteves
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/lbproof b/Master/texmf-dist/doc/metapost/featpost/bashscript/lbproof
new file mode 100755
index 00000000000..491bdb66a83
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/lbproof
@@ -0,0 +1,16 @@
+#!/bin/sh
+name=`basename $1 .mp`
+figname=$name.$2
+#mpost -mem featpost $name
+echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\setlength{\\paperwidth}{8.2in}\\setlength{\\paperheight}{11.2in}\\setlength{\\textwidth}{8in}\\setlength{\\textheight}{11in}\\setlength{\\voffset}{-1in}\\setlength{\\hoffset}{-1in}\\setlength{\\topmargin}{0pt}\\setlength{\\headheight}{0pt}\\setlength{\\headsep}{0pt}\\setlength{\\oddsidemargin}{0pt}\\begin{document}\\pagestyle{empty}\\epsfig{file=$figname,width=\\columnwidth,clip=}\\end{document} > $figname.latex
+latex $figname.latex
+dvips -Pcmz -Pamz -E -o $figname.eps $figname.dvi
+#epstopdf -d --nogs $figname.eps > tmp.eps
+#gs -sDEVICE=jpeggray -dNOPAUSE -sOutputFile=$name.jpeg tmp.eps </dev/null
+#rm -v tmp.eps
+# Modification of an original by J.M.C.Esteves
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/lcproof b/Master/texmf-dist/doc/metapost/featpost/bashscript/lcproof
new file mode 100755
index 00000000000..27ba07313bf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/lcproof
@@ -0,0 +1,13 @@
+#!/bin/sh
+name=`basename $1 .mp`
+figname=$name.$2
+echo \\documentclass{article}\\usepackage[dvips]{epsfig}\\setlength{\\paperwidth}{8.2in}\\setlength{\\paperheight}{11.2in}\\setlength{\\textwidth}{8in}\\setlength{\\textheight}{11in}\\setlength{\\voffset}{-1in}\\setlength{\\hoffset}{-1in}\\setlength{\\topmargin}{0pt}\\setlength{\\headheight}{0pt}\\setlength{\\headsep}{0pt}\\setlength{\\oddsidemargin}{0pt}\\begin{document}\\pagestyle{empty}\\epsfig{file=$figname,height=\\textheight,clip=}\\end{document} > $figname.latex
+latex $figname.latex
+dvips -Pcmz -Pamz -E -o $figname.eps $figname.dvi
+# epstopdf -d --nogs $figname.eps > $name.eps
+# Modification of an original by J.M.C.Esteves
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh
new file mode 100644
index 00000000000..7753995c94e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/makelogo.sh
@@ -0,0 +1,9 @@
+#! /bin/bash
+cd latex
+latex logofeatpost.tex
+dvips -E -o logofeatpost.ps logofeatpost.dvi
+epstopdf -d -nogs logofeatpost.ps > featpost.eps
+gs -q -sDEVICE=png256 -r300x300 -dNOPAUSE -sOutputFile=featpost.png featpost.eps </dev/null
+cp featpost.png featpost2.png
+mogrify -geometry 25% featpost2.png
+cd ..
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh
new file mode 100755
index 00000000000..cb96f1a651a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/maketugboatart.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd latex/
+sgml2latex ../doc/macroMan.sgml
+sed 's/article/ltugboat/' macroMan.tex > tugboatMan.tex
+latex tugboatMan.tex
+dvips -o ../doc/tugboatMan.ps tugboatMan.dvi
+rm -v tugboatMan.???
+cd ../ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh
new file mode 100644
index 00000000000..aa86f2f943c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/nontextualpng.sh
@@ -0,0 +1,10 @@
+#! /bin/bash
+# L. Nobre G.
+# IYP (2005)
+
+mkdir nontextualpng
+for a in allps/*
+do
+ convert -bordercolor white -border 20x20 -transparent white \
+ -format png $a nontextualpng/`basename $a`.png
+done
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh
new file mode 100755
index 00000000000..82629e1415b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/procedurenames.sh
@@ -0,0 +1,8 @@
+#! /bin/bash
+sed -n '/ def /p' macro/la3Dmacros.mp > la3Ddef.txt
+sed -n '/ vardef /p' macro/hlr3Dmacros.mp > hlr3Dvardef.txt
+sed -n '/ def /p' macro/hlr3Dmacros.mp > hlr3Ddef.txt
+cat la3Ddef.txt hlr3Dvardef.txt hlr3Ddef.txt > alldef.txt
+rm -v la3Ddef.txt hlr3Dvardef.txt hlr3Ddef.txt
+# there are two "vardefined" procedures:
+# makeline@# and makeface@#
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh
new file mode 100644
index 00000000000..cb37397d06b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/remfi.sh
@@ -0,0 +1,32 @@
+#! /bin/bash
+# remfi.sh
+# L. Nobre G.
+# IYP (2005)
+rm -fR alleps allpng allps ppm galreyimages
+rm macro/*~ example/standard/*.mpx example/standard/*~
+rm doc/*~ bashscript/*~ latex/*~ *~
+rm latex/featpost.*
+rm latex/tugboatMan.*
+rm latex/macroMan.dvi
+rm latex/macroMan.log
+rm latex/macroMan.aux
+rm doc/featpost.ps
+rm doc/featpost.pdf
+rm doc/featpost.html
+rm doc/featpost-*.html
+rm doc/tugboatMan.ps
+rm galrey/galrey.fn
+rm galrey/galrey.ls
+rm galrey/galrey.memo
+rm galrey/galrey.nms
+rm *.tex *.aux *.dvi *.log *.latex *.eps *.?
+rm macro/featpost.mem macro/featpost.log
+rm *.?.PS *.?.aux *.?.latex *.?.dvi *.log *.?.mgk *.?.orig
+rm *.?.gs.png *.?.png
+rm featpost.mem
+rm doc/featpost.sgml.flc
+rm macro/featpost3Dplus2D.mp.flc
+rm doc/FeatPostExemplifier.ps.bz2
+rm mflogohack.sty
+cd ..
+tar cvzf down/featpost.tgz featpost/
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh
new file mode 100644
index 00000000000..a1d41226431
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/removeinputcommand.sh
@@ -0,0 +1,9 @@
+for a in *; do cp $a $a.NEW; done
+for a in *.NEW
+do
+ b=`basename $a .NEW`
+ sed -e '/%input featpost2D;/d' $a > $b
+# echo $a ----- $b
+done
+rm *.NEW
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh
new file mode 100644
index 00000000000..2afdf6f28c4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/replacetext.sh
@@ -0,0 +1,7 @@
+for a in *; do mv $a `basename $a`.NEW; done
+#for a in *.mp; do mv $a `basename $a mp`mpN; done
+for a in *.NEW
+ do sed -e 's/featpost3D/featpost3Dplus2D/' $a > `basename $a .NEW`
+done
+rm *.NEW
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh b/Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh
new file mode 100644
index 00000000000..4cef12f11fb
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/bashscript/simpleviewer.sh
@@ -0,0 +1,15 @@
+prefwidth=640
+prefheigh=480
+prefratio=$(( 1000 * $prefwidth / $prefheigh ))
+tmpfilename=`mktemp simpleviewer.XXXXXX`
+epstopdf --nogs $1 > $tmpfilename
+epswidth=`identify $tmpfilename | cut -d " " -f 3 | cut -d x -f 1`
+epsheigh=`identify $tmpfilename | cut -d " " -f 3 | cut -d x -f 2`
+aspectra=$(( 1000 * $epswidth / $epsheigh ))
+if test $aspectra -ge $prefratio
+then resol=$(( 72 * $prefwidth / $epswidth ))
+else resol=$(( 72 * $prefheigh / $epsheigh ))
+fi
+echo " Resolution:" $resol "dpi."
+gs -q -r$resol -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 $tmpfilename
+rm $tmpfilename \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/doc/doclicense.txt b/Master/texmf-dist/doc/metapost/featpost/doc/doclicense.txt
new file mode 100644
index 00000000000..caacdfcf042
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/doc/doclicense.txt
@@ -0,0 +1,10 @@
+ This document, FEATPOST macros,
+ is copyrighted (c) 2003 by L. Nobre G.
+ Permission is granted to copy, distribute and/or modify
+ this document under the terms of the
+ GNU Free Documentation License, Version 1.1 or any later
+ version
+ published by the Free Software Foundation; with no
+ Invariant Sections, with no Front-Cover Texts, and with
+ no Back-Cover Texts. A copy of the license is available
+ at <url url="http://www.gnu.org/copyleft/fdl.html">.
diff --git a/Master/texmf-dist/doc/metapost/featpost/doc/featexamples.html b/Master/texmf-dist/doc/metapost/featpost/doc/featexamples.html
new file mode 100644
index 00000000000..43d119f304b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/doc/featexamples.html
@@ -0,0 +1,163 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>FeatPost Examples</title>
+ </head>
+ <body text="#000000" link="#0000ff" vlink="#ff5599" alink="#00ff00"
+ background="../jpeg/mymetapostclearback.jpeg" bgcolor="white">
+ <h1 align="center"><img src="../png/featpost2.png"
+ alt="FeatPost Examples">
+ </h1>
+
+ <p>
+ Most diagrams are done with sort-of-CAD packages. These packages
+ usually hide their language from the user and, probably, draw only
+ planar diagrams. FeatPost is an extension of the
+ <a href="http://cm.bell-labs.com/who/hobby/MetaPost.html">MetaPost</a>
+ language, works in three dimensions and has several features to
+ facilitate the production of physics diagrams. For the production of
+ animations see
+ <a href="http://matagalatlante.org/nobre/aneemate/nodocs/aneematepage.html">aneemate</a>.
+ </p>
+
+ <center>
+ <p>If you do not see any pictures on this page,
+ you may locally run the <a href="../bashscript/dosome.sh">installation
+ script</a> (after downloading) or visit
+ <a href="http://matagalatlante.org/nobre/featpost/doc/featexamples.html">http://matagalatlante.org/nobre/featpost/doc/featexamples.html</a></p>
+ <table>
+ <tbody>
+ <tr>
+ <td align="right" valign="middle">
+ Click on this icon to download:</td>
+ <td><a href="../../down/featpost.tgz">
+ <img src="../png/downloadicon.png" alt="Download Now! ">
+ </a></td>
+ <td align="left" valign="top">
+ <a href="./featpost.html">Online User's
+ Guide.</a><br>
+ <a href="./featpost.pdf">PDF User's
+ Guide.</a><br>
+ <a href="../galreyimages/index.html">Online Examples.</a><br>
+ <a href="./FeatPostExemplifier.ps.bz2">PostScript Examples.</a><br>
+ <a href="http://www.ctan.org/tex-archive/graphics/metapost/contrib/macros/featpost/">CTAN.</a><br>
+ <a href="http://matagalatlante.org/nobre/tug04/bundle/tug04handout.ps.bz2">TUG04 handout.</a>
+ </td>
+ </tr>
+ <tr>
+ <!-- one of (TD TH) -->
+ <td align="center" valign="top">
+
+ </td>
+ <td align="center">
+
+ </td>
+ <td align="center">
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h4>Thick Lines</h4>
+ <a href="../example/standard/torus.mp">
+ <img src="../nontextualpng/torus.5.png" alt="torus.5.eps">
+ </a>
+ <h4>Vector Fields</h4>
+ <a href="../example/standard/rotatnlc.mp">
+ <img src="../nontextualpng/rotatnlc.1.png" alt="rotatnlc.1.eps">
+ </a>
+ <h4>Volumic Angles and Circles in Space</h4>
+ <a href="../example/standard/anglinerigorouscircle.mp">
+ <img src="../allpng/anglinerigorouscircle.1.gs.png"
+ alt="angline_rigorouscircle.1.eps">
+ </a>
+ <h4>Cones</h4>
+ <a href="../example/standard/rigorouscone.mp">
+ <img src="../nontextualpng/rigorouscone.1.png" alt="rigorouscone.1.eps">
+ </a>
+ <h4>Cylinders and Spherical Distortions</h4>
+ <a href="../example/standard/cylimple.mp">
+ <img src="../nontextualpng/cylimple.1.png" alt="cylimple.1.eps">
+ </a>
+ <h4>Globes</h4>
+ <a href="../example/standard/globe.mp">
+ <img src="../nontextualpng/globe.1.png"
+ alt="globe.1.eps">
+ </a>
+ <h4>Polyhedra</h4>
+ <a href="../example/standard/torus.mp">
+ <img src="../nontextualpng/torus.6.png" alt="torus.6.eps">
+ </a>
+ <h4>Generic Stuff</h4>
+ <a href="../example/standard/stageforthree.mp">
+ <img src="../nontextualpng/stageforthree.2.png"
+ alt="stageforthree.2.eps">
+ </a>
+ <h4>Molecular Structures</h4>
+ <a href="../example/standard/rigorousfearpath.mp">
+ <img src="../nontextualpng/rigorousfearpath.1.png"
+ alt="cubicfacecentered.1.eps">
+ </a>
+ <h4>Surfaces</h4>
+ <a href="../example/standard/triangulartrimesh.mp">
+ <img src="../nontextualpng/triangulartrimesh.1.png"
+ alt="triangulartrimesh.1.eps">
+ </a>
+ <h4>Parametric Surfaces</h4>
+ <p>Kindly contributed by
+ <a href="http://www-ang.kfunigraz.ac.at/~schwaige/">Jens Schwaiger</a>
+ </p>
+ <a href="../example/highmemory/par3Dplotexamples.mp">
+ <img src="../jpeg/par3Dplotexamples1.jpg"
+ alt="par3Dplotexamples.1.eps">
+ </a>
+ <h4>Automatic Perspective Tuning</h4>
+ <a href="../example/standard/photoreverse.mp">
+ <img src="../allpng/photoreverse.1.gs.png"
+ alt="photoreverse.1.eps">
+ </a>
+ <h4>Main Referers</h4>
+ <p>
+ <a href="http://www.tug.org/metapost.html">
+ TUG</a><br>
+ <a href="http://dmoz.org/Computers/Software/Typesetting/TeX/MetaPost/">
+ Open Directory</a><br>
+ <a href="http://www.cs.ucc.ie/~dongen/mpost/links.html">Marc
+ van Dongen</a><br>
+ <a href="http://www-math.univ-poitiers.fr/~phan/m3Dplain.html">
+ Anthony Phan</a><br>
+ <a href="http://asymptote.sourceforge.net/doc/featpost3D.html#featpost3D">
+ Asymptote</a>
+
+
+ </p>
+ </center>
+ <hr size="4">
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <a href="../../../oldindex.html">
+ <img border="0" src="../png/myicon.png" alt="Home." height="36" width="72">
+ </a>
+ </td>
+ <td align="center" valign="middle">
+ <a href="http://www.xemacs.org">
+ <img align="middle" border="0"
+ src="../jpeg/cbxSmall.jpg"
+ alt="Created by XEmacs."
+ height="36"
+ width="100">
+ </a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- Created: Sun Sep 23 20:33:28 WEST 2001 -->
+ <!-- hhmts start -->
+Last modified: Mon Aug 29 11:22:26 WEST 2005
+<!-- hhmts end --> <br>
+ <br>
+ </body>
+</html>
diff --git a/Master/texmf-dist/doc/metapost/featpost/doc/featpost.1.gz b/Master/texmf-dist/doc/metapost/featpost/doc/featpost.1.gz
new file mode 100644
index 00000000000..a98a55c9d06
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/doc/featpost.1.gz
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/doc/featpost.sgml b/Master/texmf-dist/doc/metapost/featpost/doc/featpost.sgml
new file mode 100644
index 00000000000..5d3ab082321
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/doc/featpost.sgml
@@ -0,0 +1,1623 @@
+<!doctype linuxdoc system>
+<!-- macroMan.sgml
+ L. Nobre G.
+ 2004
+ -->
+<linuxdoc>
+ <article>
+ <titlepag>
+ <title>FEATPOST macros</title>
+ <author>L. Nobre G., <tt>http://matagalatlante.org</tt></name>
+ <date>December 2004</date>
+ <abstract>
+ This document intends to be an explanation of the MetaPost macros
+ defined in the <tt>FEATPOST</tt> package. Its purpose is to draw
+ two or three-dimensional physics diagrams.
+
+ The <tt>FEATPOST</tt> package is supposed to help you draw figures
+ containing 3D dots, vectors, flat arrows, angles, parametric
+ lines, circles, ellipses,
+ cones, cylinders, spheres,
+ globes, hemispheres, toruses,
+ elliptical frusta,
+ polygons, polyhedra, functional and parametric surfaces,
+ direction fields, field lines
+ and trajectories in vector fields,
+ schematic automobiles, electric charges,
+ etc.
+
+ The fact that it is a programming language instead of
+ Computer Aided Design (CAD)
+ helps the user to experiment different
+ figure layouts without changing specified geometric relationships
+ among figure elements.
+
+ Two of the intrinsic MetaPost features which may be important
+ for physics diagrams are: (i) the typesetting power of
+ TeX is easily called when needed and (ii) besides a sufficient
+ number of mathematical operators, geometric relationships may
+ be expressed by linear equations, without explicit assignements.
+ </abstract>
+ </titlepag>
+ <sect>
+ <heading>Introduction</heading>
+ <p>
+ 3D in MetaPost is not a new idea. Denis Roegel
+ contributed related packages to CTAN some years ago. It was the
+ subject of a 1997 TUGboat article (V18, N4, 274-283). Recently
+ he developed <url
+ url="http://www.loria.fr/~roegel/TeX/mousson2005.pdf"
+ name="MP2GL">. Anthony
+ Phan has been developing a very elegant package
+ called <url url="http://www-math.univ-poitiers.fr/~phan/m3Dplain.html" name="m3D">. Due to his skilled coding, <tt>m3D</tt> can
+ handle larger objects and can produce more realistic renderings than
+ <tt>FEATPOST</tt>. Other possibilities include <url
+ url="http://directory.fsf.org/GNU/3DLDF.html" name="GNU
+ 3DLDF">, <url
+ url="http://robert.silve.free.fr/latex/metapost3D/"
+ name="Bob's Info"> or <url
+ url="http://asymptote.sourceforge.net/"
+ name="Asymptote">.
+ In any case we are talking about vector-based abstract diagrams,
+ so the functionality of
+ these packages is nearer to <tt>GNUPLOT</tt> than to <tt>OpenGL</tt>.
+ We could also talk about <tt><url url="http://www.povray.org/" name="POV-ray"></tt> or
+ <tt><url url="http://www.blender3d.org/" name="blender"></tt> but these
+ are focused on ray-traced images, a completely different thing.
+ </p>
+ <p>
+ Regarding software <tt>FEATPOST</tt> requires only MetaPost but
+ recommends <tt>LaTeX, bash, ImageMagick, ghostscript,
+ Linuxdoc, Textutils, dvips, epstopdf, sed, gv, plaympeg, <url url="http://jl.photodex.com/dog/" name="dog">, <url url="http://www.flexer.it/galrey/" name="galrey"></tt> and <tt><url url="http://lince.cii.fc.ul.pt/xcmd/xcmd.html" name="xcmd"></tt>. Also, it is highly beneficial to
+ be able to understand and cope with MetaPost error messages as
+ <tt>FEATPOST</tt> has no protection against mistaken inputs. One
+ probable cause of errors is the use of variables with the name of
+ procedures, like
+ <tscreen><verb>X, Y, Z, N, rp, cb, ps</verb>
+ </tscreen>All other procedure names have six or more characters.
+ </p>
+ <p>
+ The user must be aware that MetaPost has a limited arithmetic power
+ and that the author has limited programming skills,
+ which may lead to unperfect 3D figures, very long processing
+ time or shear bugs.
+ It's advisable not to try very complex diagrams at first
+ and it's recommended to
+ keep 3D coordinates near order 1 (default MetaPost units).
+ </p>
+ <p>
+ All <tt>FEATPOST</tt> macros are build apon the MetaPost
+ <tt>color</tt> variable type. It looks like this:
+ <tscreen><verb>(red,green,blue)</verb>
+ </tscreen>Its components may, nevertheless,
+ be arbtitrary numbers, like:
+ <tscreen><verb>(X,Y,Z)</verb></tscreen>So, the
+ <tt>color</tt> type is adequate to define not only colors but
+ also 3D points and vectors.
+ </p>
+ </sect>
+ <sect>
+ <heading>Small Tutorial</heading>
+ <p>
+ One very minimalistic example program could be:
+ <tscreen><verb>
+beginfig(1);
+ cartaxes(1,1,1);
+endfig;
+end;</verb></tscreen>where <tt>cartaxes</tt> is a
+ <tt>FEATPOST</tt> macro that produces
+ the Cartesian referential.
+ </p>
+ <p>
+ One small example program may be:
+ <tscreen><verb>
+f := 5.4*(1.5,0.5,1);
+Spread := 30;
+beginfig(1);
+ numeric gridstep, sidenumber, i, j, coord, aa, ab, ac;
+ color pa;
+ gridstep = 0.9;
+ sidenumber = 10;
+ coord = 0.5*sidenumber*gridstep;
+ for i=0 upto sidenumber:
+ for j=0 upto sidenumber:
+ pa := (-coord+j*gridstep,-coord+i*gridstep,0);
+ aa := uniformdeviate(360);
+ ab := uniformdeviate(180);
+ ac := uniformdeviate(90);
+ kindofcube( false, false, pa, aa, ab, ac, 0.4, 0.4, 0.9 );
+ endfor;
+ endfor;
+endfig;
+end.</verb></tscreen>where <tt>kindofcube</tt>
+ is a <tt>FEATPOST</tt> macro that produces
+ a rectangular prism (cuboid).
+ </p>
+ <p>
+ <figure>
+ <eps file="../allps/kindofcube.1">
+ <img src="../allpng/kindofcube.1.gs.png">
+ <caption>Example that uses <tt>kindofcube</tt>.</caption>
+ </figure><label id="figkindofcube1">
+ </p>
+ <p>
+ The main variable of any three-dimensional figure is the
+ point of view. <tt>FEATPOST</tt> uses the variable <tt>f</tt>
+ as the point of view. <tt>Spread</tt> is another global
+ variable that controls the size of the projection.
+ </p>
+ <p>
+ Another example may be:
+ <tscreen>
+ <verb>
+f := (13,7,3.5);
+Spread := 35;
+beginfig(1);
+ numeric i, len, wang, reflen, frac, coordg;
+ numeric fws, NumLines, inray, outay;
+ path conepath, cira, cirb, ella, ellb, tuba, tubb, tubc;
+ color axe, aroc, cubevertex, conecenter, conevertex;
+ color allellaxe, ellaaxe, ellbaxe, pca, pea, pcb, peb;
+ frac := 0.5;
+ len := 0.6;
+ wang := 60;
+ axe := (0,cosd(90-wang),sind(90-wang));
+ fws := 4;
+ reflen := 0.2*fws;
+ outay := 0.45*fws;
+ inray := 0.7*outay;
+ coordg := frac*fws;
+ NumLines := 30;
+ HoriZon := -0.5*fws;
+ setthestage( 0.5*NumLines, 2*fws );
+ cubevertex = (0.12*fws,-0.5*fws,-0.5*fws);
+ kindofcube(false,true,cubevertex,180,0,0,0.65*fws,0.2*fws,fws);
+ aroc := outay*(0,cosd(wang),sind(wang))-0.5*(0,fws,fws);
+ rigorousdisc( inray, true, aroc, outay, axe*len );
+ allellaxe := reflen*( 0.707, 0.707, 0 );
+ ellaaxe := reflen*( 0.707, -0.707, 1.0 );
+ ellbaxe := reflen*( -0.707, 0.707, 1.0 );
+ conecenter = ( coordg, coordg, -0.5*fws );
+ pca := ( coordg, -coordg, -0.5*fws );
+ pcb := ( -coordg, coordg, -0.5*fws );
+ pea := ( coordg, -coordg, 0.9*fws );
+ peb := ( -coordg, coordg, 0.9*fws );
+ cira := goodcirclepath( pca, blue, reflen );
+ cirb := goodcirclepath( pcb, blue, reflen );
+ ella := ellipticpath( pea, allellaxe, ellaaxe );
+ ellb := ellipticpath( peb, allellaxe, ellbaxe );
+ tuba := twocyclestogether( cira, ella );
+ tubb := twocyclestogether( cirb, ellb );
+ tubc := twocyclestogether( ella, ellb );
+ unfill tubb; draw tubb;
+ unfill tubc; draw tubc;
+ unfill tuba; draw tuba;
+ conevertex = conecenter + ( -3.5*reflen, 0, 0.8*fws );
+ verygoodcone(false,conecenter,blue,reflen,conevertex);
+endfig;
+end.</verb></tscreen>where we find a <tt>rigorousdisc</tt>
+ and a <tt>verygoodcone</tt>
+ (the nicest <tt>FEATPOST</tt> macros) in addition to
+ <tt>setthestage</tt>, <tt>twocyclestogether</tt> and
+ <tt>kindofcube</tt>.
+ </p>
+ <p>
+ <figure>
+ <eps file="../allps/stageforthree.1">
+ <img src="../allpng/stageforthree.1.gs.png">
+ <caption>Example that uses <tt>rigorousdisc</tt> and
+ <tt>verygoodcone</tt>.</caption>
+ </figure><label id="figstageforthree">
+ </p>
+ <sect1>
+ <heading>Mechanics</heading>
+ <p>
+ The following is the sequence of steps necessary to produce
+ the diagrams.
+ <enum>
+ <item>There are two methods that one can use to instruct
+ MetaPost to process the TeX parts of the input file with
+ LaTeX instead of plain TeX. One is to put a first
+ line containing just <code>%&latex</code> in
+ the file. This is the simplest method, but it doesn't
+ work on all systems. Alternately, you can set the
+ environment variable <tt>TEX</tt> to "<tt>latex</tt>",
+ like: <code>export TEX=latex</code> or run
+ <tt>mpost</tt> with a command-line option, like:
+ <code>mpost --tex=latex myfile.mp</code> (this text was
+ originally written by Brooks Moses)
+ </item>
+ <item>
+ Make your MetaPost program know <tt>FEATPOST</tt> macros.
+ This may be accomplished in two ways:
+ <itemize>
+ <item>
+ Insert the line:
+ <tscreen><verb>input featpost3Dplus2D;</verb></tscreen>at
+ the beginning
+ of your program and
+ then enter the shell command
+ <code>mpost yourprogram.mp</code> or
+ </item>
+ <item>
+ Pre-compile the macros into a <tt>mem</tt> file,
+ for instance:
+ <code>mpost -ini featpost</code> and then run your
+ program with
+ <code>mpost -mem featpost yourprogram.mp</code>
+ </item>
+ </itemize>
+ </item>
+ <item>
+ If your program contains LaTeX text you may insert, at the
+ beginning, the lines
+ <tscreen><verb>
+verbatimtex
+\documentclass{article}
+\begin{document}
+etex</verb></tscreen>and at the end
+ <tscreen><verb>
+verbatimtex
+\end{document}
+etex</verb></tscreen>or make use of the
+<url url="http://www.ctan.org/tex-archive/graphics/metapost/contrib/macros/latexmp/" name="latexmp"> package.</item>
+ <item>
+ Pass the produced figure(s) through <tt>dvips</tt>
+ if they contain any text. You may do this with the provided
+ shell script <tt>laproof</tt>.
+ <code>laproof yourprogram N</code> where <tt>N</tt>
+ is the figure number. This
+ script produces an EPS figure that may be viewed with
+ <tt>gv</tt> but that should not be inserted in LaTeX
+ documents. Insert the original figure in LaTeX
+ documents. Instead of <tt>laproof</tt> you may just as
+ well use <url
+ url="http://www.ida.liu.se/~joned/download/mps2eps/"
+ name="MPS2EPS"> or <url
+ url="http://www.iee.et.tu-dresden.de/~fimmel/metapost.html" name="metapost.pl">.
+ </item>
+ </enum>
+ </p>
+ </sect1>
+ <sect1>
+ <heading>Main Features</heading>
+ <sect2>
+ <heading>Perspectives</heading>
+ <p>
+ <tt>FEATPOST</tt> can do three kinds of perspective.
+ <tscreen>
+ <verb>
+f := ( 1.2 , 2.0 , 1.6 );
+Spread := 75;
+
+V1 := (1,1,1);
+V2 := (-1,1,1);
+V3 := (-1,-1,1);
+V4 := (1,-1,1);
+V5 := (1,1,-1);
+V6 := (-1,1,-1);
+V7 := (-1,-1,-1);
+V8 := (1,-1,-1);
+makeface1(1,2,3,4);makeface2(5,6,7,8);
+makeface3(1,2,6,5);makeface4(2,3,7,6);
+makeface5(3,4,8,7);makeface6(4,1,5,8);
+makeline1(1,7);makeline2(2,8);
+makeline3(3,5);makeline4(4,6);
+
+beginfig(1);
+ ParallelProj := true;
+ SphericalDistortion := false;
+ draw_all_test(red,true);
+endfig;
+
+beginfig(2);
+ ParallelProj := false;
+ SphericalDistortion := false;
+ draw_all_test(green,true);
+endfig;
+
+beginfig(3);
+ ParallelProj := false;
+ SphericalDistortion := true;
+ PrintStep := 5;
+ draw_all_test(blue,true);
+endfig;
+
+end;</verb>
+ </tscreen>
+ </p>
+ <p>
+ <figure>
+ <eps file="../allps/cubicfigures.1">
+ <img src="../allpng/cubicfigures.1.gs.png">
+ <caption>Orthogonal perspective.</caption>
+ </figure><label id="figcubicfigures1">
+ </p>
+ <p>
+ <figure>
+ <eps file="../allps/cubicfigures.2">
+ <img src="../allpng/cubicfigures.2.gs.png">
+ <caption>Rigorous perspective.</caption>
+ </figure><label id="figcubicfigures2">
+ </p>
+ <p>
+ <figure>
+ <eps file="../allps/cubicfigures.3">
+ <img src="../allpng/cubicfigures.3.gs.png">
+ <caption>Fish-eye perspective.</caption>
+ </figure><label id="figcubicfigures3">
+ </p>
+ </sect2>
+ <sect2>
+ <heading>From 3D to 2D</heading>
+ <p>
+ The most important macro is <tt>rp</tt> that converts 3D points
+ to two-dimensional (2D) rigorous, orthogonal
+ or fish-eye projections. To draw a line in
+ 3D-space try
+ <tscreen><verb>draw rp(a)--rp(b);</verb></tscreen>where
+ <tt>a</tt> and <tt>b</tt> are points in space
+ (of <tt>color</tt> type).
+ But if you're going for fish-eye it's better to
+ <tscreen><verb>draw pathofstraightline(a,b);</verb></tscreen>If
+ you don't know, leave it as
+ <tscreen><verb>drawsegment(a,b);</verb></tscreen>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Angles</heading>
+ <p>
+ When <tt>FEATPOST</tt> was created its main ability was
+ to mark and to calculate angles. This is done with the
+ macros <tt>angline</tt> and <tt>getangle</tt> as in the
+ following program:
+ <tscreen>
+ <verb>
+f := (5,3.5,1);
+beginfig(2);
+ cartaxes(1,1,1);
+ color va, vb, vc, vd;
+ va = (0.29,0.7,1.0);
+ vb = (X(va),Y(va),0);
+ vc = N((-Y(va),X(va),0));
+ vd = (0,Y(vc),0);
+ drawarrow rp(black)--rp(va);
+ draw rp(black)--rp(vb)--rp(va) dashed evenly;
+ draw rp(vc)--rp(vd) dashed evenly;
+ drawarrow rp(black)--rp(vc);
+ squareangline( va, vc, black, 0.15 );
+ angline(va,red,black,0.75,decimal getangle(va,red),lft);
+endfig;</verb>
+ </tscreen><figure>
+ <eps file="../allps/cartaxes.2">
+ <img src="../allpng/cartaxes.2.gs.png">
+ <caption>Example that uses <tt>cartaxes</tt>,
+ <tt>angline</tt> and <tt>getangle</tt>.</caption>
+ </figure><label id="figcartaxes2">
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Intersections</heading>
+ <p>
+ The most advanced feature of <tt>FEATPOST</tt> is the
+ ability to calculate the intersections of planar and
+ convex polygons<footnote>Unfortunately, this is also the
+ most "bugged" feature.</footnote>. It can draw the visible
+ part of arbitrary sets of polygons as in
+ the following program:
+ <tscreen>
+ <verb>
+numeric phi;
+phi = 0.5*(1+sqrt(5));
+V1 := ( 1, phi,0);V2 := (-1, phi,0);
+V3 := (-1,-phi,0);V4 := ( 1,-phi,0);
+V5 := (0, 1, phi);V6 := (0,-1, phi);
+V7 := (0,-1,-phi);V8 := (0, 1,-phi);
+V9 := ( phi,0, 1);V10:= ( phi,0,-1);
+V11:= (-phi,0,-1);V12:= (-phi,0, 1);
+makeface1(1,2,3,4);makeface2(5,6,7,8);
+makeface3(9,10,11,12);
+beginfig(1);
+ sharpraytrace;
+endfig;
+end</verb></tscreen>
+ </p>
+ <p>
+ <figure>
+ <eps file="../allps/sharpraytrace.1">
+ <img src="../allpng/sharpraytrace.1.gs.png">
+ <caption>Example that uses <tt>sharpraytrace</tt>.</caption>
+ </figure><label id="figsharpraytrace">
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Coming back to 3D from 2D</heading>
+ <p>
+ It is now possible to do an "automatic perspective tuning"
+ with the aid of macro <tt>photoreverse</tt> which is under
+ development. Please, refer to example
+ <tt>photoreverse.mp</tt> and to <url url="http://matagalatlante.org/nobre/hyt/technicaldrawfromphoto.html" name="FeatPost Deeper Technicalities">.
+ </p>
+ <p>
+ <figure>
+ <eps file="../alleps/photoreverse.1.eps">
+ <img src="../allpng/photoreverse.1.gs.png">
+ <caption>Example that uses <tt>photoreverse</tt>. It may
+ not work when vertical lines are not vertical in
+ average on the photo.</caption>
+ </figure><label id="figphotoreverse">
+ </p>
+ <sect3>
+ <heading>Coming back to 3D from 1D</heading>
+ <p>
+ Using the same algorithm of <tt>photoreverse</tt>, the
+ macro <tt>improvertex</tt> allows one to approximate a
+ point in 3D-space with given distances from three other
+ points (an initial guess is required).
+ </p>
+ </sect3>
+ </sect2>
+ </sect1>
+ </sect>
+ <sect>
+ <heading>Reference Manual</heading>
+ <p>
+ Some words about notation.
+ The meaning of macro, function, procedure and routine is the same.
+ Global variables are presented like this:
+ <tscreen>
+ <verb>
+vartype var, anothervar
+anothervartype yetanothervar</verb>
+ </tscreen>Explanation of var, anothervar and
+ yetanothervar. vartype can be any one of
+ MetaPost types but the meaning
+ of <tt>color</tt> is a three-dimensional point or vector, not an
+ actual color like yellow, black or white. If the meaning is
+ an actual color then the type will be <tt>colour</tt>.
+ All global variables have default values.
+ </p>
+ <p>
+ Functions are presented like this:
+ <itemize>
+ <item>returntype <bf>function()</bf>
+ Explanation of function. returntype can be any one of MetaPost
+ types plus global, draw or drawlabel.
+ global means that the function
+ changes some of the global variables. draw means that
+ the function
+ changes the currentpicture. drawlabel means that the
+ function changes
+ the currentpicture and adds text to it.
+ <enum>
+ <item> <tt>type1</tt>
+ Explanation of the first argument. The type of
+ one argument can be any one
+ of MetaPost types plus <tt>suffix</tt> or
+ <tt>text</tt>.</item>
+ <item> <tt>type2</tt>
+ Explanation of the second argument.
+ There is the possibility that the
+ function has no arguments. In that case the
+ function is presented like
+ "returntype <bf>function</bf>".</item>
+ <item> Etc.</item>
+ </enum>
+ </item>
+ </itemize>
+ </p>
+ <sect1>
+ <heading>Global variables</heading>
+ <p>
+ <tscreen>
+ <verb>
+boolean ParallelProj
+boolean SphericalDistortion</verb>
+ </tscreen>Kind of projection calculated by <tt>rp</tt>.
+ By default projections
+ are rigorous but if <tt>ParallelProj</tt> is set
+ <tt>true</tt> then
+ parallel lines remain parallel in the projection.
+ It is the same as
+ placing the point of view infinitely far without loosing
+ sight.
+ If <tt>SphericalDistortion</tt> is set <tt>true</tt>
+ there will be a
+ distortion coming from: (i) the projection being done
+ on a sphere of
+ center <tt>f</tt> and (ii) this sphere being plaited
+ onto the paper page.
+ </p>
+ <p>
+ <figure>
+ <eps file="../allps/rigorousdiscSD.1">
+ <img src="../allpng/rigorousdiscSD.1.gs.png">
+ <caption>Figure that uses <tt>SphericalDistortion:=true</tt>
+ and <tt>rigorousdisc</tt>.</caption>
+ </figure><label id="sphericaldisc">
+ </p>
+ <p>
+ <tscreen>
+ <verb>
+color f, viewcentr</verb>
+ </tscreen>The point of view is <tt>f</tt>. The plane or sphere
+ of projection contains
+ the center of view <tt>viewcentr</tt>.
+ The axis parallel to zz that contains the
+ <tt>viewcentr</tt> is projected on a vertical line.
+ <tscreen>
+ <verb>
+numeric Spread
+pair ShiftV, OriginProjPagePos
+numeric PageWidth
+numeric PageHeight</verb>
+ </tscreen>These variables control
+ the placement of the projection on the
+ paper. <tt>Spread</tt> is the magnification
+ and <tt>ShiftV</tt> is the position of the
+ <tt>viewcentr</tt> projection on the
+ paper. But, if at some point in your program you introduce
+ <tt>produce_auto_scale</tt> then the
+ <tt>currentpicture</tt> will be
+ centered at <tt>OriginProjPagePos</tt>
+ and scaled to fit inside a rectangle of
+ <tt>PageWidth</tt> by <tt>PageHeight</tt>.
+ <tscreen>
+ <verb>
+color V[]
+color L[]p[]
+color F[]p[]</verb>
+ </tscreen>Vertexes, lines and faces.
+ The idea here is to draw
+ polygons and/or arbitrary lines in 3D space.
+ Defining the polygons and
+ the lines can be a bit tedious as <tt>FEATPOST</tt> is not
+ interactive. First, one defines a list of the
+ vertexes (<tt>V[]</tt>) that define the
+ polygons and/or the lines.
+ There is a list of polygons and a list of
+ lines. Each polygon (<tt>F[]p[]</tt>) or
+ line (<tt>L[]p[]</tt>) is itself a list of vertexes.
+ All vertexes of the same poligon should belong
+ to the same plane.
+ <tscreen>
+ <verb>
+numeric NL
+numeric npl[]
+numeric NF
+numeric npf[]</verb>
+ </tscreen>Number of lines, number of vertexes of each line,
+ number of faces, number of vertexes of each face.
+ <tscreen>
+ <verb>
+numeric PrintStep</verb>
+ </tscreen>
+ <tt>Printstep</tt> is the size of iterative jumps
+ along lines. Used by
+ <tt>lineraytrace</tt>, <tt>faceraytrace</tt> and
+ <tt>pathofstraightline</tt>.
+ Big <tt>Printstep</tt>s make fast raytracings.
+ <tscreen>
+ <verb>
+boolean FCD[]
+colour TableC[]
+numeric TableColors
+numeric FC[]
+colour HigColor
+colour SubColor
+color LightSource</verb>
+ </tscreen><tt>FCD</tt> means "face color defined". The
+ <tt>draw_invisible</tt> macro draws
+ polygons in colour, if it is defined. The colour must be
+ selected from the table of colours <tt>TableC</tt> that has
+ as many as <tt>TableColors</tt>. The colour <tt>FC</tt>
+ of each polygon will depend on its position relatively to
+ <tt>LightSource</tt> where we suppose there is a lamp that
+ emits light coloured <tt>HigColor</tt>. Furthermore the
+ colour of each polygon may be modified if it belongs to a
+ functional or parametric surface. In this case, if we are
+ looking at the polygon from below than <tt>SubColor</tt> is
+ subtracted from its colour.
+ <tscreen>
+ <verb>
+numeric RopeColorSeq[]
+numeric RopeColors</verb>
+ </tscreen>
+ These are used by <tt>ropepattern</tt>.
+ <tscreen>
+ <verb>
+numeric TDAtiplen
+numeric TDAhalftipbase
+numeric TDAhalfthick</verb>
+ </tscreen>
+ These control the shape of Three-Dimensional Arrows.
+ <tscreen>
+ <verb>
+boolean ShadowOn
+numeric HoriZon</verb>
+ </tscreen>
+ When <tt>ShadowOn</tt> is set <tt>true</tt>, some objects can
+ cast a black shadow on a horizontal plane of <tt>Z</tt>
+ coordinate equal to <tt>HoriZon</tt> (an area from
+ this plane may be drawn with <tt>setthestage</tt>) as if
+ there is a punctual source of light at
+ <tt>LightSource</tt>.
+ The macros that can produce shadows, in addition to their
+ specific production, are<itemize>
+ <item><tt>emptyline</tt></item>
+ <item><tt>rigorousdisc</tt></item>
+ <item><tt>verygoodcone</tt></item>
+ <item><tt>tropicalglobe</tt></item>
+ <item><tt>whatisthis</tt></item>
+ <item><tt>kindofcube</tt></item>
+ <item><tt>draw_all_test</tt></item>
+ <item><tt>fill_faces</tt></item>
+ <item><tt>positivecharge</tt></item>
+ </itemize>
+ All macros that contain <bf>shadow</bf> in their name
+ calculate the location of shadows (using <tt>cb</tt>).
+ <tscreen>
+ <verb>
+path VGAborder</verb>
+ </tscreen>
+ This path and the macro <tt>produce_vga_border</tt> are
+ meant to help you clip the <tt>currentpicture</tt> to a 4:3
+ rectangle as in a movie frame.
+ <tscreen>
+ <verb>
+pair PhotoPair[]
+color PhotoPoint[]
+numeric PhotoMarks</verb>
+ </tscreen>
+ These are used by <tt>photoreverse</tt>.
+ <tscreen>
+ <verb>
+pen ForePen, BackPen
+path CLPath
+numeric NCL</verb>
+ </tscreen>
+ These are used by <tt>closedline</tt>.
+ </p>
+ </sect1>
+ <sect1>
+ <heading>Definitions</heading>
+ <p>
+ <itemize>
+ <item>global makeline@&num;( text1)</item>
+ <item>global makeface@&num;( text1)</item>
+ </itemize>
+ Both of these functions ease the task of
+ defining lines and polygons. Just
+ provide a list of vertexes in the right
+ sequence for each polygon and/or
+ line. Suppose a tetrahedron
+ <tscreen><verb>
+V3:=(+1,-1,-1);V2:=(-1,+1,-1);
+V4:=(+1,+1,+1);V1:=(-1,-1,+1);
+makeface2(1,2,3);makeface3(1,2,4);
+makeface1(3,4,1);makeface4(3,4,2);</verb></tscreen>The
+ number in the last makeface or last
+ makeline procedure name must be the
+ number of polygons or lines. All polygons and lines from 1 upto this
+ number must be defined but the sorting may be any of your liking.
+ </p>
+ </sect1>
+ <sect1>
+ <heading>Macros</heading>
+ <sect2>
+ <heading>Very Basic Macros</heading>
+ <p>
+ <itemize>
+ <item>numeric <bf>X()</bf>
+ Returns the first coordinate of a point or vector (of
+ color type). Replaces <tt>redpart</tt>.
+ </item>
+ <item>numeric <bf>Y()</bf>
+ Returns the second coordinate of a point or vector.
+ Replaces <tt>greenpart</tt>.
+ </item>
+ <item>numeric <bf>Z()</bf>
+ Returns the second coordinate of a point or vector.
+ Replaces <tt>bluepart</tt>.
+ </item>
+ <item>draw <bf>produce_auto_scale</bf>
+ The currentpicture is centered in, and adjusted
+ to the size of, an A4
+ paper page. This avoids the control of <tt>Spread</tt> and
+ <tt>ShiftV</tt>.
+ </item>
+ <item>string <bf>cstr()</bf> Converts a color into its
+ string. Usefull in combination with <tt>getready</tt>.
+ </item>
+ <item>string <bf>bstr()</bf> Converts a boolean
+ expression into its
+ string. Usefull in combination with <tt>getready</tt>.
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Vector Calculus</heading>
+ <p>
+ <itemize>
+ <item>color <bf>N()</bf> Unit vector. Returns
+ <tt>black</tt> (the null vector) when the argument has
+ null norm. The "N" means "normalized".</item>
+ <item>numeric <bf>cdotprod()</bf> Dot product of two
+ vectors.</item>
+ <item>color <bf>ccrossprod()</bf> Cross product of two
+ vectors.</item>
+ <item>numeric <bf>ndotprod()</bf> Cossine of the angle
+ beetween two vectors.</item>
+ <item>color <bf>ncrossprod()</bf> Normalized cross product
+ of twovectors.</item>
+ <item>numeric <bf>conorm()</bf> Euclidean norm of a
+ vector.</item>
+ <item>numeric <bf>getangle()</bf> Angle beetween two
+ vectors.</item>
+ <item>pair <bf>getanglepair()</bf> Orientation angles
+ of a vector. The first angle (<tt>xpart</tt>) is
+ measured beetween the vector projection on the <tt>XY</tt>
+ plane and the <tt>X</tt> axis. The second angle
+ (<tt>ypart</tt>)is measured
+ beetween the vector and its projection on the <tt>XY</tt>
+ plane. This may be usefull to find the arguments of
+ <tt>kindofcube</tt></item>
+ <item>color <bf>eulerrotation()</bf> Three-dimensional
+ rotation of a vector. See the figure explaining
+ <tt>kindofcube</tt> to visualize the following
+ movement: (i) grab the <tt>X</tt> component of the
+ vector; (ii) rotate it on the <tt>XY</tt> plane as
+ much as the first argument;
+ (iii) raise it up as much as the second argument; and
+ (iv) turn it around as much as the third argument.
+ <enum>
+ <item><tt>numeric</tt> Angle of rotation around the
+ <tt>Z</tt> component.</item>
+ <item><tt>numeric</tt> Angle of rotation around the
+ rotated <tt>Y</tt> component.</item>
+ <item><tt>numeric</tt> Angle of rotation around the
+ two times rotated <tt>X</tt> component.</item>
+ <item><tt>color</tt> Vector to be rotated.</item>
+ </enum>
+ </item>
+ <item>color <bf>randomfear</bf> Generates a randomly
+ oriented unit vector.
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Projection Macros</heading>
+ <p>
+ <itemize>
+ <item>pair <bf>rp()</bf> Converts spatial positions into
+ planar positions on the paper page. The conversion
+ considers the values of the following global
+ variables: <tt>viewcentr</tt>,
+ <tt>ParallelProj</tt>, <tt>SphericalDistortion</tt>,
+ <tt>Spread</tt> and <tt>ShiftV</tt>. When both
+ <tt>ParallelProj</tt> and <tt>SphericalDistortion</tt>
+ are <tt>false</tt> it won't work if either (i) the
+ vectors <tt>f-viewcentr</tt> and <tt>f-R</tt> are
+ perpendicular (<tt>R</tt> is the argument) or (ii)
+ <tt>f</tt> and <tt>viewcentr</tt> share the same
+ <tt>X</tt> and <tt>Y</tt> coordinates. <enum>
+ <item><tt>color</tt> Spatial position.</item>
+ </enum>
+ </item>
+ <item>color <bf>cb()</bf> Calculates the position of the
+ shadow of a point. Uses <tt>HoriZon</tt> and
+ <tt>LightSource</tt>.
+ <enum>
+ <item><tt>color</tt> Point position.</item>
+ </enum>
+ </item>
+ <item>color <bf>projectpoint()</bf> Calculates the
+ intersection beetween a plane and a straight
+ line. The plane contains a given point and is
+ perpendicular to the line connecting the
+ <tt>LightSource</tt> and this same point.
+ The line is defined by another given point and the
+ <tt>LightSource</tt>. Summary: <tt>projectpoint</tt>
+ returns the projection of the second argument on a
+ plane that contains the first argument. Can be used to
+ draw shadows cast on generic planes.
+ <enum>
+ <item><tt>color</tt> Origin of the projection plane.</item>
+ <item><tt>color</tt> Point to be projected.</item>
+ </enum>
+ </item>
+ <item>color <bf>lineintersectplan()</bf> Calculates the
+ intersection beetween a generic plane and a straight
+ line. The plane contains a given point and is
+ perpendicular to a given vector.
+ The line contains a given point and is parallel to
+ a given vector.
+ <enum>
+ <item><tt>color</tt> Point of the line.</item>
+ <item><tt>color</tt> Vector parallel to the line.</item>
+ <item><tt>color</tt> Point of the projection plane.</item>
+ <item><tt>color</tt> Vector perpendicular to the
+ projection plane.</item>
+ </enum>
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Plain Basic Macros</heading>
+ <p>
+ <itemize>
+ <item>draw <bf>signalvertex()</bf> Draws a dot
+ sized inversely proportional to its distance from
+ the viewpoint <tt>f</tt>.
+ <enum>
+ <item><tt>color</tt> Location.</item>
+ <item><tt>numeric</tt> Factor of proportionality
+ ("size of the dot").</item>
+ <item><tt>colour</tt> Colour of the dot.</item>
+ </enum>
+ <figure>
+ <eps file="../allps/torus.1">
+ <img src="../allpng/torus.1.gs.png">
+ <caption>Figure that uses <tt>signalvertex</tt>.</caption>
+ </figure>
+ </item>
+ <item>path <bf>pathofstraightline()</bf> When using
+ <tt>SphericalDistortion:=true</tt>, straight lines
+ look like curves. This macro returns the curved path
+ of a straight line beetween two points. This path will
+ have a greater <tt>length</tt> ("time") when
+ <tt>PrintStep</tt> is made smaller.</item>
+ <item>draw <bf>drawsegment()</bf> Alternative
+ <tt>pathofstraightline</tt> that avoids the
+ calculation of all the intermediate points when
+ <tt>SphericalDistortion:=false</tt>.
+ <item>drawlabel <bf>cartaxes()</bf>
+ Cartesean axis with prescribed lenghtes and apropriate labels.
+ <enum>
+ <item><tt>numeric</tt> Length of the <tt>X</tt> axis.</item>
+ <item><tt>numeric</tt> Length of the <tt>Y</tt> axis.</item>
+ <item><tt>numeric</tt> Length of the <tt>Z</tt> axis.</item>
+ </enum>
+ </item>
+ <item>draw <bf>emptyline()</bf> This procedure produces
+ a sort of a tube that can cross over itself. It
+ facilitates the drawing of, for instance, thick
+ helical curves but it won't
+ look right if the curves are drawn getting apart from
+ the point of view. Please, accept this inconveniance.
+ As like many other <tt>FEATPOST</tt> macros this one
+ can produce visually correct diagrams only in limited
+ conditions. Can cast a shadow.
+ <enum>
+ <item><tt>boolean</tt> Choose <tt>true</tt> to join
+ this line with a previously drawn line.</item>
+ <item><tt>numeric</tt> Factor of proportionality
+ ("diameter of the tube"). The tubes are just
+ sequences of dots drawn by <tt>signalvertex</tt>.</item>
+ <item><tt>colour</tt> Colour of the tube border.</item>
+ <item><tt>colour</tt> Colour of the tube.</item>
+ <item><tt>numeric</tt> Total number of dots on the
+ tube line.</item>
+ <item><tt>numeric</tt> Fraction of the tube diameter
+ that is drawn with the tube colour.</item>
+ <item><tt>numeric</tt> This is the number of dots
+ that are redrawn with the colour of the tube for
+ each drawn dot with the color of the tube
+ border. Usually 1 or 2 are enough.</item>
+ <item><tt>text</tt> This is the name a function
+ that returns a 3D point of the line for each value
+ of a parameter in beetween 0 and 1.
+ </item>
+ </enum>
+ <figure>
+ <eps file="../allps/joinedemptylines.1">
+ <img src="../allpng/joinedemptylines.1.gs.png">
+ <caption>Figure that uses <tt>emptyline</tt>.
+ The junction point of two different lines is indicated
+ by an arrow. Note the unperfection on the top
+ right, inside the upper turn. </caption>
+ </figure><label id="joinedemptylines">
+ </item>
+ <item>draw <bf>closedline()</bf> This procedure produces
+ a tube that can cross over itself. It
+ facilitates the drawing of, for instance, thick
+ helical curves but it won't
+ look right as its thickness does not change with the
+ distance from the point of view. The drawing is
+ entirely done in two dimensions, so the tube diameter
+ depends on the global variables <tt>ForePen</tt> and
+ <tt>BackPen</tt>. There can be more than one
+ line in a figure but all get the same diameter.
+ When calling <tt>closedline()</tt> in different
+ figures of the same program you must reinitialize both
+ <tt>NCL</tt> and <tt>Nobjects</tt> (because
+ <tt>closedline()</tt> uses <tt>getready()</tt>).
+ <enum>
+ <item><tt>boolean</tt> Value of "the line is closed".
+ </item>
+ <item><tt>numeric</tt> Total number of path segments
+ on the tube line.</item>
+ <item><tt>numeric</tt> Use 0.5 or more.</item>
+ <item><tt>numeric</tt> Use 0.75 or more.</item>
+ <item><tt>text</tt> This is the name of a function
+ that returns a 3D point of the line for each value
+ of a parameter in beetween 0 and 1.
+ </item>
+ </enum>
+ </item>
+ <item>drawlabel <bf>angline()</bf>
+ Draws an arch beetween two straight lines with a
+ common point and places a label
+ near the middle of the arch (marks an
+ angle). Note that the arch is not circular.
+ <enum>
+ <item><tt>color</tt> Point of one line.</item>
+ <item><tt>color</tt> Point ot the other line.</item>
+ <item><tt>color</tt> Common point.</item>
+ <item><tt>numeric</tt> Distance beetween the arch and
+ the common point.</item>
+ <item><tt>picture</tt> Label.</item>
+ <item><tt>suffix</tt> Position of the label relatively
+ to the middle of the arch. May
+ be one of <tt>lft, rt, top, bot, ulft, urt,
+ llft</tt> and <tt>lrt</tt>.</item>
+ </enum>
+ </item>
+ <item>drawlabel <bf>anglinen()</bf>
+ The same as the previous function but the
+ sixth argument is numeric:
+ 0=<tt>rt</tt>;
+ 1=<tt>urt</tt>;
+ 2=<tt>top</tt>;
+ 3=<tt>ulft</tt>;
+ 4=<tt>lft</tt>;
+ 5=<tt>llft</tt>;
+ 6=<tt>bot</tt>;
+ 7=<tt>lrt</tt>;
+ any other number places the label
+ on the middle of the arch.</item>
+ <item>draw <bf>squareangline()</bf>
+ This is supposed to mark 90 degree angles
+ but works for any angle value.
+ <enum>
+ <item><tt>color</tt> Point of one line.</item>
+ <item><tt>color</tt> Point ot the other line.</item>
+ <item><tt>color</tt> Common point.</item>
+ <item><tt>numeric</tt> Distance beetween the "arch"
+ and the common point.</item>
+ </enum>
+ </item>
+ <item>path <bf>rigorouscircle()</bf>
+ 3D circle. The total "time" of this path is 8. This
+ small number makes it easy to select parts of the
+ path. The circle is drawn using the
+ "left-hand-rule". If you put your left-hand thumb
+ parallel the circle axis then the other left-hand
+ fingers curl in the same sense as the circle
+ path. This path allways starts, approching the view
+ point, from a point on a diameter of the
+ circle that projects orthogonaly to its axis, and
+ rotating around the axis in the way of the left-hand-rule.
+ <enum>
+ <item><tt>color</tt> Center of the circle.</item>
+ <item><tt>color</tt> Direction orthogonal to the
+ circle (circle axis).</item>
+ <item><tt>numeric</tt> Radius of the circle.</item>
+ </enum>
+ <figure>
+ <eps file="../allps/anglinerigorouscircle.1">
+ <img src="../allpng/anglinerigorouscircle.1.gs.png">
+ <caption>Figure that uses <tt>anglinen</tt>
+ and <tt>rigorouscircle</tt>.</caption>
+ </figure>
+ </item>
+ <item>draw <bf>tdarrow()</bf> Draws a flat arrow that
+ begins at the first argument and ends at the second.
+ The shape of the arrow is controled by the global
+ variables <tt>TDAtiplen, TDAhalftipbase, TDAhalfthick</tt>.
+ </item>
+ <item>path <bf>twocyclestogether()</bf> This macro
+ allows you to draw any solid that has no vertexes
+ and that has two, exactly two, planar cyclic edges.
+ In fact, it doesn't need to be a solid. Just
+ provide the pathes of both cyclic edges as arguments
+ but note that the returned path is polygonal.
+ In order to complete
+ the drawing of this solid you have to choose one of
+ the edges to be drawn immediatly afterwards. This is
+ done automatically by the <tt>whatisthis</tt> macro
+ for the case of two parallel and concentric ellipses.
+ </item>
+ <item>path <bf>ellipticpath()</bf> Produces an elliptic
+ path in 3D space.
+ <enum>
+ <item><tt>color</tt> Position of the center.</item>
+ <item><tt>color</tt> Major or minor axis.</item>
+ <item><tt>color</tt> The other axis.</item>
+ </enum>
+ </item>
+ <item>drawlabel <bf>labelinspace()</bf> Draw some 2D
+ <tt>picture</tt> on some 3D plane (only when
+ <tt>ParallelProj:=true</tt>).
+ <enum>
+ <item><tt>color</tt> Position for the lower-left
+ corner. </item>
+ <item><tt>color</tt> Orientation of the picture's
+ bottom edge.</item>
+ <item><tt>color</tt> Orientation of the picture's
+ letf edge.</item>
+ <item><tt>text</tt> 2D picture's name.</item>
+ </enum>
+ <figure>
+ <eps file="../allps/labelinspace.1">
+ <img src="../allpng/labelinspace.1.gs.png">
+ <caption>Example that uses <tt>labelinspace</tt>.</caption>
+ </figure>
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Standard Objects</heading>
+ <p>
+ <itemize>
+ <item>path <bf>goodcirclepath()</bf>
+ Another 3D circle macro. More rigorous
+ than <tt>rigorouscircle</tt> but when
+ the direction ortogonal to the circle is almost
+ orthogonal to the line <tt>viewpoint--center</tt>
+ it doesn't work correctly.
+ The total "time" of this path is 36.
+ <enum>
+ <item><tt>color</tt> Center of the circle.</item>
+ <item><tt>color</tt> Direction ortogonal to
+ the circle.</item>
+ <item><tt>numeric</tt> Radius of the
+ circle.</item>
+ </enum>
+ </item>
+ <item>draw <bf>spatialhalfsfear()</bf> An
+ hemisphere. Doesn't work with <tt>f</tt> inside it.
+ <enum>
+ <item><tt>color</tt> Center.</item>
+ <item><tt>color</tt> Vector ortogonal to
+ the frontier circle and pointing
+ out of the concavity.</item>
+ <item><tt>numeric</tt> Radius of the
+ (hemi)sphere.</item>
+ </enum>
+ </item>
+ <item>path <bf>spatialhalfcircle()</bf>
+ And yet another 3D circle macro. Only the visible or the hidden
+ part. This is usefull to mark sections of
+ cylinders or spherical major circles.
+ <enum>
+ <item><tt>color</tt> Center of the circle.</item>
+ <item><tt>color</tt> Direction ortogonal to the
+ circle.</item>
+ <item><tt>numeric</tt> Radius of the circle.</item>
+ <item><tt>boolean</tt> The visible part is selected with
+ <tt>true</tt> and the hidden
+ with <tt>false</tt>.</item>
+ </enum>
+ </item>
+ <item>draw <bf>rigorousdisc()</bf>
+ 3D opaque cylinder with/without a hole. Can cast a
+ shadow (without the hole).
+ <enum>
+ <item><tt>numeric</tt> Ray of an axial hole.</item>
+ <item><tt>boolean</tt> Option for completly opaque cylinder
+ (<tt>true</tt>) or partial
+ pipe (<tt>false</tt>) when there is no hole. When
+ the cylinder has an hole this option should be
+ <tt>true</tt>.</item>
+ <item><tt>color</tt> Center of one circular base.</item>
+ <item><tt>numeric</tt> Radius of both circular bases.</item>
+ <item><tt>color</tt> Vector that defines the length and
+ orientation of the
+ cylinder. The addition the third and fifth
+ arguments should give the
+ position of the center of the other circular base.
+ </item>
+ </enum>
+ </item>
+ <item>draw <bf>verygoodcone()</bf> 3D cone. Can cast a shadow.
+ <enum>
+ <item><tt>bolean</tt> Option to draw dashed evenly
+ the invisible edge (<tt>true</tt>) or not
+ (<tt>false</tt>).</item>
+ <item><tt>color</tt> Center of the circular base.</item>
+ <item><tt>color</tt> Direction ortogonal to the
+ circular base.</item>
+ <item><tt>numeric</tt> Radius of the circular base.</item>
+ <item><tt>color</tt> Position of the vertex</item>
+ </enum>
+ </item>
+ <item>path <bf>rigorousfearpath()</bf>
+ 3D sphere. Simple but hard.
+ <enum>
+ <item><tt>color</tt> Center position.</item>
+ <item><tt>numeric</tt> Radius.</item>
+ </enum>
+ </item>
+ <item>draw <bf>tropicalglobe()</bf> Globe with
+ minor circles. Can cast a shadow.
+ <enum>
+ <item><tt>numeric</tt> Number of marked latitudes.</item>
+ <item><tt>color</tt> Center position.</item>
+ <item><tt>numeric</tt> Radius</item>
+ <item><tt>color</tt> Axis orientation.</item>
+ </enum>
+ <figure>
+ <eps file="../allps/tropicalglobe.1">
+ <img src="../allpng/tropicalglobe.1.gs.png">
+ <caption>Figure that uses <tt>tropicalglobe</tt>.
+ </caption>
+ </figure>
+ </item>
+ <item>draw <bf>whatisthis()</bf> An elliptic
+ frustum. Both edges are elliptic an have the same
+ orientation but one may be greater than the other.
+ Can cast a shadow.
+ <enum>
+ <item><tt>color</tt> Reference edge center.</item>
+ <item><tt>color</tt> Major or minor axis.</item>
+ <item><tt>color</tt> The other axis.</item>
+ <item><tt>numeric</tt> Length of the original
+ cylinder.</item>
+ <item><tt>numeric</tt> Edges axis length ratio.</item>
+ </enum>
+ </item>
+ <item>draw <bf>kindofcube()</bf> Polyhedron with six
+ orthogonal faces (cuboid).
+ <enum>
+ <item><tt>boolean</tt> Also draw the invisible edges
+ <tt>dashed evenly</tt> (<tt>true</tt>) or do not.</item>
+ <item><tt>boolean</tt> The reference point may be a
+ vertex (<tt>true</tt>) or the center(<tt>false</tt>).</item>
+ <item><tt>color</tt> Reference point.</item>
+ <item><tt>numeric</tt> Alpha1.</item>
+ <item><tt>numeric</tt> Alpha2.</item>
+ <item><tt>numeric</tt> Alpha3.</item>
+ <item><tt>numeric</tt> L1. Length of the first side.</item>
+ <item><tt>numeric</tt> L2. Length of the second side.</item>
+ <item><tt>numeric</tt> L3. Length of the third side.</item>
+ </enum>
+ These arguments are represented in the next figure.
+ <figure>
+ <eps file="../allps/kindofcube.2">
+ <img src="../allpng/kindofcube.2.gs.png">
+ <caption>Figure that uses and explains
+ <tt>kindofcube</tt>. Note that the three indicated
+ angles may be used as arguments of <tt>eulerrotation</tt>.</caption>
+ </figure><label id="kindofcube2">
+ </item>
+ <item>draw <bf>setthestage()</bf> Produces an horizontal
+ square made of squares. Its <tt>Z</tt> coordinate is defined by
+ <tt>HoriZon</tt>.
+ <enum>
+ <item><tt>numeric</tt> Number of squares in each side.</item>
+ <item><tt>numeric</tt> Size of each side.</item>
+ </enum>
+ </item>
+ <item>draw <bf>setthearena()</bf> Produces an horizontal
+ circle made of circles. Its <tt>Z</tt> coordinate is defined by
+ <tt>HoriZon</tt>. Due to the fact that the center of a
+ circle is not on the center of its central perspective
+ projection, this may look a bit strange.
+ <enum>
+ <item><tt>numeric</tt> Number of circles on a
+ diameter.</item>
+ <item><tt>numeric</tt> Diameter.</item>
+ </enum>
+ </item>
+ <item>draw <bf>smoothtorus()</bf> Toxic donut (not to be
+ eaten). Produces an error message when <tt>f</tt> is
+ close to the table.
+ <enum>
+ <item><tt>color</tt> Center.</item>
+ <item><tt>color</tt> Direction orthogonal to the
+ torus plane.</item>
+ <item><tt>numeric</tt> Big ray.</item>
+ <item><tt>numeric</tt> Small ray.</item>
+ </enum>
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Composed Objects</heading>
+ <p>
+ <itemize>
+ <item>draw <bf>positivecharge()</bf> Draws a sphere with a
+ plus or minus sign on the surface. The horizontal
+ segment of the sign is drawn on the horizontal plane
+ that contains the sphere center. The middle point of
+ this segment is on a vertical plane containing the
+ viewpoint.
+ <enum>
+ <item><tt>boolean</tt> Selects the sign (<tt>true</tt>
+ means positive).</item>
+ <item><tt>color</tt> Position of the center.</item>
+ <item><tt>numeric</tt> Sphere ray.</item>
+ </enum>
+ <figure>
+ <eps file="../allps/positivecharge.1">
+ <img src="../allpng/positivecharge.1.gs.png">
+ <caption>Figure that uses <tt>positivecharge</tt>,
+ <tt>getready</tt> and <tt>doitnow</tt>.
+ </caption>
+ </figure></item>
+ <item>draw <bf>simplecar()</bf> Draws a cuboid and four
+ discs in a configuration ressembling an automobile. The
+ first three arguments of <tt>simplecar</tt> are the same
+ as the the last seven arguments of <tt>kindofcube</tt>
+ but grouped in colors.
+ <enum>
+ <item><tt>color</tt> Center of the cuboid that
+ constitutes the body of the car..</item>
+ <item><tt>color</tt> Angles defining the orientation
+ of the car (see <tt>kindofcube</tt>).</item>
+ <item><tt>color</tt> Dimensions of the car.</item>
+ <item><tt>color</tt> Characteristics of the front
+ wheels. <tt>redpart</tt>-distance from the
+ front. <tt>greenpart</tt>-width of the front wheels (length
+ of the cylinders). <tt>bluepart</tt>-wheel ray.</item>
+ <item><tt>color</tt> Same as above for the rear wheels</item>
+ </enum>
+ <figure>
+ <eps file="../allps/simplecar.1">
+ <img src="../allpng/simplecar.1.gs.png">
+ <caption>Figure that uses <tt>setthearena</tt> and
+ <tt>simplecar</tt>.
+ </caption>
+ </figure></item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Shadow Pathes</heading>
+ <p>
+ <itemize>
+ <item>draw <bf>signalshadowvertex()</bf> Draws the
+ shadow of a <tt>signalvertex</tt> dot.
+ <enum>
+ <item><tt>color</tt> Location of the light-blocking dot.</item>
+ <item><tt>numeric</tt> Factor of proportionality
+ ("size of the dot").</item>
+ <item><tt>colour</tt> Colour of the dot.</item>
+ </enum>
+ </item>
+ <item>path <bf>ellipticshadowpath()</bf> Produces the
+ shadow of an elliptic path.
+ <enum>
+ <item><tt>color</tt> Position of the center.</item>
+ <item><tt>color</tt> Major or minor axis.</item>
+ <item><tt>color</tt> The other axis.</item>
+ </enum>
+ </item>
+ <item>path <bf>circleshadowpath()</bf> Produces the
+ shadow of a circle.
+ <enum>
+ <item><tt>color</tt> Center of the circle.</item>
+ <item><tt>color</tt> Direction ortogonal to
+ the circle.</item>
+ <item><tt>numeric</tt> Radius of the
+ circle.</item>
+ </enum>
+ </item>
+ <item>path <bf>rigorousfearshadowpath()</bf>
+ 3D sphere shadow.
+ <enum>
+ <item><tt>color</tt> Center position.</item>
+ <item><tt>numeric</tt> Radius.</item>
+ </enum>
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Differential Equations</heading>
+ <p>
+ Before we proceed, be aware that solving differential
+ equations (DE) is mainly an experimental activity. The most
+ probable result of a procedure that atempts to solve a DE
+ is garbage. The procedure may be unstable, the solution
+ may be littered with singularities or something may go
+ wrong. If you don't have a basic understanding of
+ differential equations then skip this section, please.
+ </p>
+ <p>
+ <itemize>
+ <item>path <bf>fieldlinepath()</bf> A vectorial field line is
+ everywhere tangent to the field vectors.
+ Two different parallel fields
+ have the same field lines. So the field only
+ constrains the direction of the field lines, not any kind
+ of "speed" and, therefore, it is recommended to
+ normalize the field before using this macro that
+ contains a second-order Runge-Kutta method
+ implementation.
+ <enum>
+ <item><tt>numeric</tt> Total number of steps.</item>
+ <item><tt>color</tt> Initial position.</item>
+ <item><tt>numeric</tt> Step (arc)length.</item>
+ <item><tt>text</tt> Name of the function that
+ returns a field vector for each 3D position.</item>
+ </enum>
+ </item>
+ <item>path <bf>trajectorypath()</bf> The acceleration of a
+ particle in a conservative force field is equal to the
+ ratio (conservative force)/(particle mass). The
+ acceleration is also equal to the second order time
+ derivative of the particle position. This produces a
+ second order differential equation that we solve using a
+ second-order Runge-Kutta method implementation.
+ <enum>
+ <item><tt>numeric</tt> Total number of steps.</item>
+ <item><tt>color</tt> Initial position.</item>
+ <item><tt>color</tt> Initial velocity.</item>
+ <item><tt>numeric</tt> Time step.</item>
+ <item><tt>text</tt> Name of the function that
+ returns a (force/mass) vector for each 3D position.</item>
+ </enum>
+ </item>
+ <item>path <bf>magnetictrajectorypath()</bf> The
+ acceleration of a
+ charged particle in a magnetic field is equal to the
+ ratio (magnetic force)/(particle mass) but the magnetic
+ force depends on both the velocity and the magnetic field. The
+ acceleration is also equal to the second order time
+ derivative of the particle position. This produces a
+ second order differential equation that we solve using a
+ fourth-order Runge-Kutta method implementation.
+ <enum>
+ <item><tt>numeric</tt> Total number of steps.</item>
+ <item><tt>color</tt> Initial position.</item>
+ <item><tt>color</tt> Initial velocity.</item>
+ <item><tt>numeric</tt> Time step.</item>
+ <item><tt>text</tt> Name of the function that
+ returns a (charge)*(magnetic field)/(partcle mass)
+ vector for each 3D position.</item>
+ </enum>
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Renderers</heading>
+ <p>
+ <itemize>
+ <item>draw <bf>sharpraytrace</bf> Heavy procedure that
+ draws only the visible part of all edges of all defined
+ faces. There's no point in using this procedure when
+ there are no intersections beetween faces. Any how
+ this will not work for non-convex faces nor when
+ <tt>SphericalDistortion:=true</tt>.
+ </item>
+ <item>draw <bf>lineraytrace()</bf> Draws only the
+ visible part of all defined lines using sequences of dots
+ (<tt>signalvertex</tt> and <tt>PrintStep</tt>).
+ <enum>
+ <item><tt>numeric</tt> Dot size.</item>
+ <item><tt>colour</tt> Dot colour.</item>
+ </enum>
+ </item>
+ <item>draw <bf>faceraytrace()</bf> Draws only the
+ visible part of all edges of all defined faces
+ using sequences of dots
+ (<tt>signalvertex</tt> and <tt>PrintStep</tt>).
+ <enum>
+ <item><tt>numeric</tt> Dot size.</item>
+ <item><tt>colour</tt> Dot colour.</item>
+ </enum>
+ </item>
+ <item>draw <bf>draw_all_test()</bf> Draws all defined
+ edges (and lines) in a correct way independently of
+ the kind of projection used. Can cast a shadow (but
+ the shadow is not correct when
+ <tt>SphericalDistortion:=true</tt>).
+ <enum>
+ <item><tt>boolean</tt> If <tt>true</tt> the lines
+ are also drawn.</item>
+ </enum>
+ </item>
+ <item>draw <bf>fill_faces()</bf> Unfills and draws all
+ faces in the order they were defined (without
+ sorting). Can cast a shadow.
+ <enum>
+ <item><tt>text</tt> Like the argument of
+ <tt>drawoptions</tt> but used only inside this
+ macro and only for the edges.</item>
+ </enum>
+ </item>
+ <item>draw <bf>draw_invisible()</bf> This is a fast way
+ of removing hidden lines that doesn't
+ allow for intersecting polygons nor
+ polygons of very different area. It works by
+ sorting all polygons by
+ distance to <tt>f</tt> and then by "filling" the
+ polygons. This routine may be used to draw graphs
+ of 3D surfaces.
+ <enum>
+ <item><tt>boolean</tt> If <tt>true</tt> polygons are
+ sorted relatively to
+ nearest vertex and, if <tt>false</tt>, relatively to their
+ mass center. Choose <tt>false</tt> for surface
+ plots.</item>
+ <item><tt>boolean</tt> If <tt>false</tt> then the
+ polygons are painted with their <tt>FC</tt> colour
+ modified by <tt>LightSource</tt>. If <tt>true</tt>
+ then the next two arguments are used and the
+ polygons are darkened proportionaly to their
+ distance from <tt>f</tt>.</item>
+ <item><tt>colour</tt> Colour of faces.</item>
+ <item><tt>colour</tt> Colour of the edges.</item>
+ </enum>
+ </item>
+ <item>global <bf>getready()</bf> When you don't want to
+ edit the source of the MetaPost program, to resort the
+ objects so they'll be drawn correctly, use this macro
+ and the next.
+ <enum>
+ <item><tt>string</tt> Command line that would draw
+ some object. For instance:
+ <tt>"rigorousfearpath(black,1);"</tt>.</item>
+ <item><tt>color</tt> Reference position of that
+ object.</item>
+ </enum>
+ </item>
+ <item>draw <bf>doitnow</bf> The reference positions
+ given as arguments of previous <tt>getready</tt> calls
+ are used to sort and draw the objects also given as
+ string arguments to previous <tt>getready</tt>
+ calls. Remember to initialize <tt>Nobjects:=0;</tt>
+ before a second figure.
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Nematics (Direction Fields)</heading>
+ <p>
+ Nematics are the least ordered liquid crystals. Their
+ configurations can be described by direction fields
+ (vector fields without arrows). The two following routines
+ ease the task of representing their configurations.
+ </p>
+ <p>
+ <itemize>
+ <item>global <bf>generatedirline()</bf> Defines a single
+ straight line segment in a given position and with a
+ given orientation.
+ <enum>
+ <item><tt>numeric</tt> Line index number.</item>
+ <item><tt>numeric</tt> Angle beetween the <tt>X</tt>
+ axis and the projection of the line on the
+ <tt>XY</tt> plane.</item>
+ <item><tt>numeric</tt> Angle beetween the line
+ and the <tt>XY</tt> plane.</item>
+ <item><tt>numeric</tt> Line (arc)length.</item>
+ <item><tt>color</tt> Position of the line middle
+ point.</item>
+ </enum>
+ </item>
+ <item>draw <bf>director_invisible()</bf> This is a
+ direction field renderer that can sort direction
+ lines. This routine
+ draws straight lines of given "thickness" beetween the
+ first all the points
+ of all the <tt>L[]p[]</tt> lines. It is supposed to
+ help you draw vector fields
+ without arrows but taking care of invisibility.
+ The lines may be
+ generated by <tt>generatedirline</tt> or by other macros.
+ <enum>
+ <item><tt>boolean</tt> When there is no need to sort
+ lines you may use <tt>false</tt> here.
+ </item>
+ <item><tt>numeric</tt> "Thickness" of the
+ direction lines</item>
+ <item><tt>boolean</tt> Use <tt>true</tt> for cyclic
+ "direction" lines.</item>
+ </enum>
+ </item>
+ </itemize>
+ <figure>
+ <eps file="../allps/twistflat.1">
+ <img src="../allpng/twistflat.1.gs.png">
+ <caption>Figure that uses <tt>director_invisible</tt>
+ and <tt>generatedirline</tt>.</caption>
+ </figure>
+ </p>
+ </sect2>
+ <sect2>
+ <heading>Surface Plots</heading>
+ <p>
+ Many powerfull plotting packages like
+ <tt><url url="http://www.gnuplot.info/" name="gnuplot"></tt> and
+ <tt><url url="http://gri.sourceforge.net/" name="gri"></tt>
+ are freely available. Because of this, <tt>FEATPOST</tt>
+ surface plots are geared towards unusual features like
+ equilateral triangular grid, hexagonal domain and merging
+ together functional and parametric surface descriptions.
+ </p>
+ <p>
+ <itemize>
+ <item>draw <bf>hexagonaltrimesh()</bf> Plots a
+ functional surface on a triangular or hexagonal
+ domain. Uses the <tt>LightSource</tt>.
+ <enum>
+ <item><tt>boolean</tt> Select the kind of
+ domain. <tt>true</tt> for hexagonal and
+ <tt>false</tt> for triangular. The domain is
+ centered on the origin (<tt>black</tt>). When the
+ domain is hexagonal two of its corners are on the
+ <tt>-YY</tt> axis. When the
+ domain is triangular one of its corners is on the
+ <tt>X</tt> axis. </item>
+ <item><tt>numeric</tt> Number of small triangles on
+ each side of the triangular domain or three times
+ the number of small triangles on
+ each side of the hexagonal domain.</item>
+ <item><tt>numeric</tt> Length of the triangular
+ domain side or three times the hexagonal domain
+ side.</item>
+ <item><tt>text</tt> Name of the function that
+ returns the <tt>Z</tt> coordinate of a surface
+ point of coordinates <tt>X</tt> and <tt>Y</tt>.</item>
+ </enum>
+ <figure>
+ <eps file="../allps/hexagonaltrimesh.1">
+ <img src="../allpng/hexagonaltrimesh.1.gs.png">
+ <caption>Figure that uses <tt>hexagonaltrimesh</tt>.
+ </caption>
+ </figure>
+ </item>
+ <item>global <bf>partrimesh()</bf> Defines a parametric
+ surface that can be drawn with
+ <tt>draw_invisible</tt>. In the following descriptions
+ <tt>S</tt> and <tt>T</tt> are the parameters. Remember
+ to initialize <tt>NF</tt>. The surface is defined so
+ that quadrangles are used whenever possible. If
+ impossible, two triangles are used but their
+ orientation is selected to maximize the surface
+ smoothness. Also note that, unlike
+ <tt>hexagonaltrimesh()</tt>, the spatial range you
+ require to be visible is always first reshaped into a
+ cube and second compressed or extended vertically. How
+ much the cube is compressed or extended depends on the
+ last <tt>numeric</tt> argument, the compression factor
+ for <tt>Z</tt>, meaning that the final height of the
+ cube is 2/(compression factor). Thanks to Sebastian
+ Sturm for pointing the need to explain this.
+ <enum>
+ <item><tt>numeric</tt> Number of <tt>T</tt> steps.</item>
+ <item><tt>numeric</tt> Number of <tt>S</tt> steps.</item>
+ <item><tt>numeric</tt> Minimal <tt>T</tt> value.</item>
+ <item><tt>numeric</tt> Maximal <tt>T</tt> value.</item>
+ <item><tt>numeric</tt> Minimal <tt>S</tt> value.</item>
+ <item><tt>numeric</tt> Maximal <tt>S</tt> value.</item>
+ <item><tt>numeric</tt> Minimal <tt>X</tt> value.</item>
+ <item><tt>numeric</tt> Maximal <tt>X</tt> value.</item>
+ <item><tt>numeric</tt> Minimal <tt>Y</tt> value.</item>
+ <item><tt>numeric</tt> Maximal <tt>Y</tt> value.</item>
+ <item><tt>numeric</tt> Minimal <tt>Z</tt> value.</item>
+ <item><tt>numeric</tt> Maximal <tt>Z</tt> value.</item>
+ <item><tt>numeric</tt> Compression factor for <tt>Z</tt>
+ values.</item>
+ <item><tt>text</tt> Name of the function that
+ returns a surface point (of <tt>color</tt> type)
+ for each pair (<tt>S</tt>,<tt>T</tt>).</item>
+ </enum>
+ </item>
+ </itemize>
+ </p>
+ </sect2>
+ </sect1>
+ </sect>
+ </article>
+</linuxdoc>
diff --git a/Master/texmf-dist/doc/metapost/featpost/doc/tug2004.pdf b/Master/texmf-dist/doc/metapost/featpost/doc/tug2004.pdf
new file mode 100644
index 00000000000..078fe7ef720
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/doc/tug2004.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/bughunt.mp b/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/bughunt.mp
new file mode 100644
index 00000000000..2afa2bcd62d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/bughunt.mp
@@ -0,0 +1,57 @@
+% bughunt.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+%SphericalDistortion := true;
+%f := 0.3*(5,4,2);
+%Spread := 40;
+%ShiftV := (200,200);
+
+SphericalDistortion := false;
+f := 3.3*(5,4,2);
+Spread := 70;
+ShiftV := (250,250);
+
+beginfig(1);
+ color nalfa, gammacnt, vertex;
+ numeric altura, grids, radius, aux, i, numc, slope;
+
+ altura = 1;
+ radius = 0.3;
+ grids = 1;
+ numc = 8;
+ slope = 15;
+
+ for i=1 upto numc:
+ aux := (i-1-0.5*(numc-1))*grids;
+ gammacnt := (0,aux,0);
+ vertex := gammacnt+0.1*(f-gammacnt)+(0,0,aux/slope);
+ nalfa := vertex - gammacnt;
+ rigorousdisc( 0, true, gammacnt, radius, nalfa );
+ endfor;
+endfig;
+
+beginfig(2);
+ path cpath;
+ color vert;
+ numeric i;
+ f := (4,0,0.5);
+ vert = 0.5*(0,1,1);
+ cpath = rigorouscone(true, black, blue, 1, vert);
+% draw rp(vert);
+ draw cpath; show length cpath;
+ for i=0 upto length cpath:
+ dotlabel.top( decimal(i),point i of cpath);
+ endfor;
+% cpath := rigorouscircle( black, blue, 1);
+% draw cpath;
+% for i=0 upto length cpath:
+% dotlabel.bot( decimal(i),point i of cpath);
+% endfor;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp b/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp
new file mode 100644
index 00000000000..b0cf81a4674
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp
@@ -0,0 +1,9 @@
+
+beginfig(1);
+ boolean tb;
+ tb = true;
+ draw origin;
+ show bstr( tb );
+endfig;
+end.
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/hiddenlinegraph.mp b/Master/texmf-dist/doc/metapost/featpost/example/highmemory/hiddenlinegraph.mp
new file mode 100644
index 00000000000..efa5cea3727
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/highmemory/hiddenlinegraph.mp
@@ -0,0 +1,72 @@
+% hiddenlinegraph.mp
+% L. Nobre G.
+% 2003
+% The application of the big nice trick to draw 3D hidden line surfaces
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+def zsurfaci( expr xc, yc ) =
+ begingroup
+ numeric zout;
+ zout = yc**4-xc*yc*(1-yc**2);
+ ( ( xc, yc, zout ) )
+ endgroup
+enddef;
+
+def zsurface( expr xc, yc ) =
+ ( xc, yc, cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4) )
+enddef;
+
+def zsurfaca( expr xc, yc ) =
+ ( xc, yc, 1.5-0.2*xc )
+enddef;
+
+%f := (6,1,0);
+f := (5,1.5,3);
+Spread := 147;
+NF := 0;
+LightSource := (1,-1,2);
+
+beginfig(1);
+ numeric nx, ny, lowx, higx, lowy, higy,
+ facz, lowz, higz, base, topo;
+ path chair;
+ nx = 22;
+ ny = 22;
+ lowy = -7;
+ higy = 7;
+ lowx = -7;
+ higx = 7;
+ facz = 2;
+ lowz = -1;
+ higz = 5;
+% lowy = -2.5;
+% higy = 1;
+% lowx = 1.5;
+% higx = 3;
+% facz = 3;
+% lowz = -1.5;
+% higz = 1.5;
+ partrimesh( nx,ny,lowx,higx,lowy,higy,
+ lowx,higx,lowy,higy,lowz,higz,facz,zsurface);
+ partrimesh( nx,ny,lowx,higx,lowy,higy,
+ lowx,higx,lowy,higy,lowz,higz,facz,zsurfaca);
+ base = -1/facz;
+ topo = 1/facz;
+ chair = rp((-1,-1,base))--rp((1,-1,base))--rp((1,1,base))
+ --rp((-1,1,base))--rp((-1,-1,base))--rp((-1,-1,topo))
+ --rp((-1,1,topo))--rp((-1,1,base))--cycle;
+ draw chair;
+% fill_faces( withcolor blue );
+ draw_invisible( false, false, green, blue );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/mainmemtest.mp b/Master/texmf-dist/doc/metapost/featpost/example/highmemory/mainmemtest.mp
new file mode 100644
index 00000000000..d4ab2a9e4cf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/highmemory/mainmemtest.mp
@@ -0,0 +1,54 @@
+% mainmemtest.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3D;
+
+beginfig(1);
+
+ f := (2,1,1);
+
+ Spread := 500;
+
+ color gridvec, sizevec, currpos, starpos, bordpos;
+ numeric i, j, k, counter, theta, phi, thetamin,
+ thetamax, thetastp, long, base;
+% It works with sizevec := (8,6,1);
+% with (9,6,1) and sharpraytrace it says
+% ! MetaPost capacity exceeded, sorry [main memory size=2199001].
+ sizevec := (7,6,1);
+ gridvec := (0.05,0.1,0.1);
+ thetamin := 55;
+ thetamax := 125;
+ long := 0.08;
+ base := 0.01;
+ thetastp := (thetamax-thetamin)/(X(sizevec)-1);
+ starpos := ( -0.5*X(gridvec)*(X(sizevec)-1) ,
+ -0.5*Y(gridvec)*(Y(sizevec)-1) ,
+ -0.5*Z(gridvec)*(Z(sizevec)-1) );
+ bordpos := starpos - 0.5*gridvec;
+ npf1 := 4;
+ F1p1 := bordpos;
+ F1p2 := (X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p3 := (-X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p4 := (-X(bordpos),Y(bordpos), Z(bordpos));
+ counter := 2;
+ for i=1 upto X(sizevec):
+ for j=1 upto Y(sizevec):
+ for k=1 upto Z(sizevec):
+ phi := 90;
+ theta := thetamin+(i-1)*thetastp;
+ currpos := starpos+( (i-1)*X(gridvec) ,
+ (j-1)*Y(gridvec) ,
+ (k-1)*Z(gridvec) );
+ generatedirface( counter, phi, theta, long, base, currpos );
+ counter := incr(counter);
+ endfor;
+ endfor;
+ endfor;
+ NF := decr(counter);
+ sharpraytrace;
+endfig;
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/par3Dplotexamples.mp b/Master/texmf-dist/doc/metapost/featpost/example/highmemory/par3Dplotexamples.mp
new file mode 100644
index 00000000000..6b05682918a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/highmemory/par3Dplotexamples.mp
@@ -0,0 +1,149 @@
+% J. Schwaiger with help of
+% FEATPOST and the macropackages
+% la3Dmacros.mp and hlr3Dmacros.mp
+% by L. Nobre G.
+% 2003
+
+% Figure (2) retouched in 2004 by L. Nobre G.
+
+verbatimtex
+\documentclass[a4paper,12pt]{article}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{euler}
+\usepackage{graphicx}
+\begin{document}
+etex
+
+% for trigonometric functions when angles are measured in rad
+%
+ def sinrad( expr t)=sind(t/3.145*180) enddef;
+ def cosrad( expr t)=cosd(t/3.145*180) enddef;
+
+ def parsurface( expr tc,sc )=
+ (%
+ (4 cosrad(tc) - sinrad(sc)*cosrad(tc),%
+ 4 sinrad(tc) - sinrad(sc)*sinrad(tc),%
+ cosrad(sc))%
+ )% A torus
+ enddef;
+
+ def parsurfacetwo( expr tc,sc )=
+ (%
+ (4+4cosrad(tc) - sinrad(sc)*cosrad(tc),%
+ cosrad(sc),
+ 4sinrad(tc) - sinrad(sc)*sinrad(tc)%
+ )%
+ )% Another torus
+ enddef;
+
+ def parsurfacethree( expr tc,sc )=
+% 0<=sc<=2pi,-2<=tc<=2
+%xmin=-1.4, xmax=1.4
+%ymin=-0.7, ymax=2
+%zmin=-2.5,zmax=2.5
+ (%
+ (1.414213562*cosrad(sc)*cosrad(tc)
+ -2*sinrad(sc)*sinrad(tc))/(2*(abs(tc) + 1)) + sinrad(tc),%
+ cosrad(tc) - (1.414213562*cosrad(sc)*sinrad(tc)
+ + 2*sinrad(sc)*cosrad(tc))/(2*(abs(tc) + 1)),%
+ tc - 2*cosrad(sc)/(2*(abs(tc) + 1))
+ )%
+% A space tube governed by a helix
+ enddef;
+
+def zsurface( expr xc, yc ) =
+ ( xc, yc, cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4) )
+enddef;
+
+f:=(8,1.5,1.5);
+Spread := 127;
+
+
+beginfig(1);
+ numeric Ns, Nt, lows, higs, lowt, higt, lowx, highx, lowy, highy,
+ facz, lowz, higz, base, topo;
+ path chair;
+ % for torus
+ f:=(4,1.5,1.5);
+ Spread:=150;
+ Ns = 16;
+ Nt= 16;
+ lows := 3.145*0.25;
+ higs := 3.145*1.75;
+ lowt = -3.145;
+ higt = 3.145;
+ facz=1;
+ lowz = -5;
+ higz = 5;
+ lowx:=-5;
+ lowy:=-5;
+ higx:=10;
+ higy:=7;
+%
+ NF:=0; %Initialize number of faces;
+%
+ partrimesh( Ns,Nt,lowt,higt,lows,higs,
+ lowx,higx,lowy,higy,lowz,higz,facz,parsurfacetwo );
+ lows := 3.145*0.5;
+ higs := 2.25*3.145; % new parameters and new surface
+ partrimesh( Ns,Nt,lowt,higt,lows,higs,
+ lowx,higx,lowy,higy,lowz,higz,facz,parsurface );
+ base = -1/facz;
+ topo = 1/facz;
+ chair = rp((-1,-1,base))--rp((1,-1,base))--rp((1,1,base))
+ --rp((-1,1,base))--rp((-1,-1,base))--rp((-1,-1,topo))
+ --rp((-1,1,topo))--rp((-1,1,base))--cycle;
+ draw_invisible( false,true,(blue+0.5green),0.6white);
+ draw bbox currentpicture;
+endfig;
+
+beginfig(2);
+ numeric Ns, Nt, lows, higs, lowt, higt, lowx, highx, lowy, highy,
+ facz, lowz, higz, base, topo;
+ path chair;
+
+ f := (6,0.5,3);
+ Spread:=150;
+
+ Ns = 19;
+ Nt= 19;
+ lows := -3.145;
+ higs := 3.145;
+ lowt = -3.145;
+ higt = 3.145;
+ facz = 2;
+ lowz = -2;
+ higz = 2;
+ lowx:=-5;
+ lowy:=-5;
+ higx:=5;
+ higy:=5;
+ NF:=0; %Initialize number of faces;
+%
+ partrimesh( Ns,Nt,lowt,higt,lows,higs,
+ lowx,higx,lowy,higy,lowz,higz,facz,parsurface );
+
+ nx := 27;
+ lowy := -7;
+ higy := 7;
+ lowx := -7;
+ higx := 7;
+ facz := 2;
+ lowz := -1;
+ higz := 5;
+ partrimesh( nx,nx,lowx,higx,lowy,higy,
+ lowx,higx,lowy,higy,lowz,higz,facz,zsurface);
+ base = -1/facz;
+ topo = 1/facz;
+ chair = rp((-1,-1,base))--rp((1,-1,base))--rp((1,1,base))
+ --rp((-1,1,base))--rp((-1,-1,base))--rp((-1,-1,topo))
+ --rp((-1,1,topo))--rp((-1,1,base))--cycle;
+ fill chair withcolor 0.9 blue+0.6white;
+ draw chair withcolor 0.1white ;
+ draw_invisible( false,false,(red+0.32blue),0.6white);
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/borderframetest.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/borderframetest.mp
new file mode 100644
index 00000000000..1c2331bdc17
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/borderframetest.mp
@@ -0,0 +1,28 @@
+% borderframetest.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(0);
+ Spread := 45;
+
+ numeric theframefrach, theframefracw, Shifts;
+ path theframebord;
+ Shifts := 105mm;
+ theframefrach = 0.2927;
+ theframefracw = 0.39;
+ z1 = Shifts*(1-theframefracw,1-theframefrach);
+ z2 = Shifts*(1+theframefracw,1-theframefrach);
+ z3 = Shifts*(1+theframefracw,1+theframefrach);
+ z4 = Shifts*(1-theframefracw,1+theframefrach);
+ theframebord = z1--z2--z3--z4--cycle;
+ show z1;
+ show z2;
+ show z3;
+ show z4;
+ draw theframebord withcolor background withpen pencircle scaled 0;
+ clip currentpicture to theframebord;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/conegetready.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/conegetready.mp
new file mode 100644
index 00000000000..17e7fea51b3
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/conegetready.mp
@@ -0,0 +1,36 @@
+% conegetready.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric radiusin, fac, i, xcoor, ycoor, radc, numc, baz;
+ color refvec;
+ string rv, mrv, vgc, stra, strb, lrv;
+
+ f := (5,0.3,1.5);
+ Spread := 70;
+ radiusin = 0.3;
+ baz = 0.08;
+ fac = 3;
+ numc = 9;
+ radc = (fac-1)*radiusin*sind(180/numc);
+
+ i = 155;
+ xcoor := -radiusin*cosd(i);
+ ycoor := radiusin*sind(i);
+ refvec := (xcoor,-ycoor,baz);
+ rv := cstr( refvec );
+ mrv := cstr( -refvec );
+ lrv := cstr( (2*fac-1)*refvec );
+ vgc :="verygoodcone(true,fac*";
+ stra := vgc & rv & "," & mrv & "," & decimal(radc) & "," & rv & ")";
+ getready( stra, 0.5*(fac+1)*refvec );
+ strb := vgc & rv & "," & rv & "," & decimal(radc) & "," & lrv & ")";
+ getready( strb, 0.5*(3*fac-1)*refvec );
+ doitnow;
+ produce_vga_border;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/doitnow.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/doitnow.mp
new file mode 100644
index 00000000000..7cfec23a39d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/doitnow.mp
@@ -0,0 +1,33 @@
+% doitnow.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+f := 1.5*(1.5,0,1);
+Spread := 100;
+
+beginfig(1);
+ numeric stagelevel, holediam, outerdiam, stagemargin;
+ numeric numberofstagesidesquares, stagesidesize;
+ numeric centercoord;
+ color centerposdisc, centerpostorus, centerstage;
+ pickup pencircle scaled 3pt;
+ stagelevel = 0.2;
+ holediam = 0.6;
+ stagemargin = 0.2;
+ numberofstagesidesquares = 10;
+ centerstage = (-X(f),-Y(f),-stagelevel);
+ outerdiam = holediam+4*stagelevel;
+ stagesidesize = 2*( outerdiam + stagemargin );
+ centercoord = 0.3535*outerdiam;
+ HoriZon := -stagelevel;
+ centerpostorus = ( centercoord, -centercoord, 0 );
+ centerposdisc = ( -centercoord, centercoord, HoriZon );
+ getready("setthestage( numberofstagesidesquares, stagesidesize );",
+ centerstage);
+ getready("smoothtorus( centerpostorus, blue,0.5*holediam+stagelevel, stagelevel );",centerpostorus);
+ getready("rigorousdisc( 0.5*holediam, true, centerposdisc,0.5*outerdiam, 1.5*stagelevel*blue );",centerposdisc);
+ doitnow;
+endfig;
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/electricpotential.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/electricpotential.mp
new file mode 100644
index 00000000000..01caaab0c5e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/electricpotential.mp
@@ -0,0 +1,151 @@
+% electricpotential.mp
+% L. Nobre G.
+% 2004
+% PAY ATTENTION: THESE FIGURES ARE INDEPENDANT. CONDUCTOR SURFACE POTENTIAL
+% CHANGES UNDER THE INFLUENCE OF EXTERNAL CHARGES.
+
+%input featpost3Dplus2D;
+
+f := 16*(4,1,1);
+Spread := 35;
+LightSource := 10*(4,-3,4);
+ActuC := 2;
+
+numeric potlim, cac, cbc, ccc, cdc;
+potlim = 2;
+cac = 2;
+cbc = -2;
+ccc = 4;
+cdc = 1.5;
+pair cap, cbp, ccp;
+cap = (-2,-4);
+ccp = (-2,4);
+cbp = (2,0);
+numeric np, ssize;
+np = 56;
+ssize = 18;
+
+def zi( expr xc, yc ) =
+ 0
+enddef;
+
+def za( expr xc, yc ) =
+ begingroup
+ save out;
+ numeric dist, out;
+ dist = abs( (xc,yc)-cap );
+ if abs(dist) < 0.005:
+ if cac<0:
+ out = -potlim;
+ else:
+ out = potlim;
+ fi;
+ else:
+ out = cac/dist;
+ fi;
+ if out > potlim:
+ out := potlim;
+ elseif out < -potlim:
+ out := -potlim;
+ fi;
+ (out)
+ endgroup
+enddef;
+
+def zb( expr xc, yc ) =
+ begingroup
+ save out;
+ numeric dist, out;
+ dist = abs( (xc,yc)-cbp );
+ if abs(dist) < 0.005:
+ if cbc<0:
+ out = -potlim;
+ else:
+ out = potlim;
+ fi;
+ else:
+ out = cbc/dist + za( xc, yc );
+ fi;
+ if out > potlim:
+ out := potlim;
+ elseif out < -potlim:
+ out := -potlim;
+ fi;
+ (out)
+ endgroup
+enddef;
+
+def zc( expr xc, yc ) =
+ begingroup
+ save out;
+ numeric dist, out;
+ dist = abs( (xc,yc)-ccp );
+ if abs(dist) < 0.005:
+ if ccc<0:
+ out = -potlim;
+ else:
+ out = potlim;
+ fi;
+ else:
+ out = ccc/dist + zb( xc, yc );
+ fi;
+ if out > potlim:
+ out := potlim;
+ elseif out < -potlim:
+ out := -potlim;
+ fi;
+ (out)
+ endgroup
+enddef;
+
+def zd( expr xc, yc ) =
+ begingroup
+ save out;
+ numeric dist, out, i, tmp;
+ pair poi;
+ tmp = 0;
+ for i=0 upto np:
+ poi := (i/np)[cap,ccp];
+ dist := abs( (xc,yc)-poi );
+ if abs(dist) < 0.005:
+ if cdc<0:
+ out := -potlim;
+ else:
+ out := potlim;
+ fi;
+ else:
+ out := cdc/dist/np;
+ fi;
+ tmp := tmp+out;
+ endfor;
+ tmp := tmp + zc( xc, yc );
+ if tmp > potlim:
+ tmp := potlim;
+ elseif tmp < -potlim:
+ tmp := -potlim;
+ fi;
+ (tmp)
+ endgroup
+enddef;
+
+beginfig(0);
+ hexagonaltrimesh( false, np, ssize, zi );
+endfig;
+
+beginfig(1);
+ hexagonaltrimesh( false, np, ssize, za );
+endfig;
+
+beginfig(2);
+ hexagonaltrimesh( false, np, ssize, zb );
+endfig;
+
+beginfig(3);
+ hexagonaltrimesh( false, np, ssize, zc );
+endfig;
+
+beginfig(4);
+ hexagonaltrimesh( false, np, ssize, zd );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/emptylines.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/emptylines.mp
new file mode 100644
index 00000000000..df8e02695dd
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/emptylines.mp
@@ -0,0 +1,28 @@
+% emptylines.mp
+% L. Nobre G.
+% 2001
+
+%input featpost3Dplus2D;
+
+
+def closec( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cblu, param;
+ par1 = 360;
+ par2 = 0.3;
+ param = 360*TheVal;
+ cred = par2*cosd( param );
+ cblu = par2*sind( param );
+ ( (cred,cblu,1) )
+ endgroup
+enddef;
+
+f := (4,3,2);
+Spread := 170;
+ShadowOn := true;
+
+beginfig(1);
+ emptyline( true, 1, black, 0.5background, 360, 0.88, 2, closec );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/experimental.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/experimental.mp
new file mode 100644
index 00000000000..106e7574f2a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/experimental.mp
@@ -0,0 +1,177 @@
+% experimental.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+%verbatimtex
+%\documentclass{article}
+%\usepackage{beton}
+%\usepackage{concmath}
+%\usepackage{ccfonts}
+%\begin{document}
+%etex
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+f := (4.5,-6,5);
+
+beginfig(1);
+ numeric len[], ray[];
+ color axe[], pos[], fix[], lab[];
+ color reflabpos, reflabpoi, lincolor;
+ picture txt[], dashpatt;
+ numeric inclang, aberang, sampang, stepang;
+ numeric squside, sqlevel, ul, outermagpos;
+ numeric innerray, polesep, fracone, fracsam;
+ numeric labelscale;
+ path tmpath, aupath, copath;
+
+ pickup pencircle scaled 1.2pt;
+ dashpatt = evenly scaled 3;
+ inclang = 150;
+ aberang = 17;
+ sampang = 30;
+ stepang = 20;
+ ul = 0.1;
+ labelscale = 5;
+ outermagpos = 30ul;
+ squside = outermagpos;
+ sqlevel = -20ul;
+ polesep = 15ul;
+ fracone = 0.33;
+ fracsam = 0.86;
+ ray1 = 10ul;
+ ray2 = 6ul;
+ ray3 = 8ul;
+ ray4 = 1.5ul;
+ ray5 = 4ul;
+ ray6 = 3ul;
+ ray7 = 3.5ul;
+ ray8 = 2ul;
+ len3 = 7ul;
+ len4 = 20ul;
+ len5 = 3ul;
+ len7 = 3.5ul;
+ len8 = 7ul;
+ lincolor = 0.5background;
+
+ reflabpos = ( -squside, 0, -sqlevel );
+ reflabpoi = ( -squside, squside, -sqlevel );
+ V1 := (squside,squside,sqlevel);
+ V2 := (-squside,squside,sqlevel);
+ V3 := (-squside,-squside,sqlevel);
+ V4 := (squside,-squside,sqlevel);
+% makeface1(1,2,3,4);
+
+ len1 = (1-fracone)*(outermagpos-ray5-polesep);
+ pos1 = (-outermagpos,0,0);
+ rigorousdisc( 0, true, pos1, ray1, len1*(1,0,0) );
+
+ len2 = fracone*(outermagpos-ray5-polesep);
+ pos2 = (len1-outermagpos,0,0);
+ tmpath := goodcirclepath( pos2, (1,0,0), ray1 );
+ aupath := goodcirclepath( (-ray5-polesep,0,0), (1,0,0), ray2 );
+ copath := twocyclestogether( tmpath, aupath );
+ unfill copath;
+ draw copath;
+ draw aupath;
+ lab2 = reflabpos;
+ txt2 = thelabel.top( btex magneto etex scaled labelscale, rp( lab2 ) );
+ draw txt2;
+ fix2 = (-outermagpos+0.5len1,0,ray1);
+ draw llcorner txt2--lrcorner txt2--rp(fix2) withcolor lincolor;
+
+ axe3 = ( 0, cosd( inclang ), sind( inclang ) );
+ pos3 = -( len3 + len4 + len5 )*axe3;
+ rigorousdisc( 0, true, pos3, ray3, len3*axe3 );
+ lab3 = (1-fracone)*reflabpoi+fracone*V1;
+ txt3 = thelabel.rt( btex rotor etex scaled labelscale, rp( lab3 ) );
+ draw txt3;
+
+ axe4 = axe3;
+ pos4 = -( len4 + len5 )*axe4;
+ rigorousdisc( 0, true, pos4, ray4, len4*axe4 );
+
+ fix3 = pos4+fracsam*ray3*(0,cosd( inclang -90 ),sind( inclang -90 ));
+ draw lrcorner txt3--llcorner txt3--rp(fix3) withcolor lincolor;
+
+ axe5 = axe3;
+ pos5 = -( len5 )*axe5;
+ rigorousdisc( 0, true, pos5, ray5, len5*axe5 );
+ lab5 = (1-fracone)*reflabpoi+fracone*V2;
+ txt5 = thelabel.rt( btex porta-amostras etex scaled labelscale, rp( lab5 ) );
+ draw txt5;
+ fix5 = fracsam*ray5*(0,cosd( inclang -90 ),sind( inclang -90 ));
+ draw lrcorner txt5--llcorner txt5--rp(fix5) withcolor lincolor;
+
+ V5 := fracsam*ray5*( sind( sampang ),
+ cosd( sampang )*cosd( inclang -90 ),
+ cosd( sampang )*sind( inclang -90 ) );
+ V6 := fracsam*ray5*( -sind( sampang ),
+ cosd( sampang )*cosd( inclang -90 ),
+ cosd( sampang )*sind( inclang -90 ) );
+ V8 := fracsam*ray5*( sind( sampang ),
+ -cosd( sampang )*cosd( inclang -90 ),
+ -cosd( sampang )*sind( inclang -90 ) );
+ V7 := fracsam*ray5*( -sind( sampang ),
+ -cosd( sampang )*cosd( inclang -90 ),
+ -cosd( sampang )*sind( inclang -90 ) );
+ draw rp(V5)--rp(V6)--rp(V7)--rp(V8)--cycle;
+
+ axe6 = ( 0, cosd( inclang+aberang ), sind( inclang+aberang ) );
+ pos6 = ray1*axe6;
+ len6 = len4;
+ axe7 = ( 0, cosd( inclang-aberang ), sind( inclang-aberang ) );
+ pos7 = ( ray1 + 0.5len6 )*axe7;
+ draw rp(pos6)--rp((0,0,0))--rp(pos7) dashed dashpatt;
+ rigorousdisc( 0, true, pos6, ray6, len6*axe6 );
+ lab6 = fracone*reflabpos+(1-fracone)*V3;
+ txt6 = thelabel.lft( btex telemicrosc\'{o}pio etex scaled labelscale, rp( lab6 ) );
+ draw txt6;
+ fix6 = pos6+len6*axe6;
+ draw llcorner txt6--lrcorner txt6--rp(fix6) withcolor lincolor;
+
+ pos8 = pos7+len7*axe7;
+ tmpath := goodcirclepath( pos7, axe7, ray7 );
+ aupath := goodcirclepath( pos8, axe7, ray8 );
+ copath := twocyclestogether( tmpath, aupath );
+ unfill copath;
+ draw copath;
+ draw aupath;
+
+ axe8 = axe7;
+ rigorousdisc( 0, true, pos8, ray8, len8*axe8 );
+ lab8 = (1-fracone)*reflabpos+fracone*V3;
+ txt8 = thelabel.lft( btex l\^{a}mpada etex scaled labelscale, rp( lab8 ) );
+ draw txt8;
+ fix8 = pos8+len8*axe8;
+ draw llcorner txt8--lrcorner txt8--rp(fix8) withcolor lincolor;
+
+ len9 = len2;
+ pos9 = (ray5+polesep,0,0);
+ ray9 = ray2;
+ ray10 = ray1;
+ tmpath := goodcirclepath( pos9, (1,0,0), ray9 );
+ pos10 = pos9+len9*(1,0,0);
+ aupath := goodcirclepath( pos10, (1,0,0), ray10 );
+ copath := twocyclestogether( tmpath, aupath );
+ unfill copath;
+ draw copath;
+ draw aupath;
+
+ len10 = len1;
+ rigorousdisc( 0, true, pos10, ray10, len10*(1,0,0) );
+
+ produce_auto_scale;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/fieldlines.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/fieldlines.mp
new file mode 100644
index 00000000000..bcb018a0f7f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/fieldlines.mp
@@ -0,0 +1,59 @@
+% fieldlines.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+Spread := 30;
+f := (10,0,0);
+
+color posa, posb;
+numeric kfac;
+posa = -5*green;
+posb = 5*green;
+kfac = 2.5;
+
+def vecfunc( expr posit )=
+ begingroup
+ save modula, modulb, field;
+ color field;
+ numeric modula, modulb;
+ modula = conorm( posit-posa );
+ modulb = conorm( posit-posb );
+ field = ( posit-posa )/(modula**3)+kfac*( posit-posb )/(modulb**3);
+ ( field )
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric i, lena, lenb, numa, numb, sa, sb, diffstep, ray;
+ color stp;
+ path oneline;
+ pen grossa, fina;
+ grossa = pencircle scaled 3pt;
+ fina = pencircle scaled 2pt;
+ lena = 105;
+ lenb = 145;
+ numa = 72;
+ numb = 30;
+ diffstep = 1;
+ ray = 0.5;
+ sa = 36;
+ sb = 75;
+ for i=sa step numa until (360+sa):
+ stp := posa+( 0, ray*cosd(i), ray*sind(i) );
+ oneline := fieldlinepath( lena, stp, diffstep, vecfunc );
+ draw oneline withpen grossa;
+% draw oneline withpen fina withcolor background;
+ endfor;
+ for i=sb step numb until (360+sb):
+ stp := posb+( 0, ray*cosd(i), ray*sind(i) );
+ oneline := fieldlinepath( lenb, stp, diffstep, vecfunc );
+ draw oneline withpen grossa;
+% draw oneline withpen fina withcolor background;
+ endfor;
+ draw rp(posa) withpen grossa;
+ draw rp(posb) withpen grossa;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/fis3prey.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/fis3prey.mp
new file mode 100644
index 00000000000..c1b32219687
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/fis3prey.mp
@@ -0,0 +1,128 @@
+% fis3prey.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ Spread := 50;
+ f := (4,6,3.5);
+ path malhacub, rama, ramb, ramc, malhatet;
+ pen grossa, nuclear, negat;
+ color p[];
+ numeric lengax, lscal, arrowmarg, arrowshift;
+ pair tx, ty, tz;
+ lengax = 0.7;
+ lscal = 2;
+ arrowshift = 0.85;
+ arrowmarg = 0.13;
+ grossa = pencircle scaled 2.7pt;
+ nuclear = pencircle scaled 2.1pt;
+ negat = pencircle scaled 1.8pt;
+ p1 = (1,1,-1);
+ p2 = (-1,1,-1);
+ p3 = (-1,-1,-1);
+ p4 = (1,-1,-1);
+ p5 = (1,1,1);
+ p6 = (-1,1,1);
+ p7 = (-1,-1,1);
+ p8 = (1,-1,1);
+
+ p0 = p2 + arrowshift*N((1,0,1)) + arrowmarg*N((-1,0,1));
+ p9 = p5 - arrowshift*N((1,0,1)) + arrowmarg*N((-1,0,1));
+
+ z1 = rp(p1);
+ z2 = rp(p2);
+ z3 = rp(p3);
+ z4 = rp(p4);
+ z5 = rp(p5);
+ z6 = rp(p6);
+ z7 = rp(p7);
+ z8 = rp(p8);
+
+ z0 = rp(p0);
+ z9 = rp(p9);
+
+ tx = rp( p1 - (lengax,0,0) );
+ ty = rp( p1 - (0,lengax,0) );
+ tz = rp( p1 + (0,0,lengax) );
+
+ malhacub = z1--z2--z3--z4--z1--z5--z6--z7--z8--z5;
+ malhatet = z2--z7--z4--z5--cycle;
+ rama = z2--z6;
+ ramb = z3--z7;
+ ramc = z4--z8;
+ drawoptions( dashed evenly );
+ draw malhacub;
+ draw rama;
+ draw ramb;
+ draw ramc;
+ drawoptions( withpen grossa );
+ draw malhatet;
+
+ drawarrow z1--tx withpen negat;
+ drawarrow z1--ty withpen negat;
+ drawarrow z1--tz withpen negat;
+ label.lrt(btex $x$ etex scaled lscal, tx);
+ label.llft(btex $y$ etex scaled lscal, ty);
+ label.lft(btex $z$ etex scaled lscal, tz);
+ drawarrow z0--z9 withpen negat;
+endfig;
+
+beginfig(2);
+ Spread := 50;
+ f := 2.3*(6,2,3.5);
+ numeric lang, cray, lpos, llen, smar;
+ path circ, rigcirc, lone, ltwo, carrpath;
+ pen pena, penb, penc;
+ pena = pencircle scaled 1.3mm;
+ penb = pencircle scaled 0.95mm;
+ penc = pencircle scaled 0.4mm;
+ color outcol, incol;
+ outcol = black;
+ incol = 0.876white;
+ lang = 30;
+ cray = 1;
+ lpos = 0.57;
+ llen = 2.2;
+ smar = 0.15;
+ circ = goodcirclepath( black, green, cray );
+ rigcirc = rigorouscircle( black, green, cray+smar );
+ carrpath = subpath (3.2,4.5) of rigcirc;
+ lone = rp((-lpos,llen*cosd(lang),llen*sind(lang)))
+ --rp(-(lpos,llen*cosd(lang),llen*sind(lang)));
+ ltwo = rp((lpos,-llen*cosd(lang),llen*sind(lang)))
+ --rp((lpos,llen*cosd(lang),-llen*sind(lang)));
+ drawarrow carrpath withpen penc withcolor outcol;
+ draw circ withpen pena withcolor outcol;
+ draw circ withpen penb withcolor incol;
+ draw rp((-cray,0,0))--rp((-lpos,0,0)) dashed evenly;
+ draw lone withpen pena withcolor outcol;
+ draw lone withpen penb withcolor incol;
+ draw rp((lpos,0,0))--rp((-lpos,0,0)) dashed evenly;
+ draw rp((0,0,-cray))--rp((0,0,cray)) dashed evenly;
+ draw ltwo withpen pena withcolor outcol;
+ draw ltwo withpen penb withcolor incol;
+ draw rp((cray,0,0))--rp((lpos,0,0)) dashed evenly;
+ draw subpath (1,15) of circ withpen pena withcolor outcol;
+ draw subpath (0,16) of circ withpen penb withcolor incol;
+
+
+
+% label.top( btex $+$ etex, point 3 of rigcirc );
+
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/frustum.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/frustum.mp
new file mode 100644
index 00000000000..90da3d74440
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/frustum.mp
@@ -0,0 +1,46 @@
+% frustum.mp
+% L. Nobre G.
+% IYP (2005)
+
+verbatimtex
+\documentclass{article}
+\begin{document}
+{\sffamily
+etex
+
+beginfig(1);
+% f := (5,3,4);
+ f := (5,3,0.4);
+% f := (5,3,-0.4);
+ numeric labscal;
+ picture labsa, labba, labsb, labd, labc;
+ labscal = 2;
+ ahlength := 8pt;
+ ahangle := 30;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ labsa = btex $\vec{S}_1$ etex scaled labscal;
+ labsb = btex $\vec{S}_2$ etex scaled labscal;
+ labba = btex $\vec{B}_1$ etex scaled labscal;
+ labd= btex $D$ etex scaled labscal;
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ whatisthis( black, 0.5red, green, 0.85, 0.8 );
+ drawoptions( withpen pencircle scaled 1.3pt );
+ drawdblarrow rp(black)--rp(0.85blue);
+ label.rt( labd, rp(0.4blue) );
+ drawarrow rp(black)--rp(0.5red);
+ label.ulft( labsa, rp(0.25red) );
+ drawarrow rp(black)--rp(green);
+ label.top( labba, rp((0,0.5,0)) );
+ drawarrow rp(0.85blue)--rp(0.8*0.5*red+0.85blue);
+ label.ulft( labsb, rp(0.2red+0.85blue) );
+ dotlabel.bot( labc, rp(black) );
+endfig;
+
+verbatimtex
+}
+\end{document}
+etex
+
+end.
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_casq.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_casq.mp
new file mode 100644
index 00000000000..bdc52c58d89
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_casq.mp
@@ -0,0 +1,84 @@
+% geom_casq.mp
+% L. Nobre G.
+% 1999
+
+%input featpost3Dplus2D;
+
+%input la3Dmacros;
+%input hlr3Dmacros;
+%input plan2Dmacros;
+%
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+
+ f := (1.7,1.2,1);
+
+ Spread := 150;
+
+ color gridvec, sizevec, currpos, starpos, bordpos, orig, axxc, ayyc, azzc;
+ numeric alphamax, long, base, thetamax;
+ axxc = (0.8,0,0);
+ ayyc = (0,0.7,0);
+ azzc = (0,0,0.4);
+ sizevec := (11,9,9);
+ gridvec := (0.1,0.1,0.1);
+ thetamax := 50;
+ alphamax := 70;
+ long := 0.65;
+ base := 0.3;
+ starpos := ( -0.5*X(gridvec)*(X(sizevec)-1) ,
+ -0.5*Y(gridvec)*(Y(sizevec)-1) ,
+ -0.5*Z(gridvec)*(Z(sizevec)-1) );
+ bordpos := starpos - 0.5*gridvec;
+ orig := starpos + 0.5*gridvec + (0.05,0,-0.1);
+ npf1 := 4;
+ F1p1 := bordpos;
+ F1p2 := (X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p3 := (-X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p4 := (-X(bordpos),Y(bordpos), Z(bordpos));
+ npf2 := 4;
+ F2p1 := (X(bordpos),Y(bordpos), -Z(bordpos));
+ F2p2 := (X(bordpos),-Y(bordpos), -Z(bordpos));
+ F2p3 := (-X(bordpos),-Y(bordpos), -Z(bordpos));
+ F2p4 := (-X(bordpos),Y(bordpos), -Z(bordpos));
+ NF := 2;
+
+ pickup pencircle scaled 1pt;
+ drawarrow rp(orig)..rp(orig+axxc);
+ drawarrow rp(orig)..rp(orig+ayyc);
+ drawarrow rp(orig)..rp(orig+azzc);
+ label.bot(btex z etex,rp(orig+axxc));
+ label.bot(btex x etex,rp(orig+ayyc));
+ label.lft(btex y etex,rp(orig+azzc));
+ pickup pencircle scaled 1.5pt;
+
+ starpos := (base,0,0)+orig;
+ drawarrow rp(orig)..rp(starpos);
+ label.bot(btex $\vec{n}_0$ etex,rp(starpos));
+
+ currpos := starpos;
+ starpos := long*(cosd(alphamax),sind(alphamax),0)+orig;
+ drawarrow rp(orig)..rp(starpos);
+ label.bot(btex $\vec{H}$ etex,rp(starpos));
+ angline(starpos,currpos,orig,0.55,btex $\alpha$ etex,bot);
+
+ starpos := base*(cosd(thetamax),sind(thetamax),0)+orig;
+ drawarrow rp(orig)..rp(starpos);
+ label.bot(btex $\vec{n}$ etex,rp(starpos));
+ angline(starpos,currpos,orig,0.2,btex $\theta$ etex,bot);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_freder.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_freder.mp
new file mode 100644
index 00000000000..9a834001aab
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_freder.mp
@@ -0,0 +1,94 @@
+% geom_freder.mp
+% L. Nobre G.
+% 2000
+
+%input featpost3Dplus2D;
+
+verbatimtex \documentclass{article} \usepackage{beton} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex
+
+beginfig(1);
+
+ f := (1.7,1.2,1);
+
+ Spread := 250;
+
+ color gridvec, sizevec, currpos, starpos, bordpos;
+ numeric i, j, k, counter, theta, phi, long, base, thetamax;
+ path closingface;
+ sizevec := (11,9,7);
+ gridvec := (0.1,0.1,0.1);
+ thetamax := 50;
+ long := 0.08;
+ base := 0.1;
+ starpos := ( -0.5*X(gridvec)*(X(sizevec)-1) ,
+ -0.5*Y(gridvec)*(Y(sizevec)-1) ,
+ -0.5*Z(gridvec)*(Z(sizevec)-1) );
+ bordpos := starpos - 0.5*gridvec;
+ npf1 := 4;
+ F1p1 := bordpos;
+ F1p2 := (X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p3 := (-X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p4 := (-X(bordpos),Y(bordpos), Z(bordpos));
+ npf2 := 4;
+ F2p1 := (X(bordpos),Y(bordpos), -Z(bordpos));
+ F2p2 := (X(bordpos),-Y(bordpos), -Z(bordpos));
+ F2p3 := (-X(bordpos),-Y(bordpos), -Z(bordpos));
+ F2p4 := (-X(bordpos),Y(bordpos), -Z(bordpos));
+ NF := 2;
+ draw facepath(1);
+ counter := 1;
+ for i= X(sizevec) upto X(sizevec):
+ for j=1 upto Y(sizevec):
+ for k=1 upto Z(sizevec):
+ phi := 0;
+ theta := 0;
+ currpos := starpos+( (i-1)*X(gridvec) ,
+ (j-1)*Y(gridvec) ,
+ (k-1)*Z(gridvec) );
+ phi := thetamax*cosd(90*Z(currpos)/abs(Z(starpos)));
+ theta := 90+thetamax*cosd(90*Z(currpos)/abs(Z(starpos)));
+ generatedirline( counter, phi, theta, long, currpos );
+ counter := incr(counter);
+ endfor;
+ endfor;
+ endfor;
+ for i=1 upto X(sizevec)-1:
+ for j=Y(sizevec) upto Y(sizevec):
+ for k=1 upto Z(sizevec):
+ phi := 0;
+ theta := 0;
+ currpos := starpos+( (i-1)*X(gridvec) ,
+ (j-1)*Y(gridvec) ,
+ (k-1)*Z(gridvec) );
+ phi := thetamax*cosd(90*Z(currpos)/abs(Z(starpos)));
+ theta := 90+thetamax*cosd(90*Z(currpos)/abs(Z(starpos)));
+ generatedirline( counter, phi, theta, long, currpos );
+ counter := incr(counter);
+ endfor;
+ endfor;
+ endfor;
+ NL := decr(counter);
+ director_invisible( true, base, false );
+ closingface = facepath(2);
+ fill closingface withcolor background;
+ draw closingface;
+ pickup pencircle scaled 1pt;
+ currpos := (-X(bordpos)+X(gridvec),Y(bordpos), Z(bordpos));
+ starpos := (-X(bordpos)+X(gridvec),Y(bordpos)+4*Y(gridvec), Z(bordpos));
+ drawarrow rp(currpos)..rp(starpos);
+ label.bot(btex $y$ etex,rp(starpos));
+ currpos := (-X(bordpos)+X(gridvec),Y(bordpos), Z(bordpos));
+ starpos := (-X(bordpos)+X(gridvec),Y(bordpos), Z(bordpos)+4*Z(gridvec));
+ drawarrow rp(currpos)..rp(starpos);
+ label.lft(btex $z$ etex,rp(starpos));
+ currpos := (X(bordpos),-Y(bordpos)+Y(gridvec), Z(bordpos));
+ starpos := (X(bordpos)+4*X(gridvec),-Y(bordpos)+Y(gridvec), Z(bordpos));
+ drawarrow rp(currpos)..rp(starpos);
+ label.bot(btex $x$ etex,rp(starpos));
+
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/graphexample.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/graphexample.mp
new file mode 100644
index 00000000000..6591ed5d0f9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/graphexample.mp
@@ -0,0 +1,16 @@
+% graphexample.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+input mp-tool;
+
+beginfig(1);
+ path thezigzag;
+ thezigzag = zigzagfrontier( origin, (200,200), 17,
+ 4, 20, 16, 12, blue, background );
+ draw thezigzag;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/lcurvature.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/lcurvature.mp
new file mode 100644
index 00000000000..ca6d5670457
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/lcurvature.mp
@@ -0,0 +1,114 @@
+% lcurvature.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ f := (5,3,4);
+ Spread := 70;
+ numeric gridstep, anglstep, cylength, cyradius, numcylis;
+ numeric i, j, curcoord, vcx, vcy, vcz, curangle, curnorma;
+ numeric major, othcoord, othangle;
+ color base, lenvec;
+ cylength := 0.1;
+ cyradius := 0.3;
+ gridstep := cyradius*2.2;
+ anglstep := 10;
+ numcylis := 5;
+ major := 0.35*gridstep*numcylis;
+ for i=1 upto numcylis: % bend
+ curnorma := i-0.5*(numcylis+1);
+ curangle := curnorma*anglstep;
+ vcx := cylength*cosd(curangle);
+ vcy := 0;
+ vcz := cylength*sind(curangle);
+ base := major*(sind(curangle),-1,-cosd(curangle));
+ lenvec := (vcx,vcy,vcz);
+ rigorousdisc( 0, true,base,cyradius,lenvec);
+ endfor;
+ for i=1 upto numcylis: % twist
+ curnorma := i-0.5*(numcylis+1);
+ curcoord := curnorma*gridstep;
+ curangle := curnorma*anglstep;
+ vcx := 0;
+ vcy := cylength*sind(curangle);
+ vcz := cylength*cosd(curangle);
+ base := (curcoord,-vcy/2-major,-vcz/2+major);
+ lenvec := (vcx,vcy,vcz);
+ rigorousdisc( 0, true,base,cyradius,lenvec);
+ endfor;
+ for i=1 upto numcylis: % splay
+ curnorma := i-0.5*(numcylis+1);
+ curcoord := curnorma*gridstep;
+ curangle := curnorma*anglstep;
+ vcx := cylength*sind(curangle);
+ vcy := 0;
+ vcz := -cylength*cosd(curangle);
+ lenvec := (vcx,vcy,vcz);
+ for j=1 upto numcylis:
+ othcoord := (j-0.5*(numcylis+1))*gridstep;
+ base := major*(0,1,-cosd(curangle));
+ base := base +(curcoord,othcoord,0);
+ rigorousdisc( 0, true,base,cyradius,lenvec);
+ endfor;
+ endfor;
+ for i=1 upto numcylis: % saddle
+ curnorma := i-0.5*(numcylis+1);
+ curcoord := curnorma*gridstep;
+ curangle := curnorma*anglstep;
+ vcx := cylength*sind(curangle);
+ for j=1 upto numcylis:
+ othcoord := (j-0.5*(numcylis+1))*gridstep;
+ othangle := (j-0.5*(numcylis+1))*anglstep;
+ vcy := -cylength*sind(othangle);
+ vcz := -cylength*cosd(curangle)*cosd(othangle);
+ base := major*(0,1,1-cosd(curangle)+cosd(othangle));
+ base := base + (curcoord,othcoord,0);
+ lenvec := (vcx,vcy,vcz);
+ rigorousdisc( 0, true,base,cyradius,lenvec);
+ endfor;
+ endfor;
+endfig;
+
+beginfig(2);
+ f := (5,3,4);
+ Spread := 70;
+ numeric gridstep, cylength, cyradius, numcylis;
+ numeric i, j, curcoord, curangle, curnorma;
+ numeric othcoord, othangle, zcoord, coef, othnorma;
+ color base, lenvec;
+ cylength := 0.1;
+ cyradius := 0.3;
+ gridstep := cyradius*2.2;
+ numcylis := 5;
+ coef := 0.32;
+ for i=1 upto numcylis: % splay
+ curnorma := i-0.5*(numcylis+1);
+ curcoord := curnorma*gridstep;
+ curangle := -curcoord*2*coef;
+ for j=1 upto numcylis:
+ othnorma := j-0.5*(numcylis+1);
+ othcoord := othnorma*gridstep;
+ othangle := -othcoord*2*coef;
+ zcoord := -coef*(othcoord**2+curcoord**2);
+ base := (curcoord,othcoord,zcoord);
+ lenvec := cylength*N((-curangle,-othangle,1));
+ rigorousdisc( 0, true,base,cyradius,lenvec);
+ endfor;
+ endfor;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/mptoolcone.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/mptoolcone.mp
new file mode 100644
index 00000000000..4053632efb5
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/mptoolcone.mp
@@ -0,0 +1,49 @@
+% mptoolcone.mp
+% L. Nobre G.
+% Y2K
+
+%input featpost3Dplus2D;
+
+input mp-tool;
+
+ defaultscale := 1.1;
+% defaultfont := "putr8r";
+ defaultfont := "bchr8r";
+
+beginfig(0);
+ color orig, axxc, ayyc, azzc;
+ color nalfa, gammacnt;
+ path gamma, cone, mybox;
+ numeric theta, radius, xxsize, yysize, zzsize;
+ picture mypict;
+
+ f := (3,4,2);
+ Spread := 100;
+ xxsize = 0.8;
+ yysize = 0.8;
+ zzsize = 1.0;
+ theta = 25;
+
+ orig = (0,0,0);
+ mypict = thelabel("Texto com acentuação.",rp(orig));
+ mybox = bbox mypict;
+ draw mypict;
+ draw mybox;
+ axxc = (xxsize,0,0);
+ ayyc = (0,yysize,0);
+ azzc = (0,0,zzsize);
+ nalfa = (0,sind(theta),cosd(theta));
+ gammacnt = cosd(theta)*cosd(theta)*nalfa;
+ radius := cosd(theta)*sind(theta);
+ gamma = rigorouscircle( gammacnt, nalfa, radius );
+ cone = rigorouscone(true, gammacnt, nalfa, radius, (xxsize,yysize,0) );
+ draw gamma dashed evenly;
+ draw cone;
+ drawarrow rp(orig)..rp(axxc);
+ drawarrow rp(orig)..rp(ayyc);
+ drawarrow rp(orig)..rp(azzc);
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nembends.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nembends.mp
new file mode 100644
index 00000000000..5900e88d187
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nembends.mp
@@ -0,0 +1,48 @@
+% nembends.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+%input mp-tool;
+
+beginfig(1);
+ f := 2*(5,3,4);
+ Spread := 70;
+
+ numeric hsdev, basestep, basxstep, basesdev;
+ numeric i, j, k, coesdev, cylength, cyradius, basen;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, aone;
+ numeric atwo, zcurr, coestep, angsdev, basxsdev;
+ color lenvec, currpos;
+
+
+ coestep := -0.15;
+ cylength := 0.6;
+ cyradius := 0.1;
+ basen := 3;
+ basestep := cylength*1.6;
+ basxstep := cyradius*4;
+ basesdev := basestep*0.001;
+ basxsdev := basxstep*0.001;
+ hsdev := 0.005;
+ coesdev := 0.001;
+ angsdev := 0.02;
+ for i=-basen upto basen:
+ for j=-basen upto basen:
+ xcurr := i*basxstep + basxsdev*normaldeviate;
+ ycurr := j*basestep + basesdev*normaldeviate;
+ zcurr := ycurr**2*coestep + coesdev*normaldeviate;
+ aone := angsdev*normaldeviate;
+ atwo :=angle(1,ycurr*2*coestep)+angsdev*normaldeviate;
+ vcz := cosd( aone )*sind( atwo );
+ vcy := cosd( aone )*cosd( atwo );
+ vcx := sind( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+ rigorousdisc(0,true,currpos-0.5*lenvec,cyradius,lenvec);
+ endfor;
+ endfor;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemdirector.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemdirector.mp
new file mode 100644
index 00000000000..4c1d88fe095
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemdirector.mp
@@ -0,0 +1,82 @@
+% nemdirector.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+%\usepackage{mathpazo}
+\begin{document}
+etex
+
+beginfig(1);
+ f := 2*(5,3,4);
+ Spread := 70;
+
+ numeric cylength, cyradius, zoneradi, zoneleng;
+ numeric i, angsdev, halfnum, directlen, arrthick;
+ numeric vcx, vcy, vcz, xcurr, ycurr, thickfact;
+ numeric atwo, zcurr, aone, apos;
+ color lenvec, currpos, tippos;
+ path arrpath;
+ picture tmppict;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Nu
+ cylength := 0.45;
+ cyradius := 0.1;
+ zoneradi := 2;
+ zoneleng := 4;
+ directlen := 5.6;
+ angsdev := 12;
+ halfnum := 130;
+ thickfact := 5;
+ arrthick := Spread*ps( (0,0,0), thickfact );
+ tippos := (0,0,0.5*directlen);
+ arrpath := rp(-tippos)--rp(tippos);
+ ahlength := 3*arrthick;
+ ahangle := 40;
+ for i=1 upto halfnum:
+ zcurr := -0.5*zoneleng+uniformdeviate( zoneleng );
+ apos := uniformdeviate( 180 );
+ xcurr := -zoneradi*cosd( apos )*uniformdeviate( 1 );
+ ycurr := zoneradi*sind( apos )*uniformdeviate( 1 );
+ aone := uniformdeviate( 360 );
+ atwo := angsdev*normaldeviate;
+ vcz := cosd( atwo );
+ vcy := sind( atwo )*sind( aone );
+ vcx := sind( atwo )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+ generatedirline( i, aone, 90-atwo, cylength, currpos );
+ endfor;
+ NL:= halfnum;
+ director_invisible( true, thickfact, false );
+ drawarrow arrpath withpen pencircle scaled arrthick;
+ for i=1 upto halfnum:
+ zcurr := -0.5*zoneleng+uniformdeviate( zoneleng );
+ apos := uniformdeviate( 180 );
+ xcurr := zoneradi*cosd( apos )*uniformdeviate( 1 );
+ ycurr := zoneradi*sind( apos )*uniformdeviate( 1 );
+ aone := uniformdeviate( 360 );
+ atwo := angsdev*normaldeviate;
+ vcz := cosd( atwo );
+ vcy := sind( atwo )*sind( aone );
+ vcx := sind( atwo )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+ generatedirline( i, aone, 90-atwo, cylength, currpos );
+ endfor;
+ NL:= halfnum;
+ director_invisible( true, thickfact, false );
+ label.ulft(btex $\vec{n}$ etex scaled 8.5 rotated 90, rp(tippos) );
+ tmppict := currentpicture rotated -90;
+ currentpicture := nullpicture;
+ draw tmppict;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp
new file mode 100644
index 00000000000..41caf4578a6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp
@@ -0,0 +1,60 @@
+% nemquira.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+
+
+beginfig(1);
+ f := 7*(1,2,1);
+ Spread := 70;
+
+ numeric hstep, hmax, hsdev, basestep, basemax, basesdev;
+ numeric i, j, k, angsdev, cylength, cyradius, basen, hn;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, hbase, aone;
+ numeric atwo, zcurr, angstep, counter;
+ color lenvec, currpos;
+
+ angstep := 20;
+ cylength := 0.45;
+ cyradius := 0.1;
+ basen := 4.5;
+ hn := 1;
+ basestep := cylength*1.37;
+ hstep := basestep;
+ basesdev := basestep*0.05;
+ hsdev := basesdev;
+ hbase := -0.8;
+ angsdev := 4;
+
+ basemax := basen*basestep;
+ hmax := hn*hstep;
+ counter := 0;
+ for i=-basen upto basen:
+ for j=-basen upto basen:
+ hcurr := hbase;
+ forever:
+ exitunless hcurr < hmax+hbase;
+ hcurr := hcurr + hstep;
+ zcurr := hcurr + hsdev*normaldeviate;
+ xcurr := i*basestep + basesdev*normaldeviate;
+ ycurr := j*basestep + basesdev*normaldeviate;
+ aone := angsdev*normaldeviate;
+ atwo := j*angstep + angsdev*normaldeviate;
+ vcz := sind( atwo+90 );
+ vcy := cosd( atwo+90 )*sind( aone );
+ vcx := cosd( atwo+90 )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+% rigorousdisc( 0, true, currpos-0.5*lenvec, cyradius, lenvec);
+ counter := incr(counter);
+ generatedirline( counter, aone, 90+atwo, cylength, currpos );
+ endfor;
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( true, 5, false );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquirapitch.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquirapitch.mp
new file mode 100644
index 00000000000..d29f0ffeb10
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquirapitch.mp
@@ -0,0 +1,69 @@
+% nemquirapitch.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ f := 7*(1,2,1);
+ Spread := 70;
+ ahlength := 3mm;
+ ahangle := 48;
+
+ numeric hsdev, basestep, basemax, basesdev, xpos;
+ numeric i, j, angsdev, cylength, cyradius, basen;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, aone;
+ numeric atwo, zcurr, angstep, counter, linelen;
+ color lenvec, currpos;
+
+ angstep := 20;
+ cylength := 0.45;
+ cyradius := 0.1;
+ basen := 4.5;
+ basestep := cylength*1.37;
+ basesdev := basestep*0.05;
+ hsdev := basesdev;
+ angsdev := 4;
+ linelen := cylength;
+
+ basemax := basen*basestep;
+ xpos := -(basen+1)*basestep;
+ draw rp((-xpos-0.5*cylength,-basemax,0))--rp((-xpos+0.5*cylength,-basemax,0));
+ draw rp((-xpos-0.5*cylength,basemax,0))--rp((-xpos+0.5*cylength,basemax,0));
+ drawdblarrow rp((-xpos,-basemax,0))--rp((-xpos,basemax,0));
+ label.urt( btex $\frac{p}{2}$ etex scaled 2.5, rp((-xpos,0,0)) );
+ counter := 0;
+ for i=-basen upto basen:
+ for j=-basen upto basen:
+ zcurr := hsdev*normaldeviate;
+ xcurr := i*basestep + basesdev*normaldeviate;
+ ycurr := j*basestep + basesdev*normaldeviate;
+ aone := angsdev*normaldeviate;
+ atwo := j*angstep + angsdev*normaldeviate;
+ vcz := sind( atwo+90 );
+ vcy := cosd( atwo+90 )*sind( aone );
+ vcx := cosd( atwo+90 )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+% rigorousdisc( 0, true, currpos-0.5*lenvec, cyradius, lenvec);
+ counter := incr(counter);
+ generatedirline( counter, aone, 90+atwo, cylength, currpos );
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( true, 5, false );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemuniax.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemuniax.mp
new file mode 100644
index 00000000000..b2ebec11c8f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemuniax.mp
@@ -0,0 +1,61 @@
+% nemuniax.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ f := 2*(5,3,4);
+ Spread := 70;
+
+ numeric hstep, hmax, hsdev, basestep, basemax, basesdev;
+ numeric i, j, k, angsdev, cylength, cyradius, basen, hn;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, hbase, aone;
+ numeric atwo, zcurr, counter;
+ color lenvec, currpos;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Nu
+ cylength := 0.6;
+ cyradius := 0.1;
+ basen := 12;
+ hn := 5;
+ basestep := cyradius*3.1;
+ hstep := cylength*1.5;
+ basesdev := cyradius*0.1;
+ hsdev := hstep*0.2;
+ hbase := -0.8;
+ angsdev := 12;
+
+ basemax := basen*basestep;
+ hmax := hn*hstep;
+ counter := 0;
+ for i=1 upto basen:
+ for j=1 upto basen:
+ hcurr := hbase;
+ forever:
+ exitunless hcurr < hmax+hbase;
+ hcurr := hcurr + hstep;
+ zcurr := hcurr + hsdev*normaldeviate;
+ xcurr := i*basestep + basesdev*normaldeviate;
+ ycurr := j*basestep + basesdev*normaldeviate;
+ aone := uniformdeviate( 360 );
+ atwo := angsdev*normaldeviate;
+ vcz := cosd( atwo );
+ vcy := sind( atwo )*sind( aone );
+ vcx := sind( atwo )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+% rigorousdisc( 0, true, currpos-0.5*lenvec, cyradius, lenvec);
+ counter := incr( counter );
+ generatedirline( counter, aone, 90-atwo, cylength, currpos );
+% generateonebiax( counter, aone, 90-atwo, cylength,
+% -60, 0.25*cylength, currpos );
+ endfor;
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( true, 5, false );
+% director_invisible( false, 5, true );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/pathernon.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/pathernon.mp
new file mode 100644
index 00000000000..8b3d8b56140
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/pathernon.mp
@@ -0,0 +1,65 @@
+% pathernon.mp
+% L. Nobre G.
+% 2004
+
+beginfig(0);
+ f := (4.8,3,3.65);
+ viewcentr := black;
+ Spread := 50;
+ horiZon := 0;
+ ShadowOn := false;
+ LightSource := (1,-1,7);
+ SphericalDistortion := true;
+ OverRidePolyhedricColor := true;
+ numeric side, coluheight, blocheight, roofheight, coluray, fact;
+ numeric acroside, acronum, auxa, raya, rayb , poshemi, lena, lenb;
+ color roofcenter, ba, bb, bc, bd, coluvec, colucen, auxb, auxc, auxd;
+ side = 1;
+ roofheight = 0.1;
+ coluheight = 0.7;
+ acroside = 4;
+ acronum = 20;
+ coluray = 0.06;
+ blocheight = 0.1;
+ poshemi = 0.25*side;
+ raya = 0.08;
+ rayb = 0.12;
+ lena = 0.13;
+ lenb = 0.26;
+ fact = 1.3;
+ auxa = 0.5*side-coluray;
+ coluvec = blue*coluheight;
+ colucen = 0.5*coluvec;
+ auxc = (0,-poshemi,0);
+ auxd = (0,-poshemi,raya+rayb);
+ setthestage( acronum, acroside );
+ V1 := (0.5*side,-0.5*side,coluheight+blocheight);
+ V2 := (0.5*side,0.5*side,coluheight+blocheight);
+ V3 := (-0.5*side,0.5*side,coluheight+blocheight);
+ V4 := (-0.5*side,-0.5*side,coluheight+blocheight);
+ V5 := (0,-0.5*side,coluheight+roofheight+blocheight);
+ V6 := (0,0.5*side,coluheight+roofheight+blocheight);
+ makeface1(1,4,5);
+ makeface2(1,2,6,5);
+ makeface3(2,3,6);
+ makeface4(3,4,5,6);
+ ba = (auxa,-auxa,0);
+ bb = (auxa,auxa,0);
+ bc = (-auxa,auxa,0);
+ bd = (-auxa,-auxa,0);
+ roofcenter = (V1+V2+V3+V4+V5+V6)/6;
+ auxb = roofcenter-blue*blocheight;
+ V7 := (-0.5*side,-0.5*side,coluheight);
+ getready( "draw_invisible( false, false, white, black )", roofcenter );
+ getready( "rigorousdisc( 0, true, ba, coluray, coluvec )", ba+colucen);
+ getready( "rigorousdisc( 0, true, bb, coluray, coluvec )", bb+colucen);
+ getready( "rigorousdisc( 0, true, bc, coluray, coluvec )", bc+colucen);
+ getready( "rigorousdisc( 0, true, bd, coluray, coluvec )", bd+colucen);
+ getready("kindofcube(false,true,V7,0,0,0,side,side,blocheight)",auxb);
+ getready( "whatisthis(auxc,lenb*red,lena*green,raya,fact)", auxc );
+ getready( "spatialhalfsfear( auxd, blue, rayb )", auxd );
+ doitnow;
+ produce_vga_border;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/planpht.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/planpht.mp
new file mode 100644
index 00000000000..dac34577eff
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/planpht.mp
@@ -0,0 +1,291 @@
+% planpht.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+% Planification wise 3D figures
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1); % phtpbq
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Definition of the 3D-figure
+ V1 := (1,0,0);
+ V2 := (0,1,0);
+ V5 := (0,0,1);
+ V3 := (-1,0,0);
+ V4 := (0,-1,0);
+ makeface1(1,2,3,4);
+ makeface2(1,2,5);
+ makeface3(2,3,5);
+ makeface4(3,4,5);
+ makeface5(4,1,5);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ f := (3,5,4);
+ Spread := 50;
+ pickup pencircle scaled 1pt;
+ sharpraytrace;
+endfig;
+
+beginfig(2); % phtdpbp
+ numeric altura, raio, xp, xs, yp, ys;
+ altura = 0.5257311;
+ raio = 0.8506508;
+ yp = 0.80901699;
+ ys = 0.5;
+ xp = 0.2628655;
+ xs = -0.6881909;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Definition of the 3D-figure
+ V1 := (raio,0,0);
+ V2 := (xp,yp,0);
+ V3 := (xs,ys,0);
+ V4 := (xs,-ys,0);
+ V5 := (xp,-yp,0);
+ V6 := (0,0,altura);
+ V7 := (0,0,-altura);
+ makeface1(1,2,6);
+ makeface2(5,1,6);
+ makeface3(2,3,6);
+ makeface4(3,4,6);
+ makeface5(4,5,6);
+ makeface6(1,2,7);
+ makeface7(5,1,7);
+ makeface8(2,3,7);
+ makeface9(3,4,7);
+ makeface10(4,5,7);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ f := (3,5,1.8);
+ Spread := 50;
+ pickup pencircle scaled 1pt;
+ sharpraytrace;
+endfig;
+
+beginfig(3); % phtcubo eps
+ defaultscale := 1;
+ defaultfont := "ccr10";
+ V1 := (1,1,1);
+ V2 := (-1,1,1);
+ V3 := (-1,-1,1);
+ V4 := (1,-1,1);
+ V5 := (1,1,-1);
+ V6 := (-1,1,-1);
+ V7 := (-1,-1,-1);
+ V8 := (1,-1,-1);
+ makeface1(1,2,3,4);
+ makeface2(5,6,7,8);
+ makeface3(1,2,6,5);
+ makeface4(2,3,7,6);
+ makeface5(3,4,8,7);
+ makeface6(4,1,5,8);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ f := (3,5,3);
+ Spread := 50;
+ pickup pencircle scaled 1pt;
+ sharpraytrace;
+ label.lft("A", rp(V8) );
+ label.top("B", rp(V1) );
+ label.top("C", rp(V3) );
+ label.lft("D", rp(V4) );
+ label.rt("E", rp(V2) );
+ label.rt("F", rp(V6) );
+endfig;
+
+beginfig(4); % phtptq
+ numeric high, low;
+ high = sqrt(2);
+ low = sqrt(2)-1.6818;
+ V1 := (1,1,high);
+ V2 := (-1,1,high);
+ V3 := (-1,-1,high);
+ V4 := (1,-1,high);
+ V5 := (high,0,low);
+ V6 := (0,high,low);
+ V7 := (-high,0,low);
+ V8 := (0,-high,low);
+ V9 := (0,0,0);
+ makeface1(5,6,7,8);
+ makeface2(6,1,2);
+ makeface3(7,2,3);
+ makeface4(8,3,4);
+ makeface5(5,4,1);
+ makeface6(5,6,1);
+ makeface7(6,7,2);
+ makeface8(7,8,3);
+ makeface9(8,5,4);
+ makeface10(9,1,2);
+ makeface11(9,2,3);
+ makeface12(9,3,4);
+ makeface13(9,4,1);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ f := (2,6,5);
+ Spread := 50;
+ pickup pencircle scaled 1pt;
+ sharpraytrace;
+endfig;
+
+beginfig(5); % phtnonrec
+ numeric tro;
+ tro = 2;
+ V1 := (tro,0,0);
+ V2 := (0,tro,0);
+ V3 := (-tro,0,0);
+ V4 := (0,-tro,0);
+ V5 := (1,1,1);
+ V6 := (-1,1,1);
+ V7 := (-1,-1,1);
+ V8 := (1,-1,1);
+ V9 := (1,1,-1);
+ V10 := (-1,1,-1);
+ V11 := (-1,-1,-1);
+ V12 := (1,-1,-1);
+ V13 := (0,0,tro);
+ V14 := (0,0,-tro);
+ makeface1(1,5,13,8);
+ makeface2(2,6,13,5);
+ makeface3(3,7,13,6);
+ makeface4(4,8,13,7);
+ makeface5(1,5,2,9);
+ makeface6(2,6,3,10);
+ makeface7(3,7,4,11);
+ makeface8(4,8,1,12);
+ makeface9(1,9,14,12);
+ makeface10(2,10,14,9);
+ makeface11(3,11,14,10);
+ makeface12(4,12,14,11);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ f := 2*(5,3,1.5);
+ Spread := 50;
+ pickup pencircle scaled 1pt;
+ sharpraytrace;
+endfig;
+
+beginfig(6); % pauphtflex eps
+ defaultscale := 1;
+ defaultfont := "ccr10";
+ color A, B, C, D, E, F, G;
+ numeric tro, Adist;
+ tro = sqrt(3)/2;
+ Adist = 0.88854;
+ V1 := (-1.8,0,0);
+ V2 := (-1.8,0.6,1.2*tro);
+ V3 := (1,0.6,1.2*tro);
+ V4 := (1,0,0);
+ V5 := (1,2.5,0);
+ V6 := (-1.8,2.5,0);
+ V7 := (0,0,0);
+ V8 := (0,0.707,0);
+ V9 := (0,0.707/4,0.707*tro/2);
+ V10:= (0.21928,Adist/2,tro*Adist);
+ V11:= (-0.37392,0.39638,0);
+ V12:= (-1.2125,Adist,0);
+ makeface1(1,2,3,4);
+ makeface2(4,5,6,1);
+ makeface3(7,8,9);
+ makeface4(8,9,10);
+ makeface5(8,10,11);
+ makeface6(10,11,12);
+ A = (0,1.3,0);
+ B = (0,1.3+sqrt(0.75),0);
+ C = (-0.5,1.3+sqrt(0.75),0);
+ D = (E+B)/2;
+ E = (sqrt(0.75),1.3,0);
+ F = ((1+sqrt(3))/4,1.3+(1+sqrt(3))/4,0);
+ G = (-1.5,1.3+sqrt(0.75),0);
+ f := 3*(2,5,2);
+ Spread := 100;
+ draw rp(A)--rp(B)--rp(E)--cycle;
+ draw rp(F)--rp(B)--rp(E)--cycle;
+ draw rp(A)--rp(B)--rp(C)--cycle;
+ draw rp(A)--rp(C)--rp(G)--cycle;
+ draw rp(A)--rp(F) dashed evenly;
+ pickup pencircle scaled 1pt;
+ sharpraytrace;
+ draw rp(V7)--rp(V9);
+ draw rp(V10)--rp(V9);
+ draw rp(V12)--rp((-1.2125,0,0)) dashed evenly;
+ label.urt("Adist", rp((V12+(-1.2125,0,0))/2) );
+ label.lft("A", rp(V10) );
+ label.bot("B", rp(V8) );
+ label.bot("B", rp(B) );
+ label.lrt("C", rp(V11) );
+ label.lft("D", rp(V9) );
+ label.bot("D", rp(D) );
+ label.llft("F", rp(V7) );
+ label.bot("F", rp(F) );
+ label.rt("G", rp(V12) );
+ angline(V6, V2, V1, 0.6, btex $\alpha$ etex, rt);
+ angline(V10, 2*V9, V9, 0.7, btex $\theta$ etex, bot);
+ draw rp(V9+N(V10-V9)*0.65)--rp(V9+N(V10-V9)*0.8);
+ draw rp(V9+N(V9)*0.5)--rp(V9+N(V9)*0.8);
+ label.bot(btex $p$ etex, rp((F+B)/2) );
+ label.ulft(btex $q$ etex, rp((D+B)/2) );
+ label.lft(btex $r$ etex, rp((D+A)/2) );
+ label.llft(btex $s$ etex, rp((A+B)/2) );
+ label.llft(btex $t$ etex, rp((A+C)/2) );
+ label.bot(btex $t$ etex, rp((G+C)/2) );
+ label.bot(btex $u$ etex, rp((C+B)/2) );
+ label.top(btex $v$ etex, rp((A+G)/2) );
+endfig;
+
+beginfig(7); % pauphttoro eps
+ defaultscale := 1;
+ defaultfont := "ccr10";
+ numeric sinthe, costhe, ux, uz, lx, lz, co;
+ costhe = (4*sqrt(5)-sqrt(3))/11;
+ sinthe = sqrt(1-costhe**2);
+ ux = costhe*sqrt(2)/2;
+ uz = sinthe/2;
+ lx = sqrt(4/3)*sinthe;
+ lz = -sqrt(2/3)*costhe;
+ co = sqrt(2)*(2*sqrt(5)+5*sqrt(3))/22;
+ V1 := (ux,0,-uz);
+ V2 := (lx,0,-lz);
+ V3 := (0,ux,uz);
+ V4 := (0,lx,lz);
+ V5 := (co,co,0);
+ V6 := (-ux,0,-uz);
+ V7 := (-lx,0,-lz);
+ V8 := (-co,co,0);
+ makeface1(1,2,3);
+ makeface2(1,2,5);
+ makeface3(2,3,5);
+ makeface4(3,4,5);
+ makeface5(3,4,1);
+ makeface6(1,4,5);
+ makeface7(3,6,7);
+ makeface8(3,7,8);
+ makeface9(6,7,8);
+ makeface10(3,8,4);
+ makeface11(4,6,8);
+ makeface12(3,4,6);
+ Spread := 100;
+% f := (1,-0.4,3);
+ f := 2*(2,1,2.8);
+ draw_invisible( false, false, TableC6, black );
+% cartaxes(0.2,0.2,0.2);
+ draw rp(V2)--rp(V1)--rp(V4) dashed evenly;
+ draw rp(V3)--rp(V1)--rp(V5) dashed evenly;
+ draw rp(V6)--rp(V4) dashed evenly;
+ draw rp(V6)--rp(V8) dashed evenly;
+% pickup pencircle scaled 1pt;
+% sharpraytrace;
+ label.rt("A", rp(V5) );
+ label.rt("C", rp(V3+(0,0.05,0)) );
+ label.rt("B", rp(V4) );
+ label.rt("D", rp(V8) );
+ label.lft("E", rp(V2) );
+ label.llft("F", rp(V1) );
+ label.lft("G", rp(V7) );
+ label.lft("H", rp(V6) );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/rigorcubo.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/rigorcubo.mp
new file mode 100644
index 00000000000..831861fc9b6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/rigorcubo.mp
@@ -0,0 +1,36 @@
+% rigorcubo.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(0);
+ defaultscale := 3;
+ defaultfont := "ccr10";
+ Spread := 50;
+ V1 := (1,1,1);
+ V2 := (-1,1,1);
+ V3 := (-1,-1,1);
+ V4 := (1,-1,1);
+ V5 := (1,1,-1);
+ V6 := (-1,1,-1);
+ V7 := (-1,-1,-1);
+ V8 := (1,-1,-1);
+ makeface1(1,2,3,4);
+ makeface2(5,6,7,8);
+ makeface3(1,2,6,5);
+ makeface4(2,3,7,6);
+ makeface5(3,4,8,7);
+ makeface6(4,1,5,8);
+ f := (3,5,3);
+ pickup pencircle scaled 1pt;
+ sharpraytrace;
+ label.lft("A", rp(V8) );
+ label.top("B", rp(V1) );
+ label.top("C", rp(V3) );
+ label.lft("D", rp(V4) );
+ label.rt("E", rp(V2) );
+ label.rt("F", rp(V6) );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/rmnbob.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/rmnbob.mp
new file mode 100644
index 00000000000..54d568c1e49
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/rmnbob.mp
@@ -0,0 +1,45 @@
+
+Spread := 70;
+f := (5,7,10);
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric i, r[], stepr, len, Numr, Minn, Maxn;
+ numeric fws, NumLines, linex;
+ path aro[], oneline;
+ color centre, axe, baseone, basetwo;
+
+ stepr := 0.1;
+ len := 3;
+ Numr := 5;
+ Minn := 5;
+ centre := (0,0,0);
+ axe := (1,0,0);
+ fws := 2;
+ NumLines := 30;
+ for i=0 upto NumLines:
+ linex := fws*(i/NumLines-0.5);
+ oneline := rp((linex,0.5*fws,-0.5*fws))
+ --rp((linex,-0.5*fws,-0.5*fws))
+ --rp((linex,-0.5*fws,0.5*fws));
+ draw oneline withcolor (0.7*background);
+ endfor;
+ baseone := centre+0.5*len*axe;
+ basetwo := centre-0.5*len*axe;
+ Maxn := Minn+Numr;
+ for i=Minn upto Maxn:
+ r[i] := i*stepr;
+ aro[i] := rigorouscircle(baseone,axe,r[i]);
+ endfor;
+ rigorousdisc( 0, true, baseone, r[Maxn], -len*axe );
+ drawoptions( dashed evenly );
+ rigorousdisc( 0, true, baseone, r[Minn], -len*axe );
+ for i=Maxn downto Minn:
+ filldraw aro[i] withcolor ((0.5+0.3*normaldeviate)*background);
+ endfor;
+ drawoptions( );
+ draw aro[Maxn];
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/sal.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/sal.mp
new file mode 100644
index 00000000000..e2c447a27a9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/sal.mp
@@ -0,0 +1,104 @@
+% Cesium Cloride Crystal Structure and EBG fields together
+% L. Nobre G.
+% 2002
+
+verbatimtex
+\documentclass{article}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric sfr, radfac, ind;
+ color xv, yv, zv;
+ path p[];
+ f := 3*(5,2,3);
+ Spread := 50;
+ sfr := 0.2;
+ radfac := 2.0;
+ xv := (sfr,0,0);
+ yv := (0,sfr,0);
+ zv := (0,0,sfr);
+ V1 := (-1,-1,-1);
+ V2 := (-1,1,-1);
+ V3 := (1,-1,-1);
+ V4 := (1,1,-1);
+ V5 := (-1,-1,1);
+ V6 := (-1,1,1);
+ V7 := (1,-1,1);
+ V8 := (1,1,1);
+ V9 := (0,0,0);
+ for ind=1 upto 8:
+ p[ind] := rigorousfearpath( V[ind], sfr );
+ endfor;
+ p9 := rigorousfearpath( V9, sfr*radfac );
+ unfill p1;
+ draw p1;
+ draw rp(V1+yv)--rp(V2-yv);
+ draw rp(V1+xv)--rp(V3-xv);
+ unfill p2;
+ draw p2;
+ unfill p3;
+ draw p3;
+ draw rp(V4-yv)--rp(V3+yv);
+ draw rp(V4-xv)--rp(V2+xv);
+ unfill p4;
+ draw p4;
+ draw rp(V1+zv)--rp(V5-zv);
+ draw rp(V2+zv)--rp(V6-zv);
+ unfill p9;
+ draw p9;
+ draw rp(V3+zv)--rp(V7-zv);
+ draw rp(V4+zv)--rp(V8-zv);
+ unfill p5;
+ draw p5;
+ draw rp(V5+yv)--rp(V6-yv);
+ draw rp(V5+xv)--rp(V7-xv);
+ unfill p6;
+ draw p6;
+ unfill p7;
+ draw p7;
+ draw rp(V8-yv)--rp(V7+yv);
+ draw rp(V8-xv)--rp(V6+xv);
+ unfill p8;
+ draw p8;
+ label( btex Cs${}^{+}$ etex, rp( V8 ) );
+ label( btex Cl${}^{-}$ etex, rp( V9 ) );
+endfig;
+
+beginfig(2);
+ numeric inc, ind, tep, larg, altr, lene;
+ path efld, velv, arch, auxi;
+ picture bfld;
+ pair vpos, cent;
+ tep = 1cm;
+ larg = 4;
+ altr = 3;
+ lene = larg*tep;
+ bfld = btex $\times$ etex;
+% bfld := bfld shifted -(center bfld);
+ efld = origin--(lene,0);
+ for ind = 0 upto altr:
+ drawarrow efld shifted (0,ind*tep);
+ endfor;
+ auxi = efld shifted (0,tep);
+ for ind = 1 upto altr:
+ for inc = 1 step 2 until 2*larg:
+ label( bfld, (0.5*inc*tep,(ind-0.5)*tep) );
+ endfor;
+ endfor;
+ vpos = (tep,0.5tep);
+ label.lft( btex $\vec{B}$ etex, (0.5tep,(altr-0.5)*tep) );
+ label.lft( btex $\vec{E}$ etex, origin );
+ label.top( btex $\vec{v}$ etex, vpos );
+ velv = vpos--((larg-1)*tep,(altr-0.5)*tep);
+ drawarrow velv;
+ cent = auxi intersectionpoint velv;
+ arch = ((fullcircle scaled (altr*tep*0.87)) shifted cent) cutafter velv;
+ draw arch;
+ label.rt( btex $\theta$ etex, point 0.5*length arch of arch );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/sfearschem.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/sfearschem.mp
new file mode 100644
index 00000000000..a9f2ea6a344
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/sfearschem.mp
@@ -0,0 +1,34 @@
+% sfearchem.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+defaultfont:="cmssu30";
+
+beginfig(1);
+ f := (4,2,1.5);
+ cartaxes( 1.5,1.5,0.75 );
+ drawoptions( withcolor red withpen pencircle scaled 1.3pt );
+ draw goodcirclepath( (0,0,0), (0,0,1), 1 );
+ drawoptions();
+ draw rigorouscircle( (0,0,0), (0,0,1), 1 );
+ draw spatialhalfcircle( (0,0,0), (0,0,1), 0.5, true );
+ draw spatialhalfcircle( (0,0,0), (0,0,1), 0.5, false ) dashed evenly;
+ draw rigorousfearpath( (0,0,0), 0.5 );
+ draw rp((0,0,0.5)) withpen pencircle scaled 1.3pt;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/signalvertexSD.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/signalvertexSD.mp
new file mode 100644
index 00000000000..dfc5eb3f501
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/signalvertexSD.mp
@@ -0,0 +1,40 @@
+% signalvertexSD.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+% Draw a torus with NP dots, a section of 3.14*RS^2
+% and a total diameter of 2*(RB+RS). The dots are placed
+% on a single closed line that turns around the $z$ axis
+% NB times and around the section NS times.
+
+f := 0.45f;
+
+%SphericalDistortion := true; Spread := 11;
+
+beginfig(1);
+ NP:=2000;
+ RB:=1;
+ RS:=0.2;
+ R3:=0.0;
+ NB:=8;
+ NS:=5;
+ jB:=360*NB/NP;
+ jS:=360*NS/NP;
+ for i=1 upto NP:
+ phi :=i*jS;
+ theta :=i*jB;
+ first :=(RB+(RS+R3*sind(4*theta))*cosd(phi))*cosd(theta);
+ second:=(RB+(RS+R3*sind(4*theta))*cosd(phi))*sind(theta);
+ third := (RS+R3*sind(4*theta))*sind(phi);
+ signalvertex( (first,second,third), 1, black );
+ endfor;
+endfig;
+
+end;
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/spherample.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/spherample.mp
new file mode 100644
index 00000000000..39352e6ba02
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/spherample.mp
@@ -0,0 +1,49 @@
+% spherample.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+SphericalDistortion := true;
+
+beginfig(1);
+ color orig, axxc, ayyc, azzc;
+ color nalfa, gammacnt, vertex;
+ numeric altura, grids, radius, xxsize, aux,
+ yysize, zzsize, i, numc, slope;
+ path sfear;
+
+ f := (5,4,2);
+ Spread := 120;
+ ShiftV := (200,200);
+ altura = 1;
+ radius = 0.3;
+ grids = 1;
+ numc = 9;
+ slope = 3;
+
+ for i=1 upto numc:
+ aux := (i-1-0.5*(numc-1))*grids;
+ gammacnt := (0,aux,0);
+ vertex := (aux/slope,aux,altura);
+ nalfa := vertex - gammacnt;
+ sfear := rigorousfearpath(gammacnt,radius);
+ unfill sfear;
+ draw sfear;
+ draw spatialhalfcircle(gammacnt,nalfa,radius,true);
+ endfor;
+ xxsize = radius;
+ yysize = 0.5*(numc-1)*grids;
+ zzsize = altura;
+ orig = (0,0,0);
+ axxc = (xxsize,0,0);
+ ayyc = (0,yysize,0);
+ azzc = (0,0,zzsize);
+% drawarrow rp(orig)..rp(axxc);
+% drawarrow rp(orig)..rp(ayyc);
+% drawarrow rp(orig)..rp(azzc);
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/squareanglines.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/squareanglines.mp
new file mode 100644
index 00000000000..769f2af8721
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/squareanglines.mp
@@ -0,0 +1,14 @@
+% squareanglines.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ cartaxes(1,1,1);
+ squareangline( red, green, black, 0.4);
+ squareangline( green, blue, black, 0.6);
+ squareangline( blue, red, black, 0.8);
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/troncoconedef.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/troncoconedef.mp
new file mode 100644
index 00000000000..0429ac4533f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/troncoconedef.mp
@@ -0,0 +1,54 @@
+% troncoconedef.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+f := (5,0,3);
+
+def twoclicpathesinapen( expr CycleA, CycleB )=
+ begingroup
+ numeric TheLengthOfA, TheLengthOfB, TheMargin;
+ path SubPathA, SubPathB;
+ TheMargin = 0.02;
+ TheLengthOfA = ( length CycleA ) - TheMargin;
+ TheLengthOfB = ( length CycleB ) - TheMargin;
+ SubPathA = subpath ( 0, TheLengthOfA ) of CycleA;
+ SubPathB = subpath ( 0, TheLengthOfB ) of CycleB;
+ ( makepath makepen ( SubPathA--SubPathB--cycle ) )
+ endgroup
+enddef;
+
+beginfig(0);
+ numeric rayo, rayt;
+ path onec, twoc, botc;
+ color axec, baso, bast;
+ rayo = 1;
+ rayt = 0.7;
+ axec = red;
+ baso = black;
+ bast = (1,1,1);
+ onec = goodcirclepath( baso, axec, rayo );
+ twoc = goodcirclepath( bast, axec, rayt );
+ botc = twoclicpathesinapen( onec, twoc );
+ fill botc withcolor green;
+ draw onec;
+ draw twoc;
+ draw botc;
+ dotlabel.bot( btex onec0 etex, point 0 of onec );
+ dotlabel.bot( btex twoc0 etex, point 0 of twoc );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistnlc.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistnlc.mp
new file mode 100644
index 00000000000..b3611cfbb14
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistnlc.mp
@@ -0,0 +1,54 @@
+% explvis2
+% L. Nobre G.
+% 1999
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+
+ f := (2,1,1);
+
+ Spread := 250;
+
+ color gridvec, sizevec, currpos, starpos, bordpos;
+ numeric i, j, k, counter, theta, phi, thetamin,
+ thetamax, thetastp, long, base, radius, polar;
+ sizevec := (4,36,1);
+ gridvec := (0.14,0.1,0.3);
+ thetamin := 90;
+ thetamax := 150;
+ long := 0.08;
+ base := 0.02;
+ thetastp := (thetamax-thetamin)/(X(sizevec)-1);
+ starpos := ( -X(gridvec)*X(sizevec) ,
+ -X(gridvec)*X(sizevec) ,
+ 0 );
+ bordpos := starpos;
+ npf1 := 4;
+ F1p1 := bordpos;
+ F1p2 := (X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p3 := (-X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p4 := (-X(bordpos),Y(bordpos), Z(bordpos));
+ counter := 2;
+ for i=1 upto X(sizevec):
+ radius := (i-1)*X(gridvec);
+ polar := i*floor(Y(sizevec)/X(sizevec));
+ for j=1 upto polar:
+ for k=1 upto Z(sizevec):
+ phi := 360*(j-1)/polar;
+ theta := thetamin+(i-1)*thetastp;
+ currpos := radius*(cosd(phi-90),sind(phi-90),0)
+ +(k-1)*(0,0,Z(gridvec));
+ generatedirface( counter, phi, theta, long, base, currpos );
+ counter := incr(counter);
+ endfor;
+ endfor;
+ endfor;
+ NF := decr(counter);
+ draw_all_test(false);
+% sharpraytrace;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistroundbiax.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistroundbiax.mp
new file mode 100644
index 00000000000..59a47907a88
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistroundbiax.mp
@@ -0,0 +1,62 @@
+% twistroundbiax.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+
+
+beginfig(1);
+
+ f := (2,1,1);
+
+ Spread := 250;
+
+ color gridvec, sizevec, currpos, starpos, bordpos;
+ numeric i, j, k, counter, theta, phi, gamma, thetamin, innercircle,
+ thetamax, thetastp, long, base, radius, polar, larg;
+ sizevec := (4,36,1);
+ gridvec := (0.143,0.1,0.1);
+ thetamin := 90;
+ thetamax := 150;
+ long := 0.08;
+ larg := 0.02;
+ base := 0.2;
+ gamma := -30;
+ innercircle := 0.5;
+ thetastp := (thetamax-thetamin)/(X(sizevec)-1);
+ starpos := ( -X(gridvec)*X(sizevec) ,
+ -X(gridvec)*X(sizevec) ,
+ 0 );
+ bordpos := starpos;
+ npf1 := 4;
+ F1p1 := bordpos;
+ F1p2 := (X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p3 := (-X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p4 := (-X(bordpos),Y(bordpos), Z(bordpos));
+ NF := 1;
+ draw facepath(1);
+ counter := 0;
+ for i=1 upto X(sizevec):
+ radius := (i-innercircle)*X(gridvec);
+ polar := i*floor(Y(sizevec)/X(sizevec));
+ for j=1 upto polar:
+ for k=1 upto Z(sizevec):
+ phi := 360*(j-1)/polar;
+ theta := thetamin+(i-innercircle)*thetastp;
+ currpos := radius*(cosd(phi-90),sind(phi-90),0)
+ +(k-1)*(0,0,Z(gridvec));
+ counter := incr(counter);
+% generateonebiax( counter, phi, theta, long,
+% gamma, larg, currpos );
+ generatedirline( counter, phi, theta, long, currpos );
+ endfor;
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( true, base, false );
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twocyclestogether.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twocyclestogether.mp
new file mode 100644
index 00000000000..ca94e87dc2e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twocyclestogether.mp
@@ -0,0 +1,113 @@
+% twocyclestogether.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+f := (4.5,-6,5);
+
+beginfig(1);
+ numeric len[], ray[];
+ color axe[], pos[], fix[], lab[], Ve[];
+ color reflabpos, reflabpoi;
+ picture txt[], dashpatt;
+ numeric inclang, aberang, sampang;
+ numeric squside, sqlevel, ul, outermagpos;
+ numeric innerray, polesep, fracone, fracsam;
+ numeric labelscale;
+ path tmpath, aupath, copath;
+
+ pickup pencircle scaled 1.2pt;
+ dashpatt = evenly scaled 3;
+ ul = 0.1;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Change one of these at a time. %%%%%%%%
+ inclang = 129;
+ aberang = 19;
+ outermagpos = 22ul;
+ polesep = 1.7ul;
+ len4 = 30ul;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ sampang = 30;
+ fracone = 0.33;
+ fracsam = 0.86;
+ ray1 = 10ul;
+ ray2 = 6ul;
+ ray3 = 8ul;
+ ray4 = 1.5ul;
+ ray5 = 4ul;
+ ray6 = 3ul;
+ ray7 = 3.5ul;
+ ray8 = 2ul;
+ len3 = 7ul;
+ len5 = 3ul;
+ len7 = 3.5ul;
+ len8 = 7ul;
+
+ len1 = (1-fracone)*(outermagpos-ray5-polesep);
+ pos1 = (-outermagpos,0,0);
+ rigorousdisc( 0, true, pos1, ray1, len1*(1,0,0) );
+
+ len2 = fracone*(outermagpos-ray5-polesep);
+ pos2 = (len1-outermagpos,0,0);
+ tmpath := goodcirclepath( pos2, (1,0,0), ray1 );
+ aupath := goodcirclepath( (-ray5-polesep,0,0), (1,0,0), ray2 );
+ copath := twocyclestogether( tmpath, aupath );
+ unfill copath;
+ draw copath;
+ draw aupath;
+
+ Ve5 := fracsam*ray5*( sind( sampang ),
+ cosd( sampang )*cosd( inclang -90 ),
+ cosd( sampang )*sind( inclang -90 ) );
+ Ve6 := fracsam*ray5*( -sind( sampang ),
+ cosd( sampang )*cosd( inclang -90 ),
+ cosd( sampang )*sind( inclang -90 ) );
+ Ve8 := fracsam*ray5*( sind( sampang ),
+ -cosd( sampang )*cosd( inclang -90 ),
+ -cosd( sampang )*sind( inclang -90 ) );
+ Ve7 := fracsam*ray5*( -sind( sampang ),
+ -cosd( sampang )*cosd( inclang -90 ),
+ -cosd( sampang )*sind( inclang -90 ) );
+ tmpath := rp(Ve5)--rp(Ve6)--rp(Ve7)--rp(Ve8)--cycle;
+ unfill tmpath;
+ draw tmpath;
+
+ axe6 = ( 0, cosd( inclang+aberang ), sind( inclang+aberang ) );
+ pos6 = ray1*axe6;
+ len6 = len4;
+ axe7 = ( 0, cosd( inclang-aberang ), sind( inclang-aberang ) );
+ pos7 = ( ray1 + 0.5len6 )*axe7;
+ draw rp(pos6)--rp((0,0,0))--rp(pos7) dashed dashpatt;
+
+ pos8 = pos7+len7*axe7;
+ tmpath := goodcirclepath( pos7, axe7, ray7 );
+ aupath := goodcirclepath( pos8, axe7, ray8 );
+ copath := twocyclestogether( tmpath, aupath );
+ unfill copath;
+ draw copath;
+ draw aupath;
+
+ axe8 = axe7;
+ rigorousdisc( 0, true, pos8, ray8, len8*axe8 );
+
+ len9 = len2;
+ pos9 = (ray5+polesep,0,0);
+ ray9 = ray2;
+ ray10 = ray1;
+ tmpath := goodcirclepath( pos9, (1,0,0), ray9 );
+ pos10 = pos9+len9*(1,0,0);
+ aupath := goodcirclepath( pos10, (1,0,0), ray10 );
+ copath := twocyclestogether( tmpath, aupath );
+ unfill copath;
+ draw copath;
+ draw aupath;
+
+ len10 = len1;
+ rigorousdisc( 0, true, pos10, ray10, len10*(1,0,0) );
+
+ produce_auto_scale;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twoupcones.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twoupcones.mp
new file mode 100644
index 00000000000..cc9b697dd37
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/twoupcones.mp
@@ -0,0 +1,51 @@
+% twoupcones.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton,concmath,ccfonts}
+\begin{document}
+etex
+
+f := 3*(2,1,0.5);
+
+beginfig(1);
+ numeric raya, rayb, heia, heib, rang, marg, u;
+ color cena, cenb, vera, verb, auxa, auxb, pora, porb, poha, pohb;
+ u = 0.38;
+ raya = 1u;
+ rayb = 2u;
+ heia = 0.65u;
+ marg = 0.2u;
+ rang = 60;
+ heib = heia*rayb/raya;
+ cena = (raya*(1+marg),0,0);
+ cenb = (-rayb*(1+marg),0,0);
+ auxa = cena + raya*(cosd(rang),sind(rang),0);
+ auxb = cenb + rayb*(cosd(rang),sind(rang),0);
+ pora = 0.5[auxa,cena];
+ porb = 0.5[auxb,cenb];
+ vera = cena+heia*blue;
+ verb = cenb+heib*blue;
+ poha = 0.5[cena,vera];
+ pohb = 0.5[cenb,verb];
+ verygoodcone(true,cenb,blue,rayb,verb);
+ draw rp(verb)--rp(cenb)--rp(auxb) dashed evenly;
+ label.urt(btex $h_1$ etex, rp(pohb));
+ label.urt(btex $R_1$ etex, rp(porb));
+ verygoodcone(true,cena,blue,raya,vera);
+ draw rp(vera)--rp(cena)--rp(auxa) dashed evenly;
+ label.urt(btex $h_2$ etex, rp(poha));
+ label.urt(btex $R_2$ etex, rp(pora));
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/anglinerigorouscircle.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/anglinerigorouscircle.mp
new file mode 100644
index 00000000000..57548730161
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/anglinerigorouscircle.mp
@@ -0,0 +1,108 @@
+% angline_rigorouscircle.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton,concmath,ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ color orig, axxc, ayyc, azzc;
+ color field, nalfa, ngamma, alfacnt, gammacnt, nazy, nax;
+ path alfa, gamma;
+ numeric nalfad, theta, radius, gammang, xxsize, yysize, zzsize;
+ numeric xxpos, yypos, zzpos, fieldpos, deltarad, deltapos;
+ numeric thetarad, thetapos, nalfapos, ngammapos;
+ numeric etalpharad, etalphapos, alphapos, gammapos;
+ picture xxlabel, yylabel, zzlabel, fieldlabel, deltalabel;
+ picture nalfalabel, ngammalabel, etalphalabel, alphalabel;
+ picture gammalabel, thetalabel;
+
+ f := (3,4,2);
+ Spread := 100;
+ xxsize = 0.8;
+ xxpos = 6;
+ yysize = 0.8;
+ yypos = 6;
+ zzsize = 1.3;
+ zzpos = 4;
+ field = (0.7,0,0.3);
+ fieldpos = 2;
+ deltarad = 0.45;
+ deltapos = 3;
+ nalfad = 1.0;
+ theta = 25;
+ thetarad = 0.3;
+ thetapos = 2;
+ nalfapos = 7;
+ gammang = 65;
+ ngammapos = 7;
+ etalpharad = 0.4;
+ etalphapos = 2;
+ alphapos = 6;
+ gammapos = 0;
+
+ xxlabel = btex $x_c$ etex;
+ yylabel = btex $y_c$ etex;
+ zzlabel = btex $z_c$ etex;
+ deltalabel = btex $\Delta$ etex;
+ fieldlabel = btex $\mathbf{B}$ etex;
+ thetalabel = btex $\theta$ etex;
+ nalfalabel = btex $\vec{n}_\alpha$ etex;
+ ngammalabel = btex $\vec{n}_\gamma$ etex;
+ etalphalabel= btex $\eta_\alpha$ etex;
+ alphalabel = btex $\alpha$ etex;
+ gammalabel = btex $\gamma$ etex;
+ orig = (0,0,0);
+ axxc = (xxsize,0,0);
+ ayyc = (0,yysize,0);
+ azzc = (0,0,zzsize);
+ nalfa = (0,sind(theta),cosd(theta));
+ alfacnt = (0,0,nalfad*cosd(theta));
+ radius = nalfad*sind(theta);
+ alfa = rigorouscircle( alfacnt, (0,0,1), radius );
+ gammacnt = cosd(theta)*cosd(theta)*nalfa;
+ radius := cosd(theta)*sind(theta);
+ gamma = rigorouscircle( gammacnt, nalfa, radius );
+ nazy = radius*sind(gammang)*ncrossprod( nalfa, axxc );
+ nax = radius*cosd(gammang)*ncrossprod( ayyc, nalfa );
+ ngamma = gammacnt+nax+nazy;
+ draw alfa dashed evenly;
+ draw gamma dashed evenly;
+ drawarrow rp(orig)..rp(axxc);
+ drawarrow rp(orig)..rp(ayyc);
+ drawarrow rp(orig)..rp(azzc);
+ drawarrow rp(orig)..rp(field);
+ drawarrow rp(orig)..rp(nalfa);
+ drawarrow rp(orig)..rp(ngamma);
+ drawarrow subpath (4,3) of alfa;
+ drawarrow subpath (8,7) of gamma;
+ anglinen( field, azzc, orig, deltarad, deltalabel, deltapos );
+ anglinen( azzc, nalfa, orig, thetarad, thetalabel, thetapos );
+ anglinen( ngamma, field, orig, etalpharad, etalphalabel, etalphapos );
+ labeln( xxlabel, rp(axxc), xxpos );
+ labeln( yylabel, rp(ayyc), yypos );
+ labeln( zzlabel, rp(azzc), zzpos );
+ labeln( fieldlabel, rp(field), fieldpos );
+ labeln( nalfalabel, rp(nalfa), nalfapos );
+ labeln( ngammalabel, rp(ngamma), ngammapos );
+ labeln( alphalabel, point 3 of alfa, alphapos );
+ labeln( gammalabel, point 7 of gamma, gammapos );
+ pickup pencircle scaled 1.5;
+ draw rp(alfacnt);
+ draw rp(gammacnt);
+% produce_auto_scale;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cartaxes.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/cartaxes.mp
new file mode 100644
index 00000000000..af8576e06c2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/cartaxes.mp
@@ -0,0 +1,28 @@
+verbatimtex
+\documentclass{article}
+\begin{document}
+
+%input featpost3Dplus2D;
+etex
+beginfig(1);
+ cartaxes(1,1,1);
+endfig;
+f := (5,3.5,1);
+beginfig(2);
+ cartaxes(1,1,1);
+ color va, vb, vc, vd;
+ va = (0.29,0.7,1.0);
+ vb = (X(va),Y(va),0);
+ vc = N((-Y(va),X(va),0));
+ vd = (0,Y(vc),0);
+ drawarrow rp(black)--rp(va);
+ draw rp(black)--rp(vb)--rp(va) dashed evenly;
+ draw rp(vc)--rp(vd) dashed evenly;
+ drawarrow rp(black)--rp(vc);
+ squareangline( va, vc, black, 0.15 );
+ angline( va, red, black, 0.75, decimal getangle( va, red ), lft );
+endfig;
+verbatimtex
+\end{document}
+etex
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/conicurv.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/conicurv.mp
new file mode 100644
index 00000000000..15aea824d14
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/conicurv.mp
@@ -0,0 +1,94 @@
+% conicurv.mp
+% L. Nobre G.
+% Y2K
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ f := (10,-5,5.44);
+ Spread := 30;
+ numeric shortradius, longradius, theta, width, height;
+ numeric updiff, refsize, vecsize, anglar, bord, totup;
+ color rn, fa, fc, pg, centre, speed, refx, refy;
+ color iplow, iphig, oplow,ophig, anglebase, central, refo;
+ color eplow, ephig, aplow,aphig, anglebase, central, refo;
+ theta = 30;
+ width = 3;
+ shortradius = 2;
+ bord = 2;
+ refsize = 1;
+ vecsize = 2;
+ height = 0.3;
+ anglar = 1.75;
+ totup = 3;
+ longradius = shortradius + width*cosd(theta);
+ updiff = width*sind(theta);
+ iplow = (0,shortradius,0);
+ iphig = (0,longradius,updiff);
+ oplow = (-shortradius,0,0);
+ ophig = (-longradius,0,updiff);
+ aplow = -iplow;
+ aphig = (0,-longradius,updiff);
+ eplow = -oplow;
+ ephig = (longradius,0,updiff);
+ anglebase = (0,longradius,0);
+ centre = 0.5[iplow,iphig]+(0,0,height);
+ central = (0,0,Z(centre));
+% refo = (0,0,-shortradius*sind(theta)/cosd(theta));
+ refo = (0,0.5*Y(centre),Z(centre));
+ refx = refsize*(0,cosd(theta),sind(theta));
+ refy = refsize*(0,-sind(theta),cosd(theta));
+% anglinen( iplow, oplow, (0,0,0), shortradius, "", 0 );
+% anglinen( iphig, ophig, (0,0,updiff), longradius, "", 0 );
+ angline(iphig,anglebase,iplow,width/anglar,btex $\theta$ etex,rt);
+ draw rp(central) withpen pencircle scaled 2pt;
+ draw rp(iplow)--rp(iphig);
+ draw rp(oplow)--rp(ophig);
+ draw rp(aplow)--rp(aphig);
+ draw rp(eplow)--rp(ephig);
+ draw rp(iphig)--rp(anglebase)--rp(aplow) dashed evenly;
+ draw rp(oplow)--rp(eplow) dashed evenly;
+ draw rp(central)--rp(centre) dashed evenly;
+% draw rp((0,-bord,-bord))--rp((0,longradius+bord,-bord))
+% --rp((0,longradius+bord,totup))--rp((0,-bord,totup))--cycle
+% withpen pencircle scaled 2pt;
+ draw rp((0,0,-bord))--rp((0,longradius+bord,-bord))
+ --rp((0,longradius+bord,totup))--rp((0,0,totup))--cycle;
+ drawarrow rp(refo)..rp(refo+refy);
+ drawarrow rp(refo)..rp(refo+refx);
+ label.llft(btex $y$ etex, rp(refo+refy));
+ label.lrt(btex $x$ etex, rp(refo+refx));
+ rn = centre+vecsize*refy;
+ fa = centre+vecsize*refx;
+ fc = centre+vecsize*(0,1,0);
+ pg = centre+vecsize*(0,0,-1);
+ speed = centre+vecsize*(1,0,0);
+ drawarrow rp(centre)..rp(rn);
+ drawarrow rp(centre)..rp(fa);
+ drawarrow rp(centre)..rp(fc);
+ drawarrow rp(centre)..rp(pg);
+ drawarrow rp(centre)..rp(speed);
+ label.rt(btex $\vec{R}_N$ etex, rp(rn));
+ label.top(btex $\vec{F}_a$ etex, rp(fa));
+ label.urt(btex $\vec{F}_c$ etex, rp(fc));
+ label.rt(btex $\vec{P}$ etex, rp(pg));
+ label.rt(btex $\vec{v}$ etex, rp(speed));
+ draw rp(centre) withpen pencircle scaled 10pt withcolor blue;
+ pickup pencircle scaled 2pt;
+ draw rigorouscircle( (0,0,updiff), (0,0,1), longradius );
+ draw rigorouscircle( (0,0,0), (0,0,1), shortradius );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfacecentered.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfacecentered.mp
new file mode 100644
index 00000000000..ac359c3ddf2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfacecentered.mp
@@ -0,0 +1,112 @@
+% cubicfacecentered.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+% verbatimtex
+% \documentclass{article}
+% \usepackage{beton}
+% \usepackage{concmath}
+% \usepackage{ccfonts}
+% \begin{document}
+% etex
+
+beginfig(1);
+ numeric tro;
+ pen fina, media, grossa;
+ color mygray;
+ tro = 2;
+ V1 := (tro,0,0);
+ V2 := (0,tro,0);
+ V3 := (-tro,0,0);
+ V4 := (0,-tro,0);
+ V5 := (1,1,1);
+ V6 := (-1,1,1);
+ V7 := (-1,-1,1);
+ V8 := (1,-1,1);
+ V9 := (1,1,-1);
+ V10 := (-1,1,-1);
+ V11 := (-1,-1,-1);
+ V12 := (1,-1,-1);
+ V13 := (0,0,tro);
+ V14 := (0,0,-tro);
+ V15 := (tro,0,tro);
+ V16 := (0,tro,tro);
+ V17 := (tro,tro,0);
+ V18 := (tro,0,-tro);
+ V19 := (tro,-tro,0);
+ V20 := (0,-tro,tro);
+ V21 := (-tro,0,tro);
+ V22 := (-tro,tro,0);
+ V23 := (0,tro,-tro);
+ V24 := (-tro,0,-tro);
+ V25 := (0,-tro,-tro);
+ V26 := (-tro,-tro,0);
+ V27 := (-2*tro,-tro,-tro);
+ V28 := (-2*tro,-tro,tro);
+ V29 := (-2*tro,tro,tro);
+ V30 := (-2*tro,tro,-tro);
+ makeface1(1,5,13,8);
+ makeface2(2,6,13,5);
+ makeface3(3,7,13,6);
+ makeface4(4,8,13,7);
+ makeface5(1,5,2,9);
+ makeface6(2,6,3,10);
+ makeface7(3,7,4,11);
+ makeface8(4,8,1,12);
+ makeface9(1,9,14,12);
+ makeface10(2,10,14,9);
+ makeface11(3,11,14,10);
+ makeface12(4,12,14,11);
+
+ makeface13(27,28,29,30);
+ makeface14(20,21,16,29,28);
+ makeface15(23,24,25,27,30);
+ makeface16(16,22,23,30,29);
+ makeface17(25,27,28,20,26);
+ makeface18(21,22,24,26);
+ makeface19(20,21,26);
+ makeface20(16,21,22);
+ makeface21(22,23,24);
+ makeface22(24,25,26);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% f := 2*(5,3,1.5);
+% f := 2*(5,3,4);
+ f := 2.34*(15,2.4,5.05);
+ Spread := 50;
+ fina = pencircle scaled 1pt;
+ media = pencircle scaled 1.2pt;
+ grossa= pencircle scaled 3pt;
+ mygray = 0.3background;
+% pickup fina;
+% draw rp(V25)--rp(V27)--rp(V28)--rp(V20)--
+% rp(V25)--rp(V23)--rp(V30)--rp(V27);
+ pickup media;
+ draw rp(V24)--rp(V25)--rp(V19)--rp(V20)--
+ rp(V26)--rp(V25)--rp(V18)--rp(V23)--
+ rp(V24)--rp(V26)--rp(V21)--rp(V22)--cycle withcolor mygray;
+ drawoptions( withpen grossa );
+ draw_invisible( false, false, TableC3, black );
+ fillfacewithlight( 14 );
+ fillfacewithlight( 16 );
+ drawoptions();
+ pickup media;
+ draw rp(V15)--rp(V16)--rp(V22)--rp(V23)--
+ rp(V17)--rp(V16)--rp(V21)--rp(V20)--
+ rp(V15)--rp(V17)--rp(V18)--rp(V19)--cycle withcolor mygray;
+% pickup fina;
+% draw rp(V28)--rp(V29)--rp(V30);
+% draw rp(V20)--rp(V16)--rp(V23);
+% draw rp(V16)--rp(V29);
+
+endfig;
+
+% verbatimtex \end{document} etex
+
+end;
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfigures.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfigures.mp
new file mode 100644
index 00000000000..93aebeb28a0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfigures.mp
@@ -0,0 +1,44 @@
+% cubicfigures.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+f := ( 1.2 , 2.0 , 1.6 );
+Spread := 75;
+
+V1 := (1,1,1);
+V2 := (-1,1,1);
+V3 := (-1,-1,1);
+V4 := (1,-1,1);
+V5 := (1,1,-1);
+V6 := (-1,1,-1);
+V7 := (-1,-1,-1);
+V8 := (1,-1,-1);
+makeface1(1,2,3,4);makeface2(5,6,7,8);
+makeface3(1,2,6,5);makeface4(2,3,7,6);
+makeface5(3,4,8,7);makeface6(4,1,5,8);
+makeline1(1,7);makeline2(2,8);
+makeline3(3,5);makeline4(4,6);
+
+beginfig(1);
+ ParallelProj := true;
+ SphericalDistortion := false;
+ pickup pencircle scaled 1pt;
+ draw_all_test(true);
+endfig;
+
+beginfig(2);
+ ParallelProj := false;
+ SphericalDistortion := false;
+ draw_all_test(true);
+endfig;
+
+beginfig(3);
+ ParallelProj := false;
+ SphericalDistortion := true;
+ PrintStep := 5;
+ draw_all_test(true);
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cylimple.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/cylimple.mp
new file mode 100644
index 00000000000..bef31891c97
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/cylimple.mp
@@ -0,0 +1,50 @@
+% cylimple.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+SphericalDistortion := true;
+f := 0.3*(5,4,2);
+Spread := 40;
+ShiftV := (200,200);
+
+%SphericalDistortion := false;
+%f := 3.3*(5,4,2);
+%Spread := 70;
+%Shifts := (250,250);
+
+beginfig(1);
+ color orig, axxc, ayyc, azzc;
+ color nalfa, gammacnt, vertex;
+ numeric altura, grids, radius, xxsize, aux,
+ yysize, zzsize, i, numc, slope;
+
+ altura = 1;
+ radius = 0.3;
+ grids = 1;
+ numc = 9;
+ slope = 3;
+
+ for i=1 upto numc:
+ aux := (i-1-0.5*(numc-1))*grids;
+ gammacnt := (0,aux,0);
+ vertex := (aux/slope,aux,altura);
+ nalfa := vertex - gammacnt;
+ rigorousdisc( 0, true, gammacnt, radius, nalfa );
+ endfor;
+ xxsize = radius;
+ yysize = 0.5*(numc-1)*grids;
+ zzsize = altura;
+ orig = (0,0,0);
+ axxc = (xxsize,0,0);
+ ayyc = (0,yysize,0);
+ azzc = (0,0,zzsize);
+% drawarrow rp(orig)..rp(axxc);
+% drawarrow rp(orig)..rp(ayyc);
+% drawarrow rp(orig)..rp(azzc);
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/downloadicon.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/downloadicon.mp
new file mode 100644
index 00000000000..78b9be800e7
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/downloadicon.mp
@@ -0,0 +1,66 @@
+% downloadicon.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+f := 0.4[(12,3,2),(2,5,6)]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Max: 0.8
+Spread := 30;
+TDAtiplen := 0.65;
+TDAhalftipbase := 0.35;
+TDAhalfthick := 0.15;
+
+beginfig(1);
+ color tracecol, lockcol, arrowcol;
+ numeric altura, compri, radius, altfrac, comfrac, radang;
+ path theside, thefront, thelocka, thelockb, thelock;
+ color poi[], startarrow, endarrow;
+ numeric numpl, aux, i;
+ altura = 1;
+ compri = 2;
+ radius = 0.8;
+ altfrac = 0.2;
+ comfrac = 0.15;
+ radang = 37;
+ numpl = 9;
+ tracecol = blue;
+ lockcol = black;
+ arrowcol = (0.7,0.2,0.1);
+ startarrow = (0,-radius,2);
+ endarrow = (0,0,radius);
+ currentpen := pencircle scaled 2.4mm;
+ drawoptions( withcolor tracecol );
+ rigorousdisc( 0, true, (-0.5compri,0,0), radius, (compri,0,0) );
+ poi1 = (0.5compri,-radius,0);
+ poi2 = (0.5compri,radius,0);
+ poi3 = (-0.5compri,radius,0);
+ poi4 = (0.5compri,-radius,-altura);
+ poi5 = (0.5compri,radius,-altura);
+ poi6 = (-0.5compri,radius,-altura);
+ theside = rp(poi1)--rp(poi2)--rp(poi5)--rp(poi4)--cycle;
+ thefront= rp(poi2)--rp(poi3)--rp(poi6)--rp(poi5)--cycle;
+ drawoptions( withcolor white );
+ fill theside;
+ fill thefront;
+ thelocka = rp((comfrac*compri,radius,-altfrac*altura))
+ --rp((comfrac*compri,radius,0));
+ thelockb = rp((-comfrac*compri,radius,-altfrac*altura))
+ --rp((-comfrac*compri,radius,0));
+ for i=1 upto numpl:
+ aux := i*radang/numpl;
+ poi7 := (comfrac*compri,radius*cosd(aux),radius*sind(aux));
+ poi8 := (-comfrac*compri,radius*cosd(aux),radius*sind(aux));
+ thelocka := thelocka...rp(poi7);
+ thelockb := thelockb...rp(poi8);
+ endfor;
+ thelock = thelocka--reverse thelockb--cycle;
+ drawoptions( withcolor lockcol );
+ filldraw thelock;
+ drawoptions( withcolor tracecol );
+ draw theside;
+ draw thefront;
+ drawoptions( withcolor arrowcol );
+ tdarrow( startarrow, endarrow );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/eemcsblabla.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/eemcsblabla.mp
new file mode 100644
index 00000000000..cb35011cc44
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/eemcsblabla.mp
@@ -0,0 +1,292 @@
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin@uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2003 Wolfgang Glunz <wglunz@pstoedit.net>
+
+% eemcsblabla.mp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Hacked by L. Nobre G.
+% 2004
+
+numeric zmax, rmax;
+zmax = 1;
+rmax = 1;
+
+def converterfunc( expr Pair ) =
+ begingroup
+ save xucf, yucf, astart, rr, xaux, yaux, raux, aaux, zaux;
+ numeric xucf, yucf, astart, rr, xaux, yaux, raux, aaux, zaux;
+ xucf = 0.21;
+ yucf = 0.002;
+ astart = 120;
+ rr = 0.0004;
+ aaux = astart + xucf*( ypart Pair );
+ raux = rr*aaux + yucf*( xpart Pair );
+ xaux = raux*cosd( aaux );
+ yaux = raux*sind( aaux );
+ zaux = zmax*(1-raux/rmax);
+ ( rp( ( xaux, yaux, zaux ) ) )
+ endgroup
+enddef;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of first featpost part
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+defaultscale := 0.16;
+beginfig(1);
+ path PreeditedPath[];
+linecap := butt;
+linejoin := mitered;
+PreeditedPath1 = hide(z1=(309,-996.562))z1--hide(z2=(309,-984.905))z2..controls hide(z3=(309,-982.215))z3 and hide(z4=(309.097,-979.126))z4..hide(z5=(309.292,-974.344))z5
+ --hide(z6=(309.392,-971.754))z6--hide(z7=(304.908,-969.861))z7--hide(z8=(304.211,-970.259))z8
+ ..controls hide(z9=(304.609,-978.329))z9 and hide(z10=(305,-984.307))z10..hide(z11=(305,-992.078))z11
+ --hide(z12=(305,-995.764))z12--hide(z13=(281.097,-991.58))z13..controls hide(z14=(279.503,-991.281))z14 and hide(z15=(278.706,-991.082))z15..hide(z16=(277.908,-990.683))z16
+ --hide(z17=(277.709,-986.001))z17..controls hide(z18=(277.61,-982.812))z18 and hide(z19=(277,-979.624))z19..hide(z20=(277,-977.432))z20
+ ..controls hide(z21=(277,-971.255))z21 and hide(z22=(278.088,-967.171))z22..hide(z23=(279.901,-967.071))z23
+ --hide(z24=(288.768,-966.274))z24--hide(z25=(288.768,-963.883))z25..controls hide(z26=(282.392,-963.584))z26 and hide(z27=(277.41,-962.886))z27..hide(z28=(273.625,-961.791))z28
+ ..controls hide(z29=(273.425,-963.883))z29 and hide(z30=(273,-966.872))z30..hide(z31=(273,-968.665))z31
+ ..controls hide(z32=(273,-968.964))z32 and hide(z33=(273,-970.06))z33..hide(z34=(273.1,-972.451))z34
+ --hide(z35=(273.199,-984.407))z35..controls hide(z36=(273.625,-985.303))z36 and hide(z37=(273.299,-991.182))z37..hide(z38=(273.299,-992.178))z38
+ ..controls hide(z39=(273.299,-995.864))z39 and hide(z40=(273.299,-998.554))z40..hide(z41=(273.1,-1003.64))z41
+ --hide(z42=(273,-1008.12))z42--hide(z43=(276.115,-1008.42))z43--hide(z44=(276.314,-1003.04))z44
+ ..controls hide(z45=(276.414,-1000.65))z45 and hide(z46=(277.211,-999.55))z46..hide(z47=(279.005,-999.55))z47
+ ..controls hide(z48=(280.399,-999.55))z48 and hide(z49=(283.588,-999.949))z49..hide(z50=(286.577,-1000.45))z50
+ --hide(z51=(336.79,-1009.11))z51..controls hide(z52=(338.583,-1009.51))z52 and hide(z53=(339.281,-1010.71))z53..hide(z54=(339.979,-1015.09))z54
+ --hide(z55=(342,-1015.59))z55--hide(z56=(341.901,-1011.51))z56..controls hide(z57=(342.085,-1008.42))z57 and hide(z58=(341.701,-1002.24))z58..hide(z59=(341.701,-1000.25))z59
+ --hide(z60=(342,-978.827))z60--hide(z61=(342,-977.831))z61..controls hide(z62=(342,-976.436))z62 and hide(z63=(341.616,-973.945))z63..hide(z64=(341.801,-970.657))z64
+ --hide(z65=(341.701,-967.369))z65--hide(z66=(338.683,-966.971))z66..controls hide(z67=(336.691,-966.772))z67 and hide(z68=(333.702,-966.274))z68..hide(z69=(328.82,-965.377))z69
+ --hide(z70=(326.229,-964.879))z70--hide(z71=(326.229,-967.569))z71--hide(z72=(332.207,-969.163))z72
+ ..controls hide(z73=(335.794,-970.159))z73 and hide(z74=(336.99,-971.056))z74..hide(z75=(337.488,-973.248))z75
+ ..controls hide(z76=(337.886,-975.24))z76 and hide(z77=(338.384,-982.513))z77..hide(z78=(338.384,-987.894))z78
+ ..controls hide(z79=(338.384,-991.978))z79 and hide(z80=(338.284,-994.17))z80..hide(z81=(337.687,-1001.04))z81
+ --hide(z82=(337.288,-1001.04))z82..controls hide(z83=(335.893,-1001.04))z83 and hide(z84=(335.096,-1000.95))z84..cycle;
+ %draw PreeditedPath1;
+%drawoptions( withcolor black );
+ %dotlabels.rt(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84);
+PreeditedPath2 = hide(z85=(310,-859.104))z85..controls hide(z86=(310,-857.61))z86 and hide(z87=(309.691,-856))z87..hide(z88=(307.698,-856))z88
+ ..controls hide(z89=(305.706,-856))z89 and hide(z90=(306,-857.73))z90..hide(z91=(306,-859.005))z91
+ --hide(z92=(306,-918.683))z92..controls hide(z93=(306,-920.078))z93 and hide(z94=(305.706,-922))z94..hide(z95=(307.698,-922))z95
+ ..controls hide(z96=(309.691,-922))z96 and hide(z97=(310,-920.09))z97..cycle;
+ %draw PreeditedPath2;
+%drawoptions( withcolor black );
+ %dotlabels.rt(85,86,87,88,89,90,91,92,93,94,95,96,97);
+PreeditedPath3 = hide(z98=(329,-859.005))z98..controls hide(z99=(329,-857.61))z99 and hide(z100=(329.019,-856))z100..hide(z101=(327.026,-856))z101
+ ..controls hide(z102=(325.034,-856))z102 and hide(z103=(325,-857.735))z103..hide(z104=(325,-859.104))z104
+ --hide(z105=(325,-918.583))z105..controls hide(z106=(325,-920.078))z106 and hide(z107=(325.034,-922))z107..hide(z108=(327.026,-922))z108
+ ..controls hide(z109=(329.019,-922))z109 and hide(z110=(329,-920.09))z110..cycle;
+ %draw PreeditedPath3;
+%drawoptions( withcolor black );
+ %dotlabels.rt(98,99,100,101,102,103,104,105,106,107,108,109,110);
+PreeditedPath4 = hide(z111=(332.008,-747.24))z111--hide(z112=(333.701,-749.831))z112..controls hide(z113=(335.594,-752.72))z113 and hide(z114=(336.69,-754.912))z114..hide(z115=(336.69,-755.908))z115
+ ..controls hide(z116=(336.69,-756.605))z116 and hide(z117=(335.794,-757.203))z117..hide(z118=(334.698,-757.203))z118
+ ..controls hide(z119=(333.701,-757.203))z119 and hide(z120=(332.805,-757.004))z120..hide(z121=(330.712,-756.506))z121
+ --hide(z122=(301.122,-749.034))z122..controls hide(z123=(299.429,-748.635))z123 and hide(z124=(297.835,-748.337))z124..hide(z125=(297.038,-748.337))z125
+ ..controls hide(z126=(295.344,-748.337))z126 and hide(z127=(293.904,-749.333))z127..hide(z128=(293.904,-750.927))z128
+ ..controls hide(z129=(293.904,-753.816))z129 and hide(z130=(295.799,-757.602))z130..hide(z131=(300.326,-763.679))z131
+ ..controls hide(z132=(304.809,-769.956))z132 and hide(z133=(308.296,-773.443))z133..hide(z134=(315.171,-778.325))z134
+ --hide(z135=(301.521,-775.336))z135..controls hide(z136=(299.529,-774.938))z136 and hide(z137=(298.034,-774.639))z137..hide(z138=(297.337,-774.639))z138
+ ..controls hide(z139=(295.444,-774.639))z139 and hide(z140=(293.904,-775.635))z140..hide(z141=(293.904,-777.229))z141
+ ..controls hide(z142=(293.904,-780.218))z142 and hide(z143=(296.214,-784.801))z143..hide(z144=(300.625,-790.281))z144
+ ..controls hide(z145=(304.012,-794.665))z145 and hide(z146=(306.104,-796.657))z146..hide(z147=(314.872,-803.133))z147
+ --hide(z148=(301.621,-799.845))z148..controls hide(z149=(300.027,-799.447))z149 and hide(z150=(298.532,-799.248))z150..hide(z151=(297.337,-799.248))z151
+ ..controls hide(z152=(295.444,-799.248))z152 and hide(z153=(293.904,-800.144))z153..hide(z154=(293.904,-801.539))z154
+ ..controls hide(z155=(293.904,-803.631))z155 and hide(z156=(296.094,-807.417))z156..hide(z157=(301.621,-814.79))z157
+ --hide(z158=(303.614,-817.579))z158--hide(z159=(305.606,-816.882))z159--hide(z160=(303.514,-813.694))z160
+ ..controls hide(z161=(301.222,-810.007))z161 and hide(z162=(301.023,-809.708))z162..hide(z163=(301.023,-809.011))z163
+ ..controls hide(z164=(301.023,-807.915))z164 and hide(z165=(302.02,-807.218))z165..hide(z166=(303.514,-807.218))z166
+ ..controls hide(z167=(308.595,-807.218))z167 and hide(z168=(327.823,-811.302))z168..hide(z169=(342.071,-815.387))z169
+ --hide(z170=(343.167,-815.088))z170--hide(z171=(341.672,-808.313))z171--hide(z172=(331.51,-806.121))z172
+ ..controls hide(z173=(320.451,-803.73))z173 and hide(z174=(314.573,-801.04))z174..hide(z175=(308.595,-795.561))z175
+ ..controls hide(z176=(304.012,-791.376))z176 and hide(z177=(301.023,-786.893))z177..hide(z178=(301.023,-784.103))z178
+ ..controls hide(z179=(301.023,-783.406))z179 and hide(z180=(301.82,-783.007))z180..hide(z181=(303.115,-783.007))z181
+ ..controls hide(z182=(306.602,-783.007))z182 and hide(z183=(317.96,-785.199))z183..hide(z184=(335.396,-789.284))z184
+ --hide(z185=(342.071,-790.878))z185--hide(z186=(343.167,-790.38))z186--hide(z187=(341.672,-783.505))z187
+ --hide(z188=(331.012,-781.413))z188..controls hide(z189=(322.942,-779.819))z189 and hide(z190=(315.47,-776.431))z190..hide(z191=(310.588,-772.048))z191
+ ..controls hide(z192=(304.51,-766.568))z192 and hide(z193=(301.023,-761.586))z193..hide(z194=(301.023,-758.398))z194
+ ..controls hide(z195=(301.023,-757.601))z195 and hide(z196=(301.92,-757.103))z196..hide(z197=(303.514,-757.103))z197
+ ..controls hide(z198=(305.905,-757.103))z198 and hide(z199=(307.3,-757.402))z199..hide(z200=(315.968,-759.594))z200
+ ..controls hide(z201=(322.244,-761.188))z201 and hide(z202=(328.222,-762.881))z202..hide(z203=(331.61,-763.878))z203
+ ..controls hide(z204=(334.399,-764.774))z204 and hide(z205=(336.99,-765.173))z205..hide(z206=(339.181,-765.173))z206
+ ..controls hide(z207=(341.672,-765.173))z207 and hide(z208=(343,-764.077))z208..hide(z209=(343,-762.184))z209
+ ..controls hide(z210=(343,-759.594))z210 and hide(z211=(340.945,-756.007))z211..cycle;
+ %draw PreeditedPath4;
+%drawoptions( withcolor black );
+ %dotlabels.rt(111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211);
+PreeditedPath5 = hide(z212=(309.392,-705.894))z212--hide(z213=(309.392,-703.602))z213..controls hide(z214=(302.916,-702.805))z214 and hide(z215=(299.23,-702.107))z215..hide(z216=(296.639,-701.211))z216
+ ..controls hide(z217=(295.145,-703.602))z217 and hide(z218=(293.904,-707.089))z218..hide(z219=(293.904,-710.775))z219
+ ..controls hide(z220=(293.904,-715.259))z220 and hide(z221=(297.633,-722.631))z221..hide(z222=(302.916,-728.21))z222
+ ..controls hide(z223=(307.798,-733.69))z223 and hide(z224=(318.259,-738))z224..hide(z225=(328.72,-738))z225
+ ..controls hide(z226=(338.285,-738))z226 and hide(z227=(343.096,-733.635))z227..hide(z228=(343.096,-725.321))z228
+ ..controls hide(z229=(343.096,-719.941))z229 and hide(z230=(341.186,-715.159))z230..hide(z231=(336.89,-709.679))z231
+ --hide(z232=(332.805,-704.698))z232--hide(z233=(330.812,-705.495))z233--hide(z234=(331.809,-706.989))z234
+ ..controls hide(z235=(336.591,-714.162))z235 and hide(z236=(338.096,-717.948))z236..hide(z237=(338.096,-721.435))z237
+ ..controls hide(z238=(338.096,-727.015))z238 and hide(z239=(334.174,-729.999))z239..hide(z240=(326.428,-729.999))z240
+ ..controls hide(z241=(315.668,-729.999))z241 and hide(z242=(305.307,-726.472))z242..hide(z243=(301.521,-721.535))z243
+ ..controls hide(z244=(299.927,-719.443))z244 and hide(z245=(298.904,-717.052))z245..hide(z246=(298.904,-713.963))z246
+ ..controls hide(z247=(298.904,-709.479))z247 and hide(z248=(300.897,-705.893))z248..cycle;
+ %draw PreeditedPath5;
+%drawoptions( withcolor black );
+ %dotlabels.rt(212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248);
+PreeditedPath6 = hide(z249=(304.359,-696.969))z249--hide(z250=(306.328,-696.969))z250..controls hide(z251=(306.101,-682.809))z251 and hide(z252=(306,-682.809))z252..hide(z253=(306,-680.083))z253
+ ..controls hide(z254=(306,-677.357))z254 and hide(z255=(305.773,-677.357))z255..hide(z256=(306,-662.743))z256
+ ..controls hide(z257=(304.563,-662.895))z257 and hide(z258=(303.878,-662.895))z258..hide(z259=(302.92,-662.895))z259
+ ..controls hide(z260=(301.936,-662.895))z260 and hide(z261=(301.179,-662.895))z261..hide(z262=(299.513,-662.743))z262
+ ..controls hide(z263=(299.892,-671.451))z263 and hide(z264=(299.968,-674.934))z264..hide(z265=(300.271,-688.942))z265
+ --hide(z266=(285.656,-675.161))z266..controls hide(z267=(277.857,-667.816))z267 and hide(z268=(273.693,-666))z268..hide(z269=(268.014,-666))z269
+ ..controls hide(z270=(259.306,-666))z270 and hide(z271=(254,-671.733))z271..hide(z272=(254,-681.068))z272
+ ..controls hide(z273=(254,-686.52))z273 and hide(z274=(255.495,-690.23))z274..hide(z275=(259.23,-693.94))z275
+ --hide(z276=(269.528,-695.227))z276--hide(z277=(269.528,-693.031))z277--hide(z278=(266.045,-692.047))z278
+ ..controls hide(z279=(261.653,-690.836))z279 and hide(z280=(260,-688.11))z280..hide(z281=(260,-683.037))z281
+ ..controls hide(z282=(260,-676.525))z282 and hide(z283=(263.996,-672))z283..hide(z284=(270.285,-672))z284
+ ..controls hide(z285=(275.964,-672))z285 and hide(z286=(281.567,-675.278))z286..cycle;
+ %draw PreeditedPath6;
+%drawoptions( withcolor black );
+ %dotlabels.rt(249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286);
+PreeditedPath7 = hide(z287=(330.015,-635.015))z287..controls hide(z288=(330.912,-637.705))z288 and hide(z289=(331.51,-639.499))z289..hide(z290=(333.004,-644.779))z290
+ ..controls hide(z291=(340.576,-645.477))z291 and hide(z292=(347.052,-647.967))z292..hide(z293=(356.616,-653.746))z293
+ --hide(z294=(357.712,-652.351))z294--hide(z295=(355.819,-648.266))z295..controls hide(z296=(345.358,-640.196))z296 and hide(z297=(339.082,-636.41))z297..cycle;
+ %draw PreeditedPath7;
+%drawoptions( withcolor black );
+ %dotlabels.rt(287,288,289,290,291,292,293,294,295,296,297);
+PreeditedPath8 = hide(z298=(270.736,-591))z298--hide(z299=(269.938,-591.477))z299..controls hide(z300=(271.632,-595.861))z300 and hide(z301=(272.429,-599.149))z301..hide(z302=(273.625,-607.02))z302
+ --hide(z303=(276.414,-607.02))z303--hide(z304=(276.414,-601.44))z304..controls hide(z305=(276.414,-599.647))z305 and hide(z306=(277.51,-599))z306..hide(z307=(280.499,-599))z307
+ --hide(z308=(327.026,-599))z308..controls hide(z309=(333.203,-599))z309 and hide(z310=(335.893,-599.093))z310..hide(z311=(342.867,-599.746))z311
+ --hide(z312=(343.465,-598.152))z312--hide(z313=(339.879,-594.167))z313..controls hide(z314=(342.469,-590.182))z314 and hide(z315=(343.196,-586.595))z315..hide(z316=(343.196,-581.315))z316
+ ..controls hide(z317=(343.196,-577.43))z317 and hide(z318=(342.584,-574.839))z318..hide(z319=(341.273,-572.747))z319
+ --hide(z320=(334.1,-562.784))z320..controls hide(z321=(330.912,-558.4))z321 and hide(z322=(322.643,-555))z322..hide(z323=(315.37,-555))z323
+ ..controls hide(z324=(303.812,-555))z324 and hide(z325=(296,-562.436))z325..hide(z326=(296,-572.946))z326
+ ..controls hide(z327=(296,-577.629))z327 and hide(z328=(297.606,-582.511))z328..hide(z329=(299.927,-585.101))z329
+ --hide(z330=(305.506,-591))z330--hide(z331=(306.602,-587.99))z331..controls hide(z332=(303.713,-585.201))z332 and hide(z333=(302,-581.315))z333..hide(z334=(302,-577.231))z334
+ ..controls hide(z335=(302,-568.862))z335 and hide(z336=(308.782,-563))z336..hide(z337=(319.455,-563))z337
+ ..controls hide(z338=(330.613,-563))z338 and hide(z339=(338.196,-569.219))z339..hide(z340=(338.196,-578.028))z340
+ ..controls hide(z341=(338.196,-583.208))z341 and hide(z342=(335.119,-591.001))z342..hide(z343=(333.004,-591.001))z343
+ --hide(z344=(311.584,-591))z344..controls hide(z345=(310.189,-591))z345 and hide(z346=(308.396,-589.843))z346..hide(z347=(306.602,-587.99))z347
+ --hide(z348=(305.506,-591))z348--cycle;
+PreeditedPath9 = hide(z349=(276.414,-548.138))z349--hide(z350=(276.414,-542.559))z350..controls hide(z351=(276.414,-540.765))z351 and hide(z352=(277.51,-540))z352..hide(z353=(280.499,-540))z353
+ --hide(z354=(332.108,-540))z354..controls hide(z355=(338.384,-540))z355 and hide(z356=(339.082,-540.304))z356..hide(z357=(339.281,-543.754))z357
+ --hide(z358=(339.58,-548.337))z358--hide(z359=(342.569,-548.337))z359..controls hide(z360=(342.27,-538.374))z360 and hide(z361=(342,-538.374))z361..hide(z362=(342,-535.884))z362
+ ..controls hide(z363=(342,-533.393))z363 and hide(z364=(341.701,-533.393))z364..hide(z365=(342,-523.43))z365
+ --hide(z366=(339.58,-523.43))z366--hide(z367=(339.281,-528.013))z367..controls hide(z368=(339.082,-531.4))z368 and hide(z369=(338.384,-532))z369..hide(z370=(332.108,-532))z370
+ --hide(z371=(270.736,-532))z371--hide(z372=(269.938,-532.596))z372..controls hide(z373=(271.632,-536.98))z373 and hide(z374=(272.429,-540.268))z374..cycle;
+ %draw PreeditedPath9;
+%drawoptions( withcolor black );
+ %dotlabels.rt(349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374);
+PreeditedPath10 = hide(z375=(291.607,-505.359))z375--hide(z376=(291.607,-501.374))z376--hide(z377=(282.641,-487.027))z377
+ ..controls hide(z378=(280.548,-483.739))z378 and hide(z379=(279.751,-483.042))z379..hide(z380=(277.958,-483.042))z380
+ ..controls hide(z381=(276.065,-483.042))z381 and hide(z382=(274.57,-484.436))z382..hide(z383=(274.57,-486.13))z383
+ ..controls hide(z384=(274.57,-487.624))z384 and hide(z385=(275.666,-489.418))z385..cycle;
+ %draw PreeditedPath10;
+%drawoptions( withcolor black );
+ %dotlabels.rt(375,376,377,378,379,380,381,382,383,384,385);
+PreeditedPath11 = hide(z386=(334.1,-489))z386--hide(z387=(342.569,-489.668))z387..controls hide(z388=(342.27,-483.192))z388 and hide(z389=(342,-483.192))z389..hide(z390=(342,-481.897))z390
+ ..controls hide(z391=(342,-481.399))z391 and hide(z392=(341.621,-478.908))z392..hide(z393=(342,-474.524))z393
+ --hide(z394=(339,-474.524))z394--hide(z395=(339.38,-478.41))z395..controls hide(z396=(339.281,-480.801))z396 and hide(z397=(338.484,-481))z397..hide(z398=(333.602,-481))z398
+ --hide(z399=(315.37,-481))z399..controls hide(z400=(300.824,-481))z400 and hide(z401=(296,-485.238))z401..hide(z402=(296,-496.941))z402
+ ..controls hide(z403=(296,-501.225))z403 and hide(z404=(296.948,-505.21))z404..hide(z405=(298.931,-508.996))z405
+ --hide(z406=(302.119,-514.015))z406--hide(z407=(308.595,-514.015))z407--hide(z408=(309.292,-511.686))z408
+ --hide(z409=(306.204,-510.391))z409..controls hide(z410=(301.521,-508.299))z410 and hide(z411=(301,-507.302))z411..hide(z412=(301,-502.719))z412
+ ..controls hide(z413=(301,-493.354))z413 and hide(z414=(304.635,-489.469))z414..hide(z415=(313.576,-489.17))z415
+ --hide(z416=(316.765,-488.999))z416--hide(z417=(329.916,-489))z417..controls hide(z418=(334.001,-491.926))z418 and hide(z419=(337.196,-498.285))z419..hide(z420=(337.196,-502.221))z420
+ ..controls hide(z421=(337.196,-506.206))z421 and hide(z422=(333.783,-510))z422..hide(z423=(329.816,-510))z423
+ ..controls hide(z424=(326.13,-510))z424 and hide(z425=(322.643,-507.884))z425..hide(z426=(320.75,-504.711))z426
+ ..controls hide(z427=(319.255,-502.193))z427 and hide(z428=(317.861,-496.654))z428..hide(z429=(316.765,-488.999))z429
+ --hide(z430=(313.576,-489.17))z430--hide(z431=(315.37,-499.033))z431..controls hide(z432=(317.861,-512.583))z432 and hide(z433=(322.543,-518))z433..hide(z434=(331.211,-518))z434
+ ..controls hide(z435=(338.982,-518))z435 and hide(z436=(343.196,-513.415))z436..hide(z437=(343.196,-505.708))z437
+ ..controls hide(z438=(343.196,-503.915))z438 and hide(z439=(342.998,-502.221))z439..cycle;
+ %draw PreeditedPath11;
+%drawoptions( withcolor black );
+ %dotlabels.rt(386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439);
+PreeditedPath12 = hide(z440=(321,-443.539))z440--hide(z441=(314.174,-440.55))z441--hide(z442=(314,-441.048))z442
+ --hide(z443=(314,-467.251))z443--hide(z444=(320.351,-469.941))z444--cycle;
+ %draw PreeditedPath12;
+%drawoptions( withcolor black );
+ %dotlabels.rt(440,441,442,443,444);
+PreeditedPath13 = hide(z445=(270.736,-424))z445--hide(z446=(269.938,-424.41))z446..controls hide(z447=(271.632,-428.794))z447 and hide(z448=(272.429,-432.082))z448..hide(z449=(273.625,-439.953))z449
+ --hide(z450=(276.414,-439.953))z450--hide(z451=(276.414,-434.374))z451..controls hide(z452=(276.414,-432.58))z452 and hide(z453=(277.51,-432))z453..hide(z454=(280.499,-432))z454
+ --hide(z455=(327.026,-432))z455..controls hide(z456=(333.203,-432))z456 and hide(z457=(335.893,-432.085))z457..hide(z458=(342.867,-432.68))z458
+ --hide(z459=(343.465,-431.086))z459--hide(z460=(339.879,-427.101))z460..controls hide(z461=(342.469,-423.115))z461 and hide(z462=(343.196,-419.529))z462..hide(z463=(343.196,-414.249))z463
+ ..controls hide(z464=(343.196,-410.363))z464 and hide(z465=(342.584,-407.773))z465..hide(z466=(341.273,-405.68))z466
+ --hide(z467=(334.1,-395.718))z467..controls hide(z468=(330.912,-391.334))z468 and hide(z469=(322.643,-388))z469..hide(z470=(315.37,-388))z470
+ ..controls hide(z471=(303.812,-388))z471 and hide(z472=(296,-395.409))z472..hide(z473=(296,-405.88))z473
+ ..controls hide(z474=(296,-410.562))z474 and hide(z475=(297.606,-415.444))z475..hide(z476=(299.927,-418.034))z476
+ --hide(z477=(305.506,-424))z477--hide(z478=(306.602,-420.924))z478..controls hide(z479=(303.713,-418.134))z479 and hide(z480=(302,-414.249))z480..hide(z481=(302,-410.164))z481
+ ..controls hide(z482=(302,-401.795))z482 and hide(z483=(308.782,-396))z483..hide(z484=(319.455,-396))z484
+ ..controls hide(z485=(330.613,-396))z485 and hide(z486=(338.196,-402.191))z486..hide(z487=(338.196,-410.961))z487
+ ..controls hide(z488=(338.196,-416.142))z488 and hide(z489=(335.119,-424.001))z489..hide(z490=(333.004,-424.001))z490
+ --hide(z491=(311.584,-424))z491..controls hide(z492=(310.189,-424))z492 and hide(z493=(308.396,-422.817))z493..hide(z494=(306.602,-420.924))z494
+ --hide(z495=(305.506,-424))z495--cycle;
+PreeditedPath14 = hide(z496=(276.414,-381.072))z496--hide(z497=(276.414,-375.492))z497..controls hide(z498=(276.414,-373.699))z498 and hide(z499=(277.51,-373))z499..hide(z500=(280.499,-373))z500
+ --hide(z501=(332.108,-373))z501..controls hide(z502=(338.384,-373))z502 and hide(z503=(339.082,-373.298))z503..hide(z504=(339.281,-376.688))z504
+ --hide(z505=(339.58,-381.271))z505--hide(z506=(342.569,-381.271))z506..controls hide(z507=(342.27,-371.308))z507 and hide(z508=(342,-371.308))z508..hide(z509=(342,-368.817))z509
+ ..controls hide(z510=(342,-366.326))z510 and hide(z511=(341.701,-366.326))z511..hide(z512=(342,-356.363))z512
+ --hide(z513=(339.58,-356.363))z513--hide(z514=(339.281,-360.946))z514..controls hide(z515=(339.082,-364.334))z515 and hide(z516=(338.384,-365))z516..hide(z517=(332.108,-365))z517
+ --hide(z518=(270.736,-365))z518--hide(z519=(269.938,-365.529))z519..controls hide(z520=(271.632,-369.913))z520 and hide(z521=(272.429,-373.201))z521..cycle;
+ %draw PreeditedPath14;
+%drawoptions( withcolor black );
+ %dotlabels.rt(496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521);
+PreeditedPath15 = hide(z522=(291.607,-338.289))z522--hide(z523=(291.607,-334.304))z523--hide(z524=(282.641,-319.957))z524
+ ..controls hide(z525=(280.548,-316.669))z525 and hide(z526=(279.751,-315.972))z526..hide(z527=(277.958,-315.972))z527
+ ..controls hide(z528=(276.065,-315.972))z528 and hide(z529=(274.57,-317.366))z529..hide(z530=(274.57,-319.06))z530
+ ..controls hide(z531=(274.57,-320.554))z531 and hide(z532=(275.666,-322.348))z532..cycle;
+ %draw PreeditedPath15;
+%drawoptions( withcolor black );
+ %dotlabels.rt(522,523,524,525,526,527,528,529,530,531,532);
+PreeditedPath16 = hide(z533=(334.1,-322))z533--hide(z534=(342.569,-322.598))z534..controls hide(z535=(342.27,-316.122))z535 and hide(z536=(342,-316.122))z536..hide(z537=(342,-314.827))z537
+ ..controls hide(z538=(342,-314.329))z538 and hide(z539=(341.621,-311.838))z539..hide(z540=(342,-307.454))z540
+ --hide(z541=(339,-307.454))z541--hide(z542=(339.38,-311.34))z542..controls hide(z543=(339.281,-313.731))z543 and hide(z544=(338.484,-314))z544..hide(z545=(333.602,-314))z545
+ --hide(z546=(315.37,-314))z546..controls hide(z547=(300.824,-314))z547 and hide(z548=(296,-318.219))z548..hide(z549=(296,-329.871))z549
+ ..controls hide(z550=(296,-334.155))z550 and hide(z551=(296.948,-338.14))z551..hide(z552=(298.931,-341.926))z552
+ --hide(z553=(302.119,-347.015))z553--hide(z554=(308.595,-347.015))z554--hide(z555=(309.292,-344.616))z555
+ --hide(z556=(306.204,-343.321))z556..controls hide(z557=(301.521,-341.229))z557 and hide(z558=(301,-340.232))z558..hide(z559=(301,-335.649))z559
+ ..controls hide(z560=(301,-326.284))z560 and hide(z561=(304.635,-322.399))z561..hide(z562=(313.576,-322.1))z562
+ --hide(z563=(316.765,-321.999))z563--hide(z564=(329.916,-322))z564..controls hide(z565=(334.001,-324.911))z565 and hide(z566=(337.196,-331.235))z566..hide(z567=(337.196,-335.151))z567
+ ..controls hide(z568=(337.196,-339.136))z568 and hide(z569=(333.783,-343))z569..hide(z570=(329.816,-343))z570
+ ..controls hide(z571=(326.13,-343))z571 and hide(z572=(322.643,-340.856))z572..hide(z573=(320.75,-337.641))z573
+ ..controls hide(z574=(319.255,-335.135))z574 and hide(z575=(317.861,-329.619))z575..hide(z576=(316.765,-321.999))z576
+ --hide(z577=(313.576,-322.1))z577--hide(z578=(315.37,-331.963))z578..controls hide(z579=(317.861,-345.513))z579 and hide(z580=(322.543,-351))z580..hide(z581=(331.211,-351))z581
+ ..controls hide(z582=(338.982,-351))z582 and hide(z583=(343.196,-346.389))z583..hide(z584=(343.196,-338.638))z584
+ ..controls hide(z585=(343.196,-336.845))z585 and hide(z586=(342.998,-335.151))z586..cycle;
+ %draw PreeditedPath16;
+%drawoptions( withcolor black );
+ %dotlabels.rt(533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586);
+PreeditedPath17 = hide(z587=(331.211,-292.211))z587..controls hide(z588=(331.211,-295.2))z588 and hide(z589=(334,-297.89))z589..hide(z590=(336.99,-297.89))z590
+ ..controls hide(z591=(339.979,-297.89))z591 and hide(z592=(342,-295.2))z592..hide(z593=(342,-292.311))z593
+ ..controls hide(z594=(342,-289.123))z594 and hide(z595=(339.668,-286.333))z595..hide(z596=(336.99,-286.333))z596
+ ..controls hide(z597=(334,-286.333))z597 and hide(z598=(331.211,-289.122))z598..cycle;
+ %draw PreeditedPath17;
+%drawoptions( withcolor black );
+ %dotlabels.rt(587,588,589,590,591,592,593,594,595,596,597,598);
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% second featpost part
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ verygoodcone(true, black, blue, rmax, (0,0,zmax) );
+ numeric k;
+ drawoptions( withcolor blue );
+ for k = 1 upto 17:
+ fill closedpathinspace( PreeditedPath[k], converterfunc );
+ endfor;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% That's it!
+
+endfig;
+end
+
+
+
+
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/embroncordada.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/embroncordada.mp
new file mode 100644
index 00000000000..ccc08d09d80
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/embroncordada.mp
@@ -0,0 +1,57 @@
+% embroncordada.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+verbatimtex
+\documentclass{article}
+%\usepackage{pandora}
+\usepackage{palatino}
+\begin{document}
+etex
+
+beginfig(1);
+ picture embroncordada;
+ numeric u, v;
+ path pa;
+ u = 1mm;
+ v = 1.1mm;
+ z1 = (105u,250v);
+ z2 = (105u,220v);
+ z3 = (125u,200v);
+ z4 = (85u,180v);
+ z5 = (25u,150v);
+ z6 = (105u,120v);
+ z7 = (185u,150v);
+ z8 = (110u,170v);
+ z9 = (45u,150v);
+ z10= (100u,105v);
+ z11= (170u,150v);
+ z12= (90u,195v);
+ z13= (35u,150v);
+ z14= (120u,135v);
+ z15= (80u,100v);
+ z16= (115u,75v);
+ z17= (105u,50v);
+ pa = z1{down}..z2..z3..z4..z5..z6..z7..z8..z9..z10..
+ z11..z12..z13..z14..z15..z16..{down}z17;
+ ropepattern( pa, 8u, 35 );
+ embroncordada = thelabel( btex
+ \begin{tabular}{c}
+ \textsf{EMBRON} \\
+ \textsf{CORDADA}
+ \end{tabular}
+ etex scaled 8, (105u,150v) );
+ draw embroncordada;
+% dotlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fakehole.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/fakehole.mp
new file mode 100644
index 00000000000..c1d28ea33c1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/fakehole.mp
@@ -0,0 +1,59 @@
+% fakehole.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+Spread := 23;
+f := (13,6,4.5);
+ShadowOn := true;
+LightSource := 10*(4,-1.7,2);
+beginfig(1);
+ numeric bigray, smaray, posray, posang, disang, aresiz, dislen;
+ numeric numl, numr, holang, i;
+ color pos, disaxe, holaxe;
+ aresiz := 13;
+ bigray := 2;
+ smaray := 0.25;
+ posray := 4;
+ posang := -10;
+ disang := 15;
+ dislen := 0.4;
+ holang := 115;
+ numl := 45;
+ disaxe := dislen*(cosd(disang),sind(disang),0);
+ pos := posray*(cosd(posang),sind(posang),0);
+ holaxe := (cosd(disang+90)*cosd(holang),
+ sind(disang+90)*cosd(holang),
+ sind(holang));
+ HoriZon := -bigray;
+ setthestage( 0.5*numl, aresiz );
+ rigorousdisc( smaray, true, pos, bigray, disaxe );
+ numr := floor(bigray/smaray);
+ for i=2-numr step 3 until -3:
+ fakehole( pos+i*smaray*holaxe, disaxe, smaray );
+ fakehole( pos-i*smaray*holaxe, disaxe, smaray );
+ endfor;
+endfig;
+
+ShadowOn := false;
+Spread := 25;
+ShiftV := 105.00mm*(0.5,1);
+beginfig(2);
+ numeric len, ray;
+ len = 10;
+ ray = 0.9;
+ f := (5,2*ray,1+1.5*ray);
+ viewcentr := (0,2.5*ray,1+0.5*ray);
+ drawoptions( withpen pencircle scaled 2.3pt );
+ kindofcube(false,true,black,0,0,0,1,len*ray,2);
+ numeric i;
+ for i=2 step 2 until len-1:
+ fakehole( (0,i*ray,1), red, ray );
+ endfor;
+endfig;
+
+end.
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/featpostlogo.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/featpostlogo.mp
new file mode 100644
index 00000000000..9e68e9899e6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/featpostlogo.mp
@@ -0,0 +1,29 @@
+% featpostlogo.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\newfont{\normald}{logod10 scaled 5000}
+\pagestyle{empty}
+\begin{document}
+etex
+
+input boxes;
+
+beginfig(1);
+ picture logo;
+ defaultdx := 3mm;
+ defaultdy := 2mm;
+ logo = thelabel.urt( btex {\normald FEATPOST} etex, origin );
+ boxit.thelogo( logo );
+ drawboxed( thelogo );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/ffcbob.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/ffcbob.mp
new file mode 100644
index 00000000000..3e4eff5a828
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/ffcbob.mp
@@ -0,0 +1,84 @@
+% ffcbob.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+f := 2*(15,0,2);
+Spread := 20;
+
+beginfig(1);
+ numeric phi, theta, back, numbacks, minnum, maxnum;
+ phi = 30;
+ theta = 80;
+ back = 7;
+ numbacks = 30;
+ minnum = 3;
+ maxnum = 15;
+ numeric upl[], dol[], pos[], len[], rai[] rao[];
+ upl1=1; dol1=17;pos1=-5.0; len1=2.0; rai1=1.5; rao1=6.5;
+ upl2=2; dol2=16;pos2=-3.0; len2=0.8; rai2=1.5; rao2=6.3;
+ upl3=3; dol3=15;pos3=-2.2; len3=0.4; rai3=1.5; rao3=4.8;
+ upl4=4; dol4=14;pos4=-1.8; len4=0.4; rai4=1.5; rao4=4.4;
+ upl5=5; dol5=13;pos5=-1.4; len5=0.4; rai5=1.5; rao5=4.2;
+ upl6=6; dol6=11;pos6=-1.0; len6=0.2; rai6=1.5; rao6=3.2;
+ upl7=7; dol7=12;pos7=-1.0; len7=0.2; rai7=4.0; rao7=4.6;
+ upl8=8; dol8=10;pos8=-0.8; len8=0.6; rai8=1.5; rao8=3.2;
+ upl9=9; dol9=7; pos9=-0.2; len9=0.4; rai9=1.5; rao9=3.2;
+ upl10=10;dol10=9;pos10=-0.2;len10=0.2;rai10=4.0;rao10=4.4;
+ upl11=11;dol11=8;pos11=0.0; len11=0.2;rai11=4.0;rao11=4.6;
+ upl12=12;dol12=6;pos12=0.2; len12=0.8;rai12=1.5;rao12=4.8;
+ upl13=13;dol13=5;pos13=1.0; len13=0.4;rai13=1.5;rao13=4.4;
+ upl14=14;dol14=3;pos14=1.4; len14=0.2;rai14=1.5;rao14=4.4;
+ upl15=15;dol15=4;pos15=1.4; len15=0.2;rai15=4.8;rao15=6.3;
+ upl16=16;dol16=2;pos16=1.6; len16=0.6;rai16=1.5;rao16=6.3;
+ upl17=17;dol17=1;pos17=2.2; len17=2.0;rai17=1.5;rao17=6.5;
+ color axe;
+ axe = (cosd(phi)*cosd(theta),sind(phi)*cosd(theta),sind(theta));
+ numeric i;
+ for i=0 upto numbacks:
+ draw rp(back*(1,2*i/numbacks-1,-1))--
+ rp(back*(-1,2*i/numbacks-1,-1))--
+ rp(back*(-1,2*i/numbacks-1,1)) withcolor 0.7background;
+ endfor;
+ numeric crux;
+ crux = cdotprod( f, axe );
+ numeric j, k;
+ if crux <= pos[minnum+1]:
+ for i=minnum upto maxnum:
+ j := maxnum;
+ forever:
+ exitunless dol[j] <> i;
+ j := decr( j );
+ endfor;
+% rigorousdisc(rai[j],true,axe*pos[j],rao[j],axe*len[j]);
+ rigorousdisc(0,true,axe*pos[j],rao[j],axe*len[j]);
+ endfor;
+ elseif crux > pos[maxnum]:
+ for i=minnum upto maxnum:
+% rigorousdisc(rai[i],true,axe*pos[i],rao[i],axe*len[i]);
+ rigorousdisc(0,true,axe*pos[i],rao[i],axe*len[i]);
+ endfor;
+ else:
+ k := minnum+2;
+ forever:
+ exitif crux <= pos[k];
+ k := incr( k );
+ endfor;
+ for i=minnum upto k-1:
+% rigorousdisc(rai[i],true,axe*pos[i],rao[i],axe*len[i]);
+ rigorousdisc(0,true,axe*pos[i],rao[i],axe*len[i]);
+ endfor;
+ for i=k upto maxnum:
+ j := maxnum;
+ forever:
+ exitunless dol[j] <> i;
+ j := decr( j );
+ endfor;
+% rigorousdisc(rai[j],true,axe*pos[j],rao[j],axe*len[j]);
+ rigorousdisc(0,true,axe*pos[j],rao[j],axe*len[j]);
+ endfor;
+ fi;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fieldlinesnorma.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/fieldlinesnorma.mp
new file mode 100644
index 00000000000..ca3e1edb9b6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/fieldlinesnorma.mp
@@ -0,0 +1,104 @@
+% fieldlinesnorma.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+Spread := 25;
+f := (10,-2,7);
+
+color posa, posb, perpd;
+numeric kfac;
+posa = -5*green;
+posb = 5*green;
+perpd = (1,0,1);
+kfac = -10;
+
+def vecfunc( expr posit )=
+ begingroup
+ save modula, modulb, field;
+ color field;
+ numeric modula, modulb;
+ modula = conorm( posit-posa );
+ modulb = conorm( posit-posb );
+ field = ( posit-posa )/(modula**3)+kfac*( posit-posb )/(modulb**3);
+ ( N(field) )
+ endgroup
+enddef;
+
+def potfunc( expr posit )=
+ begingroup
+ save field;
+ color field;
+ field = vecfunc( posit );
+ ( ncrossprod( field, perpd ) )
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric i, lena, lenb, numa, numb, sa, sb, diffstep, ray;
+ color stp;
+ path oneline;
+ pen grossa, fina;
+ grossa = pencircle scaled 3pt;
+ fina = pencircle scaled 2pt;
+ lena = 85;
+ lenb = 20;
+ numa = 30;
+ numb = 18;
+ diffstep = 0.1;
+ ray = 0.5;
+ sa = 75;
+ sb = 90;
+ for i=sa step numa until (360+sa):
+ stp := posa+( ray*cosd(i), ray*sind(i), 0 );
+ oneline := fieldlinepath( lena, stp, diffstep, vecfunc );
+ draw oneline withpen grossa;
+% draw oneline withpen fina withcolor background;
+ endfor;
+ for i=sb step numb until (360+sb):
+ stp := posb+( ray*cosd(i), ray*sind(i), 0 );
+ oneline := fieldlinepath( lenb, stp, -diffstep, vecfunc );
+ draw oneline withpen grossa;
+% draw oneline withpen fina withcolor background;
+ endfor;
+ draw rp(posa) withpen grossa;
+ draw rp(posb) withpen grossa;
+endfig;
+
+Spread := 17;
+f:= (10,-6,7);
+
+beginfig(2);
+ numeric i, lena, lenb, numa, numb, sa, sb, diffstep, ang;
+ color stp;
+ path oneline;
+ pen grossa, fina;
+ grossa = pencircle scaled 3pt;
+ fina = pencircle scaled 2pt;
+ lena = 85;
+ lenb = 125;
+ numa = 0.03;
+ numb = 0.30;
+ diffstep = 0.2;
+ ang = -90;
+ sa = 1.5;
+ sb = 4.5;
+ for i=sa step numa until (1.5+sa):
+ stp := posa+i*cosd(ang)*green+i*sind(ang)*ncrossprod(perpd,green);
+ oneline := fieldlinepath( lena, stp, diffstep, potfunc );
+ draw oneline withpen grossa;
+% draw oneline withpen fina withcolor background;
+ endfor;
+ ang := 180;
+ for i=sb step numb until (3.7+sb):
+ stp := posb+i*cosd(ang)*green+i*sind(ang)*ncrossprod(perpd,green);
+ oneline := fieldlinepath( lenb, stp, diffstep, potfunc );
+ draw oneline withpen grossa;
+% draw oneline withpen fina withcolor background;
+ endfor;
+ draw rp(posa) withpen grossa;
+ draw rp(posb) withpen grossa;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fis1prex.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/fis1prex.mp
new file mode 100644
index 00000000000..cff9d672d88
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/fis1prex.mp
@@ -0,0 +1,131 @@
+% fis1prex.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric largtecto, molasfrac, altutecto, compcorda, espetecto;
+ numeric largmolas, largnum, cordafrac, espesfrac, largmolfr;
+ numeric u, alpha, i, numturns, alphafrac, alpharadi, rcf, rcd;
+ pen mainp, auxip;
+ path leftspr, rightsp, corda, boxtecto, traco, linhalpha, rcp;
+ pair esqutecto, diretecto, esquemola, direimola, espessvec;
+ largnum = 100;
+ u = 1mm;
+ molasfrac = 0.8;
+ espesfrac = 0.1;
+ cordafrac = 0.3;
+ alphafrac = 0.3;
+ largmolfr = 0.12;
+ rcf = 0.1;
+ numturns = 11;
+ alpha = 120;
+ mainp = pencircle scaled 0.4u;
+ auxip = pencircle scaled 0.2u;
+ largtecto = largnum*u;
+ rcd = rcf*largtecto;
+ largmolas = largmolfr*molasfrac*largtecto;
+ compcorda = cordafrac*largtecto;
+ espetecto = espesfrac*largtecto;
+ altutecto = 0.5*largtecto*molasfrac*cosd(alpha/2)/sind(alpha/2);
+ alpharadi = 2*alphafrac*altutecto;
+ esqutecto = (-largtecto/2,altutecto);
+ diretecto = (largtecto/2,altutecto);
+ esquemola = (-largtecto*molasfrac/2,altutecto);
+ direimola = (largtecto*molasfrac/2,altutecto);
+ espessvec = (0,espetecto);
+ boxtecto = esqutecto--
+ diretecto--
+ (diretecto+espessvec)--
+ (esqutecto+espessvec)--cycle;
+ traco = (origin--(dir(45))) scaled 6in;
+ for i=-largnum upto largnum:
+ draw traco shifted (2*i*u,0) withpen auxip;
+ endfor;
+ clip currentpicture to boxtecto;
+ pickup mainp;
+ draw esqutecto--diretecto;
+ leftspr = springpath(direimola,origin,numturns,largmolas,0.55);
+ rightsp = springpath(origin,esquemola,numturns,largmolas,0.55);
+ draw leftspr;
+ draw rightsp;
+ rcp = randomcirc( rcd, 0.1*rcd, 180 ) shifted (0,-compcorda);
+ draw rcp;
+ draw origin--(0,-compcorda) cutafter rcp;
+ linhalpha = fullcircle scaled alpharadi;
+ linhalpha := linhalpha cutafter rightsp;
+ linhalpha := linhalpha cutbefore leftspr;
+ draw linhalpha withpen auxip;
+ label(btex m etex scaled 3, (0,-compcorda) );
+ label.urt(btex $\alpha$ etex scaled 3, (0,alpharadi/2) );
+endfig;
+
+beginfig(2);
+ numeric u, basesize, baseheight, alphang, thetang, sfearsize;
+ numeric armsize, marginraise, totalraise, axeray, cardansize;
+ color basepos, tdorigin, oneaxe, otheraxe, rotaxbascenter, axedir;
+ color gluaxbascenter, rotrajcenter, cardanpos, refpoint, anotheraxe;
+ color armdir, armbasonepos, armbastwopos, sfearpos;
+ path glueaxebase, rotataxebase, rotrajector, axepath, sfearpath;
+ numeric armray;
+ u = 0.0125mm;
+ basesize = 30u;
+ baseheight = 3u;
+ alphang = 20;
+ thetang = -18;
+ armsize = 25u;
+ marginraise = 6u;
+ axeray = 3u;
+ cardansize = 3u;
+ sfearsize = 4u;
+ armray = 1.5u;
+ totalraise = armsize*sind(alphang)+marginraise+cardansize*cosd(alphang);
+ basepos = (0,0,-0.5baseheight);
+ f := -2*(-2basesize,-basesize,-5baseheight);
+ kindofcube(false, false, basepos, 0, 0, 0, 2basesize, 2basesize, baseheight );
+ tdorigin = (0,0,0);
+ oneaxe = (0,axeray/cosd(alphang),0);
+ otheraxe = (1,0,0);
+ anotheraxe = (0,cosd(alphang),-sind(alphang));
+ gluaxbascenter = tdorigin - (0,totalraise*sind(alphang),0);
+ glueaxebase = ellipticpath( gluaxbascenter, oneaxe, axeray*otheraxe );
+ axedir = (0,sind(alphang),cosd(alphang));
+ rotrajcenter = (0,0,totalraise);
+ rotaxbascenter = rotrajcenter-axedir*cardansize;
+ refpoint = rotrajcenter+axedir*cardansize;
+ rotataxebase = rigorouscircle( rotaxbascenter, axedir, axeray );
+ rotrajector = rigorouscircle( rotrajcenter, axedir, armsize );
+ axepath = twocyclestogether( glueaxebase, rotataxebase );
+ fill axepath withcolor background;
+ draw axepath;
+ draw rotataxebase;
+ drawarrow subpath (3,10.5) of rotrajector dashed evenly;
+% dotlabel.top( btex 1 etex, point 1 of rotrajector );
+% dotlabel.top( btex 5 etex, point 5 of rotrajector );
+% dotlabel.top( btex 3 etex, point 3 of rotrajector );
+ kindofcube(false,false,rotrajcenter,90,90-alphang,thetang,2cardansize,2cardansize,2cardansize);
+ draw rp(refpoint);
+ armdir := otheraxe*cosd(thetang)+anotheraxe*sind(thetang);
+ armbasonepos = rotrajcenter + cardansize*armdir;
+ armbastwopos = rotrajcenter + (armsize-sfearsize)*armdir; % NOT RIGOROUS
+ sfearpos = rotrajcenter + armsize*armdir;
+ rigorousdisc( 0, true, armbasonepos, armray, armbastwopos-armbasonepos );
+ sfearpath = rigorousfearpath( sfearpos, sfearsize );
+ fill sfearpath withcolor background;
+ draw sfearpath;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fis3prex.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/fis3prex.mp
new file mode 100644
index 00000000000..0fbc862c3b2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/fis3prex.mp
@@ -0,0 +1,481 @@
+% fis3prex.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+def platecap( expr Xpos, Shade, Angle, Oray, Iray, NumPoints ) =
+ begingroup
+ path perim, op, ip;
+ numeric i;
+ color axey, axmz, tp;
+ axey = cosd( Angle )*green + sind( Angle )*blue;
+ axmz = -cosd( Angle )*blue + sind( Angle )*green;
+ tp = Xpos*red;
+ op = rp( tp+Oray*axey )
+ for i=1 upto NumPoints:
+ ..rp(tp+Oray*(cosd(i*180/NumPoints)*axey+sind(i*180/NumPoints)*axmz))
+ endfor;
+ ip = rp( tp+Iray*axey )
+ for i=1 upto NumPoints:
+ ..rp(tp+Iray*(cosd(i*180/NumPoints)*axey+sind(i*180/NumPoints)*axmz))
+ endfor;
+ perim = op--reverse ip--cycle;
+ fill perim withcolor Shade;
+ draw perim
+ endgroup
+enddef;
+
+beginfig(1);
+ f := ( 4, 1, 2 );
+ numeric i, j, xsiz, ysiz, gstep, angl, vlen, fact, xa, xb, yb;
+ color vdir, bpos, ap, bp, cp, dp;
+ path base;
+ xsiz = 2;
+ ysiz = 3;
+ gstep = 0.23;
+ angl = 33;
+ vlen = 0.45;
+ fact = 1.3;
+ vdir = vlen*( 0, cosd(angl), sind(angl) );
+ xa = 0.5*gstep;
+ xb = (xsiz+0.5)*gstep;
+ yb = (ysiz+0.5)*gstep;
+ ap = (-xa,-xa,0);
+ bp = (-xa,yb,0);
+ cp = (xb,yb,0);
+ dp = (xb,-xa,0);
+ for i=0 upto xsiz:
+ for j=0 upto ysiz:
+ bpos := gstep*(i,j,0);
+ draw rp(bpos-fact*vdir)--rp(bpos);
+ drawarrow rp(bpos-fact*vdir)--rp(bpos-vdir);
+ endfor;
+ endfor;
+ base = rp(ap)--rp(bp)--rp(cp)--rp(dp)--cycle;
+ fill base withcolor 0.7background;
+ draw base;
+ for i=0 upto xsiz:
+ for j=0 upto ysiz:
+ bpos := gstep*(i,j,0);
+ draw rp(bpos+fact*vdir)--rp(bpos);
+ drawarrow rp(bpos)--rp(bpos+vdir);
+ endfor;
+ endfor;
+ draw rp(black)--rp( (0,0,vlen) ) dashed evenly;
+ angline( fact*vdir, (0,0,vlen), black, 0.7*vlen, btex 57$^\circ$ etex, urt );
+ label.top( btex $\vec{B}$ etex, rp(vdir) );
+endfig;
+
+beginfig(2);
+ f := ( 4, 3, 2 );
+ numeric i, numplates, xdelta, iangle, ang, oray, iray, numpois;
+ numeric aang, imray, omray, mmray, axray, numouts;
+ color shade, shadea, shadeb, p[];
+ path fucir, outerarrow, theknob;
+ numplates = 11;
+ numouts = 2;
+ xdelta = 0.1;
+ iangle = 53;
+ oray = 0.5;
+ iray = 0.07;
+ imray = 0.52;
+ omray = 0.67;
+ mmray = 0.64;
+ axray = 0.04;
+ numpois = 10;
+ shadea = 0.8background;
+ shadeb = 0.6background;
+ fucir = rigorouscircle( (-(numplates-1)*xdelta,0,0), red, imray );
+ outerarrow = subpath (1.7,2.3) of fucir;
+ p1 = ( -(numplates-1)*xdelta, imray, 0 );
+ p2 = ( -(numplates-1)*xdelta, omray, 0 );
+ p3 = ( -(numplates-2)*xdelta, imray, 0 );
+ p4 = ( -(numplates-2)*xdelta, omray, 0 );
+ p5 = ( -(numplates-4)*xdelta, mmray, 0 );
+ p6 = ( -(numplates-2)*xdelta, mmray, 0 );
+ p7 = ( -(numplates+1)*xdelta, mmray, 0 );
+ p8 = ( -(numplates-1)*xdelta, mmray, 0 );
+ p9 = ( -xdelta, cosd( 0.5*iangle )*0.5*oray, sind( 0.5*iangle )*0.5*oray );
+ p0 = ( 0, cosd( 0.5*iangle )*0.5*oray, -sind( 0.5*iangle )*0.5*oray );
+ for i=1-numplates upto 0:
+ if odd(i):
+ shade := shadea;
+ ang := iangle;
+ else:
+ shade := shadeb;
+ ang := 0;
+ fi;
+ platecap( i*xdelta, shade, ang, oray, iray, numpois );
+ background := shadea;
+ rigorousdisc( 0, true, (i*xdelta,0,0), axray, xdelta*red );
+ background := shadeb;
+ rigorousdisc( 0, true, (i*xdelta,-oray,0), axray, xdelta*red );
+ background := background;
+ endfor;
+ for i=1 upto numouts:
+ background := shadea;
+ rigorousdisc( 0, true, (i*xdelta,0,0), axray, xdelta*red );
+% background := shadeb;
+% rigorousdisc( 0, true, (i*xdelta,-oray,0), axray, xdelta*red );
+ endfor;
+ theknob = rigorousfearpath( ((numouts+1)*xdelta,0,0), 2*axray );
+ fill theknob;
+ draw theknob;
+ background := background;
+ draw rp(p1)--rp(p2);
+ draw rp(p3)--rp(p4);
+ drawarrow rp(p5)--rp(p6);
+ drawarrow rp(p7)--rp(p8);
+ drawarrow outerarrow;
+ label.ulft( btex $d$ etex, rp(p7) );
+ label( btex $A$ etex, rp(p9) );
+ label( btex $A$ etex, rp(p0) );
+endfig;
+
+beginfig(3);
+ f := ( 3, 2, 1 );
+ numeric oray, iray;
+ path opath, ipath;
+ color lRpos, Rpos, Ppos, zpos, rpos, spos;
+ oray = 0.5;
+ iray = 0.2oray;
+ opath = rigorouscircle( black, blue, oray );
+ ipath = rigorouscircle( black, blue, 0.2oray );
+ fill opath withcolor 0.7background;
+ fill ipath withcolor background;
+ draw opath;
+ draw ipath;
+ lRpos = ( oray, 0, 0 );
+ Rpos = 0.5lRpos;
+ Ppos = ( 0, 0, 2oray );
+ zpos = 0.5Ppos;
+ rpos = ( 0, iray, 0 );
+ spos = -Rpos;
+ drawarrow rp(black)--rp(lRpos);
+ drawarrow rp(black)--rp(Ppos);
+ drawarrow rp(black)--rp(rpos);
+ dotlabel.lft( btex $P$ etex, rp(Ppos) );
+ label.rt( btex $z$ etex, rp(zpos) );
+ label.ulft( btex $R$ etex, rp(Rpos) );
+ label.lrt( btex $r$ etex, rp(rpos) );
+ label( btex $\sigma$ etex, rp(spos) );
+endfig;
+
+beginfig(4);
+ f := ( 3, 4, 2 );
+ numeric raya, rayb, rayc, lena, lenb;
+ color baseac, baseav, basebc, basebv, rayabbeg, rayabend, lambdapos;
+ raya = 0.017;
+ rayb = 0.1;
+ rayc = 0.2;
+ lena = 1.4;
+ lenb = 0.6;
+ baseac = 0.5*lena*red;
+ baseav = -lena*red;
+ basebc = 0.5*lenb*red;
+ basebv = -lenb*red;
+ rayabbeg = ( 0.5*lenb, raya, 0 );
+ rayabend = ( 0.5*lenb, rayc, 0 );
+ lambdapos = ( 0, rayc, 0 );
+ rigorousdisc( 0, true, basebc, rayc, basebv );
+ rigorousdisc( 0, true, baseac, raya, baseav );
+ rigorousdisc( 0, false, basebc, rayc, basebv );
+ drawarrow rp( rayabbeg )--rp( rayabend );
+ label.bot( btex $R$ etex, rp( 0.5[rayabbeg,rayabend] ) );
+ label( btex $\lambda_t$ etex, rp ( lambdapos ) );
+ label.lrt( btex $\lambda_f$ etex, rp( 0.3[baseac,basebc] ) );
+endfig;
+
+beginfig(5);
+ f := ( 5, 5, 3 );
+ numeric i, numpoints, ray, aux, blen, bang, fa, fb, fc, fd;
+ path wirea, wireb, wirec, wired, wirepath;
+ color wa[], wb[], btip, xpos;
+ pen bigpen, smallpen;
+ numpoints = 36;
+ ray = 0.5;
+ blen = 0.8;
+ fa = -1.1;
+ fb = -0.8;
+ fc = -fb;
+ fd = -fa;
+ bang = -45;
+ btip = blen*(0,cosd( bang ), sind( bang ) );
+ for i=1 upto numpoints:
+ aux := i*180/numpoints;
+ wa[i] = ray*(red*cosd(aux)+green*sind(aux));
+% drawarrow rp( wa[i] )--rp( wa[i]+btip );
+ wb[i] = ray*(-red*cosd(aux)-blue*sind(aux));
+% drawarrow rp( wb[i] )--rp( wb[i]+btip );
+ endfor;
+ wirepath = for i=1 upto numpoints:
+ rp( wa[i] )-- endfor for i=1 upto numpoints:
+ rp( wb[i] )-- endfor cycle;
+ bigpen = pencircle scaled 3pt;
+ smallpen = pencircle scaled 2.2pt;
+ draw wirepath withpen bigpen;
+ wirea = rp( wb[numpoints] ) for i=1 upto numpoints:
+ --rp( wa[i] ) endfor;
+ wireb = rp( wa[numpoints] ) for i=1 upto numpoints:
+ --rp( wb[i] ) endfor;
+ wirec = rp( wb[numpoints-1] )--wirea--rp( wb[1] );
+% wired = rp( wa[numpoints-1] )--wireb--rp( wa[1] );
+ draw wireb withpen smallpen withcolor background;
+% cartaxes( 2ray, 2ray, 1.2ray );
+ draw rp( 2*ray*red )--rp( -2*ray*red ) dashed evenly;
+ draw rp( black )--rp( -ray*blue );
+ draw rp( black )--rp( ray*green );
+ for i=-1 upto 1:
+ xpos := (i*ray,0,0);
+ drawarrow rp( xpos+fa*btip )--rp( xpos+fb*btip );
+ drawarrow rp( xpos+fb*btip )--rp( xpos+fc*btip );
+ draw rp( xpos+fc*btip )--rp( xpos+fd*btip );
+ endfor;
+ squareangline( -ray*blue, ray*green, black, 0.1*ray);
+ draw wirea withpen bigpen;
+ draw wirec withpen smallpen withcolor background;
+ label.urt( btex $\vec{B}$ etex, rp( btip ) );
+endfig;
+
+beginfig(6);
+ path baset, sphere;
+ color va, vb, vc, qpos;
+ va = (0,0,0);
+ vb = (0.5,0.5*sqrt(3),0);
+ vc = (-0.5,0.5*sqrt(3),0);
+ baset = rp( va )--rp( vb )--rp( vc )--cycle;
+ draw baset;
+ qpos = (0,0.333*sqrt(3),0.333*sqrt(1-0.333*sqrt(3)) );
+ sphere = rigorousfearpath( qpos, 0.1 );
+ fill sphere withcolor background;
+ draw sphere;
+ label( btex +$q$ etex, rp( qpos ) );
+endfig;
+
+beginfig(7);
+ Spread := 50;
+ f := (4,6,3.5);
+ path fiodecima, fioabaixo, malhacub, rama, ramb, ramc;
+ path malhatet, ramd, rame;
+ pen grossa, nuclear, negat;
+ color p[];
+ numeric altura, margem, largneg, largpos, afast, lengax, lscal;
+ pair topo, base, decima, abaixo, centerfont, centerneg, centerpos;
+ pair a, b, c, d, tx, ty, tz;
+ altura = 2cm;
+ margem = 3mm;
+ largneg = 9mm;
+ largpos = 18mm;
+ afast = 5cm;
+ lengax = 0.7;
+ lscal = 2;
+ grossa = pencircle scaled 2.7pt;
+ nuclear = pencircle scaled 2.1pt;
+ negat = pencircle scaled 1.8pt;
+ p1 = (1,1,-1);
+ p2 = (-1,1,-1);
+ p3 = (-1,-1,-1);
+ p4 = (1,-1,-1);
+ p5 = (1,1,1);
+ p6 = (-1,1,1);
+ p7 = (-1,-1,1);
+ p8 = (1,-1,1);
+ p0 = (0,0,1);
+ p9 = (0,0,-1);
+ z1 = rp(p1);
+ z2 = rp(p2);
+ z3 = rp(p3);
+ z4 = rp(p4);
+ z5 = rp(p5);
+ z6 = rp(p6);
+ z7 = rp(p7);
+ z8 = rp(p8);
+ z0 = rp(p0);
+ z9 = rp(p9);
+ tx = rp( p1 - (lengax,0,0) );
+ ty = rp( p1 - (0,lengax,0) );
+ tz = rp( p1 + (0,0,lengax) );
+ topo = (xpart z0, altura + ypart z0);
+ base = (xpart z9, -altura + ypart z9);
+ decima = (afast + xpart topo, ypart topo);
+ abaixo = (afast + xpart base, ypart base);
+ centerfont = 0.5*(decima+abaixo);
+ centerpos = (xpart centerfont, 0.5*margem + ypart centerfont);
+ centerneg = (xpart centerfont, -0.5*margem + ypart centerfont);
+ fiodecima = z0--topo--decima--centerpos;
+ fioabaixo = z9--base--abaixo--centerneg;
+ a = ( -0.5*largpos + xpart centerfont, ypart centerpos);
+ b = ( 0.5*largpos + xpart centerfont, ypart centerpos);
+ c = ( -0.5*largneg + xpart centerfont, ypart centerneg);
+ d = ( 0.5*largneg + xpart centerfont, ypart centerneg);
+ malhacub = z1--z2--z3--z4--z1--z5--z6--z7--z8--z5;
+ malhatet = z2--z7--z4--z5--cycle;
+ rama = z2--z6;
+ ramb = z3--z7;
+ ramc = z4--z8;
+ ramd = z5--z7;
+ rame = z2--z4;
+ drawoptions( dashed evenly );
+ draw malhacub;
+ draw rama;
+ draw ramb;
+ draw ramc;
+ drawoptions( withpen grossa );
+ draw malhatet;
+ draw ramd;
+ draw rame;
+% drawoptions( withpen nuclear withcolor background );
+% draw malhatet;
+% draw ramd;
+% draw rame;
+ drawoptions();
+ draw fiodecima;
+ draw fioabaixo;
+ draw a--b;
+ drawarrow z1--tx withpen negat;
+ drawarrow z1--ty withpen negat;
+ drawarrow z1--tz withpen negat;
+ label.lrt(btex $x$ etex scaled lscal, tx);
+ label.llft(btex $y$ etex scaled lscal, ty);
+ label.lft(btex $z$ etex scaled lscal, tz);
+ linecap := butt;
+ draw c--d withpen negat;
+endfig;
+
+beginfig(8);
+ Spread := 50;
+ f := (6,6,3.5);
+ numeric squareside, sray, cdiameter, cray, distmargin, linemargin, eloing;
+ squareside = 1;
+ cdiameter = squareside/0.88623;
+ cray = cdiameter/2.0;
+ sray = squareside/2.0;
+ distmargin = 0.5;
+ linemargin = 0.15;
+ eloing = 0.4;
+ pen pena, penb, penc;
+ pena = pencircle scaled 1.3mm;
+ penb = pencircle scaled 0.95mm;
+ penc = pencircle scaled 0.4mm;
+ color tracecol, outcol, incol;
+ tracecol = 0.5white;
+ outcol = black;
+ incol = 0.876white;
+ color va, vb, vc, vd, cen, bs, bc, fs, fc, ds, dc;
+ va = (0,-sray,-sray);
+ vb = (0,sray,-sray);
+ vc = (0,sray,sray);
+ vd = (0,-sray,sray);
+ cen = (-distmargin,0,0);
+ bs = (0,-sray-linemargin,0);
+ bc = bs+cen;
+ fs = (0,sray+eloing,0);
+ ds = (0,sray+eloing-linemargin,0);
+ fc = fs+cen;
+ dc = ds+cen;
+ path rigcirc, carrpath, square, circ, sline, cline, dline;
+ square = rp(va)--rp(vb)--rp(vc)--rp(vd)--cycle;
+ circ = goodcirclepath( cen, red, cray );
+ rigcirc = rigorouscircle( cen, red, cray+linemargin );
+ carrpath = subpath (1,2) of rigcirc;
+ sline = rp(bs)--rp(fs);
+ cline = rp(bc)--rp(fc);
+ dline = rp(ds)--rp(dc);
+
+ draw cline withpen penc withcolor tracecol;
+ draw circ withpen pena withcolor outcol;
+ draw circ withpen penb withcolor incol;
+ draw sline withpen penc withcolor tracecol;
+ draw square withpen pena withcolor outcol;
+ draw square withpen penb withcolor incol;
+ drawdblarrow dline withpen penc withcolor tracecol;
+
+ pair begsarr, endsarr;
+ begsarr = rp((0,-sray-linemargin,linemargin));
+ endsarr = rp((0,-sray-linemargin,sray));
+ drawarrow begsarr--endsarr withpen penc withcolor tracecol;
+ drawarrow carrpath withpen penc withcolor tracecol;
+
+ label.lft( btex $I$ etex, rp((0,-sray-linemargin,sray-linemargin)) );
+ label.top( btex $+$ etex, point 1.5 of rigcirc );
+ label.top( btex $d$ etex, rp(dc) );
+endfig;
+
+beginfig(9);
+ Spread := 50;
+ f := (6,6,3.5);
+ numeric squareside, sray, cdiameter, cray, distmargin, linemargin, eloing;
+ squareside = 1;
+ cdiameter = squareside/0.88623;
+ cray = cdiameter/2.0;
+ sray = squareside/2.0;
+ distmargin = 0.5;
+ linemargin = 0.15;
+ eloing = 0.4;
+ pen pena, penb, penc;
+ pena = pencircle scaled 1.3mm;
+ penb = pencircle scaled 0.95mm;
+ penc = pencircle scaled 0.4mm;
+ color tracecol, outcol, incol;
+ tracecol = 0.5white;
+ outcol = black;
+ incol = 0.876white;
+ color va, vb, vc, vd, cen, bs, bc, fs, fc, ds, dc, os, oc, ncc;
+ va = (0,-sray,-sray);
+ vb = (0,sray,-sray);
+ vc = (0,sray,sray);
+ vd = (0,-sray,sray);
+ cen = (-distmargin,0,0);
+ bs = (0,-sray-linemargin,0);
+ bc = bs+cen;
+ fs = (0,sray+eloing,0);
+ ds = (0,sray+eloing-linemargin,0);
+ fc = fs+cen;
+ dc = ds+cen;
+ os = (linemargin,sray,0);
+ oc = (-distmargin-cdiameter-linemargin,sray,0);
+ ncc = (-distmargin-cray,sray,0);
+ path rigcirc, carrpath, square, circ, sline, cline, dline, oline;
+ square = rp(va)--rp(vb)--rp(vc)--rp(vd)--cycle;
+ circ = goodcirclepath( ncc, green, cray );
+ rigcirc = rigorouscircle( ncc, green, cray+linemargin );
+ carrpath = subpath (3,4) of rigcirc;
+ sline = rp(bs)--rp(fs);
+ cline = rp(bc)--rp(fc);
+ dline = rp(ds)--rp(dc);
+ oline = rp(os)--rp(oc);
+
+ draw oline withpen penc withcolor tracecol;
+ draw cline withpen penc withcolor tracecol;
+ draw circ withpen pena withcolor outcol;
+ draw circ withpen penb withcolor incol;
+ draw sline withpen penc withcolor tracecol;
+ draw square withpen pena withcolor outcol;
+ draw square withpen penb withcolor incol;
+ drawdblarrow dline withpen penc withcolor tracecol;
+
+ pair begsarr, endsarr;
+ begsarr = rp((0,-sray-linemargin,linemargin));
+ endsarr = rp((0,-sray-linemargin,sray));
+ drawarrow begsarr--endsarr withpen penc withcolor tracecol;
+ drawarrow carrpath withpen penc withcolor tracecol;
+
+ label.lft( btex $I$ etex, rp((0,-sray-linemargin,sray-linemargin)) );
+ label.top( btex $+$ etex, point 3.5 of rigcirc );
+ label.bot( btex $d$ etex, rp(dc) );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/geombasic.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/geombasic.mp
new file mode 100644
index 00000000000..168f1cc9fc5
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/geombasic.mp
@@ -0,0 +1,82 @@
+% geombasic.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+% Kind of graph that physicists do a lot. Play with the angles
+% and h a little to see what happens. Change the point of view f.
+% Change the position of symbols using the last argument of angline.
+
+beginfig(1);
+
+ f := (3,5,2);
+
+ Spread := 155;
+
+ ShiftV := origin;
+
+ gamma := 30;
+ theta := 15;
+ phi := 40;
+ h := 1.2;
+
+ p := 0.75;
+ ppp := 0.8;
+
+ mythick := 0.9pt;
+
+ color c[], n[], H;
+ c0 := (0,0,0);
+ n0 := (cosd(gamma),0,sind(gamma));
+ n1 := (cosd(gamma+theta),0,sind(gamma+theta));
+ n2 := (cosd(gamma)*cosd(phi),cosd(gamma)*sind(phi),sind(gamma));
+ n3 := (cosd(gamma+theta)*cosd(phi),
+ cosd(gamma+theta)*sind(phi),sind(gamma+theta));
+ n4 := (cosd(phi),sind(phi),0);
+ H := h*(-sind(gamma),0,cosd(gamma));
+ c1 := (0,0,Z(p*n1));
+ c2 := (0,0,Z(p*n2));
+ c3 := (1,0,0);
+ c4 := (0,0,1);
+ c5 := (X(H),0,0);
+ pickup pencircle scaled 1.25pt;
+ drawarrow rp(c0)..rp(n0);
+ drawarrow rp(c0)..rp(n3);
+ drawarrow rp(c0)..rp(H);
+ label.urt(btex $\vec{n}_0$ etex,rp(n0));
+ label.urt(btex $\vec{n}$ etex,rp(n3));
+ label.lft(btex $\vec{H}$ etex,rp(H));
+ pickup pencircle scaled mythick;
+ cartaxes(1,1,1);
+% draw rp(c0)--rp(p*n1) dashed evenly scaled 2;
+% draw rp(c0)--rp(p*n2) dashed evenly scaled 2;
+ draw rp(c0)--rp(c5)--rp(H) dashed evenly scaled 1.5;
+% draw rp(c1)..rp(p*n1) dashed evenly scaled 2;
+ draw rp(c1)..rp(p*n3) dashed evenly scaled 1.5;
+% draw rp(c2)..rp(p*n0) dashed evenly scaled 2;
+% draw rp(c2)..rp(p*n2) dashed evenly scaled 2;
+ draw rp(c0)..rp(n4) dashed evenly scaled 1.5;
+ angline(c3,n0,c0,ppp,btex $\gamma$ etex,lft);
+% angline(n0,n1,c0,p,btex $\theta$ etex,rt);
+% angline(p*n0,p*n2,c2,X(p*n0),btex $\phi$ etex,lrt);
+% angline(p*n1,p*n3,c1,X(p*n1),btex $\phi$ etex,ulft);
+% angline(n2,n3,c0,p,btex $\theta $ etex,urt);
+ angline(c4,H,c0,ppp,btex $\gamma$ etex,top);
+ angline(n4,n3,c0,p,btex $\gamma+\theta$ etex,lft);
+ angline(n4,c3,c0,p,btex $\phi$ etex,llft);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/geomfiguei.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/geomfiguei.mp
new file mode 100644
index 00000000000..81abd780492
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/geomfiguei.mp
@@ -0,0 +1,71 @@
+% geomfiguei.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+
+ f := 3*(1.2,1.7,0.8);
+
+ Spread := 125;
+
+ color origr, nzero, nothr, ndxyl, vmagf, mfxzp, mfxyp, mfxxp;
+ numeric alphan, gamman, thetan, phiang, mfsize, axxc, ayyc, azzc;
+ numeric phiarmlen, alphafac;
+ axxc = 0.99;
+ ayyc = 0.87; % make this 1.28 when in twist-bend geometry
+ azzc = 0.82;
+ alphan = 170; % make this 90 to get the twist-bend geometry
+ gamman = 25;
+ thetan = 10;
+ phiang = 30;
+ mfsize = 1.25;
+ phiarmlen = 0.75;
+ alphafac = 1.4;
+ origr = (0,0,0);
+ nzero = (cosd(gamman),0,sind(gamman));
+ ndxyl = phiarmlen*(cosd(phiang),sind(phiang),0);
+ nothr = (cosd(phiang)*cosd(gamman+thetan),
+ sind(phiang)*cosd(gamman+thetan),sind(gamman+thetan));
+ vmagf = mfsize*(cosd(alphan)*sind(gamman),sind(alphan),
+ -cosd(alphan)*cosd(gamman));
+ mfxzp = (X(vmagf),0,Z(vmagf));
+ mfxyp = (X(vmagf),Y(vmagf),0);
+ mfxxp = (X(vmagf),0,0);
+ cartaxes( axxc, ayyc, azzc );
+ draw rp(origr)--rp(ndxyl) dashed evenly;
+ draw rp(origr)--rp(mfxzp)--rp(vmagf) dashed evenly;
+ draw rp(origr)--rp(mfxyp)--rp(vmagf) dashed evenly;
+ draw rp(origr)--rp(alphafac*mfxyp) dashed evenly;
+ draw rp(mfxzp)--rp(mfxxp)--rp(origr) dashed evenly;
+ draw rp(mfxyp)--rp(mfxxp) dashed evenly;
+ draw rp((0,0,Z(nothr)))--rp(nothr) dashed evenly;
+ angline(nzero,(1,0,0),origr,0.65,btex $\gamma$ etex,lft);
+ angline(ndxyl,(1,0,0),origr,0.5,btex $\phi$ etex,llft);
+ angline(ndxyl,nothr,origr,0.5,btex $\gamma+\theta$ etex,lft);
+ angline(vmagf,(0,0,1),origr,0.5,btex $\beta$ etex,top); % twist-bend
+ angline(mfxyp,(1,0,0),origr,0.8,btex $\alpha$ etex,bot);
+ pickup pencircle scaled 1.15pt;
+ drawarrow rp(origr)..rp(nzero);
+ drawarrow rp(origr)..rp(nothr);
+ drawarrow rp(origr)..rp(vmagf);
+ label.ulft(btex $\vec{n}_0$ etex,rp(nzero));
+ label.ulft(btex $\vec{n}$ etex,rp(nothr));
+ label.urt(btex $\vec{H}$ etex,rp(vmagf));
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/geommine.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/geommine.mp
new file mode 100644
index 00000000000..939fc35ed94
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/geommine.mp
@@ -0,0 +1,104 @@
+% geommine.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\usepackage{bbold}
+\begin{document}
+etex
+
+beginfig(1);
+
+ beta := 15;
+ alpha := 40;
+ psi := 26;
+ theta := 32;
+ phi := -33;
+ h := 1.35;
+ v := 0.4;
+ xlen := 1.2;
+ ylen := 0.65;
+ phirad := 0.67;
+
+ f := (3,5,3);
+ Spread := 100;
+
+ color c[], n[], H, h[], Vel, xloc, yloc, vx, vy;
+ c0 := (0,0,0);
+ cartaxes(xlen,ylen,1.0);
+ n0 := (cosd(beta),0,sind(beta));
+ n3 := (0,sind(phi),0);
+ n2 := n0 + n3;
+ n5 := n3 + cosd(phi)*n0;
+ n4 := cosd(theta)*n5;
+ Fx:=sind(alpha)*cosd(beta)-cosd(alpha)*cosd(psi)*sind(beta);
+ Fy:=cosd(alpha)*sind(psi);
+ Fz:=sind(alpha)*sind(beta)+cosd(alpha)*cosd(psi)*cosd(beta);
+ nx:=cosd(theta)*cosd(phi)*cosd(beta)-sind(theta)*sind(beta);
+ ny:=cosd(theta)*sind(phi);
+ nz:=cosd(theta)*cosd(phi)*sind(beta)+sind(theta)*cosd(beta);
+ n1 := (nx,ny,nz);
+ xloc := xlen*n1;
+ yloc := ylen*(-greenpart n1,redpart n1,0);
+ H := h*(Fx,Fy,Fz);
+ Vel := v*(Fx,Fy,Fz);
+ vx := v*sind(phi)*n1;
+ vy := v*cosd(phi)*N(yloc);
+ h4 := h*sind(phi)*n1;
+ h5 := h*cosd(phi)*N(yloc);
+ h2 := (-h*sind(beta)*cosd(alpha)*cosd(psi),
+ 0,
+ h*cosd(beta)*cosd(alpha)*cosd(psi));
+ h3 := (0,h*cosd(alpha)*sind(psi),0);
+ h1 := h2 + h3;
+ draw rp(n0)--rp(n2)--rp(n3)--rp(c0);
+ draw rp(c0)--rp(n4)--rp(n1);
+ draw rp(n5)--rp(n4);
+ draw rp(c0)--rp(h2)--rp(h1)--rp(h3)--cycle;
+ draw rp(c0)--rp(h1)--rp(H);
+% draw rp(h4)--rp(H)--rp(h5);
+ label.llft(btex $\vec{n}_0$ etex,rp(n0));
+ label.urt(btex $\vec{n}$ etex,rp(n1));
+ label.llft(btex $\vec{H}$ etex,rp(H));
+% label.urt(btex $\vec{v}$ etex,rp(Vel));
+% label.bot(btex $\mathbb{x}$ etex,rp(xloc));
+% label.bot(btex $\mathbb{y}$ etex,rp(yloc));
+% label.lrt(btex $\vec{v}_\mathbb{x}$ etex,rp(vx));
+% label.urt(btex $\vec{v}_\mathbb{y}$ etex,rp(vy));
+% label.lft(btex $\vec{H}_\mathbb{x}$ etex,rp(h4));
+% label.urt(btex $\vec{H}_\mathbb{y}$ etex,rp(h5));
+% pickup pencircle scaled 1pt;
+ angline(n0,n5,c0,phirad,btex $\phi$ etex,lft);
+% angline((0,1,0),yloc,c0,phirad,btex $\phi$ etex,rt);
+ angline(h2,h1,c0,0.5,btex $\psi$ etex,urt);
+ angline(H,h1,c0,0.9,btex $\alpha$ etex,top);
+ angline(n5,n1,c0,0.6,btex $\theta$ etex,ulft);
+ angline((0,0,1),h2,c0,0.5,btex $\beta$ etex,top);
+ angline((1,0,0),n0,c0,0.6,btex $\beta$ etex,rt);
+% drawarrow rp(c0)..rp(xloc);
+% drawarrow rp(c0)..rp(yloc);
+ pickup pencircle scaled 1.3pt;
+ drawarrow rp(c0)..rp(n0);
+ drawarrow rp(c0)..rp(n1);
+ drawarrow rp(c0)..rp(H);
+% drawarrow rp(c0)..rp(Vel);
+% drawarrow rp(c0)..rp(vx);
+% drawarrow rp(c0)..rp(vy);
+% drawarrow rp(c0)..rp(h4);
+% drawarrow rp(c0)..rp(h5);
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/globe.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/globe.mp
new file mode 100644
index 00000000000..22d0cf2bee1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/globe.mp
@@ -0,0 +1,32 @@
+% globe.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ color gammacnt;
+ numeric newradius, radius, aux, i, numc, foc, lc;
+ path conepath, latpath;
+ pen thickp;
+
+ f := (2,3,4);
+ viewcentr := 1.5*(1,1,1);
+ Spread := 200;
+ Shifts := 300;
+ radius = 1;
+ numc = 9;
+ thickp = pencircle scaled 1mm;
+
+ pickup thickp;
+ tropicalglobe( numc, black, radius, blue );
+ for i=1 upto numc: % longitudes
+ aux := (i-1)*180/numc;
+ gammacnt := (cosd(aux),sind(aux),0);
+ draw spatialhalfcircle(black,gammacnt,radius,true);
+ endfor;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/halfcirclesfear.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/halfcirclesfear.mp
new file mode 100644
index 00000000000..7074987e166
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/halfcirclesfear.mp
@@ -0,0 +1,43 @@
+% halfcirclesfear
+% L. Nobre G.
+% 2001
+
+%input featpost3Dplus2D;
+
+% input la3Dmacros;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ color centre, axpin, axpon, axpun;
+ numeric size, radii;
+ f := (4,1.5,3.5);
+ size = 0.5;
+ radii = 1;
+ centre = (0,0,0);
+ axpin = (0,0,1);
+ axpon = (0,1,0);
+ axpun = (1,0,0);
+ cartaxes( 1.2,1.2,0.8 );
+ pickup pencircle scaled 2;
+ draw rigorouscircle( centre, axpin, radii ) withcolor red;
+ draw goodcirclepath( centre, axpin, radii );
+ draw spatialhalfcircle( centre, axpon, size, true );
+ draw spatialhalfcircle( centre, axpon, size, false ) dashed evenly;
+ draw spatialhalfcircle( centre, axpun, size, true );
+ draw spatialhalfcircle( centre, axpun, size, false ) dashed evenly;
+ draw rigorousfearpath( centre, size );
+endfig;
+
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/hexagonaltrimesh.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/hexagonaltrimesh.mp
new file mode 100644
index 00000000000..316ca97482e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/hexagonaltrimesh.mp
@@ -0,0 +1,25 @@
+% hexagonaltrimesh.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+def zsurface( expr xc, yc ) =
+ cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4)
+enddef;
+
+f := 7*(4,1,5);
+Spread := 35;
+LightSource := 10*(4,-3,4);
+SubColor := 0.4background;
+
+beginfig(1);
+ numeric np, ssize;
+ path chair;
+ np = 40;
+ ssize = 15;
+
+ hexagonaltrimesh( true,np,ssize,zsurface);
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurface.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurface.mp
new file mode 100644
index 00000000000..b0d64e95612
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurface.mp
@@ -0,0 +1,153 @@
+% hiddensurface.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+% The big nice trick to draw 3D hidden line surfaces
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+numeric toplevel;
+toplevel = 2.2;
+
+def zsurface( expr xc, yc ) =
+ begingroup
+ numeric zout;
+ zout = yc**4 -xc*yc*(1-yc**2);
+ if zout > toplevel:
+ zout := toplevel;
+ fi;
+ ( zout )
+ endgroup
+enddef;
+
+def zline( expr yc ) =
+ begingroup
+ numeric zout;
+ zout = 4*yc*yc*yc/(1-3*yc*yc); %% I don't get it...
+ if zout > 3:
+ zout := 3;
+ fi;
+ ( zout )
+ endgroup
+enddef;
+
+f := (6,1,2);
+Spread := 67;
+
+beginfig(1);
+ numeric i, j, nx, ny, lowx, higx, lowy, higy, refz;
+ numeric posx, posy, posz, facz, lowl, higl, pensize;
+ color gridx[], pos, begcont, endcont, begconf, endconf;
+ path facex, descontjump;
+ pensize = 3pt;
+ nx = 20;
+ ny = 50;
+ lowy = -2.5;
+ higy = 1;
+ lowx = 1.5;
+ higx = 3;
+ refz = -2.5;
+ facz = 5;
+ for i=0 upto nx:
+ for j=0 upto ny:
+ posx := lowx + i*( higx - lowx )/nx;
+ posy := lowy + j*( higy - lowy )/ny;
+ posz := zsurface( posx, posy );
+ posx := bracket(lowx,posx,higx);
+ posy := bracket(lowy,posy,higy);
+ posz := posz/facz;
+ gridx[j] := ( posx, posy, posz );
+ endfor;
+ pos := ( posx, -1, refz/facz );
+ facex := rp( pos )--rp( gridx0 );
+ for j=1 upto ny:
+ facex := facex--rp( gridx[j] );
+ endfor;
+ facex:=facex--rp((posx,1,refz/facz))--cycle;
+ unfill facex;
+ draw facex;
+ endfor;
+ lowl = -2.0;
+% higl = -0.7;
+ higl = -1.0;
+ for j=0 upto ny:
+ posy := lowl + j*( higl - lowl )/ny;
+ posx := zline( posy );
+ posz := zsurface( posx, posy );
+ posx := bracket(lowx,posx,higx);
+ posy := bracket(lowy,posy,higy);
+ posz := posz/facz;
+ gridx[j] := ( posx, posy, posz );
+ endfor;
+ facex := rp( gridx0 );
+ for j=1 upto ny:
+ facex := facex--rp( gridx[j] );
+ endfor;
+ draw facex withcolor red; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ lowl := -1.4;
+ higl := -0.8;
+ for j=0 upto ny:
+ posy := lowl + j*( higl - lowl )/ny;
+ posx := -2*posy;
+ posz := zsurface( posx, posy );
+ posx := bracket(lowx,posx,higx);
+ posy := bracket(lowy,posy,higy);
+ posz := posz/facz;
+ gridx[j] := ( posx, posy, posz );
+ endfor;
+ facex := rp( gridx0 );
+ for j=1 upto ny:
+ facex := facex--rp( gridx[j] );
+ endfor;
+ draw facex withcolor green;
+ lowl := -1.0;
+ higl := 0.5;
+ for j=0 upto 1:
+ posy := lowl + j*( higl - lowl );
+ posx := 2;
+ posz := zsurface( posx, posy );
+ posx := bracket(lowx,posx,higx);
+ posy := bracket(lowy,posy,higy);
+ posz := posz/facz;
+ gridx[j] := ( posx, posy, posz );
+ endfor;
+% facex := rp( gridx0 );
+% for j=1 upto ny:
+% facex := facex--rp( gridx[j] );
+% endfor;
+% draw facex withcolor blue;
+ pickup pencircle scaled pensize;
+ draw rp(gridx0) withcolor red;
+ draw rp(gridx1) withcolor red;
+ posx := 2.83;
+ posy := -1.933;
+ posz := zsurface( posx, posy );
+ posx := bracket(lowx,posx,higx);
+ posy := bracket(lowy,posy,higy);
+ posz := posz/facz;
+ draw rp((posx,posy,posz)) withcolor blue;
+ posy := 0.517;
+ posy := bracket(lowy,posy,higy);
+ draw rp((posx,posy,posz)) withcolor blue;
+ begconf = (1.15,-1,refz/facz);
+ endconf = (1.15, 1,refz/facz);
+ begcont = ( 1,-1,1.15*toplevel/facz);
+ endcont = (-1,-1,1.15*toplevel/facz);
+ pickup pencircle scaled 0.5pensize;
+ drawarrow rp(begconf)--rp(endconf);
+ drawarrow rp(begcont)--rp(endcont);
+ label.ulft( btex $\Lambda$ etex, rp(0.5*(begcont+endcont)) );
+ label.bot( btex $\Upsilon$ etex, rp(0.5*(begconf+endconf)) );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurfaces.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurfaces.mp
new file mode 100644
index 00000000000..df698f038bf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurfaces.mp
@@ -0,0 +1,65 @@
+% hiddensurfaces.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+def zsurface( expr xc, yc ) =
+ begingroup
+ numeric zout;
+ zout = yc**4-xc*yc*(1-yc**2);
+ if zout > 1.5:
+ zout := 1.5;
+ fi;
+ ( zout )
+ endgroup
+enddef;
+
+f := (2.5,2,1.25);
+Spread := 127;
+
+beginfig(1);
+ numeric i, j, nx, ny, lowx, higx, lowy, higy, refz
+ posx, posy, posz, facz, counter;
+ color poi[][];
+ nx = 30;
+ ny = 30;
+ lowy = -2.5;
+ higy = 1;
+ lowx = 1.5;
+ higx = 3;
+ refz = 0;
+ facz = 5;
+ counter = 0;
+ for i=0 upto nx:
+ for j=0 upto ny:
+ posx := lowx + i*( higx - lowx )/nx;
+ posy := lowy + j*( higy - lowy )/ny;
+ posz := zsurface( posx, posy );
+ posx := bracket(lowx,posx,higx);
+ posy := bracket(lowy,posy,higy);
+ posz := posz/facz + refz;
+ poi[i][j] := ( posx, posy, posz );
+ endfor;
+ endfor;
+ for i=1 upto nx:
+ for j=1 upto ny:
+ counter := incr(counter);
+ npf[counter] := 3;
+ F[counter]p1 := poi[i-1][j-1];
+ F[counter]p2 := poi[i][j-1];
+ F[counter]p3 := poi[i][j];
+ counter := incr(counter);
+ npf[counter] := 3;
+ F[counter]p1 := poi[i-1][j-1];
+ F[counter]p2 := poi[i-1][j];
+ F[counter]p3 := poi[i][j];
+ endfor;
+ endfor;
+ NF := counter;
+ drawarrow rp((-1,-1,refz))--rp((1,-1,refz));
+ drawarrow rp((-1,-1,refz))--rp((-1,1,refz));
+ fill_faces( withcolor blue );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/inductionbob.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/inductionbob.mp
new file mode 100644
index 00000000000..19b47c44105
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/inductionbob.mp
@@ -0,0 +1,116 @@
+% inductionbob.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton,concmath,ccfonts}
+\begin{document}
+etex
+
+numeric altura;
+altura = 0.35;
+
+f := (4,6,1);
+Spread := 200;
+LightSource := f+blue;
+ShadowOn := false;
+
+def spirala( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cgre, cblu, param[];
+ par1 = 4.5;
+ par2 = 0.3;
+ par3 = 0.2*par1;
+ param1 = par1*360*TheVal;
+ cred = -par2*sind( param1 );
+ cgre = ( TheVal - 1.0 )*par3;
+ cblu = par2*cosd( param1 );
+ ( (cred,cgre,cblu+altura) )
+ endgroup
+enddef;
+
+def spiralb( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cgre, cblu, param[];
+ par1 = 4.0;
+ par2 = 0.3;
+ par3 = 0.2*par1;
+ param1 = par1*360*TheVal;
+ cred = par2*sind( param1 );
+ cgre = TheVal*par3;
+ cblu = -par2*cosd( param1 );
+ ( (cred,cgre,cblu+altura) )
+ endgroup
+enddef;
+
+def innerloop( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cgre, cblu, param[];
+ par1 = 8;
+ par2 = 0.2;
+ param1 = par1+(360-2*par1)*TheVal;
+ cred = par2*cosd( param1 );
+ cgre = 0;
+ cblu = par2*sind( param1 );
+ ( (cred,cgre,cblu+altura) )
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric xouterdev, xinnerdev, scalecir, scalelab;
+ color startp, begp, endp, finisp, ap, bp, cp, dp, ep, fp, gp;
+ pair startz, begz, endz, finisz, az, bz, cz, dz, ez, fz, gz;
+ path innerpath, outerpath, primarcir, secondcir;
+ pen mypen;
+ scalecir = 3cm;
+ scalelab = 4;
+ xouterdev = 1.4;
+ xinnerdev = 1.0;
+ mypen = pencircle scaled 4pt;
+ startp = spirala( 0 );
+ finisp = spiralb( 1 );
+ begp = innerloop( 0 );
+ endp = innerloop( 1 );
+ ap = ( xouterdev, Y(startp), Z(startp) );
+ bp = ( xouterdev, Y(startp), Z(finisp) );
+ dp = ( xouterdev, Y(finisp), Z(finisp) );
+ cp = 0.5[bp,dp];
+ ep = ( xinnerdev, Y(begp), Z(begp) );
+ fp = ( xinnerdev, Y(endp), Z(endp) );
+ gp = 0.5[ep,fp];
+ startz = rp( startp );
+ finisz = rp( finisp );
+ begz = rp( begp );
+ endz = rp( endp );
+ az = rp( ap );
+ bz = rp( bp );
+ cz = rp( cp );
+ dz = rp( dp );
+ ez = rp( ep );
+ fz = rp( fp );
+ gz = rp( gp );
+ emptyline( false, 1, black, 0.7background, 700, 0.8, 2, spirala );
+ outerpath = startz--az--bz--dz--finisz;
+ primarcir = fullcircle scaled scalecir shifted cz;
+ emptyline( false, 0.8, black, 0.4*(red+background), 150, 0.8, 2, innerloop );
+ innerpath = begz--ez--fz--endz;
+ secondcir = fullcircle scaled scalecir shifted gz;
+ draw innerpath withpen mypen;
+ unfill secondcir;
+ draw secondcir withpen mypen;
+ label( btex $V_S$ etex scaled scalelab, gz);
+ emptyline( true, 1, black, 0.7background, 700, 0.8, 2, spiralb );
+ draw outerpath withpen mypen;
+ unfill primarcir;
+ draw primarcir withpen mypen;
+ label( btex $V_P$ etex scaled scalelab, cz );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/joinedemptylines.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/joinedemptylines.mp
new file mode 100644
index 00000000000..a4a629d8afb
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/joinedemptylines.mp
@@ -0,0 +1,47 @@
+% joinedemptylines.mp
+% L. Nobre G.
+% 2001
+
+%input featpost3Dplus2D;
+
+numeric altura;
+altura = 1;
+
+f := (2,3,1.8+altura);
+Spread := 125;
+LightSource := 0.7*(4,-1,4);
+ShadowOn := true;
+
+def helixone( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cblu, param;
+ par1 = 3*360;
+ par2 = 0.3;
+ par3 = 0.8;
+ param = par1*TheVal;
+ cred = par2*cosd( param );
+ cblu = par2*sind( param );
+ ( (cred,cblu,par3*(-1+TheVal)+altura) )
+ endgroup
+enddef;
+
+def helixtwo( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cblu, param;
+ par1 = 3*360;
+ par2 = 0.1;
+ par3 = 0.8/3;
+ param = par1*TheVal;
+ cred = par2*cosd( param );
+ cblu = par2*sind( param );
+ ( (cred+0.2,cblu,par3*TheVal+altura) )
+ endgroup
+enddef;
+
+beginfig(1);
+ emptyline( false, 0.91, black, 0.5background, 360, 0.88, 2, helixone );
+ emptyline( true, 0.91, black, 0.5background, 120, 0.88, 2, helixtwo );
+ drawarrow rp((0.5,0,altura))--rp((0.32,0,altura));
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/kindofcube.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/kindofcube.mp
new file mode 100644
index 00000000000..c2e6a99f5a9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/kindofcube.mp
@@ -0,0 +1,81 @@
+% kindofcube.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton,concmath,ccfonts}
+\begin{document}
+etex
+
+Spread := 30;
+f := 5.4*(1.5,0.5,1);
+
+beginfig(1);
+ numeric gridstep, sidenumber, i, j, coord, aa, ab, ac;
+ color pa;
+ gridstep = 0.9;
+ sidenumber = 10;
+ coord = 0.5*sidenumber*gridstep;
+ for i=0 upto sidenumber:
+ for j=0 upto sidenumber:
+ pa := (-coord+j*gridstep,-coord+i*gridstep,0);
+ aa := uniformdeviate(360);
+ ab := uniformdeviate(180);
+ ac := uniformdeviate(90);
+ kindofcube( false, false, pa, aa, ab, ac, 0.4, 0.4, 0.9 );
+ endfor;
+ endfor;
+endfig;
+
+beginfig(2);
+ f := (4,1.0,0.5);
+ Spread := 120;
+ numeric lena, lenb, lenc, aa, ab, ac, angray, micr;
+ pair zeror;
+ color axa, axb, axc, returnedcorner, dummyc, auxx, auxy;
+ lena=0.3;
+ lenb=0.6;
+ lenc=0.9;
+ aa=130;
+ ab=20;
+ ac=70;
+ angray=0.7;
+ micr=0.01;
+ zeror=rp(black);
+ cartaxes(1,1,1);
+ axa = ( cosd(aa), sind(aa), 0 );
+ axb = axa*cosd(ab)+blue*sind(ab);
+ auxx= ( cosd(aa+90), sind(aa+90), 0);
+ auxy = ncrossprod( axb, auxx );
+ axc = auxx*cosd(ac)+auxy*sind(ac);
+ draw zeror--rp(axa);
+ draw zeror--rp(axb);
+ draw zeror--rp(-axa);
+ draw zeror--rp(axc);
+ draw zeror--rp(auxx);
+ label.rt( btex $a$ etex, rp(axa) );
+ label.rt( btex $b$ etex, rp(axb) );
+ label.lft( btex $c$ etex, rp(auxx) );
+ label.lft( btex $d$ etex, rp(axc) );
+ label.bot( btex $o$ etex, zeror );
+ angline( axa,red,black,angray,btex $\alpha_1$ etex,bot );
+ angline( axb,axa,black,angray,btex $\alpha_2$ etex,rt );
+ angline( axc,auxx,black,angray,btex $\alpha_3$ etex,lft );
+ squareangline( -axa,auxx,black,0.2);
+ kindofcube( true, true, black, aa, ab, ac, lena, lenb, lenc );
+ draw zeror--rp(blue) dashed evenly;
+ dotlabel.bot( btex $l_1$ etex, rp(lena*axb) );
+ dotlabel.rt( btex $l_2$ etex, rp(lenb*axc) );
+ dotlabel.top( btex $l_3$ etex, rp(lenc*ncrossprod(axb,axc) ) );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/labelconstruct.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/labelconstruct.mp
new file mode 100644
index 00000000000..45213320942
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/labelconstruct.mp
@@ -0,0 +1,30 @@
+% labelconstruct.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+f := 1.1*(2,1,0.5);
+ParallelProj := true;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton,concmath,ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ kindofcube(false,true,(0,-0.5,0),90,0,0,1.2,0.1,0.4);
+ kindofcube(false,true,(0,0,0),0,0,0,0.5,0.1,0.8);
+ labelinspace(false,(0.45,0.1,0.65),(-0.4,0,0),(0,0,0.1),
+ btex \framebox{\textsc{Label}} etex);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/labelinspace.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/labelinspace.mp
new file mode 100644
index 00000000000..da51f50633f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/labelinspace.mp
@@ -0,0 +1,33 @@
+% labelinspace.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+f := (2,3,0.5);
+ParallelProj := true;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton,concmath,ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ cartaxes( 1, 1.3, 1 );
+ labelinspace( false, black, 0.8*blue, 0.7*red,
+ btex \framebox{$\frac{\sqrt{5}-1}{2}$} etex);
+ labelinspace( false, 0.8*blue, -0.8*blue, 0.6*green,
+ btex \framebox{$\phi$} etex);
+ labelinspace( true, 0.7*red, 0.6*green, -0.7*red,
+ btex \framebox{$\frac{1+\sqrt{5}}{2}$} etex);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/magneticflux.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/magneticflux.mp
new file mode 100644
index 00000000000..c5f62220794
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/magneticflux.mp
@@ -0,0 +1,105 @@
+% magneticflux.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino,mathpazo}
+\begin{document}
+etex
+
+TDAtiplen := 0.1; % tdarrow
+TDAhalftipbase := 0.04; % Three-Dimensional
+TDAhalfthick := 0.02; % Arrow
+ForePen := pencircle scaled 10pt;
+BackPen := pencircle scaled 6pt;
+
+numeric ranga;
+ranga = 30+uniformdeviate(120);
+
+def ellip( expr TheVal ) =
+ ( (cosd(360*TheVal),sind(360*TheVal)/sind(ranga),0) )
+enddef;
+
+beginfig(2);
+ f := ( 4, 1, 2 );
+ Spread := 90;
+ pen blackpen, whitepen;
+ numeric majoraxe, i, j, gridstepn, gridstep, gridstart, halen, rang;
+ numeric ellfocus, totdist, marginl;
+ path espira, partes, covere;
+ color avec, midvec;
+ halen = 1;
+ marginl = 0.14;
+ rang = 45+30*floor(uniformdeviate(3.9));
+ show rang;
+ avec = (0,cosd(rang),sind(rang))*halen;
+ blackpen = pencircle scaled 5pt;
+ whitepen = pencircle scaled 3pt;
+ majoraxe = 1.2 + uniformdeviate(0.8);
+ ellfocus = majoraxe +-+ 1;
+ gridstepn= 15;
+ gridstep = 2*majoraxe/(gridstepn-1);
+ gridstart= 0.5*gridstepn*gridstep;
+ espira = ellipticpath( black, -red, -green*majoraxe );
+ draw espira withpen blackpen;
+ undraw espira withpen whitepen;
+ for j=-1 step gridstep until 1:
+ for i=-gridstart step gridstep until gridstart:
+ midvec := (j,i,0);
+ totdist := conorm(midvec-(0,-ellfocus,0))+conorm(midvec-(0,ellfocus,0));
+ if 2*majoraxe-marginl > totdist:
+ tdarrow( midvec, midvec+avec );
+% draw rp(midvec) withpen whitepen;
+ fi;
+ endfor;
+ endfor;
+ partes = subpath (10.3,25.6) of espira;
+ covere = subpath (10,26) of espira;
+ draw partes withpen blackpen;
+ undraw covere withpen whitepen;
+endfig;
+
+beginfig(1);
+ f := ( 4, 1.9, 1.22 );
+ Spread := 90;
+ numeric nodc, lsc;
+ nodc = 10;
+ lsc = 2.4;
+ closedline( true, 200, 0.5, 1.75 )( ellip );
+ numeric i, j, circlesize, polar, phi;
+ color currpos, ini, fin, avec;
+ string comm;
+ avec = (0,cosd(ranga),sind(ranga));
+ circlesize = 1.86/nodc;
+ for i=0.93 step -circlesize until 0.4*circlesize:
+ polar := floor(6.28318*i/circlesize);
+ for j=1 upto polar:
+ phi := 360*j/polar;
+ currpos := i*(cosd(phi),sind(phi)/sind(ranga),0);
+ comm:="tdarrow("
+ & cstr( currpos )
+ & ","
+ & cstr( currpos + avec )
+ & ");";
+ getready( comm, currpos );
+ endfor;
+ endfor;
+ doitnow;
+ pickup pencircle scaled 2pt;
+ drawarrow rp((0,1.07/sind(ranga),0))--rp((0,2.47,0));
+ drawarrow rp((1.07,0,0))--rp((1.67,0,0));
+ angline((0,2.37,0),(0,0.93/sind(ranga),0)+avec,(0,0.93/sind(ranga),0),
+ 0.3, btex $\alpha$ etex scaled lsc, urt);
+ label.bot( btex $x$ etex scaled lsc, rp((1.67,0,0)) );
+ label.bot( btex $y$ etex scaled lsc, rp((0,2.47,0)) );
+endfig;
+
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/nembiaxi.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/nembiaxi.mp
new file mode 100644
index 00000000000..99bfbc7b87b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/nembiaxi.mp
@@ -0,0 +1,64 @@
+% nembiaxi.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+
+
+beginfig(1);
+ f := 1.3*(4,5,3);
+ Spread := 70;
+
+ numeric hstep, hmax, hsdev, basestep, basemax, basesdev;
+ numeric i, j, k, angsdev, cylength, cyradius, basen, hn;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, hbase, aone;
+ numeric atwo, zcurr, counter;
+ color lenvec, currpos, xnoise, tmpcol;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Nb
+ cylength := 0.45;
+ cyradius := 0.1;
+ basen := 5;
+ hn := 3;
+ basestep := cylength*1.65;
+ hstep := cylength;
+ basesdev := basestep*0.1;
+ hsdev := hstep*0.1;
+ hbase := -0.8;
+ angsdev := 12;
+
+ basemax := basen*basestep;
+ hmax := hn*hstep;
+ counter := 0;
+ for i=1 upto basen:
+ for j=1 upto basen:
+ hcurr := hbase;
+ forever:
+ exitunless hcurr < hmax+hbase;
+ hcurr := hcurr + hstep;
+ zcurr := hcurr + hsdev*normaldeviate;
+ xcurr := i*basestep + basesdev*normaldeviate;
+ ycurr := j*basestep + basesdev*normaldeviate;
+ aone := uniformdeviate( 10 )-5;
+ atwo := angsdev*normaldeviate;
+ vcz := cosd( atwo );
+ vcy := sind( atwo )*sind( aone );
+ vcx := sind( atwo )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ xnoise := ( sind( angsdev*normaldeviate ), 0, 0 );
+ xnoise := green + xnoise;
+ tmpcol := ncrossprod( ( vcx, vcy, vcz ), xnoise );
+ lenvec := cylength*tmpcol;
+% rigorousdisc( 0, true, currpos-0.5*lenvec, cyradius, lenvec);
+ counter := incr( counter );
+ generateonebiax( counter, aone, atwo, cylength,
+ 90, 0.35*cylength, currpos );
+ endfor;
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( false, 7, true );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/nemsaddl.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/nemsaddl.mp
new file mode 100644
index 00000000000..ccc7d9852a1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/nemsaddl.mp
@@ -0,0 +1,86 @@
+% nemsaddl.mp and nemsplay.mp and nemtwist.mp and nembends.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+
+
+beginfig(1);
+ f := 2*(5,3,4);
+ Spread := 70;
+
+ numeric hstep, hmax, hsdev, basestep, basemax, basesdev;
+ numeric i, j, k, angsdev, cylength, cyradius, basen, hn;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, hbase, aone;
+ numeric atwo, zcurr, angstep;
+ color lenvec, currpos;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% splay, sddle and twist
+ angstep := 10;
+ cylength := 0.6;
+ cyradius := 0.1;
+ basen := 3;
+ hn := 1;
+ basestep := cyradius*4.2;
+ hstep := cylength*1.4;
+ basesdev := cyradius*0.003;
+ hsdev := hstep*0.005;
+ hbase := -0.8;
+ angsdev := 3;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bend
+% angstep := 15;
+% cylength := 0.6;
+% cyradius := 0.1;
+% basen := 3;
+% hn := 1;
+% basestep := cylength*1.6;
+% hstep := cyradius*3.4;
+% basesdev := basestep*0.01;
+% hsdev := hstep*0.005;
+% hbase := -0.8;
+% angsdev := 3;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ basemax := basen*basestep;
+ hmax := hn*hstep;
+ for i=-basen upto basen:
+ for j=-basen upto basen:
+ hcurr := hbase;
+ forever:
+ exitunless hcurr < hmax+hbase;
+ hcurr := hcurr + hstep;
+ zcurr := hcurr + hsdev*normaldeviate;
+ xcurr := i*basestep + basesdev*normaldeviate;
+ ycurr := j*basestep + basesdev*normaldeviate;
+ aone := angle((xcurr,ycurr))+angsdev*normaldeviate;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% atwo := ( i ++ j )*angstep + angsdev*normaldeviate;
+% vcz := cosd( atwo );
+% vcy := sind( atwo )*sind( aone ); % pure-splay
+% vcx := sind( atwo )*cosd( aone ); % pure-splay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% atwo := ( i ++ j )*angstep + angsdev*normaldeviate;
+% vcz := cosd( atwo );
+% vcy := sind( atwo )*sind( aone ); % saddle-splay
+% vcx := -sind( atwo )*cosd( aone ); % saddle-splay
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ atwo := ( i ++ j )*angstep + angsdev*normaldeviate;
+ vcz := cosd( atwo );
+ vcy := sind( atwo )*sind( aone+90 );% pure-twist
+ vcx := sind( atwo )*cosd( aone+90 );% pure-twist
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% atwo := j *angstep + angsdev*normaldeviate;
+% vcz := sind( atwo );
+% vcy := cosd( atwo ); % pure-bend
+% vcx := 0; % pure-bend
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+ rigorousdisc( 0, true, currpos-0.5*lenvec, cyradius, lenvec);
+ endfor;
+ endfor;
+ endfor;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/nsmetica.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/nsmetica.mp
new file mode 100644
index 00000000000..d13a33e1cc3
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/nsmetica.mp
@@ -0,0 +1,60 @@
+% nsmetica.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+
+
+beginfig(1);
+ f := 2*(5,3,2);
+ Spread := 70;
+ NF := 0;
+
+ numeric hstep, hmax, hsdev, basestep, basemax, basesdev;
+ numeric i, j, k, angsdev, cylength, cyradius, basen, hn;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, hbase, aone;
+ numeric atwo, zcurr, counter;
+ color lenvec, currpos;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Sma
+ cylength := 0.45;
+ cyradius := 0.1;
+ basen := 11;
+ hn := 3;
+ basestep := cyradius*2.4;
+ hstep := cylength*2.1;
+ basesdev := cyradius*0.3;
+ hsdev := hstep*0.04;
+ hbase := -0.8;
+ angsdev := 7;
+
+ basemax := basen*basestep;
+ hmax := hn*hstep;
+ hcurr := hbase;
+ counter := 0;
+ for k=1 upto hn:
+ hcurr := hcurr + hstep;
+ for i=1 upto basen:
+ for j=1 upto basen:
+ zcurr := hcurr + hsdev*normaldeviate;
+ xcurr := (i-1)*basestep + uniformdeviate( basestep );
+ ycurr := (j-1)*basestep + uniformdeviate( basestep );
+ aone := uniformdeviate( 360 );
+ atwo := angsdev*normaldeviate;
+ vcz := cosd( atwo );
+ vcy := sind( atwo )*sind( aone );
+ vcx := sind( atwo )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+ counter := incr( counter );
+ generatedirline( counter, aone, 90-atwo, cylength, currpos );
+% rigorousdisc( 0, true, currpos-0.5*lenvec, cyradius, lenvec);
+ endfor;
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( true, 5, false );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/parafuso.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/parafuso.mp
new file mode 100644
index 00000000000..74e8cda3e77
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/parafuso.mp
@@ -0,0 +1,100 @@
+% parafuso.mp
+% L. Nobre G.
+% 2005
+
+%input featpost3Dplus2D;
+
+def theline( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cgre, cblu, param;
+ par0 = 0;
+ par1 = 6*360;
+ par2 = 0.3;
+ par3 = 850;
+ param = par0+TheVal*(par1-par0);
+ cred = -par2*cosd( param );
+ cblu = par2*sind( param );
+ cgre = param/par3;
+ ( (cred,cgre,cblu) )
+ endgroup
+enddef;
+
+def loxodrome( expr TheVal ) =
+ begingroup
+ numeric cred, cgre, cblu, alpha, theta, ratio, radio;
+ ratio = 22;
+ radio = 2;
+ theta = ratio*180*TheVal;
+ alpha = 170*TheVal-85;
+ cred = radio*cosd(theta)*cosd(alpha);
+ cgre = radio*sind(theta)*cosd(alpha);
+ cblu = radio*sind(alpha);
+ ( (cred,cgre,cblu) )
+ endgroup
+enddef;
+
+f := (2,4,1.8);
+Spread := 77;
+ShadowOn := false;
+
+beginfig(1);
+ numeric axsize, zaxpos, zaxlen;
+ color xbeg, xend, ybeg, yend, zbeg, zend;
+ axsize = 0.85;
+ zaxpos = 0.55;
+ zaxlen = 2.1;
+ pickup pencircle scaled 1.5pt;
+ xbeg = (axsize,0,0);
+ xend = (-axsize,0,0);
+ ybeg = (0,0,-axsize);
+ yend = (0,0,axsize);
+ zbeg = (zaxpos,-zaxpos,0);
+ zend = (zaxpos,zaxlen,0);
+ drawarrow rp( xbeg )--rp( xend );
+ drawarrow rp( ybeg )--rp( yend );
+% defaultfont := "putr8r";
+ defaultscale := 1.95;
+ label.rt( "A", rp( xend ) );
+ label.lft( "B", rp( yend ) );
+ emptyline( false, 1, black, 0.5background, 1000, 0.82, 2, theline );
+ drawarrow rp( zbeg )--rp( zend );
+ label.bot( "C", rp( zend ) );
+endfig;
+
+beginfig(2);
+ numeric axsize, zaxpos, zaxlen;
+ color xbeg, xend, ybeg, yend, zbeg, zend;
+ axsize = 0.85;
+ zaxpos = 0.55;
+ zaxlen = 2.1;
+ pickup pencircle scaled 1.5pt;
+ xbeg = (axsize,0,0);
+ xend = (-axsize,0,0);
+ ybeg = (0,0,-axsize);
+ yend = (0,0,axsize);
+ zbeg = (zaxpos,-zaxpos,0);
+ zend = (zaxpos,zaxlen,0);
+ drawarrow rp( xbeg )--rp( xend );
+ drawarrow rp( ybeg )--rp( yend );
+% defaultfont := "putr8r";
+ defaultscale := 0.65;
+ label.rt( "X", rp( xend ) );
+ label.lft( "Y", rp( yend ) );
+ closedline( false, 70, 0.5, 0.95, theline );
+ drawarrow rp( zbeg )--rp( zend );
+ label.bot( "Z", rp( zend ) );
+ doitnow;
+endfig;
+
+f := (2,4,2.8);
+beginfig(3);
+ NCL := 0;
+ Nobjects := 0;
+ closedline( false, 270, 0.5, 0.85, loxodrome );
+ doitnow;
+endfig;
+
+end;
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/pathofstraightline.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/pathofstraightline.mp
new file mode 100644
index 00000000000..06711c223f3
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/pathofstraightline.mp
@@ -0,0 +1,29 @@
+% pathofstraightline.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+SphericalDistortion := true;
+Spread := 100;
+f := 0.4*(1.5,0.5,1);
+
+beginfig(1);
+ numeric gridstep, sidenumber, i, coord;
+ color pa, pb, pc, pd;
+ gridstep = 0.1;
+ sidenumber = 10;
+ coord = 0.5*sidenumber*gridstep;
+ for i=0 upto sidenumber:
+ pa := (-coord,-coord+i*gridstep,0);
+ pb := (coord,-coord+i*gridstep,0);
+ pc := (-coord+i*gridstep,-coord,0);
+ pd := (-coord+i*gridstep,coord,0);
+ draw pathofstraightline( pa, pb );
+ draw pathofstraightline( pc, pd );
+ endfor;
+endfig;
+
+end.
+
+ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/photoreverse.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/photoreverse.mp
new file mode 100644
index 00000000000..542fd1f3508
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/photoreverse.mp
@@ -0,0 +1,242 @@
+% photoreverse.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin@uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2003 Wolfgang Glunz <wglunz@pstoedit.net>
+
+% MetaPost source tuned by PstoeditMpostPreeditor (lex scanner)
+% and edited by L. Nobre G. <nobre@lince.cii.fc.ul.pt>
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+beginfig(1);
+ path PreeditedPath[];
+ linecap := butt;
+ linejoin := mitered;
+ PreeditedPath1 = hide(z1=(267.637,309.195))z1..controls hide(z2=(265.005,308.373))z2 and hide(z3=(262.069,307.351))z3..hide(z4=(261.056,306.906))z4
+ ..controls hide(z5=(260.051,306.463))z5 and hide(z6=(257.254,305.728))z6..hide(z7=(254.841,305.272))z7
+ ..controls hide(z8=(250.692,304.488))z8 and hide(z9=(204.457,292.788))z9..hide(z10=(182.447,286.951))z10
+ ..controls hide(z11=(176.816,285.458))z11 and hide(z12=(168.096,283.167))z12..hide(z13=(163.069,281.859))z13
+ ..controls hide(z14=(151.222,278.777))z14 and hide(z15=(141.515,276.205))z15..hide(z16=(134.184,274.205))z16
+ ..controls hide(z17=(130.967,273.328))z17 and hide(z18=(125.044,271.795))z18..hide(z19=(121.022,270.8))z19
+ ..controls hide(z20=(112.027,268.574))z20 and hide(z21=(85.2788,261.351))z21..hide(z22=(82.2654,260.334))z22
+ ..controls hide(z23=(81.0576,259.926))z23 and hide(z24=(74.8799,258.292))z24..hide(z25=(68.5181,256.697))z25
+ ..controls hide(z26=(53.8198,253.011))z26 and hide(z27=(54.844,253.994))z27..hide(z28=(56.676,245.334))z28
+ ..controls hide(z29=(57.3293,242.246))z29 and hide(z30=(56.3792,241.622))z30..hide(z31=(47.3118,239.178))z31
+ ..controls hide(z32=(35.9773,236.124))z32 and hide(z33=(35.1968,235.536))z33..hide(z34=(38.4636,232.521))z34
+ ..controls hide(z35=(40.325,230.802))z35 and hide(z36=(46.4053,219.375))z36..hide(z37=(48.1816,214.256))z37
+ ..controls hide(z38=(50.9392,206.31))z38 and hide(z39=(75.4822,148.371))z39..hide(z40=(81.2634,136.159))z40
+ ..controls hide(z41=(83.6174,131.186))z41 and hide(z42=(85.5562,126.827))z42..hide(z43=(85.5562,126.506))z43
+ ..controls hide(z44=(85.5562,124.811))z44 and hide(z45=(87.6768,124.222))z45..hide(z46=(90.6018,125.105))z46
+ ..controls hide(z47=(94.1848,126.187))z47 and hide(z48=(94.4399,127.076))z48..hide(z49=(91.2598,127.398))z49
+ ..controls hide(z50=(86.803,127.85))z50 and hide(z51=(81.7302,144.202))z51..hide(z52=(66.9248,205.847))z52
+ ..controls hide(z53=(57.2651,246.065))z53 and hide(z54=(57.3979,243.248))z54..hide(z55=(65.0811,244.906))z55
+ ..controls hide(z56=(67.3086,245.386))z56 and hide(z57=(71.2236,246.393))z57..hide(z58=(73.8562,247.162))z58
+ ..controls hide(z59=(76.4578,247.923))z59 and hide(z60=(81.7537,249.412))z60..hide(z61=(85.5562,250.453))z61
+ ..controls hide(z62=(89.3586,251.494))z62 and hide(z63=(93.6614,252.702))z63..hide(z64=(95.0623,253.122))z64
+ ..controls hide(z65=(96.4841,253.549))z65 and hide(z66=(99.0842,254.15))z66..hide(z67=(100.912,254.475))z67
+ ..controls hide(z68=(102.711,254.795))z68 and hide(z69=(106.689,255.777))z69..hide(z70=(109.687,256.642))z70
+ ..controls hide(z71=(115.705,258.378))z71 and hide(z72=(115.391,258.29))z72..hide(z73=(129.431,262.147))z73
+ ..controls hide(z74=(134.842,263.633))z74 and hide(z75=(139.964,265.139))z75..hide(z76=(140.765,265.48))z76
+ ..controls hide(z77=(141.57,265.822))z77 and hide(z78=(145.519,266.957))z78..hide(z79=(149.541,268.003))z79
+ ..controls hide(z80=(153.562,269.049))z80 and hide(z81=(158.005,270.236))z81..hide(z82=(159.412,270.641))z82
+ ..controls hide(z83=(164.668,272.153))z83 and hide(z84=(171.332,273.79))z84..hide(z85=(180.984,275.938))z85
+ ..controls hide(z86=(185.445,276.931))z86 and hide(z87=(190.982,278.282))z87..hide(z88=(193.416,278.972))z88
+ ..controls hide(z89=(195.835,279.657))z89 and hide(z90=(203.214,281.625))z90..hide(z91=(209.869,283.359))z91
+ ..controls hide(z92=(216.523,285.094))z92 and hide(z93=(224.23,287.209))z93..hide(z94=(227.053,288.076))z94
+ ..controls hide(z95=(229.905,288.952))z95 and hide(z96=(233.467,289.972))z96..hide(z97=(235.097,290.379))z97
+ ..controls hide(z98=(236.722,290.785))z98 and hide(z99=(239.484,291.549))z99..hide(z100=(241.312,292.098))z100
+ ..controls hide(z101=(243.136,292.645))z101 and hide(z102=(247.309,293.664))z102..hide(z103=(250.672,294.384))z103
+ ..controls hide(z104=(255.718,295.463))z104 and hide(z105=(258.712,296.887))z105..hide(z106=(255.937,296.887))z106
+ ..controls hide(z107=(255.547,296.887))z107 and hide(z108=(255.206,297.399))z108..hide(z109=(255.206,297.984))z109
+ ..controls hide(z110=(255.206,298.587))z110 and hide(z111=(255.864,299.081))z111..hide(z112=(256.669,299.081))z112
+ ..controls hide(z113=(257.546,299.081))z113 and hide(z114=(258.131,298.613))z114..hide(z115=(258.131,297.911))z115
+ ..controls hide(z116=(258.131,296.975))z116 and hide(z117=(258.643,296.837))z117..hide(z118=(260.69,297.219))z118
+ ..controls hide(z119=(265.886,298.191))z119 and hide(z120=(265.944,297.765))z120..hide(z121=(265.075,264.932))z121
+ ..controls hide(z122=(264.736,252.135))z122 and hide(z123=(264.811,245.7))z123..hide(z124=(265.297,245.7))z124
+ ..controls hide(z125=(266.883,245.7))z125 and hide(z126=(267.399,252.793))z126..hide(z127=(267.917,281.75))z127
+ ..controls hide(z128=(268.149,294.694))z128 and hide(z129=(268.149,294.694))z129..hide(z130=(265.364,299.227))z130
+ ..controls hide(z131=(262.174,304.419))z131 and hide(z132=(261.87,306.04))z132..hide(z133=(263.981,306.6))z133
+ ..controls hide(z134=(268.294,307.744))z134 and hide(z135=(275.854,303.103))z135..hide(z136=(280.281,296.595))z136
+ ..controls hide(z137=(283.962,291.184))z137 and hide(z138=(284.721,290.268))z138..hide(z139=(289.063,286.003))z139
+ ..controls hide(z140=(291.403,283.705))z140 and hide(z141=(292.5,282.033))z141..hide(z142=(292.5,280.763))z142
+ ..controls hide(z143=(292.5,279.62))z143 and hide(z144=(293.377,278.063))z144..hide(z145=(294.767,276.741))z145
+ ..controls hide(z146=(296.017,275.551))z146 and hide(z147=(298.525,272.208))z147..hide(z148=(300.361,269.283))z148
+ ..controls hide(z149=(302.197,266.358))z149 and hide(z150=(303.934,263.981))z150..hide(z151=(304.236,263.981))z151
+ ..controls hide(z152=(304.545,263.981))z152 and hide(z153=(305.201,262.957))z153..hide(z154=(305.736,261.641))z154
+ ..controls hide(z155=(306.263,260.343))z155 and hide(z156=(308.249,257.363))z156..hide(z157=(310.196,254.95))z157
+ ..controls hide(z158=(312.143,252.537))z158 and hide(z159=(313.706,250.225))z159..hide(z160=(313.706,249.758))z160
+ ..controls hide(z161=(313.706,249.294))z161 and hide(z162=(314.657,248))z162..hide(z163=(315.827,246.87))z163
+ ..controls hide(z164=(316.997,245.74))z164 and hide(z165=(318.128,243.888))z165..hide(z166=(318.35,242.738))z166
+ ..controls hide(z167=(318.613,241.372))z167 and hide(z168=(319.52,240.264))z168..hide(z169=(320.982,239.521))z169
+ ..controls hide(z170=(322.225,238.889))z170 and hide(z171=(323.698,237.449))z171..hide(z172=(324.309,236.267))z172
+ ..controls hide(z173=(324.914,235.097))z173 and hide(z174=(325.652,234.031))z174..hide(z175=(325.955,233.89))z175
+ ..controls hide(z176=(326.254,233.75))z176 and hide(z177=(327.334,231.989))z177..hide(z178=(328.331,230.015))z178
+ ..controls hide(z179=(329.365,227.967))z179 and hide(z180=(331.096,225.887))z180..hide(z181=(332.316,225.225))z181
+ ..controls hide(z182=(333.504,224.581))z182 and hide(z183=(335.098,222.921))z183..hide(z184=(335.863,221.532))z184
+ ..controls hide(z185=(336.635,220.13))z185 and hide(z186=(338.471,217.547))z186..hide(z187=(339.995,215.719))z187
+ ..controls hide(z188=(341.518,213.89))z188 and hide(z189=(343.403,211.128))z189..hide(z190=(344.236,209.503))z190
+ ..controls hide(z191=(345.069,207.878))z191 and hide(z192=(347.734,204.531))z192..hide(z193=(350.232,201.971))z193
+ ..controls hide(z194=(352.945,199.192))z194 and hide(z195=(354.903,196.494))z195..hide(z196=(355.168,195.17))z196
+ ..controls hide(z197=(355.411,193.957))z197 and hide(z198=(356.943,191.441))z198..hide(z199=(358.596,189.54))z199
+ ..controls hide(z200=(361.841,185.811))z200 and hide(z201=(364.128,182.683))z201..hide(z202=(365.551,180.034))z202
+ ..controls hide(z203=(366.846,177.621))z203 and hide(z204=(365.23,174.037))z204..hide(z205=(362.846,174.037))z205
+ ..controls hide(z206=(361.091,174.037))z206 and hide(z207=(358.527,172.096))z207..hide(z208=(359.273,171.332))z208
+ ..controls hide(z209=(359.507,171.093))z209 and hide(z210=(360.799,171.399))z210..hide(z211=(362.115,172.005))z211
+ ..controls hide(z212=(368.257,174.837))z212 and hide(z213=(375.377,173.789))z213..hide(z214=(371.109,170.681))z214
+ ..controls hide(z215=(370.133,169.97))z215 and hide(z216=(369.915,169.138))z216..hide(z217=(370.268,167.456))z217
+ ..controls hide(z218=(370.58,165.969))z218 and hide(z219=(370.316,164.385))z219..hide(z220=(369.501,162.849))z220
+ ..controls hide(z221=(368.801,161.533))z221 and hide(z222=(368.321,159.646))z222..hide(z223=(368.404,158.535))z223
+ ..controls hide(z224=(368.485,157.438))z224 and hide(z225=(368.095,156.301))z225..hide(z226=(367.526,155.976))z226
+ ..controls hide(z227=(366.853,155.591))z227 and hide(z228=(366.377,153.635))z228..hide(z229=(366.137,150.272))z229
+ ..controls hide(z230=(365.933,147.42))z230 and hide(z231=(365.431,143.858))z231..hide(z232=(365.003,142.228))z232
+ ..controls hide(z233=(364.584,140.633))z233 and hide(z234=(363.853,137.475))z234..hide(z235=(363.395,135.281))z235
+ ..controls hide(z236=(362.936,133.087))z236 and hide(z237=(362.088,130.162))z237..hide(z238=(361.53,128.846))z238
+ ..controls hide(z239=(360.967,127.519))z239 and hide(z240=(360.506,125.117))z240..hide(z241=(360.506,123.508))z241
+ ..controls hide(z242=(360.506,121.899))z242 and hide(z243=(360.111,119.859))z243..hide(z244=(359.629,118.974))z244
+ ..controls hide(z245=(359.15,118.097))z245 and hide(z246=(358.834,116.269))z246..hide(z247=(358.934,114.952))z247
+ ..controls hide(z248=(359.034,113.636))z248 and hide(z249=(358.602,111.825))z249..hide(z250=(357.983,110.967))z250
+ ..controls hide(z251=(357.35,110.088))z251 and hide(z252=(356.85,108.298))z252..hide(z253=(356.85,106.909))z253
+ ..controls hide(z254=(356.85,105.519))z254 and hide(z255=(356.382,103.567))z255..hide(z256=(355.79,102.485))z256
+ ..controls hide(z257=(355.209,101.424))z257 and hide(z258=(354.401,97.4023))z258..hide(z259=(354.005,93.5999))z259
+ ..controls hide(z260=(352.968,83.6548))z260 and hide(z261=(352.529,81.2454))z261..hide(z262=(351.429,79.4868))z262
+ ..controls hide(z263=(350.069,77.3098))z263 and hide(z264=(348.615,69.103))z264..hide(z265=(349.163,66.6899))z265
+ ..controls hide(z266=(349.581,64.8442))z266 and hide(z267=(349.391,64.6501))z267..hide(z268=(346.247,63.7119))z268
+ ..controls hide(z269=(341.811,62.3882))z269 and hide(z270=(340.625,63.3262))z270..hide(z271=(340.914,67.9331))z271
+ ..controls hide(z272=(341.263,73.5166))z272 and hide(z273=(339.121,72.5398))z273..hide(z274=(338.347,66.7629))z274
+ ..controls hide(z275=(337.642,61.498))z275 and hide(z276=(335.318,60.0554))z276..hide(z277=(334.459,64.3499))z277
+ ..controls hide(z278=(334.225,65.5198))z278 and hide(z279=(333.412,67.0278))z279..hide(z280=(332.646,67.7136))z280
+ ..controls hide(z281=(331.914,68.3679))z281 and hide(z282=(331.256,69.5457))z282..hide(z283=(331.256,70.2))z283
+ ..controls hide(z284=(331.256,70.8691))z284 and hide(z285=(330.353,72.7593))z285..hide(z286=(329.3,74.2949))z286
+ ..controls hide(z287=(325.789,79.4136))z287 and hide(z288=(320.082,90.9722))z288..hide(z289=(318.72,95.7205))z289
+ ..controls hide(z290=(317.42,100.254))z290 and hide(z291=(314.317,105.3))z291..hide(z292=(312.829,105.3))z292
+ ..controls hide(z293=(308.461,105.3))z293 and hide(z294=(294.694,129.504))z294..hide(z295=(294.694,137.182))z295
+ ..controls hide(z296=(294.694,141.643))z296 and hide(z297=(291.904,145.559))z297..hide(z298=(290.891,142.521))z298
+ ..controls hide(z299=(290.542,141.474))z299 and hide(z300=(287.381,143.252))z300..hide(z301=(287.381,144.495))z301
+ ..controls hide(z302=(287.381,144.918))z302 and hide(z303=(286.723,145.888))z303..hide(z304=(285.992,146.542))z304
+ ..controls hide(z305=(285.21,147.242))z305 and hide(z306=(284.219,148.809))z306..hide(z307=(283.725,150.125))z307
+ ..controls hide(z308=(283.246,151.402))z308 and hide(z309=(282.133,154.294))z309..hide(z310=(281.275,156.487))z310
+ ..controls hide(z311=(280.406,158.711))z311 and hide(z312=(278.15,162.52))z312..hide(z313=(276.229,165.006))z313
+ ..controls hide(z314=(274.309,167.493))z314 and hide(z315=(272.756,170.223))z315..hide(z316=(272.756,171.112))z316
+ ..controls hide(z317=(272.756,172))z317 and hide(z318=(271.953,173.672))z318..hide(z319=(270.965,174.842))z319
+ ..controls hide(z320=(269.404,176.689))z320 and hide(z321=(269.276,177.255))z321..hide(z322=(269.969,179.229))z322
+ ..controls hide(z323=(270.893,181.862))z323 and hide(z324=(269.866,185.685))z324..hide(z325=(267.573,188.15))z325
+ ..controls hide(z326=(266.139,189.692))z326 and hide(z327=(265.841,220.618))z327..hide(z328=(267.229,223.909))z328
+ ..controls hide(z329=(267.537,224.64))z329 and hide(z330=(267.426,225.664))z330..hide(z331=(266.979,226.212))z331
+ ..controls hide(z332=(266.536,226.755))z332 and hide(z333=(265.939,230.782))z333..hide(z334=(265.65,235.17))z334
+ ..controls hide(z335=(264.577,251.473))z335 and hide(z336=(263.579,226.029))z336..hide(z337=(264.07,194.878))z337
+ ..controls hide(z338=(264.101,192.884))z338 and hide(z339=(263.729,188.479))z339..hide(z340=(263.25,185.189))z340
+ ..controls hide(z341=(262.42,179.485))z341 and hide(z342=(262.452,179.086))z342..hide(z343=(263.835,177.876))z343
+ ..controls hide(z344=(264.65,177.164))z344 and hide(z345=(266.512,174.33))z345..hide(z346=(268.04,171.478))z346
+ ..controls hide(z347=(269.567,168.626))z347 and hide(z348=(271.381,165.501))z348..hide(z349=(272.135,164.421))z349
+ ..controls hide(z350=(272.9,163.324))z350 and hide(z351=(273.487,162.293))z351..hide(z352=(273.487,162.045))z352
+ ..controls hide(z353=(273.487,161.804))z353 and hide(z354=(275.511,158.242))z354..hide(z355=(277.976,154.147))z355
+ ..controls hide(z356=(282.728,146.25))z356 and hide(z357=(284.237,143.655))z357..hide(z358=(287.245,138.206))z358
+ ..controls hide(z359=(289.99,133.234))z359 and hide(z360=(299.06,117.685))z360..hide(z361=(301.023,114.587))z361
+ ..controls hide(z362=(301.95,113.124))z362 and hide(z363=(302.737,111.747))z363..hide(z364=(302.737,111.589))z364
+ ..controls hide(z365=(302.737,111.183))z365 and hide(z366=(314.213,91.2598))z366..hide(z367=(321.733,78.6091))z367
+ ..controls hide(z368=(325.081,72.9785))z368 and hide(z369=(329.837,64.9495))z369..hide(z370=(332.304,60.7668))z370
+ ..controls hide(z371=(338.083,50.968))z371 and hide(z372=(337.658,51.1626))z372..hide(z373=(346.101,54.4392))z373
+ ..controls hide(z374=(354.37,57.6489))z374 and hide(z375=(353.838,56.9644))z375..hide(z376=(355.457,66.4705))z376
+ ..controls hide(z377=(356.179,70.7117))z377 and hide(z378=(357.29,77.0364))z378..hide(z379=(357.91,80.4373))z379
+ ..controls hide(z380=(358.537,83.8743))z380 and hide(z381=(359.518,89.2683))z381..hide(z382=(360.104,92.5029))z382
+ ..controls hide(z383=(360.686,95.7136))z383 and hide(z384=(362.512,105.446))z384..hide(z385=(364.153,114.075))z385
+ ..controls hide(z386=(367.6,132.21))z386 and hide(z387=(370.829,149.516))z387..hide(z388=(373.021,161.606))z388
+ ..controls hide(z389=(373.857,166.213))z389 and hide(z390=(374.711,170.875))z390..hide(z391=(374.912,171.917))z391
+ ..controls hide(z392=(375.191,173.367))z392 and hide(z393=(374.51,174.842))z393..hide(z394=(372.046,178.132))z394
+ ..controls hide(z395=(364.981,187.565))z395 and hide(z396=(360.559,193.664))z396..hide(z397=(357.253,198.534))z397
+ ..controls hide(z398=(355.351,201.336))z398 and hide(z399=(351.495,206.797))z399..hide(z400=(348.733,210.6))z400
+ ..controls hide(z401=(345.967,214.408))z401 and hide(z402=(340.482,222.007))z402..hide(z403=(336.594,227.419))z403
+ ..controls hide(z404=(332.706,232.83))z404 and hide(z405=(327.32,240.264))z405..hide(z406=(324.675,243.872))z406
+ ..controls hide(z407=(321.994,247.528))z407 and hide(z408=(318.404,252.436))z408..hide(z409=(316.598,254.914))z409
+ ..controls hide(z410=(307.005,268.076))z410 and hide(z411=(302.032,274.894))z411..hide(z412=(295.05,284.456))z412
+ ..controls hide(z413=(290.779,290.306))z413 and hide(z414=(285.377,297.845))z414..hide(z415=(283.001,301.275))z415
+ ..controls hide(z416=(275.704,311.805))z416 and hide(z417=(275.811,311.75))z417..cycle;
+ PreeditedPath2 = hide(z418=(254.987,177.913))z418..controls hide(z419=(254.744,177.67))z419 and hide(z420=(253.305,177.229))z420..hide(z421=(251.769,176.926))z421
+ ..controls hide(z422=(250.239,176.624))z422 and hide(z423=(246.065,175.346))z423..hide(z424=(242.482,174.084))z424
+ ..controls hide(z425=(235.17,171.507))z425 and hide(z426=(231.263,171.562))z426..hide(z427=(228.296,174.285))z427
+ ..controls hide(z428=(226.59,175.85))z428 and hide(z429=(225.265,175.207))z429..hide(z430=(225.222,172.794))z430
+ ..controls hide(z431=(225.181,170.533))z431 and hide(z432=(221.496,168.977))z432..hide(z433=(216.377,169.058))z433
+ ..controls hide(z434=(212.647,169.117))z434 and hide(z435=(210.978,168.823))z435..hide(z436=(209.978,167.931))z436
+ ..controls hide(z437=(209.247,167.279))z437 and hide(z438=(208.138,166.725))z438..hide(z439=(207.565,166.725))z439
+ ..controls hide(z440=(206.982,166.725))z440 and hide(z441=(205.847,166.11))z441..hide(z442=(205.042,165.359))z442
+ ..controls hide(z443=(202.136,162.644))z443 and hide(z444=(198.973,161.521))z444..hide(z445=(194.147,161.49))z445
+ ..controls hide(z446=(190.929,161.469))z446 and hide(z447=(188.598,161.014))z447..hide(z448=(186.688,160.034))z448
+ ..controls hide(z449=(185.149,159.244))z449 and hide(z450=(181.789,157.939))z450..hide(z451=(179.156,157.109))z451
+ ..controls hide(z452=(176.524,156.279))z452 and hide(z453=(173.783,155.284))z453..hide(z454=(173.014,154.879))z454
+ ..controls hide(z455=(172.251,154.477))z455 and hide(z456=(169.942,153.653))z456..hide(z457=(167.895,153.051))z457
+ ..controls hide(z458=(165.847,152.448))z458 and hide(z459=(163.522,151.492))z459..hide(z460=(162.74,150.93))z460
+ ..controls hide(z461=(161.973,150.38))z461 and hide(z462=(160.18,149.906))z462..hide(z463=(158.864,149.906))z463
+ ..controls hide(z464=(157.548,149.906))z464 and hide(z465=(155.467,149.416))z465..hide(z466=(154.367,148.846))z466
+ ..controls hide(z467=(153.27,148.278))z467 and hide(z468=(152.149,147.955))z468..hide(z469=(151.954,148.151))z469
+ ..controls hide(z470=(151.753,148.351))z470 and hide(z471=(150.016,147.838))z471..hide(z472=(148.115,147.018))z472
+ ..controls hide(z473=(146.213,146.197))z473 and hide(z474=(143.748,145.515))z474..hide(z475=(142.667,145.51))z475
+ ..controls hide(z476=(128.554,145.452))z476 and hide(z477=(126.589,144.869))z477..hide(z478=(124.219,140.034))z478
+ ..controls hide(z479=(123.528,138.624))z479 and hide(z480=(122.192,137.646))z480..hide(z481=(119.925,136.89))z481
+ ..controls hide(z482=(118.097,136.281))z482 and hide(z483=(115.887,135.452))z483..hide(z484=(114.952,135.025))z484
+ ..controls hide(z485=(114.015,134.597))z485 and hide(z486=(112.283,134.322))z486..hide(z487=(111.04,134.404))z487
+ ..controls hide(z488=(109.836,134.483))z488 and hide(z489=(107.75,133.91))z489..hide(z490=(106.506,133.16))z490
+ ..controls hide(z491=(105.256,132.406))z491 and hide(z492=(103.033,131.403))z492..hide(z493=(101.644,130.967))z493
+ ..controls hide(z494=(100.254,130.53))z494 and hide(z495=(98.2485,129.46))z495..hide(z496=(97.2561,128.627))z496
+ ..controls hide(z497=(95.428,127.091))z497 and hide(z498=(95.428,127.091))z498..hide(z499=(98.426,127.436))z499
+ ..controls hide(z500=(101.129,127.747))z500 and hide(z501=(115.684,132.079))z501..hide(z502=(128.334,136.337))z502
+ ..controls hide(z503=(131.163,137.289))z503 and hide(z504=(139.669,139.925))z504..hide(z505=(147.347,142.228))z505
+ ..controls hide(z506=(155.025,144.531))z506 and hide(z507=(164.185,147.312))z507..hide(z508=(167.822,148.444))z508
+ ..controls hide(z509=(171.478,149.581))z509 and hide(z510=(176.841,151.206))z510..hide(z511=(179.887,152.1))z511
+ ..controls hide(z512=(182.911,152.987))z512 and hide(z513=(191.441,155.611))z513..hide(z514=(198.9,157.95))z514
+ ..controls hide(z515=(206.359,160.288))z515 and hide(z516=(215.873,163.225))z516..hide(z517=(220.106,164.495))z517
+ ..controls hide(z518=(224.347,165.767))z518 and hide(z519=(230.894,167.764))z519..hide(z520=(234.731,168.955))z520
+ ..controls hide(z521=(238.534,170.136))z521 and hide(z522=(244.657,171.975))z522..hide(z523=(248.259,173.019))z523
+ ..controls hide(z524=(255.864,175.222))z524 and hide(z525=(259.346,176.934))z525..hide(z526=(257.985,177.8))z526
+ ..controls hide(z527=(256.888,178.498))z527 and hide(z528=(255.62,178.546))z528..cycle;
+ dotlabels.rt(371,375,416,44,26);
+ draw PreeditedPath1 withcolor green;
+ draw PreeditedPath2 withcolor red;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FEATPOST specific %%
+ PhotoMarks := 5;
+ PhotoPair1 := z26; PhotoPoint1 := (7.0,-0.6,5.6);
+ PhotoPair2 := z44; PhotoPoint2 := (7.0,0,0);
+ PhotoPair3 := z371; PhotoPoint3:= (0,6.4,0);
+ PhotoPair4 := z375; PhotoPoint4:= (-0.6,6.4,0);
+ PhotoPair5 := z416; PhotoPoint5:= (-0.6,-0.6,5.6);
+ color pp[];
+ pp1 = (7.0,-0.6,7.0);
+ pp5 = (-0.6,-0.6,7.0);
+ pp2 = (8.4,0,0);
+ pp3 = (8.4,6.4,0);
+ path pt[];
+ f := (15,20,15); %%%%%%%%%%%%%%%%%%%%%%%
+ viewcentr := black; %%
+ Spread := 30; %% Parameters
+ ShiftV := (250,100); %%
+% SphericalDistortion := true; %%%%%%%%%%%%%%%%%%%%%%%
+
+ pt1 = rp(PhotoPoint1)--rp(pp1)--rp(pp5)--rp(PhotoPoint5);
+ pt2 = rp(PhotoPoint2)--rp(pp2)--rp(pp3)--rp(PhotoPoint3);
+ draw pt1 withpen pencircle scaled 3pt withcolor blue;
+ draw pt2 withpen pencircle scaled 3pt withcolor blue;
+
+ photoreverse(400,5.5,2.5); %% Changes parameters
+
+ pt3 = rp(PhotoPoint1)--rp(pp1)--rp(pp5)--rp(PhotoPoint5);
+ pt4 = rp(PhotoPoint2)--rp(pp2)--rp(pp3)--rp(PhotoPoint3);
+ draw pt3 withpen pencircle scaled 1pt;
+ draw pt4 withpen pencircle scaled 1pt;
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/polyhedr.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/polyhedr.mp
new file mode 100644
index 00000000000..b0509b75f05
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/polyhedr.mp
@@ -0,0 +1,191 @@
+% polyhedr.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{newcent}
+\pagestyle{empty}
+\begin{document}
+etex
+
+% This exemplifies hidden line removal.
+
+f := (2,5,3);
+
+beginfig(1);
+ Print_Step := 1;
+ faceraytrace( 0.4, red );
+ lineraytrace( 0.4, black );
+% pickup pencircle scaled 2pt;
+% draw_all_test( false );
+% pickup pencircle scaled 1pt;
+% sharpraytrace;
+endfig;
+
+f := 2*(2,5,3.5);
+Print_step := 10;
+Spread := 156;
+LightSource := 2.5*(4,-3,17);
+
+beginfig(2);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Definition of the 3D-figure
+ V1 := (1.4,0,0);
+ V2 := (1,1,0);
+ V3 := (0,1.4,0);
+ V4 := (-1,1,0);
+ V5 := (-1.4,0,0);
+ V6 := (-1,-1,0);
+ V7 := (0, -1.4,0);
+ V8 := (1,-1,0);
+ V9 := (1.4,0,1);
+ V10:= (1,1,1);
+ V11:= (0,1.4,1);
+ V12:= (-1,1,1);
+ V13:= (-1.4,0,1);
+ V14:= (-1,-1,1);
+ V15:= (0,-1.4,1);
+ V16:= (1,-1,1);
+
+ V17:= (1.4,0,-1);
+ V18:= (1,1,-1);
+ V19:= (0,1.4,-1);
+ V20:= (-1,1,-1);
+ V21:= (-1.4,0,-1);
+ V22:= (-1,-1,-1);
+ V23:= (0,-1.4,-1);
+ V24:= (1,-1,-1);
+
+ V25:= (0.7,0,0);
+ V26:= (0,0.7,0);
+ V27:= (0.7,-0.7,0.7);
+ V28:= (0.7,0,0.7);
+ V29:= (0,0.7,0.7);
+ V30:= (-0.7,0.7,0.7);
+ V31:= (0.35,0.35,1.05);
+ V32:= (0,-0.7,1.4);
+ V34:= (0,0,1.4);
+ V33:= (-0.7,0,1.4);
+ NL := 1;
+ npl1 := 9;
+ L1p1 := V17;
+ L1p2 := V18;
+ L1p3 := V19;
+ L1p4 := V20;
+ L1p5 := V21;
+ L1p6 := V22;
+ L1p7 := V23;
+ L1p8 := V24;
+ L1p9 := V17;
+ NF := 8;
+ npf1 := 4;
+ F1p1 := V1;
+ F1p2 := V2;
+ F1p3 := V10;
+ F1p4 := V9;
+ npf2 := 4;
+ F2p1 := V2;
+ F2p2 := V3;
+ F2p3 := V11;
+ F2p4 := V10;
+ npf3 := 4;
+ F3p1 := V3;
+ F3p2 := V4;
+ F3p3 := V12;
+ F3p4 := V11;
+ npf4 := 4;
+ F4p1 := V4;
+ F4p2 := V5;
+ F4p3 := V13;
+ F4p4 := V12;
+ npf5 := 4;
+ F5p1 := V5;
+ F5p2 := V6;
+ F5p3 := V14;
+ F5p4 := V13;
+ npf6 := 4;
+ F6p1 := V6;
+ F6p2 := V7;
+ F6p3 := V15;
+ F6p4 := V14;
+ npf7 := 4;
+ F7p1 := V7;
+ F7p2 := V8;
+ F7p3 := V16;
+ F7p4 := V15;
+ npf8 := 4;
+ F8p1 := V8;
+ F8p2 := V1;
+ F8p3 := V9;
+ F8p4 := V16;
+ makeface9(25,26,29,31,28);
+ makeface10(25,27,28);
+ makeface11(26,29,30);
+ makeface12(27,28,31,34,32);
+ makeface13(31,29,30,33,34);
+ makeface14(32,33,34);
+ makeface15(25,26,30,33,32,27);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% draw_all_test(true);
+ ShadowOn := true;
+ fill_faces();
+ draw_invisible( true, true, TableC3, TableC0 );
+% lineraytrace(0.3, black);
+% faceraytrace(0.4, green); % This my take very long.
+% sharpraytrace;
+
+endfig;
+
+f := 2*(-2,-0.5,2.5);
+Spread := 56;
+LightSource := 1.5*(-4,5,2.7);
+
+beginfig(3);
+ numeric i, aux;
+ pair anglepar;
+ V1 := ( 0.7, 0, 0 );
+ V2 := ( 0, 0.7, 0 );
+ V3 := ( 0.7,-0.7, 0.7 );
+ V4 := ( 0.7, 0, 0.7 );
+ V5 := ( 0, 0.7, 0.7 );
+ V6 := (-0.7, 0.7, 0.7 );
+ V7 := ( 0.35,0.35,1.05);
+ V8 := ( 0, -0.7, 1.4 );
+ V9 := ( 0, 0, 1.4 );
+ V10:= (-0.7, 0, 1.4 );
+ anglepar = getanglepair( (1,1,1) );
+ for i=11 upto 20:
+ V[i]:=eulerrotation( -45, 0, 0, V[i-10] );
+ V[i]:=eulerrotation( 0, 90-ypart anglepar, 0, V[i] );
+ endfor;
+ aux = Z( V11 );
+ for i=25 upto 34:
+ V[i]:=( X(V[i-14]),Y(V[i-14]),1.35*(Z(V[i-14])-aux));
+ endfor;
+ makeface1(25,26,29,31,28);
+ makeface2(25,27,28);
+ makeface3(26,29,30);
+ makeface4(32,33,34);
+ makeface5(25,26,30,34,32,27);
+ makeface6(27,28,31,33,32);
+ makeface7(31,29,30,34,33);
+ for i=1 upto 7:
+ FC[i] := 4;
+ FCD[i]:= true;
+ endfor;
+ ShadowOn := true;
+ setthearena( 10, 5 );
+ fill_faces();
+ draw_invisible( false, false, TableC4, TableC0 );
+% for i=25 upto 34:
+% label.top( decimal(i), rp(V[i]) );
+% endfor;
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/positivecharge.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/positivecharge.mp
new file mode 100644
index 00000000000..b0fccbc11a3
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/positivecharge.mp
@@ -0,0 +1,28 @@
+% positivecharge.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric size, num, i, j, coos[];
+ string comm, bray;
+ color fro, tip;;
+ size = 1.5;
+ num = 70;
+ bray = "0.05";
+ draw rp(black)--rp((size,0,0))--rp((size,size,0))--rp((0,size,0))--cycle;
+ for i=1 upto num:
+ for j=1 upto 6:
+ coos[j] := uniformdeviate(size);
+ endfor;
+ fro := (coos1,coos2,coos3);
+ tip := (coos4,coos5,coos6);
+ comm := "positivecharge(true," & cstr(fro) & "," & bray & ");";
+ getready( comm, fro );
+ comm := "positivecharge(false," & cstr(tip) & "," & bray & ");";
+ getready( comm, tip );
+ endfor;
+ doitnow;
+endfig;
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/resistcircuit.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/resistcircuit.mp
new file mode 100644
index 00000000000..e0e679c97e1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/resistcircuit.mp
@@ -0,0 +1,64 @@
+% resistcircuit.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ boolean kind[];
+ numeric largmolas, lengmolas, numolas, numturns, u, i, fraction, stepx;
+ numeric totalx, totaly, actuax, actuay, numparal, numserie, stepy;
+ path refpath;
+ pair refpoint, startpoint, ini, fin;
+ pickup pencircle scaled 2pt;
+ fraction = 0.6;
+ numolas = 9;
+ u = 2mm;
+ largmolas = 2u;
+ lengmolas = 12u;
+ numturns = 10;
+ actuax = 1;
+ actuay = 1;
+ numparal = 0;
+ numserie = 1;
+ stepy = largmolas/fraction;
+ stepx = 0.5*(1-fraction)*lengmolas;
+ draw (left*stepx)--origin;
+ for i=2 upto numolas:
+ if uniformdeviate(2) > 1:
+ kind[i] = false;
+ numserie := incr( numserie );
+ else:
+ kind[i] = true;
+ numparal := incr( numparal );
+ fi;
+ endfor;
+ totalx = numserie*lengmolas;
+ totaly = numparal*stepy;
+ draw (right*totalx)--(right*(totalx+stepx));
+ startpoint = (up*0.5*totaly);
+ refpoint = startpoint;
+ draw (down*0.5*totaly)--refpoint;
+ refpath = springpath(origin,right*lengmolas,numturns,largmolas,fraction);
+ draw refpath shifted refpoint;
+ refpoint := refpoint + right*lengmolas;
+ for i=2 upto numolas:
+ if kind[i]:
+ ini := startpoint+down*stepy*actuay;
+ fin := ini + 0.5*(actuax-1)*lengmolas*right;
+ draw ini--fin;
+ draw refpath shifted fin;
+ ini := fin + lengmolas*right;
+ fin := ini + 0.5*(actuax-1)*lengmolas*right;
+ draw ini--fin--refpoint;
+ refpoint := refpoint + down*stepy*0.5;
+ actuay := incr( actuay );
+ else:
+ draw refpath shifted refpoint;
+ refpoint := refpoint + right*lengmolas;
+ actuax := incr( actuax );
+ fi;
+ endfor;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscircle.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscircle.mp
new file mode 100644
index 00000000000..a63ecb92e95
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscircle.mp
@@ -0,0 +1,49 @@
+% rigorouscircle.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+f := (2,0.2,0.1);
+
+
+beginfig(1);
+ numeric ind, cray, sray, cnum, ang, aux, auxs;
+ color sidevec, rayvec, angulmomv, vecaux;
+ path paux;
+ pen pendot;
+ pendot = pencircle scaled 2pt;
+ sray = 1;
+ cnum = 8;
+ ang = 45;
+ auxs = 0.15;
+ ray = 3*cosd(ang)*sray/cnum;
+ sidevec = ( sray*sind(ang), 0, 0 );
+ for ind=1 upto cnum:
+ aux := ind*360/cnum;
+% draw rigorouscircle( black, (0,sind(aux),cosd(aux)), sray ) dashed evenly;
+ rayvec := sray*cosd(ang)*(0,cosd(aux),sind(aux));
+
+ vecaux := rayvec+sidevec;
+ drawarrow rp(black)--rp(vecaux+auxs*N(vecaux));
+ paux := rigorouscircle( vecaux, vecaux, ray );
+ draw paux;
+ drawoptions( withpen pendot );
+ drawarrow (subpath (0,1) of paux);
+ draw rp(vecaux);
+ drawoptions();
+
+ vecaux := rayvec-sidevec;
+ drawarrow rp(black)--rp(vecaux+auxs*N(vecaux));
+ paux := rigorouscircle( vecaux, vecaux, ray );
+ draw paux;
+ drawoptions( withpen pendot );
+ drawarrow (subpath (0,1) of paux);
+ draw rp(vecaux);
+ drawoptions();
+ endfor;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscone.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscone.mp
new file mode 100644
index 00000000000..3c79b95315b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscone.mp
@@ -0,0 +1,36 @@
+% rigorouscone.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ color nalfa, gammacnt, vertex;
+ path gamma, cone;
+ numeric altura, grids, radius, aux, i, numc, slope;
+
+ f := (5,4,2);
+ Spread := 60;
+ ShiftV := (200,200);
+ altura = 1;
+ radius = 0.3;
+ grids = 1;
+ numc = 9;
+ slope = 3;
+ nalfa = (0,0,1);
+
+ for i=1 upto numc:
+ aux := (i-0.5*(numc+1))*grids;
+ gammacnt := (0,aux,0);
+ vertex := (aux/slope,aux,altura);
+ gamma := rigorouscircle( gammacnt, nalfa, radius );
+ cone := rigorouscone(true, gammacnt, nalfa, radius, vertex );
+ unfill cone;
+ draw gamma dashed evenly;
+ draw cone;
+ endfor;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscSD.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscSD.mp
new file mode 100644
index 00000000000..e9bfa7c2730
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscSD.mp
@@ -0,0 +1,49 @@
+% rigorousdiscSD.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+f := 0.8*(6,3,4);
+
+SphericalDistortion := true;
+%%%%%Spread := 6;
+
+%SphericalDistortion := false;
+%%%%%%Spread := 20;
+
+beginfig(1);
+ color nalfa, gammacnt, vertex;
+ numeric altura, grids, radius, aux, auy, i, j, numc;
+
+ altura = 1;
+ radius = 0.5;
+ grids = 1.4;
+ numc = 7;
+
+ for i=1 upto numc:
+ aux := (i-0.5*(numc+1))*grids;
+ for j=1 upto numc:
+ auy := (j-0.5*(numc+1))*grids;
+ if normaldeviate > 0:
+ gammacnt := (aux,auy,0);
+ vertex := (aux,auy,altura);
+ else:
+ if normaldeviate > 0:
+ gammacnt := (aux-altura/2,auy,radius);
+ vertex := (aux+altura/2,auy,radius);
+ else:
+ gammacnt := (aux,auy-altura/2,radius);
+ vertex := (aux,auy+altura/2,radius);
+ fi;
+ fi;
+ nalfa := vertex - gammacnt;
+ rigorousdisc( 0, true, gammacnt, radius, nalfa );
+ endfor;
+ endfor;
+ produce_auto_scale;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscoptions.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscoptions.mp
new file mode 100644
index 00000000000..59200177b7d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscoptions.mp
@@ -0,0 +1,31 @@
+% rigorousdiscoptions.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+f := 0.8*(6,3,4);
+
+beginfig(1);
+ color axe, cstep, colen;
+ numeric nstep, sfrac, ouray, inray;
+
+ nstep = 0.65;
+ sfrac = 0.1;
+ ouray = 0.7;
+ inray = 0.5;
+
+ axe = red;
+ cstep = ( nstep, 0, 0 );
+ colen = ( nstep*sfrac, 0, 0 );
+
+ pickup pencircle scaled 2pt;
+ rigorousdisc( 0, true, -cstep, ouray, colen );
+ rigorousdisc( 0, false, black, ouray, colen );
+ rigorousdisc( inray, true, cstep, ouray, colen );
+ rigorousdisc( inray, false, 2*cstep, ouray, colen );
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousfearpath.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousfearpath.mp
new file mode 100644
index 00000000000..c56ab28f61a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousfearpath.mp
@@ -0,0 +1,66 @@
+% rigorousfearpath.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric sfr, radfac, ind;
+ color xv, yv, zv, Ve[];
+ path p[];
+ f := 2*(5,2,3);
+ Spread := 50;
+ csr := 0.47;
+ clr := 0.57;
+ xv := (csr,0,0);
+ yv := (0,csr,0);
+ zv := (0,0,csr);
+ Ve1 := (-1,-1,-1);
+ Ve2 := (-1,1,-1);
+ Ve3 := (1,-1,-1);
+ Ve4 := (1,1,-1);
+ Ve5 := (-1,-1,1);
+ Ve6 := (-1,1,1);
+ Ve7 := (1,-1,1);
+ Ve8 := (1,1,1);
+ Ve9 := (0,0,0);
+ for ind=1 upto 8:
+ p[ind] := rigorousfearpath( Ve[ind], csr );
+ endfor;
+ p9 := rigorousfearpath( Ve9, clr );
+ unfill p1;
+ draw p1;
+ draw rp(Ve1+yv)--rp(Ve2-yv);
+ draw rp(Ve1+xv)--rp(Ve3-xv);
+ unfill p2;
+ draw p2;
+ unfill p3;
+ draw p3;
+ draw rp(Ve4-yv)--rp(Ve3+yv);
+ draw rp(Ve4-xv)--rp(Ve2+xv);
+ unfill p4;
+ draw p4;
+ draw rp(Ve1+zv)--rp(Ve5-zv);
+ draw rp(Ve2+zv)--rp(Ve6-zv);
+ unfill p9;
+ draw p9;
+ draw rp(Ve3+zv)--rp(Ve7-zv);
+ draw rp(Ve4+zv)--rp(Ve8-zv);
+ unfill p5;
+ draw p5;
+ draw rp(Ve5+yv)--rp(Ve6-yv);
+ draw rp(Ve5+xv)--rp(Ve7-xv);
+ unfill p6;
+ draw p6;
+ unfill p7;
+ draw p7;
+ draw rp(Ve8-yv)--rp(Ve7+yv);
+ draw rp(Ve8-xv)--rp(Ve6+xv);
+ unfill p8;
+ draw p8;
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rotatnlc.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/rotatnlc.mp
new file mode 100644
index 00000000000..3adafc002cc
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/rotatnlc.mp
@@ -0,0 +1,49 @@
+% rotatnlc.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+
+ f := 2*(2,1,0.55);
+
+ Spread := 450;
+
+ color gridvec, sizevec, currpos, starpos, bordpos;
+ numeric i, j, k, counter, theta, phi, thetamin;
+ numeric thetamax, thetastp, long, radius, polar;
+ sizevec := (7,42,1); % (number of circles,
+ % number of vectors in outer circle,
+ % number of levels )
+ gridvec := (0.08,0.23,0.3);
+ thetamin := 90;
+ thetamax := 150;
+ long := 0.08;
+ thetastp := (thetamax-thetamin)/(X(sizevec)-1);
+ starpos := ( -X(gridvec)*X(sizevec) ,
+ -X(gridvec)*X(sizevec) ,
+ 0 );
+ bordpos := starpos;
+ counter := 1;
+ for i=1 upto X(sizevec):
+ radius := (i-1)*X(gridvec);
+ polar := i*floor(Y(sizevec)/X(sizevec));
+ for j=1 upto polar:
+ for k=1 upto Z(sizevec):
+ phi := 360*(j-1)/polar;
+ theta := thetamin+(i-1)*thetastp;
+ currpos := radius*(cosd(phi-90),sind(phi-90),0)
+ +(k-1)*(0,0,Z(gridvec));
+ generatedirline( counter, phi, theta, long, currpos );
+ counter := incr(counter);
+ endfor;
+ endfor;
+ endfor;
+ NL := decr(counter);
+ director_invisible( true, Y(gridvec), false );
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/saturn.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/saturn.mp
new file mode 100644
index 00000000000..44be273cc73
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/saturn.mp
@@ -0,0 +1,111 @@
+% saturn.mp
+% L. Nobre G.
+% 2005
+
+verbatimtex
+\documentclass{article}
+\usepackage{newcent}
+\pagestyle{empty}
+\begin{document}
+etex
+
+f := 2.5*(5,0,-1);
+Spread := 100;
+
+beginfig(1);
+ path planet, twilight, darkness, ringins, ringout, shadein, shadout;
+ path fullplanet, fullring, backdark, sunplanet, backring;
+ path nearringout, nearringins, hdtv, darkplanet;
+ numeric planetray, ringinsray, ringoutray, cutmargin, athmosray;
+ color sunposition, axedirection, labelpos, darknesstart, darknessend;
+ numeric inclinangle, labelray, begintime, endtime, colorfactor;
+ color planetcolor, ringcolor, toptextcolor, deepskycolor, bottextcolor;
+ picture storepicture;
+ planetray = 1;
+ ringinsray = 1.6;
+ ringoutray = 2.3;
+ labelray = 2.1;
+ cutmargin = 0.01;
+ inclinangle = 15;
+ sunposition = (-7,15,4);
+ colorfactor = 1.3;
+ bboxmargin := 6mm;
+ planetcolor = colorfactor*(255,152,55)/255;
+ ringcolor = colorfactor*(221,57,199)/255;
+ toptextcolor = colorfactor*(187,164,109)/255;
+ deepskycolor = colorfactor*(11,18,84)/255;
+ bottextcolor = colorfactor*(15,103,23)/255;
+ viewcentr := (0,0.5[planetray,ringinsray],0);
+ labelpos = (0,labelray,0);
+ athmosray = planetray+cutmargin;
+ axedirection = (0,-sind(inclinangle),cosd(inclinangle));
+ planet = rigorousfearpath( black, planetray );
+ twilight = spatialhalfcircle( black, sunposition, athmosray, true );
+ darknesstart = athmosray*ncrossprod( sunposition, axedirection );
+ darknessend = darknesstart - labelray*N( sunposition );
+ darkness = pathofstraightline( darknesstart, darknessend );
+ darknesstart := -darknesstart;
+ darknessend := darknesstart - labelray*N( sunposition );
+ backdark = pathofstraightline( darknesstart, darknessend );
+ ringins = goodcirclepath( black, axedirection, ringinsray );
+ ringout = goodcirclepath( black, axedirection, ringoutray );
+ endtime = xpart ( planet intersectiontimes twilight );
+ begintime = xpart ( reverse planet intersectiontimes twilight );
+ sunplanet = subpath (-begintime-cutmargin,endtime+cutmargin) of planet;
+ darkplanet = planet cutbefore twilight cutafter twilight;
+ fullplanet = buildcycle( sunplanet, reverse twilight );
+ fill fullplanet withcolor planetcolor;
+ endtime := xpart ( ringins intersectiontimes darkness );
+ begintime := xpart ( reverse ringins intersectiontimes sunplanet );
+ nearringins = subpath (-begintime-cutmargin,endtime+cutmargin) of ringins;
+ endtime := xpart ( ringout intersectiontimes darkness );
+ begintime := xpart ( reverse ringout intersectiontimes sunplanet );
+ nearringout = subpath (-begintime-cutmargin,endtime+cutmargin) of ringout;
+ backring = buildcycle( backdark, ringout, reverse darkplanet, reverse ringins );
+ fullring = buildcycle( nearringout, reverse darkness, reverse nearringins, sunplanet );
+ fill backring withcolor ringcolor;
+ fill fullring withcolor ringcolor;
+ picture thestatement;
+ thestatement = thelabel(
+ btex
+ \begin{tabular}{c}
+ \textbf{\textsf{{\Large T}$\!$ecnumbria}} \\
+ \textsf{\scriptsize a sombra da tecnologia}
+ \end{tabular}
+ etex,
+ origin);
+ pickup pencircle scaled 1pt;
+ draw thestatement scaled 2 shifted rp(labelpos) withcolor toptextcolor;
+ storepicture = currentpicture;
+ z1 = lrcorner currentpicture;
+ z2 = urcorner currentpicture;
+ z3 = ulcorner currentpicture;
+ z4 = llcorner currentpicture;
+ z5 = z1+down*bboxmargin;
+ z6 = z1+right*bboxmargin;
+ z7 = z2+right*bboxmargin;
+ z8 = z2+up*bboxmargin;
+ z9 = z3+up*bboxmargin;
+ z10= z3+left*bboxmargin;
+ z11= z4+left*bboxmargin;
+ z12= z4+down*bboxmargin;
+ z13= 0.5[z5,z12]+down*3*bboxmargin;
+ hdtv = z5..z6---z7..z8---z9..z10---z11..z12---cycle;
+ fill hdtv withcolor deepskycolor;
+ draw storepicture;
+ label(btex \texttt{\LARGE http://tecnumbria.com} etex, z13 );
+endfig;
+
+beginfig(2);
+ prologues := 1;
+ pickup pencircle scaled 5pt;
+ draw fullplanet;
+ unfill fullring;
+ draw fullring;
+ draw backring;
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/sharpraytrace.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/sharpraytrace.mp
new file mode 100644
index 00000000000..120f272f5fe
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/sharpraytrace.mp
@@ -0,0 +1,102 @@
+% sharpraytrace.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+f := (5,1.5,4.5);
+Spread := 60;
+PrintStep := 5;
+
+numeric phi;
+phi = 0.5*(1+sqrt(5));
+
+V1 := ( 1, phi,0);
+V2 := (-1, phi,0);
+V3 := (-1,-phi,0);
+V4 := ( 1,-phi,0);
+V5 := (0, 1, phi);
+V6 := (0,-1, phi);
+V7 := (0,-1,-phi);
+V8 := (0, 1,-phi);
+V9 := ( phi,0, 1);
+V10:= ( phi,0,-1);
+V11:= (-phi,0,-1);
+V12:= (-phi,0, 1);
+makeface1(1,2,3,4);
+makeface2(5,6,7,8);
+makeface3(9,10,11,12);
+
+beginfig(1);
+ pickup pencircle scaled 2pt;
+% numeric asize;
+% asize = 0.5*(phi+1);
+% cartaxes(asize,asize,asize);
+ sharpraytrace;
+endfig;
+
+Spread := 120;
+f:=3*(1,0.5,0.75);
+PrintStep := 0.15;
+
+numeric a, b, c, d, e;
+a = 0.1;
+b = 0.3;
+c = 1.1;
+d = 2.9;
+e = 0.5;
+
+V1 := ( a , b , c);
+V2 := ( a-1, b , 0);
+V3 := ( a-1-e, b-d,0);
+V4 := (-b , a , c);
+V5 := (-b , a-1, 0);
+V6 := (-b+d,a-1-e, 0);
+V7 := (-a , -b , c);
+V8 := (-a+1,-b , 0);
+V9 := (-a+1+e,-b+d,0);
+V10:= ( b , -a , c);
+V11:= ( b ,-a+1, 0);
+V12:= (b-d,-a+1+e, 0);
+makeface1(1,2,3);
+makeface2(4,5,6);
+makeface3(7,8,9);
+makeface4(10,11,12);
+
+beginfig(2);
+ pickup pencircle scaled 2pt;
+ sharpraytrace;
+endfig;
+
+Spread := 120;
+f:=(3,5,-0.6);
+PrintStep := 5;
+
+numeric a, b, c, d;
+a = 0.2;
+b = 0.3;
+c = 1.3;
+d = 1.4;
+
+V1 := ( b, 2.5*a, b);
+V2 := ( b,-2.5*a, b);
+V3 := (-c,-2.5*a,-3*b);
+V4 := (-c, 2.5*a,-3*b);
+V5 := (-b, 4*a, b);
+V6 := (-b,-4*a, b);
+V7 := ( c,-4*a,-3*b);
+V8 := ( c, 4*a,-3*b);
+V9 := ( d, 2*a,-b);
+V10:= ( d,-2*a,-b);
+V11:= (-d,-2*a,-b);
+V12:= (-d, 2*a,-b);
+makeface1(1,2,3,4);
+makeface2(5,6,7,8);
+makeface3(9,10,11,12);
+
+beginfig(3);
+ pickup pencircle scaled 2pt;
+ sharpraytrace;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecar.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecar.mp
new file mode 100644
index 00000000000..48224c4fc11
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecar.mp
@@ -0,0 +1,25 @@
+% simplecar.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+%f := 0.25*(2,2.15,15.3);
+f := (2,0.15,1.1);
+Spread := 320;
+HoriZon := -0.2;
+
+beginfig(1);
+ color refpos, angcol, lencol, froncol, rearcol;
+ refpos = black;
+ angcol = black;
+ lencol = (0.6, 0.35, 0.28);
+ froncol = (0.026, 0.12, 0.06);
+ rearcol = froncol;
+ setthearena( 12, 1.3 );
+ simplecar( refpos, angcol, lencol, froncol, rearcol );
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp
new file mode 100644
index 00000000000..c98c6bcdd87
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp
@@ -0,0 +1,56 @@
+% simplecarparam.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+%f := 0.25*(2,2.15,15.3);
+f := (3.5,8,1.1);
+Spread := 160;
+
+beginfig(1);
+ color refpos, angcol, lencol, froncol, rearcol;
+ color a, b, c, d;
+ numeric lx, ly, lz, fx, fy, fz, hei;
+ lx = 0.8;
+ ly = 0.35;
+ lz = 0.18;
+ fx = 0.1;
+ fy = 0.2;
+ fz = 0.132;
+ hei = 0.05;
+ refpos = black;
+ angcol = black;
+ lencol = (lx, ly, lz);
+ froncol = (fx, fy, fz);
+ rearcol = froncol;
+ a = (0.5*lx,0.5*ly,-0.5*lz);
+ b = (0.5*lx-fx,0.5*ly,-0.5*lz);
+ c = (0.5*lx-fx,0.5*ly+fy,-0.5*lz);
+ d = (0.5*lx-fx-fz,0.5*ly+fy,-0.5*lz);
+ simplecar( refpos, angcol, lencol, froncol, rearcol );
+ drawdblarrow rp(a)--rp(b);
+ drawdblarrow rp(b)--rp(c);
+ drawdblarrow rp(c)--rp(d);
+ drawoptions( withcolor 0.87red );
+ labelinspace( true, 0.3[a,b], -red, hei*blue, btex X etex );
+ labelinspace( true, 0.3[b,c], green, hei*blue, btex Y etex );
+ labelinspace( true, 0.3[c,d], -red, hei*blue, btex Z etex );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/spatialhalfsfear.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/spatialhalfsfear.mp
new file mode 100644
index 00000000000..d80e3e3f5a6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/spatialhalfsfear.mp
@@ -0,0 +1,15 @@
+% spatialhalfsfear.mp
+% L. Nobre G.
+% 2004
+
+f := (3,-0.2,3);
+beginfig(1);
+ spatialhalfsfear( black, blue, 1 );
+ drawoptions( withpen pencircle scaled 3pt withcolor (blue+green) );
+ spatialhalfsfear( black, blue+green, 0.8 );
+ drawoptions( withpen pencircle scaled 3pt withcolor red );
+ spatialhalfsfear( black, red, 0.6 );
+ drawoptions( withpen pencircle scaled 3pt withcolor green );
+ spatialhalfsfear( black, green, 0.7 );
+endfig;
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/spltwiben.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/spltwiben.mp
new file mode 100644
index 00000000000..5c85736f7bc
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/spltwiben.mp
@@ -0,0 +1,81 @@
+% spltwiben.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+def zsurface( expr xc, yc ) =
+ ((3*xc-5)*(3*xc+5)/(3*sqrt(3)*yc-5))
+enddef;
+
+f := (4,-5,3);
+Spread := 120;
+
+beginfig(1);
+ numeric i, j, nx, ny, lowx, higx, lowy, higy;
+ numeric posx, posy, posz, facz;
+ color gridx[], pos, reforig, endbeta, endpsip;
+ color endfiel, kdiv, krot, kben, akdiv, akrot, akben;
+ path facex;
+ facz = 7;
+ nx = 15;
+ ny = 50;
+ lowx = 0;
+ higx = 0.5*sqrt(3);
+ reforig = (0,-0.5,0);
+ endpsip = (0.3,-0.5,0);
+ endbeta = (0,-0.2,0);
+ endfiel = (0,-0.5,9/facz);
+ kdiv = (0,-0.5,8/facz);
+ krot = (0,-0.5,2/facz);
+ kben = (0,-0.5,5/facz);
+ akdiv = (higx,0.5,8/facz);
+ akrot = (higx,-0.5,2/facz);
+ akben = (0,0,5/facz);
+ draw rp((0,0,0))--rp((0,0,5/facz));
+ for i=1 upto nx:
+ posx := lowx + i*( higx - lowx )/nx;
+ lowy := -sqrt(3)*posx/3;
+ higy := -lowy;
+ for j=0 upto ny:
+ posy := lowy + j*( higy - lowy )/ny;
+ posz := zsurface( posx, posy )/facz;
+ gridx[j] := ( posx, posy, posz );
+ % show gridx[j];
+ endfor;
+ pos := ( posx, lowy, 0 );
+ facex := rp( pos )--rp( gridx0 );
+ for j=1 upto ny:
+ facex := facex--rp( gridx[j] );
+ endfor;
+ facex:=facex--rp((posx,higy,0))--cycle;
+ unfill facex;
+ draw facex;
+ endfor;
+ drawarrow rp(reforig)--rp(endpsip);
+ drawarrow rp(reforig)--rp(endbeta);
+ drawarrow rp(reforig)--rp(endfiel);
+ label.ulft(btex $\mathcal{X}$ etex, rp(endbeta) );
+ label.llft(btex $\mathcal{Z}$ etex, rp(endpsip) );
+ label.llft(btex $\mathcal{H}$ etex, rp(endfiel) );
+ dotlabel("",rp(reforig+(0,0,Z(gridx[ny]))));
+ dotlabel("",rp(reforig+(0,0,Z(gridx0))));
+ dotlabel("",rp(kben));
+ dotlabel.rt(btex $\mathcal{K}_1$ etex,rp(gridx[ny]));
+ dotlabel.lrt(btex $\mathcal{K}_2$ etex,rp(gridx0));
+ dotlabel.lft(btex $\mathcal{K}_3$ etex,rp(akben));
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/stageforthree.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/stageforthree.mp
new file mode 100644
index 00000000000..f0d81f26e60
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/stageforthree.mp
@@ -0,0 +1,115 @@
+% stageforthree.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+Spread := 35;
+f := (13,7,3.5);
+
+beginfig(1);
+ numeric i, len, wang, reflen, frac, coordg;
+ numeric fws, NumLines, inray, outay;
+ path conepath, cira, cirb, ella, ellb, tuba, tubb, tubc;
+ color axe, aroc, cubevertex, conecenter, conevertex;
+ color allellaxe, ellaaxe, ellbaxe, pca, pea, pcb, peb;
+ frac := 0.5;
+ len := 0.6;
+ wang := 60;
+ axe := (0,cosd(90-wang),sind(90-wang));
+ fws := 4;
+ reflen := 0.2*fws;
+ outay := 0.45*fws;
+ inray := 0.7*outay;
+ coordg := frac*fws;
+ NumLines := 30;
+ HoriZon := -0.5*fws;
+ setthestage( 0.5*NumLines, 2*fws );
+ cubevertex = (0.12*fws,-0.5*fws,-0.5*fws);
+ kindofcube(false,true,cubevertex,180,0,0,0.65*fws,0.2*fws,fws);
+ aroc := outay*(0,cosd(wang),sind(wang))-0.5*(0,fws,fws);
+ rigorousdisc( inray, true, aroc, outay, axe*len );
+ allellaxe := reflen*( 0.707, 0.707, 0 );
+ ellaaxe := reflen*( 0.707, -0.707, 1.0 );
+ ellbaxe := reflen*( -0.707, 0.707, 1.0 );
+ conecenter = ( coordg, coordg, -0.5*fws );
+ pca := ( coordg, -coordg, -0.5*fws );
+ pcb := ( -coordg, coordg, -0.5*fws );
+ pea := ( coordg, -coordg, 0.9*fws );
+ peb := ( -coordg, coordg, 0.9*fws );
+ cira := goodcirclepath( pca, blue, reflen );
+ cirb := goodcirclepath( pcb, blue, reflen );
+ ella := ellipticpath( pea, allellaxe, ellaaxe );
+ ellb := ellipticpath( peb, allellaxe, ellbaxe );
+ tuba := twocyclestogether( cira, ella );
+ tubb := twocyclestogether( cirb, ellb );
+ tubc := twocyclestogether( ella, ellb );
+ unfill tubb; draw tubb;
+ unfill tubc; draw tubc;
+ unfill tuba; draw tuba;
+ conevertex = conecenter + ( -3.5*reflen, 0, 0.8*fws );
+ verygoodcone(false,conecenter,blue,reflen,conevertex);
+endfig;
+
+Spread := 23;
+f := (6,13,3);
+ShadowOn := true;
+
+beginfig(2);
+ numeric reflen, frac, coordg;
+ numeric fws, NumLines;
+ path ella, ellb;
+ color axe, cubevertex;
+ color allellaxe, ellaaxe, pca, pcb;
+ frac := 0.5;
+ wang := 60;
+ axe := (0,cosd(90-wang),sind(90-wang));
+ fws := 4;
+ reflen := 0.35*fws;
+ coordg := frac*fws;
+ NumLines := 52;
+ HoriZon := -0.5*fws;
+ setthestage( 0.5*NumLines, 3.6*fws );
+ cubevertex = (0.3*fws,-0.5*fws,-0.5*fws);
+ kindofcube(false,true,cubevertex,180,0,0,0.6*fws,0.2*fws,fws);
+ allellaxe := reflen*( 0.707, 0.707, 0 );
+ ellaaxe := reflen*( 0.5, -0.5, 0 );
+ pca := ( coordg, coordg, -0.5*fws );
+ pcb := ( -coordg, coordg, -0.5*fws );
+
+ whatisthis( pca, 0.5*ellaaxe, allellaxe, reflen, 0.3 );
+ whatisthis( pcb, ellaaxe*sqrt(2), allellaxe/sqrt(2), 2*reflen, 0.6 );
+
+endfig;
+
+Spread := 23;
+f := (13,6,4.5);
+ShadowOn := true;
+LightSource := 10*(4,-3,6);
+beginfig(3);
+ numeric reflen, frac, coordg;
+ numeric fws, NumLines;
+ path ella, ellb;
+ color axe, cubevertex, conecenter, conevertex;
+ color allellaxe, ellaaxe, pca, pcb;
+ frac := 0.5;
+ wang := 60;
+ axe := (0,cosd(90-wang),sind(90-wang));
+ fws := 4;
+ reflen := 0.35*fws;
+ coordg := frac*fws;
+ NumLines := 45;
+ HoriZon := -0.5*fws;
+ setthestage( 0.5*NumLines, 3.3*fws );
+ cubevertex = (0.3*fws,-0.5*fws,0);
+ tropicalglobe( 7, cubevertex, 0.5*fws, axe );
+ allellaxe := reflen*( 0.707, 0.707, 0 );
+ ellaaxe := reflen*( 0.5, -0.5, 0 );
+ pcb := ( -coordg, coordg, 0 );
+ rigorousdisc( 0, true, pcb, 0.5*fws, -ellaaxe );
+ conecenter = ( coordg, coordg, -0.5*fws );
+ conevertex = conecenter + ( 0, 0, 0.9*fws );
+ verygoodcone(false,conecenter,blue,reflen,conevertex);
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tangencypoint.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/tangencypoint.mp
new file mode 100644
index 00000000000..7c6d8f79601
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/tangencypoint.mp
@@ -0,0 +1,38 @@
+% tangencypoint.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric u, i;
+ u = 5mm;
+ pen a, b, c;
+ a = pencircle scaled 3pt;
+ b = pencircle scaled 5pt;
+ c = pencircle scaled 1pt;
+ z1 = (1u,1u);
+ z2 = (4u,4u);
+ z3 = (4u,5u);
+ z4 = (3u,5u);
+ z5 = (3u,6u);
+ z6 = (4u,7u);
+ z7 = (6u,1u);
+ path cp;
+ cp = z1{up}..z2..z3..z4..z5..{up}z6;
+ draw cp withpen c;
+ for i=1 upto 6:
+ draw z[i] withpen a withcolor 0.5*(red+green);
+ endfor;
+ z8 = firsttangencypoint( cp, z7, 5 );
+ draw z7 withpen b withcolor green;
+ draw z7--z8 withpen c withcolor blue;
+endfig;
+
+end.
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tdarrow.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/tdarrow.mp
new file mode 100644
index 00000000000..5ef43d52524
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/tdarrow.mp
@@ -0,0 +1,26 @@
+% tdarrow.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric size, num, i, j, coos[];
+ string comm;
+ color tmpc, fro, tip;;
+ size = 1.5;
+ num = 250;
+ draw rp(black)--rp((size,0,0))--rp((size,size,0))--rp((0,size,0))--cycle;
+ for i=1 upto num:
+ for j=1 upto 6:
+ coos[j] := uniformdeviate(size);
+ endfor;
+ fro := (coos1,coos2,coos3);
+ tip := (coos4,coos5,coos6);
+ comm := "tdarrow(" & cstr(fro) & "," & cstr(tip) & ");";
+ tmpc := 0.5[fro,tip];
+ getready( comm, tmpc );
+ endfor;
+ doitnow;
+endfig;
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/thearchicon.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/thearchicon.mp
new file mode 100644
index 00000000000..3c9acb10391
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/thearchicon.mp
@@ -0,0 +1,59 @@
+% thearchicon.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+f := 0.8*(6,3,4);
+
+beginfig(1);
+ color tracecol, lockcol;
+ numeric altura, compri, radius, altfrac, comfrac, radang;
+ path theside, thefront, thelocka, thelockb, thelock;
+ color poi[];
+ numeric numpl, aux, i;
+ altura = 1;
+ compri = 2;
+ radius = 0.8;
+ altfrac = 0.2;
+ comfrac = 0.15;
+ radang = 37;
+ numpl = 9;
+ tracecol = blue;
+ lockcol = black;
+ currentpen := pencircle scaled 3mm;
+ drawoptions( withcolor tracecol );
+ rigorousdisc( 0, true, (-0.5compri,0,0), radius, (compri,0,0) );
+ poi1 = (0.5compri,-radius,0);
+ poi2 = (0.5compri,radius,0);
+ poi3 = (-0.5compri,radius,0);
+ poi4 = (0.5compri,-radius,-altura);
+ poi5 = (0.5compri,radius,-altura);
+ poi6 = (-0.5compri,radius,-altura);
+ theside = rp(poi1)--rp(poi2)--rp(poi5)--rp(poi4)--cycle;
+ thefront= rp(poi2)--rp(poi3)--rp(poi6)--rp(poi5)--cycle;
+ drawoptions( withcolor background );
+ fill theside;
+ fill thefront;
+ thelocka = rp((comfrac*compri,radius,-altfrac*altura))
+ --rp((comfrac*compri,radius,0));
+ thelockb = rp((-comfrac*compri,radius,-altfrac*altura))
+ --rp((-comfrac*compri,radius,0));
+ for i=1 upto numpl:
+ aux := i*radang/numpl;
+ poi7 := (comfrac*compri,radius*cosd(aux),radius*sind(aux));
+ poi8 := (-comfrac*compri,radius*cosd(aux),radius*sind(aux));
+ thelocka := thelocka...rp(poi7);
+ thelockb := thelockb...rp(poi8);
+ endfor;
+ thelock = thelocka--reverse thelockb--cycle;
+ drawoptions( withcolor lockcol );
+ filldraw thelock;
+ drawoptions( withcolor tracecol );
+ draw theside;
+ draw thefront;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/thethreekindsofperspec.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/thethreekindsofperspec.mp
new file mode 100644
index 00000000000..3d9ffe9e0d1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/thethreekindsofperspec.mp
@@ -0,0 +1,195 @@
+% thethreekindsofperspec.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+f := (4,2,2.5);
+Spread := 45;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton,concmath,ccfonts}
+\begin{document}
+etex
+
+color psdf, psdu, psdv, rll, rlr, rur, rul, pll, plr, pur, pul;
+color pc;
+numeric projecplanesize, sizefraction, positfraction, aspectratio, rectsize;
+pen realpen, lightpen, projpen, dotpen;
+path projecplanepath, realpath;
+psdf = 3.1*(0,1,0.37);
+projecplanesize = 1.7;
+sizefraction = 0.19;
+positfraction = 0.65;
+aspectratio = 1.0;
+rectsize = 0.15;
+realpen = pencircle scaled 2.6pt;
+lightpen = pencircle scaled 0.55pt;
+projpen = pencircle scaled 1.8pt;
+dotpen = pencircle scaled 3.8pt;
+psdv = N( (-Y(psdf), X(psdf), 0) );
+psdu = ncrossprod( psdf, psdv );
+pll = projecplanesize*(-aspectratio*psdv-psdu);
+plr = projecplanesize*(+aspectratio*psdv-psdu);
+pur = projecplanesize*(+aspectratio*psdv+psdu);
+pul = projecplanesize*(-aspectratio*psdv+psdu);
+projecplanepath = rp(pll)--rp(plr)--rp(pur)--rp(pul)--cycle;
+pc = positfraction*psdf;
+rll = pc+sizefraction*projecplanesize*(-psdv-psdu);
+rlr = pc+sizefraction*projecplanesize*(+psdv-psdu);
+rur = pc+sizefraction*projecplanesize*(+psdv+psdu);
+rul = pc+sizefraction*projecplanesize*(-psdv+psdu);
+realpath = rp(rll)--rp(rlr)--rp(rur)--rp(rul)--cycle;
+
+beginfig(1);
+ draw projecplanepath withpen realpen;
+ draw realpath withpen realpen;
+ draw rp(psdf) withpen lightpen;
+ drawoptions( withpen lightpen );
+ squareangline( psdf, psdv, black, rectsize );
+ squareangline( psdf, psdu, black, rectsize );
+ drawoptions();
+ pair prll, prlr, prur, prul;
+ prll = rp(rll-pc);
+ prlr = rp(rlr-pc);
+ prur = rp(rur-pc);
+ prul = rp(rul-pc);
+ path projpath;
+ projpath = prll--prlr--prur--prul--cycle;
+ draw projpath withpen projpen;
+ draw prll--rp(rll+(1-positfraction)*psdf) withpen lightpen;
+ draw prlr--rp(rlr+(1-positfraction)*psdf) withpen lightpen;
+ draw prur--rp(rur+(1-positfraction)*psdf) withpen lightpen;
+ draw prul--rp(rul+(1-positfraction)*psdf) withpen lightpen;
+ draw rp(black)--rp(psdf) withpen lightpen;
+ draw rp(black) withpen dotpen;
+ draw rp(psdf) withpen dotpen;
+ label.rt( btex f etex, rp(psdf) );
+% label.bot( btex viewcentr etex, rp(black) );
+endfig;
+
+beginfig(2);
+ draw projecplanepath withpen realpen;
+ draw realpath withpen realpen;
+ draw rp(psdf) withpen lightpen;
+ drawoptions( withpen lightpen );
+ squareangline( psdf, psdv, black, rectsize );
+ squareangline( psdf, psdu, black, rectsize );
+ drawoptions();
+ pair prll, prlr, prur, prul;
+ LightSource:=psdf;
+ prll = rp(projectpoint(black,rll));
+ prlr = rp(projectpoint(black,rlr));
+ prur = rp(projectpoint(black,rur));
+ prul = rp(projectpoint(black,rul));
+ path projpath;
+ projpath = prll--prlr--prur--prul--cycle;
+ draw projpath withpen projpen;
+ draw prll--rp(psdf) withpen lightpen;
+ draw prlr--rp(psdf) withpen lightpen;
+ draw prur--rp(psdf) withpen lightpen;
+ draw prul--rp(psdf) withpen lightpen;
+ draw rp(black)--rp(psdf) withpen lightpen;
+ draw rp(black) withpen dotpen;
+ draw rp(psdf) withpen dotpen;
+ label.rt( btex f etex, rp(psdf) );
+ label.bot( btex viewcentr etex, rp(black) );
+endfig;
+
+beginfig(3);
+ draw projecplanepath withpen realpen;
+ draw realpath withpen realpen;
+ draw rp(psdf) withpen lightpen;
+ drawoptions( withpen lightpen );
+ squareangline( psdf, psdv, black, rectsize );
+ squareangline( psdf, psdu, black, rectsize );
+ numeric dist;
+ dist = conorm( psdf );
+ color ml, mt, mr, mb;
+ mb = 0.5[rll,rlr];
+ ml = 0.5[rll,rul];
+ mr = 0.5[rur,rlr];
+ mt = 0.5[rur,rul];
+ drawoptions( withpen projpen );
+ angline( rll, mb, psdf, dist, "", top );
+ angline( rll, ml, psdf, dist, "", top );
+ angline( rur, mt, psdf, dist, "", top );
+ angline( rur, mr, psdf, dist, "", top );
+ angline( mb, rlr, psdf, dist, "", top );
+ angline( ml, rul, psdf, dist, "", top );
+ angline( mr, rlr, psdf, dist, "", top );
+ angline( mt, rul, psdf, dist, "", top );
+ angline( black, mb, psdf, dist, "", top );
+ angline( black, ml, psdf, dist, "", top );
+ angline( black, mr, psdf, dist, "", top );
+ angline( black, mt, psdf, dist, "", top );
+ drawoptions();
+ numeric marc, darc, dmarc, ddarc;
+ marc = 0.01745*getangle(-psdf,mt-psdf)*dist;
+ darc = 0.01745*getangle(-psdf,rll-psdf)*dist*0.707;
+ color pro[], esf[], proc[], esfc[];
+ pro1 = darc*(-psdv-psdu);
+ pro2 = marc*(-psdu);
+ pro3 = darc*(+psdv-psdu);
+ pro4 = marc*(+psdv);
+ pro5 = darc*(+psdv+psdu);
+ pro6 = marc*(+psdu);
+ pro7 = darc*(-psdv+psdu);
+ pro8 = marc*(-psdv);
+ esf1 = psdf+dist*N(rll-psdf);
+ esf2 = psdf+dist*N(mb-psdf);
+ esf3 = psdf+dist*N(rlr-psdf);
+ esf4 = psdf+dist*N(mr-psdf);
+ esf5 = psdf+dist*N(rur-psdf);
+ esf6 = psdf+dist*N(mt-psdf);
+ esf7 = psdf+dist*N(rul-psdf);
+ esf8 = psdf+dist*N(ml-psdf);
+ ddarc = conorm(pro1-esf1)/3;
+ dmarc = conorm(pro2-esf2)/3;
+ proc1 = pro1+ddarc*N(psdf);
+ proc2 = pro2+dmarc*N(psdf);
+ proc3 = pro3+ddarc*N(psdf);
+ proc4 = pro4+dmarc*N(psdf);
+ proc5 = pro5+ddarc*N(psdf);
+ proc6 = pro6+dmarc*N(psdf);
+ proc7 = pro7+ddarc*N(psdf);
+ proc8 = pro8+dmarc*N(psdf);
+ esfc1 = esf1+ddarc*N(rll-psdf);
+ esfc2 = esf2+dmarc*N(mb-psdf);
+ esfc3 = esf3+ddarc*N(rlr-psdf);
+ esfc4 = esf4+dmarc*N(mr-psdf);
+ esfc5 = esf5+ddarc*N(rur-psdf);
+ esfc6 = esf6+dmarc*N(mt-psdf);
+ esfc7 = esf7+ddarc*N(rul-psdf);
+ esfc8 = esf8+dmarc*N(ml-psdf);
+ numeric i;
+ drawoptions( withpen lightpen );
+ for i=1 upto 8:
+ draw rp(esf[i])..controls rp(esfc[i]) and rp(proc[i])..rp(pro[i]);
+ draw rp(psdf)--rp(esf[i]);
+ endfor;
+ draw rp(pro2)--rp(pro6);
+ draw rp(pro4)--rp(pro8);
+ draw rp(mb)--rp(mt);
+ draw rp(ml)--rp(mr);
+ drawoptions( withpen projpen );
+ draw rp(pro1)...rp(pro2)..rp(pro3);
+ draw rp(pro3)...rp(pro4)..rp(pro5);
+ draw rp(pro5)...rp(pro6)..rp(pro7);
+ draw rp(pro7)...rp(pro8)..rp(pro1);
+ draw rp(black)--rp(psdf) withpen lightpen;
+ draw rp(black) withpen dotpen;
+ draw rp(psdf) withpen dotpen;
+ label.rt( btex f etex, rp(psdf) );
+% label.ulft( btex viewcentr etex, rp(black) );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end; \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/torus.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/torus.mp
new file mode 100644
index 00000000000..e629e85823a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/torus.mp
@@ -0,0 +1,297 @@
+% torus
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+% Draw a torus with NP dots, a section of 3.14*RS^2
+% and a total diameter of 2*(RB+RS). The dots are placed
+% on a single closed line that turns around the $z$ axis
+% NB times and around the section NS times.
+% figure(1) exemplifies the use of signalvertex.
+
+def flask( expr TheVal ) =
+ begingroup
+ numeric RB, RS, RP, NB, NS, NM, phi, theta, first, second, third;
+ RB=1;
+ RS=0.3;
+ RP=0.02;
+ NB=8;
+ NS=5;
+ NM=4;
+ theta=360*NB*TheVal;
+ phi=360*NS*TheVal;
+ first =(RB+(RS+RP*sind(NM*theta))*cosd(phi))*cosd(theta);
+ second=(RB+(RS+RP*sind(NM*theta))*cosd(phi))*sind(theta);
+ third = (RS+RP*sind(NM*theta))*sind(phi);
+ ( (first,second,third) )
+ endgroup
+enddef;
+
+def blask( expr TheVal ) =
+ begingroup
+ numeric RB, RS, NB, NS, phi, theta, first, second, third;
+ RB=1;
+ RS=0.1;
+ NB=1;
+ NS=24;
+ theta=360*NB*TheVal;
+ phi=360*NS*TheVal;
+ first =(RB+RS*cosd(phi))*cosd(theta);
+ second=(RB+RS*cosd(phi))*sind(theta);
+ third = RS*sind(phi);
+ ( (first,second,third) )
+ endgroup
+enddef;
+
+beginfig(5);
+ Spread := 200;
+ numeric NP, i, varfrac;
+ path cl;
+ string comm;
+ pen bip, sp;
+ varfrac = 1.25;
+ bip = pencircle scaled 15pt;
+ sp = pencircle scaled 9pt;
+ NP=600;
+ cl = for i=1 upto NP: rp(flask(i/NP)).. endfor cycle;
+ draw cl;
+ for i=1 upto NP:
+ comm:="draw subpath ("
+ & decimal(i-0.5)
+ & ","
+ & decimal(i+0.5)
+ & ") of cl withpen bip; undraw subpath ("
+ & decimal(i-varfrac)
+ & ","
+ & decimal(i+varfrac)
+ & ") of cl withpen sp;";
+ getready( comm, flask( i/NP ) );
+ endfor;
+ closedline( true, 300, 0.5, 1 )( blask );
+ doitnow;
+endfig;
+
+beginfig(6);
+ Spread := 100;
+ f := (7,3,9);
+ HoriZon := -2;
+ LightSource := (1,-1,15);
+ numeric sinthe, costhe, ux, uz, lx, lz, co, i;
+ costhe = (4*sqrt(5)-sqrt(3))/11;
+ sinthe = sqrt(1-(costhe**2));
+ ux = costhe*sqrt(2)/2;
+ uz = sinthe/2;
+ lx = sqrt(4/3)*sinthe;
+ lz = -sqrt(2/3)*costhe;
+ co = sqrt(2)*(2*sqrt(5)+5*sqrt(3))/22;
+ V1 := (ux,0,-uz);
+ V2 := (lx,0,-lz);
+ V3 := (0,ux,uz); V15:= (0,-ux,uz);
+ V4 := (0,lx,lz); V16:= (0,-lx,lz);
+ V5 := (co,co,0); V14:= (-co,-co,0);
+ V6 := (-ux,0,-uz);
+ V7 := (-lx,0,-lz);
+ V8 := (-co,co,0); V13:= (co,-co,0);
+ V9 := improvertex( V5, 1, V4, 1, V3, sqrt(3)-1, (0,1,0) );
+ V10:= (-X(V9),-Y(V9),Z(V9));
+ V11:= (Y(V9),-X(V9),-Z(V9));
+ V12:= (-Y(V9),X(V9),-Z(V9));
+ makeface1(1,2,3);
+ makeface2(1,2,5);
+ makeface3(2,3,5);
+ makeface4(9,4,5);
+ makeface5(3,4,1);
+ makeface6(1,4,5);
+ makeface7(3,6,7);
+ makeface8(3,7,8);
+ makeface9(6,7,8);
+ makeface10(9,8,4);
+ makeface11(4,6,8);
+ makeface12(3,4,6);
+ makeface13(3,5,9);
+ makeface14(3,8,9);
+ makeface15(7,8,12);
+ makeface16(7,14,12);
+ makeface17(6,8,12);
+ makeface18(6,14,12);
+ makeface19(2,5,11);
+ makeface20(2,13,11);
+ makeface21(1,5,11);
+ makeface22(1,13,11);
+ makeface23(10,15,13);
+ makeface24(10,15,14);
+ makeface25(10,16,13);
+ makeface26(10,16,14);
+ makeface27(2,1,15);
+ makeface28(6,7,15);
+ makeface29(13,15,2);
+ makeface30(14,15,7);
+ makeface31(16,1,15);
+ makeface32(16,6,15);
+ for i=1 upto 32:
+ FC[i] := TableColors;
+ FCD[i]:= true;
+ endfor;
+ ShadowOn := true;
+ setthearena(15,6);
+ fill_faces();
+ draw_invisible( false, false, TableC3, TableC0 );
+% drawoptions( withcolor red );
+% for i=1 upto 16:
+% label.bot( decimal( i ), rp( V[i] ) );
+% endfor;
+endfig;
+
+beginfig(1);
+ Spread := 140;
+ NP:=2000;
+ RB:=1;
+ RS:=0.2;
+ R3:=0.1;
+ NB:=8;
+ NS:=5;
+ jB:=360*NB/NP;
+ jS:=360*NS/NP;
+ for i=1 upto NP:
+ phi :=i*jS;
+ theta :=i*jB;
+ first :=(RB+(RS+R3*sind(4*theta))*cosd(phi))*cosd(theta);
+ second:=(RB+(RS+R3*sind(4*theta))*cosd(phi))*sind(theta);
+ third := (RS+R3*sind(4*theta))*sind(phi);
+ signalvertex( (first,second,third), 1, black );
+ endfor;
+endfig;
+
+% Draw a torus with faces.
+
+beginfig(2);
+
+ PrintStep := 7;
+
+ f := ( 3,1,1 );
+
+ RB:=1;
+ RS:=0.25;
+ NB:=3;
+ NS:=5;
+ jB:=360/NB;
+ jS:=360/NS;
+ iS:=jS;
+ iB:=jB;
+ counter:=0;
+ for i=1 upto NB:
+ for j=1 upto NS:
+ counter := incr(counter);
+ npf[counter]:= 4;
+ phi :=j*jS;
+ theta:=i*jB;
+ f1 :=(RB+(RS)*cosd(phi))*cosd(theta);
+ s1 :=(RB+(RS)*cosd(phi))*sind(theta);
+ t1 := (RS)*sind(phi);
+ F[counter]p[1]:=(f1,s1,t1);
+ f2 :=(RB+(RS)*cosd(phi))*cosd(theta+iB);
+ s2 :=(RB+(RS)*cosd(phi))*sind(theta+iB);
+ t2 := (RS)*sind(phi);
+ F[counter]p[2]:=(f2,s2,t2);
+ f3 :=(RB+(RS)*cosd(phi+iS))*cosd(theta+iB);
+ s3 :=(RB+(RS)*cosd(phi+iS))*sind(theta+iB);
+ t3 := (RS)*sind(phi+iS);
+ F[counter]p[3]:=(f3,s3,t3);
+ f4 :=(RB+(RS)*cosd(phi+iS))*cosd(theta);
+ s4 :=(RB+(RS)*cosd(phi+iS))*sind(theta);
+ t4 := (RS)*sind(phi+iS);
+ F[counter]p[4]:=(f4,s4,t4);
+ endfor;
+ endfor;
+ NF:=counter;
+% faceraytrace(0.3, blue);
+% draw_all_test(false);
+ sharpraytrace;
+endfig;
+
+beginfig(3);
+ f := (6,2,4);
+% f := (6,2,7); % NO CUSP.
+ Spread:=70;
+ HoriZon := -2;
+ ShadowOn := true;
+ numeric bigray, smaray, angstep;
+ color toruscenter, torusmoment, nearaxe, sideaxe, viewline;
+ color circlecenter, circlemoment;
+ numeric ang, ind, i, anglim;
+ path cpath, apath, opath, ipath, wp, ep;
+ pair outerp[], innerp[], refpair;
+ pen markpen;
+ boolean cuspcond;
+ picture holepic;
+ markpen = pencircle scaled 5pt;
+ pickup markpen;
+ bigray = 2;
+ smaray = 1;
+ angstep= 2;
+ toruscenter = black;
+ torusmoment = (0,1,2);
+ refpair = unitvector( rp(toruscenter+torusmoment)-rp(toruscenter) );
+ viewline = f-toruscenter;
+ ind = 0;
+ sideaxe = bigray*ncrossprod( torusmoment, viewline );
+ nearaxe = bigray*ncrossprod( sideaxe, torusmoment );
+ anglim = 0.5*angstep-180;
+ if ShadowOn:
+ for ang=anglim step angstep until -anglim:
+ circlecenter:= nearaxe*cosd(ang)+sideaxe*sind(ang);
+ circlemoment:=-nearaxe*sind(ang)+sideaxe*cosd(ang);
+ filldraw circleshadowpath(circlecenter,circlemoment,smaray);
+ endfor;
+ fi;
+ for ang=anglim step angstep until -anglim:
+ ind := incr( ind );
+ circlecenter:= nearaxe*cosd(ang)+sideaxe*sind(ang);
+ circlemoment:=-nearaxe*sind(ang)+sideaxe*cosd(ang);
+ cpath:=spatialhalfcircle(circlecenter,circlemoment,smaray,true);
+ if ang>=0:
+ outerp[ind]=point 0 of cpath;
+ innerp[ind]=point (length cpath) of cpath;
+ elseif ang<0:
+ innerp[ind]=point 0 of cpath;
+ outerp[ind]=point (length cpath) of cpath;
+ fi;
+ endfor;
+ opath = for i=1 upto ind: outerp[i].. endfor cycle;
+ ipath = for i=1 upto ind: innerp[i].. endfor cycle;
+ holepic = currentpicture;
+ clip holepic to ipath;
+ unfill opath;
+ draw holepic;
+ draw opath withcolor green;
+ draw ipath withcolor red;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Perhaps there is an analytic way of getting the angle of the cusp point? %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ i := ceiling(1+180/angstep);
+ forever:
+ i := incr( i );
+ cuspcond := refpair dotprod innerp[i+1] < refpair dotprod innerp[i];
+ exitif cuspcond or ( i > ind-1 );
+ endfor;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ ep = outerp[ind-i]--innerp[ind-i];
+ wp = innerp[i]--outerp[i];
+ unfill buildcycle(opath,ep,reverse ipath,wp);
+ draw opath withcolor green;
+ draw subpath (i,ind-i) of ipath withcolor red;
+endfig;
+
+beginfig(4);
+ f := (16,2,3.8);
+ Spread:=40;
+ pickup pencircle scaled 3pt;
+ smoothtorus( black-3*blue, blue, 4, 1 );
+ smoothtorus( black, blue, 4, 1 );
+ smoothtorus( black+3*blue, blue, 4, 1 );
+endfig;
+
+end.
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/trajectoryline.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/trajectoryline.mp
new file mode 100644
index 00000000000..30fe6235713
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/trajectoryline.mp
@@ -0,0 +1,88 @@
+% trajectoryline.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+Spread := 30;
+f := (10,0,0);
+
+color posa, posb, axer;
+numeric kfac, refrad;
+posa = -5*green;
+posb = 5*green;
+axer = blue;
+kfac = 2.5;
+refrad = 1;
+
+def vecfunc( expr posit )=
+ begingroup
+ save modula, modulb, field;
+ color field;
+ numeric modula, modulb;
+ modula = conorm( posit-posa );
+ modulb = conorm( posit-posb );
+ field = ( posit-posa )/(modula**3)+kfac*( posit-posb )/(modulb**3);
+ ( -field )
+ endgroup
+enddef;
+
+def magfunc( expr posit )=
+ begingroup
+ save perpd, refvec, dist;
+ color perpd, refvec;
+ numeric dist;
+ perpd = ccrossprod( axer, posit );
+ refvec = posit - refrad*ncrossprod( perpd, axer );
+ dist = conorm( refvec );
+ ( ncrossprod( refvec, perpd )/(dist**2) )
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric i, lena, numa, sa, diffstep, ray;
+ color stp, svl;
+ path oneline;
+ pen grossa, fina;
+ grossa = pencircle scaled 3pt;
+ fina = pencircle scaled 2pt;
+ lena = 400;
+ numa = 58;
+ diffstep = 0.12;
+ ray = 3.5;
+ sa = 168;
+ for i=sa step numa until (180):
+ stp := ( 0, ray*cosd(i), ray*sind(i) );
+ svl := N( -stp );
+ oneline := trajectorypath( lena, stp, svl, diffstep, vecfunc );
+ draw oneline withpen grossa;
+ draw oneline withpen fina withcolor background;
+ endfor;
+ draw rp(posa) withpen grossa;
+ draw rp(posb) withpen grossa;
+endfig;
+
+beginfig(2);
+ numeric i, lena, numa, sa, diffstep, ray;
+ color stp, svl;
+ path oneline;
+ pen grossa, fina;
+ grossa = pencircle scaled 3pt;
+ fina = pencircle scaled 2pt;
+ lena = 100;
+ numa = 4;
+ diffstep = 1;
+ ray = 5.5;
+ sa = 97;
+ for i=sa step numa until (120):
+ stp := ( 0, ray*cosd(i), ray*sind(i) );
+ svl := 0.8*N( -stp );
+ oneline := magnetictrajectorypath( lena, stp, svl, diffstep, magfunc );
+ draw oneline withpen grossa;
+ draw oneline withpen fina withcolor background;
+ endfor;
+ draw rp(black) withpen grossa;
+endfig;
+
+end.
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/triangulartrimesh.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/triangulartrimesh.mp
new file mode 100644
index 00000000000..1a19c776976
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/triangulartrimesh.mp
@@ -0,0 +1,39 @@
+% triangulartrimesh.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+def zsurface( expr xc, yc ) =
+ cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4)
+enddef;
+
+f := 16*(4,1,1);
+Spread := 35;
+LightSource := 10*(4,-3,4);
+defaultfont := "cmvtt10";
+beginfig(1);
+ numeric np, ssize, lx, ly, topl, ystep, i, zl;
+ string L[];
+ L0 = "P";
+ L1 = "H";
+ L2 = "Y";
+ L3 = "S";
+ L4 = "I";
+ L5 = "C";
+ L6 = "S";
+ np = 72;
+ ssize = 15;
+ ly = -0.5*ssize;
+ lx = -sqrt(3)*ssize/6;
+ ystep = ssize/7;
+ topl = 2*zsurface( 0, 0 );
+ for i=0 upto 6:
+ zl := zsurface(lx,i*ystep+ly);
+ labelinspace(false,(lx,i*ystep+ly,zl),green*ystep,blue*(topl-zl),L[i]);
+ endfor;
+ hexagonaltrimesh( false,np,ssize,zsurface);
+ label.ulft("matagalatlante.org",lrcorner currentpicture);
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tropicalglobe.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/tropicalglobe.mp
new file mode 100644
index 00000000000..e861c8c4462
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/tropicalglobe.mp
@@ -0,0 +1,23 @@
+% tropicalglobe.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric radius, numc;
+ pen thickp;
+
+ f := (3,0,2);
+ viewcentr := 0.5*(1,1,1);
+ Spread := 20;
+ radius = 1;
+ numc = 18;
+ thickp = pencircle scaled 1mm;
+
+ drawoptions( withpen thickp );
+ tropicalglobe( numc, black, radius, blue );
+ produce_auto_scale;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tshirtfig.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/tshirtfig.mp
new file mode 100644
index 00000000000..3873ab3c1fa
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/tshirtfig.mp
@@ -0,0 +1,39 @@
+% tshirtfig.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ f := (5,4,3);
+ Spread := 70;
+ pickup pencircle scaled 2.4pt;
+ numeric gridstep, cylength, cyradius, numcylis;
+ numeric i, j, curcoord, curangle, curnorma, tmp;
+ numeric othcoord, othangle, zcoord, coef, othnorma;
+ color base, lenvec;
+ cylength := 0.2;
+ cyradius := 0.3;
+ gridstep := cyradius*2.2;
+ numcylis := 7;
+ coef := 0.22;
+ for i=1 upto numcylis: % saddle
+ curnorma := i-0.5*(numcylis+1);
+ curcoord := curnorma*gridstep;
+ curangle := -curcoord*2*coef;
+ for j=1 upto numcylis:
+ othnorma := j-0.5*(numcylis+1);
+ othcoord := othnorma*gridstep;
+ othangle := othcoord*2*coef;
+ zcoord:=coef*(othcoord**2-curcoord**2);
+ base := (curcoord,othcoord,zcoord);
+ lenvec := cylength*N((-curangle,-othangle,1));
+ tmp := zcoord/2.4+0.8;
+ if tmp > 1: show tmp; fi;
+ background := tmp*TableC2;
+ rigorousdisc( 0, true,base,cyradius,lenvec);
+ endfor;
+ endfor;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tuftescatter.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/tuftescatter.mp
new file mode 100644
index 00000000000..2df874ec1dc
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/tuftescatter.mp
@@ -0,0 +1,83 @@
+% tuftescatter.mp
+% L. Nobre G.
+% IYP (2005)
+
+% input featpost3Dplus2D;
+
+def linscatter = uniformdeviate( 2 ) - 1 enddef;
+
+def fullcalculator =
+ begingroup
+ color aux;
+ numeric cx, cy;
+ forever:
+ cx := linscatter;
+ cy := linscatter;
+ exitif cx ++ cy < 0.8; % Saddle ray
+ endfor;
+ aux = ( cx, cy, cx*cx-cy*cy );
+ ( eulerrotation( -25, -15, -5, aux ) ) % Rotation angles
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric totalnum, classnum, sparksiz, pointray;
+ totalnum = 350; % Number of data points
+ classnum = 30; % Number of sparkline classes
+ sparksiz = 0.34; % Maximum sparkline height
+ pointray = 0.025; % Size of the data points
+ f := ( 7, 6, 5 );
+ Spread := 150;
+ numeric i, j, k, l, hx[], hy[], hz[], classtep;
+ classtep = 2/classnum;
+ color tmp;
+ for j=0 upto classnum:
+ hx[j] = 0;
+ hy[j] = 0;
+ hz[j] = 0;
+ endfor;
+ for l=1 upto totalnum:
+ tmp := fullcalculator;
+ for k=1 upto classnum:
+ if ( X(tmp) <= k*classtep-1 ) and ( X(tmp) > (k-1)*classtep-1 ):
+ hx[k] := incr( hx[k] );
+ fi;
+ if ( Y(tmp) <= k*classtep-1 ) and ( Y(tmp) > (k-1)*classtep-1 ):
+ hy[k] := incr( hy[k] );
+ fi;
+ if ( Z(tmp) <= k*classtep-1 ) and ( Z(tmp) > (k-1)*classtep-1 ):
+ hz[k] := incr( hz[k] );
+ fi;
+ endfor;
+ draw rigorouscircle( (-1,Y(tmp),Z(tmp)), red, pointray );
+ draw rigorouscircle( (X(tmp),-1,Z(tmp)), green, pointray );
+ draw rigorouscircle( (X(tmp),Y(tmp),-1), blue, pointray );
+ getready("fill rigorousfearpath("
+ & cstr( tmp )
+ & ",pointray) withcolor blue; draw rigorousfearpath("
+ & cstr( tmp )
+ & ",pointray); ", tmp);
+ endfor;
+ numeric maxn, sparkfac;
+ maxn = 0;
+ for i=1 upto classnum:
+ if hx[i]>maxn: maxn := hx[i]; fi;
+ if hy[i]>maxn: maxn := hy[i]; fi;
+ if hz[i]>maxn: maxn := hz[i]; fi;
+ endfor;
+ sparkfac = sparksiz/maxn;
+ for j=1 upto classnum:
+ draw rp(((j-1)*classtep-1,1+sparkfac*hx[j-1],-1))
+ --rp(((j-1)*classtep-1,1+sparkfac*hx[j],-1))
+ --rp((j*classtep-1,1+sparkfac*hx[j],-1));
+ draw rp((-1,(j-1)*classtep-1,1+sparkfac*hy[j-1]))
+ --rp((-1,(j-1)*classtep-1,1+sparkfac*hy[j]))
+ --rp((-1,j*classtep-1,1+sparkfac*hy[j]));
+ draw rp((-1,1+sparkfac*hz[j-1],(j-1)*classtep-1))
+ --rp((-1,1+sparkfac*hz[j],(j-1)*classtep-1))
+ --rp((-1,1+sparkfac*hz[j],j*classtep-1));
+ endfor;
+ doitnow;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/twistflat.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/twistflat.mp
new file mode 100644
index 00000000000..080f3364282
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/twistflat.mp
@@ -0,0 +1,55 @@
+% twistflat.mp
+% L. Nobre G.
+% Y2K
+
+%input featpost3Dplus2D;
+
+
+
+beginfig(1);
+
+ f := 0.7*(1.5,0.3,1.2);
+
+ Spread := 700;
+
+ color gridvec, sizevec, currpos, starpos, bordpos;
+ numeric i, j, k, counter, theta, phi, thetamin,
+ thetamax, thetastp, long, base;
+ sizevec := (11,6,1);
+ gridvec := (0.05,0.1,0.1);
+ thetamin := 55;
+ thetamax := 125;
+ long := 0.08;
+ base := 0.1;
+ thetastp := (thetamax-thetamin)/(X(sizevec)-1);
+ starpos := ( -0.5*X(gridvec)*(X(sizevec)-1) ,
+ -0.5*Y(gridvec)*(Y(sizevec)-1) ,
+ -0.5*Z(gridvec)*(Z(sizevec)-1) );
+ bordpos := starpos - 0.5*gridvec;
+ npf1 := 4;
+ F1p1 := bordpos;
+ F1p2 := (X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p3 := (-X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p4 := (-X(bordpos),Y(bordpos), Z(bordpos));
+ NF := 1;
+ draw facepath(1);
+ counter := 1;
+ for i=1 upto X(sizevec):
+ for j=1 upto Y(sizevec):
+ for k=1 upto Z(sizevec):
+ phi := 90;
+ theta := thetamin+(i-1)*thetastp;
+ currpos := starpos+( (i-1)*X(gridvec) ,
+ (j-1)*Y(gridvec) ,
+ (k-1)*Z(gridvec) );
+ generatedirline( counter, phi, theta, long, currpos );
+ counter := incr(counter);
+ endfor;
+ endfor;
+ endfor;
+ NL := decr(counter);
+ director_invisible( true, base, false );
+endfig;
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/twoholes.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/twoholes.mp
new file mode 100644
index 00000000000..07cf6c31964
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/twoholes.mp
@@ -0,0 +1,31 @@
+% twoholes.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3Dplus2D;
+
+f := 1.5*(0,1.5,1);
+Spread := 100;
+
+beginfig(1);
+ numeric stagelevel, holediam, outerdiam, stagemargin;
+ numeric numberofstagesidesquares, stagesidesize;
+ numeric centercoord;
+ color centerposdisc, centerpostorus;
+ stagelevel = 0.2;
+ holediam = 0.6;
+ stagemargin = 0.2;
+ numberofstagesidesquares = 20;
+ outerdiam = holediam+4*stagelevel;
+ stagesidesize = 2*( outerdiam + stagemargin );
+ centercoord = 0.3535*outerdiam;
+ HoriZon := -stagelevel;
+ centerpostorus = ( centercoord, -centercoord, 0 );
+ centerposdisc = ( -centercoord, centercoord, HoriZon );
+ setthestage( numberofstagesidesquares, stagesidesize );
+ smoothtorus( centerpostorus, blue,
+ 0.5*holediam+stagelevel, stagelevel );
+ rigorousdisc( 0.5*holediam, true, centerposdisc,
+ 0.5*outerdiam, 1.5*stagelevel*blue );
+endfig;
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfection.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfection.mp
new file mode 100644
index 00000000000..0e95bc05451
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfection.mp
@@ -0,0 +1,59 @@
+% unperfection.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+Spread := 70;
+f := (10,4,5);
+
+beginfig(1);
+ numeric i, len, polelen;
+ numeric fws, NumLines, linex, inray, outay, axray;
+ numeric wang, poleray;
+ path aro[], oneline;
+ color axe, pole, polec, aroc;
+ picture floorwall;
+ len := 0.6;
+ wang := 60;
+ axe := (0,cosd(90-wang),sind(90-wang));
+ pole := (0,1,0);
+ fws := 4;
+ polelen := 0.8*fws;
+ outay := 0.45*fws;
+ inray := 0.7*outay;
+ poleray := 0.07*inray;
+ NumLines := 30;
+ for i=0 upto NumLines:
+ linex := fws*(i/NumLines-0.5);
+ oneline := rp((linex,0.5*fws,-0.5*fws))
+ --rp((linex,-0.5*fws,-0.5*fws))
+ --rp((linex,-0.5*fws,0.5*fws));
+ draw oneline withcolor (0.7*background);
+ endfor;
+ aroc := outay*(0,cosd(wang),sind(wang))-0.5*(0,fws,fws);
+ polec := (0,(outay-inray)*cosd(wang)-fws/2,
+ (outay+inray)*sind(wang)-poleray-fws/2);
+ aro1 := goodcirclepath( aroc, axe, inray );
+ aro2 := goodcirclepath( aroc+len*axe, axe, inray );
+ aro3 := buildcycle( aro1, aro2 );
+ floorwall := currentpicture;
+ clip floorwall to aro3;
+ aro4 := spatialhalfcircle( aroc+len*axe, axe, inray, false );
+ aro5 := spatialhalfcircle( aroc+len*axe, axe, outay, false );
+ aro6 := reverse aro5;
+ aro7 := aro4--aro6--cycle;
+ fill aro7 withcolor (0.6*background);
+ rigorousdisc( 0, true, aroc, inray, axe*len );
+ draw floorwall;
+ draw aro3;
+ rigorousdisc( 0, true, polec, poleray, pole*polelen );
+ aro8 := spatialhalfcircle( aroc+len*axe, axe, inray, true );
+ aro9 := spatialhalfcircle( aroc+len*axe, axe, outay, true );
+ aro10 := reverse aro9;
+ aro11 := aro8--aro10--cycle;
+ fill aro11 withcolor (0.6*background);
+ rigorousdisc( 0, false, aroc, outay, axe*len );
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfectionremoved.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfectionremoved.mp
new file mode 100644
index 00000000000..1829b9e7787
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfectionremoved.mp
@@ -0,0 +1,34 @@
+% unperfectionremoved.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+Spread := 70;
+f := (13,4,3);
+
+beginfig(1);
+ numeric i, len;
+ numeric fws, NumLines, linex, inray, outay, axray;
+ numeric wang;
+ path oneline;
+ color axe, aroc;
+ len := 0.6;
+ wang := 60;
+ axe := (0,cosd(90-wang),sind(90-wang));
+ fws := 4;
+ outay := 0.45*fws;
+ inray := 0.7*outay;
+ NumLines := 30;
+ for i=0 upto NumLines:
+ linex := fws*(i/NumLines-0.5);
+ oneline := rp((linex,0.5*fws,-0.5*fws))
+ --rp((linex,-0.5*fws,-0.5*fws))
+ --rp((linex,-0.5*fws,0.5*fws));
+ draw oneline withcolor (0.7*background);
+ endfor;
+ aroc := outay*(0,cosd(wang),sind(wang))-0.5*(0,fws,fws);
+ rigorousdisc( inray, true, aroc, outay, axe*len );
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/vanallenbelt.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/vanallenbelt.mp
new file mode 100644
index 00000000000..83c636ab380
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/vanallenbelt.mp
@@ -0,0 +1,51 @@
+% vanallenbelt.mp
+% L. Nobre G.
+% 2004
+
+% input featpost3Dplus2D;
+
+def magnfield( expr pos ) =
+ begingroup
+ save dist, anga, angb, angp, bv, bh, br, bx, by, bz, fin;
+ numeric dist, anga, angb, bv, bh, br, bx, by, bz;
+ pair angp;
+ color fin;
+ dist = conorm( pos );
+ angp = getanglepair( pos );
+ anga = xpart( angp );
+ angb = ypart( angp );
+ bh = 0.5*cosd( angb )/dist**3;
+ bv = sind( angb )/dist**3;
+ br = bv*cosd( angb ) - bh*sind( angb );
+ bz = bv*sind( angb ) + bh*cosd( angb );
+ bx = br*cosd( anga );
+ by = br*sind( anga );
+ fin = ( bx, by, bz );
+ ( 25*fin )
+ endgroup
+enddef;
+
+def pmf( expr pos ) =
+ (2*red/(((greenpart pos) ++ (bluepart pos))**2))
+enddef;
+
+beginfig(1);
+ color vel;
+ vel = 1.1*(-0.25,0.0,0.1);
+ cartaxes(1,1,1);
+ draw magnetictrajectorypath(200, red, vel, 0.22, magnfield );
+% draw magnetictrajectorypath(400, red,-vel, 0.22, magnfield );
+endfig;
+
+beginfig(2);
+ f := 2*red;
+ Spread := 200;
+ numeric ang;
+ color vel;
+ ang = 145;
+ vel = 0.8*( 0, cosd( ang ), sind( ang ) );
+ draw magnetictrajectorypath(200, green, vel, 0.1, pmf );
+ drawarrow reverse (rp(blue)--rp(black)--rp(green));
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/verygoodcone.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/verygoodcone.mp
new file mode 100644
index 00000000000..8ce59552a21
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/verygoodcone.mp
@@ -0,0 +1,28 @@
+% verygoodcone.mp
+% L. Nobre G.
+% 2003
+
+%input featpost3Dplus2D;
+
+beginfig(1);
+ numeric radiusin, fac, i, numc, stepang, xcoor, ycoor, radc;
+
+ f := (5,0.3,1.5);
+ Spread := 70;
+ radiusin = 0.3;
+ numc = 9;
+ fac = 3;
+ stepang = 360/numc;
+ radc = (fac-1)*radiusin*sind(0.5*stepang);
+
+ for i=0 step stepang until 180:
+ xcoor := -radiusin*cosd(i);
+ ycoor := radiusin*sind(i);
+verygoodcone(true,fac*(xcoor,-ycoor,0),(-xcoor,ycoor,0),radc,(xcoor,-ycoor,0));
+verygoodcone(true,fac*(xcoor,ycoor,0),-(xcoor,ycoor,0),radc,(xcoor,ycoor,0));
+ endfor;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/xraycamera.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/xraycamera.mp
new file mode 100644
index 00000000000..b3f6e51c6de
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/standard/xraycamera.mp
@@ -0,0 +1,117 @@
+% xraycamera.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input featpost3Dplus2D;
+
+verbatimtex
+\documentclass{article}
+\usepackage{beton}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ f := (10,7,8);
+ Spread := 45;
+ numeric w, h, l, d, t, tr, tl, ma, mb, we, ar;
+ w = 3;
+ h = 2;
+ l = 4;
+ d = 0.75;
+ t = 1.2;
+ tr= 0.15;
+ tl= 0.25;
+ ma= 0.3;
+ mb= 0.2;
+ ar= 2;
+ we= 0.6*(h-t);
+ pen thin, thick, aver;
+ thin = pencircle scaled 0.5pt;
+ thick= pencircle scaled 1.5pt;
+ aver = pencircle scaled 1.0pt;
+ ahlength:=2mm;
+ ahangle:=30;
+ color p[];
+ p1 = (0,w/2,-ma-mb);
+ p2 = (0,w/2,-ma);
+ p3 = (0,w/2,0);
+ p4 = (0,w/2,h);
+ p5 = (0,-w/2,-ma-mb);
+ p6 = (0,-w/2,-ma);
+ p7 = (0,-w/2,0);
+ p8 = (0,-w/2,h);
+ p9 = (0,-w/2-ma-mb,0);
+ p10= (0,-w/2-ma,0);
+ p11= (0,-w/2-ma-mb,h);
+ p12= (0,-w/2-ma,h);
+ p13= (-l,-w/2-ma-mb,h);
+ p14= (-l,-w/2-ma,h);
+ p15= (-l,-w/2,h);
+ p16= (-l,-w/2,0);
+ p17= (-l,w/2,0);
+ p18= (-l,w/2,h);
+ p19= (-l+d,0,0);
+ p20= (-l+d,0,t);
+ p21= (-l-ma,0,t);
+ p22= (-l-ma-mb,0,t);
+ p23= (-l-ma,0,0);
+ p24= (-l-ma-mb,0,0);
+ p25= (-l+d,w/2+ma,0);
+ p26= (-l+d,w/2+ma+mb,0);
+ p27= (-l,w/2+ma,0);
+ p28= (-l,w/2+ma+mb,0);
+ p29= 0.5[p2,p6];
+ p30= 0.5[p10,p12];
+ p31= 0.5[p12,p14];
+ p32= 0.5[p21,p23];
+ p33= 0.5[p25,p27];
+ p34= (0,0,h);
+ p35= (0,0,2*t-h);
+ drawoptions( withpen thick );
+ draw rp(p8)--rp(p4)--rp(p3)--rp(p7)--rp(p8)--rp(p15)--rp(p16);
+ draw rp(p15)--rp(p18)--rp(p17)--rp(p3)--rp(p4)--rp(p18);
+ path pat[];
+ pat1 = rp(p8)--rp(p4);
+ pat2 = rp(p7)--rp(p16)--rp(p17);
+ pat3 = rp(p4)--rp(p18);
+ pat4 = pat2 cutbefore pat1 cutafter pat3;
+ draw pat4;
+ drawoptions( withpen thin );
+ drawdblarrow rp(p2)--rp(p6);
+ drawdblarrow rp(p10)--rp(p12);
+ drawdblarrow rp(p14)--rp(p12);
+ drawdblarrow rp(p21)--rp(p23);
+ drawdblarrow rp(p25)--rp(p27);
+ draw rp(p1)--rp(p3);
+ draw rp(p5)--rp(p7);
+ draw rp(p7)--rp(p9);
+ draw rp(p8)--rp(p11);
+ draw rp(p13)--rp(p15);
+ draw rp(p20)--rp(p22);
+ draw rp(p19)--rp(p24);
+ draw rp(p17)--rp(p28);
+ draw rp(p19)--rp(p26);
+ drawoptions( withpen thick );
+ rigorousdisc( 0, true, p20, tr, (-tl,0,0) );
+ draw rp(p19)--rp(p20) withpen thin;
+ drawoptions( withpen aver );
+ draw rp(p34)--rp(p20)--rp(p35);
+ fill ellipticpath( (0,0,t), (h-t)*blue, we*green ) withcolor 0.5white;
+ draw pat2 dashed evenly withpen thick;
+ draw rp(p20)--rp(p35)--rp(p34) dashed evenly;
+ draw rp((0,0,t)-we*green)--rp((0,0,t)+we*green) dashed evenly;
+ angline( p34, p35, p20, ar, btex $\alpha$ etex, llft );
+ label.bot(btex $w$ etex, rp(p29));
+ label.lft(btex $h$ etex, rp(p30));
+ label.top(btex $l$ etex, rp(p31));
+ label.lft(btex $t$ etex, rp(p32));
+ label.rt(btex $d$ etex, rp(p33));
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/cone.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/cone.mp
new file mode 100644
index 00000000000..883f01ff625
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/cone.mp
@@ -0,0 +1,37 @@
+% cone.mp
+% L. Nobre G.
+% 2004
+
+verbatimtex \documentclass{article}\begin{document}{\sffamily etex
+
+beginfig(1);
+ f := (5,3,4);
+ numeric labscal;
+ picture labr, labc, laba, labv;
+ labscal = 2;
+ ahlength := 8pt;
+ ahangle := 30;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ laba = btex $\vec{A}$ etex scaled labscal;
+ labr = btex $R$ etex scaled labscal;
+ labv = btex $\vec{v}$ etex scaled labscal;
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ verygoodcone(true,black,blue,0.8,blue+green);
+ drawoptions( withpen pencircle scaled 1.3pt );
+ draw rp(black)--rp(green)--rp(blue+green) dashed evenly;
+ drawdblarrow rp(black)--rp(0.8green);
+ label.urt( labr, rp(0.4green) );
+ drawarrow rp(black)--rp(0.45*blue);
+ label.rt( laba, rp((0,0,0.25)) );
+ dotlabel.llft( labc, rp(black) );
+ dotlabel.rt( labv, rp(blue+green) );
+
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/ellipticprism.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/ellipticprism.mp
new file mode 100644
index 00000000000..6106c980adf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/ellipticprism.mp
@@ -0,0 +1,39 @@
+% ellipticprism.mp
+% L. Nobre G.
+% 2004
+
+verbatimtex \documentclass{article}\begin{document}{\sffamily etex
+
+beginfig(1);
+ f := (5,3,4);
+ numeric labscal;
+ picture labsa, labba, labsb, labd, labc;
+ labscal = 2;
+ ahlength := 8pt;
+ ahangle := 30;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ labsa = btex $\vec{S}_1$ etex scaled labscal;
+ labsb = btex $\vec{S}_2$ etex scaled labscal;
+ labba = btex $\vec{B}_1$ etex scaled labscal;
+ labd= btex $D$ etex scaled labscal;
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ whatisthis( black, 0.5red, green, 0.85, 0.8 );
+ drawoptions( withpen pencircle scaled 1.3pt );
+ drawdblarrow rp(black)--rp(0.85blue);
+ label.rt( labd, rp(0.4blue) );
+ drawarrow rp(black)--rp(0.5red);
+ label.ulft( labsa, rp(0.25red) );
+ drawarrow rp(black)--rp(green);
+ label.top( labba, rp((0,0.5,0)) );
+ drawarrow rp(0.85blue)--rp(0.8*0.5*red+0.85blue);
+ label.ulft( labsb, rp(0.2red+0.85blue) );
+ dotlabel.bot( labc, rp(black) );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/intersection2D.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/intersection2D.mp
new file mode 100644
index 00000000000..d482fde6ed0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/intersection2D.mp
@@ -0,0 +1,46 @@
+% intersection2D.mp
+% L. Nobre G.
+% 2004
+
+verbatimtex \documentclass{article}\begin{document}{\sffamily etex
+
+beginfig(1);
+ numeric u;
+ pair Aa, Ab, Ba, Bb, Un, Kn, Or;
+ pen dotpen, penpen;
+ color knowncolour, notknowncol;
+ picture kn, un;
+ u = 4mm;
+ Aa = (0,8u);
+ Ab = (15u,0);
+ Ba = (12u,0.5u);
+ Bb = (13u,6u);
+ Kn = (0,1u);
+ Or = (1.5u,1.5u);
+ dotpen = pencircle scaled 0.5u;
+ penpen = pencircle scaled 0.2u;
+ knowncolour = blue;
+ notknowncol = red;
+ kn = btex given etex;
+ un = btex unknown etex;
+ draw Aa--Ab;
+ draw Ba--Bb;
+ drawoptions( withpen dotpen withcolor knowncolour );
+ draw Aa;
+ draw Ab;
+ draw Ba;
+ draw Bb;
+ draw Kn+Or;
+ drawoptions( withpen dotpen withcolor notknowncol );
+ Un = whatever[Aa,Ab];
+ Un = whatever[Ba,Bb];
+ draw Un;
+ draw Or;
+ drawoptions();
+ label.rt( kn, Kn+Or );
+ label.rt( un, Or );
+endfig;
+
+verbatimtex }\end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/kindofcube.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/kindofcube.mp
new file mode 100644
index 00000000000..c29d727bd61
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/kindofcube.mp
@@ -0,0 +1,57 @@
+% kindofcube.mp
+% L. Nobre G.
+% 2004
+
+verbatimtex \documentclass{article}\begin{document}{\sffamily etex
+
+beginfig(1);
+ f := (4,1.2,0.5);
+ Spread := 120;
+ numeric lena, lenb, lenc, aa, ab, ac, angray, micr, labscal;
+ pair zeror;
+ color axa, axb, axc, returnedcorner, dummyc, auxx, auxy;
+ lena=0.3;
+ lenb=0.6;
+ lenc=0.9;
+ aa=130;
+ ab=32;
+ ac=67;
+ labscal=1.6;
+ angray=0.85;
+ micr=0.01;
+ zeror=rp(black);
+ cartaxes(1.2,1,1.15);
+ axa = ( cosd(aa), sind(aa), 0 );
+ axb = axa*cosd(ab)+blue*sind(ab);
+ auxx= ( cosd(aa+90), sind(aa+90), 0);
+ auxy = ncrossprod( axb, auxx );
+ axc = auxx*cosd(ac)+auxy*sind(ac);
+ draw zeror--rp(axa);
+ draw zeror--rp(axb);
+ draw zeror--rp(-0.6*axa);
+ draw zeror--rp(axc);
+ draw zeror--rp(auxx);
+ label.rt( btex $a$ etex scaled labscal, rp(axa) );
+ label.rt( btex $b$ etex scaled labscal, rp(axb) );
+ label.lft( btex $c$ etex scaled labscal, rp(auxx) );
+ label.lft( btex $d$ etex scaled labscal, rp(axc) );
+ angline( axa,red,black,angray,btex $\alpha_1$ etex scaled labscal,bot );
+ angline( axb,axa,black,angray,btex $\alpha_2$ etex scaled labscal,rt );
+ angline( axc,auxx,black,angray,btex $\alpha_3$ etex scaled labscal,lft );
+ squareangline( -axa,auxx,black,0.2);
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ kindofcube( false, true, black, aa, ab, ac, lena, lenb, lenc );
+ drawoptions();
+ dotlabel.bot( btex $\vec{o}$ etex scaled labscal, zeror );
+ label.bot( btex $l_1$ etex scaled labscal, rp(lena*axb) );
+ label.bot( btex $l_2$ etex scaled labscal, rp(0.5*lenb*axc) );
+ label.ulft( btex $l_3$ etex scaled labscal,rp(0.5*lenc*ncrossprod(axb,axc)));
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/newexperimental.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/newexperimental.mp
new file mode 100644
index 00000000000..bfacd32ae1f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/newexperimental.mp
@@ -0,0 +1,157 @@
+% newexperimental.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3D;
+%input featpost2D;
+
+%verbatimtex
+%\documentclass{article}
+%\usepackage{beton}
+%\usepackage{concmath}
+%\usepackage{ccfonts}
+%\begin{document}
+%etex
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+f := (4.5,-6,5);
+%f := (-4.5,-6,5);
+
+beginfig(1);
+ numeric len[], ray[];
+ color axe[], pos[], fix[], lab[];
+ color reflabpos, reflabpoi, lincolor;
+ picture txt[], dashpatt;
+ numeric inclang, aberang, sampang, stepang;
+ numeric squside, sqlevel, ul, outermagpos;
+ numeric innerray, polesep, fracone, fracsam;
+ numeric labelscale;
+ path tmpath, aupath, copath;
+
+ pickup pencircle scaled 1.2pt;
+ dashpatt = evenly scaled 3;
+ inclang = 150;
+ aberang = 17;
+ sampang = 30;
+ stepang = 20;
+ ul = 0.1;
+ labelscale = 5;
+ outermagpos = 30ul;
+ squside = outermagpos;
+ sqlevel = -20ul;
+ polesep = 15ul;
+ fracone = 0.33;
+ fracsam = 0.86;
+ ray1 = 10ul;
+ ray2 = 6ul;
+ ray3 = 8ul;
+ ray4 = 1.5ul;
+ ray5 = 4ul;
+ ray6 = 3ul;
+ ray7 = 3.5ul;
+ ray8 = 2ul;
+ len3 = 7ul;
+ len4 = 20ul;
+ len5 = 3ul;
+ len7 = 3.5ul;
+ len8 = 7ul;
+ lincolor = 0.5background;
+
+ reflabpos = ( -squside, 0, -sqlevel );
+ reflabpoi = ( -squside, squside, -sqlevel );
+ V1 := (squside,squside,-sqlevel);
+ V2 := (-squside,squside,-sqlevel);
+ V3 := (-squside,-squside,-sqlevel);
+ V4 := (squside,-squside,-sqlevel);
+% makeface1(1,2,3,4);
+% draw_all_test( false );
+
+ len1 = (1-fracone)*(outermagpos-ray5-polesep);
+ pos1 = (-outermagpos,0,0);
+ len2 = fracone*(outermagpos-ray5-polesep);
+ pos2 = (len1-outermagpos,0,0);
+ lab2 = reflabpos;
+ txt2 = thelabel.top( btex magnet etex scaled labelscale, rp( lab2 ) );
+ fix2 = (-outermagpos+0.5len1,0,ray1);
+ axe3 = ( 0, cosd( inclang ), sind( inclang ) );
+ pos3 = -( len3 + len4 + len5 )*axe3;
+ lab3 = (1-fracone)*reflabpoi+fracone*V1;
+ txt3 = thelabel.rt( btex rotor etex scaled labelscale, rp( lab3 ) );
+ axe4 = axe3;
+ pos4 = -( len4 + len5 )*axe4;
+ fix3 = pos4+fracsam*ray3*(0,cosd( inclang -90 ),sind( inclang -90 ));
+ axe5 = axe3;
+ pos5 = -( len5 )*axe5;
+ lab5 = (1-fracone)*reflabpoi+fracone*V2;
+ txt5 = thelabel.rt( btex sample etex scaled labelscale, rp(lab5) );
+ fix5 = fracsam*ray5*(0,cosd( inclang -90 ),sind( inclang -90 ));
+
+ V5 := fracsam*ray5*( sind( sampang ),
+ cosd( sampang )*cosd( inclang -90 ),
+ cosd( sampang )*sind( inclang -90 ) );
+ V6 := fracsam*ray5*( -sind( sampang ),
+ cosd( sampang )*cosd( inclang -90 ),
+ cosd( sampang )*sind( inclang -90 ) );
+ V8 := fracsam*ray5*( sind( sampang ),
+ -cosd( sampang )*cosd( inclang -90 ),
+ -cosd( sampang )*sind( inclang -90 ) );
+ V7 := fracsam*ray5*( -sind( sampang ),
+ -cosd( sampang )*cosd( inclang -90 ),
+ -cosd( sampang )*sind( inclang -90 ) );
+ axe6 = ( 0, cosd( inclang+aberang ), sind( inclang+aberang ) );
+ pos6 = ray1*axe6;
+ len6 = len4;
+ axe7 = ( 0, cosd( inclang-aberang ), sind( inclang-aberang ) );
+ pos7 = ( ray1 + 0.5len6 )*axe7;
+ lab6 = fracone*reflabpos+(1-fracone)*V3;
+ txt6=thelabel.lft(btex camera etex scaled labelscale,rp(lab6));
+ fix6 = pos6+len6*axe6;
+ pos8 = pos7+len7*axe7;
+ axe8 = axe7;
+ lab8 = (1-fracone)*reflabpos+fracone*V3;
+ txt8 = thelabel.lft( btex lamp etex scaled labelscale, rp( lab8 ) );
+ fix8 = pos8+len8*axe8;
+ len9 = len2;
+ pos9 = (ray5+polesep,0,0);
+ ray9 = ray2;
+ ray10 = ray1;
+ pos10 = pos9+len9*(1,0,0);
+ len10 = len1;
+
+ getready( "rigorousdisc( 0, true, pos1, ray1, len1*(1,0,0) )", pos1 );
+ getready( "whatisthis(pos2,ray1*green,ray1*blue,conorm((-ray5-polesep,0,0)-pos2),ray2/ray1)", pos2 );
+ getready( "rigorousdisc( 0, true, pos3, ray3, len3*axe3 )", pos3 );
+ getready( "rigorousdisc( 0, true, pos4, ray4, len4*axe4 )", pos4 );
+ getready( "rigorousdisc( 0, true, pos5, ray5, len5*axe5 )", pos5 );
+ getready( "draw rp(V5)--rp(V6)--rp(V7)--rp(V8)--cycle", black );
+ getready( "draw rp(pos6)--rp((0,0,0))--rp(pos7) dashed dashpatt",0.5*pos6);
+ getready( "rigorousdisc( 0, true, pos6, ray6, len6*axe6 )", pos6 );
+ getready( "whatisthis(pos7,ray7*red,-ray7*ncrossprod(red,axe7),conorm(pos8-pos7),ray8/ray7)", pos7 );
+ getready( "rigorousdisc( 0, true, pos8, ray8, len8*axe8 );", pos8 );
+ getready( "whatisthis(pos9,ray9*green,ray9*blue,conorm(pos10-pos9),ray10/ray9)", pos9 );
+ getready( "rigorousdisc( 0, true, pos10, ray10, len10*(1,0,0) )", pos10 );
+ doitnow;
+ draw llcorner txt2--lrcorner txt2--rp(fix2) withcolor lincolor;
+ draw lrcorner txt3--llcorner txt3--rp(fix3) withcolor lincolor;
+ draw lrcorner txt5--llcorner txt5--rp(fix5) withcolor lincolor;
+ draw llcorner txt6--lrcorner txt6--rp(fix6) withcolor lincolor;
+ draw llcorner txt8--lrcorner txt8--rp(fix8) withcolor lincolor;
+ draw txt2;
+ draw txt3;
+ draw txt5;
+ draw txt6;
+ draw txt8;
+
+ produce_auto_scale;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/perspec.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/perspec.mp
new file mode 100644
index 00000000000..09efea9ab2f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/perspec.mp
@@ -0,0 +1,77 @@
+% perspec.mp
+% L. Nobre G.
+% 2004
+
+%input featpost3D;
+%input featpost2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+f := (4,2,2.5);
+Spread := 45;
+
+verbatimtex \documentclass{article} \begin{document} etex
+
+color psdf, psdu, psdv, rll, rlr, rur, rul, pll, plr, pur, pul;
+color pc;
+numeric projecplanesize, sizefraction, positfraction, aspectratio, rectsize;
+pen realpen, lightpen, projpen, dotpen;
+path projecplanepath, realpath;
+psdf = 3.1*(0,1,0.37);
+projecplanesize = 1.7;
+sizefraction = 0.19;
+positfraction = 0.65;
+aspectratio = 1.0;
+rectsize = 0.15;
+realpen = pencircle scaled 2.6pt;
+lightpen = pencircle scaled 0.55pt;
+projpen = pencircle scaled 1.8pt;
+dotpen = pencircle scaled 3.8pt;
+psdv = N( (-Y(psdf), X(psdf), 0) );
+psdu = ncrossprod( psdf, psdv );
+pll = projecplanesize*(-aspectratio*psdv-psdu);
+plr = projecplanesize*(+aspectratio*psdv-psdu);
+pur = projecplanesize*(+aspectratio*psdv+psdu);
+pul = projecplanesize*(-aspectratio*psdv+psdu);
+projecplanepath = rp(pll)--rp(plr)--rp(pur)--rp(pul)--cycle;
+pc = positfraction*psdf;
+rll = pc+sizefraction*projecplanesize*(-psdv-psdu);
+rlr = pc+sizefraction*projecplanesize*(+psdv-psdu);
+rur = pc+sizefraction*projecplanesize*(+psdv+psdu);
+rul = pc+sizefraction*projecplanesize*(-psdv+psdu);
+realpath = rp(rll)--rp(rlr)--rp(rur)--rp(rul)--cycle;
+
+beginfig(1);
+ draw projecplanepath withpen realpen;
+ draw realpath withpen realpen;
+ draw rp(psdf) withpen lightpen;
+ drawoptions( withpen lightpen );
+ squareangline( psdf, psdv, black, rectsize );
+ squareangline( psdf, psdu, black, rectsize );
+ drawoptions();
+ pair prll, prlr, prur, prul;
+ LightSource:=psdf;
+ prll = rp(projectpoint(black,rll));
+ prlr = rp(projectpoint(black,rlr));
+ prur = rp(projectpoint(black,rur));
+ prul = rp(projectpoint(black,rul));
+ path projpath;
+ projpath = prll--prlr--prur--prul--cycle;
+ draw projpath withpen projpen;
+ draw prll--rp(psdf) withpen lightpen;
+ draw prlr--rp(psdf) withpen lightpen;
+ draw prur--rp(psdf) withpen lightpen;
+ draw prul--rp(psdf) withpen lightpen;
+ draw rp(black)--rp(psdf) withpen lightpen;
+ draw rp(black) withpen dotpen;
+ draw rp(psdf) withpen dotpen;
+ label.rt( btex \texttt{f} etex, rp(psdf) );
+ label.bot( btex \texttt{viewcentr} etex, rp(black) );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end; \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/planintersection.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/planintersection.mp
new file mode 100644
index 00000000000..a3ab18237c4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/planintersection.mp
@@ -0,0 +1,105 @@
+% planintersection.mp
+% L. Nobre G.
+% 2004
+
+verbatimtex \documentclass{article}\begin{document}{\sffamily etex
+
+beginfig(1);
+ f := 0.5*(10,14,5.5);
+ color a, x, b, c, D, y, w, g, h;
+ color auxa, auxb, auxc, auxd, auxe, auxf;
+ pair appear;
+ numeric wid, hei, alfa, beta, forw, back, labscal;
+ pen thedotpen, borderpen, normalpen;
+ picture dasha, dashb, labx, laba, labb, labc, labD;
+ path outerb, innerb, apath, bpath;
+ wid = 1.5;
+ hei = 1;
+ forw = 1.5;
+ back = 1.5;
+ alfa = -10;
+ beta = -30;
+ labscal = 2.8;
+ labeloffset := 8pt;
+ ahangle := 30;
+ ahlength := 10pt;
+ a = ( 0.7*forw, 0.15*wid, 0.3*hei );
+ b = ( -0.7*back, 0.5*wid, 0.8*hei );
+ c = ( 0, 0.7*wid, 0.5*hei );
+ D = ( cosd( alfa )*cosd( beta ), sind( alfa )*cosd( beta ), sind( beta ) );
+ labx = btex $\vec{x}$ etex scaled labscal;
+ laba = btex $\vec{a}$ etex scaled labscal;
+ labb = btex $\vec{b}$ etex scaled labscal;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ labD = btex $\vec{D}$ etex scaled labscal;
+ thedotpen = pencircle scaled 4pt;
+ borderpen = pencircle scaled 2pt;
+ normalpen = pencircle scaled 1.5pt;
+ dasha = evenly scaled 2;
+% dashb = dashpattern( on 7pt off 5pt on 7pt );
+ dashb = withdots;
+ apath = rp((X(a),Y(a),0))--rp(a)--rp((X(a),0,Z(a)));
+ bpath = rp((X(b),Y(b),0))--rp(b)--rp((X(b),0,Z(b)));
+ auxa = ( forw, 0, 0 );
+ auxb = ( forw, 0, hei );
+ auxc = ( -back, 0, hei );
+ auxd = ( -back, 0, 0 );
+ auxe = ( -back, wid, 0 );
+ auxf = ( forw, wid, 0 );
+ outerb = rp(auxa)--rp(auxb)--rp(auxc)--rp(auxd)--rp(auxe)--rp(auxf)--cycle;
+ draw outerb withpen borderpen;
+ draw rp(auxa)--rp(auxd) withpen borderpen;
+
+ draw bpath dashed dasha withpen normalpen;
+ draw rp(b) withpen thedotpen;
+ label.top( labb, rp(b) );
+
+ draw rp(a)--rp(b) withpen normalpen;
+
+ cdotprod( y-c, D ) = 0;
+ cdotprod( y-black, green ) = 0;
+ cdotprod( y-black, blue ) = 0;
+
+ cdotprod( w-c, D ) = 0;
+ cdotprod( w-black, green ) = 0;
+ cdotprod( w-hei*blue, blue ) = 0;
+
+ cdotprod( g-c, D ) = 0;
+ cdotprod( g-wid*green, green ) = 0;
+ cdotprod( g-hei*blue, blue ) = 0;
+
+ cdotprod( h-c, D ) = 0;
+ cdotprod( h-wid*green, green ) = 0;
+ cdotprod( h-black, blue ) = 0;
+
+ innerb = rp(y)--rp(w)--rp(g)--rp(h)--cycle;
+ unfill innerb;
+ draw innerb withpen borderpen;
+
+ draw apath dashed dasha withpen normalpen;
+ draw rp(a) withpen thedotpen;
+ label.top( laba, rp(a) );
+
+ x = whatever[a,b];
+ cdotprod( x-c, D ) = 0;
+ draw rp(x) withpen thedotpen;
+ label.top( labx, rp(x) );
+
+ draw rp(a)--rp(x) withpen normalpen;
+ draw rp(x)--rp(b) withpen normalpen dashed dashb;
+
+ draw rp(c) withpen thedotpen;
+ drawarrow rp(c)--rp(c+0.7*D) withpen borderpen;
+ label.top( labc, rp(c) );
+
+ label.bot( labD, rp(c+0.5*D) );
+
+ draw rp(x)--rp(c) dashed dasha withpen normalpen;
+ drawoptions( withpen normalpen );
+ squareangline( x, c+D, c, 0.08*wid );
+
+endfig;
+
+verbatimtex }\end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/revolvers.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/revolvers.mp
new file mode 100644
index 00000000000..41fd7a9c4e2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/revolvers.mp
@@ -0,0 +1,112 @@
+% revolvers.mp
+% L. Nobre G.
+% 2004
+
+verbatimtex \documentclass{article}\begin{document}{\sffamily etex
+
+def posang( expr Angul ) =
+ rp( green*cosd( Angul ) + blue*sind( Angul ) )
+enddef;
+
+beginfig(1);
+ f := (3,5,4);
+ numeric labscal;
+ picture labr, labc, laba, labum, labdo, labtr, labqu, labci;
+ labscal = 2;
+ ahlength := 8pt;
+ ahangle := 30;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ laba = btex $\vec{A}$ etex scaled labscal;
+ labr = btex $R$ etex scaled labscal;
+ labum= btex 1 etex scaled labscal;
+ labdo= btex 2 etex scaled labscal;
+ labtr= btex 3 etex scaled labscal;
+ labqu= btex 4 etex scaled labscal;
+ labci= btex 5 etex scaled labscal;
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ tropicalglobe( 5, black, 1, blue );
+ drawoptions( withpen pencircle scaled 1.3pt );
+ drawdblarrow rp(black)--rp(red);
+ label.top( labr, rp((0.5,0,0)) );
+ drawarrow rp(black)--rp(blue);
+ label.rt( laba, rp((0,0,0.5)) );
+ dotlabel.lrt( labc, rp(black) );
+ dotlabel.rt( labum, posang(-72) );
+ dotlabel.top( labdo, posang(-36) );
+ dotlabel.top( labtr, posang(0) );
+ dotlabel.top( labqu, posang(36) );
+ dotlabel.top( labci, posang(72) );
+endfig;
+
+beginfig(2);
+ f := (3,5,5.7);
+ numeric labscal;
+ picture labri, labc, laba, labro;
+ labscal = 2;
+ ahlength := 8pt;
+ ahangle := 30;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ laba = btex $\vec{A}$ etex scaled labscal;
+ labri= btex $R_i$ etex scaled labscal;
+ labro= btex $R_o$ etex scaled labscal;
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ rigorousdisc( 0.5, true, black, 1, 0.85*blue );
+ drawoptions( withpen pencircle scaled 1.3pt );
+ drawdblarrow rp(black)--rp(red);
+ label.lrt( labro, rp(0.5*red) );
+ drawdblarrow rp(black+0.85*blue)--rp(0.5*green+0.85*blue);
+ label.urt( labri, rp(0.25*green+0.85*blue) );
+ drawarrow rp(black)--rp(0.85*blue);
+ label.ulft( laba, rp((0,0,0.5)) );
+ dotlabel.rt( labc, rp(black) );
+endfig;
+
+beginfig(3);
+ f := (3,2.05,2.65);
+ numeric labscal, bray, sray;
+ picture labrb, labc, laba, labrs;
+ labscal = 2;
+ ahlength := 8pt;
+ ahangle := 30;
+ bray = 0.7;
+ sray = 0.4;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ laba = btex $\vec{A}$ etex scaled labscal;
+ labrb= btex $R_b$ etex scaled labscal;
+ labrs= btex $R_s$ etex scaled labscal;
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ smoothtorus( black, blue, bray, sray );
+ drawoptions( withpen pencircle scaled 1.3pt );
+ draw goodcirclepath( bray*red, green, sray ) dashed evenly;
+ drawdblarrow rp(black)--rp(bray*red);
+ label.ulft( labrb, rp(0.5*bray*red) );
+ drawdblarrow rp(bray*red+sray*blue)--rp(bray*red);
+ label.llft( labrs, rp(bray*red+0.5*sray*blue) );
+ drawarrow rp(black)--rp(sray*blue);
+ label.rt( laba, rp((0,0,0.5*sray)) );
+ dotlabel.lrt( labc, rp(black) );
+endfig;
+
+beginfig(4);
+ f := (3,5,4);
+ numeric labscal;
+ picture labr, labc, laba;
+ labscal = 2;
+ ahlength := 8pt;
+ ahangle := 30;
+ labc = btex $\vec{c}$ etex scaled labscal;
+ laba = btex $\vec{A}$ etex scaled labscal;
+ labr = btex $R$ etex scaled labscal;
+ drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue );
+ spatialhalfsfear( black, blue, 1 );
+ drawoptions( withpen pencircle scaled 1.3pt );
+ drawdblarrow rp(black)--rp(red);
+ label.ulft( labr, rp(0.5*red) );
+ drawarrow rp(black)--rp(0.4*blue);
+ label.rt( laba, rp((0,0,0.2)) );
+ dotlabel.lrt( labc, rp(black) );
+endfig;
+
+verbatimtex }\end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/tangency2D.mp b/Master/texmf-dist/doc/metapost/featpost/example/tug04/tangency2D.mp
new file mode 100644
index 00000000000..8682c43bc0d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tug04/tangency2D.mp
@@ -0,0 +1,56 @@
+% intersection2D.mp
+% L. Nobre G.
+% 2004
+
+verbatimtex \documentclass{article}\begin{document}{\sffamily etex
+
+beginfig(1);
+ numeric u, r, d;
+ pair Aa, Ab, Ba, Bb, Ca, Cb, Da, Db, Ea, Eb, Or, Kn;
+ pen dotpen, penpen;
+ color knowncolour, notknowncol;
+ picture kn, un, rl;
+ u = 4mm;
+ Aa = (5u,4u);
+ Ab = (3u,2u);
+ Ba = (13u,5u);
+ Bb = 0.5[Aa,Ab];
+ r = abs( Aa - Ab );
+ d = abs( Aa - Ba ) +-+ r;
+ Ea = radialcross( Aa, r, Ba, d, true );
+ Eb = radialcross( Aa, r, Ba, d, false );
+ Ca = 1.4[Ba,Ea];
+ Cb = 1.15[Ea,Ba];
+ Da = 1.5[Ba,Eb];
+ Db = 1.1[Eb,Ba];
+ Kn = (0,1u);
+ Or = (10u,1u);
+ dotpen = pencircle scaled 0.5u;
+ penpen = pencircle scaled 0.2u;
+ knowncolour = blue;
+ notknowncol = red;
+ kn = btex given etex;
+ un = btex unknown etex;
+ rl = btex $R$ etex;
+ draw fullcircle scaled 2r shifted Aa;
+ draw Ca--Cb;
+ draw Da--Db dashed evenly;
+ drawarrow Aa--Ab;
+ drawoptions( withpen dotpen withcolor knowncolour );
+ draw Aa;
+ draw Ba;
+ draw Kn+Or;
+ drawoptions( withcolor knowncolour );
+ label.ulft( rl, Bb );
+ drawoptions( withpen dotpen withcolor notknowncol );
+ draw Ea;
+ draw Eb;
+ draw Or;
+ drawoptions();
+ label.rt( kn, Kn+Or );
+ label.rt( un, Or );
+endfig;
+
+verbatimtex }\end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.rc b/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.rc
new file mode 100644
index 00000000000..c73971b5950
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.rc
@@ -0,0 +1,75 @@
+########################################################################
+# #
+# This is the configuration file for Galrey #
+# every line beginning with '#' will be discarded (they are comments) #
+# Carefully read every comment before each parameter #
+# ##########
+# Copyright 2001, Claudio Cicali # Galrey #
+# # 0.5 #
+#################################################################################
+
+# TITLE: used as the html <title> ad as ashort description at the bottom of the html files
+# default: "My Galrey pictures collection"
+title = FeatPost Example Collection
+
+# PATTERN: only the files that match this patters are processed
+# default: "*.jpg"
+pattern=*.png
+
+# THUMBSIZE: desidered size XxY of the generated thumbnails
+# default: 80x60 (this is scaled based upon a 640x480 full size)
+thumbsize=140x140
+
+# THUMBPREFIX: desidered prefix of the thumbnails filename
+# default: "t_"
+thumbprefix=t_
+
+# THUMBSPERROW: how many thumbnails in each row of the index file
+# default: 5
+thumbsperrow=6
+
+# INDEX: name of the (generated) index file. Used also in the html file
+# default: "index.html"
+# index=galreyindex.html
+
+# GENERATEDEXT: the extension the generated html files will have
+# Galrey will generate an html file for each image in the
+# collection. This is the extension they will have
+# default: html
+generatedext=html
+
+# IMAGESPATH: the directory where the images reside (do not add the final '/')
+# default: "."
+imagespath=../galreyimages
+
+# OUTPUTPATH: the directory where the generated file will be placed
+# default: "."
+outputpath=../galreyimages
+
+# TEMPLATE: the name and location of the template file to use
+# default: "./galrey.tpl"
+template=galrey.tpl
+
+# SHOWINFO: this enables (or disable) the visualization of some image informations.
+# This information will be displayed under each images thumbnail in
+# the form : [width x height] imagesize
+# default: yes
+showinfo=no
+
+# MEMOFILE: if set, galrey will read a description for each image from the
+# specified file and will put it into the relative html file in
+# corrispondence of the $DESCRIPTION$ special tag.
+# The file must be builded respecting the following syntax:
+# for each image, add a line containing the imagename, a space, and a description
+# (as long as you like)
+# Example (an entry for an image called garden.jpg):
+# garden.jpg My beautiful garden full of flowers !
+#
+# Note: you can build a file in this way, simply running the following
+# command in the dir containing your images:
+# ls *.jpg > galrey.nfo
+# Than edit the galrey.nfo adding the comments on the right of each image listed
+# The list sorting order is not relevant
+# default: not set
+memofile=galrey.memo
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.sh b/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.sh
new file mode 100644
index 00000000000..0cfee78ddce
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.sh
@@ -0,0 +1,6 @@
+ls ../galreyimages/ > ./galrey.ls
+dog -b ./galrey.ls > galrey.nms
+sed -e 's/.png//' galrey.nms > galrey.fn
+join -o 1.2,2.2 galrey.nms galrey.fn > galrey.memo
+galrey
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.tpl b/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.tpl
new file mode 100644
index 00000000000..df414141291
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/galrey/galrey.tpl
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>$TITLE$</title>
+<style type="text/css">
+<!--
+.title {color: #CCCC00; font-family: Verdana, Arial; font-size: 16pt; font-weight: bold}
+.counter {color: #ffffcc; font-family: Verdana, Arial; font-size: 11pt; font-weight: bold}
+.nav {color: #CC9900; font-family: Verdana, Arial; font-size: 14pt; font-weight: normal; text-decoration: none}
+.nav:Hover {color: #CCCC00; font-family: Verdana, Arial; font-size: 14pt; font-weight: normal; text-decoration: underline}
+.memo {color: #ffffcc; font-family: Verdana, Arial; font-size: 10pt; font-weight: normal}
+-->
+</style>
+</head>
+
+<body bgcolor="#330066">
+<div align="center">
+<table cellpadding="0" cellspacing="0" width="600">
+<tr>
+<td>
+<a class="nav" href="$FIRST$">|&lt;</a>&nbsp;&nbsp;
+<a class="nav" href="$PREVIOUS$">&lt;&lt;</a>&nbsp;&nbsp;
+<a class="nav" href="$INDEX$">O</a>&nbsp;&nbsp;
+<a class="nav" href="$NEXT$">&gt;&gt;</a>&nbsp;&nbsp;
+<a class="nav" href="$LAST$">&gt;|</a>
+</td>
+<td>
+<div class="counter">$ID$/$TOTAL$</div>
+</td>
+<td align="right"><div class="title"><b>$TITLE$</b></div></td>
+</tr>
+</table>
+<br>
+<table cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
+<tr><td><img alt="imagefile: $CURRENT$" WIDTH="$WIDTH$" HEIGHT="$HEIGHT$" border="0" src="../galreyimages/$CURRENT$"></td></tr>
+</table>
+</div>
+<br>
+<div class="memo" align="center">$DESCRIPTION$</div>
+</body>
+</html>
diff --git a/Master/texmf-dist/doc/metapost/featpost/jpeg/cbxSmall.jpg b/Master/texmf-dist/doc/metapost/featpost/jpeg/cbxSmall.jpg
new file mode 100644
index 00000000000..d7291c3fbeb
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/jpeg/cbxSmall.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/jpeg/hiddenlinegraph1.jpg b/Master/texmf-dist/doc/metapost/featpost/jpeg/hiddenlinegraph1.jpg
new file mode 100644
index 00000000000..23f081024af
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/jpeg/hiddenlinegraph1.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostbackground.jpeg b/Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostbackground.jpeg
new file mode 100644
index 00000000000..14a6feecaf8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostbackground.jpeg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostclearback.jpeg b/Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostclearback.jpeg
new file mode 100644
index 00000000000..03a47cb2efe
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/jpeg/mymetapostclearback.jpeg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples1.jpg b/Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples1.jpg
new file mode 100644
index 00000000000..cf12c9a6c73
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples1.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples2.jpg b/Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples2.jpg
new file mode 100644
index 00000000000..4eb188916c9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/jpeg/par3Dplotexamples2.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/jpeg/planpau2.jpeg b/Master/texmf-dist/doc/metapost/featpost/jpeg/planpau2.jpeg
new file mode 100644
index 00000000000..4e357099980
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/jpeg/planpau2.jpeg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/latex/linuxdoc-sgml.sty b/Master/texmf-dist/doc/metapost/featpost/latex/linuxdoc-sgml.sty
new file mode 100644
index 00000000000..a8ad9ad41e3
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/latex/linuxdoc-sgml.sty
@@ -0,0 +1,117 @@
+%% This is linuxdoc-sgml.sty, for use with SGML-generated LaTeX
+%% by Matt Welsh (mdw@sunsite.unc.edu)
+%%
+%% $Id: linuxdoc-sgml.sty,v 1.8 1998/05/14 20:06:13 cg Exp $
+%%
+%% Based on linuxdoc.sty by Michael K. Johnson, and latex.tex by
+%% Leslie Lamport. MODIFIED BY L. NOBRE G. TO BE USED IN TUGBOAT
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{linuxdoc-sgml}
+
+%%% GLOBAL LAYOUT THINGS
+
+%\marginparwidth 0.0 in
+%\parindent 0.0 in
+%\topmargin -0.5 in
+%\setlength{\textheight}{\paperheight}
+%\addtolength{\textheight}{-2 in}
+%\advance\headsep 2 ex
+%\advance\textheight -2 ex
+%\renewcommand{\baselinestretch}{1.14}
+%\addtolength{\parskip}{1.2 ex}
+
+%%% ONE-SIDED/TWO-SIDED DEPENDENCIES
+
+%\if@twoside % ``book'' style was chosen
+% \oddsidemargin 0.0 in
+% \evensidemargin 0 in
+% \textwidth 6 in
+% \def\ps@headings{\let\@mkboth\markboth
+% \def\@oddfoot{}\def\@evenfoot{}% No feet.
+% \def\@evenhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
+% \rm \thepage\hfil \bf \leftmark} % Left heading.
+% \def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
+% {\bf \rightmark}\hfil \rm\thepage} % Right heading.
+% \def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
+% \@chapapp\ \thechapter. \ \fi ##1}}{}}%
+% \def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
+% \thesection. \ \fi ##1}}}}
+
+%\else % if not book style, then
+% \oddsidemargin 0.0 in
+% \evensidemargin\oddsidemargin
+% \textwidth 6.5 in
+% \def\ps@headings{\let\@mkboth\markboth
+% \def\@oddfoot{}\def\@evenfoot{}% No feet.
+% \def\@oddhead{\protect\rule[-4pt]{\textwidth}{.5pt}\kern-\textwidth
+% {\bf \rightmark}\hfil \rm\thepage} % Right heading.
+% \def\@evenhead\@oddhead
+% \def\chaptermark##1{\markboth {{\ifnum \c@secnumdepth >\m@ne
+% \@chapapp\ \thechapter. \ \fi ##1}}{}}%
+% \def\sectionmark##1{\markright {{\ifnum \c@secnumdepth >\z@
+% \thesection. \ \fi ##1}}}}
+
+%\fi
+
+%% Titlepage stuff
+
+\gdef\@title{}
+\gdef\title#1{\gdef\@title{#1}}
+\gdef\@date{}
+\gdef\date#1{\gdef\@date{#1}}
+\gdef\@author{}
+\gdef\author#1{\gdef\@author{#1}}
+\gdef\@abstract{}
+\gdef\abstract#1{\gdef\@abstract{#1}}
+
+\def\maketitle{\thispagestyle{empty}\let\footnotesize\small%
+\let\footnoterule\relax
+%\setcounter{page}{0}%
+%\null
+%\vskip 3 in
+\noindent
+{\huge\sf \@title}\\
+%\rule{\textwidth}{1mm}\\ %%%%%%%%%%%%%%%%%%%%%% MAIN MODIFICATION
+\mbox{}\@author\ \hfill \@date\ \\
+\vskip 1 ex
+\noindent{\sf \@abstract}
+\setcounter{footnote}{0}%
+\gdef\@author{}\gdef\@title{}\gdef\@years{}\gdef\@abstract{}
+\let\maketitle\relax}
+
+%% Needs to be here for the previous ps@headings defs to work.
+\pagestyle{headings}
+
+%%% USEFUL MACROS
+
+\newcommand{\linux}{Linux} % Always use this when
+ % refering to the \linux\
+ % operating system, like that.
+\newcommand{\key}[1]{{\fbox{\small\tt #1}}} % Use this to mark keys, like
+ % \key{del} for the delete key.
+\newcommand{\ret}{\fbox{\sf return}} % Special case for the return key.
+\newcommand{\st}{\small\tt} % Small typewriter -- comes in handy.
+%\newcommand{\lb}{{\tt\char '173}} % Left Brace '{'
+%\newcommand{\rb}{{\tt\char '175}} % Right Brace '}'
+\newcommand{\lbr}{$\langle$} % Left Bracket '<'
+\newcommand{\rbr}{$\rangle$} % Right Bracket '>'
+\newcommand{\bs}{{\tt\char '134}} % BackSlash '\'
+\newcommand{\tm}{${}^{\mbox{\tiny\sf TM}}$}
+\newcommand{\TM}{\tm} % TM trademark symbol in
+ % either case
+\newcommand{\cparam}[1]{{\rm \lbr{\sl #1}\rbr}}
+ % Metavariables.
+
+%% Define NAMEURL macro to handle the optional name argument
+%% This calls on the \url macro from the url.sty package so the
+%% URL will be hyphenated correctly.
+\def\nameurl#1#2{{\em #2} {\tt <\url{#1}>}}
+\def\onlynameurl#1{{\em #1}}
+
+%% the tscreen environment automatically goes into typewriter type,
+%% but is otherwise like the screen environment
+
+\newenvironment{tscreen}%
+ {\begin{quote}\bgroup\small\tt}%
+ {\egroup\end{quote}}
diff --git a/Master/texmf-dist/doc/metapost/featpost/latex/logofeatpost.tex b/Master/texmf-dist/doc/metapost/featpost/latex/logofeatpost.tex
new file mode 100644
index 00000000000..b7c852c4b5c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/latex/logofeatpost.tex
@@ -0,0 +1,18 @@
+\documentclass{article}
+\newfont{\normald}{logod10 scaled 10000}
+\usepackage{graphics,color}
+%\setlength{\textwidth}{724pt}
+%\setlength{\oddsidemargin}{-5.4mm}
+%\setlength{\textheight}{57mm}
+%\setlength{\topmargin}{-4mm}
+%\setlength{\headheight}{5mm}
+%\setlength{\headsep}{2mm}
+%\setlength{\footskip}{2\baselineskip}
+\pagestyle{empty}
+\begin{document}
+\fcolorbox{white}{white}{
+ \begin{tabular}{l}
+ {\normald FEATPOST}
+ \end{tabular}
+ }
+\end{document}
diff --git a/Master/texmf-dist/doc/metapost/featpost/latex/ltugboat.cls b/Master/texmf-dist/doc/metapost/featpost/latex/ltugboat.cls
new file mode 100644
index 00000000000..cc0ad276d09
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/latex/ltugboat.cls
@@ -0,0 +1,1225 @@
+%%
+%% This is file `ltugboat.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tugboat.dtx (with options: `latex,classtop,common,classtail,latex2e,ltugboatcls')
+%%
+%% Copyright (C) 1994,1995,1996 TeX Users Group
+%% All rights reserved.
+%%
+%% This file is part of the tugboat package.
+%% -----------------------------------------
+%%
+%% This is a generated file. Permission is granted to customize the
+%% declarations in this file to serve the needs of your installation.
+%% However, no permission is granted to distribute a modified version of
+%% this file under its original name.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesClass {ltugboat}
+ [1998/09/10 v1.4r
+ TUGboat journal class%
+ ]
+\csname tugstyloaded@\endcsname
+\def\tugstyloaded@{\tugstyinit\endinput}
+\providecommand{\@tugclass}{ltugboat}
+\def\TBInfo{\ClassInfo{\@tugclass}}
+\def\TBError{\ClassError{\@tugclass}}
+\def\TBWarning{\ClassWarning{\@tugclass}}
+\newif\ifpreprint
+\def\preprint{\preprinttrue}
+\DeclareOption{draft}{%
+ \AtEndOfClass{%
+ \setcounter{page}{1001}%
+ \BlackBoxes
+ \def\MakeRegistrationMarks{}%
+ \PrelimDrafttrue
+ }%
+}
+\DeclareOption{preprint}{%
+ \preprinttrue
+}
+\DeclareOption{final}{%
+ \AtEndOfClass{%
+ \UseTrimMarks
+ \NoBlackBoxes
+ \PrelimDraftfalse
+ }%
+}
+\DeclareOption{11pt}{%
+ \TBWarning{The \@tugclass\space class only supports 10pt fonts:
+ \MessageBreak option \CurrentOption\space ignored}%
+}
+\DeclareOption{12pt}{\csname ds@11pt\endcsname}
+\DeclareOption{oneside}{\TBWarning{Option \CurrentOption\space ignored}}
+\DeclareOption{twoside}{\ds@oneside}
+\DeclareOption{onecolumn}{\ds@oneside}
+\DeclareOption{twocolumn}{\ds@oneside}
+\DeclareOption{tugproc}{%
+ \TBWarning{Option \CurrentOption\space ignored: use class ltugproc
+ instead of \@tugclass}%
+}
+\DeclareOption{rawcite}{\let\if@Harvardcite\iffalse}
+\DeclareOption{harvardcite}{\let\if@Harvardcite\iftrue}
+\DeclareOption{extralabel}{\let\UseExtraLabel\@firstofone}
+\DeclareOption{noextralabel}{\let\UseExtraLabel\@gobble}
+\DeclareOption{numbersec}{\let\if@numbersec\iftrue}
+\DeclareOption{nonumber}{\let\if@numbersec\iffalse}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\ExecuteOptions{draft,extralabel,numbersec,rawcite}
+\ProcessOptions
+\LoadClass[twoside]{article}
+\def\sectitlefont{\fontfamily\sfdefault\fontseries{bx}\fontshape{n}%
+ \fontsize\@xviipt\stbaselineskip\selectfont}
+\def\tensl{\fontseries{m}\fontshape{sl}\fontsize\@xpt\@xiipt
+ \selectfont}
+\def\EdNoteFont{\fontfamily{cmr}\fontseries{m}\fontshape{ui}%
+ \fontsize\@xpt\@xiipt\selectfont}
+\IfFileExists{mflogo.sty}%
+ {\RequirePackage{mflogo}}%
+ {\TBWarning
+ {Package mflogo.sty not available --\MessageBreak
+ Proceeding to emulate mflogo.sty}
+ \DeclareRobustCommand\logofamily{%
+ \not@math@alphabet\logofamily\relax
+ \fontencoding{U}\fontfamily{logo}\selectfont}
+ \DeclareTextFontCommand{\textlogo}{\logofamily}
+ \def\MF{\textlogo{META}\-\textlogo{FONT}\@}
+ \def\MP{\textlogo{META}\-\textlogo{POST}\@}
+ \DeclareFontFamily{U}{logo}{}
+ \DeclareFontShape{U}{logo}{m}{n}{%
+ <8><9>gen*logo%
+ <10><10.95><12><14.4><17.28><20.74><24.88>logo10%
+ }{}
+ \DeclareFontShape{U}{logo}{m}{sl}{%
+ <8><9>gen*logosl%
+ <10><10.95><12><14.4><17.28><20.74><24.88>logosl10%
+ }{}
+ \DeclareFontShape{U}{logo}{m}{it}{%
+ <->ssub*logo/m/sl%
+ }{}%
+ }
+\def\makeescape#1{\catcode`#1=\z@}
+\def\makebgroup#1{\catcode`#1=\@ne}
+\def\makeegroup#1{\catcode`#1=\tw@}
+\def\makemath #1{\catcode`#1=\thr@@}
+\def\makealign #1{\catcode`#1=4 }
+\def\makeeol #1{\catcode`#1=5 }
+\def\makeparm #1{\catcode`#1=6 }
+\def\makesup #1{\catcode`#1=7 }
+\def\makesub #1{\catcode`#1=8 }
+\def\makeignore#1{\catcode`#1=9 }
+\def\makespace #1{\catcode`#1=10 }
+\def\makeletter#1{\catcode`#1=11 }
+\chardef\other=12
+\let\makeother\@makeother
+\def\makeactive#1{\catcode`#1=13 }
+\def\makecomment#1{\catcode`#1=14 }
+\def\savecat#1{%
+ \expandafter\xdef\csname\string#1savedcat\endcsname{\the\catcode`#1}}
+\def\restorecat#1{\catcode`#1=\csname\string#1savedcat\endcsname}
+\def\SaveCS#1{\expandafter\let\csname saved@@#1\expandafter\endcsname
+ \csname#1\endcsname}
+\def\RestoreCS#1{\expandafter\let\csname#1\expandafter\endcsname
+ \csname saved@@#1\endcsname}
+\def\plaintubstyle{plain}
+\def\latextubstyle{latex}
+\providecommand\hb@xt@{\hbox to}
+\providecommand\textsuperscript[1]{\ensuremath{\m@th
+ ^{\mbox{\fontsize\sf@size\z@
+ \selectfont #1}}}}
+\def\AllTeX{(\La\kern-.075em)\kern-.075em\TeX}
+\def\AMS{American Mathematical Society}
+\def\AmS{$\mathcal{A}$\kern-.1667em\lower.5ex\hbox
+ {$\mathcal{M}$}\kern-.125em$\mathcal{S}$}
+\def\AmSLaTeX{\AmS-\LaTeX}
+\def\AmSTeX{\AmS-\TeX}
+\def\aw{A\kern.1em-W}
+\def\AW{Addison\kern.1em-\penalty\z@\hskip\z@skip Wesley}
+\def\BibTeX{\textsc{Bib}\kern-.08em\TeX}
+\def\CandT{\textsl{Computers \& Typesetting}}
+\def\CTAN{\acro{CTAN}}
+\def\DTD{\acro{DTD}}
+\def\DVItoVDU{DVIto\kern-.12em VDU}
+\DeclareRobustCommand\eTeX{\ensuremath{\varepsilon}-\kern-.125em\TeX}
+\def\HTML{\acro{HTML}}
+\def\ISBN{\acro{ISBN}}
+\def\ISSN{\acro{ISSN}}
+\def\JTeX{\leavevmode\hbox{\lower.5ex\hbox{J}\kern-.18em\TeX}}
+\def\JoT{\textsl{The Joy of \TeX}}
+\def\LAMSTeX{L\raise.42ex\hbox{\kern-.3em
+ $\m@th$\fontsize\sf@size\z@\selectfont
+ $\m@th\mathcal{A}$}%
+ \kern-.2em\lower.376ex\hbox{$\m@th\mathcal{M}$}\kern-.125em
+ {$\m@th\mathcal{S}$}-\TeX}
+\newcommand{\La}%
+ {L\kern-.36em
+ {\setbox0\hbox{T}%
+ \vbox to\ht0{\hbox{$\m@th$%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }}
+\def\Mc{\setbox\TestBox=\hbox{M}M\vbox
+ to\ht\TestBox{\hbox{c}\vfil}} % for Robert McGaffey
+\def\mf{\textsc{Metafont}}
+\def\MFB{\textsl{The \MF book}}
+\let\TB@@mp\mp
+\DeclareRobustCommand\mp{\ifmmode\TB@@mp\else MetaPost\fi}
+\DeclareTextSymbol{\textohm}{OT1}{'012}
+\DeclareTextSymbolDefault{\textohm}{OT1}
+\newcommand\OMEGA{\textohm}
+\DeclareRobustCommand{\OTP}{\OMEGA\acro{TP}}
+\def\mtex{T\kern-.1667em\lower.424ex\hbox{\^E}\kern-.125emX\@}
+\DeclareRobustCommand\NTS{$\mathcal{N}$\lower.5ex\hbox
+ {$\mathcal{T}$}$\mathcal{S}$\@}
+\def\pcMF{\leavevmode\raise.5ex\hbox{p\kern-.3\p@ c}MF\@}
+\def\PCTeX{PC\thinspace\TeX}
+\def\pcTeX{\leavevmode\raise.5ex\hbox{p\kern-.3\p@ c}\TeX}
+\def\Pas{Pascal}
+\def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC\@}
+\def\PiCTeX{\PiC\kern-.11em\TeX}
+\def\plain{\texttt{plain}}
+\def\POBox{P.\thinspace O.~Box }
+\def\PS{{Post\-Script}}
+\def\SC{Steering Committee}
+\def\SGML{\acro{SGML}}
+\def\SliTeX{\textrm{S\kern-.06em\textsc{l\kern-.035emi}%
+ \kern-.06em\TeX}}
+ \def\slMF{\textsl{\MF}} % should never be used
+ \def\stTeX{\textsc{st}\kern-0.13em\TeX}
+\def\TANGLE{\texttt{TANGLE}\@}
+\def\TB{\textsl{The \TeX book}}
+\def\TP{\textsl{\TeX}: \textsl{The Program}}
+\DeclareRobustCommand\TeX{T\kern-.1667em\lower.424ex\hbox{E}\kern-.125emX\@}
+\def\TeXhax{\TeX hax}
+\def\TeXMaG{\TeX M\kern-.1667em\lower.5ex\hbox{A}%
+ \kern-.2267emG\@}
+\def\TeXtures{\textit{Textures}}
+\let\Textures=\TeXtures
+\def\TeXXeT{\TeX-{}-\XeT}
+\def\ttn{\textsl{TTN}\@}
+\def\TTN{\textsl{\TeX{} and TUG News}}
+\let\texttub\textsl % redefined in other situations
+\def\TUB{\texttub{TUGboat}}
+\def\TUG{\TeX\ \UG}
+\def\tug{\acro{TUG}}
+\def\UG{Users Group}
+\def\UNIX{\acro{UNIX}}
+\def\VAX{V\kern-.12em A\kern-.1em X\@}
+\def\VorTeX{V\kern-2.7\p@\lower.5ex\hbox{O\kern-1.4\p@ R}\kern-2.6\p@\TeX}
+\def\XeT{X\kern-.125em\lower.424ex\hbox{E}\kern-.1667emT\@}
+\def\WEB{\texttt{WEB}\@}
+\def\WEAVE{\texttt{WEAVE}\@}
+\newlinechar=`\^^J
+\normallineskiplimit=\p@
+\clubpenalty=10000
+\widowpenalty=10000
+\def\NoParIndent{\parindent=\z@}
+\newdimen\normalparindent
+\normalparindent=20\p@
+\def\NormalParIndent{\global\parindent=\normalparindent}
+\NormalParIndent
+\def\BlackBoxes{\overfullrule=5\p@}
+\def\NoBlackBoxes{\overfullrule=\z@}
+\def\newline{\hskip\z@\@plus\pagewd\break}
+\edef\allowhyphens{\noexpand\hyphenpenalty\the\hyphenpenalty\relax
+ \noexpand\exhyphenpenalty\the\exhyphenpenalty\relax}
+\def\nohyphens{\hyphenpenalty\@M\exhyphenpenalty\@M}
+\newbox\T@stBox \newbox\TestBox
+\newcount\T@stCount \newcount\TestCount
+\newdimen\T@stDimen \newdimen\TestDimen
+\newif\ifT@stIf \newif\ifTestIf
+\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax }
+\newif\iftop@ \newif\ifbot@
+\def\topsmash{\top@true\bot@false\smash@}
+\def\botsmash{\top@false\bot@true\smash@}
+\def\smash{\top@true\bot@true\smash@}
+\def\smash@{\relax\ifmmode\def\next{\mathpalette\mathsm@sh}%
+ \else\let\next\makesm@sh\fi \next }
+\def\finsm@sh{\iftop@\ht\z@\z@\fi\ifbot@\dp\z@\z@\fi\box\z@}
+\long\def\ulap#1{\vbox to \z@{\vss#1}}
+\long\def\dlap#1{\vbox to \z@{#1\vss}}
+\def\xlap#1{\hb@xt@\z@{\hss#1\hss}}
+\long\def\ylap#1{\vbox to \z@{\vss#1\vss}}
+\long\def\zlap#1{\ylap{\xlap{#1}}}
+\def\basezero{\baselineskip\z@skip \lineskip\z@skip}
+\def\nullhrule{\hrule \@height\z@ \@depth\z@ \@width\z@ }
+\def\nullvrule{\vrule \@height\z@ \@depth\z@ \@width\z@ }
+\def\makestrut[#1;#2]{\vrule \@height#1 \@depth#2 \@width\z@ }
+\def\drawoutlinebox[#1;#2;#3]{\T@stDimen=#3
+ \vbox to#1{\hrule \@height\T@stDimen \@depth\z@
+ \vss\hb@xt@#2{\vrule \@width\T@stDimen
+ \hfil\makestrut[#1;\z@]%
+ \vrule \@width\T@stDimen}\vss
+ \hrule \@height\T@stDimen \@depth\z@}}
+\newcount\hours
+\newcount\minutes
+\def\SetTime{\hours=\time
+ \global\divide\hours by 60
+ \minutes=\hours
+ \multiply\minutes by 60
+ \advance\minutes by-\time
+ \global\multiply\minutes by-1 }
+\SetTime
+\def\now{\number\hours:\ifnum\minutes<10 0\fi\number\minutes}
+\def\Now{\today\ \now}
+\newif\ifPrelimDraft
+\def\midrtitle{\ifPrelimDraft {\textsl{preliminary draft, \Now}}\fi}
+\newdimen\raggedskip \raggedskip=\z@
+\newdimen\raggedstretch \raggedstretch=5em % ems of font set now (10pt)
+\newskip\raggedparfill \raggedparfill=\z@\@plus 1fil
+\def\raggedspaces{\spaceskip=.3333em \relax \xspaceskip=.5em \relax }
+\def\raggedright{%
+ \nohyphens
+ \rightskip=\raggedskip\@plus\raggedstretch \raggedspaces
+ \parfillskip=\raggedparfill }
+\def\raggedleft{%
+ \nohyphens
+ \leftskip=\raggedskip\@plus\raggedstretch \raggedspaces
+ \parfillskip=\z@skip }
+\def\raggedcenter{%
+ \nohyphens
+ \leftskip=\raggedskip\@plus\raggedstretch
+ \rightskip=\leftskip \raggedspaces
+ \parindent=\z@ \parfillskip=\z@skip }
+\def\normalspaces{\spaceskip\z@skip \xspaceskip\z@skip }
+\DeclareRobustCommand{\nobreakspace}{%
+ \unskip\nobreak\ \ignorespaces}
+\def\boxcs#1{\box\csname#1\endcsname}
+\def\setboxcs#1{\setbox\csname#1\endcsname}
+\def\newboxcs#1{\expandafter\newbox\csname#1\endcsname}
+\let\gobble\@gobble
+\def\vellipsis{%
+ \leavevmode\kern0.5em
+ \raise\p@\vbox{\baselineskip6\p@\vskip7\p@\hbox{.}\hbox{.}\hbox{.}}
+ }
+\def\bull{\vrule \@height 1ex \@width .8ex \@depth -.2ex }
+\def\cents{{\rm\raise.2ex\rlap{\kern.05em$\scriptstyle/$}c}}
+\def\Dag{\raise .6ex\hbox{$\scriptstyle\dagger$}}
+\def\careof{\leavevmode\hbox{\raise.75ex\hbox{c}\kern-.15em
+ /\kern-.125em\smash{\lower.3ex\hbox{o}}} \ignorespaces}
+\DeclareRobustCommand\sfrac[1]{\@ifnextchar/{\@sfrac{#1}}%
+ {\@sfrac{#1}/}}
+\def\@sfrac#1/#2{\leavevmode\kern.1em\raise.5ex
+ \hbox{$\m@th\mbox{\fontsize\sf@size\z@
+ \selectfont#1}$}\kern-.1em
+ /\kern-.15em\lower.25ex
+ \hbox{$\m@th\mbox{\fontsize\sf@size\z@
+ \selectfont#2}$}}
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+\DeclareRobustCommand\meta[1]{%
+ \ensuremath{\langle}\emph{#1}\ensuremath{\rangle}}
+\DeclareRobustCommand\env[1]{%
+ \cs{begin}\texttt{\char`\{#1\char`\}}}
+\def\thinskip{\hskip 0.16667em\relax}
+\def\endash{--}
+\def\emdash{\endash-}
+\def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces}
+\def\dash{\d@sh\nobreak\endash}
+\def\Dash{\d@sh\nobreak\emdash}
+\def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}}
+\def\rdash{\d@sh\nobreak\endash}
+\def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}}
+\def\Rdash{\d@sh\nobreak\emdash}
+\def\hyph{-\penalty\z@\hskip\z@skip }
+\def\slash{/\penalty\z@\hskip\z@skip }
+\def\nth#1{%
+ \def\reserved@a##1##2\@nil{\ifcat##1n%
+ 0%
+ \let\reserved@b\ensuremath
+ \else##1##2%
+ \let\reserved@b\relax
+ \fi}%
+ \TestCount=\reserved@a#1\@nil\relax
+ \ifnum\TestCount <0 \multiply\TestCount by\m@ne \fi % subdue negatives
+ \T@stCount=\TestCount
+ \divide\T@stCount by 100 \multiply\T@stCount by 100
+ \advance\TestCount by-\T@stCount % n mod 100
+ \ifnum\TestCount >20 \T@stCount=\TestCount
+ \divide\T@stCount by 10 \multiply\T@stCount by 10
+ \advance\TestCount by-\T@stCount % n mod 10
+ \fi
+ \reserved@b{#1}%
+ \textsuperscript{\ifcase\TestCount th% 0th
+ \or st% 1st
+ \or nd% 2nd
+ \or rd% 3rd
+ \else th% nth
+ \fi}%
+ }
+\def\Review{\@ifnextchar:{\@Review}{\@Review:}}
+\def\@Review:{\@ifnextchar[%]
+ {\@Rev}%
+ {\@Rev[Book review]}}
+\def\@Rev[#1]#2{{\ignorespaces#1\unskip:\enspace\ignorespaces
+ \slshape\mdseries#2}}
+\def\reviewitem{\addvspace{\BelowTitleSkip}%
+ \def\revauth##1{\def\therevauth{##1, }\ignorespaces}%
+ \def\revtitle##1{\def\therevtitle{{\slshape##1}. }\ignorespaces}%
+ \def\revpubinfo##1{\def\therevpubinfo{##1.}\ignorespaces}%
+ }
+\def\endreviewitem{{\noindent\interlinepenalty=10000
+ \therevauth\therevtitle\therevpubinfo\endgraf}%
+ \vskip\medskipamount
+ }
+\def\booktitle#1{{\slshape#1\/}}
+\newcount\issueseqno \issueseqno=-1
+\def\v@lx{\gdef\volx{Volume~\volno~(\volyr), No.~\issno}}
+\def\volyr{}
+\def\volno{}
+\def\vol #1,#2.{\gdef\volno{#1\unskip}%
+ \gdef\issno{\ignorespaces#2\unskip}%
+ \setbox\TestBox=\hbox{\volyr}%
+ \ifdim \wd\TestBox > .2em \v@lx \fi }
+\def\issdate #1#2 #3.{\gdef\issdt{#1#2 #3}\gdef\volyr{#3}%
+ \gdef\bigissdt{#1{\smc\uppercase{#2}} #3}%
+ \setbox\TestBox=\hbox{\volno}%
+ \ifdim \wd\TestBox > .2em \v@lx \fi }
+\vol 0, 0.
+\issdate Thermidor, 2001.
+\def\tubissue#1{\@ifnextchar(%)
+ {\@tubissue@b{#1}}
+ {\@tubissue@a{#1}}}
+\def\@tubissue@b#1(#2){\@tubissue@a{#1}{#2}}
+\def\@tubissue@a#1#2%
+ {\TUB~#1, no.~#2}
+\def\infil@{\jobname}
+\def\Input #1 {\ifnum\issueseqno<0
+ \def\infil@{#1}%
+ \else
+ \def\infil@{tb\number\issueseqno#1}
+ \fi
+ \edef\jobname{\infil@}\@readFLN
+ \@@input \infil@\relax
+ \if@RMKopen
+ \immediate\closeout\@TBremarkfile\@RMKopenfalse
+ \fi
+}
+\newif\if@RMKopen \@RMKopenfalse
+\newwrite\@TBremarkfile
+\def\@TBremark#1{%
+ \if@RMKopen
+ \else
+ \@RMKopentrue\immediate\openout\@TBremarkfile=\infil@.rmk
+ \fi
+ \toks@={#1}%
+ \immediate\write\@TBremarkfile{^^J\the\toks@}%
+ \immediate\write16{^^JTBremark:: \the\toks@^^J}%
+}
+\let\TBremark=\gobble
+\def\TBEnableRemarks{\let\TBremark\@TBremark}
+\def\TUBedit#1{}
+\def\TUBfilename#1#2{\expandafter\def\csname file@@#1\endcsname{#2}}
+\InputIfFileExists{\jobname.fln}%
+ {\TBInfo{Reading alternative file file \jobname.fln}}{}
+\def\@tubfilename#1{\expandafter\ifx\csname file@@#1\endcsname\relax
+ #1\else\csname file@@#1\endcsname\fi}
+\def\fileinput#1{\@@input\@tubfilename{#1} }
+\def\pagexrefON#1{%
+ \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
+ \write\ppoutfile{%
+ \def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
+ }
+\def\PageXrefON#1{%
+ \immediate\write-1{\def\expandafter
+ \noexpand\csname#1\endcsname{\number\c@page}}%
+ \immediate\write\ppoutfile{\def\expandafter
+ \noexpand\csname#1\endcsname{\number\c@page}}}
+\def\pagexrefOFF#1{}
+\let\pagexref=\pagexrefOFF
+\def\PageXrefOFF#1{}
+\let\PageXref=\PageXrefOFF
+\def\xreftoON#1{%
+ \ifundefined{#1}%
+ ???\TBremark{Need cross reference for #1.}%
+ \else\csname#1\endcsname\fi}
+\def\xreftoOFF#1{???}
+\let\xrefto=\xreftoOFF
+\let\TBdriver\gobble
+\hyphenation{Eijk-hout Hara-lam-bous man-u-script man-u-scripts}
+\PrelimDrafttrue
+\textheight 54pc
+\textwidth 39pc
+\columnsep 1.5pc
+\columnwidth 18.75pc
+\parindent \normalparindent
+\parskip \z@ % \@plus\p@
+\leftmargini 2em
+\leftmarginv .5em
+\leftmarginvi .5em
+\oddsidemargin \z@
+\evensidemargin \z@
+\topmargin -2.5pc
+\headheight 12\p@
+\headsep 20\p@
+\marginparwidth 48\p@
+\marginparsep 10\p@
+\partopsep=\z@
+\topsep=3\p@\@plus\p@\@minus\p@
+\parsep=3\p@\@plus\p@\@minus\p@
+\itemsep=\parsep
+\twocolumn
+\newdimen\pagewd \pagewd=39pc
+\newdimen\trimwd \trimwd=\pagewd
+\newdimen\trimlgt \trimlgt=11in
+\newdimen\headmargin \headmargin=3.5pc
+\newcommand\DeclareLaTeXLogo[5]{\expandafter\def
+ \csname @LaTeX@#1/#2/#3\endcsname{{#4}{#5}}}
+\def\@LaTeX@default{{.36}{.15}}
+\DeclareLaTeXLogo{cmss}{bx}n{.3}{.15}
+\DeclareLaTeXLogo{cmr}m{it}{.3}{.27}
+\DeclareLaTeXLogo{cmr}{bx}{it}{.3}{.27}
+\DeclareRobustCommand\LaTeX{\expandafter\let\expandafter\reserved@a
+ \csname @LaTeX@\f@family/\f@series/\f@shape\endcsname
+ \ifx\reserved@a\relax\let\reserved@a\@LaTeX@default\fi
+ \expandafter\@LaTeX\reserved@a}
+\newcommand\@LaTeX[2]{L\kern-#1em
+ {\sbox\z@ T%
+ \vbox to\ht0{\hbox{$\m@th$%
+ \csname S@\f@size\endcsname
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \vss}%
+ }%
+ \kern-#2em%
+ \TeX}
+\def\theauthor#1{\csname theauthor#1\endcsname}
+\def\theaddress#1{\csname theaddress#1\endcsname}
+\def\thenetaddress#1{\csname thenetaddress#1\endcsname}
+\def\thePersonalURL#1{\csname thePersonalURL#1\endcsname}
+\def\@defaultauthorlist{%
+ \count@\authornumber
+ \advance\count@ by -2
+ \@tempcnta0
+ \loop
+ \ifnum\count@>0
+ \advance\@tempcnta by \@ne
+ \ignorespaces\theauthor{\number\@tempcnta}\unskip,
+ \advance\count@ by \m@ne
+ \repeat
+ \count@\authornumber
+ \advance\count@ by -\@tempcnta
+ \ifnum\authornumber>0
+ \ifnum\count@>1
+ \count@\authornumber
+ \advance\count@ by \m@ne
+ \ignorespaces\theauthor{\number\count@}\unskip\ and
+ \fi
+ \ignorespaces\theauthor{\number\authornumber}\unskip
+ \fi
+}
+\def\signature#1{\def\@signature{#1}}
+\def\@signature{\@defaultsignature}
+\def\@defaultsignature{{%
+ \let\thanks\@gobble
+ \ifnum\authornumber<0
+ \medskip
+ \signaturemark
+ \theauthor{\number\authornumber}\\
+ \theaddress{\number\authornumber}\\
+ \allowhyphens
+ \thenetaddress{\number\authornumber}\\
+ \thePersonalURL{\number\authornumber}\\
+ \else
+ \count@=0
+ \loop
+ \ifnum\count@<\authornumber
+ \medskip
+ \advance\count@ by \@ne
+ \signaturemark
+ \theauthor{\number\count@}\\
+ \theaddress{\number\count@}\\
+ {%
+ \allowhyphens
+ \thenetaddress{\number\count@}\\
+ \thePersonalURL{\number\count@}\\
+ }%
+ \repeat
+ \fi
+ }%
+}
+\newdimen\signaturewidth \signaturewidth=12pc
+\newcommand\makesignature[1][\medskipamount]{%
+ \@tempdima\signaturewidth
+ \advance\@tempdima 1.5pc
+ \ifdim \@tempdima>\columnwidth
+ \signaturewidth \columnwidth
+ \advance\signaturewidth -1.5pc
+ \fi
+ \par
+ \penalty9000
+ \vspace{#1}%
+ \rightline{%
+ \vbox{\hsize\signaturewidth \ninepoint \raggedright
+ \parindent \z@ \everypar={\hangindent 1pc }
+ \parskip \z@skip
+ \def\|{\unskip\hfil\break}%
+ \def\\{\endgraf}%
+ \def\phone{\rm Phone: }
+ \rm\@signature}%
+ }%
+ \ifnum\authornumber<0 \endgroup\fi
+}
+\def\signaturemark{\leavevmode\llap{$\diamond$\enspace}}
+\newcount\authornumber
+\authornumber=0
+\def\author{%
+ \global\advance\authornumber\@ne
+ \TB@author
+}
+\def\contributor{%
+ \begingroup
+ \authornumber\m@ne
+ \TB@author
+}
+\def\TB@author#1{%
+ \expandafter\def\csname theauthor\number\authornumber\endcsname
+ {\ignorespaces#1\unskip}%
+ \expandafter\def\csname theaddress\number\authornumber\endcsname
+ {\TBWarning{Address for #1\space missing}\@gobble}%
+ \expandafter\def\csname thenetaddress\number\authornumber\endcsname
+ {\TBWarning{Net address for #1\space missing}\@gobble}%
+ \expandafter\let\csname thePersonalURL\number\authornumber\endcsname
+ \@gobble
+ }
+\def\address#1{%
+ \expandafter\def\csname theaddress\number\authornumber\endcsname
+ {\leavevmode\ignorespaces#1\unskip}}
+\def\network#1{\def\@network{#1: }}
+\newcommand\netaddress[1][\relax]{%
+ \begingroup
+ \def\@network{}%
+ #1\@sanitize\makespace\ \makeactive\@
+ \makeactive\.\makeactive\%\@relay@netaddress}%
+\def\@relay@netaddress#1{%
+ \ProtectNetChars
+ \expandafter\protected@xdef
+ \csname thenetaddress\number\authornumber\endcsname
+ {\protect\leavevmode\textrm{\@network}%
+ {\protect\NetAddrChars\net
+ \ignorespaces#1\unskip}}%
+ \endgroup
+ }
+\def\personalURL{\begingroup
+ \@sanitize\makespace\ \makeactive\@
+ \makeactive\.\makeactive\%\makeactive\/\@personalURL}%
+\def\@personalURL#1{%
+ \ProtectNetChars
+ \expandafter\protected@xdef
+ \csname thePersonalURL\number\authornumber\endcsname{%
+ \protect\leavevmode
+ {%
+ \protect\URLchars\net
+ \ignorespaces#1\unskip
+ }%
+ }%
+ \endgroup
+ }
+{%
+ \makecomment\*
+ \makeactive\@
+ \gdef\netaddrat{\makeactive\@*
+ \def@{\discretionary{\char"40}{}{\char"40}}}
+ \makeactive\%
+ \gdef\netaddrpercent{\makeactive\%*
+ \def%{\discretionary{\char"25}{}{\char"25}}}
+ \makeactive\.
+ \gdef\netaddrdot{\makeactive\.*
+ \def.{\discretionary{\char"2E}{}{\char"2E}}}
+ \gdef\NetAddrChars{\netaddrat \netaddrpercent \netaddrdot}
+ \makeactive\/
+ \gdef\URLchars{*
+ \NetAddrChars
+ \makeactive\/*
+ \def/{\discretionary{\char"2F}{}{\char"2F}}}
+ \gdef\ProtectNetChars{*
+ \def@{\protect@}*
+ \def%{\protect%}*
+ \def.{\protect.}*
+ \def/{\protect/}*
+ }
+}
+\if@compatibility
+ \DeclareRobustCommand\net{\normalfont\ttfamily\mathgroup\symtypewriter}
+\else
+ \DeclareOldFontCommand{\net}{\ttfamily\upshape\mdseries}{\mathtt}
+\fi
+\def\authorlist#1{\def\@author{#1}}
+\def\@author{\@defaultauthorlist}
+\def\maketitle{\par
+ \ifdim\PreTitleDrop > \z@
+ \loop
+ \ifdim \PreTitleDrop > \textheight
+ \vbox{}\vfil\eject
+ \advance\PreTitleDrop by -\textheight
+ \repeat
+ \vbox to \PreTitleDrop{}
+ \global\PreTitleDrop=\z@
+ \fi
+ \begingroup
+ \setcounter{footnote}{0}
+ \def\thefootnote{\fnsymbol{footnote}}
+ \@maketitle
+ \@thanks
+ \endgroup
+ \setcounter{footnote}{0}
+ \gdef\@thanks{}
+ }
+\def\secsep{\vskip 5\baselineskip}
+\newdimen\stbaselineskip \stbaselineskip=18\p@
+\newdimen\stfontheight
+ \settoheight{\stfontheight}{\sectitlefont O}
+\newif\ifSecTitle
+\SecTitlefalse
+\newif\ifWideSecTitle
+\newcommand\sectitle{%
+ \SecTitletrue
+ \@ifstar
+ {\WideSecTitletrue\def\s@ctitle}%
+ {\WideSecTitlefalse\def\s@ctitle}%
+}
+\newdimen\PreTitleDrop \PreTitleDrop=\z@
+\newskip\AboveTitleSkip \AboveTitleSkip=12\p@
+\newskip\BelowTitleSkip \BelowTitleSkip=8\p@
+\newdimen\strulethickness \strulethickness=.6\p@
+\def\@sectitle #1{%
+ \par
+ \penalty-1000
+ \ifWideSecTitle\else\secsep\fi
+ {%
+ \fboxrule\strulethickness
+ \fboxsep\z@
+ \noindent\framebox[\hsize]{%
+ \raggedcenter
+ \def\\{\unskip\break}%
+ \sectitlefont
+ \makestrut[2\stfontheight;\z@]%
+ #1%
+ \makestrut[\z@;\stfontheight]\endgraf
+ }%
+ }%
+ \nobreak
+ \vskip\baselineskip
+}
+\def\@makesectitle{\ifSecTitle
+ \global\SecTitlefalse
+ \ifWideSecTitle
+ \twocolumn[\@sectitle{\s@ctitle}]%
+ \global\WideSecTitlefalse
+ \else
+ \@sectitle{\s@ctitle}%
+ \fi
+ \else
+ \vskip\AboveTitleSkip
+ \kern\topskip
+ \hrule \@height\z@ \@depth\z@ \@width 10\p@
+ \kern-\topskip
+ \kern-\strulethickness
+ \hrule \@height\strulethickness \@depth\z@
+ \kern\medskipamount
+ \nobreak
+ \fi
+}
+\def\@maketitle{\@makesectitle
+ {%
+ \nohyphens \interlinepenalty\@M
+ \setbox0=\hbox{%
+ \let\thanks\@gobble
+ \let\\=\quad
+ \let\and=\quad
+ \ignorespaces\@author}%
+ {%
+ \noindent\bf\raggedright\ignorespaces\@title\endgraf
+ }%
+ \ifdim \wd0 < 5\p@ % omit if author is null
+ \else
+ \nobreak \vskip 4\p@
+ {%
+ \leftskip=\normalparindent
+ \raggedright
+ \def\and{\unskip\\}%
+ \noindent\@author\endgraf
+ }%
+ \fi
+ \nobreak
+ \vskip\BelowTitleSkip
+ }%
+ \global\@afterindentfalse
+ \aftergroup\@afterheading
+}
+\newenvironment{dedication}%
+ {\raggedright\noindent\itshape\ignorespaces}%
+ {\endgraf\medskip}
+\renewenvironment{abstract}%
+ {%
+ \begin{SafeSection}%
+ \section*{Abstract}%
+ }%
+ {\end{SafeSection}}
+\newenvironment{longabstract}%
+ {%
+ \begin{SafeSection}%
+ \section*{Abstract}%
+ \bgroup\small
+ }%
+ {%
+ \endgraf\egroup
+ \end{SafeSection}%
+ \vspace{.25\baselineskip}
+ \begin{center}
+ {$--*--$}
+ \end{center}
+ \vspace{.5\baselineskip}}
+\if@numbersec
+ \def\section{\TB@startsection{{section}%
+ 1%
+ \z@
+ {-8\p@}%
+ {4\p@}%
+ {\normalsize\bf\raggedright\hyphenpenalty=\@M}}}
+ \def\subsection{\TB@startsection{{subsection}%
+ 2%
+ \z@
+ {-8\p@}%
+ {4\p@}%
+ {\normalsize\bf\raggedright\hyphenpenalty=\@M}}}
+ \def\subsubsection{\TB@startsection{{subsubsection}%
+ 3%
+ \z@
+ {-8\p@}%
+ {4\p@}%
+ {\normalsize\bf\raggedright\hyphenpenalty=\@M}}}
+ \def\paragraph{\TB@startsection{{paragraph}%
+ 4%
+ \z@
+ {2.5ex\@plus 1ex}%
+ {-1em}%
+ {\normalsize\bf}}}
+\else
+ \setcounter{secnumdepth}{0}
+ \def\section{\TB@nolimelabel
+ \TB@startsection{{section}%
+ 1%
+ \z@
+ {-8\p@}%
+ {4\p@}%
+ {\normalsize\bf\raggedright\hyphenpenalty=\@M}}}
+ \def\subsection{\TB@nolimelabel
+ \TB@startsection{{subsection}%
+ 2%
+ \z@
+ {-8\p@}%
+ {-0.5em\@plus-\fontdimen3\font}%
+ {\normalsize\bf\raggedright\hyphenpenalty=\@M}}}
+ \def\subsubsection{\TB@nolimelabel
+ \TB@startsection{{subsubsection}%
+ 3%
+ \parindent
+ {-8\p@}%
+ {-0.5em\@plus-\fontdimen3\font}%
+ {\normalsize\bf\raggedright\hyphenpenalty=\@M}}}
+\fi
+\def\TB@startsection#1{\@ifstar
+ {\TBWarning{*-form of \expandafter\string\csname\@firstofsix#1%
+ \endcsname\space inappropriate}%
+ \@startsection#1}%
+ {\@startsection#1}}
+\def\@firstofsix#1#2#3#4#5#6{#1}
+\def\TB@safe@startsection#1{\@startsection#1}
+\newenvironment{SafeSection}%
+ {\let\TB@startsection\TB@safe@startsection}%
+ {}
+\if@numbersec
+ \def\subparagraph{\TB@nosection\subparagraph\paragraph}
+\else
+ \def\paragraph{\TB@nosection\paragraph\subsubsection}
+ \def\subparagraph{\TB@nosection\subparagraph\subsubsection}
+\fi
+\def\chapter{\TB@nosection\chapter\section}
+\def\part{\TB@nosection\part\section}
+\def\TB@nosection#1#2{\TBWarning{class does not support \string#1,
+ \string#2\space used instead}#2}
+\def\l@section#1#2{\addpenalty{\@secpenalty}%
+ \addvspace{1.0em\@plus\p@}%
+ \@tempdima 1.5em
+ \begingroup
+ \parindent\z@ \rightskip\z@ % article style makes \rightskip > 0
+ \parfillskip\z@
+ \bf\leavevmode\advance\leftskip\@tempdima\hskip-\leftskip#1\nobreak\hfil
+ \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+ \endgroup}
+\renewcommand\appendix{\par
+ \renewcommand\thesection{\@Alph\c@section}%
+ \setcounter{section}{0}%
+ \if@numbersec
+ \else
+ \setcounter{secnumdepth}{1}%
+ \fi
+ \def\@tempa{appendix}
+ \ifx\@tempa\@currenvir
+ \expandafter\@appendix@env
+ \fi
+}
+\newcommand\app@prefix@section{}
+\newcommand\@appendix@env[1][Appendix]{%
+ \renewcommand\@seccntformat[1]{\csname app@prefix@##1\endcsname
+ \csname the##1\endcsname\quad}%
+ \renewcommand\app@prefix@section{#1 }%
+}
+\let\endappendix\relax
+\def\TB@nolimelabel{\def\@currentlabel{\protect\TBWarning
+ {Invalid label on page \thepage\space used}%
+ \textbf{?!?}}}
+\let\TB@@sect\@sect
+\let\TB@@ssect\@ssect
+\def\@sect#1#2#3#4#5#6[#7]#8{%
+ \def\@currentlabelname{#7}%
+ \TB@@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
+}
+\def\@ssect#1#2#3#4#5{%
+ \def\@currentlabelname{#5}%
+ \TB@@ssect{#1}{#2}{#3}{#4}{#5}%
+}
+\def\label#1{{%
+ \@bsphack
+ \let\label\@gobble
+ \let\index\@gobble
+ \if@filesw
+ \protected@write\@auxout{}%
+ {\string\newlabel{#1}{%
+ {\@currentlabel}{\thepage}{\@currentlabelname}}%
+ }%
+ \fi
+ \@esphack
+ }%
+}
+\let\@currentlabelname\@empty
+\DeclareRobustCommand\ref[1]{\expandafter\@setref
+ \csname r@#1\endcsname\@firstofthree{#1}}
+\DeclareRobustCommand\pageref[1]{\expandafter\@setref
+ \csname r@#1\endcsname\@secondofthree{#1}}
+\DeclareRobustCommand\nameref[1]{\expandafter\@setref
+ \csname r@#1\endcsname\@thirdofthree{#1}}
+\long\def\@firstofthree#1#2#3{#1}
+\long\def\@secondofthree#1#2#3{#2}
+\long\def\@thirdofthree#1#2#3{#3}
+\long\def\@makecaption#1#2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{#1: #2}%
+ \ifdim \wd\@tempboxa >\hsize
+ \raggedright\hyphenpenalty=\@M
+ #1: #2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}
+\renewcommand\normalsize{%
+ \@setfontsize\normalsize\@xpt\@xiipt
+ \abovedisplayskip=3\p@\@plus 3\p@\@minus\p@
+ \belowdisplayskip=\abovedisplayskip
+ \abovedisplayshortskip=\z@\@plus 3\p@
+ \belowdisplayshortskip=\p@\@plus 3\p@\@minus\p@
+}
+
+\renewcommand\small{%
+ \@setfontsize\small\@ixpt{11}%
+ \abovedisplayskip=2.5\p@\@plus 2.5\p@\@minus\p@
+ \belowdisplayskip=\abovedisplayskip
+ \abovedisplayshortskip=\z@\@plus 2\p@
+ \belowdisplayshortskip=\p@\@plus 2\p@\@minus\p@
+}
+\renewcommand\footnotesize{%
+ \@setfontsize\footnotesize\@viiipt{9.5}%
+ \abovedisplayskip=3\p@\@plus 3\p@\@minus\p@
+ \belowdisplayskip=\abovedisplayskip
+ \abovedisplayshortskip=\z@\@plus 3\p@
+ \belowdisplayshortskip=\p@\@plus 3\p@\@minus\p@
+}
+\def\@listi{%
+ \leftmargin\leftmargini\parsep=\p@\@plus\p@\@minus\p@
+ \itemsep=\parsep
+ \listparindent=1em
+ }
+
+\def\@listii{%
+ \leftmargin\leftmarginii
+ \labelwidth=\leftmarginii \advance\labelwidth-\labelsep
+ \topsep=2\p@\@plus\p@\@minus\p@
+ \parsep=\p@\@plus\p@\@minus\p@
+ \itemsep=\parsep
+ \listparindent=1em
+ }
+
+\def\@listiii{%
+ \leftmargin=\leftmarginiii
+ \labelwidth=\leftmarginiii \advance\labelwidth-\labelsep
+ \topsep=\p@\@plus\p@\@minus\p@
+ \parsep=\z@
+ \itemsep=\topsep
+ \listparindent=1em
+ }
+\def\quote{\list{}{\rightmargin.5\leftmargin}\item[]}
+\renewcommand{\quotation}{\list{}{\listparindent 1.5em
+ \rightmargin.5\leftmargin\parsep \z@\@plus\p@}\item[]}
+\let\@TBverbatim\verbatim
+\let\@TBendverbatim\endverbatim
+\def\verbatim{\futurelet\reserved@a\@switch@sqbverbatim}
+\def\@switch@sqbverbatim{\ifx\reserved@a[%]
+ \expandafter\@sqbverbatim\else
+ \def\reserved@b{\@sqbverbatim[]}\expandafter\reserved@b\fi}
+\def\@sqbverbatim[#1]{%
+ \def\ruled{\let\if@ruled\iftrue}%
+ #1\@TBverbatim}
+\def\@verbatim{%
+ \if@ruled\trivlist\item\hrule\kern5\p@\nobreak\fi
+ \trivlist \item\relax
+ \if@minipage\else\vskip\parskip\fi
+ \leftskip\@totalleftmargin\rightskip\z@skip
+ \parindent\z@\parfillskip\@flushglue\parskip\z@skip
+ \@@par
+ \@tempswafalse
+ \def\par{%
+ \if@tempswa
+ \leavevmode \null \@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi}%
+ \obeylines \verbatim@font \@noligs
+ \let\do\@makeother \dospecials
+ \everypar \expandafter{\the\everypar \unpenalty}%
+}%
+\def\endverbatim{\@TBendverbatim
+ \if@ruled\kern5\p@\hrule\endtrivlist\fi}
+{\makeactive<
+ \gdef<#1>{{\reset@font\ensuremath{\langle}%
+ \textit{#1}%
+ \ensuremath{\rangle}}}
+}
+\let\if@ruled\iffalse
+\if@Harvardcite
+\let\@internalcite\cite
+\def\cite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+\def\citeNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
+\def\citeN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##1 (##3}\@citedata}
+\def\citeA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+\def\citeANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##1}\@internalcite}
+\def\shortcite{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+\def\shortciteNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
+\def\shortciteN{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
+ \def\citeauthoryear##1##2##3{##2 (##3}\@citedata}
+\def\shortciteA{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+\def\shortciteANP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##2}\@internalcite}
+\def\citeyear{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+\def\citeyearNP{\def\@citeseppen{-1000}%
+ \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
+ \def\citeauthoryear##1##2##3{##3}\@citedata}
+\def\@citedata{%
+ \@ifnextchar [{\@tempswatrue\@citedatax}%
+ {\@tempswafalse\@citedatax[]}%
+}
+
+\def\@citedatax[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{, }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+\def\@citex[#1]#2{%
+\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
+ \def\@citea{}\@cite{\@for\@citeb:=#2\do%
+ {\@citea\def\@citea{; }\@ifundefined% by Young
+ {b@\@citeb}{{\bf ?}%
+ \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
+{\csname b@\@citeb\endcsname}}}{#1}}%
+\def\@biblabel#1{}
+\newlength{\bibhang}
+\setlength{\bibhang}{2em}
+\newdimen\bibindent
+\bibindent=1.5em
+\@ifundefined{refname}%
+ {\newcommand{\refname}{References}}%
+ {}%
+\def\thebibliography#1{\let\TB@startsection\TB@safe@startsection
+ \section*{\refname\@mkboth
+ {\uppercase{\refname}}{\uppercase{\refname}}}\list
+ {[\arabic{enumi}]}{%
+ \labelwidth\z@ \labelsep\z@
+ \leftmargin\bibindent
+ \itemindent -\bibindent
+ \listparindent \itemindent
+ \parsep \z@
+ \usecounter{enumi}}
+ \def\newblock{}
+ \sloppy
+ \sfcode`\.=1000\relax}
+\def\etal{et\,al.\@}
+\def\bibentry{\smallskip
+ \hangindent=\parindent
+ \hangafter=1
+ \noindent
+ \sloppy
+ \clubpenalty500 \widowpenalty500
+ \frenchspacing}
+\def\bibliography#1{%
+ \if@filesw\immediate\write\@auxout{\string\bibdata{\@tubfilename{#1}}}\fi
+ \@input{\jobname.bbl}}
+
+\def\bibliographystyle#1{\if@filesw\immediate\write\@auxout
+ {\string\bibstyle{\@tubfilename{#1}}}\fi}
+\else
+\let\TB@save@thebibliography\thebibliography
+\def\thebibliography{\let\TB@startsection\TB@safe@startsection
+ \TB@save@thebibliography}
+\fi
+\def\HorzR@gisterRule{\vrule \@height 0.2\p@ \@depth\z@ \@width 0.5in }
+\def\DownShortR@gisterRule{\vrule \@height 0.2\p@ \@depth 1pc \@width 0.2\p@ }
+\def\UpShortR@gisterRule{\vrule \@height 1pc \@depth\z@ \@width 0.2\p@ }
+\def\ttopregister{\dlap{%
+ \hb@xt@\trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
+ \HorzR@gisterRule \hfil \HorzR@gisterRule}%
+ \hb@xt@\trimwd{\hfil \DownShortR@gisterRule \hfil}}}
+\def\tbotregister{\ulap{%
+ \hb@xt@\trimwd{\hfil \UpShortR@gisterRule \hfil}%
+ \hb@xt@\trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
+ \HorzR@gisterRule \hfil \HorzR@gisterRule}}}
+\def\topregister{\ttopregister}
+\def\botregister{\tbotregister}
+\def \rtitlex{\def\texttub##1{{\normalsize\textrm{##1}}}\TUB, \volx }
+
+\def\PrelimDraftfooter{%
+ \dlap{\kern\textheight\kern3pc
+ \rlap{\hb@xt@\pagewd{\midrtitle\hfil\midrtitle}}
+ }}
+
+\def\MakeRegistrationMarks{}
+\def\UseTrimMarks{%
+ \def\MakeRegistrationMarks{%
+ \ulap{\rlap{%
+ \vbox{\dlap{\vbox to\trimlgt{\vfil\botregister}}%
+ \topregister\vskip \headmargin \vskip 10\p@}}}}%
+ }
+
+\def\@oddhead{\MakeRegistrationMarks\PrelimDraftfooter
+ \normalsize\csname normalshape\endcsname\rm
+ \rtitlex\qquad\midrtitle \hfil \thepage}
+\def\@evenhead{\MakeRegistrationMarks\PrelimDraftfooter
+ \normalsize\csname normalshape\endcsname\rm
+ \thepage\hfil\midrtitle\qquad\rtitlex}
+\def\@oddfoot{}
+\def\@evenfoot{}
+\def\ps@headings{}
+\pagestyle{headings}
+\def\@outputdblcol{\if@firstcolumn \global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\box\@outputbox
+ \global\brokenpenalty10000
+ \else \global\@firstcolumntrue
+ \global\brokenpenalty100
+ \setbox\@outputbox\vbox{\hb@xt@\textwidth{\hb@xt@\columnwidth
+ {\box\@leftcolumn \hss}\hfil \vrule \@width\columnseprule\hfil
+ \hb@xt@\columnwidth{\box\@outputbox \hss}}}\@combinedblfloats
+ \@outputpage \begingroup \@dblfloatplacement \@startdblcolumn
+ \@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}\endgroup
+ \fi}
+\newif\ifFirstPar \FirstParfalse
+\def\smc{\sc}
+\def\ninepoint{\small}
+\DeclareRobustCommand\SMC{%
+ \ifx\@currsize\normalsize\small\else
+ \ifx\@currsize\small\footnotesize\else
+ \ifx\@currsize\footnotesize\scriptsize\else
+ \ifx\@currsize\large\normalsize\else
+ \ifx\@currsize\Large\large\else
+ \ifx\@currsize\LARGE\Large\else
+ \ifx\@currsize\scriptsize\tiny\else
+ \ifx\@currsize\tiny\tiny\else
+ \ifx\@currsize\huge\LARGE\else
+ \ifx\@currsize\Huge\huge\else
+ \small\SMC@unknown@warning
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+\newcommand\SMC@unknown@warning{\TBWarning{\string\SMC: unrecognised
+ text font size command -- using \string\small}}
+\newcommand\textSMC[1]{{\SMC #1}}
+\newcommand\acro[1]{\textSMC{#1}\@}
+\def\xEdNote{{\EdNoteFont Editor's note:\enspace }}
+\def \EdNote{\@ifnextchar[%]
+ {%
+ \ifvmode
+ \smallskip\noindent\let\@EdNote@\@EdNote@v
+ \else
+ \unskip\quad\def\@EdNote@{\unskip\quad}%
+ \fi
+ \@EdNote
+ }%
+ \xEdNote
+}
+\long\def\@EdNote[#1]{%
+ [\thinspace\xEdNote\ignorespaces
+ #1%
+ \unskip\thinspace]%
+ \@EdNote@
+}
+\def\@EdNote@v{\par\smallskip}
+\def\SelfDocumenting{%
+ \setlength\textwidth{31pc}
+ \onecolumn
+ \parindent \z@
+ \parskip 2\p@\@plus\p@\@minus\p@
+ \oddsidemargin 8pc
+ \evensidemargin 8pc
+ \marginparwidth 8pc
+ \toks@\expandafter{\@oddhead}%
+ \xdef\@oddhead{\hss\hb@xt@\pagewd{\the\toks@}}%
+ \toks@\expandafter{\@evenhead}%
+ \xdef\@evenhead{\hss\hb@xt@\pagewd{\the\toks@}}%
+ \def\ps@titlepage{}%
+}
+\def\ps@titlepage{}
+
+\long\def\@makefntext#1{\parindent 1em\noindent\hb@xt@2em{}%
+ \llap{\@makefnmark}\null$\mskip5mu$#1}
+
+\def\fnum@figure{{\bf Figure \thefigure}}
+\if@Harvardcite
+ \AtBeginDocument{%
+ \bibliographystyle{ltugbib}%
+ }
+\fi
+\authornumber\z@
+\let\@signature\@defaultsignature
+\InputIfFileExists{ltugboat.cfg}{\TBInfo{Loading ltugboat
+ configuration information}}{}
+\endinput
+%%
+%% End of file `ltugboat.cls'.
diff --git a/Master/texmf-dist/doc/metapost/featpost/latex/macroMan.tex b/Master/texmf-dist/doc/metapost/featpost/latex/macroMan.tex
new file mode 100644
index 00000000000..4e8c9f3a333
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/latex/macroMan.tex
@@ -0,0 +1,1737 @@
+\documentclass[a4paper]{article}
+\newif\ifpdf
+\ifx\pdfoutput\undefined
+ \pdffalse % we do not use PDFLaTeX
+\else
+ \pdfoutput=1 % we use PDFLaTeX
+ \pdftrue
+\fi
+\usepackage{linuxdoc-sgml}
+\usepackage{qwertz}
+\usepackage{url}
+\usepackage[latin1]{inputenc}
+\ifpdf
+ \usepackage[pdftex,colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref}
+ \pdfcompresslevel=9
+\else
+ \usepackage{t1enc}
+%% \usepackage[dvips]{hyperref}
+\fi
+\usepackage[english]{babel}
+\usepackage{epsfig}
+\usepackage{null}
+\def\addbibtoc{
+\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
+}%end-preamble
+\setcounter{page}{1}
+\urldef{\aaaurl} \url{http://www-math.univ-poitiers.fr/~phan/m3Dplain.html}
+\urldef{\aaburl} \url{http://directory.fsf.org/GNU/3DLDF.html}
+\urldef{\aacurl} \url{http://www.povray.org/}
+\urldef{\aadurl} \url{http://www.blender3d.org/}
+\urldef{\aaeurl} \url{http://jl.photodex.com/dog/}
+\urldef{\aafurl} \url{http://www.flexer.it/galrey/}
+\urldef{\aagurl} \url{http://lince.cii.fc.ul.pt/xcmd/xcmd.html}
+\urldef{\aahurl} \url{http://www.ctan.org/tex-archive/graphics/metapost/contrib/macros/latexmp/}
+\urldef{\aaiurl} \url{http://www.ida.liu.se/~joned/download/mps2eps/}
+\urldef{\aajurl} \url{http://matagalatlante.org/nobre/hyt/technicaldrawfromphoto.html}
+\urldef{\aakurl} \url{http://www.gnuplot.info/}
+\urldef{\aalurl} \url{http://gri.sourceforge.net/}
+\title{FEATPOST macros}
+\author{L. Nobre G., {\ttfamily http://matagalatlante.org}}
+\date{December 2004}
+\abstract{ This document intends to be an explanation of the MetaPost macros defined in the {\ttfamily FEATPOST} package. Its purpose is to draw
+ two or three-dimensional physics diagrams.
+ The {\ttfamily FEATPOST} package is supposed to help you draw figures
+ containing 3D dots, vectors, flat arrows, angles, parametric
+ lines, circles, ellipses, cones, cylinders, spheres, globes, hemispheres, toruses, elliptical frusta,
+ polygons, polyhedra, functional and parametric surfaces, direction fields, field lines
+ and trajectories in vector fields, schematic automobiles, electric charges, etc.
+ The fact that it is a programming language instead of Computer Aided Design (CAD) helps the user to experiment different figure layouts without changing specified geometric relationships among figure elements. Two of the intrinsic MetaPost features which may be important for physics
+ diagrams are: (i) the typesetting power of
+ TeX is easily called when needed and (ii) besides a sufficient
+ number of mathematical operators, geometric relationships may
+ be expressed by linear equations, without explicit assignements.
+ }
+
+
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+3D in MetaPost is not a new idea. Denis Roegel
+contributed related packages to CTAN some years ago. It was the
+subject of a 1997 TUGboat article (V18, N4, 274-283). Anthony
+Phan has been developing a very elegant package
+called
+{\em m3D} {\tt \aaaurl}
+. Due to his skilled coding, {\ttfamily m3D} can
+handle larger objects and can produce more realistic renderings than
+{\ttfamily FEATPOST}. Another possibilty is
+{\em GNU 3DLDF} {\tt \aaburl}
+.
+In any case we are talking about vector-based abstract diagrams,
+so the functionality of
+these packages is nearer to {\ttfamily GNUPLOT} than to {\ttfamily OpenGL}.
+We could also talk about {\ttfamily
+{\em POV-ray} {\tt \aacurl}
+} or
+{\ttfamily
+{\em blender} {\tt \aadurl}
+} but these
+are focused on ray-traced images, a completely different thing.
+
+Regarding software {\ttfamily FEATPOST} requires only MetaPost but
+reccomends {\ttfamily LaTeX, bash, ImageMagick, ghostscript,
+Linuxdoc, Textutils, dvips, epstopdf, sed, gv, plaympeg,
+{\em dog} {\tt \aaeurl}
+,
+{\em galrey} {\tt \aafurl}
+} and {\ttfamily
+{\em xcmd} {\tt \aagurl}
+}. Also, it is highly beneficial to
+be able to understand and cope with MetaPost error messages as
+{\ttfamily FEATPOST} has no protection against mistaken inputs. One
+probable cause of errors is the use of variables with the name of
+procedures, like
+\begin{tscreen}
+\begin{verbatim}
+X, Y, Z, N, rp, cb, ps
+\end{verbatim}
+\end{tscreen}
+All other procedure names have six or more characters.
+
+The user must be aware that MetaPost has a limited arithmetic power
+and that the author has limited programming skills,
+which may lead to unperfect 3D figures or very long processing time.
+It's advisable not to try very complex diagrams and it's recommended to
+keep 3D coordinates within order 1 (default MetaPost units).
+
+All {\ttfamily FEATPOST} macros are build apon the MetaPost
+{\ttfamily color} variable type. It looks like this:
+\begin{tscreen}
+\begin{verbatim}
+(red,green,blue)
+\end{verbatim}
+\end{tscreen}
+Its components may, nevertheless,
+be arbtitrary numbers, like:
+\begin{tscreen}
+\begin{verbatim}
+(X,Y,Z)
+\end{verbatim}
+\end{tscreen}
+So, the
+{\ttfamily color} type is adequate to define not only colors but
+also 3D points and vectors.
+
+
+\section{Small Tutorial}
+
+One very minimalistic example program could be:
+\begin{tscreen}
+\begin{verbatim}
+beginfig(1);
+ cartaxes(1,1,1);
+endfig;
+end;
+\end{verbatim}
+\end{tscreen}
+where {\ttfamily cartaxes} is a
+{\ttfamily FEATPOST} macro that produces
+the Cartesian referential.
+
+One small example program may be:
+\begin{tscreen}
+\begin{verbatim}
+f := 5.4*(1.5,0.5,1);
+Spread := 30;
+beginfig(1);
+ numeric gridstep, sidenumber, i, j, coord, aa, ab, ac;
+ color pa;
+ gridstep = 0.9;
+ sidenumber = 10;
+ coord = 0.5*sidenumber*gridstep;
+ for i=0 upto sidenumber:
+ for j=0 upto sidenumber:
+ pa := (-coord+j*gridstep,-coord+i*gridstep,0);
+ aa := uniformdeviate(360);
+ ab := uniformdeviate(180);
+ ac := uniformdeviate(90);
+ kindofcube( false, false, pa, aa, ab, ac, 0.4, 0.4, 0.9 );
+ endfor;
+ endfor;
+endfig;
+end.
+\end{verbatim}
+\end{tscreen}
+where {\ttfamily kindofcube}
+is a {\ttfamily FEATPOST} macro that produces
+a rectangular prism (cuboid).
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/kindofcube.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/kindofcube.1.png}}\fi
+\caption{Example that uses {\ttfamily kindofcube}.}
+\end{figure}
+\label{figkindofcube1}
+
+The main variable of any three-dimensional figure is the
+point of view. {\ttfamily FEATPOST} uses the variable {\ttfamily f}
+as the point of view. {\ttfamily Spread} is another global
+variable that controls the size of the projection.
+
+Another example may be:
+\begin{tscreen}
+\begin{verbatim}
+f := (13,7,3.5);
+Spread := 35;
+beginfig(1);
+ numeric i, len, wang, reflen, frac, coordg;
+ numeric fws, NumLines, inray, outay;
+ path conepath, cira, cirb, ella, ellb, tuba, tubb, tubc;
+ color axe, aroc, cubevertex, conecenter, conevertex;
+ color allellaxe, ellaaxe, ellbaxe, pca, pea, pcb, peb;
+ frac := 0.5;
+ len := 0.6;
+ wang := 60;
+ axe := (0,cosd(90-wang),sind(90-wang));
+ fws := 4;
+ reflen := 0.2*fws;
+ outay := 0.45*fws;
+ inray := 0.7*outay;
+ coordg := frac*fws;
+ NumLines := 30;
+ HoriZon := -0.5*fws;
+ setthestage( 0.5*NumLines, 2*fws );
+ cubevertex = (0.12*fws,-0.5*fws,-0.5*fws);
+ kindofcube(false,true,cubevertex,180,0,0,0.65*fws,0.2*fws,fws);
+ aroc := outay*(0,cosd(wang),sind(wang))-0.5*(0,fws,fws);
+ rigorousdisc( inray, true, aroc, outay, axe*len );
+ allellaxe := reflen*( 0.707, 0.707, 0 );
+ ellaaxe := reflen*( 0.707, -0.707, 1.0 );
+ ellbaxe := reflen*( -0.707, 0.707, 1.0 );
+ conecenter = ( coordg, coordg, -0.5*fws );
+ pca := ( coordg, -coordg, -0.5*fws );
+ pcb := ( -coordg, coordg, -0.5*fws );
+ pea := ( coordg, -coordg, 0.9*fws );
+ peb := ( -coordg, coordg, 0.9*fws );
+ cira := goodcirclepath( pca, blue, reflen );
+ cirb := goodcirclepath( pcb, blue, reflen );
+ ella := ellipticpath( pea, allellaxe, ellaaxe );
+ ellb := ellipticpath( peb, allellaxe, ellbaxe );
+ tuba := twocyclestogether( cira, ella );
+ tubb := twocyclestogether( cirb, ellb );
+ tubc := twocyclestogether( ella, ellb );
+ unfill tubb; draw tubb;
+ unfill tubc; draw tubc;
+ unfill tuba; draw tuba;
+ conevertex = conecenter + ( -3.5*reflen, 0, 0.8*fws );
+ verygoodcone(false,conecenter,blue,reflen,conevertex);
+endfig;
+end.
+\end{verbatim}
+\end{tscreen}
+where we find a {\ttfamily rigorousdisc}
+and a {\ttfamily verygoodcone}
+(the nicest {\ttfamily FEATPOST} macros) in addition to
+{\ttfamily setthestage}, {\ttfamily twocyclestogether} and
+{\ttfamily kindofcube}.
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/stageforthree.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/stageforthree.1.png}}\fi
+\caption{Example that uses {\ttfamily rigorousdisc} and {\ttfamily verygoodcone}.}
+\end{figure}
+\label{figstageforthree}
+
+
+\subsection{Mechanics}
+
+The following is the sequence of steps necessary to produce
+the diagrams.
+\begin{enumerate}
+\item To use LaTeX fonts enter the shell command
+\par
+\addvspace{\medskipamount}
+\nopagebreak\hrule
+\begin{verbatim}
+export TEX=latex
+\end{verbatim}
+\nopagebreak\hrule
+\addvspace{\medskipamount}
+\item Make your MetaPost program know {\ttfamily FEATPOST} macros.
+This may be accomplished in two ways:
+\begin{itemize}
+\item Insert the line:
+\begin{tscreen}
+\begin{verbatim}
+input featpost3Dplus2D;
+\end{verbatim}
+\end{tscreen}
+at
+the beginning
+of your program and
+then enter the shell command
+\par
+\addvspace{\medskipamount}
+\nopagebreak\hrule
+\begin{verbatim}
+mpost yourprogram.mp
+\end{verbatim}
+\nopagebreak\hrule
+\addvspace{\medskipamount}
+ or
+\item Pre-compile the macros into a {\ttfamily mem} file,
+for instance:
+\par
+\addvspace{\medskipamount}
+\nopagebreak\hrule
+\begin{verbatim}
+inimpost featpost.mp
+\end{verbatim}
+\nopagebreak\hrule
+\addvspace{\medskipamount}
+ and then run your
+program with
+\par
+\addvspace{\medskipamount}
+\nopagebreak\hrule
+\begin{verbatim}
+mpost -mem featpost yourprogram.mp
+\end{verbatim}
+\nopagebreak\hrule
+\addvspace{\medskipamount}
+\end{itemize}
+\item If your program contains LaTeX text you may insert, at the
+beginning, the lines
+\begin{tscreen}
+\begin{verbatim}
+verbatimtex
+\documentclass{article}
+\begin{document}
+etex
+\end{verbatim}
+\end{tscreen}
+and at the end
+\begin{tscreen}
+\begin{verbatim}
+verbatimtex
+\end{document}
+etex
+\end{verbatim}
+\end{tscreen}
+or make use of the
+
+{\em latexmp} {\tt \aahurl}
+ package.
+\item Pass the produced figure(s) through {\ttfamily dvips}
+if they contain any text. You may do this with the provided
+shell script {\ttfamily laproof}.
+\par
+\addvspace{\medskipamount}
+\nopagebreak\hrule
+\begin{verbatim}
+laproof yourprogram N
+\end{verbatim}
+\nopagebreak\hrule
+\addvspace{\medskipamount}
+ where {\ttfamily N}
+is the figure number. This
+script produces an EPS figure that may be viewed with
+{\ttfamily gv} but that should not be inserted in LaTeX
+documents. Insert the original figure in LaTeX
+documents. Instead of {\ttfamily laproof} you may just as
+well use
+{\em MPS2EPS} {\tt \aaiurl}
+.
+\end{enumerate}
+
+
+
+\subsection{Main Features}
+
+
+\subsubsection{Perspectives}
+
+{\ttfamily FEATPOST} can do three kinds of perspective.
+\begin{tscreen}
+\begin{verbatim}
+f := ( 1.2 , 2.0 , 1.6 );
+Spread := 75;
+
+V1 := (1,1,1);
+V2 := (-1,1,1);
+V3 := (-1,-1,1);
+V4 := (1,-1,1);
+V5 := (1,1,-1);
+V6 := (-1,1,-1);
+V7 := (-1,-1,-1);
+V8 := (1,-1,-1);
+makeface1(1,2,3,4);makeface2(5,6,7,8);
+makeface3(1,2,6,5);makeface4(2,3,7,6);
+makeface5(3,4,8,7);makeface6(4,1,5,8);
+makeline1(1,7);makeline2(2,8);
+makeline3(3,5);makeline4(4,6);
+
+beginfig(1);
+ ParallelProj := true;
+ SphericalDistortion := false;
+ draw_all_test(red,true);
+endfig;
+
+beginfig(2);
+ ParallelProj := false;
+ SphericalDistortion := false;
+ draw_all_test(green,true);
+endfig;
+
+beginfig(3);
+ ParallelProj := false;
+ SphericalDistortion := true;
+ PrintStep := 5;
+ draw_all_test(blue,true);
+endfig;
+
+end;
+\end{verbatim}
+\end{tscreen}
+
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/cubicfigures.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/cubicfigures.1.png}}\fi
+\caption{Orthogonal perspective.}
+\end{figure}
+\label{figcubicfigures1}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/cubicfigures.2,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/cubicfigures.2.png}}\fi
+\caption{Rigorous perspective.}
+\end{figure}
+\label{figcubicfigures2}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/cubicfigures.3,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/cubicfigures.3.png}}\fi
+\caption{Fish-eye perspective.}
+\end{figure}
+\label{figcubicfigures3}
+
+
+\subsubsection{From 3D to 2D}
+
+The most important macro is {\ttfamily rp} that converts 3D points
+to two-dimensional (2D) rigorous, orthogonal
+or fish-eye projections. To draw a line in
+3D-space try
+\begin{tscreen}
+\begin{verbatim}
+draw rp(a)--rp(b);
+\end{verbatim}
+\end{tscreen}
+where
+{\ttfamily a} and {\ttfamily b} are points in space
+(of {\ttfamily color} type).
+But if you're going for fish-eye it's better to
+\begin{tscreen}
+\begin{verbatim}
+draw pathofstraightline(a,b);
+\end{verbatim}
+\end{tscreen}
+If
+you don't know, leave it as
+\begin{tscreen}
+\begin{verbatim}
+drawsegment(a,b,withpen somepen);
+\end{verbatim}
+\end{tscreen}
+
+
+
+\subsubsection{Angles}
+
+When {\ttfamily FEATPOST} was created its main ability was
+to mark and to calculate angles. This is done with the
+macros {\ttfamily angline} and {\ttfamily getangle} as in the
+following program:
+\begin{tscreen}
+\begin{verbatim}
+f := (5,3.5,1);
+beginfig(2);
+ cartaxes(1,1,1);
+ color va, vb, vc, vd;
+ va = (0.29,0.7,1.0);
+ vb = (X(va),Y(va),0);
+ vc = N((-Y(va),X(va),0));
+ vd = (0,Y(vc),0);
+ drawarrow rp(black)--rp(va);
+ draw rp(black)--rp(vb)--rp(va) dashed evenly;
+ draw rp(vc)--rp(vd) dashed evenly;
+ drawarrow rp(black)--rp(vc);
+ squareangline( va, vc, black, 0.15 );
+ angline(va,red,black,0.75,decimal getangle(va,red),lft);
+endfig;
+\end{verbatim}
+\end{tscreen}
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/cartaxes.2,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../allpng/cartaxes.2.gs.png}}\fi
+\caption{Example that uses {\ttfamily cartaxes}, {\ttfamily angline} and {\ttfamily getangle}.}
+\end{figure}
+\label{figcartaxes2}
+
+
+\subsubsection{Intersections}
+
+The most advanced feature of {\ttfamily FEATPOST} is the
+ability to calculate the intersections of planar and
+convex polygons\footnote{Unfortunately, this is also the
+most "bugged" feature.}. It can draw the visible
+part of arbitrary sets of polygons as in
+the following program:
+\begin{tscreen}
+\begin{verbatim}
+numeric phi;
+phi = 0.5*(1+sqrt(5));
+V1 := ( 1, phi,0);V2 := (-1, phi,0);
+V3 := (-1,-phi,0);V4 := ( 1,-phi,0);
+V5 := (0, 1, phi);V6 := (0,-1, phi);
+V7 := (0,-1,-phi);V8 := (0, 1,-phi);
+V9 := ( phi,0, 1);V10:= ( phi,0,-1);
+V11:= (-phi,0,-1);V12:= (-phi,0, 1);
+makeface1(1,2,3,4);makeface2(5,6,7,8);
+makeface3(9,10,11,12);
+beginfig(1);
+ sharpraytrace;
+endfig;
+end
+\end{verbatim}
+\end{tscreen}
+
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/sharpraytrace.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../allpng/sharpraytrace.1.gs.png}}\fi
+\caption{Example that uses {\ttfamily sharpraytrace}.}
+\end{figure}
+\label{figsharpraytrace}
+
+
+\subsubsection{Coming back to 3D from 2D}
+
+It is now possible to do an "automatic perspective tuning"
+with the aid of macro {\ttfamily photoreverse} which is under
+development. Please, refer to example
+{\ttfamily photoreverse.mp} and to
+{\em FeatPost Deeper Technicalities} {\tt \aajurl}
+.
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../alleps/photoreverse.1.eps,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../allpng/photoreverse.1.gs.png}}\fi
+\caption{Example that uses {\ttfamily photoreverse}. It may
+ not work when vertical lines are not vertical in
+ average on the photo.}
+\end{figure}
+\label{figphotoreverse}
+
+
+\paragraph{Coming back to 3D from 1D}
+
+Using the same algorithm of {\ttfamily photoreverse}, the
+macro {\ttfamily improvertex} allows one to approximate a
+point in 3D-space with given distances from three other
+points (an initial guess is required).
+
+
+\section{Reference Manual}
+
+Some words about notation.
+The meaning of macro, function, procedure and routine is the same.
+Global variables are presented like this:
+\begin{tscreen}
+\begin{verbatim}
+vartype var, anothervar
+anothervartype yetanothervar
+\end{verbatim}
+\end{tscreen}
+Explanation of var, anothervar and
+yetanothervar. vartype can be any one of
+MetaPost types but the meaning
+of {\ttfamily color} is a three-dimensional point or vector, not an
+actual color like yellow, black or white. If the meaning is
+an actual color then the type will be {\ttfamily colour}.
+All global variables have default values.
+
+Functions are presented like this:
+\begin{itemize}
+\item returntype {\bfseries function()}
+Explanation of function. returntype can be any one of MetaPost
+types plus global, draw or drawlabel.
+global means that the function
+changes some of the global variables. draw means that
+the function
+changes the currentpicture. drawlabel means that the
+function changes
+the currentpicture and adds text to it.
+\begin{enumerate}
+\item {\ttfamily type1}
+Explanation of the first argument. The type of
+one argument can be any one
+of MetaPost types plus {\ttfamily suffix} or
+{\ttfamily text}.
+\item {\ttfamily type2}
+Explanation of the second argument.
+There is the possibility that the
+function has no arguments. In that case the
+function is presented like
+"returntype {\bfseries function}".
+\item Etc.
+\end{enumerate}
+\end{itemize}
+
+
+
+\subsection{Global variables}
+
+\begin{tscreen}
+\begin{verbatim}
+boolean ParallelProj
+boolean SphericalDistortion
+\end{verbatim}
+\end{tscreen}
+Kind of projection calculated by {\ttfamily rp}.
+By default projections
+are rigorous but if {\ttfamily ParallelProj} is set
+{\ttfamily true} then
+parallel lines remain parallel in the projection.
+It is the same as
+placing the point of view infinitely far without loosing
+sight.
+If {\ttfamily SphericalDistortion} is set {\ttfamily true}
+there will be a
+distortion coming from: (i) the projection being done
+on a sphere of
+center {\ttfamily f} and (ii) this sphere being plaited
+onto the paper page.
+
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/rigorousdiscSD.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/rigorousdiscSD.1.png}}\fi
+\caption{Figure that uses {\ttfamily SphericalDistortion:=true} and {\ttfamily rigorousdisc}.}
+\end{figure}
+\label{sphericaldisc}
+
+\begin{tscreen}
+\begin{verbatim}
+color f, viewcentr
+\end{verbatim}
+\end{tscreen}
+The point of view is {\ttfamily f}. The plane or sphere
+of projection contains
+the center of view {\ttfamily viewcentr}.
+The axis parallel to zz that contains the
+{\ttfamily viewcentr} is projected on a vertical line.
+\begin{tscreen}
+\begin{verbatim}
+numeric Spread
+pair ShiftV, OriginProjPagePos
+numeric PageWidth
+numeric PageHeight
+\end{verbatim}
+\end{tscreen}
+These variables control
+the placement of the projection on the
+paper. {\ttfamily Spread} is the magnification
+and {\ttfamily ShiftV} is the position of the
+{\ttfamily viewcentr} projection on the
+paper. But, if at some point in your program you introduce
+{\ttfamily produce\_auto\_scale} then the
+{\ttfamily currentpicture} will be
+centered at {\ttfamily OriginProjPagePos}
+and scaled to fit inside a rectangle of
+{\ttfamily PageWidth} by {\ttfamily PageHeight}.
+\begin{tscreen}
+\begin{verbatim}
+color V[]
+color L[]p[]
+color F[]p[]
+\end{verbatim}
+\end{tscreen}
+Vertexes, lines and faces.
+The idea here is to draw
+polygons and/or arbitrary lines in 3D space.
+Defining the polygons and
+the lines can be a bit tedious as {\ttfamily FEATPOST} is not
+interactive. First, one defines a list of the
+vertexes ({\ttfamily V[]}) that define the
+polygons and/or the lines.
+There is a list of polygons and a list of
+lines. Each polygon ({\ttfamily F[]p[]}) or
+line ({\ttfamily L[]p[]}) is itself a list of vertexes.
+All vertexes of the same poligon should belong
+to the same plane.
+\begin{tscreen}
+\begin{verbatim}
+numeric NL
+numeric npl[]
+numeric NF
+numeric npf[]
+\end{verbatim}
+\end{tscreen}
+Number of lines, number of vertexes of each line,
+number of faces, number of vertexes of each face.
+\begin{tscreen}
+\begin{verbatim}
+numeric PrintStep
+\end{verbatim}
+\end{tscreen}
+
+{\ttfamily Printstep} is the size of iterative jumps
+along lines. Used by
+{\ttfamily lineraytrace}, {\ttfamily faceraytrace} and
+{\ttfamily pathofstraightline}.
+Big {\ttfamily Printstep}s make fast raytracings.
+\begin{tscreen}
+\begin{verbatim}
+boolean FCD[]
+colour TableC[]
+numeric TableColors
+numeric FC[]
+colour HigColor
+colour SubColor
+color LightSource
+\end{verbatim}
+\end{tscreen}
+{\ttfamily FCD} means "face color defined". The
+{\ttfamily draw\_invisible} macro draws
+polygons in colour, if it is defined. The colour must be
+selected from the table of colours {\ttfamily TableC} that has
+as many as {\ttfamily TableColors}. The colour {\ttfamily FC}
+of each polygon will depend on its position relatively to
+{\ttfamily LightSource} where we suppose there is a lamp that
+emits light coloured {\ttfamily HigColor}. Furthermore the
+colour of each polygon may be modified if it belongs to a
+functional or parametric surface. In this case, if we are
+looking at the polygon from below than {\ttfamily SubColor} is
+subtracted from its colour.
+\begin{tscreen}
+\begin{verbatim}
+numeric RopeColorSeq[]
+numeric RopeColors
+\end{verbatim}
+\end{tscreen}
+
+These are used by {\ttfamily ropepattern}.
+\begin{tscreen}
+\begin{verbatim}
+numeric TDAtiplen
+numeric TDAhalftipbase
+numeric TDAhalfthick
+\end{verbatim}
+\end{tscreen}
+
+These control the shape of Three-Dimensional Arrows.
+\begin{tscreen}
+\begin{verbatim}
+boolean ShadowOn
+numeric HoriZon
+\end{verbatim}
+\end{tscreen}
+
+When {\ttfamily ShadowOn} is set {\ttfamily true}, some objects can
+cast a black shadow on a horizontal plane of {\ttfamily Z}
+coordinate equal to {\ttfamily HoriZon} (an area from
+this plane may be drawn with {\ttfamily setthestage}) as if
+there is a punctual source of light at
+{\ttfamily LightSource}.
+The macros that can produce shadows, in addition to their
+specific production, are
+\begin{itemize}
+\item {\ttfamily emptyline}
+\item {\ttfamily rigorousdisc}
+\item {\ttfamily verygoodcone}
+\item {\ttfamily tropicalglobe}
+\item {\ttfamily whatisthis}
+\item {\ttfamily kindofcube}
+\item {\ttfamily draw\_all\_test}
+\item {\ttfamily fill\_faces}
+\item {\ttfamily positivecharge}
+\end{itemize}
+
+All macros that contain {\bfseries shadow} in their name
+calculate the location of shadows (using {\ttfamily cb}).
+\begin{tscreen}
+\begin{verbatim}
+path VGAborder
+\end{verbatim}
+\end{tscreen}
+
+This path and the macro {\ttfamily produce\_vga\_border} are
+meant to help you clip the {\ttfamily currentpicture} to a 4:3
+rectangle as in a movie frame.
+\begin{tscreen}
+\begin{verbatim}
+pair PhotoPair[]
+color PhotoPoint[]
+numeric PhotoMarks
+\end{verbatim}
+\end{tscreen}
+
+These are used by {\ttfamily photoreverse}.
+\begin{tscreen}
+\begin{verbatim}
+pen ForePen, BackPen
+path CLPath
+numeric NCL
+\end{verbatim}
+\end{tscreen}
+
+These are used by {\ttfamily closedline}.
+
+
+\subsection{Definitions}
+
+\begin{itemize}
+\item global makeline@\#( text1)
+\item global makeface@\#( text1)
+\end{itemize}
+
+Both of these functions ease the task of
+defining lines and polygons. Just
+provide a list of vertexes in the right
+sequence for each polygon and/or
+line. Suppose a tetrahedron
+\begin{tscreen}
+\begin{verbatim}
+V3:=(+1,-1,-1);V2:=(-1,+1,-1);
+V4:=(+1,+1,+1);V1:=(-1,-1,+1);
+makeface2(1,2,3);makeface3(1,2,4);
+makeface1(3,4,1);makeface4(3,4,2);
+\end{verbatim}
+\end{tscreen}
+The
+number in the last makeface or last
+makeline procedure name must be the
+number of polygons or lines. All polygons and lines from 1 upto this
+number must be defined but the sorting may be any of your liking.
+
+
+\subsection{Macros}
+
+
+\subsubsection{Very Basic Macros}
+
+\begin{itemize}
+\item numeric {\bfseries X()}
+Returns the first coordinate of a point or vector (of
+color type). Replaces {\ttfamily redpart}.
+\item numeric {\bfseries Y()}
+Returns the second coordinate of a point or vector.
+Replaces {\ttfamily greenpart}.
+\item numeric {\bfseries Z()}
+Returns the second coordinate of a point or vector.
+Replaces {\ttfamily bluepart}.
+\item draw {\bfseries produce\_auto\_scale}
+The currentpicture is centered in, and adjusted
+to the size of, an A4
+paper page. This avoids the control of {\ttfamily Spread} and
+{\ttfamily ShiftV}.
+\item string {\bfseries cstr()} Converts a color into its
+string. Usefull in combination with {\ttfamily getready}.
+\item string {\bfseries bstr()} Converts a boolean expression into its
+string. Usefull in combination with {\ttfamily getready}.
+\end{itemize}
+
+
+
+\subsubsection{Vector Calculus}
+
+\begin{itemize}
+\item color {\bfseries N()} Unit vector. Returns
+{\ttfamily black} (the null vector) when the argument has
+null norm. The "N" means "normalized".
+\item numeric {\bfseries cdotprod()} Dot product of two
+vectors.
+\item color {\bfseries ccrossprod()} Cross product of two
+vectors.
+\item numeric {\bfseries ndotprod()} Cossine of the angle
+beetween two vectors.
+\item color {\bfseries ncrossprod()} Normalized cross product
+of twovectors.
+\item numeric {\bfseries conorm()} Euclidean norm of a
+vector.
+\item numeric {\bfseries getangle()} Angle beetween two
+vectors.
+\item pair {\bfseries getanglepair()} Orientation angles
+of a vector. The first angle ({\ttfamily xpart}) is
+measured beetween the vector projection on the {\ttfamily XY}
+plane and the {\ttfamily X} axis. The second angle
+({\ttfamily ypart})is measured
+beetween the vector and its projection on the {\ttfamily XY}
+plane. This may be usefull to find the arguments of
+{\ttfamily kindofcube}
+\item color {\bfseries eulerrotation()} Three-dimensional
+rotation of a vector.
+\begin{enumerate}
+\item {\ttfamily numeric} Angle of rotation around the
+{\ttfamily Z} component.
+\item {\ttfamily numeric} Angle of rotation around the
+rotated {\ttfamily Y} component.
+\item {\ttfamily numeric} Angle of rotation around the
+two times rotated {\ttfamily X} component.
+\item {\ttfamily color} Vector to be rotated.
+\end{enumerate}
+\item color {\bfseries randomfear} Generates a randomly
+oriented unit vector.
+\end{itemize}
+
+
+
+\subsubsection{Projection Macros}
+
+\begin{itemize}
+\item pair {\bfseries rp()} Converts spatial positions into
+planar positions on the paper page. The conversion
+considers the values of the following global
+variables: {\ttfamily viewcentr},
+{\ttfamily ParallelProj}, {\ttfamily SphericalDistortion},
+{\ttfamily Spread} and {\ttfamily ShiftV}. When both
+{\ttfamily ParallelProj} and {\ttfamily SphericalDistortion}
+are {\ttfamily false} it won't work if either (i) the
+vectors {\ttfamily f-viewcentr} and {\ttfamily f-R} are
+perpendicular ({\ttfamily R} is the argument) or (ii)
+{\ttfamily f} and {\ttfamily viewcentr} share the same
+{\ttfamily X} and {\ttfamily Y} coordinates.
+\begin{enumerate}
+\item {\ttfamily color} Spatial position.
+\end{enumerate}
+\item color {\bfseries cb()} Calculates the position of the
+shadow of a point. Uses {\ttfamily HoriZon} and
+{\ttfamily LightSource}.
+\begin{enumerate}
+\item {\ttfamily color} Point position.
+\end{enumerate}
+\item color {\bfseries projectpoint()} Calculates the
+intersection beetween a plane and a straight
+line. The plane contains a given point and is
+perpendicular to the line connecting the
+{\ttfamily LightSource} and this same point.
+The line is defined by another given point and the
+{\ttfamily LightSource}. Summary: {\ttfamily projectpoint}
+returns the projection of the second argument on a
+plane that contains the first argument. Can be used to
+draw shadows cast on generic planes.
+\begin{enumerate}
+\item {\ttfamily color} Origin of the projection plane.
+\item {\ttfamily color} Point to be projected.
+\end{enumerate}
+\end{itemize}
+
+
+
+\subsubsection{Plain Basic Macros}
+
+\begin{itemize}
+\item draw {\bfseries signalvertex()} Draws a dot
+sized inversely proportional to its distance from
+the viewpoint {\ttfamily f}.
+\begin{enumerate}
+\item {\ttfamily color} Location.
+\item {\ttfamily numeric} Factor of proportionality
+("size of the dot").
+\item {\ttfamily colour} Colour of the dot.
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/torus.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/torus.1.png}}\fi
+\caption{Figure that uses {\ttfamily signalvertex}.}
+\end{figure}
+\item path {\bfseries pathofstraightline()} When using
+{\ttfamily SphericalDistortion:=true}, straight lines
+look like curves. This macro returns the curved path
+of a straight line beetween two points. This path will
+have a greater {\ttfamily length} ("time") when
+{\ttfamily PrintStep} is made smaller.
+\item drawlabel {\bfseries cartaxes()}
+Cartesean axes with prescribed lenghtes and apropriate labels.
+\begin{enumerate}
+\item {\ttfamily numeric} Length of the {\ttfamily X} axe.
+\item {\ttfamily numeric} Length of the {\ttfamily Y} axe.
+\item {\ttfamily numeric} Length of the {\ttfamily Z} axe.
+\end{enumerate}
+\item draw {\bfseries emptyline()} This procedure produces
+a sort of a tube that can cross over itself. It
+facilitates the drawing of, for instance, thick
+helical curves but it won't
+look right if the curves are drawn getting apart from
+the point of view. Please, accept this inconveniance.
+As like many other {\ttfamily FEATPOST} macros this one
+can produce visually correct diagrams only in limited
+conditions. Can cast a shadow.
+\begin{enumerate}
+\item {\ttfamily boolean} Choose {\ttfamily true} to join
+this line with a previously drawn line.
+\item {\ttfamily numeric} Factor of proportionality
+("diameter of the tube"). The tubes are just
+sequences of dots drawn by {\ttfamily signalvertex}.
+\item {\ttfamily colour} Colour of the tube border.
+\item {\ttfamily colour} Colour of the tube.
+\item {\ttfamily numeric} Total number of dots on the
+tube line.
+\item {\ttfamily numeric} Fraction of the tube diameter
+that is drawn with the tube colour.
+\item {\ttfamily numeric} This is the number of dots
+that are redrawn with the colour of the tube for
+each drawn dot with the color of the tube
+border. Usually 1 or 2 are enough.
+\item {\ttfamily text} This is the name a function
+that returns a 3D point of the line for each value
+of a parameter in beetween 0 and 1.
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/joinedemptylines.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/joinedemptylines.1.png}}\fi
+\caption{Figure that uses {\ttfamily emptyline}.
+ The junction point of two different lines is indicated
+ by an arrow. Note the unperfection on the top
+ right, inside the upper turn. }
+\end{figure}
+\label{joinedemptylines}
+\item draw {\bfseries closedline()} This procedure produces
+a tube that can cross over itself. It
+facilitates the drawing of, for instance, thick
+helical curves but it won't
+look right as its thickness does not change with the
+distance from the point of view. The drawing is
+entirely done in two dimensions, so the tube diameter
+depends on the global variables {\ttfamily ForePen} and
+{\ttfamily BackPen}. There can be more than one closed
+line in a figure but all get the same diameter.
+\begin{enumerate}
+\item {\ttfamily numeric} Total number of path segments
+on the tube line.
+\item {\ttfamily numeric} Use 0.5 or more.
+\item {\ttfamily numeric} Use 0.75 or more.
+\item {\ttfamily text} This is the name a function
+that returns a 3D point of the closed line for each value
+of a parameter in beetween 0 and 1.
+\end{enumerate}
+\item drawlabel {\bfseries angline()}
+Draws an arch beetween two straight lines with a
+common point and places a label
+near the middle of the arch (marks an
+angle).
+\begin{enumerate}
+\item {\ttfamily color} Point of one line.
+\item {\ttfamily color} Point ot the other line.
+\item {\ttfamily color} Common point.
+\item {\ttfamily numeric} Distance beetween the arch and
+the common point.
+\item {\ttfamily picture} Label.
+\item {\ttfamily suffix} Position of the label relatively
+to the middle of the arch. May
+be one of {\ttfamily lft, rt, top, bot, ulft, urt,
+llft} and {\ttfamily lrt}.
+\end{enumerate}
+\item drawlabel {\bfseries anglinen()}
+The same as the previous function but the
+sixth argument is numeric:
+0={\ttfamily rt};
+1={\ttfamily urt};
+2={\ttfamily top};
+3={\ttfamily ulft};
+4={\ttfamily lft};
+5={\ttfamily llft};
+6={\ttfamily bot};
+7={\ttfamily lrt};
+any other number places the label
+on the middle of the arch.
+\item draw {\bfseries squareangline()}
+This is supposed to mark 90 degree angles
+but works for any angle value.
+\begin{enumerate}
+\item {\ttfamily color} Point of one line.
+\item {\ttfamily color} Point ot the other line.
+\item {\ttfamily color} Common point.
+\item {\ttfamily numeric} Distance beetween the "arch"
+and the common point.
+\end{enumerate}
+\item path {\bfseries rigorouscircle()}
+3D circle. The total "time" of this path is 8. This
+small number makes it easy to select parts of the
+path. The circle is drawn using the
+"left-hand-rule". If you put your left-hand thumb
+parallel the circle axe then the other left-hand
+fingers curl in the same sense as the circle
+path. This path allways starts, approching the view
+point, from a point on a diameter of the
+circle that projects orthogonaly to its axe, and
+rotating around the axe in the way of the left-hand-rule.
+\begin{enumerate}
+\item {\ttfamily color} Center of the circle.
+\item {\ttfamily color} Direction orthogonal to the
+circle (circle axe).
+\item {\ttfamily numeric} Radius of the circle.
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/anglinerigorouscircle.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../allpng/anglinerigorouscircle.1.gs.png}}\fi
+\caption{Figure that uses {\ttfamily anglinen} and {\ttfamily rigorouscircle}.}
+\end{figure}
+\item draw {\bfseries tdarrow()} Draws a flat arrow that
+begins at the first argument and ends at the second.
+The shape of the arrow is controled by the global
+variables {\ttfamily TDAtiplen, TDAhalftipbase, TDAhalfthick}.
+\item path {\bfseries twocyclestogether()} This macro
+allows you to draw any solid that has no vertexes
+and that has two, exactly two, planar cyclic edges.
+In fact, it doesn't need to be a solid. Just
+provide the pathes of both cyclic edges as arguments
+but note that the returned path is polygonal.
+In order to complete
+the drawing of this solid you have to choose one of
+the edges to be drawn immediatly afterwards. This is
+done automatically by the {\ttfamily whatisthis} macro
+for the case of two parallel and concentric ellipses.
+\item path {\bfseries ellipticpath()} Produces an elliptic
+path in 3D space.
+\begin{enumerate}
+\item {\ttfamily color} Position of the center.
+\item {\ttfamily color} Major or minor axe.
+\item {\ttfamily color} The other axe.
+\end{enumerate}
+\item drawlabel {\bfseries labelinspace()} Draw some 2D
+{\ttfamily picture} on some 3D plane (only when
+{\ttfamily ParallelProj:=true}).
+\begin{enumerate}
+\item {\ttfamily color} Position for the lower-left
+corner.
+\item {\ttfamily color} Orientation of the picture's
+bottom edge.
+\item {\ttfamily color} Orientation of the picture's
+letf edge.
+\item {\ttfamily text} 2D picture's name.
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/labelinspace.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../allpng/labelinspace.1.gs.png}}\fi
+\caption{Example that uses {\ttfamily labelinspace}.}
+\end{figure}
+\end{itemize}
+
+
+
+\subsubsection{Standard Objects}
+
+\begin{itemize}
+\item path {\bfseries goodcirclepath()}
+Another 3D circle macro. More rigorous
+than {\ttfamily rigorouscircle} but when
+the direction ortogonal to the circle is almost
+orthogonal to the line {\ttfamily viewpoint--center}
+it doesn't work correctly.
+The total "time" of this path is 36.
+\begin{enumerate}
+\item {\ttfamily color} Center of the circle.
+\item {\ttfamily color} Direction ortogonal to
+the circle.
+\item {\ttfamily numeric} Radius of the
+circle.
+\end{enumerate}
+\item draw {\bfseries spatialhalfsfear()} An
+hemisphere. Doesn't work with {\ttfamily f} inside it.
+\begin{enumerate}
+\item {\ttfamily color} Center.
+\item {\ttfamily color} Vector ortogonal to
+the frontier circle and pointing
+out of the concavity.
+\item {\ttfamily numeric} Radius of the
+(hemi)sphere.
+\end{enumerate}
+\item path {\bfseries spatialhalfcircle()}
+And yet another 3D circle macro. Only the visible or the hidden
+part. This is usefull to mark sections of
+cylinders or spherical major circles.
+\begin{enumerate}
+\item {\ttfamily color} Center of the circle.
+\item {\ttfamily color} Direction ortogonal to the
+circle.
+\item {\ttfamily numeric} Radius of the circle.
+\item {\ttfamily boolean} The visible part is selected with
+{\ttfamily true} and the hidden
+with {\ttfamily false}.
+\end{enumerate}
+\item draw {\bfseries rigorousdisc()}
+3D opaque cylinder with/without a hole. Can cast a
+shadow (without the hole).
+\begin{enumerate}
+\item {\ttfamily numeric} Ray of an axial hole.
+\item {\ttfamily boolean} Option for completly opaque cylinder
+({\ttfamily true}) or partial
+pipe ({\ttfamily false}) when there is no hole. When
+the cylinder has an hole this option should be
+{\ttfamily true}.
+\item {\ttfamily color} Center of one circular base.
+\item {\ttfamily numeric} Radius of both circular bases.
+\item {\ttfamily color} Vector that defines the length and
+orientation of the
+cylinder. The addition the third and fifth
+arguments should give the
+position of the center of the other circular base.
+\end{enumerate}
+\item draw {\bfseries verygodcone()} 3D cone. Can cast a shadow.
+\begin{enumerate}
+\item {\ttfamily bolean} Option to draw dashed evenly
+the invisible edge ({\ttfamily true}) or not
+({\ttfamily false}).
+\item {\ttfamily color} Center of the circular base.
+\item {\ttfamily color} Direction ortogonal to the
+circular base.
+\item {\ttfamily numeric} Radius of the circular base.
+\item {\ttfamily color} Position of the vertex
+\end{enumerate}
+\item path {\bfseries rigorousfearpath()}
+3D sphere. Simple but hard.
+\begin{enumerate}
+\item {\ttfamily color} Center position.
+\item {\ttfamily numeric} Radius.
+\end{enumerate}
+\item draw {\bfseries tropicalglobe()} Globe with
+minor circles. Can cast a shadow.
+\begin{enumerate}
+\item {\ttfamily numeric} Number of marked latitudes.
+\item {\ttfamily color} Center position.
+\item {\ttfamily numeric} Radius
+\item {\ttfamily color} Axe orientation.
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/tropicalglobe.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/tropicalglobe.1.png}}\fi
+\caption{Figure that uses {\ttfamily tropicalglobe}.
+ }
+\end{figure}
+\item draw {\bfseries whatisthis()} An elliptic
+frustum. Both edges are elliptic an have the same
+orientation but one may be greater than the other.
+Can cast a shadow.
+\begin{enumerate}
+\item {\ttfamily color} Reference edge center.
+\item {\ttfamily color} Major or minor axe.
+\item {\ttfamily color} The other axe.
+\item {\ttfamily numeric} Length of the original
+cylinder.
+\item {\ttfamily numeric} Edges axes length ratio.
+\end{enumerate}
+\item draw {\bfseries kindofcube()} Polyhedron with six
+orthogonal faces (cuboid).
+\begin{enumerate}
+\item {\ttfamily boolean} Also draw the invisible edges
+{\ttfamily dashed evenly} ({\ttfamily true}) or do not.
+\item {\ttfamily boolean} The reference point may be a
+vertex ({\ttfamily true}) or the center({\ttfamily false}).
+\item {\ttfamily color} Reference point.
+\item {\ttfamily numeric} Alpha1.
+\item {\ttfamily numeric} Alpha2.
+\item {\ttfamily numeric} Alpha3.
+\item {\ttfamily numeric} L1. Length of the first side.
+\item {\ttfamily numeric} L2. Length of the second side.
+\item {\ttfamily numeric} L3. Length of the third side.
+\end{enumerate}
+
+These arguments are represented in the next figure.
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/kindofcube.2,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../allpng/kindofcube.2.gs.png}}\fi
+\caption{Figure that uses and explains {\ttfamily kindofcube}. Note that the three indicated
+ angles may be used as arguments of {\ttfamily eulerrotation}.}
+\end{figure}
+\label{kindofcube2}
+\item draw {\bfseries setthestage()} Produces an horizontal
+square made of squares. Its {\ttfamily Z} coordinate is defined by
+{\ttfamily HoriZon}.
+\begin{enumerate}
+\item {\ttfamily numeric} Number of squares in each side.
+\item {\ttfamily numeric} Size of each side.
+\end{enumerate}
+\item draw {\bfseries setthearena()} Produces an horizontal
+circle made of circles. Its {\ttfamily Z} coordinate is defined by
+{\ttfamily HoriZon}. Due to the fact that the center of a
+circle is not on the center of its central perspective
+projection, this may look a bit strange.
+\begin{enumerate}
+\item {\ttfamily numeric} Number of circles on a
+diameter.
+\item {\ttfamily numeric} Diameter.
+\end{enumerate}
+\item draw {\bfseries smoothtorus()} Toxic donut (not to be
+eaten). Produces an error message when {\ttfamily f} is
+close to the table.
+\begin{enumerate}
+\item {\ttfamily color} Center.
+\item {\ttfamily color} Direction orthogonal to the
+torus plane.
+\item {\ttfamily numeric} Big ray.
+\item {\ttfamily numeric} Small ray.
+\end{enumerate}
+\end{itemize}
+
+
+
+\subsubsection{Composed Objects}
+
+\begin{itemize}
+\item draw {\bfseries positivecharge()} Draws a sphere with a
+plus or minus sign on the surface. The horizontal
+segment of the sign is drawn on the horizontal plane
+that contains the sphere center. The middle point of
+this segment is on a vertical plane containing the
+viewpoint.
+\begin{enumerate}
+\item {\ttfamily boolean} Selects the sign ({\ttfamily true}
+means positive).
+\item {\ttfamily color} Position of the center.
+\item {\ttfamily numeric} Sphere ray.
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/positivecharge.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/positivecharge.1.png}}\fi
+\caption{Figure that uses {\ttfamily positivecharge},
+ {\ttfamily getready} and {\ttfamily doitnow}.
+ }
+\end{figure}
+\item draw {\bfseries simplecar()} Draws a cuboid and four
+discs in a configuration ressembling an automobile. The
+first three arguments of {\ttfamily simplecar} are the same
+as the the last seven arguments of {\ttfamily kindofcube}
+but grouped in colors.
+\begin{enumerate}
+\item {\ttfamily color} Center of the cuboid that
+constitutes the body of the car..
+\item {\ttfamily color} Angles defining the orientation
+of the car (see {\ttfamily kindofcube}).
+\item {\ttfamily color} Dimensions of the car.
+\item {\ttfamily color} Characteristics of the front
+wheels. {\ttfamily redpart}-distance from the
+front. {\ttfamily greenpart}-width of the front wheels (length
+of the cylinders). {\ttfamily bluepart}-wheel ray.
+\item {\ttfamily color} Same as above for the rear wheels
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/simplecar.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/simplecar.1.png}}\fi
+\caption{Figure that uses {\ttfamily setthearena} and
+ {\ttfamily simplecar}. }
+\end{figure}
+\end{itemize}
+
+
+
+\subsubsection{Shadow Pathes}
+
+\begin{itemize}
+\item draw {\bfseries signalshadowvertex()} Draws the
+shadow of a {\ttfamily signalvertex} dot.
+\begin{enumerate}
+\item {\ttfamily color} Location of the light-blocking dot.
+\item {\ttfamily numeric} Factor of proportionality
+("size of the dot").
+\item {\ttfamily colour} Colour of the dot.
+\end{enumerate}
+\item path {\bfseries ellipticshadowpath()} Produces the
+shadow of an elliptic path.
+\begin{enumerate}
+\item {\ttfamily color} Position of the center.
+\item {\ttfamily color} Major or minor axe.
+\item {\ttfamily color} The other axe.
+\end{enumerate}
+\item path {\bfseries circleshadowpath()} Produces the
+shadow of a circle.
+\begin{enumerate}
+\item {\ttfamily color} Center of the circle.
+\item {\ttfamily color} Direction ortogonal to
+the circle.
+\item {\ttfamily numeric} Radius of the
+circle.
+\end{enumerate}
+\item path {\bfseries rigorousfearshadowpath()}
+3D sphere shadow.
+\begin{enumerate}
+\item {\ttfamily color} Center position.
+\item {\ttfamily numeric} Radius.
+\end{enumerate}
+\end{itemize}
+
+
+
+\subsubsection{Differential Equations}
+
+Before we proceed, be aware that solving differential
+equations (DE) is mainly an experimental activity. The most
+probable result of a procedure that atempts to solve a DE
+is garbage. The procedure may be unstable, the solution
+may be littered with singularities or something may go
+wrong. If you don't have a basic understanding of
+differential equations then skip this section, please.
+
+\begin{itemize}
+\item path {\bfseries fieldlinepath()} A vectorial field line is
+everywhere tangent to the field vectors.
+Two different parallel fields
+have the same field lines. So the field only
+constrains the direction of the field lines, not any kind
+of "speed" and, therefore, it is recommended to
+normalize the field before using this macro that
+contains a second-order Runge-Kutta method
+implementation.
+\begin{enumerate}
+\item {\ttfamily numeric} Total number of steps.
+\item {\ttfamily color} Initial position.
+\item {\ttfamily numeric} Step (arc)length.
+\item {\ttfamily text} Name of the function that
+returns a field vector for each 3D position.
+\end{enumerate}
+\item path {\bfseries trajectorypath()} The acceleration of a
+particle in a conservative force field is equal to the
+ratio (conservative force)/(particle mass). The
+acceleration is also equal to the second order time
+derivative of the particle position. This produces a
+second order differential equation that we solve using a
+second-order Runge-Kutta method implementation.
+\begin{enumerate}
+\item {\ttfamily numeric} Total number of steps.
+\item {\ttfamily color} Initial position.
+\item {\ttfamily color} Initial velocity.
+\item {\ttfamily numeric} Time step.
+\item {\ttfamily text} Name of the function that
+returns a (force/mass) vector for each 3D position.
+\end{enumerate}
+\item path {\bfseries magnetictrajectorypath()} The
+acceleration of a
+charged particle in a magnetic field is equal to the
+ratio (magnetic force)/(particle mass) but the magnetic
+force depends on both the velocity and the magnetic field. The
+acceleration is also equal to the second order time
+derivative of the particle position. This produces a
+second order differential equation that we solve using a
+fourth-order Runge-Kutta method implementation.
+\begin{enumerate}
+\item {\ttfamily numeric} Total number of steps.
+\item {\ttfamily color} Initial position.
+\item {\ttfamily color} Initial velocity.
+\item {\ttfamily numeric} Time step.
+\item {\ttfamily text} Name of the function that
+returns a (charge)*(magnetic field)/(partcle mass)
+vector for each 3D position.
+\end{enumerate}
+\end{itemize}
+
+
+
+\subsubsection{Renderers}
+
+\begin{itemize}
+\item draw {\bfseries sharpraytrace} Heavy procedure that
+draws only the visible part of all edges of all defined
+faces. There's no point in using this procedure when
+there are no intersections beetween faces. Any how
+this will not work for non-convex faces nor when
+{\ttfamily SphericalDistortion:=true}.
+\item draw {\bfseries lineraytrace()} Draws only the
+visible part of all defined lines using sequences of dots
+({\ttfamily signalvertex} and {\ttfamily PrintStep}).
+\begin{enumerate}
+\item {\ttfamily numeric} Dot size.
+\item {\ttfamily colour} Dot colour.
+\end{enumerate}
+\item draw {\bfseries faceraytrace()} Draws only the
+visible part of all edges of all defined faces
+using sequences of dots
+({\ttfamily signalvertex} and {\ttfamily PrintStep}).
+\begin{enumerate}
+\item {\ttfamily numeric} Dot size.
+\item {\ttfamily colour} Dot colour.
+\end{enumerate}
+\item draw {\bfseries draw\_all\_test()} Draws all defined
+edges (and lines) in a correct way independently of
+the kind of projection used. Can cast a shadow (but
+the shadow is not correct when
+{\ttfamily SphericalDistortion:=true}).
+\begin{enumerate}
+\item {\ttfamily colour} Colour of the segments.
+\item {\ttfamily boolean} If {\ttfamily true} the lines
+are also drawn.
+\end{enumerate}
+\item draw {\bfseries fill\_faces()} Unfills and draws all
+faces in the order they were defined (without
+sorting). Can cast a shadow.
+\begin{enumerate}
+\item {\ttfamily text} Like the argument of
+{\ttfamily drawoptions} but used only inside this
+macro and only for the edges.
+\end{enumerate}
+\item draw {\bfseries draw\_invisible()} This is a fast way
+of removing hidden lines that doesn't
+allow for intersecting polygons nor
+polygons of very different area. It works by
+sorting all polygons by
+distance to {\ttfamily f} and then by "filling" the
+polygons. This routine may be used to draw graphs
+of 3D surfaces.
+\begin{enumerate}
+\item {\ttfamily boolean} If {\ttfamily true} polygons are
+sorted relatively to
+nearest vertex and, if {\ttfamily false}, relatively to their
+mass center. Choose {\ttfamily false} for surface
+plots.
+\item {\ttfamily boolean} If {\ttfamily false} then the
+polygons are painted with their {\ttfamily FC} colour
+modified by {\ttfamily LightSource}. If {\ttfamily true}
+then the next two arguments are used and the
+polygons are darkened proportionaly to their
+distance from {\ttfamily f}.
+\item {\ttfamily colour} Colour of faces.
+\item {\ttfamily colour} Colour of the edges.
+\end{enumerate}
+\item global {\bfseries getready()} When you don't want to
+edit the source of the MetaPost program, to resort the
+objects so they'll be drawn correctly, use this macro
+and the next.
+\begin{enumerate}
+\item {\ttfamily string} Command line that would draw
+some object. For instance:
+{\ttfamily "rigorousfearpath(black,1);"}.
+\item {\ttfamily color} Reference position of that
+object.
+\end{enumerate}
+\item draw {\bfseries doitnow} The reference positions
+given as arguments of previous {\ttfamily getready} calls
+are used to sort and draw the objects also given as
+string arguments to previous {\ttfamily getready}
+calls. Remember to initialize {\ttfamily Nobjects:=0;}
+before a second figure.
+\end{itemize}
+
+
+
+\subsubsection{Nematics (Direction Fields)}
+
+Nematics are the least ordered liquid crystals. Their
+configurations can be described by direction fields
+(vector fields without arrows). The two following routines
+ease the task of representing their configurations.
+
+\begin{itemize}
+\item global {\bfseries generatedirline()} Defines a single
+straight line segment in a given position and with a
+given orientation.
+\begin{enumerate}
+\item {\ttfamily numeric} Line index number.
+\item {\ttfamily numeric} Angle beetween the {\ttfamily X}
+axe and the projection of the line on the
+{\ttfamily XY} plane.
+\item {\ttfamily numeric} Angle beetween the line
+and the {\ttfamily XY} plane.
+\item {\ttfamily numeric} Line (arc)length.
+\item {\ttfamily color} Position of the line middle
+point.
+\end{enumerate}
+\item draw {\bfseries director\_invisible()} This is a
+direction field renderer that can sort direction
+lines. This routine
+draws straight lines of given "thickness" beetween the
+first all the points
+of all the {\ttfamily L[]p[]} lines. It is supposed to
+help you draw vector fields
+without arrows but taking care of invisibility.
+The lines may be
+generated by {\ttfamily generatedirline} or by other macros.
+\begin{enumerate}
+\item {\ttfamily boolean} When there is no need to sort
+lines you may use {\ttfamily false} here.
+\item {\ttfamily numeric} "Thickness" of the
+direction lines
+\item {\ttfamily boolean} Use {\ttfamily true} for cyclic
+"direction" lines.
+\end{enumerate}
+\end{itemize}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/twistflat.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/twistflat.1.png}}\fi
+\caption{Figure that uses {\ttfamily director\_invisible} and {\ttfamily generatedirline}.}
+\end{figure}
+
+
+
+\subsubsection{Surface Plots}
+
+Many powerfull plotting packages like
+{\ttfamily
+{\em gnuplot} {\tt \aakurl}
+} and
+{\ttfamily
+{\em gri} {\tt \aalurl}
+}
+are freely available. Because of this, {\ttfamily FEATPOST}
+surface plots are geared towards unusual features like
+equilateral triangular grid, hexagonal domain and merging
+together functional and parametric surface descriptions.
+
+\begin{itemize}
+\item draw {\bfseries hexagonaltrimesh()} Plots a
+functional surface on a triangular or hexagonal
+domain. Uses the {\ttfamily LightSource}.
+\begin{enumerate}
+\item {\ttfamily boolean} Select the kind of
+domain. {\ttfamily true} for hexagonal and
+{\ttfamily false} for triangular. The domain is
+centered on the origin ({\ttfamily black}). When the
+domain is hexagonal two of its corners are on the
+{\ttfamily -YY} axe. When the
+domain is triangular one of its corners is on the
+{\ttfamily X} axe.
+\item {\ttfamily numeric} Number of small triangles on
+each side of the triangular domain or three times
+the number of small triangles on
+each side of the hexagonal domain.
+\item {\ttfamily numeric} Length of the triangular
+domain side or three times the hexagonal domain
+side.
+\item {\ttfamily text} Name of the function that
+returns the {\ttfamily Z} coordinate of a surface
+point of coordinates {\ttfamily X} and {\ttfamily Y}.
+\end{enumerate}
+
+\begin{figure}[tbp]
+\ifpdf
+
+\else
+\centerline{\epsfig{file=../allps/hexagonaltrimesh.1,height=5cm,angle=0}}\fi
+\ifpdf
+\centerline{\epsfig{file=../nontextualpng/hexagonaltrimesh.1.png}}\fi
+\caption{Figure that uses {\ttfamily hexagonaltrimesh}.
+ }
+\end{figure}
+\item global {\bfseries partrimesh()} Defines a parametric
+surface that can be drawn with
+{\ttfamily draw\_invisible}. In the following descriptions
+{\ttfamily S} and {\ttfamily T} are the parameters. Remember
+to initialize {\ttfamily NF}. The surface is defined so
+that quadrangles are used whenever possible. If
+impossible, two triangles are used but their
+orientation is selected to maximize the surface
+smoothness. Also note that, unlike
+{\ttfamily hexagonaltrimesh()}, the spatial range you
+require to be visible is always first reshaped into a
+cube and second compressed or extended vertically. How
+much the cube is compressed or extended depends on the
+last {\ttfamily numeric} argument, the compression factor
+for {\ttfamily Z}, meaning that the final height of the
+cube is 2/(compression factor). Thanks to Sebastian
+Sturm for pointing the need to explain this.
+\begin{enumerate}
+\item {\ttfamily numeric} Number of {\ttfamily T} steps.
+\item {\ttfamily numeric} Number of {\ttfamily S} steps.
+\item {\ttfamily numeric} Minimal {\ttfamily T} value.
+\item {\ttfamily numeric} Maximal {\ttfamily T} value.
+\item {\ttfamily numeric} Minimal {\ttfamily S} value.
+\item {\ttfamily numeric} Maximal {\ttfamily S} value.
+\item {\ttfamily numeric} Minimal {\ttfamily X} value.
+\item {\ttfamily numeric} Maximal {\ttfamily X} value.
+\item {\ttfamily numeric} Minimal {\ttfamily Y} value.
+\item {\ttfamily numeric} Maximal {\ttfamily Y} value.
+\item {\ttfamily numeric} Minimal {\ttfamily Z} value.
+\item {\ttfamily numeric} Maximal {\ttfamily Z} value.
+\item {\ttfamily numeric} Compression factor for {\ttfamily Z}
+values.
+\item {\ttfamily text} Name of the function that
+returns a surface point (of {\ttfamily color} type)
+for each pair ({\ttfamily S},{\ttfamily T}).
+\end{enumerate}
+\end{itemize}
+
+
+\end{document}
diff --git a/Master/texmf-dist/doc/metapost/featpost/latex/mflogohack.sty b/Master/texmf-dist/doc/metapost/featpost/latex/mflogohack.sty
new file mode 100644
index 00000000000..7bf5f31aac8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/latex/mflogohack.sty
@@ -0,0 +1,31 @@
+%%
+%% This is file `mflogohack.sty',
+%%
+%% Copyright (C) 1994--1999 Ulrik Vieth
+%% Hacked without right 2004 L. Nobre G.
+%%
+%% This file is part of the `featpost' package.
+%%
+%% This program is free software; you can redistribute it and/or
+%% modify it under the terms of the LaTeX Project Public License
+%% as described in lppl.txt in the base LaTeX distribution; either
+%% version 1 of the License, or (at your option) any later version.
+%%
+%% This program is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{mflogohack}
+[2004/01/29 LaTeX package for Metafont, MetaPost, FeatPost and ANEEMATE logos]
+\DeclareRobustCommand\logofamily{%
+ \not@math@alphabet\logofamily\relax
+ \fontencoding{U}\fontfamily{logo}\selectfont}
+\DeclareTextFontCommand{\textlogo}{\logofamily}
+\def\MF{\textlogo{META}\@dischyph\textlogo{FONT}\@}
+\def\MP{\textlogo{META}\@dischyph\textlogo{POST}\@}
+\def\FP{\textlogo{FEAT}\@dischyph\textlogo{POST}\@}
+\def\AM{\textlogo{ANEE}\@dischyph\textlogo{MATE}\@}
+\endinput
+%%
+%% End of file `mflogohack.sty'.
diff --git a/Master/texmf-dist/doc/metapost/featpost/latex/null.sty b/Master/texmf-dist/doc/metapost/featpost/latex/null.sty
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/latex/null.sty
diff --git a/Master/texmf-dist/doc/metapost/featpost/latex/qwertz.sty b/Master/texmf-dist/doc/metapost/featpost/latex/qwertz.sty
new file mode 100644
index 00000000000..aeade62b172
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/latex/qwertz.sty
@@ -0,0 +1,19 @@
+
+% qwertz TeX macros
+
+\catcode`\"=12
+\sloppy
+\newtheorem{definition}{Definition}
+\newtheorem{proposition}{Proposition}
+\newtheorem{lemma}{Lemma}
+\newtheorem{corollary}{Corollary}
+\newtheorem{theorem}{Theorem}
+\newcommand{\mch}[1]{{\ifmmode#1 \else\(#1\)\fi}}
+\newcommand{\lt}{{\ifmmode{<}\else{\verb+<+}\fi}}
+\newcommand{\gt}{{\ifmmode{>}\else{\verb+>+}\fi}}
+\newcommand{\verbar}{{\ifmmode{|}\else{\tt|}\fi}}
+\newcommand{\idx}[1]{#1\index{#1}}
+\newcommand{\cdx}[1]{#1\index{#1@{\tt #1}}}
+\newcommand{\nidx}[1]{\index{#1}}
+\newcommand{\ncdx}[1]{\index{#1@{\tt #1}}}
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/macro/README.macro b/Master/texmf-dist/doc/metapost/featpost/macro/README.macro
new file mode 100644
index 00000000000..e0ee0478491
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/macro/README.macro
@@ -0,0 +1,13 @@
+The first thing to do here is
+
+ inimpost featpost
+
+But it would be more standard
+putting "featpost3Dplus2D.mp"
+inside /usr/share/texmf/metapost/misc/,
+launching the command "texhash"
+and than uncommenting the line
+
+ %input featpost3Dplus2D;
+
+in the example files.
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/cylimple.1.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/cylimple.1.png
new file mode 100644
index 00000000000..812f8d4487b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/cylimple.1.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/globe.1.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/globe.1.png
new file mode 100644
index 00000000000..9b016f22a45
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/globe.1.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorouscone.1.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorouscone.1.png
new file mode 100644
index 00000000000..18081be89cd
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorouscone.1.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorousfearpath.1.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorousfearpath.1.png
new file mode 100644
index 00000000000..eab2f9397b6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rigorousfearpath.1.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rotatnlc.1.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rotatnlc.1.png
new file mode 100644
index 00000000000..41dcb61fa9c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/rotatnlc.1.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/stageforthree.2.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/stageforthree.2.png
new file mode 100644
index 00000000000..78536f22e49
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/stageforthree.2.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.5.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.5.png
new file mode 100644
index 00000000000..8b10502aef5
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.5.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.6.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.6.png
new file mode 100644
index 00000000000..a306e87699f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/torus.6.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/nontextualpng/triangulartrimesh.1.png b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/triangulartrimesh.1.png
new file mode 100644
index 00000000000..b60d9ddc666
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/nontextualpng/triangulartrimesh.1.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/border140.png b/Master/texmf-dist/doc/metapost/featpost/png/border140.png
new file mode 100644
index 00000000000..00fce80f1ce
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/border140.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/borderframetest.png b/Master/texmf-dist/doc/metapost/featpost/png/borderframetest.png
new file mode 100644
index 00000000000..c74f9aba96b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/borderframetest.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/composite.png b/Master/texmf-dist/doc/metapost/featpost/png/composite.png
new file mode 100644
index 00000000000..ac67893127d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/composite.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/downloadicon.png b/Master/texmf-dist/doc/metapost/featpost/png/downloadicon.png
new file mode 100644
index 00000000000..7ef2e9f90bf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/downloadicon.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/experfilminifram.png b/Master/texmf-dist/doc/metapost/featpost/png/experfilminifram.png
new file mode 100644
index 00000000000..5578049414a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/experfilminifram.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/featpost2.png b/Master/texmf-dist/doc/metapost/featpost/png/featpost2.png
new file mode 100644
index 00000000000..44b5f8ede98
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/featpost2.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/inifram.png b/Master/texmf-dist/doc/metapost/featpost/png/inifram.png
new file mode 100644
index 00000000000..b936a20286a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/inifram.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/lcdistortsallinifram.png b/Master/texmf-dist/doc/metapost/featpost/png/lcdistortsallinifram.png
new file mode 100644
index 00000000000..319c96c7564
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/lcdistortsallinifram.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/metapostlace.png b/Master/texmf-dist/doc/metapost/featpost/png/metapostlace.png
new file mode 100644
index 00000000000..de39b3c09e5
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/metapostlace.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/png/myicon.png b/Master/texmf-dist/doc/metapost/featpost/png/myicon.png
new file mode 100644
index 00000000000..17a2a2376c2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/png/myicon.png
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/featpost/typesetinspace/README.mpy b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/README.mpy
new file mode 100644
index 00000000000..a5903bcd0ec
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/README.mpy
@@ -0,0 +1,21 @@
+The files contained in this directory are, probably, obsolete copies
+of the files with the same name that you should retrieve from
+
+http://www.pragma-ade.com/context/current/cont-tmf.zip
+
+unless you already have CONTEXT installed. These files are provided
+here as an unwarranted short-cut to start experimenting typography
+in three-dimensional space with the aid of FeatPost macro
+"closedpathinspace". See featpost/example/standard/eemcsblabla.mp
+
+Run
+ mpost example.mp
+ perl makempy.pl example --noclean
+
+This will produce the MetaPost program
+ mpy-example.tmp
+that contains the text of example.mp as paths.
+
+These instructions may be found at the end of
+http://matagalatlante.org/nobre/hyt/technicaldrawfromphoto.html
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/typesetinspace/example.mp b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/example.mp
new file mode 100644
index 00000000000..befdb336304
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/example.mp
@@ -0,0 +1,17 @@
+input mp-grph ;
+
+% graphictextformat := "context" ;
+% graphictextformat := "plain" ;
+graphictextformat := "latex" ;
+graphictextdirective "\documentclass[]{article}\usepackage{mathpazo}" ;
+
+beginfig(1);
+ graphictext
+ "\vbox{\hsize10cm $E=mc^2$, bl\'{a}-bl\'{a}.}"
+ scaled 8
+ withdrawcolor blue
+ withfillcolor red
+ withpen pencircle scaled 2pt ;
+endfig;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/typesetinspace/exampleminimal.mp b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/exampleminimal.mp
new file mode 100644
index 00000000000..639ac3b5d20
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/exampleminimal.mp
@@ -0,0 +1,7 @@
+input mp-grph ;
+beginfig(1);
+ string it;
+ it = "N\~{a}o d\'{a}!";
+ graphictext it;
+endfig;
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/typesetinspace/makempy.pl b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/makempy.pl
new file mode 100644
index 00000000000..5b52ee0bb11
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/makempy.pl
@@ -0,0 +1,365 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+#D \module
+#D [ file=makempy.pl,
+#D version=2000.12.14,
+#D title=\METAFUN,
+#D subtitle=\METAPOST\ Text Graphics,
+#D author=Hans Hagen,
+#D date=\currentdate,
+#D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+#C
+#C This module is part of the \CONTEXT\ macro||package and is
+#C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+#C details.
+
+# Tobias Burnus provided the code needed to proper testing
+# of binaries on UNIX as well as did some usefull suggestions
+# to improve the functionality.
+
+# This script uses GhostScript and PStoEdit as well as
+# pdfTeX, and if requested TeXEdit and ConTeXt.
+
+# todo: we can nowadays do without the intermediate step, because GS
+# can now handle PDF quite good
+
+use Getopt::Long ;
+use Config ;
+use strict ;
+
+$Getopt::Long::passthrough = 1 ; # no error message
+$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
+
+my $help = 0 ;
+my $silent = 0 ;
+my $force = 0 ;
+my $noclean = 0 ;
+
+my $amethod = my $pmethod = my $gmethod = 0 ;
+
+my $format = "plain" ; # can be "context" for plain users too
+
+&GetOptions
+ ( "help" => \$help ,
+ "silent" => \$silent ,
+ "force" => \$force ,
+ "pdftops" => \$pmethod ,
+ "xpdf" => \$pmethod ,
+ "acrobat" => \$amethod ,
+ "reader" => \$amethod ,
+ "gs" => \$gmethod ,
+ "ghostscript" => \$gmethod ,
+ "noclean" => \$noclean ) ;
+
+my $mpochecksum = 0 ;
+
+my %tex ; my %start ; my %stop ;
+
+$tex{plain} = "pdftex" ;
+$tex{latex} = "pdflatex" ;
+$tex{context} = "texexec --batch --once --interface=en --pdf" ;
+
+$start{plain} = '' ;
+$stop{plain} = '\end' ;
+
+$start{latex} = '\begin{document}' ;
+$stop{latex} = '\end{document}' ;
+
+$start{context} = '\starttext' ;
+$stop{context} = '\stoptext' ;
+
+my $ghostscript = "" ;
+my $pstoedit = "" ;
+my $pdftops = "" ;
+my $acroread = "" ;
+
+my $wereondos = ($Config{'osname'} =~ /dos|mswin/io) ;
+
+# Unix only: assume that "gs" in the path. We could also
+# use $ghostscipt = system "which gs" but this would require
+# that which is installedd on the system.
+
+sub checkenv
+ { my ($var, $env) = @_ ;
+ if ($var)
+ { return $var }
+ elsif ($ENV{$env})
+ { return $ENV{$env} }
+ else
+ { return $var } }
+
+$ghostscript = checkenv ($ghostscript, "GS_PROG" ) ;
+$ghostscript = checkenv ($ghostscript, "GS" ) ;
+$pstoedit = checkenv ($pstoedit , "PSTOEDIT") ;
+$pdftops = checkenv ($pdftops , "PDFTOPS" ) ;
+$acroread = checkenv ($acroread , "ACROREAD") ;
+
+sub setenv
+ { my ($var, $unix, $win) = @_ ;
+ if ($var)
+ { return $var }
+ elsif ($wereondos)
+ { return $win }
+ else
+ { return $unix } }
+
+$ghostscript = setenv($ghostscript, "gs" , "gswin32c") ;
+$pstoedit = setenv($pstoedit , "pstoedit", "pstoedit") ;
+$pdftops = setenv($pdftops , "pdftops" , "pdftops" ) ;
+$acroread = setenv($acroread , "acroread", "" ) ;
+
+# Force a method if unknown.
+
+unless ($pmethod||$amethod||$gmethod)
+ { if ($wereondos) { $pmethod = 1 } else { $amethod = 1 } }
+
+# Set the error redirection used under Unix:
+# stderr -> stdout
+
+my $logredirection = '>>' ;
+
+# This unfortunally doesn't work with the ksh and simple sh
+#
+# if (!$wereondos)
+# { $logredirection = '2>&1 >>' ; # Bash
+# $logredirection = '>>&' ; # tcsh, Bash
+# default $logredirection. }
+
+# Some TeX Code Snippets.
+
+my $macros = '
+
+% auxiliary macros
+
+\input supp-mis.tex
+
+\def\startTEXpage[scale=#1]%
+ {\output{}
+ \batchmode
+ \pdfoutput=1
+ \pdfcompresslevel=9
+ \hoffset=-1in
+ \voffset=\hoffset
+ \scratchcounter=#1
+ \divide\scratchcounter1000
+ \edef\TEXscale{\the\scratchcounter\space}
+ \forgetall
+ \setbox0=\vbox\bgroup}
+
+\def\stopTEXpage
+ {\egroup
+ \dimen0=\ht0 \advance\dimen0 \dp0
+ \setbox2=\vbox to 10\dimen0
+ {\pdfliteral{\TEXscale 0 0 \TEXscale 0 0 cm}
+ \copy0
+ \pdfliteral{1 0 0 1 0 0 cm}
+ \vfill}
+ \wd2=10\wd0
+ \pdfpageheight=\ht2
+ \pdfpagewidth=\wd2
+ \ScaledPointsToBigPoints{\number\pdfpageheight}\pdfcropheight
+ \ScaledPointsToBigPoints{\number\pdfpagewidth }\pdfcropwidth
+ \expanded{\pdfpageattr{/CropBox [0 0 \pdfcropwidth \space \pdfcropheight]}}
+ \shipout\hbox{\box2}}
+
+% end of auxiliary macros' ;
+
+sub report
+ { return if $silent ;
+ my $str = shift ;
+ if ($str =~ /(.*?)\s+([\:\/])\s+(.*)/o)
+ { if ($1 eq "") { $str = " " } else { $str = $2 }
+ print sprintf("%22s $str %s\n",$1,$3) } }
+
+sub error
+ { report("processing aborted : " . shift) ;
+ exit }
+
+sub process
+ { report("generating : " . shift) }
+
+sub banner
+ { return if $silent ;
+ print "\n" ;
+ report ("MakeMPY 1.1 - MetaFun / PRAGMA ADE 2000-2004") ;
+ print "\n" }
+
+my $metfile = "" ; # main metapost file
+my $mpofile = "" ; # metapost text specifiation file (provided)
+my $mpyfile = "" ; # metapost text picture file (generated)
+my $texfile = "" ; # temporary tex file
+my $pdffile = "" ; # temporary pdf file
+my $tmpfile = "" ; # temporary metapost file
+my $posfile = "" ; # temporary postscript file
+my $logfile = "" ; # temporary log file
+my $errfile = "" ; # final log file (with suffix log)
+
+sub show_help_info
+ { banner ;
+ report ("--help : this message" ) ;
+ report ("--noclean : don't remove temporary files" ) ;
+ report ("--force : force processing (ignore checksum)" ) ;
+ report ("--silent : don't show messages" ) ;
+ print "\n" ;
+ report ("--acrobat : use acrobat (reader) for pdf->ps (on unix)") ;
+ report ("--pdftops : use pdftops (xpdf) pdf->ps") ;
+ report ("--ghostscript : use ghostscript (gs) for pdf->ps") ;
+ print "\n" ;
+ report ("input file : metapost file with graphics") ;
+ report ("programs needed : texexec and english context") ;
+ report (" : pdftops from the xpdf suite, or") ; # page size buggy
+ report (" : pdf2ps and ghostscript, or") ;
+ report (" : acrobat reader for unix, and") ;
+ report (" : pstoedit and ghostscript") ;
+ report ("output file : metapost file with pictures") ;
+ exit }
+
+sub check_input_file
+ { my $file = $ARGV[0] ;
+ if ((!defined($file))||($file eq ""))
+ { banner ; error("no filename given") }
+ else
+ { $file =~ s/\.mp.*$//o ;
+ $metfile = "$file.mp" ;
+ $mpofile = "$file.mpo" ;
+ $mpyfile = "$file.mpy" ;
+ $logfile = "$file.log" ;
+ $texfile = "mpy-$file.tex" ;
+ $pdffile = "mpy-$file.pdf" ;
+ $posfile = "mpy-$file.pos" ;
+ $tmpfile = "mpy-$file.tmp" ;
+ $errfile = "mpy-$file.log" ;
+ if (! -f $metfile)
+ { banner ; error("$metfile is empty") }
+ elsif (-s $mpofile < 32)
+ { unlink $mpofile ; # may exist with zero length
+ unlink $mpyfile ; # get rid of left overs
+ exit }
+ else
+ { banner ; report("processing file : $mpofile") } } }
+
+sub verify_check_sum # checksum calculation from perl documentation
+ { return unless (open (MPO,"$mpofile")) ;
+ $mpochecksum = do { local $/ ; unpack("%32C*",<MPO>) % 65535 } ;
+ close (MPO) ;
+ return unless open (MPY,"$mpyfile") ;
+ my $str = <MPY> ; chomp $str ;
+ close (MPY) ;
+ if ($str =~ /^\%\s*mpochecksum\s*\:\s*(\d+)/o)
+ { if ($mpochecksum eq $1)
+ { report("mpo checksum : $mpochecksum / unchanged") ;
+ exit unless $force }
+ else
+ { report("mpo checksum : $mpochecksum / changed") } } }
+
+sub cleanup_files
+ { my @files = <mpy-*.*> ;
+ foreach (@files) { unless (/\.log/o) { unlink $_ } } }
+
+sub construct_tex_file
+ { my $n = 0 ;
+ unless (open (MPO, "<$mpofile"))
+ { error("unable to open $mpofile") }
+ unless (open (TEX, ">$texfile"))
+ { error("unable to open $texfile") }
+ my $textext = "" ;
+ while (<MPO>)
+ { s/\s*$//mois ;
+ if (/\%\s*format=(\w+)/)
+ { $format = $1 }
+ else # if (!/^\%/)
+ { if (/startTEXpage/o)
+ { ++$n ;
+ $textext .= "$start{$format}\n" ;
+ $start{$format} = "" }
+ $textext .= "$_\n" } }
+ unless (defined($tex{$format})) { $format = "plain" }
+ if ($format eq "context") { $macros = "" }
+ # print TEX "$start{$format}\n$macros\n$textext\n$stop{$format}\n" ;
+ print TEX "$start{$format}\n\n" if $start{$format} ;
+ print TEX "$macros\n" if $macros ;
+ print TEX "$textext\n" if $textext ;
+ print TEX "$stop{$format}\n" if $stop{$format} ;
+ close (MPO) ;
+ close (TEX) ;
+ report("tex format : $format") ;
+ report("requested texts : $n") }
+
+sub construct_mpy_file
+ { unless (open (TMP, "<$tmpfile"))
+ { error("unable to open $tmpfile file") }
+ unless (open (MPY, ">$mpyfile"))
+ { error("unable to open $mpyfile file") }
+ print MPY "% mpochecksum : $mpochecksum\n" ;
+ my $copying = my $n = 0 ;
+ while (<TMP>)
+ { if (s/beginfig/begingraphictextfig/o)
+ { print MPY $_ ; $copying = 1 ; ++$n }
+ elsif (s/endfig/endgraphictextfig/o)
+ { print MPY $_ ; $copying = 0 }
+ elsif ($copying)
+ { print MPY $_ } }
+ close (TMP) ;
+ close (MPY) ;
+ report("processed texts : $n") ;
+ report("produced file : $mpyfile") }
+
+sub run
+ { my ($resultfile, $program,$arguments) = @_ ;
+ my $result = system("$program $arguments $logredirection $logfile") ;
+ unless (-f $resultfile) { error("invalid `$program' run") } }
+
+sub make_pdf_pages
+ { process ("pdf file") ;
+ run ($pdffile, "$tex{$format}", "$texfile") }
+
+sub make_mp_figures
+ { process ("postscript file") ;
+ if ($pmethod) { run($posfile, "$pdftops",
+ "-paper match $pdffile $posfile") }
+ if ($gmethod) { run($posfile, "$ghostscript",
+ "-q -sOutputFile=$posfile -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite $pdffile") }
+ if ($amethod) { run($posfile, "$acroread",
+ "-toPostScript -pairs $pdffile $posfile") } }
+
+sub make_mp_pictures_ps
+ { process ("metapost file") ;
+ run ($tmpfile, "$pstoedit", "-ssp -dt -f mpost $posfile $tmpfile") }
+
+sub make_mp_pictures_pdf
+ { process ("metapost file") ;
+ run ($tmpfile, "$pstoedit", "-ssp -dt -f mpost $pdffile $tmpfile") }
+
+if ($help) { show_help_info }
+
+check_input_file ;
+verify_check_sum ;
+cleanup_files ;
+construct_tex_file ;
+make_pdf_pages ;
+if (1)
+ { make_mp_pictures_pdf ; }
+else
+ { make_mp_figures ;
+ make_mp_pictures_ps ; }
+construct_mpy_file ; # less save : rename $tmpfile, $mpyfile ;
+unless ($noclean) { cleanup_files }
+
+# a simple test file (needs context)
+#
+# % output=pdftex
+#
+# \starttext
+#
+# \startMPpage
+# graphictext
+# "\bf MAKE"
+# scaled 8
+# zscaled (1,2)
+# withdrawcolor \MPcolor{blue}
+# withfillcolor \MPcolor{gray}
+# withpen pencircle scaled 5pt ;
+# \stopMPpage
+#
+# \stoptext
diff --git a/Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-grph.mp b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-grph.mp
new file mode 100644
index 00000000000..18c43c57b53
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-grph.mp
@@ -0,0 +1,295 @@
+%D \module
+%D [ file=mp-grph.mp,
+%D version=2000.12.14,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=graphic text support,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+%C details.
+
+%D Under construction.
+
+if unknown context_tool : input mp-tool ; fi ;
+if known context_grph : endinput ; fi ;
+
+boolean context_grph ; context_grph := true ;
+
+string CRLF ; CRLF := char 10 & char 13 ;
+
+picture _currentpicture_ ;
+
+def beginfig (expr c) =
+ begingroup
+ charcode := c ;
+ resetfig ;
+ scantokens extra_beginfig ;
+enddef ;
+
+def resetfig =
+ clearxy ;
+ clearit ;
+ clearpen ;
+ pickup defaultpen ;
+ interim linecap := linecap ;
+ interim linejoin := linejoin ;
+ interim miterlimit := miterlimit ;
+ save _background_ ; color _background_ ; _background_ := background ;
+ save background ; color background ; background := _background_ ;
+ drawoptions () ;
+enddef ;
+
+def protectgraphicmacros =
+ save showtext ;
+ save beginfig ; let beginfig = begingraphictextfig ;
+ save endfig ; let endfig = endgraphictextfig ;
+ save end ; let end = relax ;
+ interim prologues := prologues ;
+ resetfig ; % resets currentpicture
+enddef ;
+
+numeric currentgraphictext ; currentgraphictext := 0 ;
+string graphictextformat ; graphictextformat := "plain" ;
+string graphictextstring ; graphictextstring := "" ;
+string graphictextfile ; graphictextfile := "dummy.mpo" ;
+
+def savegraphictext (expr str) =
+ graphictextfile := jobname & ".mpo" ;
+ if (graphictextstring<>"") :
+ write graphictextstring to graphictextfile ;
+ graphictextstring := "" ;
+ fi ;
+ write str to graphictextfile ;
+ let erasegraphictextfile = relax ;
+enddef ;
+
+def erasegraphictextfile =
+ graphictextfile := jobname & ".mpo" ;
+ write EOF to graphictextfile ;
+ let erasegraphictextfile = relax ;
+enddef ;
+
+extra_beginfig := extra_beginfig & " erasegraphictextfile ;" ;
+
+def begingraphictextfig (expr n) =
+ foundpicture := n ; scratchpicture := nullpicture ;
+enddef ;
+
+def endgraphictextfig =
+ if foundpicture = currentgraphictext :
+ expandafter endinput
+ else :
+ scratchpicture := nullpicture ;
+ fi ;
+enddef ;
+
+def loadfigure primary filename =
+ doloadfigure (filename)
+enddef ;
+
+def doloadfigure (expr filename) text figureattributes =
+ begingroup ;
+ save figurenumber, figurepicture, number, fixedplace ;
+ numeric figurenumber ; figurenumber := 0 ;
+ boolean figureshift ; figureshift := true ;
+ picture figurepicture ; figurepicture := currentpicture ;
+ def number primary n = hide(figurenumber := n) enddef ;
+ def fixedplace = hide(figureshift := false) enddef ;
+ protectgraphicmacros ;
+ % defaults
+ interim linecap := rounded ;
+ interim linejoin := rounded ;
+ interim miterlimit := 10 ;
+ %
+ currentpicture := nullpicture ;
+ draw fullcircle figureattributes ; % expand number
+ currentpicture := nullpicture ;
+ def beginfig (expr n) =
+ currentpicture := nullpicture ;
+ if (figurenumber=n) or (figurenumber=0) :
+ let endfig = endinput ;
+ fi ;
+ enddef ;
+ let endfig = relax ;
+ readfile(filename) ;
+ if figureshift :
+ currentpicture := currentpicture shifted -llcorner currentpicture ;
+ fi ;
+ addto figurepicture also currentpicture figureattributes ;
+ currentpicture := figurepicture ;
+ endgroup ;
+enddef ;
+
+def graphictext primary t =
+ dographictext(t)
+enddef ;
+
+def dographictext (expr t) =
+ begingroup ;
+ save figurepicture ; picture figurepicture ;
+ figurepicture := currentpicture ; currentpicture := nullpicture ;
+ if graphictextformat<>"" :
+ graphictextstring :=
+ "% format=" & graphictextformat & CRLF & graphictextstring ;
+ graphictextformat := "" ;
+ fi ;
+ currentgraphictext := currentgraphictext + 1 ;
+ savegraphictext ("\startTEXpage[scale=10000]" & t & "\stopTEXpage") ;
+ dofinishgraphictext
+enddef ;
+
+def redographictext primary t =
+ regraphictext(t)
+enddef ;
+
+def regraphictext (expr t) =
+ begingroup ;
+ save figurepicture ; picture figurepicture ;
+ figurepicture := currentpicture ; currentpicture := nullpicture ;
+ save currentgraphictext ; numeric currentgraphictext ;
+ currentgraphictext := t ;
+ dofinishgraphictext
+enddef ;
+
+%D Believe it or not, but it took me half a day to uncover
+%D the following neccessity:
+%D
+%D \starttypen
+%D save withfillcolor, withdrawcolor ;
+%D \stoptypen
+%D
+%D When we have more than one graphictext, these will be
+%D defined after the first graphic. For some obscure reason,
+%D this means that in the next graphic they will be called, but
+%D afterwards the data and boolean are not set. Don't ask me
+%D why.
+
+def dofinishgraphictext text x_op_x =
+ protectgraphicmacros ; % resets currentpicture
+ interim linecap := butt ; % normally rounded
+ interim linejoin := mitered ; % normally rounded
+ interim miterlimit := 10 ; % todo
+ let normalwithshade = withshade ;
+ save foundpicture, scratchpicture, str ;
+ save fill, draw, withshade, reversefill, outlinefill ;
+ save withfillcolor, withdrawcolor ; % quite important
+ numeric foundpicture ; picture scratchpicture ; string str ;
+ def draw expr p =
+ % the first, naive implementation was:
+ % addto scratchpicture doublepath p withpen currentpen ;
+ % but it is better to turn lines into fills
+ addto scratchpicture contour boundingbox
+ image (addto currentpicture doublepath p withpen currentpen) ;
+ enddef ;
+ def fill expr p =
+ addto scratchpicture contour p withpen currentpen ;
+ enddef ;
+ def f_op_f = enddef ; boolean f_color ; f_color := false ;
+ def d_op_d = enddef ; boolean d_color ; d_color := false ;
+ def s_op_s = enddef ; boolean s_color ; s_color := false ;
+ boolean reverse_fill ; reverse_fill := false ;
+ boolean outline_fill ; outline_fill := false ;
+ def reversefill =
+ hide(reverse_fill := true )
+ enddef ;
+ def outlinefill =
+ hide(outline_fill := true )
+ enddef ;
+ def withshade primary c =
+ hide(def s_op_s = normalwithshade c enddef ; s_color := true )
+ enddef ;
+ def withfillcolor primary c =
+ hide(def f_op_f = withcolor c enddef ; f_color := true )
+ enddef ;
+ def withdrawcolor primary c =
+ hide(def d_op_d = withcolor c enddef ; d_color := true )
+ enddef ;
+ scratchpicture := nullpicture ;
+ addto scratchpicture doublepath origin x_op_x ; % pre-roll
+ for i within scratchpicture : % Below here is a dirty tricky test!
+ if (urcorner dashpart i) = origin : outline_fill := false ; fi ;
+ endfor ;
+ scratchpicture := nullpicture ;
+ readfile(jobname & ".mpy") ;
+ scratchpicture := (scratchpicture shifted -llcorner scratchpicture) scaled (1/10) ;
+ if not d_color and not f_color : d_color := true ; fi
+ if s_color : d_color := false ; f_color := false ; fi ;
+ currentpicture := figurepicture ;
+ if d_color and not reverse_fill :
+ for i within scratchpicture :
+ if f_color and outline_fill :
+ addto currentpicture doublepath pathpart i _op_ x_op_x f_op_f
+ dashed nullpicture ;
+ fi ;
+ if filled i :
+ addto currentpicture doublepath pathpart i _op_ x_op_x d_op_d ;
+ fi ;
+ endfor ;
+ fi ;
+ if f_color :
+ for i within scratchpicture :
+ if filled i :
+ addto currentpicture contour pathpart i _op_ x_op_x f_op_f
+ withpen pencircle scaled 0 ;
+ fi ;
+ endfor ;
+ fi ;
+ if d_color and reverse_fill :
+ for i within scratchpicture :
+ if filled i :
+ addto currentpicture doublepath pathpart i _op_ x_op_x d_op_d ;
+ fi ;
+ endfor ;
+ fi ;
+ if s_color :
+ for i within scratchpicture :
+ if filled i :
+ addto currentpicture contour pathpart i _op_ x_op_x s_op_s ;
+ fi ;
+ endfor ;
+ else :
+ for i within scratchpicture :
+ if stroked i :
+ addto currentpicture doublepath pathpart i _op_ x_op_x d_op_d ;
+ fi ;
+ endfor ;
+ fi ;
+ endgroup ;
+enddef ;
+
+def resetgraphictextdirective =
+ graphictextstring := "" ;
+enddef ;
+
+def graphictextdirective text t =
+ graphictextstring := graphictextstring & t & CRLF ;
+enddef ;
+
+endinput
+
+% example
+
+input mp-grph ;
+
+ graphictextformat := "context" ;
+% graphictextformat := "plain" ;
+% graphictextformat := "latex" ; graphictextdirective "\documentclass[]{article}" ;
+
+beginfig (1) ;
+ graphictext
+ "\vbox{\hsize10cm \input tufte }"
+ scaled 8
+ withdrawcolor blue
+ withfillcolor red
+ withpen pencircle scaled 2pt ;
+endfig ;
+
+beginfig(1) ;
+ loadfigure "gracht.mp" rotated 20 ;
+ loadfigure "koe.mp" number 1 scaled 2 ;
+endfig ;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-tool.mp b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-tool.mp
new file mode 100644
index 00000000000..925b9ca4449
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/typesetinspace/mp-tool.mp
@@ -0,0 +1,2366 @@
+%D \module
+%D [ file=mp-tool.mp,
+%D version=1998.02.15,
+%D title=\CONTEXT\ \METAPOST\ graphics,
+%D subtitle=auxiliary macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% a cleanup is needed, like using image and alike
+% use a few more "newinternal"'s
+
+%D This module is rather preliminary and subjected to
+%D changes.
+
+if known context_tool : endinput ; fi ;
+
+boolean context_tool ; context_tool := true ;
+
+%D New, version number testing:
+%D
+%D \starttyping
+%D fill fullcircle scaled 2cm withcolor if mpversiongt("0.6") : red else : green fi ;
+%D fill fullcircle scaled 1cm withcolor if mpversionlt(0.6) : blue else : white fi ;
+%D \stoptyping
+
+if not known mpversion : string mpversion ; mpversion := "0.641" ; fi ;
+
+% vardef mpversiongt(expr s) =
+% scantokens (mpversion & " > " & if numeric s : decimal s else : s fi)
+% enddef ;
+% vardef mpversionlt(expr s) =
+% scantokens (mpversion & " < " & if numeric s : decimal s else : s fi)
+% enddef ;
+% vardef mpversioneq(expr s) =
+% scantokens (mpversion & " = " & if numeric s : decimal s else : s fi)
+% enddef ;
+
+%D More interesting:
+%D
+%D \starttyping
+%D fill fullcircle scaled 4cm withcolor if mpversiongt("0.6") : red else : green fi ;
+%D fill fullcircle scaled 2cm withcolor if mpversionlt(0.6) : blue else : white fi ;
+%D fill fullcircle scaled 1cm withcolor if mpversioncmp(0.6,">=") : yellow else : black fi ;
+%D \stoptyping
+
+vardef mpversioncmp(expr s, c) =
+ scantokens (mpversion & c & if numeric s : decimal s else : s fi)
+enddef ;
+
+vardef mpversionlt (expr s) = mpversioncmp(s, "<") enddef ;
+vardef mpversioneq (expr s) = mpversioncmp(s, "=") enddef ;
+vardef mpversiongt (expr s) = mpversioncmp(s, ">") enddef ;
+
+%D We always want \EPS\ conforming output, so we say:
+
+prologues := 2 ; % 1 = troff, 2 = tex
+warningcheck := 0 ;
+
+%D Namespace handling:
+
+% let exclamationmark = ! ;
+% let questionmark = ? ;
+%
+% def unprotect =
+% let ! = relax ;
+% let ? = relax ;
+% enddef ;
+%
+% def protect =
+% let ! = exclamationmark ;
+% let ? = questionmark ;
+% enddef ;
+%
+% unprotect ;
+%
+% mp!some!module = 10 ; show mp!some!module ; show somemodule ;
+%
+% protect ;
+
+%D A semicolor to be used in specials: ? ? ?
+
+string semicolor ; semicolor := char 59 ;
+
+%D By including this module, \METAPOST\ automatically writes a
+%D high resolution boundingbox to the \POSTSCRIPT\ file. This
+%D hack is due to John Hobby himself.
+
+% When somehow the first one gets no HiRes, then make sure
+% that the format matches the mem sizes in the config file.
+
+% eerste " " er uit
+
+string space ; space = char 32 ;
+
+vardef ddecimal primary p =
+ decimal xpart p & " " & decimal ypart p
+enddef ;
+
+extra_endfig := extra_endfig
+ & "special "
+ & "("
+ & ditto
+ & "%%HiResBoundingBox: "
+ & ditto
+ & "&ddecimal llcorner currentpicture"
+ & "&space"
+ & "&ddecimal urcorner currentpicture"
+ & ");";
+
+%D Also handy (when we flush colors):
+
+vardef dddecimal primary c =
+ decimal redpart c & " " & decimal greenpart c & " " & decimal bluepart c
+enddef ;
+
+%D We have standardized data file names:
+
+if not known _data_prefix_ :
+
+ string _data_prefix_ ; _data_prefix_ = "mpd-" ;
+ string _data_suffix_ ; _data_suffix_ = ".tmp" ;
+
+fi ;
+
+def data_file =
+ _data_prefix_ & decimal charcode & _data_suffix_
+enddef ;
+
+%D Because \METAPOST\ has a hard coded limit of 4~datafiles,
+%D we need some trickery when we have multiple files.
+
+if unknown collapse_data :
+ boolean collapse_data ; collapse_data := false ;
+fi ;
+
+boolean savingdata ; savingdata := false ;
+
+def savedata expr txt =
+ if collapse_data :
+ write if savingdata : txt else :
+ "\MPdata{" & decimal charcode & "}{" & txt & "}"
+ fi
+ & "%" to jobname & _data_suffix_ ;
+ else :
+ write txt to data_file ;
+ fi ;
+enddef ;
+
+def startsavingdata =
+ savingdata := true ;
+ if collapse_data :
+ write
+ "\MPdata{" & decimal charcode & "}{%"
+ to
+ jobname & _data_suffix_ ;
+ fi ;
+enddef ;
+
+def stopsavingdata =
+ savingdata := false ;
+ if collapse_data :
+ write "}%" to jobname & _data_suffix_ ;
+ fi ;
+enddef ;
+
+%D Instead of a keystroke eating save and allocation
+%D sequence, you can use the \citeer {new} alternatives to
+%D save and allocate in one command.
+
+def newcolor text v = forsuffixes i=v : save i ; color i ; endfor ; enddef ;
+def newnumeric text v = forsuffixes i=v : save i ; numeric i ; endfor ; enddef ;
+def newboolean text v = forsuffixes i=v : save i ; boolean i ; endfor ; enddef ;
+def newtransform text v = forsuffixes i=v : save i ; transform i ; endfor ; enddef ;
+def newpath text v = forsuffixes i=v : save i ; path i ; endfor ; enddef ;
+def newpicture text v = forsuffixes i=v : save i ; picture i ; endfor ; enddef ;
+def newstring text v = forsuffixes i=v : save i ; string i ; endfor ; enddef ;
+
+%D Sometimes we don't want parts of the graphics add to the
+%D bounding box. One way of doing this is to save the bounding
+%D box, draw the graphics that may not count, and restore the
+%D bounding box.
+%D
+%D \starttypen
+%D push_boundingbox currentpicture;
+%D pop_boundingbox currentpicture;
+%D \stoptypen
+%D
+%D The bounding box can be called with:
+%D
+%D \starttypen
+%D boundingbox currentpicture
+%D inner_boundingbox currentpicture
+%D outer_boundingbox currentpicture
+%D \stoptypen
+%D
+%D Especially the latter one can be of use when we include
+%D the graphic in a document that is clipped to the bounding
+%D box. In such occasions one can use:
+%D
+%D \starttypen
+%D set_outer_boundingbox currentpicture;
+%D \stoptypen
+%D
+%D Its counterpart is:
+%D
+%D \starttypen
+%D set_inner_boundingbox p
+%D \stoptypen
+
+path pushed_boundingbox;
+
+def push_boundingbox text p =
+ pushed_boundingbox := boundingbox p;
+enddef;
+
+def pop_boundingbox text p =
+ setbounds p to pushed_boundingbox;
+enddef;
+
+vardef boundingbox primary p =
+ if (path p) or (picture p) :
+ llcorner p -- lrcorner p -- urcorner p -- ulcorner p
+ else :
+ origin
+ fi -- cycle
+enddef;
+
+vardef inner_boundingbox primary p =
+ top rt llcorner p --
+ top lft lrcorner p --
+ bot lft urcorner p --
+ bot rt ulcorner p -- cycle
+enddef;
+
+vardef outer_boundingbox primary p =
+ bot lft llcorner p --
+ bot rt lrcorner p --
+ top rt urcorner p --
+ top lft ulcorner p -- cycle
+enddef;
+
+def innerboundingbox = inner_boundingbox enddef ;
+def outerboundingbox = outer_boundingbox enddef ;
+
+vardef set_inner_boundingbox text q =
+ setbounds q to inner_boundingbox q;
+enddef;
+
+vardef set_outer_boundingbox text q =
+ setbounds q to outer_boundingbox q;
+enddef;
+
+%D Some missing functions can be implemented rather
+%D straightforward:
+
+numeric Pi ; Pi := 3.1415926 ;
+
+vardef sqr primary x = (x*x) enddef ;
+vardef log primary x = (if x=0: 0 else: mlog(x)/mlog(10) fi) enddef ;
+vardef ln primary x = (if x=0: 0 else: mlog(x)/256 fi) enddef ;
+vardef exp primary x = ((mexp 256)**x) enddef ;
+vardef inv primary x = (if x=0: 0 else: x**-1 fi) enddef ;
+
+vardef pow (expr x,p) = (x**p) enddef ;
+
+vardef asin primary x = (x+(x**3)/6+3(x**5)/40) enddef ;
+vardef acos primary x = (asin(-x)) enddef ;
+vardef atan primary x = (x-(x**3)/3+(x**5)/5-(x**7)/7) enddef ;
+vardef tand primary x = (sind(x)/cosd(x)) enddef ;
+
+%D Here are Taco Hoekwater's alternatives (but
+%D vardef'd and primaried).
+
+pi := 3.1415926 ; radian := 180/pi ; % 2pi*radian = 360 ;
+
+vardef tand primary x = (sind(x)/cosd(x)) enddef ;
+vardef cotd primary x = (cosd(x)/sind(x)) enddef ;
+
+vardef sin primary x = (sind(x*radian)) enddef ;
+vardef cos primary x = (cosd(x*radian)) enddef ;
+vardef tan primary x = (sin(x)/cos(x)) enddef ;
+vardef cot primary x = (cos(x)/sin(x)) enddef ;
+
+vardef asin primary x = angle((1+-+x,x)) enddef ;
+vardef acos primary x = angle((x,1+-+x)) enddef ;
+
+vardef invsin primary x = ((asin(x))/radian) enddef ;
+vardef invcos primary x = ((acos(x))/radian) enddef ;
+
+vardef acosh primary x = ln(x+(x+-+1)) enddef ;
+vardef asinh primary x = ln(x+(x++1)) enddef ;
+
+vardef sinh primary x = save xx ; xx = exp x ; (xx-1/xx)/2 enddef ;
+vardef cosh primary x = save xx ; xx = exp x ; (xx+1/xx)/2 enddef ;
+
+%D We provide two macros for drawing stripes across a shape.
+%D The first method (with the n suffix) uses another method,
+%D slower in calculation, but more efficient when drawn. The
+%D first macro divides the sides into n equal parts. The
+%D first argument specifies the way the lines are drawn, while
+%D the second argument identifier the way the shape is to be
+%D drawn.
+%D
+%D \starttypen
+%D stripe_path_n
+%D (dashed evenly withcolor blue)
+%D (filldraw)
+%D fullcircle xscaled 100 yscaled 40 shifted (50,50) withpen pencircle scaled 4;
+%D \stoptypen
+%D
+%D The a (or angle) alternative supports arbitrary angles and
+%D is therefore more versatile.
+%D
+%D \starttypen
+%D stripe_path_a
+%D (withpen pencircle scaled 2 withcolor red)
+%D (draw)
+%D fullcircle xscaled 100 yscaled 40 withcolor blue;
+%D \stoptypen
+%D
+%D The first alternative obeys:
+
+stripe_n := 10;
+stripe_slot := 3;
+
+%D When no pen dimensions are passed, the slot determines
+%D the spacing.
+%D
+%D The angle alternative is influenced by:
+
+stripe_gap := 5;
+stripe_angle := 45;
+
+def stripe_path_n (text s_spec) (text s_draw) expr s_path =
+ do_stripe_path_n (s_spec) (s_draw) (s_path)
+enddef;
+
+def do_stripe_path_n (text s_spec) (text s_draw) (expr s_path) text s_text =
+ begingroup
+ save curpic, newpic, bb, pp, ww;
+ picture curpic, newpic;
+ path bb, pp;
+ pp := s_path;
+ curpic := currentpicture;
+ currentpicture := nullpicture;
+ s_draw pp s_text;
+ bb := boundingbox currentpicture;
+ newpic := currentpicture;
+ currentpicture := nullpicture;
+ ww := min(ypart urcorner newpic - ypart llcorner newpic,
+ xpart urcorner newpic - xpart llcorner newpic);
+ ww := ww/(stripe_slot*stripe_n);
+ for i=1/stripe_n step 1/stripe_n until 1:
+ draw point (1+i) of bb -- point (3-i) of bb
+ withpen pencircle scaled ww s_spec ;
+ endfor;
+ for i=0 step 1/stripe_n until 1:
+ draw point (3+i) of bb -- point (1-i) of bb
+ withpen pencircle scaled ww s_spec;
+ endfor;
+ clip currentpicture to pp;
+ addto newpic also currentpicture;
+ currentpicture := curpic;
+ addto currentpicture also newpic;
+ endgroup
+enddef;
+
+def stripe_path_a (text s_spec) (text s_draw) expr s_path =
+ do_stripe_path_a (s_spec) (s_draw) (s_path)
+enddef;
+
+def do_stripe_path_a (text s_spec) (text s_draw) (expr s_path) text s_text =
+ begingroup
+ save curpic, newpic, pp; picture curpic, newpic; path pp ;
+ pp := s_path ;
+ curpic := currentpicture;
+ currentpicture := nullpicture;
+ s_draw pp s_text ;
+ def do_stripe_rotation (expr p) =
+ (currentpicture rotatedaround(center p,stripe_angle))
+ enddef ;
+ s_max := max
+ (xpart llcorner do_stripe_rotation(currentpicture),
+ xpart urcorner do_stripe_rotation(currentpicture),
+ ypart llcorner do_stripe_rotation(currentpicture),
+ ypart urcorner do_stripe_rotation(currentpicture));
+ newpic := currentpicture;
+ currentpicture := nullpicture;
+ for i=-s_max-.5stripe_gap step stripe_gap until s_max:
+ draw (-s_max,i)--(s_max,i) s_spec;
+ endfor;
+ currentpicture := do_stripe_rotation(newpic);
+ clip currentpicture to pp ;
+ addto newpic also currentpicture;
+ currentpicture := curpic;
+ addto currentpicture also newpic;
+ endgroup
+enddef;
+
+%D A few normalizing macros:
+%D
+%D \starttypen
+%D xscale_currentpicture ( width )
+%D yscale_currentpicture ( height )
+%D xyscale_currentpicture ( width, height )
+%D scale_currentpicture ( width, height )
+%D \stoptypen
+
+% def xscale_currentpicture(expr the_width) =
+% natural_width := xpart urcorner currentpicture - xpart llcorner currentpicture;
+% currentpicture := currentpicture scaled (the_width/natural_width) ;
+% enddef;
+%
+% def yscale_currentpicture(expr the_height ) =
+% natural_height := ypart urcorner currentpicture - ypart llcorner currentpicture;
+% currentpicture := currentpicture scaled (the_height/natural_height) ;
+% enddef;
+%
+% def xyscale_currentpicture(expr the_width, the_height) =
+% natural_width := xpart urcorner currentpicture - xpart llcorner currentpicture;
+% natural_height := ypart urcorner currentpicture - ypart llcorner currentpicture;
+% currentpicture := currentpicture
+% xscaled (the_width/natural_width)
+% yscaled (the_height/natural_height) ;
+% enddef;
+%
+% def scale_currentpicture(expr the_width, the_height) =
+% xscale_currentpicture(the_width) ;
+% yscale_currentpicture(the_height) ;
+% enddef;
+
+% nog eens uitbreiden zodat path en pic worden afgehandeld.
+
+% natural_width := xpart urcorner currentpicture - xpart llcorner currentpicture;
+% currentpicture := currentpicture scaled (the_width/natural_width) ;
+
+% TODO TODO TODO TODO, not yet ok
+
+primarydef p xsized w =
+ (p if (bbwidth (p)>0) and (w>0) : scaled (w/bbwidth (p)) fi)
+enddef ;
+
+primarydef p ysized h =
+ (p if (bbheight(p)>0) and (h>0) : scaled (h/bbheight(p)) fi)
+enddef ;
+
+primarydef p xysized s =
+ begingroup ;
+ save wh, w, h ; pair wh ; numeric w, h ;
+ wh := paired (s) ; w := bbwidth(p) ; h := bbheight(p) ;
+ (p if (w>0) and (h>0) :
+ if xpart wh > 0 : xscaled (xpart wh/w) fi
+ if ypart wh > 0 : yscaled (ypart wh/h) fi
+ fi)
+ endgroup
+enddef ;
+
+primarydef p sized wh =
+ (p xysized wh)
+enddef ;
+
+def xscale_currentpicture(expr w) =
+ currentpicture := currentpicture xsized w ;
+enddef;
+
+def yscale_currentpicture(expr h) =
+ currentpicture := currentpicture ysized h ;
+enddef;
+
+def xyscale_currentpicture(expr w, h) =
+ currentpicture := currentpicture xysized (w,h) ;
+enddef;
+
+def scale_currentpicture(expr w, h) =
+ currentpicture := currentpicture xsized w ;
+ currentpicture := currentpicture ysized h ;
+enddef;
+
+%D A full circle is centered at the origin, while a unitsquare
+%D is located in the first quadrant. Now guess what kind of
+%D path fullsquare and unitcircle do return.
+
+path fullsquare, unitcircle ;
+
+fullsquare := unitsquare shifted - center unitsquare ;
+unitcircle := fullcircle shifted urcorner fullcircle ;
+
+%D Some more paths:
+
+path urcircle, ulcircle, llcircle, lrcircle ;
+
+urcircle := origin--(+.5,0)&(+.5,0){up} ..(0,+.5)&(0,+.5)--cycle ;
+ulcircle := origin--(0,+.5)&(0,+.5){left} ..(-.5,0)&(-.5,0)--cycle ;
+llcircle := origin--(-.5,0)&(-.5,0){down} ..(0,-.5)&(0,-.5)--cycle ;
+lrcircle := origin--(0,-.5)&(0,-.5){right}..(+.5,0)&(+.5,0)--cycle ;
+
+path tcircle, bcircle, lcircle, rcircle ;
+
+tcircle = origin--(+.5,0)&(+.5,0){up} ..(0,+.5)..{down} (-.5,0)--cycle ;
+bcircle = origin--(-.5,0)&(-.5,0){down} ..(0,-.5)..{up} (+.5,0)--cycle ;
+lcircle = origin--(0,+.5)&(0,+.5){left} ..(-.5,0)..{right}(0,-.5)--cycle ;
+rcircle = origin--(0,-.5)&(0,-.5){right}..(+.5,0)..{left} (0,+.5)--cycle ;
+
+path urtriangle, ultriangle, lltriangle, lrtriangle ;
+
+urtriangle := origin--(+.5,0)--(0,+.5)--cycle ;
+ultriangle := origin--(0,+.5)--(-.5,0)--cycle ;
+lltriangle := origin--(-.5,0)--(0,-.5)--cycle ;
+lrtriangle := origin--(0,-.5)--(+.5,0)--cycle ;
+
+path unitdiamond, fulldiamond ;
+
+unitdiamond := (.5,0)--(1,.5)--(.5,1)--(0,.5)--cycle ;
+fulldiamond := unitdiamond shifted - center unitdiamond ;
+
+%D More robust:
+
+% let normalscaled = scaled ;
+% let normalxscaled = xscaled ;
+% let normalyscaled = yscaled ;
+%
+% def scaled expr s = normalscaled (s) enddef ;
+% def xscaled expr s = normalxscaled (s) enddef ;
+% def yscaled expr s = normalyscaled (s) enddef ;
+
+%D Shorter
+
+primarydef p xyscaled q =
+ begingroup ; save qq ; pair qq ; qq = paired(q) ;
+ ( p
+ if xpart qq<>0 : xscaled (xpart qq) fi
+ if ypart qq<>0 : yscaled (ypart qq) fi )
+ endgroup
+enddef ;
+
+%D Experimenteel, zie folder-3.tex.
+
+def set_grid(expr w, h, nx, ny) =
+ boolean grid[][] ; boolean grid_full ;
+ grid_w := w ;
+ grid_h := h ;
+ grid_nx := nx ;
+ grid_ny := ny ;
+ grid_x := round(w/grid_nx) ; % +.5) ;
+ grid_y := round(h/grid_ny) ; % +.5) ;
+ grid_left := (1+grid_x)*(1+grid_y) ;
+ grid_full := false ;
+ for i=0 upto grid_x:
+ for j=0 upto grid_y:
+ grid[i][j] := false ;
+ endfor ;
+ endfor ;
+enddef ;
+
+vardef new_on_grid(expr _dx_, _dy_) =
+ dx := _dx_ ;
+ dy := _dy_ ;
+ ddx := min(round(dx/grid_nx),grid_x) ; % +.5),grid_x) ;
+ ddy := min(round(dy/grid_ny),grid_y) ; % +.5),grid_y) ;
+ if not grid_full and not grid[ddx][ddy]:
+ grid[ddx][ddy] := true ;
+ grid_left := grid_left-1 ;
+ grid_full := (grid_left=0) ;
+ true
+ else:
+ false
+ fi
+enddef ;
+
+%D usage: \type{innerpath peepholed outerpath}.
+%D
+%D beginfig(1);
+%D def fullsquare = (unitsquare shifted -center unitsquare) enddef ;
+%D fill (fullsquare scaled 200) withcolor red ;
+%D path p ; p := (fullcircle scaled 100) ; bboxmargin := 0 ;
+%D fill p peepholed bbox p ;
+%D endfig;
+
+secondarydef p peepholed q =
+ begingroup ;
+ save start ; pair start ; start := point 0 of p ;
+ if xpart start >= xpart center p :
+ if ypart start >= ypart center p :
+ urcorner q -- ulcorner q -- llcorner q -- lrcorner q --
+ reverse p -- lrcorner q -- cycle
+ else :
+ lrcorner q -- urcorner q -- ulcorner q -- llcorner q --
+ reverse p -- llcorner q -- cycle
+ fi
+ else :
+ if ypart start > ypart center p :
+ ulcorner q -- llcorner q -- lrcorner q -- urcorner q --
+ reverse p -- urcorner q -- cycle
+ else :
+ llcorner q -- lrcorner q -- urcorner q -- ulcorner q --
+ reverse p -- ulcorner q -- cycle
+ fi
+ fi
+ endgroup
+enddef ;
+
+boolean intersection_found ;
+
+secondarydef p intersection_point q =
+ begingroup
+ save x_, y_ ;
+ (x_,y_) = p intersectiontimes q ;
+ if x_<0 :
+ intersection_found := false ;
+ center p % origin
+ else :
+ intersection_found := true ;
+ .5[point x_ of p, point y_ of q]
+ fi
+ endgroup
+enddef ;
+
+%D New, undocumented, experimental:
+
+vardef tensecircle (expr width, height, offset) =
+ ((-width/2,-height/2) ... (0,-height/2-offset) ...
+ (+width/2,-height/2) ... (+width/2+offset,0) ...
+ (+width/2,+height/2) ... (0,+height/2+offset) ...
+ (-width/2,+height/2) ... (-width/2-offset,0) ... cycle)
+enddef ;
+
+%vardef tensecircle (expr width, height, offset) =
+% ((-width/2,-height/2)..(0,-height/2-offset)..(+width/2,-height/2) &
+% (+width/2,-height/2)..(+width/2+offset,0)..(+width/2,+height/2) &
+% (+width/2,+height/2)..(0,+height/2+offset)..(-width/2,+height/2) &
+% (-width/2,+height/2)..(-width/2-offset,0)..(-width/2,-height/2)..cycle)
+%enddef ;
+
+vardef roundedsquare (expr width, height, offset) =
+ ((offset,0)--(width-offset,0){right} ..
+ (width,offset)--(width,height-offset){up} ..
+ (width-offset,height)--(offset,height){left} ..
+ (0,height-offset)--(0,offset){down} .. cycle)
+enddef ;
+
+%D Some colors.
+
+color cyan ; cyan = (0,1,1) ;
+color magenta ; magenta = (1,0,1) ;
+color yellow ; yellow = (1,1,0) ;
+
+%D Well, this is the dangerous and naive version:
+
+def drawfill text t =
+ fill t ;
+ draw t ;
+enddef;
+
+%D This two step approach saves the path first, since it can
+%D be a function. Attributes must not be randomized.
+
+def drawfill expr c =
+ path _c_ ; _c_ := c ;
+ do_drawfill
+enddef ;
+
+def do_drawfill text t =
+ draw _c_ t ;
+ fill _c_ t ;
+enddef;
+
+def undrawfill expr c =
+ drawfill c withcolor background
+enddef ;
+
+%D Moved from mp-char.mp
+
+vardef paired (expr d) =
+ if pair d : d else : (d,d) fi
+enddef ;
+
+vardef tripled (expr d) =
+ if color d : d else : (d,d,d) fi
+enddef ;
+
+primarydef p enlarged d =
+ (p llmoved d -- p lrmoved d -- p urmoved d -- p ulmoved d -- cycle)
+enddef;
+
+primarydef p llenlarged d =
+ (p llmoved d -- lrcorner p -- urcorner p -- ulcorner p -- cycle)
+enddef ;
+
+primarydef p lrenlarged d =
+ (llcorner p -- p lrmoved d -- urcorner p -- ulcorner p -- cycle)
+enddef ;
+
+primarydef p urenlarged d =
+ (llcorner p -- lrcorner p -- p urmoved d -- ulcorner p -- cycle)
+enddef ;
+
+primarydef p ulenlarged d =
+ (llcorner p -- lrcorner p -- urcorner p -- p ulmoved d -- cycle)
+enddef ;
+
+primarydef p llmoved d =
+ ((llcorner p) shifted (-xpart paired(d),-ypart paired(d)))
+enddef ;
+
+primarydef p lrmoved d =
+ ((lrcorner p) shifted (+xpart paired(d),-ypart paired(d)))
+enddef ;
+
+primarydef p urmoved d =
+ ((urcorner p) shifted (+xpart paired(d),+ypart paired(d)))
+enddef ;
+
+primarydef p ulmoved d =
+ ((ulcorner p) shifted (-xpart paired(d),+ypart paired(d)))
+enddef ;
+
+primarydef p leftenlarged d =
+ ((llcorner p) shifted (-d,0) -- lrcorner p --
+ urcorner p -- (ulcorner p) shifted (-d,0) -- cycle)
+enddef ;
+
+primarydef p rightenlarged d =
+ (llcorner p -- (lrcorner p) shifted (d,0) --
+ (urcorner p) shifted (d,0) -- ulcorner p -- cycle)
+enddef ;
+
+primarydef p topenlarged d =
+ (llcorner p -- lrcorner p --
+ (urcorner p) shifted (0,d) -- (ulcorner p) shifted (0,d) -- cycle)
+enddef ;
+
+primarydef p bottomenlarged d =
+ (llcorner p shifted (0,-d) -- lrcorner p shifted (0,-d) --
+ urcorner p -- ulcorner p -- cycle)
+enddef ;
+
+%D Handy for testing/debugging:
+
+primarydef p crossed d =
+ (center p shifted (-d, 0) -- llcorner p --
+ center p shifted ( 0,-d) -- lrcorner p --
+ center p shifted (+d, 0) -- urcorner p --
+ center p shifted ( 0,+d) -- ulcorner p -- cycle)
+enddef ;
+
+%D Saves typing:
+
+% vardef bottomboundary primary p = (llcorner p -- lrcorner p) enddef ;
+% vardef rightboundary primary p = (lrcorner p -- urcorner p) enddef ;
+% vardef topboundary primary p = (urcorner p -- ulcorner p) enddef ;
+% vardef leftboundary primary p = (ulcorner p -- llcorner p) enddef ;
+
+vardef bottomboundary primary p =
+ if pair p : p else : (llcorner p -- lrcorner p) fi
+enddef ;
+
+vardef rightboundary primary p =
+ if pair p : p else : (lrcorner p -- urcorner p) fi
+enddef ;
+
+vardef topboundary primary p =
+ if pair p : p else : (urcorner p -- ulcorner p) fi
+enddef ;
+
+vardef leftboundary primary p =
+ if pair p : p else : (ulcorner p -- llcorner p) fi
+enddef ;
+
+%D Nice too:
+
+primarydef p superellipsed s =
+ superellipse
+ (.5[lrcorner p,urcorner p],
+ .5[urcorner p,ulcorner p],
+ .5[ulcorner p,llcorner p],
+ .5[llcorner p,lrcorner p],
+ s)
+enddef ;
+
+primarydef p squeezed s =
+ ((llcorner p .. .5[llcorner p,lrcorner p] shifted ( 0, ypart paired(s)) .. lrcorner p) &
+ (lrcorner p .. .5[lrcorner p,urcorner p] shifted (-xpart paired(s), 0) .. urcorner p) &
+ (urcorner p .. .5[urcorner p,ulcorner p] shifted ( 0,-ypart paired(s)) .. ulcorner p) &
+ (ulcorner p .. .5[ulcorner p,llcorner p] shifted ( xpart paired(s), 0) .. llcorner p) & cycle)
+enddef ;
+
+primarydef p randomshifted s =
+ begingroup ; save ss ; pair ss ; ss := paired(s) ;
+ p shifted (-.5xpart ss + uniformdeviate xpart ss,
+ -.5ypart ss + uniformdeviate ypart ss)
+ endgroup
+enddef ;
+
+%primarydef p randomized s =
+% for i=0 upto length(p)-1 :
+% ((point i of p) randomshifted s) .. controls
+% ((postcontrol i of p) randomshifted s) and
+% ((precontrol (i+1) of p) randomshifted s) ..
+% endfor cycle
+%enddef ;
+
+primarydef p randomized s =
+ (if path p :
+ for i=0 upto length(p)-1 :
+ ((point i of p) randomshifted s) .. controls
+ ((postcontrol i of p) randomshifted s) and
+ ((precontrol (i+1) of p) randomshifted s) ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ ((point length(p) of p) randomshifted s)
+ fi
+ elseif pair p :
+ p randomshifted s
+ elseif color p :
+ if color s :
+ (uniformdeviate redpart s * redpart p,
+ uniformdeviate greenpart s * greenpart p,
+ uniformdeviate bluepart s * bluepart p)
+ elseif pair s :
+ ((xpart s + uniformdeviate (ypart s - xpart s)) * p)
+ else :
+ (uniformdeviate s * p)
+ fi
+ else :
+ p + uniformdeviate s
+ fi)
+enddef ;
+
+%D Not perfect (alternative for interpath)
+
+vardef interpolated(expr s, p, q) =
+ save m ; m := max(length(p),length(q)) ;
+ (if path p :
+ for i=0 upto m-1 :
+ s[point (i /m) along p,
+ point (i /m) along q] .. controls
+ s[postcontrol (i /m) along p,
+ postcontrol (i /m) along q] and
+ s[precontrol ((i+1)/m) along p,
+ precontrol ((i+1)/m) along q] ..
+ endfor
+ if cycle p :
+ cycle
+ else :
+ s[point infinity of p,
+ point infinity of q]
+ fi
+ else :
+ a[p,q]
+ fi)
+enddef ;
+
+%D Interesting too:
+
+% primarydef p parallel s =
+% begingroup ; save q, b ; path q ; numeric b ;
+% b := xpart (lrcorner p - llcorner p) ;
+% q := p if b>0 : scaled ((b+2s)/b) fi ;
+% (q shifted (center p-center q))
+% endgroup
+% enddef ;
+
+%primarydef p parallel s =
+% begingroup ; save q, w,h ; path q ; numeric w, h ;
+% w := bbwidth(p) ; h := bbheight(p) ;
+% q := p if (w>0) and (h>0) :
+% xyscaled ((w+2*xpart paired(s))/w,(h+2*ypart paired(s))/h) fi ;
+% (q shifted (center p-center q))
+% endgroup
+%enddef ;
+
+vardef punked primary p =
+ (point 0 of p for i=1 upto length(p)-1 : -- point i of p endfor
+ if cycle p : -- cycle else : -- point length(p) of p fi)
+enddef ;
+
+vardef curved primary p =
+ (point 0 of p for i=1 upto length(p)-1 : .. point i of p endfor
+ if cycle p : .. cycle else : .. point length(p) of p fi)
+enddef ;
+
+primarydef p blownup s =
+ begingroup
+ save _p_ ; path _p_ ; _p_ := p xysized
+ (bbwidth (p)+2(xpart paired(s)),
+ bbheight(p)+2(ypart paired(s))) ;
+ (_p_ shifted (center p - center _p_))
+ endgroup
+enddef ;
+
+%D Rather fundamental.
+
+% vardef rightpath expr p =
+% save q, t, b ; path q ; pair t, b ;
+% t := (ulcorner p -- urcorner p) intersection_point p ;
+% b := (llcorner p -- lrcorner p) intersection_point p ;
+% if xpart directionpoint t of p < 0 : p := reverse p ; fi ;
+% q := p cutbefore b ;
+% q := q if xpart point 0 of p > 0 : & p fi cutafter t ;
+% q
+% enddef ;
+%
+% vardef leftpath expr p =
+% save q, t, b ; path q ; pair t, b ;
+% t := (ulcorner p -- urcorner p) intersection_point p ;
+% b := (llcorner p -- lrcorner p) intersection_point p ;
+% if xpart directionpoint t of p < 0 : p := reverse p ; fi ;
+% q := p cutbefore t ;
+% q := q if xpart point 0 of p > 0 : & p fi cutafter b ;
+% q
+% enddef ;
+
+def leftrightpath(expr p, l) =
+ save q, t, b ; path q ; pair t, b ;
+ t := (ulcorner p -- urcorner p) intersection_point p ;
+ b := (llcorner p -- lrcorner p) intersection_point p ;
+ if xpart directionpoint t of p < 0 : p := reverse p ; fi ;
+ q := p cutbefore if l: t else: b fi ;
+ q := q if xpart point 0 of p > 0 : &
+ p fi cutafter if l: b else: t fi ;
+ q
+enddef ;
+
+vardef leftpath expr p = leftrightpath(p,true ) enddef ;
+vardef rightpath expr p = leftrightpath(p,false) enddef ;
+
+%D Drawoptions
+
+def saveoptions =
+ save _op_ ; def _op_ = enddef ;
+enddef ;
+
+%D Tracing.
+
+let normaldraw = draw ;
+let normalfill = fill ;
+
+def drawlineoptions (text t) = def _lin_opt_ = t enddef ; enddef ;
+def drawpointoptions (text t) = def _pnt_opt_ = t enddef ; enddef ;
+def drawcontroloptions(text t) = def _ctr_opt_ = t enddef ; enddef ;
+def drawlabeloptions (text t) = def _lab_opt_ = t enddef ; enddef ;
+def draworiginoptions (text t) = def _ori_opt_ = t enddef ; enddef ;
+def drawboundoptions (text t) = def _bnd_opt_ = t enddef ; enddef ;
+def drawpathoptions (text t) = def _pth_opt_ = t enddef ; enddef ;
+
+def resetdrawoptions =
+ drawlineoptions (withpen pencircle scaled 1pt withcolor .5white) ;
+ drawpointoptions (withpen pencircle scaled 4pt withcolor black) ;
+ drawcontroloptions(withpen pencircle scaled 2.5pt withcolor black) ;
+ drawlabeloptions () ;
+ draworiginoptions (withpen pencircle scaled 1pt withcolor .5white) ;
+ drawboundoptions (dashed evenly _ori_opt_) ;
+ drawpathoptions (withpen pencircle scaled 5pt withcolor .8white) ;
+enddef ;
+
+resetdrawoptions ;
+
+%D Path.
+
+def drawpath expr p =
+ normaldraw p _pth_opt_
+enddef ;
+
+%D Arrow.
+
+vardef drawarrowpath expr p =
+ save autoarrows ; boolean autoarrows ; autoarrows := true ;
+ drawarrow p _pth_opt_
+enddef ;
+
+%def drawarrowpath expr p =
+% begingroup ;
+% save autoarrows ; boolean autoarrows ; autoarrows := true ;
+% save arrowpath ; path arrowpath ; arrowpath := p ;
+% _drawarrowpath_
+%enddef ;
+%
+%def _drawarrowpath_ text t =
+% drawarrow arrowpath _pth_opt_ t ;
+% endgroup ;
+%enddef ;
+
+def midarrowhead expr p =
+ arrowhead p cutafter
+ (point length(p cutafter point .5 along p)+ahlength on p)
+enddef ;
+
+vardef arrowheadonpath (expr p, s) =
+ save autoarrows ; boolean autoarrows ; autoarrows := true ;
+ arrowhead p if s<1 : cutafter (point (s*arclength(p)+.5ahlength) on p) fi
+enddef ;
+
+%D Points.
+
+def drawpoint expr c =
+ if string c :
+ string _c_ ; _c_ := "(" & c & ")" ;
+ dotlabel.urt(_c_, scantokens _c_) ;
+ drawdot scantokens _c_
+ else :
+ dotlabel.urt("(" & decimal xpart c & "," & decimal ypart c & ")", c) ;
+ drawdot c
+ fi _pnt_opt_
+enddef ;
+
+%D PathPoints.
+
+def drawpoints expr c = path _c_ ; _c_ := c ; do_drawpoints enddef ;
+def drawcontrolpoints expr c = path _c_ ; _c_ := c ; do_drawcontrolpoints enddef ;
+def drawcontrollines expr c = path _c_ ; _c_ := c ; do_drawcontrollines enddef ;
+def drawpointlabels expr c = path _c_ ; _c_ := c ; do_drawpointlabels enddef ;
+
+def do_drawpoints text t =
+ for _i_=0 upto length(_c_) :
+ normaldraw point _i_ of _c_ _pnt_opt_ t ;
+ endfor ;
+enddef;
+
+def do_drawcontrolpoints text t =
+ for _i_=0 upto length(_c_) :
+ normaldraw precontrol _i_ of _c_ _ctr_opt_ t ;
+ normaldraw postcontrol _i_ of _c_ _ctr_opt_ t ;
+ endfor ;
+enddef;
+
+def do_drawcontrollines text t =
+ for _i_=0 upto length(_c_) :
+ normaldraw point _i_ of _c_ -- precontrol _i_ of _c_ _lin_opt_ t ;
+ normaldraw point _i_ of _c_ -- postcontrol _i_ of _c_ _lin_opt_ t ;
+ endfor ;
+enddef;
+
+boolean swappointlabels ; swappointlabels := false ;
+
+def do_drawpointlabels text t =
+ for _i_=0 upto length(_c_) :
+ pair _u_ ; _u_ := unitvector(direction _i_ of _c_)
+ rotated if swappointlabels : - fi 90 ;
+ pair _p_ ; _p_ := (point _i_ of _c_) ;
+ _u_ := 12 * defaultscale * _u_ ;
+ normaldraw thelabel ( decimal _i_,
+ _p_ shifted if cycle _c_ and (_i_=0) : - fi _u_ ) _lab_opt_ t ;
+ endfor ;
+enddef;
+
+%D Bounding box.
+
+def drawboundingbox expr p =
+ normaldraw boundingbox p _bnd_opt_
+enddef ;
+
+%D Origin.
+
+numeric originlength ; originlength := .5cm ;
+
+def draworigin text t =
+ normaldraw (origin shifted (0, originlength) --
+ origin shifted (0,-originlength)) _ori_opt_ t ;
+ normaldraw (origin shifted ( originlength,0) --
+ origin shifted (-originlength,0)) _ori_opt_ t ;
+enddef;
+
+%D Axis.
+
+numeric tickstep ; tickstep := 5mm ;
+numeric ticklength ; ticklength := 2mm ;
+
+def drawxticks expr c = path _c_ ; _c_ := c ; do_drawxticks enddef ;
+def drawyticks expr c = path _c_ ; _c_ := c ; do_drawyticks enddef ;
+def drawticks expr c = path _c_ ; _c_ := c ; do_drawticks enddef ;
+
+% Adding eps prevents disappearance due to rounding errors.
+
+def do_drawxticks text t =
+ for i=0 step -tickstep until xpart llcorner _c_ - eps :
+ if (i<=xpart lrcorner _c_) :
+ normaldraw (i,-ticklength)--(i,ticklength) _ori_opt_ t ;
+ fi ;
+ endfor ;
+ for i=0 step tickstep until xpart lrcorner _c_ + eps :
+ if (i>=xpart llcorner _c_) :
+ normaldraw (i,-ticklength)--(i,ticklength) _ori_opt_ t ;
+ fi ;
+ endfor ;
+ normaldraw (llcorner _c_ -- ulcorner _c_)
+ shifted (-xpart llcorner _c_,0) _ori_opt_ t ;
+enddef ;
+
+def do_drawyticks text t =
+ for i=0 step -tickstep until ypart llcorner _c_ - eps :
+ if (i<=ypart ulcorner _c_) :
+ normaldraw (-ticklength,i)--(ticklength,i) _ori_opt_ t ;
+ fi ;
+ endfor ;
+ for i=0 step tickstep until ypart ulcorner _c_ + eps :
+ if (i>=ypart llcorner _c_) :
+ normaldraw (-ticklength,i)--(ticklength,i) _ori_opt_ t ;
+ fi ;
+ endfor ;
+ normaldraw (llcorner _c_ -- lrcorner _c_)
+ shifted (0,-ypart llcorner _c_) _ori_opt_ t ;
+enddef ;
+
+def do_drawticks text t =
+ drawxticks _c_ t ;
+ drawyticks _c_ t ;
+enddef ;
+
+%D All of it except axis.
+
+def drawwholepath expr p =
+ draworigin ;
+ drawpath p ;
+ drawcontrollines p ;
+ drawcontrolpoints p ;
+ drawpoints p ;
+ drawboundingbox p ;
+ drawpointlabels p ;
+enddef ;
+
+%D Tracing.
+
+def visualizeddraw expr c =
+ if picture c : normaldraw c else : path _c_ ; _c_ := c ; do_visualizeddraw fi
+enddef ;
+
+def visualizedfill expr c =
+ if picture c : normalfill c else : path _c_ ; _c_ := c ; do_visualizedfill fi
+enddef ;
+
+def do_visualizeddraw text t =
+ draworigin ;
+ drawpath _c_ t ;
+ drawcontrollines _c_ ;
+ drawcontrolpoints _c_ ;
+ drawpoints _c_ ;
+ drawboundingbox _c_ ;
+ drawpointlabels _c_ ;
+enddef ;
+
+def do_visualizedfill text t =
+ if cycle _c_ : normalfill _c_ t fi ;
+ draworigin ;
+ drawcontrollines _c_ ;
+ drawcontrolpoints _c_ ;
+ drawpoints _c_ ;
+ drawboundingbox _c_ ;
+ drawpointlabels _c_ ;
+enddef ;
+
+def visualizepaths =
+ let fill = visualizedfill ;
+ let draw = visualizeddraw ;
+enddef ;
+
+def naturalizepaths =
+ let fill = normalfill ;
+ let draw = normaldraw ;
+enddef ;
+
+extra_endfig := extra_endfig & " naturalizepaths ; " ;
+
+%D Normally, arrowheads don't scale well. So we provide a
+%D hack.
+
+boolean autoarrows ; autoarrows := false ;
+numeric ahfactor ; ahfactor := 2.5 ;
+
+def set_ahlength (text t) =
+ ahlength := (ahfactor*pen_size(_op_ t)) ; % _op_ added
+enddef ;
+
+vardef pen_size (text t) =
+ save p ; picture p ; p := nullpicture ;
+ addto p doublepath (top origin -- bot origin) t ;
+ (ypart urcorner p - ypart lrcorner p)
+enddef ;
+
+%D The next two macros are adapted versions of plain
+%D \METAPOST\ definitions.
+
+def _finarr text t =
+ if autoarrows : set_ahlength (t) fi ;
+ draw _apth t ;
+ filldraw arrowhead _apth t ;
+enddef;
+
+def _findarr text t =
+ if autoarrows : set_ahlength (t) fi ;
+ draw _apth t ;
+ fill arrowhead _apth withpen currentpen t ;
+ fill arrowhead reverse _apth withpen currentpen t ;
+enddef ;
+
+%D Handy too ......
+
+vardef pointarrow (expr pat, loc, len, off) =
+ save l, r, s, t ; path l, r ; numeric s ; pair t ;
+ t := if pair loc : loc else : point loc along pat fi ;
+% draw t withpen pencircle scaled 10 withcolor .5white ;
+ s := len/2 - off ; if s<=0 : s := 0 elseif s>len : s := len fi ;
+ r := pat cutbefore t ;
+ r := (r cutafter point (arctime s of r) of r) ;
+ s := len/2 + off ; if s<=0 : s := 0 elseif s>len : s := len fi ;
+ l := reverse (pat cutafter t) ;
+ l := (reverse (l cutafter point (arctime s of l) of l)) ;
+ (l..r)
+enddef ;
+
+def rightarrow (expr pat,tim,len) = pointarrow(pat,tim,len,-len) enddef ;
+def leftarrow (expr pat,tim,len) = pointarrow(pat,tim,len,+len) enddef ;
+def centerarrow (expr pat,tim,len) = pointarrow(pat,tim,len, 0) enddef ;
+
+%D The \type {along} and \type {on} operators can be used
+%D as follows:
+%D
+%D \starttypen
+%D drawdot point .5 along somepath ;
+%D drawdot point 3cm on somepath ;
+%D \stoptypen
+%D
+%D The number denotes a percentage (fraction).
+
+primarydef pct along pat = % also negative
+ (arctime (pct * (arclength pat)) of pat) of pat
+enddef ;
+
+% primarydef len on pat =
+% (arctime len of pat) of pat
+% enddef ;
+
+primarydef len on pat =
+ (arctime if len>0 : len else : (arclength(pat)+len) fi of pat) of pat
+enddef ;
+
+% this cuts of a piece from both ends
+
+% tertiarydef pat cutends len =
+% begingroup ; save tap ; path tap ;
+% tap := pat cutbefore (point len on pat) ;
+% (tap cutafter (point -len on tap))
+% endgroup
+% enddef ;
+
+tertiarydef pat cutends len =
+ begingroup ; save tap ; path tap ;
+ tap := pat cutbefore (point (xpart paired(len)) on pat) ;
+ (tap cutafter (point -(ypart paired(len)) on tap))
+ endgroup
+enddef ;
+
+%D To be documented.
+
+path freesquare ;
+
+freesquare := ((-1,0)--(-1,-1)--(0,-1)--(+1,-1)--
+ (+1,0)--(+1,+1)--(0,+1)--(-1,+1)--cycle) scaled .5 ;
+
+numeric freelabeloffset ; freelabeloffset := 3pt ;
+numeric freedotlabelsize ; freedotlabelsize := 3pt ;
+
+vardef thefreelabel (expr str, loc, ori) =
+ save s, p, q, l ; picture s ; path p, q ; pair l ;
+ interim labeloffset := freelabeloffset ;
+ s := if string str : thelabel(str,loc) else : str shifted -center str shifted loc fi ;
+ setbounds s to boundingbox s enlarged freelabeloffset ;
+ p := fullcircle scaled (2*length(loc-ori)) shifted ori ;
+ q := freesquare xyscaled (urcorner s - llcorner s) ;
+% l := point (xpart (p intersectiontimes (ori--loc))) of q ;
+ l := point xpart (p intersectiontimes
+ (ori--((1+eps)*arclength(ori--loc)*unitvector(loc-ori)))) of q ;
+ setbounds s to boundingbox s enlarged -freelabeloffset ; % new
+ %draw boundingbox s shifted -l withpen pencircle scaled .5pt withcolor red ;
+ (s shifted -l)
+enddef ;
+
+% better?
+
+vardef thefreelabel (expr str, loc, ori) =
+ save s, p, q, l ; picture s ; path p, q ; pair l ;
+ interim labeloffset := freelabeloffset ;
+ s := if string str : thelabel(str,loc) else : str shifted -center str shifted loc fi ;
+ setbounds s to boundingbox s enlarged freelabeloffset ;
+ p := fullcircle scaled (2*length(loc-ori)) shifted ori ;
+ q := freesquare xyscaled (urcorner s - llcorner s) ;
+ l := point xpart (p intersectiontimes (ori--loc shifted (loc-ori))) of q ;
+ setbounds s to boundingbox s enlarged -freelabeloffset ; % new
+ %draw boundingbox s shifted -l withpen pencircle scaled .5pt withcolor red ;
+ (s shifted -l)
+enddef ;
+
+vardef freelabel (expr str, loc, ori) =
+ draw thefreelabel(str,loc,ori) ;
+enddef ;
+
+vardef freedotlabel (expr str, loc, ori) =
+ interim linecap:=rounded ;
+ draw loc withpen pencircle scaled freedotlabelsize ;
+ draw thefreelabel(str,loc,ori) ;
+enddef ;
+
+%D \starttypen
+%D drawarrow anglebetween(line_a,line_b,somelabel) ;
+%D \stoptypen
+
+% angleoffset ; angleoffset := 0pt ;
+numeric anglelength ; anglelength := 20pt ;
+numeric anglemethod ; anglemethod := 1 ;
+
+% vardef anglebetween (expr a, b, str) = % path path string
+% save pointa, pointb, common, middle, offset ;
+% pair pointa, pointb, common, middle, offset ;
+% save curve ; path curve ;
+% save where ; numeric where ;
+% if round point 0 of a = round point 0 of b :
+% common := point 0 of a ;
+% else :
+% common := a intersectionpoint b ;
+% fi ;
+% pointa := point anglelength on a ;
+% pointb := point anglelength on b ;
+% where := turningnumber (common--pointa--pointb--cycle) ;
+% middle := ((common--pointa) rotatedaround (pointa,-where*90))
+% intersectionpoint
+% ((common--pointb) rotatedaround (pointb, where*90)) ;
+% if anglemethod = 0 :
+% curve := pointa{unitvector(middle-pointa)}.. pointb;
+% middle := point .5 along curve ;
+% curve := common ;
+% elseif anglemethod = 1 :
+% curve := pointa{unitvector(middle-pointa)}.. pointb;
+% middle := point .5 along curve ;
+% elseif anglemethod = 2 :
+% middle := common rotatedaround(.5[pointa,pointb],180) ;
+% curve := pointa--middle--pointb ;
+% elseif anglemethod = 3 :
+% curve := pointa--middle--pointb ;
+% elseif anglemethod = 4 :
+% curve := pointa..controls middle..pointb ;
+% middle := point .5 along curve ;
+% fi ;
+% draw thefreelabel(str, middle, common) withcolor black ;
+% curve
+% enddef ;
+
+vardef anglebetween (expr a, b, str) = % path path string
+ save pointa, pointb, common, middle, offset ;
+ pair pointa, pointb, common, middle, offset ;
+ save curve ; path curve ;
+ save where ; numeric where ;
+ if round point 0 of a = round point 0 of b :
+ common := point 0 of a ;
+ else :
+ common := a intersectionpoint b ;
+ fi ;
+ pointa := point anglelength on a ;
+ pointb := point anglelength on b ;
+ where := turningnumber (common--pointa--pointb--cycle) ;
+ middle := (reverse(common--pointa) rotatedaround (pointa,-where*90))
+ intersection_point
+ (reverse(common--pointb) rotatedaround (pointb, where*90)) ;
+ if not intersection_found :
+ middle := point .5 along
+ ((reverse(common--pointa) rotatedaround (pointa,-where*90)) --
+ ( (common--pointb) rotatedaround (pointb, where*90))) ;
+ fi ;
+ if anglemethod = 0 :
+ curve := pointa{unitvector(middle-pointa)}.. pointb;
+ middle := point .5 along curve ;
+ curve := common ;
+ elseif anglemethod = 1 :
+ curve := pointa{unitvector(middle-pointa)}.. pointb;
+ middle := point .5 along curve ;
+ elseif anglemethod = 2 :
+ middle := common rotatedaround(.5[pointa,pointb],180) ;
+ curve := pointa--middle--pointb ;
+ elseif anglemethod = 3 :
+ curve := pointa--middle--pointb ;
+ elseif anglemethod = 4 :
+ curve := pointa..controls middle..pointb ;
+ middle := point .5 along curve ;
+ fi ;
+ draw thefreelabel(str, middle, common) ; % withcolor black ;
+ curve
+enddef ;
+
+% Stack
+
+picture currentpicturestack[] ;
+numeric currentpicturedepth ; currentpicturedepth := 0 ;
+
+def pushcurrentpicture =
+ currentpicturedepth := currentpicturedepth + 1 ;
+ currentpicturestack[currentpicturedepth] := currentpicture ;
+ currentpicture := nullpicture ;
+enddef ;
+
+def popcurrentpicture text t = % optional text
+ if currentpicturedepth > 0 :
+ addto currentpicturestack[currentpicturedepth] also currentpicture t ;
+ currentpicture := currentpicturestack[currentpicturedepth] ;
+ currentpicturedepth := currentpicturedepth - 1 ;
+ fi ;
+enddef ;
+
+%D colorcircle(size, red, green, blue) ;
+
+% vardef colorcircle (expr size, red, green, blue) =
+% save r, g, b, rr, gg, bb, cc, mm, yy ; save radius ;
+% path r, g, b, rr, bb, gg, cc, mm, yy ; numeric radius ;
+%
+% radius := 5cm ; pickup pencircle scaled (radius/25) ;
+%
+% r := g := b := fullcircle scaled radius shifted (0,radius/4) ;
+%
+% r := r rotatedaround (origin, 15) ;
+% g := g rotatedaround (origin,135) ;
+% b := b rotatedaround (origin,255) ;
+%
+% r := r rotatedaround(center r,-90) ;
+% g := g rotatedaround(center g, 90) ;
+%
+% gg := buildcycle(buildcycle(reverse r,b),g) ;
+% cc := buildcycle(buildcycle(b,reverse g),r) ;
+%
+% rr := gg rotatedaround(origin,120) ;
+% bb := gg rotatedaround(origin,240) ;
+%
+% yy := cc rotatedaround(origin,120) ;
+% mm := cc rotatedaround(origin,240) ;
+%
+% pushcurrentpicture ;
+%
+% fill fullcircle scaled radius withcolor white ;
+%
+% fill rr withcolor red ; fill cc withcolor white-red ;
+% fill gg withcolor green ; fill mm withcolor white-green ;
+% fill bb withcolor blue ; fill yy withcolor white-blue ;
+%
+% for i = rr,gg,bb,cc,mm,yy : draw i withcolor .5white ; endfor ;
+%
+% currentpicture := currentpicture xsized size ;
+%
+% popcurrentpicture ;
+% enddef ;
+
+% vardef colorcircle (expr size, red, green, blue) =
+% save r, g, b, rr, gg, bb, cc, mm, yy ; save radius ;
+% path r, g, b, rr, bb, gg, cc, mm, yy ; numeric radius ;
+%
+% radius := 5cm ; pickup pencircle scaled (radius/25) ;
+%
+% transform t ; t := identity rotatedaround(origin,120) ;
+%
+% r := fullcircle scaled radius
+% shifted (0,radius/4) rotatedaround(origin,15) ;
+%
+% g := r transformed t ; b := g transformed t ;
+%
+% r := r rotatedaround(center r,-90) ;
+% g := g rotatedaround(center g, 90) ;
+%
+% gg := buildcycle(buildcycle(reverse r,b),g) ;
+% cc := buildcycle(buildcycle(b,reverse g),r) ;
+%
+% rr := gg transformed t ; bb := rr transformed t ;
+% yy := cc transformed t ; mm := yy transformed t ;
+%
+% pushcurrentpicture ;
+%
+% fill fullcircle scaled radius withcolor white ;
+%
+% fill rr withcolor red ; fill cc withcolor white-red ;
+% fill gg withcolor green ; fill mm withcolor white-green ;
+% fill bb withcolor blue ; fill yy withcolor white-blue ;
+%
+% for i = rr,gg,bb,cc,mm,yy : draw i withcolor .5white ; endfor ;
+%
+% currentpicture := currentpicture xsized size ;
+%
+% popcurrentpicture ;
+% enddef ;
+
+vardef colorcircle (expr size, red, green, blue) =
+ save r, g, b, c, m, y, w ; save radius ;
+ path r, g, b, c, m, y, w ; numeric radius ;
+
+ radius := 5cm ; pickup pencircle scaled (radius/25) ;
+
+ transform t ; t := identity rotatedaround(origin,120) ;
+
+ r := fullcircle rotated 90 scaled radius
+ shifted (0,radius/4) rotatedaround(origin,135) ;
+
+ b := r transformed t ; g := b transformed t ;
+
+ c := buildcycle(subpath(1,7) of g,subpath(1,7) of b) ;
+ y := c transformed t ; m := y transformed t ;
+
+ w := buildcycle(subpath(3,5) of r, subpath(3,5) of g,subpath(3,5) of b) ;
+
+ pushcurrentpicture ;
+
+ fill r withcolor red ;
+ fill g withcolor green ;
+ fill b withcolor blue ;
+ fill c withcolor white-red ;
+ fill m withcolor white-green ;
+ fill y withcolor white-blue ;
+ fill w withcolor white ;
+
+ for i = r,g,b,c,m,y : draw i withcolor .5white ; endfor ;
+
+ currentpicture := currentpicture xsized size ;
+
+ popcurrentpicture ;
+enddef ;
+
+% penpoint (i,2) of somepath -> inner / outer point
+
+vardef penpoint expr pnt of p =
+ save n, d ; numeric n, d ;
+ (n,d) = if pair pnt : pnt else : (pnt,1) fi ;
+ (point n of p shifted ((penoffset direction n of p of currentpen) scaled d))
+enddef ;
+
+% nice: currentpicture := inverted currentpicture ;
+
+primarydef p uncolored c =
+ if color p :
+ c - p
+ else :
+ image
+ (for i within p :
+ addto currentpicture
+ if stroked i or filled i :
+ if filled i : contour else : doublepath fi pathpart i
+ dashed dashpart i withpen penpart i
+ else :
+ also i
+ fi
+ withcolor c-(redpart i, greenpart i, bluepart i) ;
+ endfor ; )
+ fi
+enddef ;
+
+vardef inverted primary p =
+ (p uncolored white)
+enddef ;
+
+% primarydef p softened c =
+% if color p :
+% tripled(c) * p
+% else :
+% image
+% (save cc ; color cc ; cc := tripled(c) ;
+% for i within p :
+% addto currentpicture
+% if stroked i or filled i :
+% if filled i : contour else : doublepath fi pathpart i
+% dashed dashpart i withpen penpart i
+% else :
+% also i
+% fi
+% withcolor (redpart cc * redpart i,
+% greenpart cc * greenpart i,
+% bluepart cc * bluepart i) ;
+% endfor ;)
+% fi
+% enddef ;
+
+primarydef p softened c =
+ begingroup
+ save cc ; color cc ; cc := tripled(c) ;
+ if color p :
+ (redpart cc * redpart p,
+ greenpart cc * greenpart p,
+ bluepart cc * bluepart p)
+ else :
+ image
+ (for i within p :
+ addto currentpicture
+ if stroked i or filled i :
+ if filled i : contour else : doublepath fi pathpart i
+ dashed dashpart i withpen penpart i
+ else :
+ also i
+ fi
+ withcolor (redpart cc * redpart i,
+ greenpart cc * greenpart i,
+ bluepart cc * bluepart i) ;
+ endfor ;)
+ fi
+ endgroup
+enddef ;
+
+vardef grayed primary p =
+ if color p :
+ tripled(.30redpart p+.59greenpart p+.11bluepart p)
+ else :
+ image
+ (for i within p :
+ addto currentpicture
+ if stroked i or filled i :
+ if filled i : contour else : doublepath fi pathpart i
+ dashed dashpart i withpen penpart i
+ else :
+ also i
+ fi
+ withcolor tripled(.30redpart i+.59greenpart i+.11bluepart i) ;
+ endfor ; )
+ fi
+enddef ;
+
+% yes or no: "text" infont "cmr12" at 24pt ;
+
+% let normalinfont = infont ;
+%
+% numeric lastfontsize ; lastfontsize = fontsize defaultfont ;
+%
+% def infont primary name = % no vardef, no expr
+% hide(lastfontsize := fontsize name) % no ;
+% normalinfont name
+% enddef ;
+%
+% def scaledat expr size =
+% scaled (size/lastfontsize)
+% enddef ;
+%
+% let at = scaledat ;
+
+% like decimal
+
+def condition primary b = if b : "true" else : "false" fi enddef ;
+
+% undocumented
+
+primarydef p stretched s =
+ begingroup
+% save pp ; path pp ; pp := p scaled s ;
+ save pp ; path pp ; pp := p xyscaled s ;
+ (pp shifted ((point 0 of p) - (point 0 of pp)))
+ endgroup
+enddef ;
+
+% yes or no, untested -)
+
+def xshifted expr dx = shifted(dx,0) enddef ;
+def yshifted expr dy = shifted(0,dy) enddef ;
+
+% also handy
+
+% right: str = readfrom ("abc" & ".def" ) ;
+% wrong: str = readfrom "abc" & ".def" ;
+
+% Every 62th read fails so we need to try again!
+
+% def readfile (expr name) =
+% if (readfrom (name) <> EOF) :
+% scantokens("input " & name & ";") ;
+% elseif (readfrom (name) <> EOF) :
+% scantokens("input " & name & ";") ;
+% fi ;
+% closefrom (name) ;
+% enddef ;
+%
+% this sometimes fails on the elseif, so :
+%
+
+def readfile (expr name) =
+ begingroup ; save ok ; boolean ok ;
+ if (readfrom (name) <> EOF) :
+ ok := false ;
+ elseif (readfrom (name) <> EOF) :
+ ok := false ;
+ else :
+ ok := true ;
+ fi ;
+ if not ok :
+ scantokens("input " & name & " ") ;
+ fi ;
+ closefrom (name) ;
+ endgroup ;
+enddef ;
+
+% permits redefinition of end in macro
+
+inner end ;
+
+% real fun
+
+let normalwithcolor = withcolor ;
+
+def remapcolors =
+ def withcolor primary c = normalwithcolor remappedcolor(c) enddef ;
+enddef ;
+
+def normalcolors =
+ let withcolor = normalwithcolor ;
+enddef ;
+
+def resetcolormap =
+ color color_map[][][] ;
+ normalcolors ;
+enddef ;
+
+resetcolormap ;
+
+% color_map_resolution := 1000 ;
+%
+% def r_color primary c = round(color_map_resolution*redpart c) enddef ;
+% def g_color primary c = round(color_map_resolution*greenpart c) enddef ;
+% def b_color primary c = round(color_map_resolution*bluepart c) enddef ;
+
+def r_color primary c = redpart c enddef ;
+def g_color primary c = greenpart c enddef ;
+def b_color primary c = bluepart c enddef ;
+
+def remapcolor(expr old, new) =
+ color_map[r_color old][g_color old][b_color old] := new ;
+enddef ;
+
+def remappedcolor(expr c) =
+ if known color_map[r_color c][g_color c][b_color c] :
+ color_map[r_color c][g_color c][b_color c]
+ else :
+ c
+ fi
+enddef ;
+
+% def refill suffix c = do_repath (1) (c) enddef ;
+% def redraw suffix c = do_repath (2) (c) enddef ;
+% def recolor suffix c = do_repath (0) (c) enddef ;
+%
+% color refillbackground ; refillbackground := (1,1,1) ;
+%
+% def do_repath (expr mode) (suffix c) text t = % can it be stroked and filled at the same time ?
+% begingroup ;
+% if mode=0 : save withcolor ; remapcolors ; fi ;
+% save _c_, _cc_, _f_, _b_ ; picture _c_, _cc_ ; color _f_ ; path _b_ ;
+% _c_ := c ; _b_ := boundingbox c ; c := nullpicture ;
+% for i within _c_ :
+% _f_ := (redpart i, greenpart i, bluepart i) ;
+% if bounded i :
+% setbounds c to pathpart i ;
+% elseif clipped i :
+% clip c to pathpart i ;
+% elseif stroked i :
+% addto c doublepath pathpart i
+% dashed dashpart i withpen penpart i
+% withcolor _f_ % (redpart i, greenpart i, bluepart i)
+% if mode=2 : t fi ;
+% elseif filled i :
+% addto c contour pathpart i
+% withcolor _f_
+% if (mode=1) and (_f_<>refillbackground) : t fi ;
+% else :
+% addto c also i ;
+% fi ;
+% endfor ;
+% setbounds c to _b_ ;
+% endgroup ;
+% enddef ;
+
+% Thanks to Jens-Uwe Morawski for pointing out that we need
+% to treat bounded and clipped components as local pictures.
+
+def recolor suffix p = p := repathed (0,p) enddef ;
+def refill suffix p = p := repathed (1,p) enddef ;
+def redraw suffix p = p := repathed (2,p) enddef ;
+def retext suffix p = p := repathed (3,p) enddef ;
+def untext suffix p = p := repathed (4,p) enddef ;
+
+% primarydef p recolored t = repathed(0,p) t enddef ;
+% primarydef p refilled t = repathed(1,p) t enddef ;
+% primarydef p redrawn t = repathed(2,p) t enddef ;
+% primarydef p retexted t = repathed(3,p) t enddef ;
+% primarydef p untexted t = repathed(4,p) t enddef ;
+
+color refillbackground ; refillbackground := (1,1,1) ;
+
+% vardef repathed (expr mode, p) text t =
+% begingroup ;
+% if mode=0 : save withcolor ; remapcolors ; fi ;
+% save _p_, _pp_, _f_, _b_, _t_ ;
+% picture _p_, _pp_ ; color _f_ ; path _b_ ; transform _t_ ;
+% _b_ := boundingbox p ; _p_ := nullpicture ;
+% for i within p :
+% _f_ := (redpart i, greenpart i, bluepart i) ;
+% if bounded i :
+% _pp_ := repathed(mode,i) t ;
+% setbounds _pp_ to pathpart i ;
+% addto _p_ also _pp_ ;
+% elseif clipped i :
+% _pp_ := repathed(mode,i) t ;
+% clip _pp_ to pathpart i ;
+% addto _p_ also _pp_ ;
+% elseif stroked i :
+% addto _p_ doublepath pathpart i
+% dashed dashpart i withpen penpart i
+% withcolor _f_ % (redpart i, greenpart i, bluepart i)
+% if mode=2 : t fi ;
+% elseif filled i :
+% addto _p_ contour pathpart i
+% withcolor _f_
+% if (mode=1) and (_f_<>refillbackground) : t fi ;
+% elseif textual i : % textpart i <> "" :
+% if mode <> 4 :
+% % transform _t_ ;
+% % (xpart _t_, xxpart _t_, xypart _t_) = (xpart i, xxpart i, xypart i) ;
+% % (ypart _t_, yypart _t_, yxpart _t_) = (ypart i, yypart i, yxpart i) ;
+% % addto _p_ also
+% % textpart i infont fontpart i % todo : other font
+% % transformed _t_
+% % withpen penpart i
+% % withcolor _f_
+% % if mode=3 : t fi ;
+% addto _p_ also i if mode=3 : t fi ;
+% fi ;
+% else :
+% addto _p_ also i ;
+% fi ;
+% endfor ;
+% setbounds _p_ to _b_ ;
+% _p_
+% endgroup
+% enddef ;
+
+def restroke suffix p = p := repathed (21,p) enddef ; % keep attributes
+def reprocess suffix p = p := repathed (22,p) enddef ; % no attributes
+
+% also 11 and 12
+
+vardef repathed (expr mode, p) text t =
+ begingroup ;
+ if mode=0 : save withcolor ; remapcolors ; fi ;
+ save _p_, _pp_, _ppp_, _f_, _b_, _t_ ;
+ picture _p_, _pp_, _ppp_ ; color _f_ ; path _b_ ; transform _t_ ;
+ _b_ := boundingbox p ; _p_ := nullpicture ;
+ for i within p :
+ _f_ := (redpart i, greenpart i, bluepart i) ;
+ if bounded i :
+ _pp_ := repathed(mode,i) t ;
+ setbounds _pp_ to pathpart i ;
+ addto _p_ also _pp_ ;
+ elseif clipped i :
+ _pp_ := repathed(mode,i) t ;
+ clip _pp_ to pathpart i ;
+ addto _p_ also _pp_ ;
+ elseif stroked i :
+ if mode=21 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")
+ dashed dashpart i withpen penpart i
+ withcolor _f_ ; ) ;
+ elseif mode=22 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")) ;
+ else :
+ addto _p_ doublepath pathpart i
+ dashed dashpart i withpen penpart i
+ withcolor _f_ % (redpart i, greenpart i, bluepart i)
+ if mode=2 : t fi ;
+ fi ;
+ elseif filled i :
+ if mode=11 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")
+ withcolor _f_ ; ) ;
+ elseif mode=12 :
+ _ppp_ := i ; % indirectness is needed
+ addto _p_ also image(scantokens(t & " pathpart _ppp_")) ;
+ else :
+ addto _p_ contour pathpart i
+ withcolor _f_
+ if (mode=1) and (_f_<>refillbackground) : t fi ;
+ fi ;
+ elseif textual i : % textpart i <> "" :
+ if mode <> 4 :
+ % transform _t_ ;
+ % (xpart _t_, xxpart _t_, xypart _t_) = (xpart i, xxpart i, xypart i) ;
+ % (ypart _t_, yypart _t_, yxpart _t_) = (ypart i, yypart i, yxpart i) ;
+ % addto _p_ also
+ % textpart i infont fontpart i % todo : other font
+ % transformed _t_
+ % withpen penpart i
+ % withcolor _f_
+ % if mode=3 : t fi ;
+ addto _p_ also i if mode=3 : t fi ;
+ fi ;
+ else :
+ addto _p_ also i ;
+ fi ;
+ endfor ;
+ setbounds _p_ to _b_ ;
+ _p_
+ endgroup
+enddef ;
+
+% After a question of Denis on how to erase a z variable, Jacko
+% suggested to assign whatever to x and y. So a clearz
+% variable can be defined as:
+%
+% vardef clearz@# =
+% x@# := whatever ;
+% y@# := whatever ;
+% enddef ;
+%
+% but Jacko suggested a redefinition of clearxy:
+%
+% def clearxy text s =
+% clearxy_index_:=0;
+% for $:=s:
+% clearxy_index_:=clearxy_index_+1; endfor;
+% if clearxy_index_=0:
+% save x,y;
+% else:
+% forsuffixes $:=s: x$:=whatever; y$:=whatever; endfor;
+% fi
+% enddef;
+%
+% which i decided to simplify to:
+
+def clearxy text s =
+ if false for $ := s : or true endfor :
+ forsuffixes $ := s : x$ := whatever ; y$ := whatever ; endfor ;
+ else :
+ save x, y ;
+ fi
+enddef ;
+
+% so now we can say: clearxy ; as well as clearxy 1, 2, 3 ;
+
+% show x0 ; z0 = (10,10) ;
+% show x0 ; x0 := whatever ; y0 := whatever ;
+% show x0 ; z0 = (20,20) ;
+% show x0 ; clearxy 0 ;
+% show x0 ; z0 = (30,30) ;
+
+primarydef p smoothed d =
+ (p llmoved (-xpart paired(d),0) -- p lrmoved (-xpart paired(d),0) {right} ..
+ p lrmoved (0,-ypart paired(d)) -- p urmoved (0,-ypart paired(d)) {up} ..
+ p urmoved (-xpart paired(d),0) -- p ulmoved (-xpart paired(d),0) {left} ..
+ p ulmoved (0,-ypart paired(d)) -- p llmoved (0,-ypart paired(d)) {down} .. cycle)
+enddef ;
+
+primarydef p cornered c =
+ ((point 0 of p) shifted (c*(unitvector(point 1 of p - point 0 of p))) --
+ for i=1 upto length(p) :
+ (point i-1 of p) shifted (c*(unitvector(point i of p - point i-1 of p))) --
+ (point i of p) shifted (c*(unitvector(point i-1 of p - point i of p))) ..
+ controls point i of p ..
+ endfor cycle)
+enddef ;
+
+% cmyk color support
+
+vardef cmyk(expr c,m,y,k) =
+ (1-c-k,1-m-k,1-y-k)
+enddef ;
+
+% handy
+
+vardef bbwidth (expr p) =
+ (if known p :
+ if path p or picture p :
+ xpart (lrcorner p - llcorner p)
+ else : 0 fi else : 0
+ fi )
+enddef ;
+
+vardef bbheight (expr p) =
+ (if known p : if path p or picture p :
+ ypart (urcorner p - lrcorner p)
+ else : 0 fi else : 0
+ fi)
+enddef ;
+
+color nocolor ; numeric noline ; % both unknown signals
+
+def dowithpath (expr p, lw, lc, bc) =
+ if known p :
+ if known bc :
+ fill p withcolor bc ;
+ fi ;
+ if known lw and known lc :
+ draw p withpen pencircle scaled lw withcolor lc ;
+ elseif known lw :
+ draw p withpen pencircle scaled lw ;
+ elseif known lc :
+ draw p withcolor lc ;
+ fi ;
+ fi ;
+enddef ;
+
+% result from metafont discussion list (denisr/boguslawj)
+
+def ]] = ] ] enddef ; def ]]] = ] ] ] enddef ;
+def [[ = [ [ enddef ; def [[[ = [ [ [ enddef ;
+
+% not perfect, but useful since it removes redundant points.
+
+% vardef dostraightened(expr sign, p) =
+% if length(p)>2 : % was 1, but straight lines are ok
+% save pp ; path pp ;
+% pp := point 0 of p ;
+% for i=1 upto length(p)-1 :
+% if round(point i of p) <> round(point length(pp) of pp) :
+% pp := pp -- point i of p ;
+% fi ;
+% endfor ;
+% save n, ok ; numeric n ; boolean ok ;
+% n := length(pp) ; ok := false ;
+% if n>2 :
+% for i=0 upto n : % evt hier ook round
+% if unitvector(round(point i of pp -
+% point if i=0 : n else : i-1 fi of pp)) <>
+% sign * unitvector(round(point if i=n : 0 else : i+1 fi of pp -
+% point i of pp)) :
+% if ok : -- else : ok := true ; fi point i of pp
+% fi
+% endfor
+% if ok and (cycle p) : -- cycle fi
+% else :
+% pp
+% fi
+% else :
+% p
+% fi
+% enddef ;
+
+% vardef simplified expr p =
+% (reverse dostraightened(+1,dostraightened(+1,reverse p)))
+% enddef ;
+
+% vardef unspiked expr p =
+% (reverse dostraightened(-1,dostraightened(-1,reverse p)))
+% enddef ;
+
+% simplified : remove same points as well as redundant points
+% unspiked : remove same points as well as areas with zero distance
+
+vardef dostraightened(expr sign, p) =
+ save _p_, _q_ ; path _p_, _q_ ;
+ _p_ := p ;
+ forever :
+ _q_ := dodostraightened(sign, _p_) ;
+ exitif length(_p_) = length(_q_) ;
+ _p_ := _q_ ;
+ endfor ;
+ _q_
+enddef ;
+
+vardef dodostraightened(expr sign, p) =
+ if length(p)>2 : % was 1, but straight lines are ok
+ save pp ; path pp ;
+ pp := point 0 of p ;
+ for i=1 upto length(p)-1 :
+ if round(point i of p) <> round(point length(pp) of pp) :
+ pp := pp -- point i of p ;
+ fi ;
+ endfor ;
+ save n, ok ; numeric n ; boolean ok ;
+ n := length(pp) ; ok := false ;
+ if n>2 :
+ for i=0 upto n : % evt hier ook round
+ if unitvector(round(point i of pp -
+ point if i=0 : n else : i-1 fi of pp)) <>
+ sign * unitvector(round(point if i=n : 0 else : i+1 fi of pp -
+ point i of pp)) :
+ if ok : -- else : ok := true ; fi point i of pp
+ fi
+ endfor
+ if ok and (cycle p) : -- cycle fi
+ else :
+ pp
+ fi
+ else :
+ p
+ fi
+enddef ;
+
+% vardef simplified expr p =
+% dostraightened(+1,p)
+% enddef ;
+
+% vardef unspiked expr p =
+% dostraightened(-1,p)
+% enddef ;
+
+vardef simplified expr p =
+ (reverse dostraightened(+1,dostraightened(+1,reverse p)))
+enddef ;
+
+vardef unspiked expr p =
+ (reverse dostraightened(-1,dostraightened(-1,reverse p)))
+enddef ;
+
+% path p ;
+% p := (2cm,1cm) -- (2cm,1cm) -- (2cm,1cm) -- (3cm,1cm) --
+% (4cm,1cm) -- (4cm,2cm) -- (4cm,2.5cm) -- (4cm,3cm) --
+% (3cm,3cm) -- (2cm,3cm) -- (1cm,3cm) -- (-1cm,3cm) --
+% .5[(-1cm,3cm),(1cm,1cm)] -- (1cm,1cm) -- cycle ;
+%
+% p := unitcircle scaled 4cm ;
+%
+% drawpath p ; drawpoints p ; drawpointlabels p ;
+% p := p shifted (4cm,0) ; p := straightened p ;
+% drawpath p ; drawpoints p ; drawpointlabels p ;
+% p := p shifted (4cm,0) ; p := straightened p ;
+% drawpath p ; drawpoints p ; drawpointlabels p ;
+
+% new
+
+path originpath ; originpath := origin -- cycle ;
+
+vardef unitvector primary z =
+ if abs z = abs origin : z else : z/abs z fi
+enddef;
+
+% also new
+
+vardef anchored@#(expr p, z) =
+ p shifted (z + (labxf@#*lrcorner p + labyf@#*ulcorner p
+ + (1-labxf@#-labyf@#)*llcorner p))
+enddef ;
+
+% epsed(1.2345)
+
+vardef epsed (expr e) =
+ e if e>0 : + eps elseif e<0 : - eps fi
+enddef ;
+
+% handy
+
+def withgray primary g =
+ withcolor (g,g,g)
+enddef ;
+
+% for metafun
+
+if unknown darkred : color darkred ; darkred := .625(1,0,0) fi ;
+if unknown darkyellow : color darkyellow ; darkyellow := .625(1,1,0) fi ;
+if unknown darkgray : color darkgray ; darkgray := .625(1,1,1) fi ;
+if unknown lightgray : color lightgray ; lightgray := .875(1,1,1) fi ;
+
+% an improved plain mp macro
+
+vardef center primary p =
+ if pair p : p else : .5[llcorner p, urcorner p] fi
+enddef;
+
+% new, yet undocumented
+
+vardef rangepath (expr p, d, a) =
+ (if length p>0 :
+ (d*unitvector(direction 0 of p) rotated a)
+ shifted point 0 of p
+ -- p --
+ (d*unitvector(direction length(p) of p) rotated a)
+ shifted point length(p) of p
+ else :
+ p
+ fi)
+enddef ;
+
+% under construction
+
+vardef straightpath(expr a, b, method) =
+ if (method<1) or (method>6) :
+ (a--b)
+ elseif method = 1 :
+ (a --
+ if xpart a > xpart b :
+ if ypart a > ypart b :
+ (xpart b,ypart a) --
+ elseif ypart a < ypart b :
+ (xpart a,ypart b) --
+ fi
+ elseif xpart a < xpart b :
+ if ypart a > ypart b :
+ (xpart a,ypart b) --
+ elseif ypart a < ypart b :
+ (xpart b,ypart a) --
+ fi
+ fi
+ b)
+ elseif method = 3 :
+ (a --
+ if xpart a > xpart b :
+ (xpart b,ypart a) --
+ elseif xpart a < xpart b :
+ (xpart a,ypart b) --
+ fi
+ b)
+ elseif method = 5 :
+ (a --
+ if ypart a > ypart b :
+ (xpart b,ypart a) --
+ elseif ypart a < ypart b :
+ (xpart a,ypart b) --
+ fi
+ b)
+ else :
+ (reverse straightpath(b,a,method-1))
+ fi
+enddef ;
+
+% handy for myself
+
+def addbackground text t =
+ begingroup ; save p ; picture p ;
+ p := currentpicture ; currentpicture := nullpicture ;
+ fill boundingbox p t ; addto currentpicture also p ;
+ endgroup ;
+enddef ;
+
+% makes a (line) into an infinite one (handy for calculating
+% intersection points
+
+vardef infinite expr p =
+ (-infinity*unitvector(direction 0 of p)
+ shifted point 0 of p
+ -- p --
+ +infinity*unitvector(direction length(p) of p)
+ shifted point length(p) of p)
+enddef ;
+
+% obscure macros: create var from string and replace - and :
+% (needed for process color id's)
+
+string _clean_ascii_[] ;
+
+def register_dirty_chars(expr str) =
+ for i = 0 upto length(str)-1 :
+ _clean_ascii_[ASCII substring(i,i+1) of str] := "_" ;
+ endfor ;
+enddef ;
+
+register_dirty_chars("+-*/:;., ") ;
+
+vardef cleanstring (expr s) =
+ save ss ; string ss, si ; ss = "" ; save i ;
+ for i=0 upto length(s) :
+ si := substring(i,i+1) of s ;
+ ss := ss & if known _clean_ascii_[ASCII si] : _clean_ascii_[ASCII si] else : si fi ;
+ endfor ;
+ ss
+enddef ;
+
+vardef asciistring (expr s) =
+ save ss ; string ss, si ; ss = "" ; save i ;
+ for i=0 upto length(s) :
+ si := substring(i,i+1) of s ;
+ if (ASCII si >= ASCII "0") and (ASCII si <= ASCII "9") :
+ ss := ss & char(scantokens(si) + ASCII "A") ;
+ else :
+ ss := ss & si ;
+ fi ;
+ endfor ;
+ ss
+enddef ;
+
+vardef setunstringed (expr s, v) =
+ scantokens(cleanstring(s)) := v ;
+enddef ;
+
+vardef setunstringed (expr s, v) =
+ scantokens(cleanstring(s)) := v ;
+enddef ;
+
+vardef getunstringed (expr s) =
+ scantokens(cleanstring(s))
+enddef ;
+
+vardef unstringed (expr s) =
+ expandafter known scantokens(cleanstring(s))
+enddef ;
+
+% new
+
+vardef colorpart(expr i) =
+ (redpart i, greenpart i,bluepart i)
+enddef ;
+
+% for david arnold:
+
+% showgrid(-5,10,1cm,-10,10,1cm);
+
+def showgrid (expr MinX, MaxX, DeltaX, MinY, MaxY, DeltaY)=
+ begingroup
+ save defaultfont, defaultscale, size ;
+ string defaultfont ; defaultfont := "cmtt10"; % i.e. infofont
+ numeric defaultscale ; defaultscale := 8pt / fontsize defaultfont;
+ numeric size ; size := 2pt ;
+ for x=MinX upto MaxX :
+ for y=MinY upto MaxY :
+ draw (x*DeltaX, y*DeltaY)
+ withpen pencircle scaled
+ if (x mod 5 = 0) and (y mod 5 = 0) :
+ 1.5size withcolor .50white
+ else :
+ size withcolor .75white
+ fi ;
+ endfor ;
+ endfor ;
+ for x=MinX upto MaxX:
+ label.bot(decimal x, (x*DeltaX,-size));
+ endfor ;
+ for y=MinY upto MaxY:
+ label.lft(decimal y, (-size,y*DeltaY)) ;
+ endfor ;
+ endgroup
+enddef;
+
+% new, handy for:
+%
+% \startuseMPgraphic{map}{n}
+% \includeMPgraphic{map:germany} ;
+% c_phantom (\MPvar{n}<1) (
+% fill map_germany withcolor \MPcolor{lightgray} ;
+% draw map_germany withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% \includeMPgraphic{map:austria} ;
+% c_phantom (\MPvar{n}<2) (
+% fill map_austria withcolor \MPcolor{lightgray} ;
+% draw map_austria withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% c_phantom (\MPvar{n}<3) (
+% \includeMPgraphic{map:swiss} ;
+% fill map_swiss withcolor \MPcolor{lightgray} ;
+% draw map_swiss withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% c_phantom (\MPvar{n}<4) (
+% \includeMPgraphic{map:luxembourg} ;
+% fill map_luxembourg withcolor \MPcolor{lightgray} ;
+% draw map_luxembourg withpen pencircle scaled 1pt withcolor \MPcolor{darkgray} ;
+% ) ;
+% \stopuseMPgraphic
+%
+% \useMPgraphic{map}{n=3}
+
+vardef phantom (text t) =
+ picture _p_ ; _p_ := image(t) ; addto _p_ also currentpicture ;
+ setbounds currentpicture to boundingbox _p_ ;
+enddef ;
+
+vardef c_phantom (expr b) (text t) =
+ if b :
+ picture _p_ ; _p_ := image(t) ; addto _p_ also currentpicture ;
+ setbounds currentpicture to boundingbox _p_ ;
+ else :
+ t ;
+ fi ;
+enddef ;
+
+% done
+
+endinput ;
diff --git a/Master/texmf-dist/doc/metapost/featpost/xcmd/README.xcmd b/Master/texmf-dist/doc/metapost/featpost/xcmd/README.xcmd
new file mode 100644
index 00000000000..24400889ab5
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/xcmd/README.xcmd
@@ -0,0 +1,10 @@
+It is possible to interactively experiment the effect
+of figure parameters. This requires:
+1) MetaPost code written as "anglinerigorouscircle.mp".
+2) xcmd package (kindly provided by Pedro Sebastião);
+ it may be downloaded from http://lince.cii.fc.ul.pt/
+ in Debian, Red Hat or tar.gz package formats.
+3) Perl.
+4) gv.
+5) run command "xcmd/xmpost anglinerigorouscircle" or
+ "xcmd/xmpost anymetapostwoextension".
diff --git a/Master/texmf-dist/doc/metapost/featpost/xcmd/xmpost b/Master/texmf-dist/doc/metapost/featpost/xcmd/xmpost
new file mode 100755
index 00000000000..3a45f6a9859
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/xcmd/xmpost
@@ -0,0 +1,70 @@
+#!/usr/bin/perl
+
+#$Id: xmpost,v 1.1 1999/05/10 17:14:27 pedros Exp $
+
+open OFILE, ">$ARGV[0]" or die " can't open $ARGV[0].pl:$!\n";
+open IFILE, "<$ARGV[0].mp" or die " can't open $ARGV[0].mp:$!\n";
+open XCMDFILE, ">$ENV{\"HOME\"}/.xcmd/$ARGV[0]" or die " can't open ~/.xcmd/$ARGV[0]:$!\n";
+
+my $tmp_mp_file = "$ARGV[0].$$";
+
+my $i=$j=0;
+
+while(<IFILE>){
+# s/\s*(\w+)\s*\t*\s*:*=\s*([\(0-9,-.\)]*);/\t$1\t:=\$opt_$1;/;
+ $lines[$j++]=$_;
+ if($_ =~ /\s*(\w+)\s*\t*\s*:=\s*([\(0-9,-.\)]*);/){
+ print XCMDFILE "OPTION_WITH_ARG --$1 DEFAULT \"$2\"\n";
+# print OFILE "\t$1\t\t:=\$opt_$1;\n";
+ $arr[$i++]="\$opt_$1";
+ }
+}
+close IFILE;
+
+print OFILE "#!/usr/bin/perl\n\n";
+print OFILE " use vars qw(";
+
+foreach $i (0..$#arr-1){
+ print OFILE "$arr[$i] ";
+}
+print OFILE "$arr[$#arr]);\n\n";
+
+print OFILE "\n\nuse Getopt::Long;\n\n";
+
+
+foreach $i (0..$#arr){
+ print OFILE "$arr[$i]=\"\";\n";
+}
+print OFILE "\n\nGetOptions(";
+foreach $i (0..$#arr-1){
+ $arr[$i] =~ s/\$opt_//;
+ print OFILE "\"$arr[$i]=s\",";
+}
+$arr[$#arr] =~ s/\$opt_//;
+
+print OFILE "\"$arr[$#arr]=s\") || die \"Aborted\";\n";
+print OFILE "\$file = \"$tmp_mp_file\";\n";
+print OFILE "\nopen TMP, \">/tmp/\$file.mp\" || die \"can't open /tmp/\$file.mp \$!\\n\";\n";
+
+foreach $j (0..$#lines){
+ $_ = $lines[$j];
+ chop;
+ s/\%/\\\%/g;
+ s/\\/\\\\/g;
+ s/\$/\\\$/g;
+ s/\s*(\w+)\s*\t*\s*:=\s*([\(0-9,-.\)]*);/\t$1\t\t:= \$opt_$1;/;
+ print OFILE "print TMP \"$_\\n\";\n";
+}
+print OFILE "close TMP;\n";
+
+print OFILE "\$tmp = `inimpost featpost.mp`;\n";
+print OFILE "\$tmp = `mpost -mem featpost /tmp/\$file.mp`;\n";
+print OFILE "\$tmp = `laproof /tmp/\$file 1`;\n";
+
+my $tmp = `chmod +x $ARGV[0]`;
+$tmp = `cp $ARGV[0].mp /tmp/$tmp_mp_file.mp`;
+$tmp= `inimpost featpost.mp`;
+$tmp = `mpost -mem featpost /tmp/$tmp_mp_file.mp`;
+$tmp = `laproof /tmp/$tmp_mp_file 1`;
+system("gv -watch $tmp_mp_file.1.eps &");
+system("xcmd $ARGV[0] &");
diff --git a/Master/texmf-dist/doc/metapost/hatching/htchuse.mp b/Master/texmf-dist/doc/metapost/hatching/htchuse.mp
new file mode 100644
index 00000000000..493ce3ad537
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/hatching/htchuse.mp
@@ -0,0 +1,55 @@
+%%% addto hatchfill
+%%% addto beginfig
+%%% enddef endfig
+%%% length withcolor dashed off on
+% This is a sample file demonstrating how one can use the macros defined
+% in hatching.mp.
+
+input hatching.mp;
+
+vardef star(expr n) =
+ for i_:=0 upto 2n-1:
+ if odd i_: 1/2 fi (right rotated (180*(i_/n))) --
+ endfor cycle
+enddef;
+
+beginfig(100);
+ path p; p:=unitsquare xscaled 50mm yscaled 25mm;
+ hatchfill p withcolor red withcolor (45,2mm,-.5bp) withcolor (-45,2mm,-.5bp);
+
+endfig;
+
+beginfig(101);
+ interim hatch_match:=0;
+ path p; p:=star(10) xscaled 35mm yscaled 20mm rotated 20;
+ hatchfill p withcolor (0,1,.5);
+ draw image(hatchfill p
+ withcolor (45,3bp,-.5bp) withcolor (-45,3bp,-.5bp);
+ ) withcolor red dashed evenly; % |evenly=dashpattern(on 3bp off 3bp)|
+endfig;
+
+beginfig(102);
+ path p; p:=star(10) xscaled 35mm yscaled 20mm rotated 20;
+ interim hatch_match:=0;
+ hatchoptions(withcolor blue dashed evenly scaled 2);
+ hatchfill p withcolor .75white withcolor (20,6bp,-.5bp);
+ hatchoptions(withcolor (blue+green) dashed evenly shifted (3/2bp,0));
+ hatchfill p withcolor (110,6bp,-.5bp);
+endfig;
+
+beginfig(103);
+ path p; p:=star(10) xscaled 35mm yscaled 35mm;
+ save draw_hatched_band;
+ vardef draw_hatched_band(expr za,zb,a,l,d) =
+ save n_; n_:=length(za-zb)/l;
+ for i_:=0 upto ceiling n_:
+ fill star(10) xscaled 2/5l yscaled 2/5l
+ shifted (i_/n_)[za,zb] withcolor (i_/n_)[green,blue];
+ endfor
+ enddef;
+ hatchfill p withcolor (red+green) withcolor (45,10bp,-1bp);
+endfig;
+
+end.
+%%\end
+
diff --git a/Master/texmf-dist/doc/metapost/hatching/htchuse_.tex b/Master/texmf-dist/doc/metapost/hatching/htchuse_.tex
new file mode 100644
index 00000000000..bf10d5c7475
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/hatching/htchuse_.tex
@@ -0,0 +1,11 @@
+\input epsf % dvips standard
+\nopagenumbers
+
+\lineskiplimit\maxdimen \lineskip5mm
+
+\centerline{\epsffile{htchuse.100}}
+\centerline{\epsffile{htchuse.101}}
+\centerline{\epsffile{htchuse.102}}
+\centerline{\epsffile{htchuse.103}}
+
+\end
diff --git a/Master/texmf-dist/doc/metapost/hatching/readme b/Master/texmf-dist/doc/metapost/hatching/readme
new file mode 100644
index 00000000000..da6ac0e89e8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/hatching/readme
@@ -0,0 +1,52 @@
+-------------------------------------+-------------------------------------
+ ENGLISH | POLSKI
+-------------------------------------+-------------------------------------
+The file HATCHING.MP contains a set | Plik HATCHING.MP zawiera zestaw makr
+of METAPOST macros for hatching | METAPOST-owych do zakreskowywania
+interior of closed paths. | wn/etrza zamkni/etych /scie/zek.
+
+ made in BOP s.c.
+ e-mail: B.Jackowski@gust.org.pl
+ public domain software
+ (no copyrights, copylefts, copyups, copydowns, or whatsoever)
+
+ 21.09.2000 -- ver 0.11 (pre-release)
+
+The basic macro, hatchfill, works | Podstawowym makrem pakietu jest makro
+very much like the standard fill | hatchfill, dzia/laj/ace bardzo
+command. The general form of the | podobnie do makra fill. Og/olna
+hatchfill command call is as | posta/c u/zycia polecenia hatchfill
+follows: | wygl/ada nast/epuj/aco:
+
+ hatchfill path_expression withcolor c1 withcolor c2 ...
+
+The trick is that for hatching | Trick polega u/zyciu specjalnych
+special ``colors'' are used, namely, | ,,kolor/ow'' -- je/sli mianowicie
+if bluepart(c)<0, the colour c is | bluepart(c)<0, to sk/ladowe koloru c
+interpreted as hatching data: | s/a traktowane jako informacja
+ | o zakreskowaniu:
+
+ hatching angle redpart(c) k/at nachylenia
+ distance between lines greenpart(c) odleg/lo/s/c mi/edzy kreskami
+ thickness of lines -bluepart(c) grubo/s/c kresek
+
+Dashing and colouring of the hatch | Za pomoc/a makra hatchoptions mo/zna
+pattern can be accomplished by | zdefiniowa/c kolor kresek a tak/ze
+using hatchoptions command (cf. | wz/or w przypadku linii przerywanych
+drawoptions in plain.mp). Actually, | (por. makro drawoptions, plain.mp).
+an arbitrary pattern can be used | W istocie dowolny obiekt mo/ze zosta/c
+instead of straight lines: it | u/zyty do wype/lnienia /scie/zki: w tym
+suffices to redefine the macro | celu nale/zy zdefiniowa/c w odpowiedni
+draw_hatched_band (cf. htchuse.mp, | spos/ob makro draw_hatched_band (por.
+figure 103), although one should be | htchuse.mp, ilustracja 103), jednak/ze
+aware that METAPOST memory can be | nale/zy pami/eta/c, /ze w ten spos/ob
+easily overloaded and that the | mo/zna /latwo wyczerpa/c zasoby
+resulting EPS files are usually | pami/eciowe METAPOST-a i /ze na og/o/l
+annoyingly large. | otrzymuje si/e pliki irytuj/aco du/ze.
+ |
+The examples of usage can be found | Przyk/lady u/zycia mo/zna znale/x/c
+in htchuse.mp; for convenience, | w pliku htchuse.mp; dla wygody
+a trivial TeX file for typesetting | do/l/aczony zosta/l trywialny pliczek
+the figures, htchuse_.tex, is | TeX-owy (htchuse_.tex), sk/ladaj/acy
+included. | jedn/a stron/e z tymi przyk/ladami.
+
diff --git a/Master/texmf-dist/doc/metapost/latexmp/README b/Master/texmf-dist/doc/metapost/latexmp/README
new file mode 100644
index 00000000000..829eeb5943c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/README
@@ -0,0 +1,11 @@
+The MetaPost package latexMP implements a user-friendly
+interface to access LaTeX-based typesetting capabilities in
+MetaPost.
+The text to be typeset is given as string. This allows even
+dynamic text elements, for example counters, to be used in
+labels. Compared to other implementations it is much more
+flexible, since it can be used as direct replacement for
+btex..etex, and much faster, compared for example to
+the solution provided by tex.mp.
+
+All files of the package belong to the Public Domain.
diff --git a/Master/texmf-dist/doc/metapost/latexmp/examples.pdf b/Master/texmf-dist/doc/metapost/latexmp/examples.pdf
new file mode 100644
index 00000000000..2ef6cf299a2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/latexmp/latexmp.pdf b/Master/texmf-dist/doc/metapost/latexmp/latexmp.pdf
new file mode 100644
index 00000000000..e96ff5a4e5a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/latexmp.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp
new file mode 100644
index 00000000000..1602717b6ab
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-grph.mp
@@ -0,0 +1,34 @@
+input latexmp ;
+input graph ;
+
+% create data file
+write "10 2e-2" to "lmp-data.dat" ;
+write "20 3e4" to "lmp-data.dat" ;
+write "30 8e4" to "lmp-data.dat" ;
+write "100 7e4" to "lmp-data.dat" ;
+write "130 2e5" to "lmp-data.dat" ;
+write "200 4e5" to "lmp-data.dat" ;
+write "500 8e5" to "lmp-data.dat" ;
+write "600 1e7" to "lmp-data.dat" ;
+write "1000 2e7" to "lmp-data.dat" ;
+write "2000 8e7" to "lmp-data.dat" ;
+write EOF to "lmp-data.dat" ;
+%
+
+setupLaTeXMP(
+ mode=normal,% 'graph' package does not work in rerun mode
+ packages="mathpazo") ;
+
+
+init_numbers(textext("$-$"),textext("$1$"),textext("${\times}10$"),
+ textext("${}^-$"),textext("${}^2$")) ;
+Fe_base:=textext("$10$") ;
+
+beginfig(1);
+ draw begingraph(6cm,4cm)
+ setcoords(linear,log);
+ gdraw "lmp-data.dat" ;
+ endgraph ;
+endfig;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex
new file mode 100644
index 00000000000..d9f2dd20aaf
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc-text.tex
@@ -0,0 +1,23 @@
+\textcolor[rgb]{0.9,0.65,0}{\bfseries Der Löwe und die Mücke}
+\color[gray]{0.4}Eine Mücke forderte mit den übermütigsten Worten
+einen Löwen zum Zweikampf heraus: \textcolor{blue}{Ich
+fürchte dich nicht, du großes Ungeheuer}, rief sie ihm
+zu, \textcolor{blue}{weil du gar keine Vorzüge vor mir hast;
+oder nenne sie mir, wenn du solche zu haben glaubst; etwa
+die, dass du deinen Raub mit Krallen zerreißest und
+mit Zähnen zermalmest? Jedes andere feige Tier, wenn es
+mit einem Tapfern kämpft, tut dasselbe, es beißt und
+kratzt. \color[rgb]{0.7,0,0}Du sollst aber empfinden,
+dass ich stärker bin als du!}
+Mit diesen Worten flog sie in eines seiner
+Nasenlöcher und stach ihn so sehr, dass er sich vor
+Schmerz selbst zerfleischte und sich für überwunden
+erklärte.
+
+\color[rgb]{0,0.6,0}Stolz auf diesen Sieg flog die Mücke davon,
+um ihn aller Welt auszuposaunen, übersah aber das Gewebe einer Spinne
+und verfing sich in demselben. Gierig umarmte die Spinne
+sie und sog ihr das \textcolor{red}{Heldenblut} aus. Sterbend empfand
+die Mücke ihre Nichtigkeit, indem sie, die Besiegerin des
+Löwen, einem so verächtlichen Tiere, einer Spinne,
+erliegen musste.
diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp
new file mode 100644
index 00000000000..3b75c270648
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-mc.mp
@@ -0,0 +1,11 @@
+
+input latexmp ;
+
+setupLaTeXMP(mode=rerun,
+ fontencoding="T1",inputencoding="latin1",language="ngerman",
+ textextlabel=enable, multicolor=enable) ;
+
+beginfig(1);
+ label("\parbox{12cm}{\input{lmp-mc-text}}", origin) ;
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp
new file mode 100644
index 00000000000..a5b44f1b2be
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-mfun.mp
@@ -0,0 +1,34 @@
+input metafun ;
+cmykcolors:=true ;% enable cmyk-specials in MetaFun
+input latexmp ;
+
+% - mode is set to 'normal' since MetaFun doesn't work in rerun-mode;
+% please rerun manually
+% - the file has to be converted in PDF using MPtoPDF in order
+% to interpret the MP-specials generated by MetaFun
+
+setupLaTeXMP(packages="helvet",
+ preamble="\renewcommand{\familydefault}{\sfdefault}",
+ textextlabel=enable,multicolor=enable) ;
+
+beginfig(1);
+ save p,c ; pair p ; color c ;
+
+ for i=1 upto 100:
+ p:= (uniformdeviate 8cm, uniformdeviate 5cm) ;
+ label.urt("\bfseries\transparent{0.2}{MetaFun}",p) ;
+ endfor;
+
+ for i=1 upto 20:
+ c:= (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1) ;
+ p:= (-50pt+uniformdeviate 100pt, -50pt+uniformdeviate 100pt) ;
+ label("\bfseries\Huge\color[rgb]{" &
+ (decimal redpart c) & "," & (decimal greenpart c) & "," &
+ (decimal bluepart c) & "}" &
+ "\transparent{0.4}{MetaFun}",(5cm,2.5cm)+p) ;
+ endfor;
+
+ label.top("two different greens: one in \textcolor[cmyk]{1,0,1,0}{cmyk} " &
+ "and one in \textcolor[rgb]{0,1,0}{rgb}", (5cm,2.5cm)) ;
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp b/Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp
new file mode 100644
index 00000000000..fd6613cf884
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/latexmp/lmp-pkg.mp
@@ -0,0 +1,41 @@
+
+input latexmp ;
+
+string OrdMacro, OoosMacro, otherDefs ;
+
+OrdMacro :=
+"\newcommand*{\Ord}[1]{\ifcase #1\relax" &
+ " #1\textsuperscript{th}\or" &
+ " #1\textsuperscript{st}\or" &
+ " #1\textsuperscript{nd}\or" &
+ " #1\textsuperscript{rd}\else" &
+ " #1\textsuperscript{th}\fi}" ;
+
+OoosMacro :=
+ "\newcommand*{\Ooos}[1]{\setcounter{Ooos}{1}O\whiledo{\value{Ooos}<#1}" &
+ "{o\stepcounter{Ooos}}h}" ;
+
+otherDefs := "\newcounter{Ooos}\renewcommand{\familydefault}{\sfdefault}" ;
+
+setupLaTeXMP(
+ mode=rerun,
+ inputencoding="latin1",
+ fontencoding="T1",
+ packages="helvet,calc,ifthen,mflogo",
+ preamble=(OrdMacro & OoosMacro & otherDefs) ,
+ textextlabel=enable );
+
+beginfig(1);
+ for i=1 upto 5:
+ label.urt( "\Ord{" & (decimal i) & "} {\MP} label",(0,-10*i) ) ;
+ endfor;
+endfig;
+
+beginfig(2);
+ for i=1 upto 50:
+ label( "\Ooos{" & (decimal i)& "}",(0,10*i) ) ;
+ endfor;
+ currentpicture:= (currentpicture slanted 0.5) yscaled 0.7 ;
+endfig;
+
+bye
diff --git a/Master/texmf-dist/doc/metapost/mp3d/README b/Master/texmf-dist/doc/metapost/mp3d/README
new file mode 100644
index 00000000000..499a872c0b1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/README
@@ -0,0 +1,84 @@
+ 3d/3dgeom version 1.34
+ ======================
+
+This release is a intermediary release of the 3d metapost package.
+It updates the 3d package (CTAN:graphics/metapost/macros/3d)
+and adds features facilitating the creation of space geometry drawings.
+
+There have been a number of changes, and as a consequence we had
+to slightly update the description published in TUGboat in 1998.
+See the doc directory. The doc directory contains both
+the old 1998 article, a corrected version, the 2001 GUTenberg
+article on geometry in space and its translation which appeared in 2003
+(TUGboat 2001).
+
+The 1998 package is completely contained in this release in the directory
+v1.0, except that some files have been renamed in order to prevent
+a conflict. For istance, 3d.mp has been renamed into 3d-1.0.mp
+when necessary. Also, the doc directory from the 1.0 version has been
+transferred to the current doc directory.
+
+The 1.0 version should still be of interest for the documentation
+of its file, which used mft (see for instance v1.0/doc/3d-1.0.ps).
+
+As version 1.34 is an intermediate release, it may lack some
+uniformity which might be added later. Also, the sources do contain
+preliminary and documented material.
+
+This release contains three directories:
+
+ doc : documentation
+ examples : all the examples from the Space Geometry article
+ inputs : the files needed for metapost
+
+
+HOW TO CREATE AN ANIMATION
+--------------------------
+
+Details are given to produce the standard animation
+under UNIX, with the binaries listed below.
+For other architectures, you may have to adapt the
+write_script macro in the 3d.mp file.
+
+ 1) create a directory and copy the .mp files from the
+ inputs directory to it.
+ 2) apply metapost to animpoly.mp ; this will create 100 files
+ named animpoly.101, animpoly.102, ..., animpoly.200.
+ It will also have created a script file named
+ create_animation.sh
+ 3) copy the gifmerge utility (as well as programs such as pnmcut,...)
+ in this directory or let it be reachable through PATH.
+ 4) apply sh to create_animation.sh; this will create the animation;
+ first the metapost outputs are converted to gif, then
+ they are collated with gifmerge.
+ 5) the result is animpoly.gif which is a GIF89A animation file;
+ it can be viewed under netscape or simply with a program like xanim.
+
+ Binaries required by the 3D package
+ -----------------------------------
+
+As it is, the generation of animated gifs requires the following
+programs:
+
+ awk
+ gs (ghostscript)
+ pnmcut
+ ppmquant
+ ppmtogif
+ gifmerge
+
+These executables are not part of that distribution.
+
+The first two are widely available on UNIX.
+The three p* programs are part of the NETPBM toolkit.
+You can find this toolkit on the web through any search tool.
+And gifmerge can be found at http://www.iis.ee.ethz.ch/~kiwi/GIFMerge.
+
+I have no idea how to port all this on other architectures,
+but I assume there are similar tools for PCs or Macs.
+I'd be interested to get feedback and details so that i can
+include instructions in future releases of my package.
+
+========================================================================
+Denis Roegel, 17 August 2003
+roegel@loria.fr
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/cube10.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/cube10.mp
new file mode 100644
index 00000000000..7cc6cb78731
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/cube10.mp
@@ -0,0 +1,88 @@
+% D. Roegel January 2001
+% roegel@loria.fr
+% Oblique projections of the cube
+
+input 3danim
+output_res:=72;
+drawing_scale:=2cm;
+
+%set_plane_(projection_plane)(point_null,vec_I,vec_J);
+set_plane_(projection_plane)(point_null,vec_I,vec_K);
+
+new_plane_(horizontal_plane)(point_null,vec_I,vec_J);
+
+vardef def_C(expr inst)=
+ new_obj_points(inst,8); % 8 points
+ set_C_points(inst);
+enddef;
+
+vardef set_C_points(expr inst)=
+ set_point(1)(0,0,0);set_point(2)(0,0,1);
+ set_point(3)(0,1,0);set_point(4)(0,1,1);
+ set_point(5)(1,0,0);set_point(6)(1,0,1);
+ set_point(7)(1,1,0);set_point(8)(1,1,1);
+enddef;
+
+vardef draw_C(expr inst)=
+ draw_line(3,7);draw_lines(8,7,5);
+ draw_line(2,6);draw_line(4,8);
+ draw_lines(5,6,8);draw_lines(4,3);draw_lines(2,4);
+ drawoptions(dashed evenly);
+ draw_lines(1,2);draw_lines(3,1);draw_line(1,5);
+ drawoptions();
+enddef;
+
+assign_obj("cube","C");
+point_of_view_obj("cube",8,Obs_phi);
+
+oblique_projection(horizontal_plane)(pnt_obj("cube",8),CAVALIER,30,50); % 30
+
+beginfig(100);
+ Obs_dist:=2;
+ draw_obj("cube");
+endfig;
+
+oblique_projection(horizontal_plane)(pnt_obj("cube",8),CABINET,30,20); % 30
+
+beginfig(101);
+ Obs_dist:=2;
+ draw_obj("cube");
+endfig;
+
+oblique_projection(horizontal_plane)(pnt_obj("cube",8),30,20,20); % 20
+
+beginfig(102);
+ Obs_dist:=2;
+ draw_obj("cube");
+endfig;
+
+new_point(hp);
+set_point_(hp)(0,1,1);
+
+set_plane_(horizontal_plane)(hp,vec_I,vec_K);
+% such a plane and a second angle of 90 degrees produces a
+% ``planometric'' view.
+oblique_projection(horizontal_plane)(pnt_obj("cube",8),30,90,20); % 20
+
+vardef draw_C(expr inst)=
+ draw_lines(8,7);draw_line(3,7);draw_lines(7,5);
+ draw_lines(1,2);draw_lines(3,1);
+ draw_line(1,5);
+ draw_lines(4,3);draw_lines(2,4);draw_line(4,8);
+ drawoptions(dashed evenly);
+ draw_lines(5,6);
+ draw_line(2,6);draw_lines(6,8);
+ drawoptions();
+enddef;
+
+beginfig(103);
+ Obs_dist:=2;
+ draw_obj("cube");
+endfig;
+
+end.
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/cube4-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/cube4-eng.mp
new file mode 100644
index 00000000000..7a841d2e8b4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/cube4-eng.mp
@@ -0,0 +1,124 @@
+verbatimtex
+%&latex
+\documentclass{article}
+
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=20cm;
+
+vardef def_C(expr inst)=
+ new_obj_points(inst,21); % 21 points
+ set_C_points(inst);
+enddef;
+
+vardef set_C_points(expr inst)=
+ set_point(1)(0,0,0);set_point(2)(0,0,1);
+ set_point(3)(0,1,0);set_point(4)(0,1,1);
+ set_point(5)(1,0,0);set_point(6)(1,0,1);
+ set_point(7)(1,1,0);set_point(8)(1,1,1);
+
+ % corners of the projection plane
+ %set_point(9)(12.92993,12.37372,6.83334);
+ %set_point(10)(15.68588,8.48413,6.8334);
+ %set_point(11)(16.27899,8.90436,4.12851);
+ %set_point(12)(13.52304,12.79395,4.12845);
+
+ %set_point(9)(13.76718,11.50638,6.15714);
+ %set_point(10)(15.14517,9.56158,6.15717);
+ %set_point(11)(15.44174,9.7717,4.80472);
+ %set_point(12)(14.06375,11.71649,4.80469);
+
+ set_point(9)(0.80682,2.27571,1.939);
+ set_point(10)(2.03946,0.2357,1.93903);
+ set_point(11)(2.46796,0.49461,0.63113);
+ set_point(12)(1.23532,2.53462,0.6311);
+
+ % shown observator
+ set_point(13)(3.23608,2.35114,2);
+
+ % intersections with the projection plane
+ new_plane(pl)(9,10,11);
+ new_line(l)(1,13);
+ if not def_inter_p_l_pl(14)(l)(pl):
+ message "PROBLEM ";
+ fi;
+ set_line(l)(2,13);
+ if not def_inter_p_l_pl(15)(l)(pl):
+ message "PROBLEM ";
+ fi;
+ set_line(l)(3,13);
+ if not def_inter_p_l_pl(16)(l)(pl):
+ message "PROBLEM ";
+ fi;
+ set_line(l)(4,13);
+ if not def_inter_p_l_pl(17)(l)(pl):
+ message "PROBLEM ";
+ fi;
+ set_line(l)(5,13);
+ if not def_inter_p_l_pl(18)(l)(pl):
+ message "PROBLEM ";
+ fi;
+ set_line(l)(6,13);
+ if not def_inter_p_l_pl(19)(l)(pl):
+ message "PROBLEM ";
+ fi;
+ set_line(l)(7,13);
+ if not def_inter_p_l_pl(20)(l)(pl):
+ message "PROBLEM ";
+ fi;
+ set_line(l)(8,13);
+ if not def_inter_p_l_pl(21)(l)(pl):
+ message "PROBLEM ";
+ fi;
+
+ free_line(l);
+ free_plane(pl);
+
+enddef;
+
+vardef draw_C(expr inst)=
+ draw_lines(1,2,4,3,1);draw_lines(5,6,8,7,5);
+ draw_line(1,5);draw_line(2,6);draw_line(3,7);draw_line(4,8);
+ draw_lines(9,10,11,12,9);
+ pickup pencircle scaled 2pt;
+ draw_line(13,13);draw_line(1,1);draw_line(2,2);draw_line(3,3);draw_line(7,7);
+ pickup pencircle scaled .4pt;
+ draw fullcircle scaled 6pt shifted z[ipnt_(8)];
+ label_obj.lft(btex \textit{Obs}$(3.23,2.35,2)$ etex,13);
+ label_obj.rt(btex $(0,0,0)$ etex,1);
+ label_obj.rt(btex $(0,0,1)$ etex,2);
+ label_obj.bot(btex $(0,1,0)$ etex,3);
+ label_obj.llft(btex $(1,1,0)$ etex,7);
+
+ drawoptions(dashed withdots);
+ draw_line(1,13);draw_line(2,13);draw_line(3,13);draw_line(4,13);
+ draw_line(5,13);draw_line(6,13);draw_line(7,13);draw_line(8,13);
+ drawoptions();
+ draw_line(14,15,17,16,14);draw_lines(18,19,21,20,18);
+ draw_line(14,18);draw_line(15,19);draw_line(16,20);draw_line(17,21);
+enddef;
+
+assign_obj("cube","C");
+
+for i:=28 upto 28:
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),4);
+ show_point("Obs",Obs);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("cube",14,Obs_phi);
+ draw_obj("cube");
+ endfig;
+endfor;
+
+end.
+
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/cube5.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/cube5.mp
new file mode 100644
index 00000000000..9c3370744ee
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/cube5.mp
@@ -0,0 +1,86 @@
+% D. Roegel January 2001
+% roegel@loria.fr
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=2cm;
+
+vardef def_C(expr inst)=
+ new_obj_points(inst,11); % 11 points
+ set_C_points(inst);
+enddef;
+
+vardef set_C_points(expr inst)=
+ set_point(1)(0,0,0);set_point(2)(0,0,1);
+ set_point(3)(0,1,0);set_point(4)(0,1,1);
+ set_point(5)(1,0,0);set_point(6)(1,0,1);
+ set_point(7)(1,1,0);set_point(8)(1,1,1);
+ % vanishing points
+ def_screen_pl(screen);
+ new_line(l)(1,2);
+ if not def_vanishing_point_p_l_pl(9)(l)(screen):
+ message "no vanishing point 1";
+ set_point(9)(0,0,0);
+ fi;
+ set_line(l)(1,3);
+ if not def_vanishing_point_p_l_pl(10)(l)(screen):
+ message "no vanishing point 2";
+ set_point(10)(0,0,0);
+ fi;
+ set_line(l)(1,5);
+ if not def_vanishing_point_p_l_pl(11)(l)(screen):
+ message "no vanishing point 3";
+ set_point(11)(0,0,0);
+ fi;
+ free_line(l);
+enddef;
+
+vardef draw_C(expr inst)=
+ draw_lines(1,2,4,3,1);draw_lines(5,6,8,7,5);
+ draw_line(1,5);draw_line(2,6);draw_line(3,7);draw_line(4,8);
+ pickup pencircle scaled 4pt;
+ drawoptions(withcolor red);
+ if z[ipnt_(9)]=(10,10):draw_line(9,9);
+ fi;
+ if z[ipnt_(10)]=(10,10):draw_line(10,10);
+ fi;
+ if z[ipnt_(11)]=(10,10):draw_line(11,11);
+ fi;
+ drawoptions();
+ pickup pencircle scaled 1pt;
+ draw_line(9,9);draw_line(10,10);draw_line(11,11);
+ pickup pencircle scaled 0.4pt;
+ drawoptions(dashed evenly scaled 0.5);
+ for j:=1,3,5,7:draw_line(j,9);endfor;
+ for j:=3,4,7,8:draw_line(j,10);endfor;
+ for j:=1 upto 4:draw_line(j,11);endfor;
+ drawoptions();
+enddef;
+
+new_plane_(screen)(0,0,0); % must be defined before |assign_obj|
+ % because |assign_obj| calls |set_C_point|
+
+% we change the field because we are very close
+h_field:=120; % degrees
+v_field:=120; % degrees
+
+
+assign_obj("cube","C");
+
+%for i:=0 upto 100:
+i=97;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(1.8*cosd(3.6*i),1.8*sind(3.6*i),2);
+ Obs_phi:=90;Obs_dist:=0.5;point_of_view_obj("cube",8,Obs_phi);
+ reset_obj("cube");
+ draw_obj("cube");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/cube6.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/cube6.mp
new file mode 100644
index 00000000000..228cd35f9da
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/cube6.mp
@@ -0,0 +1,94 @@
+% D. Roegel January 2001
+% roegel@loria.fr
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=2cm;
+
+vardef def_C(expr inst)=
+ new_obj_points(inst,12); % 12 points
+ set_C_points(inst);
+enddef;
+
+vardef set_C_points(expr inst)=
+ set_point(1)(0,0,0);set_point(2)(0,0,1);
+ set_point(3)(0,1,0);set_point(4)(0,1,1);
+ set_point(5)(1,0,0);set_point(6)(1,0,1);
+ set_point(7)(1,1,0);set_point(8)(1,1,1);
+ % vanishing points
+ def_screen_pl(screen);
+ new_line(l)(1,2);
+ if not def_vanishing_point_p_l_pl(9)(l)(screen):
+ message "no vanishing point 1";
+ set_point(9)(0,0,0);
+ fi;
+ set_line(l)(1,3);
+ if not def_vanishing_point_p_l_pl(10)(l)(screen):
+ message "no vanishing point 2";
+ set_point(10)(0,0,0);
+ fi;
+ set_line(l)(1,5);
+ if not def_vanishing_point_p_l_pl(11)(l)(screen):
+ message "no vanishing point 3";
+ set_point(11)(0,0,0);
+ fi;
+ set_line(l)(1,7);
+ if not def_vanishing_point_p_l_pl(12)(l)(screen):
+ message "no vanishing point 4";
+ set_point(12)(0,0,0);
+ fi;
+ free_line(l);
+enddef;
+
+vardef draw_C(expr inst)=
+ draw_lines(1,2,4,3,1);draw_lines(5,6,8,7,5);
+ draw_line(1,5);draw_line(2,6);draw_line(3,7);draw_line(4,8);
+ pickup pencircle scaled 4pt;
+ drawoptions(withcolor red);
+ if z[ipnt_(9)]=(10,10):draw_line(9,9);
+ fi;
+ if z[ipnt_(10)]=(10,10):draw_line(10,10);
+ fi;
+ if z[ipnt_(11)]=(10,10):draw_line(11,11);
+ fi;
+ if z[ipnt_(12)]=(10,10):draw_line(12,12);
+ fi;
+ drawoptions();
+ pickup pencircle scaled 1pt;
+ draw_line(9,9);draw_line(10,10);draw_line(11,11);draw_line(12,12);
+ pickup pencircle scaled 0.4pt;
+ drawoptions(dashed evenly scaled 0.5);
+ for j:=1,3,5,7:draw_line(j,9);endfor;
+ for j:=3,4,7,8:draw_line(j,10);endfor;
+ for j:=1 upto 4:draw_line(j,11);endfor;
+ draw_line(1,12);draw_line(2,12);
+ drawoptions();
+enddef;
+
+new_plane_(screen)(0,0,0); % must be defined before |assign_obj|
+ % because |assign_obj| calls |set_C_point|
+
+% on change le champ car on est très près
+h_field:=160; % degrees
+v_field:=160; % degrees
+
+
+assign_obj("cube","C");
+
+%for i:=0 upto 100:
+i=97;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(1.8*cosd(3.6*i),1.8*sind(3.6*i),2);
+ Obs_phi:=90;Obs_dist:=0.5;point_of_view_obj("cube",8,Obs_phi);
+ reset_obj("cube");
+ draw_obj("cube");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/cube7.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/cube7.mp
new file mode 100644
index 00000000000..28df75f1e85
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/cube7.mp
@@ -0,0 +1,133 @@
+% The nine vanishing points of a cube
+% D. Roegel, 22 January 2001
+% Warning: this figure is very sensitive to small motions!
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=1cm;
+
+def draw_arrowline_extra(expr i,j)(expr exi,exj)=
+ drawarrow exi[z[ipnt_(i)],z[ipnt_(j)]]--exj[z[ipnt_(i)],z[ipnt_(j)]];
+enddef;
+
+
+vardef def_C(expr inst)=
+ new_obj_points(inst,17); % 17 points
+ set_C_points(inst);
+enddef;
+
+vardef set_C_points(expr inst)=
+ set_point(1)(0,0,0);set_point(2)(0,0,1);
+ set_point(3)(0,1,0);set_point(4)(0,1,1);
+ set_point(5)(1,0,0);set_point(6)(1,0,1);
+ set_point(7)(1,1,0);set_point(8)(1,1,1);
+ % vanishing points
+ def_screen_pl(screen);
+ new_line(l)(1,2);
+ if not def_vanishing_point_p_l_pl(9)(l)(screen):
+ message "no vanishing point 1";
+ set_point(9)(0,0,0);
+ fi;
+ set_line(l)(1,3);
+ if not def_vanishing_point_p_l_pl(10)(l)(screen):
+ message "no vanishing point 2";
+ set_point(10)(0,0,0);
+ fi;
+ set_line(l)(1,5);
+ if not def_vanishing_point_p_l_pl(11)(l)(screen):
+ message "no vanishing point 3";
+ set_point(11)(0,0,0);
+ fi;
+ set_line(l)(1,7);
+ if not def_vanishing_point_p_l_pl(12)(l)(screen):
+ message "no vanishing point 4";
+ set_point(12)(0,0,0);
+ fi;
+ set_line(l)(5,3);
+ if not def_vanishing_point_p_l_pl(13)(l)(screen):
+ message "no vanishing point 5";
+ set_point(13)(0,0,0);
+ fi;
+ set_line(l)(5,8);
+ if not def_vanishing_point_p_l_pl(14)(l)(screen):
+ message "no vanishing point 6";
+ set_point(14)(0,0,0);
+ fi;
+ set_line(l)(6,7);
+ if not def_vanishing_point_p_l_pl(15)(l)(screen):
+ message "no vanishing point 7";
+ set_point(15)(0,0,0);
+ fi;
+ set_line(l)(5,2);
+ if not def_vanishing_point_p_l_pl(16)(l)(screen):
+ message "no vanishing point 8";
+ set_point(16)(0,0,0);
+ fi;
+ set_line(l)(6,1);
+ if not def_vanishing_point_p_l_pl(17)(l)(screen):
+ message "no vanishing point 9";
+ set_point(17)(0,0,0);
+ fi;
+
+ free_line(l);
+enddef;
+
+vardef draw_C(expr inst)=
+ draw_lines(1,2,4,3,1);draw_lines(5,6,8,7,5);
+ draw_line(1,5);draw_line(2,6);draw_line(3,7);draw_line(4,8);
+ pickup pencircle scaled 4pt;
+ drawoptions(withcolor red);
+ for i:=9 upto 17:
+ if z[ipnt_(i)]=(10,10):draw_line(i,i);
+ fi;
+ endfor;
+ drawoptions();
+ pickup pencircle scaled 1pt;
+ for i:=9 upto 17:draw_line(i,i);endfor;
+ pickup pencircle scaled 0.4pt;
+ drawoptions(dashed evenly scaled 0.5);
+ for j:=1,3,5,7:draw_line(j,9);endfor;
+ for j:=3,4,7,8:draw_line(j,10);endfor;
+ for j:=1 upto 4:draw_line(j,11);endfor;
+ draw_line(1,12);draw_line(2,12);
+ drawoptions(dashed evenly scaled 0.5 withcolor red);
+ for j:=5,6:draw_line(j,13);endfor;
+ drawoptions(dashed evenly scaled 0.5 withcolor green);
+ for j:=1,5:draw_line(j,14);endfor;
+ drawoptions(dashed evenly scaled 0.5 withcolor blue);
+ for j:=2,6:draw_line(j,15);endfor;
+ drawoptions(dashed evenly scaled 0.5 withcolor green);
+ for j:=2,4:draw_line(j,16);endfor;
+ drawoptions(dashed evenly scaled 0.5 withcolor red);
+ for j:=6,8:draw_line(j,17);endfor;
+
+ drawoptions();
+enddef;
+
+new_plane_(screen)(0,0,0); % must be defined before |assign_obj|
+ % because |assign_obj| calls |set_C_point|
+
+% we change the field, because we are very close
+h_field:=170; % degrees
+v_field:=170; % degrees
+
+
+assign_obj("cube","C");
+
+%for i:=0 upto 100:
+i=96;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(1.7*cosd(3.6*i),1.8*sind(3.6*i),1.8);
+ Obs_phi:=90;Obs_dist:=0.5;point_of_view_obj("cube",8,Obs_phi);
+ reset_obj("cube");
+ draw_obj("cube");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/cube8.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/cube8.mp
new file mode 100644
index 00000000000..f555a2637cb
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/cube8.mp
@@ -0,0 +1,48 @@
+% D. Roegel January 2001
+% roegel@loria.fr
+
+% oblique projections
+
+input 3danim
+output_res:=72;
+drawing_scale:=3cm;
+
+projection_type:=2;
+
+%set_plane_(projection_plane)(point_null,vec_I,vec_J);
+set_plane_(projection_plane)(point_null,vec_I,vec_K);
+
+
+vardef def_C(expr inst)=
+ new_obj_points(inst,8); % 8 points
+ set_C_points(inst);
+enddef;
+
+vardef set_C_points(expr inst)=
+ set_point(1)(0,0,0);set_point(2)(0,0,1);
+ set_point(3)(0,1,0);set_point(4)(0,1,1);
+ set_point(5)(1,0,0);set_point(6)(1,0,1);
+ set_point(7)(1,1,0);set_point(8)(1,1,1);
+enddef;
+
+vardef draw_C(expr inst)=
+ draw_lines(1,2,4,3,1);draw_lines(5,6,8,7,5);
+ draw_line(1,5);draw_line(2,6);draw_line(3,7);draw_line(4,8);
+enddef;
+
+assign_obj("cube","C");
+
+for i:=0 upto 20:
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("cube",8,Obs_phi);
+ draw_obj("cube");
+ endfig;
+endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/cube9.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/cube9.mp
new file mode 100644
index 00000000000..1e52203a811
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/cube9.mp
@@ -0,0 +1,66 @@
+% Cube projections
+% D. Roegel 23 January 2001
+% roegel@loria.fr
+
+
+input 3danim
+output_res:=72;
+drawing_scale:=2cm;
+
+projection_type:=1;
+
+%set_plane_(projection_plane)(point_null,vec_I,vec_J);
+%set_plane_(projection_plane)(point_null,vec_I,vec_K);
+
+vardef def_C(expr inst)=
+ new_obj_points(inst,8); % 8 points
+ set_C_points(inst);
+enddef;
+
+vardef set_C_points(expr inst)=
+ set_point(1)(0,0,0);set_point(2)(0,0,1);
+ set_point(3)(0,1,0);set_point(4)(0,1,1);
+ set_point(5)(1,0,0);set_point(6)(1,0,1);
+ set_point(7)(1,1,0);set_point(8)(1,1,1);
+enddef;
+
+vardef draw_C(expr inst)=
+ draw_lines(1,2,4,3,1);
+ draw_line(2,6);draw_line(4,8);draw_line(1,5);
+ draw_lines(5,6,8);
+ drawoptions(dashed evenly);
+ draw_line(3,7);draw_lines(8,7,5);
+ drawoptions();
+enddef;
+
+assign_obj("cube","C");
+
+% Trimetric projection
+i:=67;
+beginfig(167);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("cube",8,Obs_phi);
+ draw_obj("cube");
+endfig;
+
+% Isometric projection
+isometric_projection(vec_I,vec_J,vec_K,pnt_obj("cube",8),Obs_dist,90);
+
+beginfig(168);
+ draw_obj("cube");
+endfig;
+
+% Dimetric projection
+dimetric_projection(vec_I,vec_J,vec_K,0.5,pnt_obj("cube",8),3*Obs_dist,90);
+
+beginfig(169);
+ draw_obj("cube");
+endfig;
+
+end.
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1-eng.mp
new file mode 100644
index 00000000000..bf144e1eeae
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1-eng.mp
@@ -0,0 +1,75 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=7cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,6); % 6 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ drawoptions();
+ draw_line(2,3);draw_line(2,4);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);
+ label_obj.ulft(btex $A_1$ etex,1);
+ label_obj.rt(btex $B_2$ etex,2);
+ label_obj.lft(btex $C_3$ etex,3);
+ label_obj.top(btex $D_4$ etex,4);
+ label_obj.top(btex $I_5$ etex,5);
+ label_obj.top(btex $J_6$ etex,6);
+
+enddef;
+
+assign_obj("tetra","T");
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1.mp
new file mode 100644
index 00000000000..82a76d2c042
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp1.mp
@@ -0,0 +1,76 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=7cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,6); % 6 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ drawoptions();
+ draw_line(2,3);draw_line(2,4);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);
+ label_obj.ulft(btex $A_1$ etex,1);
+ label_obj.rt(btex $B_2$ etex,2);
+ label_obj.lft(btex $C_3$ etex,3);
+ label_obj.top(btex $D_4$ etex,4);
+ label_obj.top(btex $I_5$ etex,5);
+ label_obj.top(btex $J_6$ etex,6);
+
+enddef;
+
+assign_obj("tetra","T");
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2-eng.mp
new file mode 100644
index 00000000000..7ff4e581013
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2-eng.mp
@@ -0,0 +1,90 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=13cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,6); % 6 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);draw_line(2,4);drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ draw_line(2,3);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);
+ label_obj.top(btex $A_1$ etex,1);
+ label_obj.lft(btex $B_2$ etex,2);
+ label_obj.bot(btex $C_3$ etex,3);
+ label_obj.rt(btex $D_4$ etex,4);
+ label_obj.lft(btex $I_5$ etex,5);
+ label_obj.urt(btex $J_6$ etex,6);
+
+enddef;
+
+assign_obj("tetra","T");
+
+new_vec(v_a);new_vec(v_b);new_vec(v_c);
+vec_diff_(v_a,pnt_obj("tetra",3),pnt_obj("tetra",4)); % vec(DC)
+vec_mult_(v_a,v_a,5);
+vec_diff_(v_b,pnt_obj("tetra",3),pnt_obj("tetra",2)); % vec(BC)
+vec_mult_(v_b,v_b,5);
+vec_diff_(v_c,pnt_obj("tetra",1),pnt_obj("tetra",3)); % vec(CA)
+vec_mult_(v_c,v_c,3);
+vec_sum_(Obs,pnt_obj("tetra",3),v_a); % C + 5DC
+vec_sum_(Obs,Obs,v_b);% C + 5DC + 5BC
+vec_sum_(Obs,Obs,v_c);% C + 5DC + 5BC + 3CA
+free_vec(v_c);free_vec(v_b);free_vec(v_a);
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(200+i);
+ % Observator
+ %set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=0;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2.mp
new file mode 100644
index 00000000000..b2e3453f029
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp2.mp
@@ -0,0 +1,91 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=13cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,6); % 6 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);draw_line(2,4);drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ draw_line(2,3);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);
+ label_obj.top(btex $A_1$ etex,1);
+ label_obj.lft(btex $B_2$ etex,2);
+ label_obj.bot(btex $C_3$ etex,3);
+ label_obj.rt(btex $D_4$ etex,4);
+ label_obj.lft(btex $I_5$ etex,5);
+ label_obj.urt(btex $J_6$ etex,6);
+
+enddef;
+
+assign_obj("tetra","T");
+
+new_vec(v_a);new_vec(v_b);new_vec(v_c);
+vec_diff_(v_a,pnt_obj("tetra",3),pnt_obj("tetra",4)); % vec(DC)
+vec_mult_(v_a,v_a,5);
+vec_diff_(v_b,pnt_obj("tetra",3),pnt_obj("tetra",2)); % vec(BC)
+vec_mult_(v_b,v_b,5);
+vec_diff_(v_c,pnt_obj("tetra",1),pnt_obj("tetra",3)); % vec(CA)
+vec_mult_(v_c,v_c,3);
+vec_sum_(Obs,pnt_obj("tetra",3),v_a); % C + 5DC
+vec_sum_(Obs,Obs,v_b);% C + 5DC + 5BC
+vec_sum_(Obs,Obs,v_c);% C + 5DC + 5BC + 3CA
+free_vec(v_c);free_vec(v_b);free_vec(v_a);
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(200+i);
+ % Observator
+ %set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=0;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3-eng.mp
new file mode 100644
index 00000000000..a4b3cb81736
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3-eng.mp
@@ -0,0 +1,98 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=13cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,7); % 7 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+ new_plane(bcd)(2,3,4);
+ new_line(ij)(5,6);
+ boolean b;
+ b:=def_inter_p_l_pl(7)(ij)(bcd); if not b: ... fi;
+ free_line(ij);
+ free_plane(bcd);
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);draw_line(2,4);drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ draw_line(2,3);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);draw_line(7,7);
+ pickup pencircle scaled .4pt;
+ draw_line(5,7);draw_line(2,7);
+ label_obj.top(btex $A_1$ etex,1);
+ label_obj.lft(btex $B_2$ etex,2);
+ label_obj.bot(btex $C_3$ etex,3);
+ label_obj.rt(btex $D_4$ etex,4);
+ label_obj.lft(btex $I_5$ etex,5);
+ label_obj.urt(btex $J_6$ etex,6);
+ label_obj.bot(btex $M_7$ etex,7);
+
+enddef;
+
+assign_obj("tetra","T");
+
+new_vec(v_a);new_vec(v_b);new_vec(v_c);
+vec_diff_(v_a,pnt_obj("tetra",3),pnt_obj("tetra",4)); % vec(DC)
+vec_mult_(v_a,v_a,5);
+vec_diff_(v_b,pnt_obj("tetra",3),pnt_obj("tetra",2)); % vec(BC)
+vec_mult_(v_b,v_b,5);
+vec_diff_(v_c,pnt_obj("tetra",1),pnt_obj("tetra",3)); % vec(CA)
+vec_mult_(v_c,v_c,3);
+vec_sum_(Obs,pnt_obj("tetra",3),v_a); % C + 5DC
+vec_sum_(Obs,Obs,v_b);% C + 5DC + 5BC
+vec_sum_(Obs,Obs,v_c);% C + 5DC + 5BC + 3CA
+free_vec(v_c);free_vec(v_b);free_vec(v_a);
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(200+i);
+ % Observator
+ %set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=0;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3.mp
new file mode 100644
index 00000000000..8b66eac58bb
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp3.mp
@@ -0,0 +1,99 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=13cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,7); % 7 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+ new_plane(bcd)(2,3,4);
+ new_line(ij)(5,6);
+ boolean b;
+ b:=def_inter_p_l_pl(7)(ij)(bcd); if not b: ... fi;
+ free_line(ij);
+ free_plane(bcd);
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);draw_line(2,4);drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ draw_line(2,3);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);draw_line(7,7);
+ pickup pencircle scaled .4pt;
+ draw_line(5,7);draw_line(2,7);
+ label_obj.top(btex $A_1$ etex,1);
+ label_obj.lft(btex $B_2$ etex,2);
+ label_obj.bot(btex $C_3$ etex,3);
+ label_obj.rt(btex $D_4$ etex,4);
+ label_obj.lft(btex $I_5$ etex,5);
+ label_obj.urt(btex $J_6$ etex,6);
+ label_obj.bot(btex $M_7$ etex,7);
+
+enddef;
+
+assign_obj("tetra","T");
+
+new_vec(v_a);new_vec(v_b);new_vec(v_c);
+vec_diff_(v_a,pnt_obj("tetra",3),pnt_obj("tetra",4)); % vec(DC)
+vec_mult_(v_a,v_a,5);
+vec_diff_(v_b,pnt_obj("tetra",3),pnt_obj("tetra",2)); % vec(BC)
+vec_mult_(v_b,v_b,5);
+vec_diff_(v_c,pnt_obj("tetra",1),pnt_obj("tetra",3)); % vec(CA)
+vec_mult_(v_c,v_c,3);
+vec_sum_(Obs,pnt_obj("tetra",3),v_a); % C + 5DC
+vec_sum_(Obs,Obs,v_b);% C + 5DC + 5BC
+vec_sum_(Obs,Obs,v_c);% C + 5DC + 5BC + 3CA
+free_vec(v_c);free_vec(v_b);free_vec(v_a);
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(200+i);
+ % Observator
+ %set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=0;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4-eng.mp
new file mode 100644
index 00000000000..93e3cfba01c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4-eng.mp
@@ -0,0 +1,112 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=13cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,10); % 10 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+ new_plane(bcd)(2,3,4);
+ new_line(ij)(5,6);
+ boolean b;
+ b:=def_inter_p_l_pl(7)(ij)(bcd); if not b: ... fi;
+ % K=middle of AD
+ mid_point(8,1,4);
+ set_line(ij)(5,8);
+ b:=def_inter_p_l_pl(9)(ij)(bcd); if not b: ... fi;
+ set_line(ij)(6,8);
+ b:=def_inter_p_l_pl(10)(ij)(bcd); if not b: ... fi;
+ free_line(ij);
+ free_plane(bcd);
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);draw_line(2,4);draw_line(8,5);
+ drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ draw_line(2,3);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);draw_line(7,7);draw_line(8,8);
+ draw_line(9,9);draw_line(10,10);
+ pickup pencircle scaled .4pt;
+ draw_line(5,7);draw_line(3,7);
+ draw_line(8,9);draw_line(4,9);
+ draw_line(8,10);draw_line(3,10);
+ draw_line_extra(9,10)(-0.1,1.1);
+ label_obj.top(btex $A_1$ etex,1);
+ label_obj.lft(btex $B_2$ etex,2);
+ label_obj.llft(btex $C_3$ etex,3) shifted (-2.5mm,1mm);
+ label_obj.top(btex $D_4$ etex,4);
+ label_obj.lft(btex $I_5$ etex,5);
+ label_obj.lft(btex $J_6$ etex,6) shifted (-2mm,0);
+ label_obj.lrt(btex $M_7$ etex,7);
+ label_obj.urt(btex $K_8$ etex,8);
+ label_obj.lrt(btex $N_9$ etex,9);
+ label_obj.lrt(btex $L_{10}$ etex,10);
+
+enddef;
+
+assign_obj("tetra","T");
+
+new_vec(v_a);new_vec(v_b);new_vec(v_c);
+vec_diff_(v_a,pnt_obj("tetra",3),pnt_obj("tetra",4)); % vec(DC)
+vec_mult_(v_a,v_a,5);
+vec_diff_(v_b,pnt_obj("tetra",3),pnt_obj("tetra",2)); % vec(BC)
+vec_mult_(v_b,v_b,5);
+vec_diff_(v_c,pnt_obj("tetra",1),pnt_obj("tetra",3)); % vec(CA)
+vec_mult_(v_c,v_c,3);
+vec_sum_(Obs,pnt_obj("tetra",3),v_a); % C + 5DC
+vec_sum_(Obs,Obs,v_b);% C + 5DC + 5BC
+vec_sum_(Obs,Obs,v_c);% C + 5DC + 5BC + 3CA
+free_vec(v_c);free_vec(v_b);free_vec(v_a);
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(200+i);
+ % Observator
+ %set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=0;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4.mp
new file mode 100644
index 00000000000..b97426f8196
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp4.mp
@@ -0,0 +1,113 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=13cm;
+
+numeric b,c,d,e;b=70;c=0;d=20;e=50; % parameterized angles
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,10); % 10 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(3*cosd(b),3*sind(b),0);
+ set_point(3)(6*cosd(c),6*sind(c),0);
+ new_vec(v_a);new_vec(v_b);
+ vec_def_vec_(v_a,vec_I);
+ vec_rotate_(v_a,vec_K,d);
+ vec_prod_(v_b,v_a,vec_K);
+ vec_rotate_(v_a,v_b,e);
+ vec_mult_(v_a,v_a,4.5);
+ vec_sum_(pnt(4),pnt(1),v_a);
+ free_vec(v_b);free_vec(v_a);
+ % Determination of I and J:
+ % I=A + unit(AB)
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_sum(5,5,1);
+ % J=A + 4*unit(AC)
+ vec_diff(6,3,1);
+ vec_unit(6,6);
+ vec_mult(6,6,4);
+ vec_sum(6,6,1);
+ new_plane(bcd)(2,3,4);
+ new_line(ij)(5,6);
+ boolean b;
+ b:=def_inter_p_l_pl(7)(ij)(bcd); if not b: ... fi;
+ % K=middle of AD
+ mid_point(8,1,4);
+ set_line(ij)(5,8);
+ b:=def_inter_p_l_pl(9)(ij)(bcd); if not b: ... fi;
+ set_line(ij)(6,8);
+ b:=def_inter_p_l_pl(10)(ij)(bcd); if not b: ... fi;
+ free_line(ij);
+ free_plane(bcd);
+enddef;
+
+vardef draw_T(expr inst)=
+ drawoptions(dashed evenly);draw_line(2,4);draw_line(8,5);
+ drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(1,4);
+ draw_line(2,3);draw_line(3,4);
+ pickup pencircle scaled 2pt;
+ draw_line(5,5);draw_line(6,6);draw_line(7,7);draw_line(8,8);
+ draw_line(9,9);draw_line(10,10);
+ pickup pencircle scaled .4pt;
+ draw_line(5,7);draw_line(3,7);
+ draw_line(8,9);draw_line(4,9);
+ draw_line(8,10);draw_line(3,10);
+ draw_line_extra(9,10)(-0.1,1.1);
+ label_obj.top(btex $A_1$ etex,1);
+ label_obj.lft(btex $B_2$ etex,2);
+ label_obj.llft(btex $C_3$ etex,3) shifted (-2.5mm,1mm);
+ label_obj.top(btex $D_4$ etex,4);
+ label_obj.lft(btex $I_5$ etex,5);
+ label_obj.lft(btex $J_6$ etex,6) shifted (-2mm,0);
+ label_obj.lrt(btex $M_7$ etex,7);
+ label_obj.urt(btex $K_8$ etex,8);
+ label_obj.lrt(btex $N_9$ etex,9);
+ label_obj.lrt(btex $L_{10}$ etex,10);
+
+enddef;
+
+assign_obj("tetra","T");
+
+new_vec(v_a);new_vec(v_b);new_vec(v_c);
+vec_diff_(v_a,pnt_obj("tetra",3),pnt_obj("tetra",4)); % vec(DC)
+vec_mult_(v_a,v_a,5);
+vec_diff_(v_b,pnt_obj("tetra",3),pnt_obj("tetra",2)); % vec(BC)
+vec_mult_(v_b,v_b,5);
+vec_diff_(v_c,pnt_obj("tetra",1),pnt_obj("tetra",3)); % vec(CA)
+vec_mult_(v_c,v_c,3);
+vec_sum_(Obs,pnt_obj("tetra",3),v_a); % C + 5DC
+vec_sum_(Obs,Obs,v_b);% C + 5DC + 5BC
+vec_sum_(Obs,Obs,v_c);% C + 5DC + 5BC + 3CA
+free_vec(v_c);free_vec(v_b);free_vec(v_a);
+
+%for i:=0 upto 20:
+i=8;
+ beginfig(200+i);
+ % Observator
+ %set_point_(Obs)(20*cosd(3.6*i),20*sind(3.6*i),6);
+ Obs_phi:=0;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5-eng.mp
new file mode 100644
index 00000000000..5bf58829948
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5-eng.mp
@@ -0,0 +1,84 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=10cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,4); % 4 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,inter;new_point(h);new_point(k);
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff_(h,pnt(2),pnt(1));
+ vec_unit_(h,h);vec_mult_(h,h,lsb*cosd(aasb));
+ vec_sum_(h,h,pnt(1));
+ vec_diff_(k,pnt(4),pnt(1));
+ vec_unit_(k,k);vec_mult_(k,k,lsb*cosd(absc));
+ vec_sum_(k,k,pnt(1));
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+ def_orth_pl_l_p_(hp)(sa)(h);
+ def_orth_pl_l_p_(kp)(sc)(k);
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM";
+ fi;
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+ free_point(k);free_point(h);
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line(1,4);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ drawoptions(dashed evenly);
+ draw_line(2,4);
+ drawoptions();
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.top(btex $B$ etex,3);
+ label_obj.lft(btex $C$ etex,4);
+
+enddef;
+
+assign_obj("tetra","T");
+
+%for i:=0 upto 20:
+i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5.mp
new file mode 100644
index 00000000000..3063c260839
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp5.mp
@@ -0,0 +1,85 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=10cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,4); % 4 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,inter;new_point(h);new_point(k);
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff_(h,pnt(2),pnt(1));
+ vec_unit_(h,h);vec_mult_(h,h,lsb*cosd(aasb));
+ vec_sum_(h,h,pnt(1));
+ vec_diff_(k,pnt(4),pnt(1));
+ vec_unit_(k,k);vec_mult_(k,k,lsb*cosd(absc));
+ vec_sum_(k,k,pnt(1));
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+ def_orth_pl_l_p_(hp)(sa)(h);
+ def_orth_pl_l_p_(kp)(sc)(k);
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM";
+ fi;
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+ free_point(k);free_point(h);
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line(1,4);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ drawoptions(dashed evenly);
+ draw_line(2,4);
+ drawoptions();
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.top(btex $B$ etex,3);
+ label_obj.lft(btex $C$ etex,4);
+
+enddef;
+
+assign_obj("tetra","T");
+
+%for i:=0 upto 20:
+i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6-eng.mp
new file mode 100644
index 00000000000..c11e44391a9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6-eng.mp
@@ -0,0 +1,100 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=10cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,19); % 19 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,inter;
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff(5,2,1);
+ vec_unit(5,5);vec_mult(5,5,lsb*cosd(aasb));
+ vec_sum(5,5,1);
+ vec_diff(6,4,1);
+ vec_unit(6,6);vec_mult(6,6,lsb*cosd(absc));
+ vec_sum(6,6,1);
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+ def_orth_pl_l_p_(hp)(sa)(pnt(5));
+ def_orth_pl_l_p_(kp)(sc)(pnt(6));
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM";
+ fi;
+ new_plane(sac)(1,2,4);
+ if def_inter_p_l_pl(13)(inter)(sac): else: message "PROBLEM";fi;
+ free_plane(sac);
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ def_right_angle(7,8,9,5,1,3);
+ def_right_angle(10,11,12,6,1,3);
+ def_right_angle(14,15,16,13,6,3);
+ def_right_angle(17,18,19,13,5,3);
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line_extra(1,4)(-.1,2);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ draw_line_extra(3,13)(-0.5,1);
+ drawoptions(dashed evenly);
+ draw_line(2,4);draw_line(3,5);draw_line(3,6);
+ draw_line_extra(3,13)(1,2);
+ draw_line(13,6);draw_line(13,5);
+ drawoptions();
+ draw_double_right_angle(7,8,9,5);
+ draw_double_right_angle(10,11,12,6);
+ draw_double_right_angle(14,15,16,13);
+ draw_double_right_angle(17,18,19,13);
+
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.ulft(btex $B$ etex,3);
+ label_obj.llft(btex $C$ etex,4);
+
+enddef;
+
+square_angle_size:=0.35;
+assign_obj("tetra","T");
+
+
+%for i:=0 upto 20:
+ i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6.mp
new file mode 100644
index 00000000000..a63a1b08474
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp6.mp
@@ -0,0 +1,101 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=10cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,19); % 19 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,inter;
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff(5,2,1);
+ vec_unit(5,5);vec_mult(5,5,lsb*cosd(aasb));
+ vec_sum(5,5,1);
+ vec_diff(6,4,1);
+ vec_unit(6,6);vec_mult(6,6,lsb*cosd(absc));
+ vec_sum(6,6,1);
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+ def_orth_pl_l_p_(hp)(sa)(pnt(5));
+ def_orth_pl_l_p_(kp)(sc)(pnt(6));
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM";
+ fi;
+ new_plane(sac)(1,2,4);
+ if def_inter_p_l_pl(13)(inter)(sac): else: message "PROBLEM";fi;
+ free_plane(sac);
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ def_right_angle(7,8,9,5,1,3);
+ def_right_angle(10,11,12,6,1,3);
+ def_right_angle(14,15,16,13,6,3);
+ def_right_angle(17,18,19,13,5,3);
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line_extra(1,4)(-.1,2);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ draw_line_extra(3,13)(-0.5,1);
+ drawoptions(dashed evenly);
+ draw_line(2,4);draw_line(3,5);draw_line(3,6);
+ draw_line_extra(3,13)(1,2);
+ draw_line(13,6);draw_line(13,5);
+ drawoptions();
+ draw_double_right_angle(7,8,9,5);
+ draw_double_right_angle(10,11,12,6);
+ draw_double_right_angle(14,15,16,13);
+ draw_double_right_angle(17,18,19,13);
+
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.ulft(btex $B$ etex,3);
+ label_obj.llft(btex $C$ etex,4);
+
+enddef;
+
+square_angle_size:=0.35;
+assign_obj("tetra","T");
+
+
+%for i:=0 upto 20:
+ i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7-eng.mp
new file mode 100644
index 00000000000..45865eae0f0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7-eng.mp
@@ -0,0 +1,102 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=8cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,17); % 17 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,inter;
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff(5,2,1);
+ vec_unit(5,5);vec_mult(5,5,lsb*cosd(aasb));
+ vec_sum(5,5,1);
+ vec_diff(6,4,1);
+ vec_unit(6,6);vec_mult(6,6,lsb*cosd(absc));
+ vec_sum(6,6,1);
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+ def_orth_pl_l_p_(hp)(sa)(pnt(5));
+ def_orth_pl_l_p_(kp)(sc)(pnt(6));
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM";
+ fi;
+ new_plane(sac)(1,2,4);
+ if def_inter_p_l_pl(13)(inter)(sac): else: message "PROBLEM";fi;
+ free_plane(sac);
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ def_right_angle(7,8,9,5,1,3);
+ def_right_angle(10,11,12,6,1,3);
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+ set_point(14)(-2,-2,0);
+ set_point(15)(11,-2,0);
+ set_point(16)(11,10,0);
+ set_point(17)(-2,10,0);
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line_extra(1,4)(-.1,2);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ draw_line_extra(3,13)(-0.5,1);
+ drawoptions(dashed evenly);
+ draw_line(3,5);draw_line(3,6);draw_line(2,4);
+ draw_line_extra(3,13)(1,2);
+ drawoptions();
+ draw_double_right_angle(7,8,9,5);
+ draw_double_right_angle(10,11,12,6);
+ draw_line(14,15);draw_line(15,16);draw_line(16,17);draw_line(17,14);
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.ulft(btex $B$ etex,3);
+ label_obj.llft(btex $C$ etex,4);
+ label_obj.bot(btex $p_1$ etex,14);
+ label_obj.rt(btex $p_2$ etex,15);
+ label_obj.ulft(btex $p_3$ etex,16);
+ label_obj.llft(btex $p_4$ etex,17);
+enddef;
+
+square_angle_size:=0.35;
+assign_obj("tetra","T");
+
+
+%for i:=0 upto 20:
+i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7.mp
new file mode 100644
index 00000000000..784d8a2cfcc
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp7.mp
@@ -0,0 +1,103 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=8cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,17); % 17 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,inter;
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff(5,2,1);
+ vec_unit(5,5);vec_mult(5,5,lsb*cosd(aasb));
+ vec_sum(5,5,1);
+ vec_diff(6,4,1);
+ vec_unit(6,6);vec_mult(6,6,lsb*cosd(absc));
+ vec_sum(6,6,1);
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+ def_orth_pl_l_p_(hp)(sa)(pnt(5));
+ def_orth_pl_l_p_(kp)(sc)(pnt(6));
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM";
+ fi;
+ new_plane(sac)(1,2,4);
+ if def_inter_p_l_pl(13)(inter)(sac): else: message "PROBLEM";fi;
+ free_plane(sac);
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ def_right_angle(7,8,9,5,1,3);
+ def_right_angle(10,11,12,6,1,3);
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+ set_point(14)(-2,-2,0);
+ set_point(15)(11,-2,0);
+ set_point(16)(11,10,0);
+ set_point(17)(-2,10,0);
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line_extra(1,4)(-.1,2);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ draw_line_extra(3,13)(-0.5,1);
+ drawoptions(dashed evenly);
+ draw_line(3,5);draw_line(3,6);draw_line(2,4);
+ draw_line_extra(3,13)(1,2);
+ drawoptions();
+ draw_double_right_angle(7,8,9,5);
+ draw_double_right_angle(10,11,12,6);
+ draw_line(14,15);draw_line(15,16);draw_line(16,17);draw_line(17,14);
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.ulft(btex $B$ etex,3);
+ label_obj.llft(btex $C$ etex,4);
+ label_obj.bot(btex $p_1$ etex,14);
+ label_obj.rt(btex $p_2$ etex,15);
+ label_obj.ulft(btex $p_3$ etex,16);
+ label_obj.llft(btex $p_4$ etex,17);
+enddef;
+
+square_angle_size:=0.35;
+assign_obj("tetra","T");
+
+
+%for i:=0 upto 20:
+i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8-eng.mp
new file mode 100644
index 00000000000..b46031931b9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8-eng.mp
@@ -0,0 +1,120 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=8cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,19); % 19 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,op,oab,inter;
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_mult(5,5,lsb*cosd(aasb));
+ vec_sum(5,5,1);
+ vec_diff(6,4,1);
+ vec_unit(6,6);vec_mult(6,6,lsb*cosd(absc));
+ vec_sum(6,6,1);
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+
+ def_orth_pl_l_p(hp)(sa)(5);
+ def_orth_pl_l_p(kp)(sc)(6);
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM 1";
+ fi;
+ new_plane(sac)(1,2,4);
+ if def_inter_p_l_pl(13)(inter)(sac): else: message "PROBLEM";fi;
+ free_plane(sac);
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ def_right_angle(7,8,9,5,1,3);
+ def_right_angle(10,11,12,6,1,3);
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+ set_point(14)(-2,-2,0);
+ set_point(15)(11,-2,0);
+ set_point(16)(11,10,0);
+ set_point(17)(-2,10,0);
+ if def_visual_inter(18)(15,16,2,3):
+ else:
+ message "PROBLEM";
+ fi;
+ if def_visual_inter(19)(15,16,3,4):
+ else:
+ message "PROBLEM";
+ fi;
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line_extra(1,4)(-.1,2);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ draw_line_extra(3,13)(-0.5,1);
+ drawoptions(dashed evenly);draw_line(2,4);
+ draw_line(3,5);draw_line(3,6);
+ draw_line_extra(3,13)(1,2);
+ drawoptions();
+ draw_double_right_angle(7,8,9,5);
+ draw_double_right_angle(10,11,12,6);
+ draw_line(14,15);
+ %draw_line(15,16);
+ draw_line(15,18);draw_line(19,16);
+ draw_line(16,17);draw_line(17,14);
+ drawoptions(dashed evenly);
+ draw_line(18,19);
+ pickup pencircle scaled .4pt;drawoptions();
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.ulft(btex $B$ etex,3);
+ label_obj.llft(btex $C$ etex,4);
+ label_obj.bot(btex $p_1$ etex,14);
+ label_obj.rt(btex $p_2$ etex,15);
+ label_obj.ulft(btex $p_3$ etex,16);
+ label_obj.llft(btex $p_4$ etex,17);
+
+enddef;
+
+square_angle_size:=0.35;
+assign_obj("tetra","T");
+
+
+%for i:=0 upto 20:
+i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ reset_obj("tetra"); % so that |Obs| is taken into account
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8.mp
new file mode 100644
index 00000000000..fc342bb301c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp8.mp
@@ -0,0 +1,121 @@
+% D. Roegel, 7 January 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=8cm;
+
+numeric lsa,lsb,lsc,aasc,aasb,absc;
+lsa=9;lsb=8;lsc=4;aasc=60;aasb=40;absc=30;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,19); % 19 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ save hp,kp,sa,sc,op,oab,inter;
+ set_point(1)(0,0,0); % S
+ set_point(2)(lsa,0,0); % A
+ set_point(4)(lsc*cosd(aasc),lsc*sind(aasc),0); % C
+ vec_diff(5,2,1);
+ vec_unit(5,5);
+ vec_mult(5,5,lsb*cosd(aasb));
+ vec_sum(5,5,1);
+ vec_diff(6,4,1);
+ vec_unit(6,6);vec_mult(6,6,lsb*cosd(absc));
+ vec_sum(6,6,1);
+ new_plane(hp)(1,1,1);
+ new_plane(kp)(1,1,1);
+ new_line(sa)(1,2);
+ new_line(sc)(1,4);
+ new_line(inter)(1,1);
+
+ def_orth_pl_l_p(hp)(sa)(5);
+ def_orth_pl_l_p(kp)(sc)(6);
+ if def_inter_l_pl_pl(inter)(hp)(kp): % there is an intersection
+ if def_point_at(3,-lsb,1)(inter):
+ else:
+ message "PROBLEM 1";
+ fi;
+ new_plane(sac)(1,2,4);
+ if def_inter_p_l_pl(13)(inter)(sac): else: message "PROBLEM";fi;
+ free_plane(sac);
+ else:
+ message "PROBLEM";
+ set_point(3)(1,1,1);
+ fi;
+ def_right_angle(7,8,9,5,1,3);
+ def_right_angle(10,11,12,6,1,3);
+ free_line(inter);free_line(sc);free_line(sa);
+ free_plane(kp);free_plane(hp);
+ set_point(14)(-2,-2,0);
+ set_point(15)(11,-2,0);
+ set_point(16)(11,10,0);
+ set_point(17)(-2,10,0);
+ if def_visual_inter(18)(15,16,2,3):
+ else:
+ message "PROBLEM";
+ fi;
+ if def_visual_inter(19)(15,16,3,4):
+ else:
+ message "PROBLEM";
+ fi;
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line_extra(1,4)(-.1,2);draw_line(1,3);
+ draw_line(2,3);draw_line(3,4);
+ draw_line_extra(3,13)(-0.5,1);
+ drawoptions(dashed evenly);draw_line(2,4);
+ draw_line(3,5);draw_line(3,6);
+ draw_line_extra(3,13)(1,2);
+ drawoptions();
+ draw_double_right_angle(7,8,9,5);
+ draw_double_right_angle(10,11,12,6);
+ draw_line(14,15);
+ %draw_line(15,16);
+ draw_line(15,18);draw_line(19,16);
+ draw_line(16,17);draw_line(17,14);
+ drawoptions(dashed evenly);
+ draw_line(18,19);
+ pickup pencircle scaled .4pt;drawoptions();
+ label_obj.bot(btex $S$ etex,1);
+ label_obj.rt(btex $A$ etex,2);
+ label_obj.ulft(btex $B$ etex,3);
+ label_obj.llft(btex $C$ etex,4);
+ label_obj.bot(btex $p_1$ etex,14);
+ label_obj.rt(btex $p_2$ etex,15);
+ label_obj.ulft(btex $p_3$ etex,16);
+ label_obj.llft(btex $p_4$ etex,17);
+
+enddef;
+
+square_angle_size:=0.35;
+assign_obj("tetra","T");
+
+
+%for i:=0 upto 20:
+i=0;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(20*cosd(3.6*i-150),20*sind(3.6*i-150),6);
+ reset_obj("tetra"); % so that |Obs| is taken into account
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp9.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp9.mp
new file mode 100644
index 00000000000..a419516aff4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/gutmp9.mp
@@ -0,0 +1,63 @@
+% D. Roegel, 9 January 2001
+% roegel@loria.fr
+
+input 3danim
+input 3dgeom
+output_res:=72;
+drawing_scale:=15cm;
+
+vardef def_T(expr inst)=
+ new_obj_points(inst,12); % 12 points
+ set_T_points(inst);
+enddef;
+
+vardef set_T_points(expr inst)=
+ set_point(1)(0,0,0);
+ set_point(2)(1,0,0);
+ set_point(3)(1,1,0);
+ set_point(4)(0,1,0);
+ set_point(5)(0,0,1);
+ set_point(6)(1,0,1);
+ set_point(7)(1,1,1);
+ set_point(8)(0,1,1);
+ new_vec(v);
+ vec_diff_(v,pnt(1),pnt(4));
+ vec_sum_(pnt(9),pnt(1),v);
+ mid_point(10,1,2);
+ vec_sum_(pnt(11),pnt(2),v);
+ mid_point(12,7,8);
+enddef;
+
+vardef draw_T(expr inst)=
+ draw_line(1,2);draw_line(2,3);
+ draw_line(5,6);draw_line(6,7);draw_line(7,8);draw_line(8,5);
+ draw_line(1,5);draw_line(2,6);draw_line(3,7);
+ draw_line(9,10);draw_line(10,11);draw_line(11,9);
+ draw_line(5,12);draw_line(12,6);draw_line(6,5);
+ drawoptions(dashed evenly);
+ draw_line(3,4);draw_line(4,1);draw_line(4,8);
+ draw_line(5,9);draw_line(10,12);draw_line(6,11);
+ drawoptions();
+ fill z[ipnt_(9)]--z[ipnt_(10)]--z[ipnt_(11)]--cycle withcolor 0.8white;
+ fill z[ipnt_(5)]--z[ipnt_(12)]--z[ipnt_(6)]--cycle withcolor 0.8white;
+ draw_equal_marks(1,4,2);
+ draw_equal_marks(1,5,2);
+enddef;
+
+assign_obj("tetra","T");
+
+%for i:=0 upto 30:
+i=23;
+ beginfig(100+i);
+ % Observator
+ set_point_(Obs)(10*cosd(3.6*i-150),10*sind(3.6*i-150),3);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("tetra",1,Obs_phi);
+ draw_obj("tetra");
+ endfig;
+%endfor;
+
+end.
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/monge-eng.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/monge-eng.mp
new file mode 100644
index 00000000000..09516765684
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/monge-eng.mp
@@ -0,0 +1,148 @@
+% D. Roegel
+% Three orthogonal projections of a tetrahedron
+% January 7, 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\begin{document}
+etex
+
+
+
+input 3dgeom; % definitions for geometry
+input 3danim; % animations
+
+% We modify some of the default settings.
+output_res:=72;
+drawing_scale:=7cm;
+filled_faces:=false;
+show_animation_parameters:=true;
+
+%projection_type:=1; % parallel projection
+
+%================ DEFINITION OF OBJECT (BEGIN) =========================
+vardef def_fig(expr inst)=
+ new_obj_points(inst,28); % 28 points 4+3*(4+4)
+ set_fig_points(inst);
+enddef;
+
+% Definition of the points that belong to the general figure.
+vardef set_fig_points(expr inst)=
+ set_point(1)(0.3,0.45,0.8); % A
+ set_point(2)(0.6,0.45,0.8); % B
+ set_point(3)(0.5,0.6,0.5); % C
+ set_point(4)(0.5,0.3,0.5); % D
+
+ % the three planes (four corners at a time)
+ % horizontal
+ set_point(5)(0,0,-.2);
+ set_point(6)(1,0,-.2);
+ set_point(7)(1,1,-.2);
+ set_point(8)(0,1,-.2);
+ % vertical left
+ set_point(9) (-.45,0,0);
+ set_point(10)(-.45,1,0);
+ set_point(11)(-.45,1,1);
+ set_point(12)(-.45,0,1);
+ % vertical front
+ set_point(13)(0,-.45,0);
+ set_point(14)(1,-.45,0);
+ set_point(15)(1,-.45,1);
+ set_point(16)(0,-.45,1);
+
+ % we now compute the verticals and therefore introduce plane structures
+ new_plane(f)(9,10,11);
+ new_plane(g)(13,14,15);
+ new_plane(h)(5,6,7);
+
+ % bottow figure
+ def_vert_pl(17)(1)(h);
+ def_vert_pl(18)(2)(h);
+ def_vert_pl(19)(3)(h);
+ def_vert_pl(20)(4)(h);
+
+ % left figure
+ def_vert_pl(21)(1)(f);
+ def_vert_pl(22)(2)(f);
+ def_vert_pl(23)(3)(f);
+ def_vert_pl(24)(4)(f);
+
+ % front figure
+ def_vert_pl(25)(1)(g);
+ def_vert_pl(26)(2)(g);
+ def_vert_pl(27)(3)(g);
+ def_vert_pl(28)(4)(g);
+
+ free_plane(h);free_plane(g);free_plane(f);
+enddef;
+
+% Method to draw a general figure
+vardef draw_fig(expr inst)=
+ % tetrahedron
+ pickup pencircle scaled 1pt;
+ drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(2,3);
+ draw_line(2,4);draw_line(3,4);
+ drawoptions(dashed withdots);draw_line(1,4);
+ drawoptions();
+
+ % projection on f:
+ draw_line(21,22);draw_line(21,23);draw_line(21,24);
+ draw_line(22,23);draw_line(22,24);draw_line(23,24);
+
+ % projection on g:
+ draw_line(25,26);draw_line(25,27);draw_line(25,28);
+ draw_line(26,27);draw_line(26,28);draw_line(27,28);
+
+ % projection on h:
+ draw_line(17,18);draw_line(17,19);draw_line(17,20);
+ draw_line(18,19);draw_line(18,20);draw_line(19,20);
+
+ pickup pencircle scaled .4pt;
+
+ % les plans
+ draw_line(5,6);draw_line(6,7);draw_line(7,8);draw_line(8,5);
+ draw_line(9,10);draw_line(10,11);draw_line(11,12);draw_line(12,9);
+ draw_line(13,14);draw_line(14,15);draw_line(15,16);draw_line(16,13);
+ pickup pencircle scaled .4pt;
+
+ % dotted projection lines:
+ save i;drawoptions(dashed evenly);
+ for i:=1 upto 4: draw_line(i,i+16);endfor;
+ for i:=1 upto 4: draw_line(i,i+20);endfor;
+ for i:=1 upto 4: draw_line(i,i+24);endfor;
+
+ % and a few labels:
+ label_obj.top(btex $A$ etex,1);
+ label_obj.llft(btex $B$ etex,2);
+ label_obj.lrt(btex $C$ etex,3);
+ label_obj.llft(btex $D$ etex,4);
+
+ label_obj.bot(btex $H$ etex,7);
+ label_obj.top(btex $F$ etex,12);
+ label_obj.llft(btex $G$ etex,14);
+
+enddef;
+
+assign_obj("figa","fig");
+
+%================ DEFINITION OF OBJECT (END) =========================
+
+% Call of drawing instruction
+%for i:=0 upto 20:%99:
+i=12;
+ beginfig(100+i);
+ % Positionning of the observer
+ set_point_(Obs)(4*cosd(3.6*i),4*sind(3.6*i),2.2);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("figa",1,Obs_phi);
+ draw_obj("figa"); % main figure
+ endfig;
+%endfor; show_animation_bbox;
+end.
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/examples/monge.mp b/Master/texmf-dist/doc/metapost/mp3d/examples/monge.mp
new file mode 100644
index 00000000000..67fc60a0e5f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/examples/monge.mp
@@ -0,0 +1,149 @@
+% D. Roegel
+% Three orthogonal projections of a tetrahedron
+% January 7, 2001
+% roegel@loria.fr
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage{mathpple}
+\begin{document}
+etex
+
+
+
+input 3dgeom; % definitions for geometry
+input 3danim; % animations
+
+% We modify some of the default settings.
+output_res:=72;
+drawing_scale:=7cm;
+filled_faces:=false;
+show_animation_parameters:=true;
+
+%projection_type:=1; % parallel projection
+
+%================ DEFINITION OF OBJECT (BEGIN) =========================
+vardef def_fig(expr inst)=
+ new_obj_points(inst,28); % 28 points 4+3*(4+4)
+ set_fig_points(inst);
+enddef;
+
+% Definition of the points that belong to the general figure.
+vardef set_fig_points(expr inst)=
+ set_point(1)(0.3,0.45,0.8); % A
+ set_point(2)(0.6,0.45,0.8); % B
+ set_point(3)(0.5,0.6,0.5); % C
+ set_point(4)(0.5,0.3,0.5); % D
+
+ % the three planes (four corners at a time)
+ % horizontal
+ set_point(5)(0,0,-.2);
+ set_point(6)(1,0,-.2);
+ set_point(7)(1,1,-.2);
+ set_point(8)(0,1,-.2);
+ % vertical left
+ set_point(9) (-.45,0,0);
+ set_point(10)(-.45,1,0);
+ set_point(11)(-.45,1,1);
+ set_point(12)(-.45,0,1);
+ % vertical front
+ set_point(13)(0,-.45,0);
+ set_point(14)(1,-.45,0);
+ set_point(15)(1,-.45,1);
+ set_point(16)(0,-.45,1);
+
+ % we now compute the verticals and therefore introduce plane structures
+ new_plane(f)(9,10,11);
+ new_plane(g)(13,14,15);
+ new_plane(h)(5,6,7);
+
+ % bottow figure
+ def_vert_pl(17)(1)(h);
+ def_vert_pl(18)(2)(h);
+ def_vert_pl(19)(3)(h);
+ def_vert_pl(20)(4)(h);
+
+ % left figure
+ def_vert_pl(21)(1)(f);
+ def_vert_pl(22)(2)(f);
+ def_vert_pl(23)(3)(f);
+ def_vert_pl(24)(4)(f);
+
+ % front figure
+ def_vert_pl(25)(1)(g);
+ def_vert_pl(26)(2)(g);
+ def_vert_pl(27)(3)(g);
+ def_vert_pl(28)(4)(g);
+
+ free_plane(h);free_plane(g);free_plane(f);
+enddef;
+
+% Method to draw a general figure
+vardef draw_fig(expr inst)=
+ % tetrahedron
+ pickup pencircle scaled 1pt;
+ drawoptions();
+ draw_line(1,2);draw_line(1,3);draw_line(2,3);
+ draw_line(2,4);draw_line(3,4);
+ drawoptions(dashed withdots);draw_line(1,4);
+ drawoptions();
+
+ % projection on f:
+ draw_line(21,22);draw_line(21,23);draw_line(21,24);
+ draw_line(22,23);draw_line(22,24);draw_line(23,24);
+
+ % projection on g:
+ draw_line(25,26);draw_line(25,27);draw_line(25,28);
+ draw_line(26,27);draw_line(26,28);draw_line(27,28);
+
+ % projection on h:
+ draw_line(17,18);draw_line(17,19);draw_line(17,20);
+ draw_line(18,19);draw_line(18,20);draw_line(19,20);
+
+ pickup pencircle scaled .4pt;
+
+ % les plans
+ draw_line(5,6);draw_line(6,7);draw_line(7,8);draw_line(8,5);
+ draw_line(9,10);draw_line(10,11);draw_line(11,12);draw_line(12,9);
+ draw_line(13,14);draw_line(14,15);draw_line(15,16);draw_line(16,13);
+ pickup pencircle scaled .4pt;
+
+ % dotted projection lines:
+ save i;drawoptions(dashed evenly);
+ for i:=1 upto 4: draw_line(i,i+16);endfor;
+ for i:=1 upto 4: draw_line(i,i+20);endfor;
+ for i:=1 upto 4: draw_line(i,i+24);endfor;
+
+ % and a few labels:
+ label_obj.top(btex $A$ etex,1);
+ label_obj.llft(btex $B$ etex,2);
+ label_obj.lrt(btex $C$ etex,3);
+ label_obj.llft(btex $D$ etex,4);
+
+ label_obj.bot(btex $H$ etex,7);
+ label_obj.top(btex $F$ etex,12);
+ label_obj.llft(btex $G$ etex,14);
+
+enddef;
+
+assign_obj("figa","fig");
+
+%================ DEFINITION OF OBJECT (END) =========================
+
+% Call of drawing instruction
+%for i:=0 upto 20:%99:
+i=12;
+ beginfig(100+i);
+ % Positionning of the observer
+ set_point_(Obs)(4*cosd(3.6*i),4*sind(3.6*i),2.2);
+ Obs_phi:=90;Obs_dist:=2;point_of_view_obj("figa",1,Obs_phi);
+ draw_obj("figa"); % main figure
+ endfig;
+%endfor; show_animation_bbox;
+end.
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/gut2001.pdf b/Master/texmf-dist/doc/metapost/mp3d/gut2001.pdf
new file mode 100644
index 00000000000..e64bdca4b52
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/gut2001.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mp3d/paper1997corrected.pdf b/Master/texmf-dist/doc/metapost/mp3d/paper1997corrected.pdf
new file mode 100644
index 00000000000..572c16e6bec
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/paper1997corrected.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mp3d/tb57roeg.pdf b/Master/texmf-dist/doc/metapost/mp3d/tb57roeg.pdf
new file mode 100644
index 00000000000..3fb40bfc8ba
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/tb57roeg.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mp3d/tb57roegel.ltx b/Master/texmf-dist/doc/metapost/mp3d/tb57roegel.ltx
new file mode 100644
index 00000000000..9ff0153aeac
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/tb57roegel.ltx
@@ -0,0 +1,1149 @@
+% D. Roegel, 25/2/1997 : first draft
+% 26/2/1997
+% 23/4/1997 : appendix, types added
+% 24/4/1997 : better formatting of appendix
+% 25/4/1997 : two columns
+% 27/4/1997 : some improvements
+% 28/4/1997 : changes to take new syntax into account
+% 30/4/1997 : cleaning and additions
+% 1/5/1997 : ltugboat macros
+% addition of appendix b
+% all overfull hboxes removed; this needed a lot
+% of rephrasing!
+% lots of cleaning
+% 2/5/1997 : extension of future part
+% 12/5/1997 : several small improvements to take Ulrik Vieth's
+% comments into account.
+% 17/5/1997 : some corrections to take modifications in
+% the source code into account
+% 18/5/1997 : commas in the syntax have been put in \texttt
+% some renamings in order to get rid of the overfull
+% hboxes resulting from the comma changes ...
+% 29/5/1997 : some renamings of ``object'' into ``obj'' to
+% be in accordance with the code (version 0.993)
+% some reformatting of pieces of code with respect
+% to the indentation
+% 19/6/1997 : - the `future' part has been corrected with respect
+% to the general algorithm for drawing the faces
+% (thanks to Dominique Larchey)
+% - reference to the ``LaTeX Graphics Companion''
+% 11/2/1998 : - description of draw_contours and contour_width
+% - acknowledgment of Denis Barbier and Boguslaw
+% Jackowski
+% - one_image changed to an_image at the beginning
+% of the paper, in order to avoid being misleading
+% by comparison with the real one_image macro
+% - a few more lines describing the parameters of
+% one_image
+% - ghostscript -> Ghostscript
+% - footnote added to explain why Ghostscript
+% has not been used to generate the excerpts
+% of the images.
+% - some lines to explain why the color type
+% was not used for 3d vectors
+% 12/2/1998 : - rewording to avoid overfull hboxes
+% 19/2/1998 : - minor ``english'' editing (RF)
+% and file sent to author for review (mb)
+% 04/03/1998: - EM fonts removed/ not to be used this issue
+% 04/08/1998: - TUB-specific inputs modified for portability to
+% CTAN archives (mb)
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[nonumber,harvardcite]{ltugboat}
+\usepackage{mflogo}
+
+\usepackage{url}
+\usepackage[dvips]{graphicx}
+
+\newcommand{\AVN}{\meta{avn}}
+\newcommand{\LVN}{\meta{lvn}}
+\newcommand{\APN}{\meta{apn}}
+\newcommand{\LPN}{\meta{lpn}}
+\newcommand{\AFN}{\meta{afn}}
+\newcommand{\LFN}{\meta{lfn}}
+\newcommand{\CN}{\meta{cl}}
+\newcommand{\IN}{\meta{obj}}
+\newcommand{\VL}{\meta{vl}}
+\newcommand{\VSL}{\meta{vsl}}
+\newcommand{\HEXCOL}{\meta{hc}}
+\newcommand{\COL}{\meta{col}}
+\newcommand{\STR}{\meta{str}}
+\newcommand{\PAIR}{\meta{pair}}
+\newcommand{\NUM}{\meta{num}}
+\newcommand{\BOOL}{\meta{bool}}
+
+\newcommand{\tc}{\texttt{,}}
+
+\newenvironment{todo}{\begin{bfseries}}{\end{bfseries}}
+
+%% this command is already defined in ltugboat.cls and is more robust
+%% I think....
+%\newcommand\meta[1]{$\langle$\mbox{\textit{#1}}$\rangle$}
+%%% the following is the ltugboat.cls definition
+%\DeclareRobustCommand\meta[1]{%
+% \ensuremath{\langle}\emph{#1}\ensuremath{\rangle}}
+
+\let\m=\meta % <-- this command is never used.
+
+%%%%%TUGboat production-specific files
+\vol 18, 4. % volume, issue.
+\issueseqno=57 % sequential issue number
+\issdate December 1997. % month, year of publication
+\setcounter{page}{274}
+\NoBlackBoxes
+\PrelimDraftfalse
+
+\widowpenalty=10000
+\clubpenalty=10000
+\renewcommand{\topfraction}{0.9}
+\renewcommand{\bottomfraction}{0.5}
+\renewcommand{\floatpagefraction}{0.8}
+\renewcommand{\textfraction}{0.1}
+\setcounter{bottomnumber}{2}
+\setcounter{totalnumber}{4}
+\renewcommand{\dbltopfraction}{0.9}
+\renewcommand{\dblfloatpagefraction}{0.8}
+\pretolerance=500
+\tolerance=1000
+\hbadness=3000
+\vbadness=3000
+\hyphenpenalty=400
+%%%%%%%END of TUGboat production-specific files
+
+\begin{document}
+
+\sectitle{Graphics Applications}
+
+\title{Creating 3D animations with \MP}
+\author{Denis Roegel}
+\address{CRIN (Centre de Recherche en Informatique de Nancy)\\
+ B\^atiment LORIA\\
+ BP 239\\
+ 54506 Vand\oe uvre-l\`es-Nancy\\
+ FRANCE}
+\netaddress{roegel@loria.fr}
+\personalURL{http://www.loria.fr/~roegel}
+
+
+
+\maketitle
+
+\begin{abstract}
+\MP{} can be used to create animations. We show here an example
+of animation of polyhedra, introducing the \texttt{3d} package.
+\end{abstract}
+
+\section{Introduction}
+
+%%%RF 1998/02/19: N-forms of cite
+\MP{} (\citeN{hobby1992}; see also the description in
+\shortciteN{Goossens:LGC97})
+is a drawing language very similar to \MF,
+but whose output is \PS. \MP{} is especially suited for geometrical
+and technical drawings, where a drawing can naturally be decomposed
+in several parts, related in some logical way.
+%%%RF 1998/02/19: active voice for passive
+Knuth is using \MP{} for the revisions of and additions to
+\emph{The Art Of Computer Programming}~\cite{knuth1997},
+and it is or will be a component of every standard \TeX{} distribution.
+
+Unfortunately, \MP{} is still quite bare and the user is only offered
+%%%RF 1998/02/19: revamped a bit
+the raw power\Dash a little bit like the \TeX{} user who only has
+plain \TeX{} at his/her disposal. The lack of libraries is certainly
+due to the infancy of \MP{} (which came in the public domain at the
+beginning of 1995) and thus to the small number of its users.
+
+In this paper, we present a way to produce animations using \MP.
+The technique is quite general and we illustrate it through the \texttt{3d}
+package.
+
+\section{Animations}
+
+The World Wide Web has accustomed us to various animations,
+especially \texttt{java} animations.
+Common components of web pages are animated GIF images.
+
+Producing animations in \MP{} is actually quite easy. A number of
+$n$ images will be computed and their sequence produces the animation.
+The animation will be similar to a movie, with no interaction. More precisely,
+if \verb|an_image(|$i$\verb|)|
+produces a picture parameterized by $i$,
+it suffices to wrap this macro
+between \verb|beginfig| and \verb|endfig|:
+
+\begin{verbatim}
+def one_image_out(expr i)=
+ beginfig(<figure number>);
+ an_image(i);
+ endfig;
+enddef;
+\end{verbatim}
+
+\noindent and to loop over \verb|one_image_out|:
+
+\begin{verbatim}
+for j:=1 upto 100:one_image_out(j);endfor;
+\end{verbatim}
+
+Assuming that \verb|<figure number>|
+is equal to the parameter of \verb|an_image|,
+the compilation of this program will produce
+a hundred files with extensions \verb|.1|, \verb|.2|, \ldots, \verb|.100|.
+All these files are \PS{} files and all we need to do is to find a way
+to collate them in one piece. How to do this depends on the operating
+system. On UNIX for instance, one can use \texttt{Ghostscript}
+to transform a \PS{} file
+into \texttt{ppm} and then transform each \texttt{ppm} file into
+GIF with \texttt{ppmtogif}. These programs are part of the
+\texttt{NETPBM} package~\cite{netpbm}. Finally, a program such as
+\texttt{gifmerge}~\cite{gifmerge}
+creates an animated GIF file (GIF89A)
+out of the hundred individual simple GIFs.
+However, various details must be taken care of. For instance,
+%%%RF 1998/02/19: reorganised around `grabbed'->`needed'
+only a part of \texttt{Ghostscript}'s output is needed
+and selection can be made with \texttt{pnmcut}.
+%(which is also part of \texttt{NETPBM}).
+
+The whole process of creating an animation out of \MP's outputs can
+be summed up in a shell script, similar to the one
+in figure~\ref{animation-script}. As we will see, this script (including
+the arguments of \texttt{awk} and \texttt{pnmcut}) can be generated
+automatically by \MP{} itself.
+
+%%fig 1
+\begin{figure*}
+\begin{verbatim}
+#! /bin/sh
+
+/bin/rm -f animpoly.log
+for i in `ls animpoly.*| grep 'animpoly.[0-9]'`;do
+echo $i
+echo '=============='
+# shift each picture so that it lies in the page:
+awk < $i '{print} /^%%Page: /{print "172 153 translate\n"}' > $i.ps
+# produce ppm format:
+gs -sDEVICE=ppmraw -sPAPERSIZE=a4 -dNOPAUSE -r36 -sOutputFile=$i.ppm -q -- $i.ps
+/bin/rm -f $i.ps
+# produce gif:
+ppmquant 32 $i.ppm | pnmcut 15 99 141 307 | ppmtogif > `expr $i.ppm : '\(.*\)ppm'`gif
+/bin/rm -f $i.ppm
+done
+/bin/rm -f animpoly.gif
+# merge the gif files:
+gifmerge -10 -l1000 animpoly.*.gif > animpoly.gif
+/bin/rm -f animpoly.*.gif
+\end{verbatim}
+\caption{Script created by \MP{} (with some additional comments)}
+\label{animation-script}
+\end{figure*}
+
+
+\section{Objects in space}
+
+\subsection{Introduction}
+
+The author applied this idea to the animation of objects
+in space. The macros in the \texttt{3d.mp} package\footnote{On CTAN,
+under \texttt{graphics/metapost/macros/3d}. The code is documented
+with \texttt{MFT}~\cite{knuth1989}
+and illustrated with \MP. This paper describes version 1.0 of the macros.}
+provide a basis for the
+representation of three-dimensional objects. The basic components of
+the objects are the points or the vectors. Both are stored as triplets.
+More precisely, we have three
+arrays\footnote{\MP{} has a few simple types such as \texttt{numeric},
+\texttt{boolean}, \texttt{string}, \texttt{path}, \ldots.
+It also has pairs (\texttt{pair}) and triples (\texttt{color}). We might
+have cheated and stored points as colors, but instead, we found it
+interesting to illustrate a construction equivalent
+to \textsc{Pascal}'s records or C's structures. In \MP, instead of
+having a list or an array of structures, we use several lists or arrays,
+so that a record is a cross-section over several arrays.}
+of type \verb|numeric|:
+
+\begin{verbatim}
+numeric vect[]x,vect[]y,vect[]z;
+\end{verbatim}
+
+Vector $i$'s components are \verb|vect[|$i$\verb|]x|, \verb|vect[|$i$\verb|]y|
+and \verb|vect[|$i$\verb|]z|. It is then straightforward to define the usual
+operations on vectors using this convention. For instance,
+vector addition is defined as:
+
+\begin{verbatim}
+def vect_sum(expr k,i,j)=
+ vect[k]x:=vect[i]x+vect[j]x;
+ vect[k]y:=vect[i]y+vect[j]y;
+ vect[k]z:=vect[i]z+vect[j]z;
+enddef;
+\end{verbatim}
+
+Often, we need some scratch vectors or vectors local to a macro.
+A simple vector allocation mechanism solves the problem: we use a stack
+of vectors and we reserve and free vectors only on top of the stack.
+For instance, the allocation of a vector is defined by:
+
+\begin{verbatim}
+def new_vect=incr(last_vect_) enddef;
+\end{verbatim}
+
+\noindent where \verb|last_vect_| is the index of the top of the stack.
+Hence, a vector is manipulated by its index on the stack.
+Writing \verb|v:=new_vect;| lets \verb|v| be the index of the newly allocated
+vector.
+
+Freeing a vector is also easy and is only allowed at the top of the stack:
+
+\begin{verbatim}
+def free_vect(expr i)=
+ if i=last_vect_:
+ last_vect_:=last_vect_-1;
+ else: errmessage("Vector " &
+ decimal i & " can't be freed!");
+ fi;
+enddef;
+\end{verbatim}
+
+How these macros are used is made explicit in the \verb|vect_rotate| macro
+which does a rotation of a vector \verb|v| around a vector \verb|axis|
+by an angle \verb|alpha|. This rotation is illustrated
+in figure~\ref{vector-rotation}.
+$\vec{v}$ is written as the sum of $\vec{h}$ and $\vec{a}$ where
+$\vec{h} \perp \vec{a}$. If $\vec{b}$ is
+$\overrightarrow{axis}/{\|\overrightarrow{axis}\|}$, $\vec{c}$ is computed
+as the vector product of $\vec{b}$ and $\vec{a}$ and $\vec{a}$ is then
+rotated in a simple way resulting in $\vec{f}$.
+
+The vectors declared with \verb|new_vect| are freed in the inverse order.
+The \verb|vect_rotate| macro makes use of a few other macros:
+\verb|vect_mod| computes the modulus of a vector; \verb|vect_dprod(a,b)| is
+the dot product of vectors \texttt{a} and \texttt{b}; \verb|vect_mult(b,a,x)|
+lets vector \texttt{b} equal vector \texttt{a} multiplied by the scalar
+\texttt{x}; \verb|vect_sum| and \verb|vect_diff| compute as their first
+argument the sum or the difference of the two other vectors;
+\verb|vect_prod(c,a,b)| lets vector \texttt{c} equal the vectorial
+product of vectors \texttt{a} and \texttt{b}. These macros are
+described in appendix A.
+
+%% fig2
+\begin{figure*}
+\begin{center}
+\includegraphics{vect-fig.9}\hspace{1cm}\includegraphics{vect-fig.10}
+\end{center}
+\caption{Vector rotation}\label{vector-rotation}
+\end{figure*}
+
+\begin{verbatim}
+vardef vect_rotate(expr v,axis,alpha)=
+ save v_a,v_b,v_c,v_d,v_e,v_f;
+ v_a:=new_vect;v_b:=new_vect;
+ v_c:=new_vect;v_d:=new_vect;
+ v_e:=new_vect;v_f:=new_vect;
+ v_g:=new_vect;v_h:=new_vect;
+ vect_mult(v_b,axis,1/vect_mod(axis));
+ vect_mult(v_h,v_b,vect_dprod(v_b,v));
+ vect_diff(v_a,v,v_h);
+ vect_prod(v_c,v_b,v_a);
+ vect_mult(v_d,v_a,cosd(alpha));
+ vect_mult(v_e,v_c,sind(alpha));
+ vect_sum(v_f,v_d,v_e);
+ vect_sum(v,v_f,v_h);
+ free_vect(v_h);free_vect(v_g);
+ free_vect(v_f);free_vect(v_e);
+ free_vect(v_d);free_vect(v_c);
+ free_vect(v_b);free_vect(v_a);
+enddef;
+\end{verbatim}
+
+The \verb|3d| package defines other macros in order to set the observer,
+%%%RF 1998/02/19: was `to manipulate'
+to compute a reference matrix, etc. Provision is given for
+manipulating objects.
+
+\subsection{Objects and classes}
+
+The \texttt{3d} package understands a notion of \emph{class}.
+A \emph{class} is a parameterized object. For instance, we have the class
+of regular tetrahedra, the class of regular cubes, etc. Our classes
+%%%RF 1998/02/19: `first level of genericity'->... abstraction
+are the lowest level of abstraction and classes can not be composed.
+They can only be \emph{instanciated}. When we need a specific tetrahedron,
+we call a generic function to create a tetrahedron, but with an identifier
+specific to one instance.
+
+A class is a set of vertices in space, together with a way to draw
+faces, and therefore edges.
+The author's focus was to manipulate (and later animate) polyhedra.
+As an example, the \verb|poly.mp| package provides the definition of
+each of the five regular convex polyhedra.
+
+%%%RF 1998/02/19: `is defining'->defines, etc, `both macros'->`each macro'
+Each class consists of two macros: one defines the points,
+the other calls the first macro and defines the faces.
+Each macro has a parameter which is a string identifying
+the particular instance of that class.
+
+\tolerance=4500
+The points of a regular tetrahedron are defined in
+\verb|set_tetrahedron_points|,
+%%%RF 1998/02/19: second half sentence rewritten
+an example of the general macro name \verb|set_|\meta{class}\verb|_points|.
+Five points are defined, four of
+them with \verb|set_obj_point|, a macro which defines points \emph{local}
+to an object. The first four points are the vertices and the fifth
+is the center of the tetrahedron. \verb|set_obj_point|'s first parameter
+is the point number and the other three are the cartesian coordinates.
+The first three points are in a plane and the fourth is obtained with
+the \verb|new_face_point| macro, which folds a face
+%%%RF 1998/02/19: tagged reference sentence on to end in parens
+(see the description in appendix A for more details).
+The \verb|new_face_point| macro
+is used with the angle \verb|an| which is computed in advance.
+Once the four points are set, the object is normalized, which means
+that it is centered with respect to the list of vertices given
+as parameter (here \verb|1,2,3,4|) and the last vertex is put on a sphere
+of radius 1, centered on the origin. Therefore, point 5 is the center
+of the tetrahedron, and the tetrahedron is set symmetrically
+with respect to the origin.
+
+\tolerance=1000
+%%%RF 1998/02/19: was `are hence inscriptible'
+All five convex regular polyhedra are defined in this way and may
+therefore be inscribed in a sphere of radius 1.
+
+\begin{verbatim}
+def set_tetrahedron_points(expr inst)=
+ set_obj_point(1,0,0,0);
+ set_obj_point(2,1,0,0);
+ set_obj_point(3,cosd(60),sind(60),0);
+ sinan=1/sqrt(3);
+ cosan=sqrt(1-sinan**2);
+ an=180-2*angle((cosan,sinan));
+ new_face_point(4,1,2,3,an);
+ normalize_obj(inst)(1,2,3,4);
+ set_obj_point(5,0,0,0);
+enddef;
+\end{verbatim}
+
+The second macro, \verb|def_tetrahedron| defines the number of points and
+faces of the instance, calls the previous macro and defines the faces
+with the macro \verb|set_obj_face|.
+The first argument of that macro is a \emph{local}
+face number, the second is a list of vertices such that the list goes clockwise
+when the face is visible. The last argument is the color of the face in RGB.
+
+\begin{verbatim}
+vardef def_tetrahedron(expr inst)=
+ new_obj_points(inst,5);
+ new_obj_faces(inst,4);
+ set_tetrahedron_points(inst);
+ set_obj_face(1,"1,2,4","b4fefe");
+ set_obj_face(2,"2,3,4","b49bc0");
+ set_obj_face(3,"1,4,3","b4c8fe");
+ set_obj_face(4,"1,3,2","b4fe40");
+enddef;
+\end{verbatim}
+
+The result of the drawing is:
+
+\begin{center}
+\includegraphics{tetra.ps}
+\end{center}
+
+A more complex example is the icosahedron which is defined below.
+
+\begin{verbatim}
+def set_icosahedron_points(expr inst)=
+ set_obj_point(1,0,0,0);
+ set_obj_point(2,1,0,0);
+ set_obj_point(3,cosd(60),sind(60),0);
+ cosan=1-8/3*cosd(36)*cosd(36);
+ sinan=sqrt(1-cosan*cosan);
+ an=180-angle((cosan,sinan));
+ new_face_point(4,1,2,3,an);
+ new_face_point(5,2,3,1,an);
+ new_face_point(6,3,1,2,an);
+ new_face_point(7,2,4,3,an);
+ new_face_point(8,3,5,1,an);
+ new_face_point(9,1,6,2,an);
+ new_face_point(10,3,4,7,an);
+ new_face_point(11,3,7,5,an);
+ new_face_point(12,1,8,6,an);
+ % 1 and 10 are opposite vertices
+ normalize_obj(inst)(1,10);
+ % center of icosahedron
+ set_obj_point(13,0,0,0);
+enddef;
+\end{verbatim}
+
+\begin{verbatim}
+vardef def_icosahedron(expr inst)=
+ save cosan,sinan,an;
+ new_obj_points(inst,13);
+ new_obj_faces(inst,20);
+ set_icosahedron_points(inst);
+ set_obj_face(1,"3,2,1","b40000");
+ set_obj_face(2,"2,3,4","ff0fa1");
+ set_obj_face(3,"3,7,4","b49b49");
+ set_obj_face(4,"3,5,7","b49bc0");
+ set_obj_face(5,"3,1,5","b4c8fe");
+ set_obj_face(6,"1,8,5","b4fefe");
+ set_obj_face(7,"1,6,8","b4fe40");
+ set_obj_face(8,"1,2,6","45d040");
+ set_obj_face(9,"2,9,6","45a114");
+ set_obj_face(10,"2,4,9","45a1d4");
+ set_obj_face(11,"9,4,10","4569d4");
+ set_obj_face(12,"4,7,10","112da1");
+ set_obj_face(13,"7,5,11","b4fefe");
+ set_obj_face(14,"5,8,11","b49bc0");
+ set_obj_face(15,"8,6,12","45a114");
+ set_obj_face(16,"6,9,12","b49b49");
+ set_obj_face(17,"8,12,11","b40000");
+ set_obj_face(18,"7,11,10","45a1d4");
+ set_obj_face(19,"12,10,11","b4c8fe");
+ set_obj_face(20,"9,10,12","ff0fa1");
+enddef;
+\end{verbatim}
+
+Since all points of the objects are stored in a unique global array,
+they are internally
+accessed by the local numbers and an offset defined by the
+macro \verb|new_obj_points|.
+The icosahedron example shows a systematic use of the
+\verb|new_face_point| macro to compute a point on an adjacent face.
+Displaying such an icosahedron results in the figure~\ref{icosahedron}.
+%% fig3
+\begin{figure}[h]
+\begin{center}
+\includegraphics{icosa.ps}
+\end{center}
+\caption{An icosahedron}\label{icosahedron}
+\end{figure}
+
+The other three regular convex polyhedra are:
+\begin{center}
+\includegraphics{cube.ps}
+\end{center}
+
+\begin{center}
+\includegraphics{octa.ps}\hfill\includegraphics{dodeca.ps}
+\end{center}
+
+The dodecahedron code is a bit special, since the vertices are built
+using ten additional points corresponding to face centers. These points
+are defined as an array of variables \verb|fc1| through \verb|fc10|
+with \verb|new_points(fc)(10)|.
+\verb|free_points(fc)(10)| frees them when they are no longer
+necessary. An excerpt of the dodecahedron code is:
+
+\begin{verbatim}
+def set_dodecahedron_points(expr inst)=
+ new_points(fc)(10);% face centers
+ set_point(fc1,0,0,0);
+ set_obj_point(1,1,0,0);
+ set_obj_point(2,cosd(72),sind(72),0);
+ rotate_in_plane(3,fc1,1,2);
+ ...
+ free_points(fc)(10);
+enddef;
+\end{verbatim}
+
+
+Finally, wire drawings can be obtained by setting the boolean
+\verb|filled_faces| to false:
+
+\begin{center}
+\includegraphics{icosa-w.ps}
+\end{center}
+
+\subsection{Animating objects}
+
+The animation of one or several objects involves the object(s) and an observer.
+The animation is a set of images and from an image to the next one,
+the observer as well as the objects can move. For instance
+the macro \verb|one_image| in \verb|3d.mp| is:
+
+\begin{verbatim}
+def one_image(expr name,i,a,rd,ang)=
+ beginfig(i);
+ set_point(Obs,
+ -rd*cosd(a*ang),-rd*sind(a*ang),1);
+ Obs_phi:=90;Obs_dist:=2;
+ % fix point 1 of object |name|
+ point_of_view_obj(name,1,Obs_phi);
+ draw_obj(name);
+ rotate_obj_pv(name,1,vect_I,ang);
+ % show the rotation point
+ draw_point(name,1);
+ draw_axes(red,green,blue);
+ endfig;
+enddef;
+\end{verbatim}
+
+The parameters of this macro are a name of an object (\verb|name|),
+an image index (\verb|i|), and three values defining the position
+of the observer.
+The observer (\verb|Obs| is a global point and set with \verb|set_point|,
+not with \verb|set_obj_point|)
+follows a circle of radius \verb|rd|.
+%%%RF 1998/02/19: reversed `usually is'
+The parameter \verb|a|, which is usually a function of \verb|i|,
+determines the number of rotation steps
+of the observer, each step being a rotation of angle \verb|ang|.
+The distance between the observer and the
+projection plane is $2$ (see figure~\ref{proj-screen}).
+
+%% fig4
+\begin{figure*}
+\begin{center}
+ \includegraphics{vect-fig.8}
+\end{center}
+\caption{Projection on the screen}\label{proj-screen}
+\end{figure*}
+
+%% fig5
+\begin{figure*}
+\begin{center}
+ \includegraphics{vect-fig.16}
+\end{center}
+\caption{Orientation of the observer}\label{obs-orientation}
+\end{figure*}
+
+
+The orientation of the observer is defined by three angles
+(see figure~\ref{obs-orientation}). The \verb|Obs_phi| angle
+is given and the two others are computed with a call to
+\verb|point_of_view_obj(name,1,Obs_phi)| which constrains the observer
+to look towards point 1 of object \verb|name|. Therefore, this
+point will seem fixed on the animation and \verb|draw_point(name,1)|
+draws it later so that this feature can be observed.
+There is nothing special about that point, except that it
+remains fix when the object is rotated. The object is drawn
+with \verb|draw_obj(name)| and
+%%%RF 1998/02/19: `does rotate'->rotates -- these arguments aren't
+%%% described here, which seems wrong, but i don't think
+%%% it's easy to do better....
+\verb|rotate_obj_pv| rotates the object \verb|name|
+by \verb|ang| degrees around an axis going through point 1
+and directed by vector \verb|vect_I| ($\vec{\imath}$).
+The reference vectors ($\vec\imath$,
+$\vec\jmath$ and $\vec k$) are drawn in red, green and blue with
+\verb|draw_axes|.
+
+Finally, a complete animation of an icosahedron is obtained
+with
+
+\begin{verbatim}
+animate_object("icosahedron",1,100,100);
+\end{verbatim}
+
+%%%RF 1998/02/19: `and this'->`which'
+\noindent which generates files \verb|anim.101|,
+%%%RF 1998/02/19: `if ... is'->`from ...'
+\ldots, \verb|anim.200| from the main file \verb|anim.mp|.
+The first parameter of \verb|animate_object| is the name of the object
+to animate, the second and third parameters are minimal and maximal
+values of the index loop and the fourth parameter is an offset added
+to the index loop in order to get the file extension, which must lie
+in the interval $0..4096$.
+
+After each image is drawn, the values of the current bounding box
+are used to compute the bounding box of the sequence of images.
+The internal values \verb|xmin_|, \verb|ymin_|, \verb|xmax_|
+and \verb|ymax_| hold the minimal and maximal values of the coordinates
+of the past images' corners.
+They are updated just before each image is shipped out.
+
+\subsection{Putting the pieces together}
+
+Once all the views have been computed, they can be used separately
+(see for instance the five views of figure~\ref{anim-five-views})
+or more interestingly, they can be merged.
+This task is made almost straightforward by \MP{} itself.
+Indeed, every time \verb|animate_object| is used, a shell script
+named \verb|create_animation.sh|
+is generated, as a side-effect of a call to
+\verb|show_animation_bbox|. The script is
+similar to that shown in figure~\ref{animation-script}.
+This script uses the values
+computed for the global bounding box of the sequence of images,
+for these values are necessary in order to extract the right parts
+of the images and get correct alignments; the parts are extracted
+with \texttt{pnmcut}.\footnote{One might think of using
+\texttt{Ghostscript} for generating an excerpt of an image,
+but if \texttt{Ghostscript} is used to generate the bounding box
+of an image, it will in general not be possible to have a good alignment
+between all images. The sizes of the excerpts are only known when all images
+have been produced.}
+If you have the programs
+used in this script (\texttt{Ghostscript}, etc.), you can just run
+it with \verb|sh create_animation.sh| on UNIX. You may need
+to adapt it to your needs, and for that purpose, you can modify the macro
+\verb|write_script| in \verb|3d.mp|.
+
+Some examples are included in the \verb|3d| distribution, and they
+can be viewed for instance with \texttt{netscape} or
+special programs such as \verb|xanim|.
+
+%% fig6
+\begin{figure*}
+\includegraphics[scale=0.5]{anim.1}\hfill
+\includegraphics[scale=0.5]{anim.2}\hfill
+\includegraphics[scale=0.5]{anim.3}\hfill
+\includegraphics[scale=0.5]{anim.4}\hfill
+\includegraphics[scale=0.5]{anim.5}
+
+\caption{Five views of an animation}\label{anim-five-views}
+\end{figure*}
+
+\section{Future}
+
+It is quite easy to improve and extend the \verb|3d| macros but the
+author decided to go no further for the moment. Other objects can
+be implemented easily and new algorithms can be added. For instance
+in order to take light sources or shadows into account, one can compute
+the angles under which a face gets its light, and the angle under which
+this very face is seen, in order to decide how much darker or lighter
+it must be rendered. Another problem is to represent
+overlapping objects correctly. In the current implementation, each
+object is drawn
+independently from the other objects, so that the overlapping may be wrong.
+One solution is to sort all the faces according to their distance
+to the observer and, if two faces can not be ordered, to split them.
+Then, the faces can be drawn starting with the most distant, and
+ending with the closest one.
+Appendix B explains the internal representation of the objects and
+shows that this algorithm can be implemented without much surgery to
+the present code.
+
+\section{Acknowledgments}
+
+Thanks to John Hobby who always answers all my queries on the \MF{} mailing
+list. Thanks to Alain Filbois who helped me with the shell script
+syntax, to Thomas Lambolais and Thomas Genet who gave some feedback
+on this work, and to Dominique Larchey who pointed out a shortcoming
+in the conclusion. Thanks to Denis Barbier who
+was one of the first users of these
+macros and contributed the animated crayons in the distribution. Thanks to
+Bogus\l aw Jackowski who made valuable comments on some peculiarities of
+the code.
+And finally, special thanks to Ulrik Vieth who not only
+pushed me to polish my code and this paper more than I had first intended,
+but also made it possible to use \MP{} under \texttt{web2c}.
+
+\bibliography{paper}
+
+\appendix
+
+\section{Appendix A\\
+Summary of the \texttt{3d} package}
+
+\subsection{Types}
+
+The commands in the \texttt{3d} package take parameters
+of several different types. The types are described here.
+
+\begin{itemize}
+\item An \AVN{} (\emph{Absolute Vector Number}) is the internal
+number identifying a vector in the \verb|vect| array (an integer).
+\item An \APN{} (\emph{Absolute Point Number}) refers to a vector
+in the same way as an \AVN{} (an integer).
+\item A \LPN{} (\emph{Local Point Number}) is a number identifying a
+point \emph{within} an object (an integer). Two \LPN{}s with the same value
+can correspond to different points in different objects.
+\item An \AFN{} (\emph{Absolute Face Number}) is the internal
+number identifying a face.
+\item A \LFN{} (\emph{Local Face Number}) is a number identifying a face
+\emph{within} an object (an integer). As for points, two \LFN{}s with
+the same value
+can correspond to different faces in different objects.
+\item A \CN{} (\emph{Class}) is a string representing a class,
+for instance \verb|"tetrahedron"|. It may only contain
+letters and underscores.
+\item An \IN{} (\emph{Object}) is a string representing an object, that is
+an instance of a class. Such a string may only contain
+letters and underscores.
+\item A \VL{} (\emph{Vertex List}) is a list
+of integers, where each integer identifies a vertex. For instance, \verb|1,7|
+is the list of vertices 1 and 7.
+\item A \VSL{} (\emph{Vertex String List}) is a string corresponding to a list
+of integers, where each integer identifies a vertex. For instance,
+\verb|"1,2,6,5"| is the list of vertices 1, 2, 6 and 5.
+\item \HEXCOL{} (\emph{Hex Color}) is a string representing a color with
+the three RGB components in hexadecimal and in the range
+$0..255$. For instance, \verb|"b4fe40"|.
+\item \COL{} (\emph{Color}) is a standard \MP{} color
+(a triplet of RGB components in the range $0..1$),
+such as \verb|red|.
+\item \STR{} (\emph{String}) is a string.
+\item \PAIR{} (\emph{Pair}) is a pair of numerics.
+\item \NUM{} (\emph{Numeric}) is a number.
+\item \BOOL{} (\emph{Boolean}) is a boolean.
+\end{itemize}
+
+\subsection{Low level vector commands}
+
+The low level vector commands define the classical operations in vector
+algebra.
+
+\begin{itemize}
+%\item \verb|vect_def(|\AVN\tc$x$\tc$y$\tc$z$\verb|)|; defines vector \AVN{}
+\item \verb|vect_def(|\AVN\tc$x$\tc$y$\tc$z$\verb|)|: defines vector \AVN{}
+as $(x,y,z)$;
+
+%\item \verb|set_point|: synonym of \verb|vect_def|; a point is stored in the
+\item \verb|set_point|; synonym of \verb|vect_def|: a point is stored in the
+same array as vectors.
+
+%\item \verb|set_obj_point(|\LPN\tc$x$\tc$y$\tc$z$\verb|)|;
+\item \verb|set_obj_point(|\LPN\tc$x$\tc$y$\tc$z$\verb|)|:
+this defines the point \LPN{} as $(x,y,z)$;
+
+%\item \verb|vect_def_vect(|\AVN$_1$\tc\AVN$_2$\verb|)|;
+\item \verb|vect_def_vect(|\AVN$_1$\tc\AVN$_2$\verb|)|:
+vector \AVN$_1$ becomes equal to vector \AVN$_2$;
+
+\item \verb|vect_sum(|\AVN$_1$\tc\AVN$_2$\tc\AVN$_3$\verb|)|:
+the vector \AVN$_1$ becomes the sum of vectors \AVN$_2$ and \AVN$_3$.
+
+\item \verb|vect_translate(|\AVN$_1$\tc\AVN$_2$\verb|)|:
+add vector \AVN$_2$
+to vector \AVN$_1$; vector \AVN$_2$ remains unchanged.
+
+\item \verb|vect_diff(|\AVN$_1$\tc\AVN$_2$\tc\AVN$_3$\verb|)|:
+the vector \AVN$_1$
+becomes the difference between vectors \AVN$_2$ and \AVN$_3$.
+
+\item \verb|vect_dprod(|\AVN$_1$\tc\AVN$_2$\verb|)| $\rightarrow $ \NUM{}:
+returns the dot product of vectors \AVN$_1$ and \AVN$_2$.
+
+\item \verb|vect_mod(|\AVN\verb|)| $\rightarrow $ \NUM{}: returns the
+modulus of vector \AVN.
+
+\item \verb|vect_prod(|\AVN$_1$\tc\AVN$_2$\tc\AVN$_3$\verb|)|:
+the vector \AVN$_1$
+becomes the vector product of vectors \AVN$_2$ and \AVN$_3$.
+
+\tolerance=1000
+\item \verb|vect_mult(|\AVN$_1$\tc\AVN$_2$\tc\NUM\verb|)|: \AVN$_1$
+becomes vector \AVN$_2$ scaled by \NUM.
+
+\item \verb|mid_point(|\AVN$_1$\tc\AVN$_2$\tc\AVN$_3$\verb|)|:
+vector (or point) \AVN$_1$ becomes the mid-point of vectors (or of the
+line joining the points)
+\AVN$_2$ and \AVN$_3$.
+
+\item \verb|vect_rotate(|\AVN$_1$\tc\AVN$_2$\tc$a$\verb|)|: vector \AVN$_1$ is
+rotated around vector \AVN$_2$ by the angle $a$.
+\end{itemize}
+
+\tolerance=1000
+\subsection{Operations on objects}
+
+Several operations apply globally on objects:
+
+\begin{itemize}
+\item \verb|assign_obj(|\IN\tc\CN\verb|)|:
+ create \IN{} as an instance of class \CN.
+\item \verb|reset_obj(|\IN\verb|)|: put \IN{} back where it
+ was just after it was initialized.
+\item \verb|put_obj(|\IN\tc\AVN\tc$s$\tc$\psi$\tc$\theta$\tc$\phi$\verb|)|:
+ object \IN{} is scaled by $s$, shifted by vector \AVN{} and
+ oriented with the angles $\psi$, $\theta$, $\phi$,
+ as for the observer orientation (figure~\ref{obs-orientation}).
+\item \verb|rotate_obj_pv(|\IN\tc\LPN\tc\AVN\tc$a$\verb|)|:
+ object \IN{} is rotated
+ around an axis going through local point \LPN{}
+ and directed by vector \AVN; the rotation is by $a$ degrees.
+\item \verb|rotate_obj_abs_pv(|\IN\tc\APN\tc\AVN\tc$a$\verb|)|:\break
+ the object \IN{} is rotated around an axis going through absolute
+ point \APN{} and directed by vector \AVN; the rotation is by $a$ degrees.
+\item \verb|rotate_obj_pp(|\IN\tc\LPN$_1$\tc\LPN$_2$\tc$a$\verb|)|:
+ \IN{} is rotated around an axis going through local points
+ \LPN$_1$ and \LPN$_2$; the rotation is by $a$ degrees.
+\item \verb|translate_obj(|\IN\tc\AVN\verb|)|: object \IN{} is translated
+ by vector \AVN.
+\item \verb|scale_obj(|\IN\tc$v$\verb|)|: object~\IN{}~is~scaled~by~$v$.
+\end{itemize}
+
+\subsection{Building new points in space}
+
+Three macros are especially useful for the definition of regular polyhedra:
+
+\begin{itemize}
+\item \verb|rotate_in_plane(|$k$\tc$o$\tc$i$\tc$j$\verb|)|:
+get point $k$ from point $j$ by rotation
+around point $o$ by an angle $\alpha$ equal to the angle from $i$ to $j$;
+$i$, $j$ and $k$ are of type \LPN, whereas $o$ is of type \APN.
+
+\begin{center}
+ \includegraphics{vect-fig.11}
+\end{center}
+
+\item \verb|new_face_point(|$c$\tc$o$\tc$i$\tc$j$\tc$\alpha$\verb|)|:
+the middle $m$ of points $i$ and $j$ is such that
+$\widehat{(\overrightarrow{om},\overrightarrow{mc})}=\alpha$
+and $\overrightarrow{mc}$ is $\overrightarrow{om}$ rotated around
+$\overrightarrow{ji}$. $c$, $o$, $i$ and $j$ are of type \LPN.
+
+\begin{center}
+ \includegraphics{vect-fig.7}
+\end{center}
+
+\item \verb|new_abs_face_point(|$c$\tc$o$\tc$i$\tc$j$\tc$\alpha$\verb|)|:
+similar to the previous definition, but $c$ and $o$ are of type \APN.
+
+\end{itemize}
+
+\subsection{Drawing points, axes, objects}
+
+\begin{itemize}
+\item \verb|draw_point(|\IN\tc\LPN\verb|)|: draw point \LPN{} in
+ object \IN.
+\item \verb|draw_axes(|\COL$_1$\tc\COL$_2$\tc\COL$_3$\verb|)|:
+ draw vectors $\vec\imath$, $\vec\jmath$ and $\vec{k}$ in colors
+ \COL$_1$, \COL$_2$ and \COL$_3$.
+\item \verb|draw_obj(|\IN\verb|)|: draw object \IN.
+\end{itemize}
+
+\subsection{Setting faces}
+
+\begin{itemize}
+\item \verb|set_face(|\AFN\tc\VSL\tc\HEXCOL\verb|)|:
+set absolute face \AFN{} as
+delimited by the vertex list \VSL{} (local point numbers) and colored by
+color \HEXCOL.
+\item \verb|set_obj_face(|\LFN\tc\VSL\tc\HEXCOL\verb|)|:
+set local face \LFN{} as
+delimited by the vertex list \VSL{} (local point numbers) and colored by
+color \HEXCOL.
+
+\end{itemize}
+
+\break
+
+\subsection{View points, distance}
+
+\begin{itemize}
+\item \verb|compute_reference(|$\psi$\tc$\theta$\tc$\phi$\verb|)|: defines
+the orientation of the observer by the three angles $\psi$,
+$\theta$ and $\phi$. See figure~\ref{obs-orientation}.
+
+\item \verb|point_of_view_obj(|\IN\tc\LPN\tc$\phi$\verb|)|: the orientation
+of the observer is defined as looking local point \LPN{} of object \IN,
+with an angle of $\phi$;
+\item \verb|point_of_view_abs(|\APN\tc$\phi$\verb|)|: the observer's
+orientation is defined as looking absolute point \APN{},
+with an angle of $\phi$;
+\item \verb|obs_distance(|$v$\verb|)(|\IN\tc\LPN\verb|)|: let $v$ equal
+the distance between the observer and local point \LPN{} in object \IN{}.
+\end{itemize}
+
+\subsection{Vector and point allocation}
+
+\begin{itemize}
+\item \verb|new_vect|$\rightarrow $ \AVN{}: return a new vector;
+\item \verb|new_point|: synonym of \verb|new_vect|;
+\item \verb|new_points(|$v$\verb|)(|$n$\verb|)|: defines the absolute points
+ $v_1, \ldots, v_n$, using \verb|new_point|;
+\item \verb|free_vect(|\AVN\verb|)|: free vector \AVN;
+\item \verb|free_point(|\APN\verb|)|: free point \APN;
+\item \verb|free_points(|$v$\verb|)(|$n$\verb|)|: frees the absolute points
+ $v_1, \ldots, v_n$, using \verb|free_point|.
+\end{itemize}
+
+\subsection{Debugging}
+
+\begin{itemize}
+\item \verb|show_vect(|\STR\tc\AVN\verb|)|:
+shows vector \AVN, with string \STR.
+\item \verb|show_point|: synonym of \verb|show_vect|
+\item \verb|show_pair(|\STR\tc\PAIR\verb|)|: this shows a numeric pair,
+ with string \STR.
+\end{itemize}
+
+\subsection{Normalization}
+
+\begin{itemize}
+\item \verb|normalize_obj(|\IN\tc\VL\verb|)|: normalize object \IN{}
+with respect to the list of vertices \VL.
+\end{itemize}
+
+\subsection{Parameters}
+
+\begin{itemize}
+\item \verb|Obs_dist| $\rightarrow$ \NUM: distance between the observer
+ and the projection plane.
+\item \verb|h_field| $\rightarrow$ \NUM: horizontal field of view
+ (default: 100 degrees)
+\item \verb|v_field| $\rightarrow$ \NUM: vertical field of view
+ (default: 70 degrees)
+\item \verb|Obs_phi| $\rightarrow$ \NUM: angle $\phi$ for the orientation
+ of the observer;
+\item \verb|Obs_theta| $\rightarrow$ \NUM: angle $\theta$ for the orientation
+ of the observer;
+\item \verb|Obs_psi| $\rightarrow$ \NUM: angle $\psi$ for the orientation
+ of the observer;
+\item \verb|drawing_scale| $\rightarrow$ \NUM: scale factor applied for
+ drawing;
+\item \verb|filled_faces| $\rightarrow$ \BOOL: if \texttt{true}, the faces
+ are drawn filled; if \texttt{false}, only the edges are drawn,
+ and hidden edges are drawn dashed;
+\item \verb|draw_contours| $\rightarrow$ \BOOL: if \texttt{true}, the contours
+ of the faces are drawn, and the lines have the thickness
+ \verb|contour_width|; if \texttt{false}, the contours are not drawn;
+\item \verb|contour_width| $\rightarrow$ \NUM: dimension used for drawing
+ contours of faces (default: 1pt).
+\end{itemize}
+
+\subsection{Constants}
+
+These values represent constant objects such
+as reference vectors, and should not be changed.
+
+\begin{itemize}
+\item \verb|vect_null| $\rightarrow$ \AVN: internal index for $\vec0$.
+\item \verb|vect_I| $\rightarrow$ \AVN: internal index for $\vec\imath$.
+\item \verb|vect_J| $\rightarrow$ \AVN: internal index for $\vec\jmath$.
+\item \verb|vect_K| $\rightarrow$ \AVN: internal index for $\vec k$.
+\item \verb|point_null| $\rightarrow$ \APN: internal index for $\vec0$.
+\item \verb|Obs| $\rightarrow$ \APN: observer's internal point number.
+\end{itemize}
+
+\subsection{Defining new object points and faces}
+
+\begin{itemize}
+\item \verb|new_obj_points(|\IN\tc\NUM\verb|)|:
+ defines points $1$ to \NUM{} in object \IN; must be used before setting
+ the points;
+\item \verb|new_obj_faces(|\IN\tc\NUM\verb|)|:
+ defines \NUM{} faces in object \IN; must be used before setting
+ the faces;
+\end{itemize}
+
+\subsection{Offsets}
+
+\begin{itemize}
+\item \verb|pnt(|\LPN\verb|)| $\rightarrow$ \APN: returns the absolute point
+number for a given local point index.
+\item \verb|face(|\LFN\verb|)| $\rightarrow$ \AFN: returns the absolute face
+number for a given local face index.
+\end{itemize}
+
+\subsection{Standard classes}
+
+Five standard classes are defined in \texttt{poly.mp}:
+they define the five regular convex polyhedra. For each class \meta{class},
+there are two macros:
+
+\begin{itemize}
+
+\item \verb|set_|\meta{class}\verb|_points|
+ (e.g. \verb|set_cube_points|)
+
+\item \verb|def_|\meta{class} (e.g. \verb|def_cube|)
+
+\end{itemize}
+
+Each of these macros is defined with a parameter which is the instance
+name.
+
+\subsection{Standard animations}
+
+The \texttt{3d} package provides a few standard animations using
+the convex polyhedra. In each of these animations, the observer
+follows a circular path pictured in figure~\ref{observer-motion}.
+Each standard animation is divided into two macros. The first,
+such as \verb|animate_object|, defines the class(es) that are used
+and sets the objects. The second, such as \verb|one_image|, sets
+the observer, draws the object(s) and moves the object(s) and the
+observer. The file \verb|animpoly.mp| gives examples of the use
+of the standard animations.
+
+\iffalse
+\begin{itemize}
+\item \verb|one_image(name,i,a)|
+\item \verb|one_image_two_objects(name_a,name_b,i,a)|
+\item \verb|one_image_three_objects(name_a,name_b,name_c,i,a)|
+\item \verb|one_image_two_identical_objects(name_a,name_b,i,a)|
+\item \verb|animate_object(name,imin,imax,index)|
+\item \verb|animate_two_objects(name_a,name_b,imin,imax,index)|
+\item \verb|animate_three_objects(name_a,name_b,name_c,imin,imax,index)|
+\item \verb|animate_two_identical_objects(name,imin,imax,index)|
+\end{itemize}
+\fi
+
+%% fig7
+\begin{figure*}
+\begin{center}
+ \includegraphics{vect-fig.17}
+\end{center}
+\caption{Motion of the observer}\label{observer-motion}
+\end{figure*}
+
+\section{Appendix B\\
+Coding an object}
+
+In order to extend the \texttt{3d} package, it is necessary to
+understand how the objects are coded. We give here an overview of
+this coding, but the reader is advised to peek in the code to get
+a better understanding on how all the functions interact.
+
+First, an object has a name, for instance \verb|"box"|.
+The macro \verb|box_class| (which can be called with \verb|obj_class_("box")|)
+is the string corresponding to the class of
+\verb|"box"|, for instance \verb|"cube"|.
+The variable \verb|cube_point_offsetbox|, of type \texttt{numeric},
+and obtained with \verb|obj_point_offset_("box")|,
+is equal to the absolute index of the last
+point of the previous object. A cube is defined with $8+1$ points. Assuming
+it was defined after an icosahedron ($12+1$ points) named
+\verb|"ico"|, \verb|cube_point_offsetbox| will be a \verb|numeric|
+equal to $13$. \verb|cube_pointsbox|
+(obtained with \verb|obj_points_("box")|)
+is a macro equal to $9$.
+%(\verb|current_point_offset_| is equal to \verb|cube_point_offsetbox|.)
+The variable \verb|cube_face_offsetbox|,
+similar to \verb|cube_point_offsetbox|,
+obtained with a call to \verb|obj_face_offset_("box")|,
+equals $20$.
+The macro \verb|cube_facesbox|
+(obtained by \verb|obj_faces_("box")|)
+is equal to $6$.
+%(\verb|current_face_offset_| is equal to \verb|cube_face_offsetbox|.)
+
+The \verb|obj_name| macro is extended each time a new object is defined.
+To an absolute face number, it associates an object name. Hence, it is possible
+to go through all faces. \verb|last_point_offset_| and
+\verb|last_face_offset_| are the absolute numbers of the last points and faces
+defined up to now.
+
+\begin{verbatim}
+def obj_name(expr i)=
+ if i<1: elseif i<=20:"ico"
+ elseif i<=26:"box"
+ fi;
+enddef;
+\end{verbatim}
+
+\verb|pnt(i)| gives the absolute vector corresponding to local point $i$.
+\verb|ipnt_(i)| is the absolute point number, that is $i$ plus the number
+of points defined beforehand in other objects.
+\verb|points_[j]| is the absolute vector corresponding to absolute object
+point $j$. Similarly, \verb|face(i)|
+is the absolute face corresponding to local face $i$.
+
+The list of vertices of absolute face number $i$ is \verb|face_points_[i]|.
+The color of absolute face number $i$ is \verb|face_color_[i]|.
+
+
+When the macros \verb|pnt| or \verb|face| are to be used, the calls
+\verb|define_current_point_offset_("box")| and
+\verb|define_current_face_offset_("box")| must be issued.
+
+
+\makesignature
+
+\end{document}
+
diff --git a/Master/texmf-dist/doc/metapost/mp3d/tugboat-geometry-space.pdf b/Master/texmf-dist/doc/metapost/mp3d/tugboat-geometry-space.pdf
new file mode 100644
index 00000000000..bf7e2d0fff6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mp3d/tugboat-geometry-space.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/mpattern/README b/Master/texmf-dist/doc/metapost/mpattern/README
new file mode 100644
index 00000000000..5f6441c018d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mpattern/README
@@ -0,0 +1,129 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This file is part of the MPATTERN package
+%
+% Author: Piotr Bolek
+% wersja: 0.5 (Jun 25, 2001)
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Description
+===========
+
+Package MPATTERN gives ability to define and use patterns in
+MetaPost. It uses Pattern Color Space available in PostScript Level 2.
+
+Package contains:
+- mpattern.mp: MetaPost macros for defining and using patterns.
+- README: short description in English.
+- README.PL: short description in Polish.
+- test.mp, test.tex, test.ps: usage examples.
+
+Using package
+=============
+
+Include the file mpattern.mp with the input command at the beginning
+of the source file and process the source file with the standard mpost
+program.
+
+User Interface
+==============
+
+Defining pattern
+----------------
+
+Patterns are defined using the following construct:
+
+beginpattern(<name_of_pattern>);
+...
+endpattern;
+
+Parameter <name_of_pattern> is the name by which the pattern is
+identified. This name can contain letters and underscore characters
+"_" but not digits. This name should NOT be given in quotes.
+
+One or more of the following macros can be invoked in any place
+inside pattern definition (between beginpattern and endpattern):
+- patternbbox(<pair>,<pair>)
+- patternbbox((<numeric>,<numeric>,<numeric>,<numeric>)
+ Explicit coordinates of bounding box of pattern cell
+
+- patternxstep(<numeric>)
+- patternystep(<numeric>)
+- patternstep(<numeric>,<numeric>)
+- patternstep(<pair>)
+ Pattern spacing
+
+- patterntransform(<transform>)
+ Transformation of pattern shape
+
+- patterncolor(0<= <numeric> <= 1)
+ Explicit color replaced later by pattern
+
+Each pattern is temporarily written as picture with big number
+(default is 999) but when user will use this number for his own
+picture then for temporal storing of next patterns the greatest free
+number less then 999 will be used.
+
+Using patterns
+--------------
+
+Already defined pattern can be used for filling objects with
+two argument withpattern macro. It is used as follows:
+
+<path> withpattern <name_of_pattern>;
+
+where <path> is any valid expression defining closed path and
+<name_of_pattern> is the name given in definition of the pattern.
+
+Example
+-------
+
+Here is code to draw two circles filled with different checker
+patterns.
+
+input mpattern;
+
+beginpattern(checker);
+ d:=4mm;
+ fill unitsquare scaled d;
+ fill unitsquare scaled d shifted (d,d);
+ patternbbox(0,0,2d,2d);
+endpattern;
+
+beginpattern(rotated_checker);
+ fill unitsquare scaled 4mm rotated 45 withcolor .7white;
+endpattern;
+
+beginfig(11);
+ path p;
+ z1=(1cm,1cm);
+ p=fullcircle scaled 3cm;
+ fill p withpattern checker;
+ unfill p shifted z1;
+ fill p shifted z1 withpattern rotated_checker;
+endfig;
+
+Distribution of the package
+===========================
+
+The package MPATTERN belongs to the public domain. You can use any
+actuall version of GPL Licence if you want to modify or redistribute
+this package.
+
+Problems
+========
+
+06-2001: Filling text with patterns can make problems. The current
+ solution is unstable.
+
+Changes
+=======
+
+06-2001: By the inspiration by the Piotr Strzelczyk's tutorial at the
+ BachoTeX'2001 conference the necesity of Perl postprocessing
+ is eliminated. The substitution of colors to patterns is now
+ performed with help of dictionaries at the PostScript level.
+
+Contact with author
+=================
+
+e-mail: P.Bolek@gust.org.pl
diff --git a/Master/texmf-dist/doc/metapost/mpattern/README.PL b/Master/texmf-dist/doc/metapost/mpattern/README.PL
new file mode 100644
index 00000000000..1872a33c5e9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mpattern/README.PL
@@ -0,0 +1,133 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Ten plik jest czê¶ci± pakietu MPATTERN
+%
+% Autor: Piotr Bolek
+% wersja: 0.5 (Jun 25, 2001)
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Opis
+====
+
+Pakiet MPATTERN s³u¿y do definiowania i u¿ywania wype³nieñ wzorkowych
+w programie MetaPost. W pakiecie wykorzystywana jest dostêpna w jêzyku
+PostScript Level 2 Wzorkowa Przestrzeñ Kolorów (Pattern Color Space).
+
+Zawarto¶æ:
+- mpattern.mp: makra dla programu MetaPost s³u¿±ce do definiowania
+ i u¿ywania wzorków.
+- README: krótki opis po angielsku.
+- README.PL: krótki opis po polsku.
+- test.mp, test.tex, test.ps: przyk³ady u¿ycia.
+
+Sposób u¿ycia
+=============
+
+W pliku ¼ród³owym nale¿y na pocz±tku w³±czyæ poleceniem input plik
+mpattern.mp, a nastêpnie przetworzyæ plik standardowym programem
+mpost.
+
+Interfejs u¿ytkownika
+=====================
+
+Definiowanie wzorku
+--------------------
+
+Wzorki s± definiowane przy u¿yciu konstrukcji:
+
+beginpattern(<nazwa_wzorku>);
+...
+endpattern;
+
+Parametr <nazwa_wzorku> jest nazw±, która s³u¿y do identyfikacji
+wzorku. Nazwa ta mo¿e zawieraæ litery i znaki podkre¶lenia ,,_'', ale
+nie mo¿e zawieraæ cyfr. NIE nale¿y podawaæ tej nazwy w cudzys³owach.
+
+W definicji wzorku (w dowolnym miejscu miêdzy beginpattern a
+endpattern) mo¿na podaæ dodatkowe polecenia:
+- patternbbox(<pair>,<pair>)
+- patternbbox((<numeric>,<numeric>,<numeric>,<numeric>)
+ Jawne podanie wspó³rzêdnych prostok±ta ograniczaj±cego komórkê wzorka
+
+- patternxstep(<numeric>)
+- patternystep(<numeric>)
+- patternstep(<numeric>,<numeric>)
+- patternstep(<pair>)
+ Odstêpy miêdzy komórkami wzorka
+
+- patterntransform(<transform>)
+ Modyfikacja kszta³tu komórki wzorka
+
+- patterncolor(0<= <numeric> <= 1)
+ Jawne podanie koloru zwi±zanego z danym wzorkiem
+
+Ka¿dy wzorek jest tymczasowo zapisywany jako rysunek o du¿ym numerze
+(domy¶lnie 999), ale je¶li u¿ytkownik wykorzysta ten numer do swojego
+rysunku, to dla wzorku bêdzie u¿yty najwiêkszy wolny numer mniejszy od
+999.
+
+U¿ywanie wzorku
+---------------
+
+Do wykorzystania zdefiniowanego wzorku s³u¿y makro dzia³aj±ce jak
+operator dwuargumentowy (primary) withpattern. Sposób u¿ycie jest
+nastêpuj±cy:
+
+<¶cie¿ka> withpattern <nazwa_wzorku>;
+
+gdzie <¶cie¿ka> jest dowolnym wyra¿eniem okre¶laj±cym zamkniêt±
+¶cie¿kê, a <nazwa_wzorku> jest nazw± podan± w definicji wzorku.
+
+Przyk³ad
+--------
+
+Oto kod s³u¿±cy do narysowania dwóch kó³ek wype³nionych ró¿nymi
+szachownicami.
+
+input mpattern;
+
+beginpattern(checker);
+ d:=4mm;
+ fill unitsquare scaled d;
+ fill unitsquare scaled d shifted (d,d);
+ patternbbox(0,0,2d,2d);
+endpattern;
+
+beginpattern(rotated_checker);
+ fill unitsquare scaled 4mm rotated 45 withcolor .7white;
+endpattern;
+
+beginfig(11);
+ path p;
+ z1=(1cm,1cm);
+ p=fullcircle scaled 3cm;
+ fill p withpattern checker;
+ unfill p shifted z1;
+ fill p shifted z1 withpattern rotated_checker;
+endfig;
+
+Zasady rozpowszechniania
+========================
+
+Pakiet MPATTERN jest dobrem wspólnym (ang. ,,public domain''). W
+przypadku modyfikacji lub redystrybucji pakietu mo¿na stosowaæ dowoln±
+aktualn± licencjê GPL.
+
+Problemy
+========
+
+06-2001: Mog± byæ problemy z wype³nianiem wzorkami napisów. Aktualne
+ rozwi±zanie jest prowizoryczne.
+
+Zmiany
+======
+
+06-2001: Dziêki inspiracji tutorialem Piotra Strzelczyka na
+ konferencji BachoTeX'2001 wyeliminowana zosta³a konieczno¶æ
+ postprocesingu z wykorzystaniem Perla. Podmiana kolorów na
+ wzorki jest obecnie realizowana z wykorzystaniem s³owników na
+ poziomie PostScriptu.
+
+Kontakt z autorem
+=================
+
+e-mail: P.Bolek@gust.org.pl
diff --git a/Master/texmf-dist/doc/metapost/mpattern/test.mp b/Master/texmf-dist/doc/metapost/mpattern/test.mp
new file mode 100644
index 00000000000..a6cd1a8f86e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mpattern/test.mp
@@ -0,0 +1,146 @@
+input mpattern;
+prologues:=1;
+
+beginpattern(szachy_i);
+ patterncolor(.8);
+ fill unitsquare scaled 4mm;
+ fill unitsquare scaled 4mm shifted (4mm,4mm);
+endpattern;
+
+beginpattern(szachy_ii);
+ fill unitsquare scaled 3mm withcolor .7white;
+ fill unitsquare scaled 3mm shifted (3mm,3mm) withcolor .7white;
+endpattern;
+
+beginfig(1);
+ fill fullcircle scaled 30mm withpattern szachy_i;
+
+ picture q;
+ q:=currentpicture; clearit;
+
+ draw q shifted (10mm*right) rotated 30 scaled .5;
+
+ fill unitsquare scaled 20mm withpattern szachy_ii;
+endfig;
+
+beginpattern(checker);
+ u:=1mm;
+ fill unitsquare scaled u;
+ fill unitsquare scaled u shifted (u,u);
+ patternbbox(0,0,2u,2u);
+ patterntransform(identity slanted .17);
+endpattern;
+
+beginpattern(rotated_checker);
+ fill unitsquare scaled 4mm rotated 45 withcolor .7white;
+ patterntransform(identity rotated 30);
+endpattern;
+
+beginfig(11);
+ path p;
+ z1=(1cm,1cm);
+ p=fullcircle scaled 3cm;
+ fill p withpattern checker;
+ unfill p shifted z1;
+ fill p shifted z1 withpattern rotated_checker;
+endfig;
+
+beginpattern(tt);
+ fill unitsquare scaled 2mm rotated 45 withcolor .5white;
+ z1=llcorner currentpicture;
+ z2=lrcorner currentpicture;
+ z3=urcorner currentpicture;
+ z4=ulcorner currentpicture;
+% draw z1--z2--z3--z4--cycle;
+ patterntransform(identity rotated 30 slanted .2 yscaled 3);
+ patternstep((1.1*xpart(urcorner currentpicture-ulcorner currentpicture),
+ 2/3*xpart(urcorner currentpicture-ulcorner currentpicture)));
+endpattern;
+
+beginpattern(ttt);
+ fill unitsquare scaled 2mm rotated 45 withcolor .5white;
+ z1=llcorner currentpicture;
+ z2=lrcorner currentpicture;
+ z3=urcorner currentpicture;
+ z4=ulcorner currentpicture;
+% draw z1--z2--z3--z4--cycle;
+ patterntransform(identity rotated 30 slanted .2);
+ patternstep((1.1*xpart(urcorner currentpicture-ulcorner currentpicture),
+ 2/3*xpart(urcorner currentpicture-ulcorner currentpicture)));
+endpattern;
+
+beginpattern(tr);
+ u:=4mm;
+ z1=(0,0);
+ z2=(u,0);
+ z3=(u,2u);
+ z4=(0,2u);
+ z12=.5[z1,z2];
+ z23=.5[z2,z3];
+ z34=.5[z3,z4];
+ z41=.5[z4,z1];
+ draw z12--z23--z34--z41--cycle;
+ draw z23--z41;
+ draw z1--z2;
+ draw z3--z4;
+ patternbbox(z1,z3);
+ patterntransform(identity slanted .1 rotated 11);
+ patternstep(1.2(x2-x1),1.2(y3-y1));
+endpattern;
+
+beginfig(12);
+ path p;
+ z1=(1cm,1cm);
+ p=fullcircle scaled 3cm;
+ fill p withpattern tt;
+ draw p;
+ unfill p shifted z1;
+ fill p shifted z1 withpattern tr;
+ draw p shifted z1;
+endfig;
+
+beginpattern(ll);
+ pickup pencircle scaled .3;
+ draw origin--4up;
+ patternbbox(left,4up+right);
+ patterntransform(identity rotated -45);
+endpattern;
+
+beginpattern(lll);
+ pickup pencircle scaled .3;
+ draw origin--4up;
+ patternbbox(left,4up+right);
+ patterntransform(identity rotated 45);
+endpattern;
+
+beginpattern(literki);
+ label(btex \font\q=ptmr8r at 5pt\q abcd etex,origin);
+ z1=ulcorner currentpicture;
+ z2=urcorner currentpicture;
+ patterntransform(identity slanted .17);
+endpattern;
+
+beginpattern(cm_literki);
+ label(btex \font\q=cmr5\q xyz XYZ ZYX zyx etex,origin);
+ z1=ulcorner currentpicture;
+ z2=urcorner currentpicture;
+ patterntransform(identity slanted .17);
+endpattern;
+
+beginfig(13);
+ label(btex \font\q=ptmr8r at 90pt\q ABCD etex, origin) withpattern ll;
+endfig;
+
+beginfig(14);
+ picture a; a=btex \font\q=ptmbi8r at 90pt\q ABCD etex;
+ draw a withpattern literki;
+ undraw a shifted (20up+10right);
+ draw a shifted (20up+10right) withpattern checker;
+ undraw a shifted (40up+20right);
+ draw a shifted (40up+20right) withpattern lll;
+ draw a shifted (40up+20right) withpattern ll;
+ undraw a shifted (60up+30right);
+ draw a shifted (60up+30right) withpattern cm_literki;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/mpattern/test.tex b/Master/texmf-dist/doc/metapost/mpattern/test.tex
new file mode 100644
index 00000000000..3f3886958af
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/mpattern/test.tex
@@ -0,0 +1,22 @@
+\input epsf
+
+\epsfbox{test.1}
+Simple patterns
+\bigskip
+
+\epsfbox{test.11}
+Explicit bounding box and transformations
+\bigskip
+
+\epsfbox{test.12}
+Transformations and cell spacing
+\bigskip
+
+\epsfbox{test.13}
+Filling label
+\bigskip
+
+\epsfbox{test.14}
+Filling text and with text
+
+\bye
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/INSTALL b/Master/texmf-dist/doc/metapost/piechartmp/INSTALL
new file mode 100644
index 00000000000..f61c9bc54ab
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/INSTALL
@@ -0,0 +1,6 @@
+piechartMP installation:
+
+piechartmp.mp --> TEXMF/metapost/piechartmp/
+LEGAL, README --> TEXMF/doc/metapost/piechartmp/
+piechartmp.pdf --> TEXMF/doc/metapost/piechartmp/
+/examples/* --> TEXMF/doc/metapost/piechartmp/
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/LEGAL b/Master/texmf-dist/doc/metapost/piechartmp/LEGAL
new file mode 100644
index 00000000000..b02acc87c0d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/LEGAL
@@ -0,0 +1,104 @@
+ piechartMP
+ Terms And Conditions For Copying, Distribution And Modification
+ Like LaTeX Project Public License Version 1.0
+
+
+WARRANTY
+========
+
+There is no warranty for piechartMP, to the extent permitted by
+applicable law. Except when otherwise stated in writing, the
+Copyright holder provides piechartMP `as is' without warranty of any
+kind, either expressed or implied, including, but not limited to, the
+implied warranties of merchantability and fitness for a particular
+purpose. The entire risk as to the quality and performance of the
+program is with you. Should piechartMP prove defective, you assume
+the cost of all necessary servicing, repair or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will the Copyright holder, or any of the individual authors named in
+the source for piechartMP, be liable to you for damages, including
+any general, special, incidental or consequential damages arising out
+of any use of piechartMP or out of inability to use piechartMP
+(including but not limited to loss of data or data being rendered
+inaccurate or losses sustained by you or by third parties as a result
+of a failure of The Program to operate with any other programs), even
+if such holder or other party has been advised of the possibility of
+such damages.
+
+
+DISTRIBUTION
+============
+
+Redistribution of unchanged files is allowed provided that all files
+that make up the distribution of piechartMP are distributed.
+In particular this means that piechartMP has to be distributed
+including the files in the piechartMP-README.
+If you distribute piechartMP together with a installation programm
+or installation programms, you have to take care, that users cannot
+skip or delete parts of piechartMP without be well informed about
+this action.
+
+The distribution of piechartMP contain a listing of all the files
+covered by this license at README.
+
+If you receive only some of these files from someone, complain!
+
+The distribution of changed versions of certain files included in the
+piechartMP, and the reuse of code from piechartMP, are allowed
+under the following restrictions:
+
+ * It is allowed only if the legal notice in the file does not
+ expressly forbid it.
+ See note below, under "Conditions on individual files".
+
+ * You rename the file before you make any changes to it, unless the
+ file explicitly says that renaming is not required. Any such changed
+ files must be distributed under a license that forbids distribution
+ of those files, and any files derived from them, under the names used
+ by the original files in the distribution of piechartMP.
+
+ * You change any `identification string' in piechartMP to clearly
+ indicate that the file is not part of the standard system.
+
+ * You change the `error report address' in any modified versions of
+ piechartMP, so that reports for files not maintained by the
+ original program maintainers are directed to the maintainers of the
+ changed files.
+
+ * You acknowledge the source and authorship of the original version
+ in the modified file.
+
+ * You also distribute the unmodified version of the file.
+
+ * You distribute an appropriate documentation.
+
+The above restrictions are not intended to prohibit, and hence do
+not apply to, the updating, by any method, of a file so that it
+becomes identical to the latest version of that file in piechartMP.
+
+========================================================================
+
+
+Conditions on individual files
+==============================
+
+The individual files may bear additional conditions which supersede
+the general conditions on distribution and modification contained in
+this file.
+
+Typical examples of files with more restrictive modification
+conditions would be files that contain the text of copyright notices.
+
+ * The conditions on individual files differ only in the
+ extent of *modification* that is allowed.
+
+ * The conditions on *distribution* are the same for all the files.
+ Thus a (re)distributor of a complete, unchanged copy of The Program
+ need meet only the conditions in this file; it is not necessary to
+ check the header of every file in the distribution to check that a
+ distribution meets these requirements.
+
+Such files are:
+
+ * LEGAL, README: You are not allowed to modify these files.
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/README b/Master/texmf-dist/doc/metapost/piechartmp/README
new file mode 100644
index 00000000000..95db7438b2b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/README
@@ -0,0 +1,17 @@
+This is the README of the piechartMP MetaPost package.
+For license informations see LEGAL.
+
+The package consists of the files:
+- README (this file)
+- LEGAL (license information)
+- piechartmp.mp (the MetaPost module)
+- piechartmp.pdf (english documentation)
+
+
+This is a BETA-release, but I believe that
+the user interface will not change anymore.
+Please send bug-reports and suggestions to:
+Jens-Uwe Morawski <morawski@gmx.net>
+
+Jens-Uwe Morawski
+May 14, 2002; piechartMP version 0.3.0 \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.mp b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.mp
new file mode 100644
index 00000000000..92d39d11126
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.mp
@@ -0,0 +1,146 @@
+%H
+%H piechartMP example - world energy consumption 2000
+%H (extended MetaFun version)
+%H Jens-Uwe Morawski, 2002
+%H
+
+
+%I this MetaPost example requires the MetaFun package
+%I (see piechartMP documentation)
+%I The purpose of this example is to show how pie-charts
+%I can be placed in a figure using the pc_Centre variable.
+%I wec-mfun.pdf in the same directory contains the final
+%I figure.
+
+
+%D This example uses the 'externalfigure' macro from
+%D the MetaFun package. If piechartMP is loaded after
+%D MetaFun then piechertMP detects MetaFun and will
+%D draw segment outsides as gradients.
+%D Since here many charts will be drawn it can cause
+%D an overflow of the MetaPost buffer-size,
+%D therefore piechertMP is loaded prior MetaFun.
+%D If the buffer-size of your MetaPost installation is
+%D large enough then you can load piechartMP after
+%D MetaFun and segment outsides will be drawn as gradients.
+input piechartmp ;
+input metafun ;
+
+%D Helvetica-Bold
+% This should work on most systems. If not, comment the next line.
+defaultfont := "phvb8r" ;
+defaultscale := 0.7 ;
+
+%D
+Scale := 5mm ;
+
+%D define some colors
+color oil_color, gas_color, coal_color, nuclear_color, water_color ;
+oil_color := (0.4, 0 , 0 ) ;
+gas_color := (0 , 0.5, 0 ) ;
+coal_color := (0.5, 0.3, 0 ) ;
+nuclear_color := (0.8, 0.8, 0.2) ;
+water_color := (0.3, 0.3, 1.0) ;
+
+
+%D define some points to place the charts
+pair place[] ;
+place[1] := (2cm,5cm) ;% North America
+place[2] := (7.5cm,3.5cm) ;% Asia
+place[3] := (5cm,5.3cm) ;% Europe
+place[4] := (6.5cm,5.8cm) ;% CIS
+place[5] := (5.6cm,4.2cm) ;% Middle East
+place[6] := (2.5cm,2.7cm) ;% South America
+place[7] := (5cm,3cm) ;% Africa
+
+
+%D
+def AChart (expr Size, Name, Place, Water, Nuclear, Coal, Gas, Oil) =
+ begingroup;
+ save label_pnt, Radius ;
+ pair label_pnt ; numeric Radius ;
+
+ % the 'Size' is the absolute energy consumption
+ % that means the 'Size' is proportional to the area
+ % of the pie-chart and not the radius.
+ Radius := (sqrt Size)*Scale ;
+
+ ResetSegments ; % documented in piechartMP Internals
+
+ if Water>0:
+ Segment(Water, "", water_color) ;
+ fi;
+ if Nuclear>0:
+ Segment(Nuclear, "", nuclear_color) ;
+ fi;
+ if Coal>0:
+ Segment(Coal, "", coal_color) ;
+ fi;
+ if Gas>0:
+ Segment(Gas, "", gas_color) ;
+ fi;
+ if Oil>0:
+ Segment(Oil, "", oil_color) ;
+ fi;
+
+ pc_Centre := place[Place] ; % documented in piechartMP Internals
+ PieChart(Radius, 0.3, 65, 90, 0) ;
+ label_pnt := SegmentPoint(1,(1,0));
+ label.top (Name & "; " & (decimal Size), label_pnt) withcolor white;
+
+ endgroup;
+enddef;
+
+
+beginfig(1);
+
+%D 'externalfigure' is a macro from the MetaFun package.
+%D It embeds the external JPG-Background, the file worldmap.jpg
+%D should be available from the same location as this
+%D MP file.
+externalfigure "worldmap.jpg" xscaled 10cm yscaled 7cm ;
+
+AChart (3.8, "North-America", 1, 2, 6, 25, 32, 35 ) ;
+AChart (3.4, "Asia/Oceania", 2, 2, 5, 46, 10, 38 ) ;
+AChart (2.6, "Europe", 3, 4, 16, 18, 20, 42 ) ;
+AChart (1.3, "CIS", 4, 2, 6, 18, 50, 24 ) ;
+AChart (0.5, "Middle East", 5, 0, 0, 0, 35, 65 ) ;
+AChart (0.5, "South-America",6 , 15, 0, 5, 15, 65 ) ;
+AChart (0.4, "Africa",7 , 0, 0, 37, 18, 45 ) ;
+
+
+%D the legend
+x := 3mm ;
+y := 2.5cm ;
+fill fullcircle scaled 2mm shifted (x,y) withcolor oil_color;
+label.rt ("Oil", (x+2mm,y)) ;
+fill fullcircle scaled 2mm shifted (x,(y-5mm)) withcolor gas_color;
+label.rt ("Gas", (x+2mm,y-5mm)) ;
+fill fullcircle scaled 2mm shifted (x,(y-1cm)) withcolor coal_color;
+label.rt ("Coal", (x+2mm,y-1cm)) ;
+fill fullcircle scaled 2mm shifted (x,(y-1.5cm)) withcolor nuclear_color;
+label.rt ("Nuclear Power", (x+2mm,y-1.5cm)) ;
+fill fullcircle scaled 2mm shifted (x,(y-2cm)) withcolor water_color;
+label.rt ("Water Power", (x+2mm,y-2cm)) ;
+
+
+%D some labels
+label.top ("(in billion t MCU)", (7cm,0)) ;
+defaultfont:="ptmbi8r" ; defaultscale:= 1.2;
+label("World Energy Consumption 2000", origin)
+ rotated 90 shifted (9.5cm,3cm) withcolor white;
+
+
+%D Next follows the grid I have used to determine the co-ordinates
+%D saved in place[]. Now it is not drawn because of the if..fi
+%D statement.
+if false:
+for i=1 upto 10:
+ draw (origin--(0,7cm)) shifted (i*1cm,0) withcolor white ;
+endfor;
+for i=1 upto 7:
+ draw (origin--(10cm,0)) shifted (0,i*1cm) withcolor white ;
+endfor;
+fi;
+endfig;
+end \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.pdf b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.pdf
new file mode 100644
index 00000000000..3b29ac5263e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec-mfun.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/examples/wec.mp b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec.mp
new file mode 100644
index 00000000000..7f45ad33ffd
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec.mp
@@ -0,0 +1,122 @@
+%H
+%H piechartMP example - world energy consumption 2000
+%H Jens-Uwe Morawski, 2002
+%H
+
+
+%I The piechartMP documentation includes many useful
+%I examples which not require MetaPost experience.
+%I In contrast this example employs many MetaPost
+%I commands and definitions. Thus it is not meant
+%I for piechart "beginners".
+%I The chief purpose of this example is to show
+%I how you can draw pie-charts with different data-sets
+%I using ResetSegments and how to save them in
+%I MetaPost pictures.
+%I The file wec.pdf in the same directory is the
+%I result of this MP-file.
+
+input piechartmp ;
+
+%D Helvetica-Bold
+% This should work on most systems. If not, comment the next line.
+defaultfont := "phvb8r" ;
+
+%D
+pair NameShift ; NameShift := (-3.5cm,0) ;
+Scale := 8mm ;
+
+%D define some colors
+color oil_color, gas_color, coal_color, nuclear_color, water_color ;
+oil_color := (0.4, 0 , 0 ) ;
+gas_color := (0 , 0.5, 0 ) ;
+coal_color := (0.5, 0.3, 0 ) ;
+nuclear_color := (0.8, 0.8, 0.2) ;
+water_color := (0.3, 0.3, 1.0) ;
+
+
+ChartCounter := 0 ;
+picture Charts[] ;
+
+%D
+def AChart (expr Size, Name, Water, Nuclear, Coal, Gas, Oil) =
+ begingroup;
+ save s , Radius ; string s ;
+
+ % the 'Size' is the absolute energy consumption
+ % that means the 'Size' is proportional to the area
+ % of the pie-chart and not the radius.
+ Radius := (sqrt Size)*Scale ;
+
+
+ s := Name & "; " & (decimal Size) & " billion t MCU" ;
+
+ ResetSegments ; % not documented in piechartMP doc
+
+ if Water>0:
+ Segment(Water, "", water_color) ;
+ fi;
+ if Nuclear>0:
+ Segment(Nuclear, "", nuclear_color) ;
+ fi;
+ if Coal>0:
+ Segment(Coal, "", coal_color) ;
+ fi;
+ if Gas>0:
+ Segment(Gas, "", gas_color) ;
+ fi;
+ if Oil>0:
+ Segment(Oil, "", oil_color) ;
+ fi;
+
+ PieChart(Radius, 0.3, 65, 90, 0) ;
+ label.lft (s, NameShift) ;
+ ChartCounter := ChartCounter + 1 ;
+ Charts[ChartCounter] := currentpicture ;
+ currentpicture := nullpicture ;
+ endgroup;
+enddef;
+
+def ShipoutCharts =
+ begingroup;
+ save h, t ; numeric h, t ;
+ h := 0 ; t := 0 ;
+ for i=1 upto ChartCounter:
+ t := ypart(ulcorner currentpicture) ;
+ h := -1*(ypart(lrcorner Charts[i])) ;
+ h := h + t + 5mm ;
+ draw Charts[i] shifted (0, (h));
+ endfor;
+ endgroup;
+enddef;
+
+beginfig(1);
+AChart (3.8, "North-America", 2, 6, 25, 32, 35 ) ;
+AChart (3.4, "Asia/Oceania", 2, 5, 46, 10, 38 ) ;
+AChart (2.6, "Europe", 4, 16, 18, 20, 42 ) ;
+AChart (1.3, "CIS", 2, 6, 18, 50, 24 ) ;
+AChart (0.5, "Middle East", 0, 0, 0, 35, 65 ) ;
+AChart (0.5, "South-America", 15, 0, 5, 15, 65 ) ;
+AChart (0.4, "Africa", 0, 0, 37, 18, 45 ) ;
+ShipoutCharts ;
+
+x := 5mm+(xpart(lrcorner currentpicture)) ;
+y := ypart(ulcorner currentpicture) ;
+
+fill fullcircle scaled 5mm shifted (x,y) withcolor oil_color;
+label.rt ("Oil", (x+5mm,y)) ;
+fill fullcircle scaled 5mm shifted (x,(y-1cm)) withcolor gas_color;
+label.rt ("Gas", (x+5mm,y-1cm)) ;
+fill fullcircle scaled 5mm shifted (x,(y-2cm)) withcolor coal_color;
+label.rt ("Coal", (x+5mm,y-2cm)) ;
+fill fullcircle scaled 5mm shifted (x,(y-3cm)) withcolor nuclear_color;
+label.rt ("Nuclear Power", (x+5mm,y-3cm)) ;
+fill fullcircle scaled 5mm shifted (x,(y-4cm)) withcolor water_color;
+label.rt ("Water Power", (x+5mm,y-4cm)) ;
+
+%D
+defaultfont:="ptmbi8r" ; defaultscale:= 2;
+label.top("World Energy Consumption 2000", (0, y+5mm)) ;
+
+endfig;
+end \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/examples/wec.pdf b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec.pdf
new file mode 100644
index 00000000000..76deef44323
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/examples/wec.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/examples/worldmap.jpg b/Master/texmf-dist/doc/metapost/piechartmp/examples/worldmap.jpg
new file mode 100644
index 00000000000..f3c64b6d957
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/examples/worldmap.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/piechartmp/piechartmp.pdf b/Master/texmf-dist/doc/metapost/piechartmp/piechartmp.pdf
new file mode 100644
index 00000000000..89b7fc3cdb3
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/piechartmp/piechartmp.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/mex/base/00readme b/Master/texmf-dist/doc/mex/base/00readme
new file mode 100644
index 00000000000..278491aabb0
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/base/00readme
@@ -0,0 +1,226 @@
+%% Staszek Wawrykiewicz (StaW@gust.org.pl), January 2003. Public domain.
+%% Web2c7.4x (teTeX, fpTeX, TeX Live) and MiKTeX 2.x revision
+MeX and pdfMeX
+
+Dokumentacja po polsku i po angielsku (ni¿ej).
+The documentation in Polish and in English (below).
+
+------------------------------------------------------------------------
+POLSKI (iso8859-2):
+------------------------------------------------------------------------
+MeX jest adaptacj± formatu Plain TeX do sk³adu w jêzyku polskim
+z uwzglêdnieniem polskich zwyczajów drukarskich.
+Autorzy: Bogus³aw Jackowski i Marek Ryæko.
+Dokumentacja poni¿sza omawia pokrótce tworzenie formatu mex.fmt (lub
+pdfmex.fmt, dla programu pdfTeX -- wersji TeX-a tworz±cej od razu pliki PDF)
+i jego u¿ycie w instalacji zgodnej z Web2c (dystrybucje teTeX, fpTeX, TeX
+Live) a tak¿e MiKTeX. Szczegó³owe informacje nt. pakietu MeX zawarto w pliku
+mexinfo.pol.
+
+W dystrybucji do³±czono ponadto prosty plik przyk³adowy
+doc/polish/mex/tstmex.tex, s³u¿±cy do przetestowania poprawnego dzia³ania
+formatu MeX. Pocz±tkuj±cym u¿ytkownikom zaleca siê zapoznanie z zawarto¶ci±
+tego pliku. Plik ten dostêpny jest tak¿e na serwerze GUST.
+------------------------------------------------------------------------
+
+I. Przygotowanie formatu MeX/pdfMeX (polskiej implementacji formatu Plain)
+
+Format w systemie TeX to wstêpnie prekompilowany (aby przyspieszyæ jego
+analizê przez program tex/pdftex) zestaw makrodefinicji oraz regu³
+przenoszenia wyrazów dla wybranego zestawu jêzyków. Plik formatu z regu³y
+posiada rozszerzenie .fmt.
+
+Przygotowanie formatu MeX (lub pdfMeX dla programu pdfTeX, tworz±cego pliki
+PDF) polega w skrócie na uruchomieniu:
+
+tex --ini mex.ini
+
+(dla pdfTeX: pdftex --ini pdfmex.ini). Podczas przetwarzania wczytywane s±
+pliki makr formatu MeX, a tak¿e plain.tex oraz wzorce przenoszenia wyrazów
+dla jêzyka polskiego i angloamerykañskiego.
+
+Poniewa¿ wygenerowany plik powinien znale¼æ siê w odpowiednim miejscu
+struktury katalogów, a tak¿e powinien zostaæ ,,zarejestrowany''
+w instalacji, wspó³czesne dystrybucje u³atwiaj± proces generowania.
+
+ * W dystrybucjach opartych na Web2c (fpTeX, teTeX, TeX Live) formaty
+ generowane s± przy pomocy programu fmtutil (fmtutil --help wy¶wietla
+ dostêpne opcje) za¶ deklaracje formatów znajduj± siê w pliku
+ texmf/web2c/fmtutil.cnf (gdy posiadamy drzewo katalogów zawieraj±ce
+ lokalne pliki konfiguracyjne instalacji systemu TeX, program fmtutil
+ korzysta z lokalnej kopii fmtutil.cnf; dok³adne po³o¿enie pliku
+ wy¶wietli uruchomienie polecenia: kpsewhich fmtutil.cnf).
+
+ W systemach Unix/Linux ca³y proces generowania formatu dostêpny jest
+ z menu Formats programu texconfig, które pozwala modyfikowaæ plik
+ fmtutil.cnf, co polega na usuniêciu znaku # przed deklacj± wybranego
+ formatu b±d¼ zablokowaniu takim znakiem formatów niepo¿±danych.
+ Po zapisaniu zmian w pliku i zakoñczeniu edycji, format zostanie
+ automatycznie wygenerowany.
+ W systemach Windows nale¿y samodzielnie zmodyfikowaæ plik fmtutil.cnf,
+ po czym uruchomiæ polecenie fmtutil --byfmt=mex
+ (lub fmtutil --byfmt=pdfmex).
+
+ * W MiKTeX (od wersji 2.0) nale¿y uruchomiæ w menu MiKTeX Options podmenu
+ TeX Formats, zaznaczyæ format MeX (pdfMeX) i utworzyæ (przyciskiem
+ Build) potrzebny plik formatu.
+
+W obu omawianych przypadkach tworzony jest plik formatu mex.fmt (lub
+pdfmex.fmt), który jest umieszczany w katalogu w³a¶ciwym dla tego rodzaju
+plików, oraz tworzony jest program mex lub pdfmex (uruchamia on
+program tex z formatem mex b±d¼ program pdftex z formatem pdfmex).
+
+------------------------------------------------------------------------
+
+II. U¿ycie
+
+Aktualne implementacje, oparte na Web2c, a tak¿e MiKTeX pozwalaj±
+na prawid³owe przekodowanie znaków diakrytycznych w pliku TeX-owym
+na wewnêtrzn± reprezentacjê, stosowan± przez programy. W Polsce, niestety,
+stosowane s± ró¿ne ,,standardy'' kodowania diakrytyków w tworzonych przez
+u¿ytkownika plikach, zale¿nie od systemu operacyjnego. Dla potrzeb systemu
+TeX u¿ywamy zewnêtrznych, tekstowych plików TCX, pozwalaj±cych ,,obs³u¿yæ''
+ró¿ne spotykane ,,standardy''. Dziêki temu przekodowanie dzia³a te¿ w drug±
+stronê, kiedy TeX wy¶wietla komunikaty i zapisuje pliki .log, a tak¿e
+pliki ze spisem tre¶ci, skorowidzem itp.
+
+Uruchomienie polecenia:
+
+mex --translate-file=TCXFILE plik.tex
+
+oznacza uruchomienia TeX-a z formatem mex.fmt i z odpowiedni± tablic±
+przekodowañ (ich lista znajduje siê poni¿ej). Polecenie `mex' tworzone
+jest zwykle jako dowi±zanie do programu tex w katalogu zawieraj±cym binaria.
+
+Przekodowanie (plik TCX) mo¿e byæ tak¿e deklarowane bezpo¶rednio
+w pliku TeX-owym. Pocz±wszy od wersji Web2c 7.4, wymaga to podania w wierszu
+poleceñ opcji `--parse' lub w³±czenia jej na sta³e, co wymaga zmiany
+w g³ównym pliku konfiguracyjnym texmf.cnf:
+parse_first_line = t
+(t -- od `true', zamiast domy¶lnego przypisania f -- od `false').
+
+Przyk³adowo, je¶li _pierwszy_ wiersz pliku zawiera komentarz strukturalny
+
+%&mex --translate-file=il2-pl
+
+to plik mo¿e byæ przetworzony za pomoc± polecenia tex plik.tex; zostanie
+wtedy wczytany format mex.fmt oraz tablica il2-pl.tcx przekodowania z uk³adu
+iso8859-2 do uk³adu fontów PL (wewnêtrznego dla programu TeX).
+
+W dystrybucjach dostarczono szereg plikow TCX. Mo¿na je znale¼æ w katalogu
+texmf/web2c/:
+
+ amiga-pl.tcx AmigaPL <--> PL
+ il2-pl.tcx iso8859-2 (latin2) <--> PL
+ cp1250pl.tcx Windows cp1250 <--> PL
+ cp852-pl.tcx IBM cp852 <--> PL
+ macce-pl.tcx Apple MacCE <--> PL
+ maz-pl.tcx Mazovia <--> PL
+------------------------------------------------------------------------
+
+III. Polskie fonty PostScriptowe
+
+Aktualne dystrybucje zawieraj± fonty serii PL (spolonizowane standardowe
+dla TeX-a fonty CM) w wersji Type 1 (postscriptowe). Mo¿na je tak¿e
+znale¼æ w najbli¿szym wê¼le CTAN lub jego kopii, np.:
+ftp://sunsite.icm.edu.pl/CTAN/fonts/psfonts/polish/plpsfont/.
+Pliki .pfb powinny znale¼æ siê w podkatalogu texmf/fonts/type1/public/pl/
+naszej instalacji, za¶ pliki map fontowych (.map) oraz wektory kodowañ
+(.enc) -- w katalogu texmf/dvips/pl/
+
+W dystrybucjach opartych na Web2c zautomatyzowano, poprzez u¿ycie programu
+updmap, proces tworzenia map fontowych dla programów dvips, pdftex
+i dvipdfm. Poni¿ej omówiono wiêc jedynie czego ten proces dotyczy.
+
+Sterownik dvips (zamieniaj±cy wynik pracy TeX-a, plik DVI, do formatu
+PostScript) wymaga aby deklaracje map fontowych (dla fontów PL konkretnie
+zawarto¶æ texmf/dvips/pl/pl.map) by³y do³±czone do pliku
+texmf/dvips/config/psfonts.map.
+Mapy fontowe mo¿na alternatywnie do³±czyæ w pliku
+texmf/dvips/config/config.ps (lub jego lokalnej kopii), dopisuj±c wiersz:
+p +pl.map
+po deklaracji g³ównej mapy fontowej: p psfonts.map.
+
+Aby fonty Type 1 by³y u¿yte przez program pdfTeX, nale¿y sprawdziæ jakie
+mapy fontowe s± deklarowane w pliku texmf/dvips/config/pdftex.map --
+powinien on tak¿e zawieraæ deklaracje map fontowych dla fontów PL.
+
+W dystrybucjach wszystkie aktualnie dostêpne polskie fonty
+Type1 s± gotowe do u¿ycia zarówno przez program dvips,
+jak i pdftex.
+
+Bardziej szczegó³owe omówienie instalacji fontów Type1 zawarte jest
+w artykule http://www.gust.org.pl/fonty/fonthint.html.
+
+-----------------------------------------------------------------------
+ENGLISH:
+------------------------------------------------------------------------
+
+MeX is an adaptation of PLAIN TeX format to the Polish language and to the
+Polish printing customs.
+Authors: Bogus\l{}aw Jackowski & Marek Ry\'cko.
+This document describes shortly creation of mex.fmt and usage in MiKTeX
+environment. See mexinfo.eng for detailed informations about MeX.
+
+I. Preparing MeX/pdfMeX (Polish Plain format)
+ * Web2c based distributions (teTeX, fpTeX, TeX Live). Invoke texconfig
+ and menu Formats, which edits fmtutil.cnf; uncomment mex (or pdfmex)
+ format; after saving the file, the desired format will be generated.
+ * MiKTeX (from ver. 2.0). Invoke `MiKTeX Options' menu and the submenu
+ `TeX Formats'. Select MeX (or pdfMeX). After pressing `Build' button
+ the format will be generated.
+
+II. Usage: the current implementations based on web2c 7.x, and MiKTeX
+ allow (hopefully) proper reencoding of input national characters
+ into internal TeX's, and back again, for all messages, .log, .toc,
+ .idx files written by TeX, etc. External readable TCX translation
+ files are used and they can be specified explicitly in the TeX file
+ or in the command line.
+ If the _first_ line of TeX's file contains a structured comment
+ of the form
+ %&mex --translate-file=cp1250pl
+ it suffices to run `tex --parse file.tex' with mex.fmt and cp1250pl.tcx
+ translation table (Windows cp1250 to internal PL reencoding).
+ Permanent parsing of the first line needs the following modification
+ in texmf.cnf:
+ parse_first_line = t
+ (instead of default = f)
+
+ You can also use the command
+ `tex &mex -translate-file=TCXFILE myfile.tex'
+ or just `mex -translate-file=TCXFILE myfile.tex' when you have linked
+ tex[.exe] into mex[.exe] in the directory containing binaries.
+ Several TCX files are provided; they can be found in the texmf/web2c/
+ directory:
+ amiga-pl.tcx AmigaPL <--> PL encoding
+ il2-pl.tcx iso8859-2 (latin2) <--> PL encoding
+ cp1250pl.tcx Windows cp1250 <--> PL encoding
+ cp852-pl.tcx IBM cp852 <--> PL encoding
+ macce-pl.tcx Apple MacCE <--> PL enconding
+ maz-pl.tcx Mazovia <--> PL encoding
+
+III. Polish PostScript fonts in Type 1 format
+ The installation can already contain Type 1 PL fonts;
+ they can be also downloaded from the nearest CTAN node or its mirror:
+ CTAN//fonts/psfonts/polish/plpsfont/
+ or copied from the CD TeX Live.
+ .pfb files should reside in the directory: .../fonts/type1/public/pl/ ;
+ font map and encoding files should go to .../dvips/pl/ directory.
+
+ The preparation of map files are now automatized by running updmap
+ program.
+
+ Dvips can be prepared for using PL fonts in Type 1 format in two ways:
+ * the contents of texmf/dvips/pl/pl.map should be included
+ into the standard texmf/dvips/config/psfonts.map.
+ * in texmf/dvips/config/config.ps the additional map file can be
+ declared after standard `p psfonts.map' line:
+ p +pl.map
+
+ In order to use Type 1 fonts with pdfTeX, the contents of
+ texmf/dvips/config/pdftex.map file can be updated with
+ the contents of pl.map, or the line
+ map +pl.map
+ can be added to the file texmf/pdftex/config/pdftex.cfg.
+
+------------------------------------------------------------------------
diff --git a/Master/texmf-dist/doc/mex/base/mex.html b/Master/texmf-dist/doc/mex/base/mex.html
new file mode 100644
index 00000000000..6301bbfd8e5
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/base/mex.html
@@ -0,0 +1,212 @@
+<HTML>
+<HEAD>
+<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
+<TITLE>MeX, pdfMeX</TITLE>
+</HEAD>
+
+<BODY>
+
+<!-- January 2003. Staszek Wawrykiewicz (StaW@gust.org.pl).
+teTeX 2.0 revision. Public domain. -->
+
+<center>
+<h2>MeX i pdfMeX</h2>
+</center>
+MeX jest adaptacj± formatu Plain TeX do sk³adu w&nbsp;jêzyku polskim
+z&nbsp;uwzglêdnieniem polskich zwyczajów drukarskich.<br>
+Autorzy: Bogus³aw Jackowski i&nbsp;Marek Ryæko.<br>
+Dokumentacja poni¿sza omawia pokrótce tworzenie formatu <code>mex.fmt</code>
+(lub <code>pdfmex.fmt</code>, dla programu pdfTeX -- wersji TeX-a tworz±cej
+od razu pliki PDF)
+i&nbsp;jego u¿ycie w&nbsp;instalacji zgodnej z&nbsp;<code>Web2c</code>
+(dystrybucje teTeX, fpTeX, TeX Live) a&nbsp;tak¿e MiKTeX.
+Szczegó³owe informacje nt. pakietu MeX zawarto w&nbsp;pliku
+<code>mexinfo.pol</code>.
+
+<p>
+W dystrybucji do³±czono ponadto prosty plik przyk³adowy
+<code>doc/polish/mex/tstmex.tex</code>, s³u¿±cy do przetestowania poprawnego
+dzia³ania formatu MeX. Pocz±tkuj±cym u¿ytkownikom zaleca siê
+zapoznanie z&nbsp;zawarto¶ci± tego pliku.
+Plik ten dostêpny jest tak¿e na serwerze
+<a href="ftp://ftp.gust.org.pl/pub/TeX/GUST/contrib/zaczynam/">GUST</a>.
+
+<hr>
+
+<h3>I. Przygotowanie formatu MeX/pdfMeX (polskiej implementacji formatu Plain)</h3>
+
+Format w systemie TeX to wstêpnie prekompilowany (aby przyspieszyæ jego
+analizê przez program <code>tex/pdftex</code>) zestaw makrodefinicji oraz regu³
+przenoszenia wyrazów dla wybranego zestawu jêzyków. Plik formatu z regu³y
+posiada rozszerzenie <code>.fmt</code>.<p>
+
+Przygotowanie formatu MeX (lub pdfMeX dla programu pdfTeX, tworz±cego
+pliki PDF) polega w&nbsp;skrócie na uruchomieniu:
+<pre>
+tex --ini mex.ini
+</pre>
+(dla pdfTeX: <code>pdftex --ini pdfmex.ini</code>). Podczas przetwarzania
+wczytywane s± pliki makr formatu MeX, a&nbsp;tak¿e
+<code>plain.tex</code> oraz wzorce przenoszenia wyrazów dla jêzyka polskiego
+i&nbsp;angloamerykañskiego.
+
+<p>
+Poniewa¿ wygenerowany plik powinien znale¼æ siê w&nbsp;odpowiednim
+miejscu struktury katalogów, a&nbsp;tak¿e powinien zostaæ ,,zarejestrowany''
+w&nbsp;instalacji, wspó³czesne dystrybucje u³atwiaj± proces generowania.
+
+<ul>
+<li>W&nbsp;dystrybucjach
+opartych na Web2c (fpTeX, teTeX, TeX Live) formaty generowane s± przy pomocy
+programu <code>fmtutil</code> (<code>fmtutil --help</code> wy¶wietla dostêpne
+opcje) za¶ deklaracje formatów znajduj± siê w&nbsp;pliku
+<code>texmf/web2c/fmtutil.cnf</code> (gdy posiadamy drzewo katalogów
+zawieraj±ce lokalne pliki konfiguracyjne instalacji systemu TeX, program
+<code>fmtutil</code> korzysta z&nbsp;lokalnej kopii <code>fmtutil.cnf</code>;
+dok³adne po³o¿enie pliku wy¶wietli uruchomienie polecenia:
+<code>kpsewhich fmtutil.cnf</code>).<br>
+W&nbsp;systemach Unix/Linux ca³y proces generowania formatu dostêpny jest
+z&nbsp;menu <code>Formats</code> programu <code>texconfig</code>, które
+pozwala modyfikowaæ plik <code>fmtutil.cnf</code>,
+co polega na usuniêciu znaku #
+przed deklacj± wybranego formatu b±d¼ zablokowaniu takim znakiem
+formatów niepo¿±danych. Po zapisaniu pliku i&nbsp;zakoñczeniu edycji,
+format zostanie automatyczne wygenerowany.<br>
+W&nbsp;systemach Windows
+nale¿y samodzielnie zmodyfikowaæ plik <code>fmtutil.cnf</code>, po czym
+uruchomiæ polecenie <code>fmtutil --byfmt=mex</code>
+(lub <code>fmtutil --byfmt=pdfmex</code>).
+
+<li>
+W MiKTeX (od wersji 2.0)
+nale¿y uruchomiæ w&nbsp;menu <code>MiKTeX Options</code> podmenu
+<code>TeX Formats</code>, zaznaczyæ format
+<code>MeX</code> (<code>pdfMeX</code>) i&nbsp;utworzyæ (przyciskiem
+<code>Build</code>) potrzebny plik formatu.
+</ul>
+
+<p>
+W&nbsp;obu omawianych przypadkach tworzony jest plik formatu
+<code>mex.fmt</code> (lub <code>pdfmex.fmt</code>), który jest
+umieszczany w&nbsp;katalogu w³a¶ciwym dla tego rodzaju
+plików, oraz tworzony jest program <code>mex</code> lub <code>pdfmex</code>
+(uruchamia on program <code>tex</code>
+z&nbsp;formatem <code>mex</code> b±d¼ program <code>pdftex</code>
+z&nbsp;formatem <code>pdfmex</code>).</p>
+
+<hr>
+
+<h3>II. U¿ycie</h3>
+
+Aktualne implementacje, oparte na Web2c, a&nbsp;tak¿e MiKTeX pozwalaj±
+na prawid³owe przekodowanie znaków diakrytycznych w&nbsp;pliku TeX-owym
+na wewnêtrzn± reprezentacjê, stosowan± przez programy.
+W&nbsp;Polsce, niestety,
+stosowane s± ró¿ne ,,standardy'' kodowania diakrytyków w&nbsp;tworzonych przez
+u¿ytkownika plikach, zale¿nie od systemu operacyjnego. Dla potrzeb systemu
+TeX u¿ywamy zewnêtrznych, tekstowych plików TCX, pozwalaj±cych ,,obs³u¿yæ''
+ró¿ne spotykane ,,standardy''. Dziêki temu przekodowanie dzia³a te¿
+w&nbsp;drug± stronê, kiedy TeX wy¶wietla komunikaty i&nbsp;zapisuje pliki
+<code>.log</code>, a&nbsp;tak¿e pliki ze spisem tre¶ci, skorowidzem itp.<p>
+
+Uruchomienie polecenia:<br>
+<code>mex --translate-file=TCXFILE myfile.tex</code><br>
+oznacza uruchomienia TeX-a z&nbsp;formatem <code>mex.fmt</code>
+i&nbsp;z&nbsp;odpowiedni± tablic± przekodowañ (ich lista znajduje siê
+poni¿ej). Polecenie <code>mex</code> tworzone jest zwykle jako dowi±zanie
+do programu <code>tex</code> w&nbsp;katalogu zawieraj±cym binaria.<p>
+
+Przekodowanie (plik TCX) mo¿e byæ deklarowane bezpo¶rednio w&nbsp;pliku
+TeX-owym. Pocz±wszy od wersji Web2c&nbsp;7.4, wymaga to podania
+w&nbsp;wierszu poleceñ opcji <code>--parse</code> lub w³±czenia jej na
+sta³e, co wymaga zmiany w&nbsp;g³ównym pliku
+konfiguracyjnym <code>texmf.cnf</code>:<br>
+<code>parse_first_line = t</code><br>
+(t -- od `true', zamiast domy¶lnego przypisania f -- od `false').
+
+<p>
+Przyk³adowo, je¶li <b>pierwszy</b> wiersz pliku zawiera
+ komentarz strukturalny postaci<br>
+ <code>%&mex --translate-file=il2-pl</code><br>
+ to plik mo¿e byæ przetworzony za pomoc± polecenia <code>tex plik.tex</code>;
+ zostanie wtedy wczytany format <code>mex.fmt</code> oraz tablica
+ <code>il2-pl.tcx</code>
+ przekodowania z&nbsp;uk³adu iso8859-2 do uk³adu fontów PL (wewnêtrznego
+ dla programu TeX).<p>
+
+ W&nbsp;dystrybucjach dostarczono szereg plikow TCX. Mo¿na je znale¼æ
+ w&nbsp;katalogu <code>texmf/web2c/</code>:
+
+<p>
+<table border>
+<tr>
+ <td> amiga-pl.tcx </td> <td> AmigaPL do PL </td>
+</tr>
+<tr>
+ <td>il2-pl.tcx</td> <td> iso8859-2 (latin2) do PL </td>
+</tr>
+<tr>
+ <td>cp1250pl.tcx</td> <td> Windows cp1250 do PL </td>
+</tr>
+<tr>
+ <td>cp852-pl.tcx</td> <td> IBM cp852 do PL </td>
+</tr>
+<tr>
+ <td>macce-pl.tcx</td> <td> Apple MacCE do PL </td>
+</tr>
+<tr>
+ <td>maz-pl.tcx</td> <td> Mazovia do PL </td>
+</tr>
+</table>
+
+<hr>
+
+<h3> III. Polskie fonty PostScriptowe</h3>
+
+ Aktualne dystrybucje zawieraj± fonty serii PL
+ (spolonizowane standardowe dla TeX-a fonty CM) w&nbsp;wersji
+ Type&nbsp;1 (postscriptowe).
+ Mo¿na je tak¿e znale¼æ w&nbsp;najbli¿szym wê¼le CTAN lub jego kopii,
+ np.:<br>
+ <code>ftp://sunsite.icm.edu.pl/CTAN/fonts/psfonts/polish/plpsfont/</code>.<br>
+ Pliki <code>.pfb</code> powinny znale¼æ siê w&nbsp;podkatalogu
+ <code>texmf/fonts/type1/public/pl/</code> naszej instalacji, za¶ pliki
+ map fontowych (<code>.map</code>) oraz wektory kodowañ
+(<code>.enc</code>) -- w&nbsp;katalogu <code>texmf/dvips/pl/</code>
+<p>
+W dystrybucjach opartych na Web2c zautomatyzowano, poprzez u¿ycie programu
+<code>updmap</code>, proces tworzenia map fontowych dla programów
+<code>dvips</code>, <code>pdftex</code>
+i&nbsp;<code>dvipdfm</code>. Poni¿ej omówiono wiêc jedynie czego ten proces
+dotyczy.
+<p>
+ Sterownik <code>dvips</code> (zamieniaj±cy wynik pracy TeX-a, plik DVI,
+ do formatu PostScript) wymaga aby deklaracje map fontowych
+ (dla fontów PL konkretnie zawarto¶æ <code>texmf/dvips/pl/pl.map</code>)
+ by³y do³±czone do pliku <code>texmf/dvips/config/psfonts.map</code>.
+ Mapy fontowe mo¿na alternatywnie do³±czyæ w&nbsp;pliku
+ <code>texmf/dvips/config/config.ps</code> (lub jego lokalnej kopii),
+ dopisuj±c wiersz:<br>
+ <code>p +pl.map</code><br>
+ po deklaracji g³ównej mapy fontowej: <code>p psfonts.map</code>. <p>
+
+ Aby fonty Type&nbsp;1 by³y u¿yte przez program <code>pdfTeX</code>,
+ nale¿y sprawdziæ jakie mapy fontowe s± deklarowane w&nbsp;pliku
+ <code>texmf/dvips/config/pdftex.map</code> -- powinien on tak¿e
+ zawieraæ deklaracje map fontowych dla fontów PL.<p>
+
+W&nbsp;dystrybucjach wszystkie aktualnie dostêpne polskie fonty
+Type1 s± gotowe do u¿ycia zarówno przez program <code>dvips</code>,
+jak i&nbsp;<code>pdftex</code>.<p>
+
+Bardziej szczegó³owe omówienie instalacji fontów Type1 zawarte
+jest w&nbsp;artykule <a href="http://www.gust.org.pl/fonty/fonthint.html">Instalowanie
+fontów Type1/True Type</a>. <p>
+
+<hr>
+
+<i>Staszek Wawrykiewicz</i> (StaW@gust.org.pl), 13.01.2003.
+
+</BODY>
+</HTML>
+
diff --git a/Master/texmf-dist/doc/mex/base/mexinfo.eng b/Master/texmf-dist/doc/mex/base/mexinfo.eng
new file mode 100644
index 00000000000..8d6d511b533
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/base/mexinfo.eng
@@ -0,0 +1,604 @@
+---------------------------------------------------------------------------
+MEXINFO.ENG: a brief description of the MeX 1.05 package, 18 December 1993
+small changes in documentations: 8 November 1997
+---------------------------------------------------------------------------
+
+What is MeX?
+============
+
+MeX is a software package for TeX and METAFONT.
+TeX is a typesetting system and METAFONT is a program for typeface
+design, both developed by professor Donald E. Knuth.
+
+Most users of TeX use it with PLAIN TeX and LaTeX macro packages.
+(Macro packages are also called ``formats''.)
+MeX is an adaptation of PLAIN TeX and LaTeX (v.209) formats to the
+Polish language and to the Polish printing customs.
+
+MeX consists of:
+
+ -- a set of fonts containing Polish diacritical characters and
+ extra quotation marks (a complete set of METAFONT sources);
+ -- hyphenation rules for the Polish language;
+ -- TeX macro files, called MeX and LaMeX, providing necessary
+ tools for typesetting in Polish (the files are included
+ in the source form).
+
+Since MeX was developed chiefly for native Poles to typeset text
+written in the Polish tongue (thus for the people able to understand
+Polish documentation) this is rather a short description of the MeX
+package, meant for particularly curious TeXers and METAFONTers.
+The ultimate documentation, as always, are the source files.
+
+Authors
+=======
+
+Fonts:
+ Bogus\l{}aw Jackowski (BJ) & Marek Ry\'cko (MR).
+ consultant: Roman Tomaszewski
+
+Formats MeX & LaMeX (Polish versions of the PLAIN and LaTeX209 macro files):
+ MR & BJ.
+
+Polish hyphenation patterns:
+ Hanna Ko\l{}odziejska (HK),
+ BJ & MR.
+ (See ``The history of MeX'' below.)
+
+Rules
+=====
+
+The MeX package belongs to the public domain.
+
+The MeX package may only be distributed in unchanged and complete form
+including the files MEXINFO.ENG and MEXINFO.POL.
+All the files constituting the MeX package are listed in the chapters
+``Files'' and ``PL Fonts'' below.
+
+Anyone who distributes the MeX package must obey one of the following
+rules:
+ 1. there is no charge for distribution
+or 2. the payment for the distribution of one diskette
+ is not greater than the price of this diskette;
+ in this case the distributor must make clear
+ that this is a handling fee, not a license fee or purchase fee.
+
+This package is distributed with no warranty of any sort.
+The authors accept no responsibility for the consequences of using this
+software.
+
+Each user must comply with all conditions specified by D. E. Knuth
+regarding the use of TeX, METAFONT and related software.
+
+Contacts
+========
+
+The authors can be reached via the Polish TeX Users Group
+(Polska Grupa U\.zytkownik\'ow Systemu TeX ``GUST'').
+
+The current address is:
+
+Polska Grupa U\.zytkownik\'ow Systemu TeX ,,GUST''
+Instytut Matematyki Uniwersytetu Gda\'nskiego
+ul. Wita Stwosza 57
+80-952 Gda\'nsk
+POLAND
+http://www.gust.org.pl
+
+Any comments regarding the MeX package are welcome.
+
+The history of MeX
+==================
+
+The MeX package has been developed in MacroSoft Ltd, Warsaw, Poland.
+
+The previous version of the adaptation of TeX to the Polish language was
+called LeX. It contained a macro file and P1 family of fonts, and was
+developed by BJ & MR between November 1987 and December 1989.
+MeX is a modification of LeX adjusting it to the TeX 3.x conventions.
+
+The LeX format made use of a set of hyphenation rules originally created
+by HK in 1987, adapted to the LeX format and extensively modified by BJ & MR.
+
+The following modifications to the LeX package and hyphenation rules
+were done while BJ, HK & MR were employed in MacroSoft Ltd:
+
+ -- the hyphenation rules were further improved and adapted to the TeX 3.x
+ requirements by HK in July--August 1991,
+
+ -- transformation from LeX, version 1.75, to MeX, version 1.01, macro files
+ and from P1 to PL, version 1.01 fonts were done by BJ & MR
+ during the period October 1991--February 1992.
+
+The authors are grateful to MacroSoft Ltd for providing the opportunity
+to carry out this work.
+
+Major changes after the 1.01 release of MeX
+===========================================
+
+Version 1.03, 18 December 1992:
+ -- incorrect behaviour of \notin and related macros eliminated
+ (sorry for this error -- BJ & MR);
+ -- added macros \emulateplain and \emulateLaTeX for emulating
+ formats plain and LaTeX209 within MeX and LaMeX formats, respectively;
+ -- discretization of some Polish characters improved;
+ -- the order of inputting files in METAFONT programs changed
+ so that the format file CM.BAS is no longer needed;
+ -- a few negligible changes introduced, mainly in comments.
+
+Version 1.05, 18 December 1993:
+ -- next bug (sorry again -- BJ & MR) eliminated:
+ category codes of several characters corrected;
+ -- MFJ files placed along with other emTeX files;
+ GPLMODES.MFJ adjusted to new versions of Eberhard Mates's drivers;
+ other METAFONT files remained intact;
+ -- the MeX distribution files are no longer packed;
+ the LHa program is no longer included.
+
+PL fonts
+========
+The PL fonts were primarly designed for use with the MeX and LaMeX formats
+(Polish versions of the PLAIN and LaTeX209 macro files). Nowadays PL fonts
+can also be used with `PLaTeX' package (CTAN:/language/polish/platex-1.0.zip)
+that provides tools to typeset documents in Polish using LaTeX2e.
+
+ 1. The Polish diacritical letters and quotation marks
+ -----------------------------------------------------
+
+ There are nine diacritical letters in the Polish language (altogether
+ with majuscules---eighteen):
+
+ a with ogonek
+ c with acute accent
+ e with ogonek
+ l with cross
+ n with acute accent
+ o with acute accent
+ s with acute accent
+ z with acute accent
+ z with dot accent
+
+ Moreover, the Polish opening quotation mark is like the English
+ closing one, but shifted to a baseline (like two commas, `,,');
+ additionally, in case of nested quotations, French quotation marks
+ (`<<' and `>>') are used in Polish.
+
+ 2. The PL layout
+ ----------------
+
+ The Polish fonts (PL) are extension of Computer Modern
+ fonts (CM), i.e., characters 0--127 are identical in PL and CM,
+ while the Polish characters and Polish and French quotation marks
+ are placed in higher ASCII positions, namely:
+
+ A with ogonek -- 129 a with ogonek -- 161
+ C with acute accent -- 130 c with acute accent -- 162
+ E with ogonek -- 134 e with ogonek -- 166
+ L with cross -- 138 l with cross -- 170
+ N with acute accent -- 139 n with acute accent -- 171
+ O with acute accent -- 211 o with acute accent -- 243
+ S with acute accent -- 145 s with acute accent -- 177
+ Z with acute accent -- 153 z with acute accent -- 185
+ Z with dot accent -- 155 z with dot accent -- 187
+
+ << (French opening quotes) -- 174
+ >> (French opening quotes) -- 175
+ ,, (Polish opening quotes) -- 255
+
+ Note that the Polish diacritical letters have the codes of the Extended
+ CM layout (Cork encoding).
+
+ 3. A few remarks on the design of the PL fonts
+ ----------------------------------------------
+
+ a) The METAFONT programs for letters and for the Polish opening quotes
+ are based on the respective CM programs; we decided not to
+ exploit a sneaky way of reading CM programs twice (or reading them
+ and storing) and modifying `extra_beginchar' and `extra_endchar',
+ or so, as we found such an aproach to be inconsistent with
+ the general philosophy of the Computer Modern font family design
+ (although see, e.g., the program for SS in the CSC font).
+
+ b) Unlike the CM parametric files, the PL ones do not contain lists
+ of parameter assignments. Instead, a CM driver file is input
+ while processing the corresponding PL driver.
+
+ c) The quotation marks are accessible via ligatures (,, << >>).
+ The Polish diacritical letters can be accessed either directly or
+ using an active prefix character (slash)---see the description of
+ the format MeX. No ligatures are used to form the Polish diacritical
+ characters. There are good reasons for doing so.
+
+ d) Since the Polish diacritical letters are not meant to be used as
+ math variables, they are not `math_adjusted'.
+
+ e) METAFONT doesn't allow for more than 16 different heights per font;
+ because of this limitation the upper half of the ASCII table is
+ deliberately left almost empty.
+
+ In spite of that an additional height introduced by accented
+ majuscules may cause an automatic adjustation of the remaining
+ heights, and it may happen that, e.g., `x_height' will be changed.
+ This makes the full compatibility between PL and CM fonts rather
+ impossible; let's hope that such incompatible situations will occur
+ very rarely.
+
+ f) An attempt was made to avoid introducing extra parameters; in some
+ cases, however, such extra (optional) parameters may prove to be
+ necessary for the final tunig. All optional parameters are described
+ in the file PL_DOD.MF (an additional file for PL fonts; in fact,
+ a base format). Examples of use of optional parameters can be found
+ in the following files:
+ PLB10, PLBX5, PLBX6, PLBX7, PLBX8, PLCSC10, PLDUNH10, PLFI10, PLFF10,
+ PLITT10, PLR5, PLR6, PLR7, PLR8, PLR9, PLR12, PLR17, PLSL8, PLSL9,
+ PLSL12, PLSSQ8, PLSSQI8, PLTCSC10, PLTI7, PLTI8, PLTI12, and PLVTT10.
+
+ g) PLSY fonts include alternative less-or-equal and greater-or-equal
+ signs (like AMSTeX `\leqslant' and `\geqslant'), used in Polish math
+ texts; this extension was suggested by Mr. W\l{}odzimierz J. Martin.
+
+ h) PLMI, PLMIB and PLTEX fonts are renamed (for uniformness) CMMI, CMMIB
+ and CMTEX fonts. The latter one reflects the layout of the keyboard
+ of the computer used by D. E. Knuth (D. E. Knuth, ``Computer Modern
+ Typefaces,'' p. 568); it is unlikely that Polish characters were
+ present there.
+
+ i) The design of the Polish diacritical characters in fonts PLR, PLBX,
+ PLTT, PLSS, PLTI and PLSSBX was consulted with Mr. Roman Tomaszewski,
+ the President of the Polish Division of ATypI (Association Typographique
+ Internationale).
+
+ The authors are extremally grateful to him for his advices and for
+ the time he devoted to the problem of the Polish version of CM fonts.
+
+ Mr. Roman Tomaszewski died in December 1993.
+
+ j) D. E. Knuth encourages users to generate their own fonts: ``Many
+ more variations (bold and/or slanted and/or sans-serif) could be
+ tried.'' he says (``Computer Modern Typefaces'', p. 30). The authors
+ of the PL fonts share rather the Roman Tomaszewski's opinion, that one
+ should be very, very careful in following this advice.
+
+ 4. A few remarks on the design of the Polish diacritical characters
+ -------------------------------------------------------------------
+
+ a) The accents over minuscules are very similar to the accents
+ that can be obtained using TeX's acute accent (\') operation;
+ accents over majuscules, however, are rotated a bit (if serifs)
+ or flattened a bit (if not serifs); exceptionally, in the extremely
+ slim PLDUNH10 font accents over majuscules are not sloped.
+
+ b) The dot accent over `z' and `Z' is like a dot over the letter `i'.
+ The dot accent put by TeX's command `\.' is a bit different, which
+ does not look nice in Polish words like `gwi\.zd\.ze' (eng. whistles).
+
+ c) The cross for the polish `l' and `L' is longer and thicker (for `L'
+ is bigger than for `l') than the standard CM's cross (TeX commands
+ `\l' and `\L').
+
+ d) The programs for the Polish opening quotes are based on the CM's
+ closing quotes; the French quotation marks are designed from scratch.
+
+ e) The geometry of an ogonek is very simple: its outer and inner edges
+ are single B\`ezier segments. The algorithm of computing the control
+ points for the B\`ezier curves, however, is admittedly sophisticated.
+ This is due to the fact that a wide spectrum of different ogonek shapes
+ is in fact to be programmed: one shape is needed for caps, another for
+ `a' with ogonek, yet another for `e' with ogonek, as they all have
+ different joins. Moreover, a sansserif ogonek differs significantly
+ from the serif one, a bold ogonek from a non-bold, an ogonek for hefty
+ fonts should still be different. And, if you take into account that
+ the basic font unit |u| may change during one session of font
+ generation (monospace and caps-small-caps) and that a few different
+ pens may be used to draw a single letter you'll understand why
+ so many |if| ... |else:| ... |fi| commands are used in the ogonek
+ program.
+
+ f) Implicit kerns are mostly the same for the Polish diacritical letters
+ as for the respective Latin ones; although, there are a few exceptions
+ (see the files POLAN.MF, POLKUR.MF and POLKAP.MF). The same concerns
+ the italic correction inserted after the Polish characters.
+
+ 5. METAFONT sources
+ -------------------
+ The MeX package contains the following METAFONT sources (it is assumed
+ that the user has the complete set of CM sources):
+
+ a) Files describing the Polish diacritical characters:
+
+ PL_CUD.MF PL_DOD.MF PL_MLK.MF
+ PL_DL.MF PL_ML.MF PL_SYM.MF
+
+ b) Driver files:
+
+ POLAN.MF -- corresponding to ROMAN.MF
+ POLKAP.MF -- corresponding to CSC.MF
+ POLKUR.MF -- corresponding to TEXTIT.MF
+ POLMAT.MF -- corresponding to MATHSY.MF
+ POLTYT.MF -- corresponding to TITLE.MF
+
+ c) Parametric files:
+
+ PLBSY10.MF PLMI10.MF PLSSBI36.MF PLSY5.MF
+ PLBXSL10.MF PLMI12.MF PLSSBI48.MF PLSY6.MF
+ PLBXTI10.MF PLMI5.MF PLSSBX10.MF PLSY7.MF
+ PLBX10.MF PLMI6.MF PLSSBX36.MF PLSY8.MF
+ PLBX12.MF PLMI7.MF PLSSBX48.MF PLSY9.MF
+ PLBX5.MF PLMI8.MF PLSSDC10.MF PLTCSC10.MF
+ PLBX6.MF PLMI9.MF PLSSDC40.MF PLTEX10.MF
+ PLBX7.MF PLR10.MF PLSSI10.MF PLTEX8.MF
+ PLBX8.MF PLR12.MF PLSSI12.MF PLTEX9.MF
+ PLBX9.MF PLR17.MF PLSSI17.MF PLTI10.MF
+ PLB10.MF PLR5.MF PLSSI8.MF PLTI12.MF
+ PLCSC10.MF PLR6.MF PLSSI9.MF PLTI7.MF
+ PLDUNH10.MF PLR7.MF PLSSQI8.MF PLTI8.MF
+ PLEX10.MF PLR8.MF PLSSQ8.MF PLTI9.MF
+ PLEX9.MF PLR9.MF PLSS10.MF PLTT10.MF
+ PLFF10.MF PLSLTT10.MF PLSS12.MF PLTT12.MF
+ PLFIB8.MF PLSL10.MF PLSS17.MF PLTT8.MF
+ PLFI10.MF PLSL12.MF PLSS8.MF PLTT9.MF
+ PLINCH.MF PLSL8.MF PLSS9.MF PLU10.MF
+ PLITT10.MF PLSL9.MF PLSY10.MF PLVTT10.MF
+ PLMIB10.MF PLSSBI10.MF
+
+ d) Extra parametric files:
+
+ CMSSBI10.MF
+ CMBX11.MF
+ CMR11.MF
+ CMSL11.MF
+ CMTI11.MF
+ DLR10.MF
+
+ e) Additional file, being input while METAFONT processes a PL
+ parametric file:
+
+ FIK_MIK.MF
+
+ f) Mode file for Linotronic 100 and 300
+
+ LINOMODE.MF
+
+ g) Format file for the MFT program:
+
+ PL.MFT
+
+ This file provides a format for a neat typesetting of the METAFONT
+ sources of PL fonts; it is assumed that user has a file MFTMAC.TEX
+ (this file may be found, e.g., in emTeX package of Eberhard Mattes
+ or in any CTAN:/macros/generic/plain/base/mftmac.tex).
+
+ 6. Genarating PL fonts
+ ----------------------
+
+ Usually, METAFONT implementation comes up with an additional software
+ which facilitates genarating fonts. The MeX package includes data files
+ for the MFJOB program of E. Mattes, which controls generating fonts
+ by emMF (for details see the documentation of the emTeX package).
+ The following files are available:
+
+ G180PL.MFJ data for generating 180dpi (for 24 pin matrix printers)
+ PL fonts
+
+ G240PL.MFJ data for generating 240dpi (for 9 pin matrix printers)
+ PL fonts
+
+ G300PL.MFJ data for generating 300dpi (for HP compatible laser
+ printers) PL fonts
+
+ GPLMODES.MFJ definition of respective modes for MFJOB
+
+Installation of the format (FMT) files
+======================================
+
+In order to work with the MeX and LaMeX formats one has to generate
+the respective FMT files using INITEX. The following files are necessary:
+ MEX.TEX, LAMEX.TEX, MEX1.TEX, MEX2.TEX, MEXCONF.TEX, PLHYPH.TEX.
+Moreover, the following files from the standard TeX package should
+be available for INITEX:
+ PLAIN.TEX, LATEX.TEX, LPLAIN.TEX, LFONTS.TEX, HYPHEN.TEX.
+
+There are data and batch files in the distribution package, facilitating
+the process of the generation of FMT files using emTeX (TEX186), namely:
+ MAZ2PL.PCT, LAT2PL.PCT, MAZ2PL.TCP, LAT2PL.TCP, MK-TCP.BAT, GM-MEX.BAT,
+ GM-LAMEX.BAT, GL-MEX.BAT, and GL-LAMEX.BAT.
+
+The user may change the default behaviour of the formats changing
+the MEXCONF.TEX file (see this file).
+
+User's manual
+=============
+
+Polish diacritical letters
+--------------------------
+
+Usually, users access the Polish diacritical characters directly
+(using a one-character notation). In some applications, however,
+a universal, ``device-independent'' notation may be convenient. In such
+a situation one may switch on the prefix notation (command \prefixing).
+This command makes a slash active, and the Polish diacritical characters
+are represented as follows:
+
+ /a -- a with ogonek /A -- A with ogonek
+ /c -- c with acute accent /C -- C with acute accent
+ /e -- e with ogonek /E -- E with ogonek
+ /l -- l with cross /L -- L with cross
+ /n -- n with acute accent /N -- N with acute accent
+ /o -- o with acute accent /O -- O with acute accent
+ /s -- s with acute accent /S -- S with acute accent
+ /x -- z with acute accent /X -- Z with acute accent
+ /z -- z with dot accent /Z -- Z with dot accent
+
+Slash itself is represented by // or by the command \normalslash.
+
+The direct notation is restored by the \nonprefixing command. The Polish
+users are supposed to prefere the direct access to the Polish letters, the
+more so, as the control sequences may then contain Polish diacritical
+characters.
+
+Quotation marks
+---------------
+
+Polish opening quote and French quotes are available as ligatures
+ ,, << and >>
+respectively.
+
+Hyphenation
+-----------
+
+From the point of view of TeX, the hyphenation rules depend on both language
+and font layout. Since there are a few potential layouts for the Polish
+diacritical letters (Mazovia, Latin 2, ECM), there are, in fact, a few Polish
+languages. The formats MeX and LaMeX provide a mechanism for smooth switching
+between different font layouts within one document. The command \layout
+(\layout{pl}, \layout{mazovia}, \layout{pone}, \layout{latintwo}) switches
+automaticly the respective hyphenation rules (or forbids hyphenating at all,
+if there is not enough room in TeX's memory to store all necessary
+patterns). After fixing a layout, one can switch forth and back between the
+Polish and English languages using the commands \language\polish and
+\language\english, resp.
+
+In Polish the words like `blah-blah' should by hyphenated rather
+ blah-
+ -blah
+(note the hyphen preceeding the second line) than
+ blah-
+ blah.
+A special command has been introduced, \=, providing a proper Polish
+hyphenation when put instead of an explicit hyphen (blah\=blah); the
+subwords may also be hyphenated if necessary. The original (PLAIN) meaning
+of \=, macron, is now assigned to the \macron command.
+
+Math mode
+---------
+
+The Polish diacritical characters may appear in math formulas (also as
+indices) only in text fonts. There are no Polish characters in math italic,
+since such characters are never used as single-character names of variables.
+
+Special Polish less-or-equal and greater-or-equal signs (see section 3.g in
+the chapter ``PL fonts'') are rendered by the macros \xleq (or \xle) and
+\xgeq (or \xge), respecticvely.
+
+Polish names for `tan', `cot', `tanh', `coth' are `tg', `ctg', `tgh', and
+`ctgh', respectively. The macros \tg, \ctg, \tgh, and \ctgh can be used to
+typeset them.
+
+A new macro, \arc, has been introduced. This macro, when followed by
+a function name (e.g., \arc\sin), typesets the word `arc' followed by a tiny
+space, followed by the function name. This is a usual way of typesetting
+in Polish the names of inverse trigonometric functions.
+
+Bilingual styles for LaMeX
+--------------------------
+
+Following the ideas of H. Partl and J. Schrod (implemented in the German TeX),
+bilingual versions of the styles article, book, letter, makeidx, openbib,
+proc, report and titlepa (renamed to iarticle, ibook, iletter, imakeidx,
+iopenbib, iproc, ireport and ititlepa, resp.) have been introduced. The
+commands \captionsenglish \dateenglish, \captionspolish and \datepolish can
+be used to switch between the Polish and English languages.
+
+Default values:
+---------------
+
+At the beginning of document processing the following defaults hold:
+ \frenchspacing
+ \nonprefixing
+ \layout{pl}
+ \language\polish
+
+\MeX and \LaMeX logos
+---------------------
+
+In MeX and LaMeX the command \MeX typesets the MeX logo using a current font.
+The \LaMeX command is accessible only in LaMeX and typesets the logo using
+the \rm font.
+
+Files
+=====
+
+The MeX package consists of the following kinds of files:
+
+ 1. The documentation files
+ 2. The TeX files
+ 3. The METAFONT files
+
+Below is the complete annotated list of all the files forming
+the MeX package. Please note that only the complete unchanged
+set of files, including the documentation files, may be distributed
+(see chapter ``Rules'').
+
+1. The documentation files
+
+ MEXINFO.ENG -- the file you are reading now
+ MEXINFO.POL -- a similar (but more detailed) text in Polish
+
+2. The TeX files
+
+ Macro files:
+ ------------
+
+ MEX.TEX -- Polish version of the PLAIN.TEX macro file
+ LAMEX.TEX -- Polish version of the LPLAIN.TEX macro file
+ MEX1.TEX -- an auxiliary file input by MeX and LaMeX
+ MEX2.TEX -- another auxiliary file input by MeX and LaMeX
+ MEXCONF.TEX -- a configuration file for MeX and LaMeX
+ PLHYPH.TEX -- Polish hyphenation patterns
+
+ Input filter files for emTeX (the TeX implementation by E. Mattes):
+ -------------------------------------------------------------------
+
+ MAZ2PL.PCT -- conversion table from the Mazovia to PL encoding
+ ISO2PL.PCT -- conversion table from the ISO 8859-2 (ISOLatin2) to PL encoding
+ LAT2PL.PCT -- conversion table from the IBM Latin2 (CP852) to PL encoding
+ WIN2PL.PCT -- conversion table from the Windows CP1250 to PL encoding
+ MAZ2PL.TCP, ISO2PL.TCP, LAT2PL.TCP WIN2PL.TCP --
+ ditto, the version for INITEX
+ MK-TCP.BAT -- batch file for translating from PCT to TCP
+
+ The DOS system batch files for generating the MEX.FMT and LAMEX.FMT files:
+ --------------------------------------------------------------------------
+
+ GM-MEX.BAT -- generate MEX.FMT (with built-in Mazovia filter)
+ GM-LAMEX.BAT -- generate LAMEX.FMT (with built-in Mazovia filter)
+ GI-MEX.BAT -- generate MEX.FMT (with built-in ISO 8859-2 filter)
+ GI-LAMEX.BAT -- generate LAMEX.FMT (with built-in ISO 8859-2 filter)
+ GL-MEX.BAT -- generate MEX.FMT (with built-in IBM Latin 2 filter)
+ GL-LAMEX.BAT -- generate LAMEX.FMT (with built-in IBM Latin 2 filter)
+ GW-MEX.BAT -- generate MEX.FMT (with built-in CP1250 filter)
+ GW-LAMEX.BAT -- generate LAMEX.FMT (with built-in CP1250 filter)
+
+
+ Additional style files for LaMeX
+ --------------------------------
+
+ IARTICLE.STY IMAKEIDX.STY IREPORT.STY
+ IBOOK.STY IOPENBIB.STY ITITLEPA.STY
+ ILETTER.STY
+
+3. The METAFONT files are listed in the section describing fonts.
+
+Acknowledgements
+================
+
+We are indebted to many people who helped us in the long-lasting
+project of adjusting TeX to the Polish language.
+
+Listing all of them is impossible. Nevertheless, we would like to
+express particularly warm thanks to the following persons:
+
+ Andrzej Blikle
+ W\l{}odzimierz Bzyl
+ Jacek Leszczy\l{}owski
+ Marian \L{}akomy
+ W\l{}odzimierz J. Martin
+ Frank Mittelbach
+ Gra\.zyna Nowak
+ Andrzej Odyniec
+ Piotr Pianowski
+ Tomasz Przechlewski
+ Stanis\l{}aw Szczyci\'nski
+ Roman Tomaszewski
+ Stanis\l{}aw Wawrykiewicz
+
diff --git a/Master/texmf-dist/doc/mex/base/mexinfo.pol b/Master/texmf-dist/doc/mex/base/mexinfo.pol
new file mode 100644
index 00000000000..0e132aba19a
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/base/mexinfo.pol
@@ -0,0 +1,875 @@
+%% Plik w notacji prefiksowej (/a/c/e/l/n/o/s/x/z /A/C/E/L/N/O/S/X/Z, //)
+%% konwersja na dowolny ,,standard'' polskich liter patrz programy w:
+%% ftp://ftp.gust.org.pl/pub/TeX/tools/PL-konwertery/
+----------------------------------------------------------------------------
+MEXINFO.POL: plik informacyjny opisuj/acy pakiet MeX 1.05, 18 grudnia 1993 r.
+niewielkie zmiany w dokumentacjach: 8 listopada 1997 r.
+----------------------------------------------------------------------------
+
+Co to jest MeX?
+===============
+
+MeX jest pakietem plik/ow do TeX-a i METAFONT-a.
+TeX jest systemem sk/ladu drukarskiego, a METAFONT jest systemem
+do generowania font/ow; oba zosta/ly stworzone przez prof. Donalda E. Knutha.
+
+Wi/ekszo/s/c u/zytkownik/ow TeX-a wykorzystuje go wraz ze standardowym
+oprogramowaniem: z pakietami makr o nazwach PLAIN oraz LaTeX. (Pakiety
+makr s/a te/z nazywane ,,formatami''.) MeX jest adaptacj/a format/ow PLAIN
+i LaTeX (v.209) do sk/ladu w j/ezyku polskim z uwzgl/ednieniem polskich
+zwyczaj/ow drukarskich.
+
+Pakiet MeX sk/lada si/e z:
+
+ -- font/ow (w postaci /xr/od/lowych plik/ow METAFONT-owych)
+ zawieraj/acych polskie znaki diakrytyczne i dodatkowe u/zywane
+ w j/ezyku polskim znaki cudzys/low/ow
+ -- regu/l dzielenia wyraz/ow w j/ezyku polskim
+ -- plik/ow makr TeX-owych (w wersji /xr/od/lowej), zwanych MeX i LaMeX,
+ umo/zliwiaj/acych sk/lad tekst/ow w j/ezyku polskim.
+
+Autorzy
+=======
+
+Fonty:
+ Bogus/law Jackowski (BJ) i Marek Ry/cko (MR),
+ konsultacja: Roman Tomaszewski
+
+Formaty MeX i LaMeX (polska wersja pakiet/ow makr PLAIN i LaTeX209):
+ MR & BJ.
+
+Polskie wzorce dzielenia wyraz/ow:
+ Hanna Ko/lodziejska (HK),
+ BJ & MR.
+ (Patrz ,,Historia powstania pakietu MeX'')
+
+Zasady rozpowszechniania
+========================
+
+MeX jest dobrem wsp/olnym (ang. ,,public domain'').
+
+Pakiet MeX mo/ze by/c rozpowszechniany wy/l/acznie w niezmienionej postaci
+i w komplecie zawieraj/acym wszystkie sk/ladaj/ace si/e na/n pliki (patrz
+rozdzia/ly ,,Pliki'' oraz ,,Fonty PL''). W szczeg/olno/sci musz/a
+znajdowa/c si/e w nim niezmienione pliki MEXINFO.ENG i MEXINFO.POL.
+
+Rozpowszechnianie pakietu MeX jest dozwolone, a nawet wskazane.
+Musi by/c jednak zachowany jeden z nast/epuj/acych warunk/ow:
+ 1. albo rozpowszechnianie jest bezp/latne
+ 2. albo rozpowszechnianie jest p/latne i w/owczas:
+ a) mo/zna pobra/c jedynie op/lat/e manipulacyjn/a na pokrycie koszt/ow
+ dystrybucji jasno stwierdzaj/ac, /ze nie jest to op/lata za produkt
+ ani za licencj/e do jego u/zywania,
+ b) op/lata manipulacyjna za udost/epnienie jednej dyskietki
+ nie mo/ze przekroczy/c ceny tej dyskietki.
+
+Pakiet MeX nie podlega gwarancji /zadnego rodzaju. Autorzy nie ponosz/a
+odpowiedzialno/sci za konsekwencje jego u/zywania.
+
+Ponadto u/zytkownik musi stosowa/c si/e do okre/slonych przez
+D. E. Knutha regu/l dotycz/acych wykorzystania TeX-a, METAFONT-a
+i zwi/azanego z nimi oprogramowania.
+
+Jak kontaktowa/c si/e z autorami
+==============================
+
+Korespondencj/e do autor/ow mo/zna kierowa/c poprzez
+Polsk/a Grup/e U/zytkownik/ow Systemu TeX ,,GUST''.
+
+Bie/z/acy adres GUST-u:
+
+Polska Grupa U\.zytkownik\'ow Systemu TeX ,,GUST''
+Instytut Matematyki Uniwersytetu Gda\'nskiego
+ul. Wita Stwosza 57
+80-952 Gda\'nsk
+POLAND
+http://www.gust.org.pl
+
+Wszelkie uwagi dotycz/ace pakietu MeX s/a mile widziane.
+
+Historia powstania pakietu MeX
+==============================
+
+Pakiet MeX powsta/l w firmie ,,MacroSoft'' Sp. z o. o. w Warszawie.
+
+Powsta/l na bazie poprzedniej polskiej adaptacji TeX-a, nosz/acej nazw/e
+LeX. Sk/lada/ly si/e na ni/a pliki makr oraz rodzina font/ow P1. BJ & MR,
+autorzy LeX-a, pracowali nad t/a wersj/a od listopada 1987 do grudnia 1989.
+MeX jest udoskonalon/a wersj/a LeX-a, wykorzystuj/ac/a nowe mo/zliwo/sci
+TeX-a 3.x.
+
+Zestaw wzorc/ow, zawieraj/acy regu/ly dzielenia polskich wyraz/ow
+wykorzystany w formacie LeX zosta/l zaprojektowany i utworzony
+przez HK w 1987, a przystosowany do formatu LeX, przetestowany
+i uzupe/lniony -- przez BJ & MR w latach 1987--1989.
+
+W firmie ,,MacroSoft'' Sp. z o. o. zosta/ly wykonane nast/epuj/ace prace:
+
+ -- udoskonalenie regu/l dzielenia wyraz/ow i dostosowanie ich do nowych
+ mo/zliwo/sci TeX-a 3.x -- HK, lipiec--sierpie/n 1991
+
+ -- przej/scie od formatu LeX, wersja 1.75, do formatu MeX, wersja 1.01,
+ oraz od font/ow P1 do font/ow PL, wersja 1.01 -- BJ & MR,
+ pa/xdziernik 1991--luty 1992.
+
+Autorzy dzi/ekuj/a firmie ,,MacroSoft'' za zapewnienie warunk/ow
+umo/zliwiaj/acych wykonanie tych prac.
+
+Wa/zniejsze zmiany od czasu powstania pakietu MeX 1.01
+=====================================================
+
+Wersja 1.03, 18 grudnia 1992 r.:
+ -- wyeliminowano przykry b/l/ad z nieprawid/lowym zachowaniem makra
+ \notin i makr pokrewnych (przepraszamy -- BJ & MR);
+ -- dodano makra \emulateplain i \emulateLaTeX s/lu/z/ace do emulacji
+ format/ow plain i LaTeX209 odpowiednio wewn/atrz format/ow MeX
+ i LaMeX;
+ -- poprawiono dyskretyzacj/e niekt/orych polskich znak/ow;
+ -- zmieniono kolejno/s/c czytania plik/ow w programach METAFONT-owych,
+ tak aby nie by/lo konieczne tworzenie formatu CM.BAS;
+ -- dokonano kilku innych, kosmetycznych zmian, g/l/ownie w komentarzach.
+
+Wersja 1.05, 18 grudnia 1993 r.:
+ -- wyeliminowano b/l/ad (przepraszamy -- BJ & MR), wskutek kt/orego
+ niekt/ore znaki mia/ly przypisan/a nieprawid/low/a kategori/e,
+ mianowicie zbyt wiele znak/ow mia/lo kategori/e ,,litera''
+ (\catcode=11); powodowa/lo to m. in., /ze w akcentowanym s/lowie
+ ,,r\^^Dole'' sygnalizowany by/l b/l/ad ,,nieznany symbol kontrolny
+ \^^Dole'', podczas gdy wszystko by/loby dobrze, gdyby znak ^^D
+ nie mia/l kategorii ,,litera''; obecnie (na pocz/atku pracy MeX-a
+ lub LaMeX-a) znaki o kodach 0--127 maj/a kategorie dok/ladnie takie
+ same, jak w odpowiednich formatach angielskich, natomiast w/sr/od
+ znak/ow o kodach powy/zej 127 obowi/azuje nast/epuj/aca zasada:
+ znaki o kodach odpowiadaj/acych pozycjom polskich znak/ow
+ diakrytycznych w uk/ladzie PL maj/a kategori/e ,,litera'',
+ pozosta/le znaki maj/a kategori/e ,,inny'' (\catcode=12);
+ -- pliki MFJ, jako zwi/azane z instalacj/a em-TeX-ow/a, zosta/ly
+ umieszczone razem z plikami instalacyjnymi dla em-TeX-a
+ (plik GPLMODES.MFJ zosta/l dostosowany do nowych wersji sterownik/ow
+ Eberharda Matesa);
+ pozosta/le pliki METAFONT-owe nie uleg/ly /zadnym zmianom
+ i zachowa/ly dotychczasowy numer wersji (1.03);
+ -- zrezygnowano z pakowania plik/ow do cel/ow dystrybucyjnych;
+ w zwi/azku z tym nie ma potrzeby do/l/aczania programu LHa
+ do zestawu dystrybucyjnego MeX-a.
+
+Instalacja format/ow MeX i LaMeX
+================================
+
+Do rozpocz/ecia pracy z polsk/a wersj/a format/ow PLAIN oraz LaTeX (v.209)
+niezb/edne jest utworzenie za pomoc/a wersji inicjalizacyjnej programu TeX
+(INITEX) plik/ow MEX.FMT i LAMEX.FMT i umieszczenie ich w odpowiednim
+miejscu zale/znym od u/zytego systemu operacyjnego i od implementacji TeX-a.
+W plikach FMT zapami/etane s/a w skondensowanej postaci makra oraz regu/ly
+przenoszenia wyraz/ow.
+
+Przed utworzeniem plik/ow MEX.FMT i LAMEX.FMT u/zytkownik powinien
+przygotowa/c w miejscu dost/epnym dla TeX-a, np. w bie/z/acym katalogu,
+zestaw plik/ow /xr/od/lowych:
+ MEX.TEX, LAMEX.TEX, MEX1.TEX, MEX2.TEX, MEXCONF.TEX, PLHYPH.TEX
+oraz /xr/od/lowe wersje oryginalnych format/ow angielskoj/ezycznych
+przystosowanych do TeX-a 3.x, tj.:
+ PLAIN.TEX, LATEX.TEX, LPLAIN.TEX, LFONTS.TEX, HYPHEN.TEX.
+
+(Pliki PLAIN.TEX i LFONTS.TEX zawieraj/a mi/edzy innymi list/e font/ow
+wykorzystywanych przez angielskoj/ezyczne wersje format/ow PLAIN i LaTeX
+(v.209). W typowych wersjach plik/ow PLAIN.TEX i LFONTS.TEX wi/ekszo/s/c
+font/ow ma nazwy rozpoczynaj/acych si/e od ,,cm''. W czasie generacji
+plik/ow MEX.FMT i LAMEX.FMT przedrostek ,,cm'' zamieniany jest
+automatyczne na ,,pl'' -- nie myli/c z ,,p1'' -- i do plik/ow FMT s/a
+wbudowywane informacje o fontach PL. Plik/ow z fontami CM mo/ze w tym
+czasie w og/ole nie by/c w pami/eci.)
+
+Spos/ob generowania plik/ow FMT zale/zy od systemu operacyjnego i od
+implementacji TeX-a.
+
+Wi/ekszo/s/c najnowszych implementacji TeX-a, w tym emTeX (autorstwa
+Eberharda Mattesa), ma mo/zliwo/s/c automatycznej zamiany kod/ow znak/ow
+czytanych z pliku na kody wewn/etrzne TeX-a. Pozwala to na wykorzystanie
+pe/lni mo/zliwo/sci TeX-a przy jednoczesnym uniezale/znieniu si/e od sposobu
+kodowania polskich liter w danej instalacji komputera.
+
+W pakiecie MeX znajduj/a si/e pliki wsadowe (ang. batch files) s/lu/z/ace do
+generowania plik/ow FMT pod kontrol/a systemu operacyjnego MS-DOS przy
+u/zyciu emTeX-a (np. TEX386.EXE). Pliki te wykorzystuj/a tabele konwersji
+zapisane w postaci /xr/od/lowej w plikach MAZ2PL.PCT, ISO2PL.PCT, LAT2PL.PCT
+i WIN2PL.PCT a w postaci przygotowanej do pracy z INITEX-em w plikach
+MAZ2PL.TCP, ISO2PL.TCP, LAT2PL.TCP i WIN2PL.TCP. (Pliki TCP powstaj/a
+z plik/ow PCT po wykonaniu komendy MK-TCP.BAT.)
+
+Je/sli u/zytkownik wykorzystuje kodowanie polskich liter w systemie Mazovia,
+powinien utworzy/c pliki FMT za pomoc/a GM-MEX.BAT (generowanie MEX.FMT)
+oraz GM-LAMEX.BAT (generowanie LAMEX.FMT) i odpowiednio:
+kodowanie w ISO8859-2 (ISO LAtin2) -- GI-MEX.BAT oraz GI-LAMEX.BAT.
+kodowanie w Latin 2 (CP852) -- GL-MEX.BAT oraz GL-LAMEX.BAT.
+kodowanie w Windows (CP1250) -- GW-MEX.BAT oraz GW-LAMEX.BAT.
+
+Utworzone w ten spos/ob pliki FMT nale/zy przenie/s/c do odpowiednich
+kartotek.
+
+Konfigurowanie format/ow
+-----------------------
+
+W momencie rozpocz/ecia pracy ze standardow/a konfiguracj/a format/ow MeX
+i LaMeX obowi/azuj/a nast/epuj/ace zasady opisane w pliku MEXCONF.TEX:
+
+ 1. bie/z/acym j/ezykiem jest j/ezyk polski,
+ 2. stosowanym uk/ladem polskich znak/ow diakrytycznych w fontach
+ jest uk/lad PL (nie myli/c ze sposobem kodowania znak/ow
+ w plikach wej/sciowych),
+ 3. obowi/azuj/acym sposobem notacji polskich znak/ow w plikach wej/sciowych
+ jest notacja jednoznakowa (bezprefiksowa) -- zwykle jest to
+ Mazovia lub Latin 2, zale/znie od stosowanej tabeli konwersji
+ znak/ow wej/sciowych,
+ 4. obowi/azuj/acym sposobem spacjowania po znakach przestankowych jest
+ \frenchspacing, tzn. wielko/s/c odst/ep/ow mi/edzywyrazowych nie zale/zy
+ od tego jaki znak poprzedza odst/ep.
+
+U/zytkownik mo/ze zmieni/c te zasady modyfikuj/ac plik MEXCONF.TEX
+(p. informacje zawarte w tym pliku).
+
+Podr/ecznik U/zytkownika pakietu MeX
+==================================
+
+Polskie znaki diakrytyczne
+--------------------------
+
+W standardowej konfiguracji format/ow MeX i LaMeX polskie znaki diakrytyczne
+zapisywane s/a jako zwyk/le znaki o kodach zale/znych od standardu
+stosowanego na danym komputerze (zwykle Mazovia lub Latin 2). Pozwala to na
+bardzo wygodne sk/ladanie tekst/ow z u/zyciem TeX-a: polskie litery widoczne
+s/a na ekranie w trakcie przygotowywania tekstu, ponadto mo/zliwe jest
+definiowanie polskich komend TeX-owych, jak np. \/swiat/lo, \/slad,
+\/z/o/l/c, itp.
+
+Niezale/znie od standardu kodowania polskich znak/ow mo/zliwe jest
+w formatach MeX i LaMeX w/l/aczenie za pomoc/a komendy \prefixing tzw.
+notacji prefiksowej. (Notacj/e bezprefiksow/a, obowi/azuj/aca na pocz/atku
+przetwarzania ka/zdego dokumentu, przywraca komenda \nonprefixing.)
+
+W notacji prefiksowej specyficznie polska litera, taka jak ,,/a'', ,,/s''
+czy ,,/l'' zapisywana jest w pliku danych dla MeX-a za pomoc/a dw/och
+znak/ow, z kt/orych pierwszy to znak ,,//'' (,,ciach'', ang. slash). Litery
+ /a /c /e /l /n /o /s /x /z /A /C /E /L /N /O /S /X /Z
+zapisywane s/a odpowiednio jako:
+ //a //c //e //l //n //o //s //x //z //A //C //E //L //N //O //S //X //Z
+
+Poniewa/z znak // zosta/l w notacji prefiksowej wykorzystany do oznaczania
+polskich liter, konieczna jest dodatkowa konwencja notacyjna pozwalaj/aca
+uzyska/c w druku symbol ,,ciach''. W MeX-u przyj/eto naturaln/a zasad/e
+reprezentowania znaku ,,ciach'' poprzez //// (2 znaki ,,ciach''). Mo/zna
+r/ownie/z u/zywa/c komendy \normalslash.
+
+Nale/zy zwr/oci/c uwag/e, /ze oznaczenie //z, kt/ore mog/loby reprezentowa/c
+albo ,,/z'' albo ,,/x'', zdecydowano przypisa/c literze ,,/z'' jako znacznie
+cz/e/sciej u/zywanej (w bie/z/acym zdaniu u/zyta zosta/la pi/e/c razy, nie
+licz/ac cytat/ow). Litera ,,/x'' jest zapisywana w postaci //x, poniewa/z
+klawisz ,,X'' zwykle s/asiaduje z klawiszem ,,Z'' i jest rzadko u/zywany
+w j/ezyku polskim.
+
+UWAGI:
+
+1. Podczas obowi/azywania notacji prefiksowej znak ,,//'' jest znakiem
+ aktywnym (kategoria 13). /Swiadomie zrezygnowano ze stosowanego niekiedy
+ sposobu uzyskiwania znak/ow diakrytycznych poprzez ligatury.
+
+2. Nale/zy pami/eta/c, /ze w czasie pisania do pliku za pomoc/a komendy
+ \write makra s/a rozwijane. Dotyczy to w szczeg/olno/sci makra ,,//''
+ i trzeba na to zwraca/c uwag/e przy pisaniu do plik/ow, kt/ore maj/a
+ by/c potem czytane przez TeX-a. Format LaMeX automatycznie przejmuje
+ kontrol/e nad odpowiednim pisaniem i czytaniem standardowych plik/ow
+ pomocniczych (np. pliku ze spisem tre/sci).
+
+Cudzys/lowy
+----------
+
+``Anglosaski'' spos/ob pisania cudzys/low/ow jest niezgodny z polskimi
+zwyczajami. Polski cudzys/l/ow otwieraj/acy znajduje si/e na wysoko/sci
+linii bazowej pisma i ma kszta/lt zbli/zony do dw/och przecink/ow.
+
+Formaty MeX i LaMeX oraz fonty PL zosta/ly tak skonstruowane, /ze polski
+cudzys/l/ow otwieraj/acy zapisuje si/e w pliku danych wej/sciowych jako dwa
+przecinki, a cudzys/l/ow zamykaj/acy (podobnie jak w j/ezyku angielskim) jako
+dwa apostrofy. To s/a w/la/snie ,,polskie'' cudzys/lowy.
+
+Niekiedy w j/ezyku polskim u/zywany jest te/z drugi rodzaj cudzys/low/ow,
+tzw. cudzys/lowy <<francuskie>>. Lewy francuski cudzys/l/ow oznaczany
+jest dwoma znakami mniejszo/sci, a prawy dwoma znakami wi/ekszo/sci.
+
+Przy zamianie znak/ow ,, '' << i >> na odpowiednie cudzys/lowy wykorzystywany
+jest TeX-owy mechanizm ligatur. Informacje o ligaturach wbudowane s/a do
+font/ow PL. W zestawie font/ow PL fonty stosowane do sk/ladu formu/l
+matematycznych oraz fonty nieproporcjonalne (np. w/l/aczane komend/a \tt) nie
+zawieraj/a jednak mechanizmu tworzenia ligatur zwi/azanych z cudzys/lowami.
+Cudzys/lowy mo/zna wtedy pisa/c poprzez u/zycie komend \plqq, \prqq, \flqq
+oraz \frqq (\plqq i \prqq oznaczaj/a odpowiednio lewe i prawe polskie
+cudzys/lowy, \flqq i \frqq oznaczaj/a odpowiednio lewe i prawe francuskie
+cudzys/lowy).
+
+Dzielenie wyraz/ow
+-----------------
+
+Z punktu widzenia TeX-a zasady dzielenia wyraz/ow zale/z/a zar/owno od
+j/ezyka, jak te/z od uk/ladu liter w bie/z/acym foncie. W zwi/azku z tym dla
+TeX-a istnieje kilka ,,j/ezyk/ow polskich''. W konsekwencji je/sli
+u/zytkownik prze/l/acza si/e na font o innym uk/ladzie (innych kodach)
+polskich znak/ow diakrytycznych, to towarzyszy/c temu powinno prze/l/aczenie
+TeX-a na inne regu/ly przenoszenia wyraz/ow.
+
+Pakiet MeX przygotowany jest do pracy z fontami w uk/ladzie PL jako
+podstawowymi oraz dodatkowo z fontami zawieraj/acymi polskie litery
+w po/lo/zeniach zgodnych z kodem Mazovia, Latin 2 oraz P1.
+
+Podczas tworzenia plik/ow MEX.FMT i LAMEX.FMT standardowo wbudowywane s/a
+regu/ly przenoszenia wyraz/ow:
+ a) w j/ezyku angielskim,
+ b) w j/ezyku polskim dla u/zytkownik/ow stosuj/acych fonty w uk/ladzie PL.
+
+U/zytkownik, zale/znie od wielko/sci dost/epnej pami/eci, mo/ze wbudowa/c do
+formatu regu/ly przenoszenia dla innych uk/lad/ow polskich font/ow. Wystarczy
+w tym celu dokona/c prostej modyfikacji pliku konfiguracyjnego MEXCONF.TEX.
+Odpowiednie makra formatu MeX lub LaMeX automatycznie przeczytaj/a
+odpowiedni/a liczb/e razy ten sam plik zawieraj/acy polskie regu/ly
+przenoszenia (PLHYPH.TEX), za ka/zdym razem interpretuj/ac go w inny spos/ob.
+
+Zale/znie od informacji wpisanych w pliku MEXCONF.TEX podczas generowania
+plik/ow FMT, w czasie p/o/xniejszego sk/ladania tekst/ow, przy zmianie
+uk/ladu fontu z polskimi znakami diakrytycznymi MeX (lub LaMeX) b/edzie
+w/l/acza/l b/ad/x ZAKAZ przenoszenia wyraz/ow (je/sli odpowiednie wzorce nie
+zosta/ly wbudowane) b/ad/x regu/ly przenoszenia odpowiednie dla tego uk/ladu.
+
+Polskie regu/ly ortograficzne zalecaj/a by wyrazy /l/aczone, takie jak np.
+,,d/zentelmen-w/lamywacz'', przenosi/c w nast/epuj/acy spos/ob:
+ d/zentelmen-
+ -w/lamywacz.
+Dozwolony jest oczywi/scie podzia/l wewn/atrz pierwszego b/ad/x drugiego
+cz/lonu wyrazu, np.
+ d/zen-
+ telmen-w/lamywacz.
+
+W j/ezyku angielskim nie powtarza si/e /l/acznika na pocz/atku drugiego
+wiersza. Z tego powodu w polskiej wersji zosta/la wprowadzona komenda \=,
+kt/ora u/zyta w miejsce /l/acznika (d/zentelmen\=w/lamywacz) zapewnia
+dzielenie s/l/ow z/lo/zonych zgodne z wy/zej opisan/a zasad/a.
+
+UWAGA:
+Poniewa/z w formatach PLAIN i LaTeX komenda \= oznacza akcent ,,macron'',
+w formatach MeX i LaMeX wprowadzona zosta/la w to miejsce komenda \macron.
+
+Uk/lady polskich font/ow
+----------------------
+
+Standardowym uk/ladem polskiego fontu jest uk/lad PL (p. rozdzia/l
+,,Fonty PL''). Dopuszczalne jest jednak stosowanie font/ow o innych
+ni/z PL uk/ladach polskich znak/ow, a nawet mieszanie r/o/znych uk/lad/ow
+w obr/ebie jednego dokumentu. Mo/zliwe jest to dzi/eki komendzie \layout.
+
+Nast/epuj/ace wywo/lania komendy \layout:
+ \layout{pl}
+ \layout{mazovia}
+ \layout{latintwo}
+ \layout{pone}
+s/lu/z/a do przestawienia systemu MeX lub LaMeX do pracy z fontami
+w uk/ladach odpowiednio:
+ PL -- standardowy uk/lad PL
+ Mazovia -- polskie znaki (w foncie!) w pozycjach takich jak w kodzie
+ Mazovia, cudzys/l/ow otwieraj/acy -- kod 255
+ Latin 2 -- polskie znaki (w foncie!) w pozycjach takich jak w kodzie
+ Latin 2, cudzys/l/ow otwieraj/acy -- kod 255
+ P1 -- uk/lad font/ow P1 (u/zywany dawniej z formatem LeX)
+
+Wykonanie komendy \layout polega na:
+ -- w przypadku w/l/aczania uk/ladu PL, kt/ory jest standardowym,
+ wyr/o/znionym uk/ladem:
+ * przypisanie polskim znakom diakrytycznym kategorii ,,litera'',
+ w przypadku w/l/aczania uk/ladu innego ni/z PL:
+ * przypisanie polskim znakom diakrytycznym kategorii ,,aktywny''
+ i zdefiniowanie ich jako makr rozwijaj/acych si/e do odpowiednich
+ liter,
+ -- odpowiednia zmiana tablicy \sfcode,
+ -- utworzenie tablic \uccode i \lccode zgodnych z uk/ladem fontu,
+ -- przypisanie pozycjom polskich znak/ow w foncie odpowiednich kod/ow
+ matematycznych,
+ -- w/l/aczenie regu/l przenoszenia wyraz/ow w j/ezyku polskim
+ zgodnych z uk/ladem fontu, je/sli takie regu/ly zosta/ly przeczytane
+ podczas tworzenia pliku FMT -- patrz rozdzia/ly ,,Instalacja format/ow
+ MeX i LaMeX'' oraz ,,Dzielenie wyraz/ow''; je/sli nie ma odpowiednich
+ regu/l, w/l/aczany jest zakaz dzielenia wyraz/ow,
+ -- nadanie odpowiedniego znaczenia symbolowi \polish; od tego momentu
+ komenda \language\english mo/ze s/lu/zy/c do w/l/aczania angielskich
+ regu/l dzielenia wyraz/ow, a komenda \language\polish do w/l/aczania
+ dzielenia wyraz/ow w j/ezyku polskim wzgl/edem bie/z/acego uk/ladu
+ fontu,
+ -- przypisanie nowego znaczenia notacji prefiksowej, gdyby by/la u/zywana
+ (dzi/eki temu zawsze //a //c //e itp. odwo/luj/a si/e do pozycji
+ znak/ow w bie/z/acym uk/ladzie fontu), odpowiednio zmieniaj/a si/e
+ te/z znaczenia komend \plqq\prqq \flqq\frqq.
+
+Nale/zy zwr/oci/c uwag/e, /ze komenda \layout przygotowuje tylko system MeX
+lub LaMeX do pracy z fontami w odpowiednim uk/ladzie, nie w/l/acza jednak
+samego fontu.
+
+Zaleca si/e stosowanie makra \layout lokalnie (wewn/atrz nawias/ow
+grupowych), ze wzgl/edy na brak komendy odwo/luj/acej zmiany spowodowane
+jego u/zyciem.
+
+(Niezale/znie od obowi/azuj/acego uk/ladu fontu i zmieniaj/acego si/e wraz
+z tym uk/ladem znaczenia symbolu \polish, symbole \pllanguage,
+\mazovialanguage, \latintwolanguage, \ponelanguage oznaczaj/a numery
+j/ezyk/ow w sensie TeX-a, czyli numery odpowiednich regu/l dzielenia
+wyraz/ow. Mo/zna wi/ec w razie potrzeby pisa/c \language\mazovialanguage itp.
+Dla jednolito/sci przyj/eto, /ze symbol \englishlanguage oznacza to samo co
+\english.)
+
+Sk/ladanie formu/l matematycznych
+-------------------------------
+
+W formu/lach matematycznych jest bardzo niewiele element/ow
+zale/znych od j/ezyka. R/ownanie $2x^2+3x-1=0$ wygl/ada tak samo w tek/scie
+napisanym w j/ezyku polskim, jak i w tek/scie angielskim. Zwykle stosuje
+si/e w matematyce jednoliterowe oznaczenia obiekt/ow matematycznych
+i polskie znaki diakrytyczne nie s/a u/zywane do tego celu.
+
+Pewne sytuacje wymagaj/a stosowania w matematyce nazw wieloliterowych.
+Zar/owno w TeX-u, jak i w jego polskiej wersji nale/zy w takim przypadku
+okre/sla/c jawnie nazw/e kroju pisma, kt/ore ma by/c u/zyte, na przyk/lad:
+ $$\it obj/eto/s/c=wysoko/s/c \times szeroko/s/c \times g/l/eboko/s/c$$
+Komenda \it jest poleceniem wykonywania sk/ladu kursyw/a tekstow/a (a nie
+matematyczn/a).
+
+Polskie litery mog/a by/c u/zywane w formu/lach matematycznych w indeksach
+g/ornych i dolnych, np.:
+ $$x_{\rm /srednie} = {{x_{\rm ma/le} + x_{\rm du/ze}} \over 2}$$
+
+Je/sli w danym momencie obowi/azuje notacja prefiksowa, dotyczy ona r/ownie/z
+formu/l matematycznych.
+
+Stosowane w Polsce znaki mniejsze-r/owne i wi/eksze-r/owne r/o/zni/a si/e od
+znak/ow w fontach CM zaprojektowanych przez D. E. Knutha (p. rozdzia/l
+,,Fonty PL''). Fonty PL (/sci/slej PLSY) zawieraj/a odpowiednie znaki,
+a uzyska/c je mo/zna za pomoc/a komend odpowiednio \xleq lub \xle oraz
+\xgeq lub \xge.
+
+W Polsce u/zywa si/e nazw ,,tg'', ,,ctg'', ,,tgh'' i ,,ctgh'' zamiast
+,,tan'', ,,cot'', ,,tanh'' i ,,coth''. Formaty MeX i LaMeX zawieraj/a
+komendy \tg, \ctg, \tgh, oraz \ctgh do sk/ladania nazw tych funkcji
+w formu/lach matematycznych. Dodatkowo wprowadzona zosta/la komenda
+\arc, kt/ora w po/l/aczeniu z takimi komendami jak \sin, \cos, itp.
+(\arc\sin, \arc\cos) umieszcza w sk/ladzie napis ,,arc sin'',
+,,arc cos'' z odpowiednio ma/lym odst/epem mi/edzy s/lowem ,,arc''
+i nazw/a funkcji.
+
+Polskie ,,style'' do formatu LaMeX
+----------------------------------
+
+W LaTeX209 styl dokumentu okre/slany jest komend/a \documentstyle.
+Parametrem tej komendy jest nazwa pliku zawieraj/acego opis tego stylu:
+article, report, book, letter itd. Oryginalnych wersji tych plik/ow nie
+mo/zna zastosowa/c do sk/ladu w j/ezyku polskim ze wzgl/edu na wstawiane
+automatycznie angielskie s/lowa takie jak ,,Chapter'', ,,Figure'',
+,,Table of Contents'' itp.
+
+Cz/e/sci/a pakietu MeX s/a specjalne wersje tych plik/ow, przystosowane do
+sk/ladu tekst/ow w j/ezyku polskim lub angielskim. S/a to: iarticle, ibook,
+iletter, imakeidx, iopenbib, iproc, ireport, ititlepa. U/zycie jednego
+z tych styl/ow powoduje umieszczanie w sk/ladzie odpowiednich polskich
+s/l/ow takich jak ,,Rozdzia/l'', ,,Rysunek'', ,,Spis tre/sci'' itp. oraz
+sk/ladanie daty (automatycznie lub za pomoc/a komendy \today) po polsku.
+
+Style iarticle, ireport itp. mog/a by/c u/zywane r/ownie/z do sk/ladania
+tekst/ow w j/ezyku angielskim. Wymaga to u/zycia na pocz/atku dokumentu
+komend:
+ \captionsenglish \dateenglish
+Polskie nazewnictwo przywracaj/a komendy
+ \captionspolish \datepolish.
+
+(Implementacja styl/ow iarticle, ireport itp. zosta/la oparta na pomys/lach
+H. Partla i J. Schroda, wykorzystanych w niemieckiej wersji LaTeX-a.)
+
+Komendy s/lu/z/ace do sk/ladania nazw format/ow MeX i LaMeX
+-----------------------------------------------------------
+
+W formatach MeX i LaMeX komenda \MeX s/lu/zy do z/lo/zenia nazwy ,,MeX''
+z u/zyciem liter z bie/z/acego fontu.
+
+W formacie LaMeX komenda \LaMeX s/lu/zy do z/lo/zenia nazwy ,,LaMeX''
+krojem pisma \rm odpowiedniej wielko/sci.
+
+Fonty PL (polskie rozszerzenie font/ow CM)
+=========================================
+
+ 0. Fonty PL przeznaczone s/a do sk/ladania polskich lub polsko-angielskich
+ tekst/ow przy u/zyciu format/ow MeX i LaMeX. Obecnie mog/a te/z by/c do
+ sk/ladu przy u/zyciu pakietu PLaTeX polonizuj/acego LaTeX2e (autorstwa
+ Mariusza Olko i Marcina Woli/nskiego):
+ ftp:////ftp.gust.org.pl//pub//TeX//language//polish//platex-1.0.zip
+ lub ftp:////ftp.dante.de//tex-archive//language//polish//platex-1.0.zip
+
+ Autorzy starali si/e zachowa/c ,,ducha CM-/ow'' przy projektowaniu
+ polskich znak/ow diakrytycznych. Np. przekre/slenie ma/lej litery
+ ,,/l'' zosta/lo nieco tylko powi/ekszone w stosunku do przekre/slenia
+ font/ow rodziny CM (METAFONT-owy program ,,Cross for Polish l and L''
+ w pliku ACCENT.MF) umieszczanego w sk/ladzie komendami TeX-owymi
+ \l oraz \L, chocia/z w niekt/orych fontach autorzy ch/etnie
+ widzieliby przekre/slenie znacznie wyra/xniejsze. Podobnie podci/ecia
+ wstawiane automatycznie pomi/edzy znakami (implicit kerns) by/ly
+ dodawane raczej ostro/znie. Np. zdaniem autor/ow podci/ecie mi/edzy
+ polskim otwieraj/acym cudzys/lowem (,,) a liter/a ,,W'' b/ad/x ,,T''
+ mog/loby by/c znacznie wi/eksze, gdyby nie to, /ze w fontach CM nie
+ ma /zadnego podci/ecia mi/edzy liter/a ,,A'' a cudzys/lowem
+ zamykaj/acym ('').
+
+ Fonty PL, podobnie jak macierzyste fonty CM, projektowane by/ly
+ pod k/atem zastosowa/n profesjonalnych, tzn. urz/adze/n o wi/ekszych
+ rozdzielczo/sciach. Tym niemniej sporo wysi/lku w/lo/zono w prawid/low/a
+ dyskretyzacj/e przy ma/lych rozdzielczo/sciach (dla potrzeb wydruk/ow
+ testowych na drukarkach mozaikowych 9- i 24-ig/lowych). Gdyby mimo
+ to u/zytkownik mia/l inne zdanie ni/z METAFONT na temat dyskretyzacji,
+ w pakiecie emTeX autorstwa Eberharda Mattesa znajduje si/e program
+ o nazwie PKEDIT pozwalaj/acy r/ecznie korygowa/c wygenerowane za pomoc/a
+ METAFONT-a mapy bitowe.
+
+ 1. Fonty PL stanowi/a rozszerzenie standardowego zestawu rodziny
+ Computer Modern (CM) o polskie znaki diakrytyczne i bazuj/a na tych
+ samych plikach parametrycznych co fonty rodziny CM. Zmiany parametr/ow
+ odbiegaj/ace zbyt daleko od standardu zaproponowanego przez D. E. Knutha
+ mog/a spowodowa/c nieoczekiwane efekty (do b/l/edu w trakcie oblicze/n
+ w/l/acznie). Przyk/ladowo, za/lo/zone zosta/lo, /ze kursywa i grotesk
+ wykluczaj/a si/e.
+
+ Uk/lad font/ow PL charakteryzuje si/e tym, /ze znaki o kodach < 128
+ s/a identyczne ze znakami rodziny CM, natomiast polskim znakom
+ diakrytycznym przypisane zosta/ly kody > 127 (innych cech TeX-a 3.x
+ nie wykorzystuje si/e). Polskie znaki diakrytyczne maj/a kody zgodne
+ z uk/ladem ECM (Extended Computer Modern, Cork encoding), natomiast
+ cudzys/lowy maj/a kody niestandardowe (w ECM cudzys/lowy maj/a
+ kody < 127):
+
+ /A -- 129 /a -- 161
+ /C -- 130 /c -- 162
+ /E -- 134 /e -- 166
+ /L -- 138 /l -- 170
+ /N -- 139 /n -- 171
+ /O -- 211 /o -- 243
+ /S -- 145 /s -- 177
+ /X -- 153 /x -- 185
+ /Z -- 155 /z -- 187
+
+ << (francuski cudzys/l/ow otwieraj/acy) -- 174
+ >> (francuski cudzys/l/ow zamykaj/acy) -- 175
+ ,, (polski cudzys/l/ow otwieraj/acy) -- 255
+
+ Uwagi:
+ * Fonty matematyczne PLMI, PLMIB oraz PLEX nie zawieraj/a polskich
+ znak/ow diakrytycznych i nie r/o/zni/a si/e od odpowiednich font/ow CM;
+ przedrostki CM zosta/ly zmienione na PL jedynie dla zachowania
+ jednorodno/sci.
+ * Podobnie font PLTEX10 to po prostu font CMTEX10 ze zmienion/a dla
+ jednolito/sci nazw/a; font CMTEX10 odzwierciedla uk/lad klawiatury
+ na komputerze u/zywanym przez profesora Knutha (D. E. Knuth,
+ ,,Computer Modern Typefaces'', str. 568), tym samym nie powinien
+ raczej zawiera/c polskich znak/ow diakrytycznych.
+ * Fonty PLSY zosta/ly poszerzone (w stosunku do CMSY) o znaki
+ ,,wi/eksze-r/owne'' i ,,mniejsze-r/owne'' odpowiadaj/ace
+ polskim zwyczajom drukarskim (dolna kreska sko/sna zamiast
+ poziomej); na konieczno/s/c takiego rozszerzenia zwr/oci/l
+ uwag/e p. W/lodzimierz J. Martin; majusku/ly kaligraficzne tych
+ font/ow (opisane w pliku CALU.MF) nie zosta/ly uzupe/lnione
+ o polskie znaki diakrytyczne.
+
+ 2. Jedynymi znakami ,,polskimi'' dost/epnymi poprzez ligatury s/a
+ cudzys/lowy (,, << >>). Polskie znaki diakrytyczne s/a dost/epne
+ albo bezpo/srednio, albo za pomoc/a komendy realizowanej przez
+ ,,aktywny ciach'' (//a //c //e //l //n //o //s //x //z //A //C
+ //E //L //N //O //S //X //Z) zaprogramowanej w formatach MeX i LaMeX
+ (p. opis u/zywania format/ow MeX i LaMeX). Istniej/a zasadnicze powody,
+ dla kt/orych autorzy nie wykorzystali do tego celu ligatur.
+
+ 3. Ze wzgl/edu na ograniczenie liczby r/o/znych wysoko/sci znak/ow w foncie
+ do 15 niezerowych, zrezygnowano z kusz/acego wype/lniania ,,g/ornej
+ po/l/owki'' fontu. Ponadto w programach METAFONT-owych podj/ete zosta/ly
+ zabiegi maj/ace na celu minimalizacj/e liczby r/o/znych wysoko/sci.
+ Niestety, mimo to w niekt/orych przypadkach liczba r/o/znych niezerowych
+ wysoko/sci przekracza 15. W takiej sytuacji METAFONT automatycznie
+ zmienia niekt/ore spo/sr/od wysoko/sci. Oznacza to, /ze w pewnych
+ (bardzo z/lo/sliwych i -- miejmy nadziej/e -- niezwykle rzadkich)
+ przypadkach mo/ze si/e zdarzy/c, /ze tekst czysto angielski z/lo/zony
+ fontami PL zostanie inaczej prze/lamany na strony ni/z tekst z/lo/zony
+ fontami CM.
+
+ 4. Starano si/e unika/c wprowadzania dodatkowych parametr/ow, co jednak
+ nie zawsze by/lo mo/zliwe. Szczeg/o/ly dotycz/ace mo/zliwo/sci zmiany
+ zachowania domy/slnego opisane s/a w pliku PL_DOD.MF. Przyk/lady u/zycia
+ opcjonalnych parametr/ow zmieniaj/acych zachowanie domy/slne znale/x/c
+ mo/zna w plikach /xr/od/lowych font/ow PLB10, PLBX5, PLBX6, PLBX7,
+ PLBX8, PLCSC10, PLDUNH10, PLFI10, PLFF10, PLITT10, PLR5, PLR6, PLR7,
+ PLR8, PLR9, PLR12, PLR17, PLSL8, PLSL9, PLSL12, PLSSQ8, PLSSQI8,
+ PLTCSC10, PLTI7, PLTI8, PLTI12 oraz PLVTT10.
+
+ 5. Programy opisuj/ace polskie znaki diakrytyczne zosta/ly oparte na
+ odpowiednich programach rodziny CM. Opisy polskich znak/ow
+ diakrytycznych stanowi/a niezale/zne programy, co jest zgodne
+ z og/oln/a filozofi/a program/ow rodziny CM (mo/zna by np.
+ zapami/etywa/c mapy bitowe liter ,,A'', ,,C'', ,,a'', ,,c'', ...,
+ itd., i te mapy bitowe modyfikowa/c; z takiego podej/scia i mu
+ podobnych zrezygnowano).
+
+ Nieco trickowe rozwi/azanie zastosowano w celu unikni/ecia duplikowania
+ plik/ow parametrycznych (PLB10, PLBX10, ..., itd.). Wykorzystano tu
+ METAFONT-ow/a zmienn/a ,,jobname'' do czytania odpowiednich plik/ow
+ parametrycznych rodziny CM. Pliki te powinny znajdowa/c si/e w kartotece
+ przeszukiwanej przez METAFONT-a w trakcie realizacji komendy ,,input''.
+
+ 6. Program dla polskiego cudzys/lowu otwieraj/acego zaczerpni/ety zosta/l
+ z program/ow rodziny CM. Natomiast kszta/lt cudzys/low/ow francuskich
+ zosta/l zaprojektowany i zaprogramowany ,,od zera''.
+
+ 7. Pierwsz/a i najwa/zniejsz/a faz/a pracy nad fontami PL by/lo
+ zaprojektowanie i zaprogramowanie kszta/lt/ow polskich znak/ow
+ diakrytycznych w sze/sciu podstawowych krojach: PLR, PLSS, PLBX, PLSSBX,
+ PLTT oraz PLTI (stopnie pisma od 5 do 17 punkt/ow).
+
+ Tym etapem pracy opiekowa/l si/e troskliwie p. Roman Tomaszewski,
+ wybitny polski typograf, cz/lonek zarz/adu Mi/edzynarodowego
+ Stowarzyszenia Typograficznego ATypI i zarazem przewodnicz/acy Polskiego
+ Oddzia/lu ATypI. Autorzy s/a mu g/l/eboko wdzi/eczni za /zyczliwe
+ wspieranie sw/a wiedz/a i do/swiadczeniem prac projektowych nad
+ fontami PL.
+
+ Pan Roman Tomaszewski zmar/l w grudniu 1992 roku.
+
+ 8. Akcenty nad minusku/lami ,,/c'' ,,/n'' ,,/o'' ,,/s'' ,,/x'' s/a takie
+ same jak wstawiany TeX-ow/a komend/a \' akcent ,,acute'', tyle /ze
+ w niekt/orych przypadkach s/a nieco przesuni/ete w poziomie. Natomiast
+ akcenty nad majusku/lami ,,/C'' ,,/N'' ,,/O'' ,,/S'' ,,/X'' s/a
+ wprawdzie konstruowane w oparciu o akcent ,,acute'', ale s/a nieco
+ ,,sp/laszczone'' (w przypadku odmian szeryfowych jest to zwyk/ly obr/ot,
+ natomiast w przypadku odmian bezszeryfowych -- obr/ot po/l/aczony
+ z pewn/a modyfikacj/a, ze wzgl/edu na konieczno/s/c zachowania poziomego
+ po/lo/zenia g/ornej i dolnej kraw/edzi akcentu oraz optycznej grubo/sci
+ kreski akcentowej). Wyj/atkowo w karykaturalnie smuk/lym foncie PLDUNH10
+ akcent nad minusku/lami i majusku/lami jest pochylony tak samo.
+
+ Powy/zsze zabiegi s/a zgodne z regu/lami sztuki typograficznej,
+ powoduj/a natomiast, /ze akcenty k/ladzione za pomoc/a TeX-owej komendy
+ \accent mog/a si/e istotnie r/o/zni/c od akcentowanych majusku/l
+ w fontach PL.
+
+ 9. Akcent nad literami ,,/z'' oraz ,,/Z'' jest taki sam jak kropka nad
+ liter/a ,,i'', czyli inny ni/z akcent wstawiany przez TeX-a (za pomoc/a
+ komendy \.). W literze ,,/z'' jest tak/ze umieszczony na tej samej
+ wysoko/sci co kropka nad ,,i'' (oczywi/scie nie w foncie kapitalikowym).
+ Dzi/eki temu w s/lowach takich jak ,,gwi/zd/ze'' czy ,,ni/zej'' kropka
+ zachowuje t/e sam/a wysoko/s/c. Niestety, w niekt/orych fontach rodziny
+ CM kropka nad ,,i'' jest stanowczo za ma/la (np. CMTT), co powoduje,
+ /ze warto/s/c optyczna kropki nad ,,/z'' oraz ,,/Z'' jest te/z czasami
+ zbyt ma/la. Z powi/ekszenia kropki zrezygnowano, uznaj/ac jej wielko/s/c
+ za cech/e font/ow CM.
+
+ 10. Przekre/slenie litery ,,/L'' jest znacznie wi/eksze od przekre/slenia
+ litery ,,/l'', a przekre/slenie litery ,,/l'' jest z kolei wi/eksze od
+ przekre/slenia w fontach rodziny CM (p. punkt 0 powy/zej).
+
+ 11. ,,Ogonki'' pod literami ,,/A'' ,,/E'' ,,/a'' ,,/e'' budowane s/a za
+ pomoc/a stosunkowo skomplikowanego algorytmu, ale geometria
+ ogonka jest bardzo prosta: zewn/etrzna i wewn/etrzna kraw/ed/x to
+ pojedyncze segmenty krzywych B\`eziera. Ogonki takie -- jak
+ pokazuje do/swiadczenie -- s/a najzgrabniejsze.
+
+ Opcjonalne parametry dodatkowe wp/lywaj/ace na kszta/lt ogonk/ow
+ opisane s/a w pliku PL_DOD.MF.
+
+ 12. Polskie znaki diakrytyczne nie s/a przeznaczone do u/zywania jako
+ znaki matematyczne, dlatego w programach opisuj/acych te znaki
+ pomini/eta zosta/la komenda ,,math_adjust''.
+
+ 13. Podci/ecia wstawiane automatycznie mi/edzy znakami (implicit kerns)
+ s/a w zasadzie takie same dla polskich znak/ow diakrytycznych jak dla
+ odpowiednich liter alfabetu /laci/nskiego, z pewnymi wszak/ze wyj/atkami
+ (p. pliki POLAN.MF, POLKUR.MF oraz POLKAP.MF); podobnie rzecz si/e ma
+ z korekt/a italikow/a wstawian/a za polskimi znakami diakrytycznymi.
+
+ 14. Dla tych, kt/orzy chcieliby wydrukowa/c /xr/od/la METAFONT-owe w postaci
+ sformatowanej za pomoc/a programu MFT, do/l/aczony jest odpowiedni
+ format o nazwie PL.MFT. Format ten jest przygotowany do sk/ladania
+ z u/zyciem font/ow rodziny CM; je/sli u/zytkownik zamieni/l ju/z
+ wszystkie CM-y na fonty PL, musi odpowiednio zmieni/c nazwy font/ow
+ w plikach PL.MFT oraz MFTMAC.TEX (plik MFTMAC.TEX znale/x/c mo/zna
+ np. w pakiecie emTeX E. Mattesa lub
+ ftp://ftp.gust.org.pl/pub/TeX/macros/generic/plain/base/mftmac.tex).
+
+ 15. /Xr/od/la METAFONT-owe obejmuj/a nast/epuj/ace pliki (zak/lada si/e,
+ /ze u/zytkownik posiada komplet plik/ow /xr/od/lowych rodziny CM):
+
+ a) pliki zawieraj/ace opisy polskich znak/ow diakrytycznych:
+
+ PL_CUD.MF PL_DOD.MF PL_MLK.MF
+ PL_DL.MF PL_ML.MF PL_SYM.MF
+
+ b) pliki steruj/ace:
+
+ POLAN.MF -- odpowiednik pliku ROMAN.MF
+ POLKAP.MF -- odpowiednik pliku CSC.MF
+ POLKUR.MF -- odpowiednik pliku TEXTIT.MF
+ POLMAT.MF -- odpowiednik pliku MATHSY.MF
+ POLTYT.MF -- odpowiednik pliku TITLE.MF
+
+ c) pliki parametryczne rodziny PL:
+
+ PLBSY10.MF PLMI10.MF PLSSBI36.MF PLSY5.MF
+ PLBXSL10.MF PLMI12.MF PLSSBI48.MF PLSY6.MF
+ PLBXTI10.MF PLMI5.MF PLSSBX10.MF PLSY7.MF
+ PLBX10.MF PLMI6.MF PLSSBX36.MF PLSY8.MF
+ PLBX12.MF PLMI7.MF PLSSBX48.MF PLSY9.MF
+ PLBX5.MF PLMI8.MF PLSSDC10.MF PLTCSC10.MF
+ PLBX6.MF PLMI9.MF PLSSDC40.MF PLTEX10.MF
+ PLBX7.MF PLR10.MF PLSSI10.MF PLTEX8.MF
+ PLBX8.MF PLR12.MF PLSSI12.MF PLTEX9.MF
+ PLBX9.MF PLR17.MF PLSSI17.MF PLTI10.MF
+ PLB10.MF PLR5.MF PLSSI8.MF PLTI12.MF
+ PLCSC10.MF PLR6.MF PLSSI9.MF PLTI7.MF
+ PLDUNH10.MF PLR7.MF PLSSQI8.MF PLTI8.MF
+ PLEX10.MF PLR8.MF PLSSQ8.MF PLTI9.MF
+ PLEX9.MF PLR9.MF PLSS10.MF PLTT10.MF
+ PLFF10.MF PLSLTT10.MF PLSS12.MF PLTT12.MF
+ PLFIB8.MF PLSL10.MF PLSS17.MF PLTT8.MF
+ PLFI10.MF PLSL12.MF PLSS8.MF PLTT9.MF
+ PLINCH.MF PLSL8.MF PLSS9.MF PLU10.MF
+ PLITT10.MF PLSL9.MF PLSY10.MF PLVTT10.MF
+ PLMIB10.MF PLSSBI10.MF
+
+ d) dodatkowe pliki parametryczne:
+
+ * CMSSBI10.MF (odwo/luj/a si/e do/n pliki PLSSBI10, PLSSBI36
+ i PLSSBI48)
+
+ * CMBX11.MF, CMR11.MF, CMSL11.MF, CMTI11.MF (te pliki s/lu/zy/ly
+ do generowania u/zywanych poprzednio 11-punktowych font/ow P1)
+
+ * DLR10 -- przyk/ladowy plik s/lu/z/acy do generowania fontu
+ PLR10 at 10dd (w jednostkach przyj/etych w polskim drukarstwie)
+
+ e) plik pomocniczy wczytywany podczas przetwarzania przez METAFONT-a
+ plik/ow parametrycznych PL:
+
+ FIK_MIK.MF
+
+ f) plik zawieraj/acy opis trybu generowania font/ow dla
+ fotona/swietlarek Linotronic 100 i Linotronic 300; tre/s/c
+ tego pliku nale/zy wkopiowa/c do pliku LOCAL.MF przed generowaniem
+ format/ow bazowych (PLAIN.BAS i CM.BAS) za pomoc/a inicjalizacyjnej
+ wersji METAFONT-a (INIMF):
+
+ LINOMODE.MF
+
+ 16. Generowanie font/ow PL
+
+ Konkretnym implementacjom METAFONT-a towarzyszy na og/o/l oprogramowanie
+ u/latwiaj/ace generowanie font/ow. Do pakietu MeX do/l/aczone zosta/ly
+ pliki z danymi dla programu MFJOB, obs/luguj/acego generowanie font/ow
+ z u/zyciem emMETAFONT-a (szczeg/o/ly mo/zna znale/x/c w dokumentacji
+ pakietu E. Mattesa emTeX). S/a to:
+
+ G180PL.MFJ dane do generowania font/ow PL dla drukarek 24-ig/lowych
+
+ G240PL.MFJ dane do generowania font/ow PL dla drukarek 9-ig/lowych
+
+ G300PL.MFJ dane do generowania font/ow PL dla drukarek laserowych
+
+ GPLMODES.MFJ plik wczytywany przy przetwarzaniu plik/ow G180PL.MFJ,
+ G240PL.MFJ i G300PL.MFJ przez program MFJOB.EXE
+
+
+Pliki
+=====
+
+Pakiet MeX sk/lada si/e z nast/epuj/acych grup plik/ow:
+
+ 1. Pliki dokumentacyjne//informacyjne
+ 2. Pliki TeX-owe
+ 3. Pliki METAFONT-a
+
+Poni/zej przedstawiamy list/e wszystkich plik/ow sk/ladaj/acych si/e na
+pakiet MeX-a. Podkre/slamy raz jeszcze, /ze pakiet MeX mo/ze by/c
+rozpowszechniany tylko tak, jak zosta/l przygotowany -- musi by/c kompletny
+i niezmieniony. Dotyczy to r/ownie/z plik/ow dokumentacyjnych//informacyjnych.
+(patrz ,,Zasady rozpowszechniania'').
+
+ 1. Pliki dokumentacyjne//informacyjne
+
+ MEXINFO.POL -- plik, kt/ory jest w/la/snie czytamy
+ MEXINFO.ENG -- analogiczny tekst w j/ezyku angielskim
+
+ 2. Pliki TeX-owe
+
+ Pliki makr:
+ ----------
+
+ MEX.TEX -- polska wersja pakietu makr PLAIN.TEX
+ LAMEX.TEX -- polska wersja pakietu makr LPLAIN.TEX
+ MEX1.TEX -- pomocniczy plik wej/sciowy MeX-a i LaMeX-a
+ MEX2.TEX -- pomocniczy plik wej/sciowy MeX-a i LaMeX-a
+ MEXCONF.TEX -- plik konfiguracyjny MeX-a i LaMeX-a
+ PLHYPH.TEX -- polskie regu/ly dzielenia wyraz/ow
+
+ Wej/sciowe pliki filtruj/ace do emTeX-a (do implementacji TeX-a
+ -------------------------------------------------------------
+ wykonanej przez E. Mattesa):
+ ----------------------------
+
+ MAZ2PL.PCT -- tabela konwersji kod/ow Mazovii na kody PL
+ LAT2PL.PCT -- tabela konwersji kod/ow Latin 2 na kody PL
+ ISO2PL.PCT -- tabela konwersji kod/ow ISO8859-2 na kody PL
+ WIN2PL.PCT -- tabela konwersji kod/ow CP1250 na kody PL
+ MAZ2PL.TCP, ISO2PL.TCP, LAT2PL.TCP, WIN2PL.TCP -- j.w., posta/c
+ przygotowana do pracy z INITEX-em
+ MK-TCP.BAT -- plik wsadowy do tworzenia tablic konwersji
+ w postaci plik/ow TCP
+
+ Pliki wsadowe systemu DOS (ang. batch file) do generowania plik/ow
+ -----------------------------------------------------------------
+ MEX.FMT i LAMEX.FMT:
+ ---------------------
+
+ GM-MEX.BAT -- generuje MEX.FMT (+ Mazovia)
+ GI-MEX.BAT -- generuje MEX.FMT (+ ISO8859-2)
+ GL-MEX.BAT -- generuje MEX.FMT (+ CP852)
+ GW-MEX.BAT -- generuje MEX.FMT (+ CP1250)
+ GM-LAMEX.BAT -- generuje LAMEX.FMT (+ Mazovia)
+ GI-LAMEX.BAT -- generuje LAMEX.FMT (+ ISO8859-2)
+ GL-LAMEX.BAT -- generuje LAMEX.FMT (+ CP852)
+ GW-LAMEX.BAT -- generuje LAMEX.FMT (+ CP1250)
+
+ Dodatkowe pliki do LaMeX-a (style):
+ ----------------------------------
+
+ IARTICLE.STY IMAKEIDX.STY IREPORT.STY
+ IBOOK.STY IOPENBIB.STY ITITLEPA.STY
+ ILETTER.STY
+
+ 3. Pliki METAFONT-owe opisane zosta/ly w cz/e/sci po/swi/econej fontom PL.
+
+
+Podzi/ekowania
+=============
+
+Bardzo wiele os/ob przyczyni/lo si/e do szcz/e/sliwego zako/nczenia prac nad
+d/lugo trwaj/acym projektem adaptacji TeX-a do j/ezyka polskiego. Wymienienie
+tu wszystkich, kt/orzy nam pomogli, jest po prostu niemo/zliwe. Tym niemniej
+czujemy si/e zobowi/azani szczeg/olnie serdecznie podzi/ekowa/c
+nast/epuj/acym osobom:
+
+ Andrzej Blikle
+ W/lodzimierz Bzyl
+ Jacek Leszczy/lowski
+ Marian /Lakomy
+ W/lodzimierz J. Martin
+ Frank Mittelbach
+ Gra/zyna Nowak
+ Andrzej Odyniec
+ Piotr Pianowski
+ Tomasz Przechlewski
+ Stanis/law Szczyci/nski
+ Roman Tomaszewski
+ Stanis/law Wawrykiewicz.
+
diff --git a/Master/texmf-dist/doc/mex/base/qq.eps b/Master/texmf-dist/doc/mex/base/qq.eps
new file mode 100644
index 00000000000..595e1ff3037
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/base/qq.eps
@@ -0,0 +1,360 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%BoundingBox: 2098 2638 2175 2702
+%%Creator: CorelDRAW!
+%%Title: AQQ.EPS
+%%CreationDate: Mon Apr 21 23:16:03 1997
+%%DocumentProcessColors: Cyan Magenta Yellow Black
+%%DocumentSuppliedResources: (atend)
+%%DocumentNeededResources: (atend)
+%%EndComments
+%%BeginSetup
+/AutoFlatness true def
+%Color profile: _DEFAULT.CCS - Generic CMYK Color Printer
+%%EndSetup
+%%BeginProlog
+%%BeginResource: procset wCorel5Dict
+% Copyright (c)1992-94 Corel Corporation
+% All rights reserved. v5.0 r0.6
+/wCorel5Dict 300 dict def wCorel5Dict begin/bd{bind def}bind def/ld{load def}
+bd/xd{exch def}bd/_ null def/rp{{pop}repeat}bd/@cp/closepath ld/@gs/gsave ld
+/@gr/grestore ld/@np/newpath ld/Tl/translate ld/$sv 0 def/@sv{/$sv save def}bd
+/@rs{$sv restore}bd/spg/showpage ld/showpage{}bd currentscreen/@dsp xd/$dsp
+/@dsp def/$dsa xd/$dsf xd/$sdf false def/$SDF false def/$Scra 0 def/SetScr
+/setscreen ld/setscreen{3 rp}bd/@ss{2 index 0 eq{$dsf 3 1 roll 4 -1 roll pop}
+if exch $Scra add exch load SetScr}bd/SepMode where{pop}{/SepMode 0 def}ifelse
+/CurrentInkName where{pop}{/CurrentInkName(Composite)def}ifelse/$ink where
+{pop}{/$ink -1 def}ifelse/$c 0 def/$m 0 def/$y 0 def/$k 0 def/$t 1 def/$n _ def
+/$o 0 def/$fil 0 def/$C 0 def/$M 0 def/$Y 0 def/$K 0 def/$T 1 def/$N _ def/$O 0
+def/$PF false def/s1c 0 def/s1m 0 def/s1y 0 def/s1k 0 def/s1t 0 def/s1n _ def
+/$bkg false def/SK 0 def/SM 0 def/SY 0 def/SC 0 def/$op false def matrix
+currentmatrix/$ctm xd/$ptm matrix def/$ttm matrix def/$stm matrix def/$fst 128
+def/$pad 0 def/$rox 0 def/$roy 0 def/$ffpnt true def/CorelDrawReencodeVect[
+16#0/grave 16#5/breve 16#6/dotaccent 16#8/ring 16#A/hungarumlaut 16#B/ogonek
+16#C/caron 16#D/dotlessi 16#27/quotesingle 16#60/grave 16#7C/bar
+16#82/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
+16#88/circumflex/perthousand/Scaron/guilsinglleft/OE
+16#91/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash
+16#98/tilde/trademark/scaron/guilsinglright/oe 16#9F/Ydieresis
+16#A1/exclamdown/cent/sterling/currency/yen/brokenbar/section
+16#a8/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/minus/registered/macron
+16#b0/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+16#b8/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+16#c0/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+16#c8/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+16#d0/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+16#d8/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+16#e0/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+16#e8/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+16#f0/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+16#f8/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/@BeginSysCorelDict{systemdict/Corel10Dict known{systemdict/Corel10Dict get
+begin}if}bd/@EndSysCorelDict{systemdict/Corel10Dict known{end}if}bd
+AutoFlatness{/@ifl{dup currentflat exch sub 10 gt{
+([Error: PathTooComplex; OffendingCommand: AnyPaintingOperator]\n)print flush
+@np exit}{currentflat 2 add setflat}ifelse}bd/@fill/fill ld/fill{currentflat{
+{@fill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@eofill/eofill ld/eofill
+{currentflat{{@eofill}stopped{@ifl}{exit}ifelse}bind loop setflat}bd/@clip
+/clip ld/clip{currentflat{{@clip}stopped{@ifl}{exit}ifelse}bind loop setflat}
+bd/@eoclip/eoclip ld/eoclip{currentflat{{@eoclip}stopped{@ifl}{exit}ifelse}
+bind loop setflat}bd/@stroke/stroke ld/stroke{currentflat{{@stroke}stopped
+{@ifl}{exit}ifelse}bind loop setflat}bd}if/d/setdash ld/j/setlinejoin ld/J
+/setlinecap ld/M/setmiterlimit ld/w/setlinewidth ld/O{/$o xd}bd/R{/$O xd}bd/W
+/eoclip ld/c/curveto ld/C/c ld/l/lineto ld/L/l ld/rl/rlineto ld/m/moveto ld/n
+/newpath ld/N/newpath ld/P{11 rp}bd/u{}bd/U{}bd/A{pop}bd/q/@gs ld/Q/@gr ld/`
+{}bd/~{}bd/@{}bd/&{}bd/@j{@sv @np}bd/@J{@rs}bd/g{1 exch sub/$k xd/$c 0 def/$m 0
+def/$y 0 def/$t 1 def/$n _ def/$fil 0 def}bd/G{1 sub neg/$K xd _ 1 0 0 0/$C xd
+/$M xd/$Y xd/$T xd/$N xd}bd/k{1 index type/stringtype eq{/$t xd/$n xd}{/$t 0
+def/$n _ def}ifelse/$k xd/$y xd/$m xd/$c xd/$fil 0 def}bd/K{1 index type
+/stringtype eq{/$T xd/$N xd}{/$T 0 def/$N _ def}ifelse/$K xd/$Y xd/$M xd/$C xd
+}bd/x/k ld/X/K ld/sf{1 index type/stringtype eq{/s1t xd/s1n xd}{/s1t 0 def/s1n
+_ def}ifelse/s1k xd/s1y xd/s1m xd/s1c xd}bd/i{dup 0 ne{setflat}{pop}ifelse}bd
+/v{4 -2 roll 2 copy 6 -2 roll c}bd/V/v ld/y{2 copy c}bd/Y/y ld/@w{matrix rotate
+/$ptm xd matrix scale $ptm dup concatmatrix/$ptm xd 1 eq{$ptm exch dup
+concatmatrix/$ptm xd}if 1 w}bd/@g{1 eq dup/$sdf xd{/$scp xd/$sca xd/$scf xd}if
+}bd/@G{1 eq dup/$SDF xd{/$SCP xd/$SCA xd/$SCF xd}if}bd/@D{2 index 0 eq{$dsf 3 1
+roll 4 -1 roll pop}if 3 copy exch $Scra add exch load SetScr/$dsp xd/$dsa xd
+/$dsf xd}bd/$ngx{$SDF{$SCF SepMode 0 eq{$SCA}{$dsa}ifelse $SCP @ss}if}bd/p{
+/$pm xd 7 rp/$pyf xd/$pxf xd/$pn xd/$fil 1 def}bd/@MN{2 copy le{pop}{exch pop}
+ifelse}bd/@MX{2 copy ge{pop}{exch pop}ifelse}bd/InRange{3 -1 roll @MN @MX}bd
+/wDstChck{2 1 roll dup 3 -1 roll eq{1 add}if}bd/@dot{dup mul exch dup mul add 1
+exch sub}bd/@lin{exch pop abs 1 exch sub}bd/cmyk2rgb{3{dup 5 -1 roll add 1 exch
+sub dup 0 lt{pop 0}if exch}repeat pop}bd/rgb2cmyk{3{1 exch sub 3 1 roll}repeat
+3 copy @MN @MN 3{dup 5 -1 roll sub neg exch}repeat}bd/rgb2g{2 index .299 mul 2
+index .587 mul add 1 index .114 mul add 4 1 roll 3 rp}bd/WaldoColor where{pop}
+{/SetRgb/setrgbcolor ld/GetRgb/currentrgbcolor ld/SetGry/setgray ld/GetGry
+/currentgray ld/SetRgb2 systemdict/setrgbcolor get def/GetRgb2 systemdict
+/currentrgbcolor get def/SetHsb systemdict/sethsbcolor get def/GetHsb
+systemdict/currenthsbcolor get def/rgb2hsb{SetRgb2 GetHsb}bd/hsb2rgb{3 -1 roll
+dup floor sub 3 1 roll SetHsb GetRgb2}bd/setcmykcolor where{pop/SetCmyk
+/setcmykcolor ld}{/SetCmyk{cmyk2rgb SetRgb}bd}ifelse/currentcmykcolor where{
+pop/GetCmyk/currentcmykcolor ld}{/GetCmyk{GetRgb rgb2cmyk}bd}ifelse
+/setoverprint where{pop}{/setoverprint{/$op xd}bd}ifelse/currentoverprint where
+{pop}{/currentoverprint{$op}bd}ifelse/@tc{5 -1 roll dup 1 ge{pop}{4{dup 6 -1
+roll mul exch}repeat pop}ifelse}bd/@trp{exch pop 5 1 roll @tc}bd
+/setprocesscolor{SepMode 0 eq{SetCmyk}{0 4 $ink sub index exch pop 5 1 roll 4
+rp SepsColor true eq{$ink 3 gt{1 sub neg SetGry}{0 0 0 4 $ink roll SetCmyk}
+ifelse}{1 sub neg SetGry}ifelse}ifelse}bd/findcmykcustomcolor where{pop}{
+/findcmykcustomcolor{5 array astore}bd}ifelse/setcustomcolor where{pop}{
+/setcustomcolor{exch aload pop SepMode 0 eq{pop @tc setprocesscolor}{
+CurrentInkName eq{4 index}{0}ifelse 6 1 roll 5 rp 1 sub neg SetGry}ifelse}bd}
+ifelse/@scc{dup type/booleantype eq{setoverprint}{1 eq setoverprint}ifelse dup
+_ eq{pop setprocesscolor pop}{findcmykcustomcolor exch setcustomcolor}ifelse
+SepMode 0 eq{true}{GetGry 1 eq currentoverprint and not}ifelse}bd/colorimage
+where{pop/ColorImage/colorimage ld}{/ColorImage{/ncolors xd pop/dataaq xd{
+dataaq ncolors dup 3 eq{/$dat xd 0 1 $dat length 3 div 1 sub{dup 3 mul $dat 1
+index get 255 div $dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div
+rgb2g 255 mul cvi exch pop $dat 3 1 roll put}for $dat 0 $dat length 3 idiv
+getinterval pop}{4 eq{/$dat xd 0 1 $dat length 4 div 1 sub{dup 4 mul $dat 1
+index get 255 div $dat 2 index 1 add get 255 div $dat 3 index 2 add get 255 div
+$dat 4 index 3 add get 255 div cmyk2rgb rgb2g 255 mul cvi exch pop $dat 3 1
+roll put}for $dat 0 $dat length ncolors idiv getinterval}if}ifelse}image}bd
+}ifelse/setcmykcolor{1 5 1 roll _ currentoverprint @scc/$ffpnt xd}bd
+/currentcmykcolor{0 0 0 0}bd/setrgbcolor{rgb2cmyk setcmykcolor}bd
+/currentrgbcolor{currentcmykcolor cmyk2rgb}bd/sethsbcolor{hsb2rgb setrgbcolor}
+bd/currenthsbcolor{currentrgbcolor rgb2hsb}bd/setgray{dup dup setrgbcolor}bd
+/currentgray{currentrgbcolor rgb2g}bd}ifelse/WaldoColor true def/@sft{$tllx
+$pxf add dup $tllx gt{$pwid sub}if/$tx xd $tury $pyf sub dup $tury lt{$phei
+add}if/$ty xd}bd/@stb{pathbbox/$ury xd/$urx xd/$lly xd/$llx xd}bd/@ep{{cvx exec
+}forall}bd/@tp{@sv/$in true def 2 copy dup $lly le{/$in false def}if $phei sub
+$ury ge{/$in false def}if dup $urx ge{/$in false def}if $pwid add $llx le{/$in
+false def}if $in{@np 2 copy m $pwid 0 rl 0 $phei neg rl $pwid neg 0 rl 0 $phei
+rl clip @np $pn cvlit load aload pop 7 -1 roll 5 index sub 7 -1 roll 3 index
+sub Tl matrix currentmatrix/$ctm xd @ep 4 rp}{2 rp}ifelse @rs}bd/@th{@sft 0 1
+$tly 1 sub{dup $psx mul $tx add{dup $llx gt{$pwid sub}{exit}ifelse}loop exch
+$phei mul $ty exch sub 0 1 $tlx 1 sub{$pwid mul 3 copy 3 -1 roll add exch @tp
+pop}for 2 rp}for}bd/@tv{@sft 0 1 $tlx 1 sub{dup $pwid mul $tx add exch $psy mul
+$ty exch sub{dup $ury lt{$phei add}{exit}ifelse}loop 0 1 $tly 1 sub{$phei mul 3
+copy sub @tp pop}for 2 rp}for}bd/@pf{@gs $ctm setmatrix $pm concat @stb eoclip
+Bburx Bbury $pm itransform/$tury xd/$turx xd Bbllx Bblly $pm itransform/$tlly
+xd/$tllx xd/$wid $turx $tllx sub def/$hei $tury $tlly sub def @gs $vectpat{1 0
+0 0 0 _ $o @scc{eofill}if}{$t $c $m $y $k $n $o @scc{SepMode 0 eq $pfrg or{
+$tllx $tlly Tl $wid $hei scale <00> 8 1 false[8 0 0 1 0 0]{}imagemask}{/$bkg
+true def}ifelse}if}ifelse @gr $wid 0 gt $hei 0 gt and{$pn cvlit load aload pop
+/$pd xd 3 -1 roll sub/$phei xd exch sub/$pwid xd $wid $pwid div ceiling 1 add
+/$tlx xd $hei $phei div ceiling 1 add/$tly xd $psx 0 eq{@tv}{@th}ifelse}if @gr
+@np/$bkg false def}bd/@dlt{$fse $fss sub/nff xd $frb dup 1 eq exch 2 eq or{
+$frt dup $frc $frm $fry $frk @tc 4 copy cmyk2rgb rgb2hsb 3 copy/myb xd/mys xd
+/myh xd $tot $toc $tom $toy $tok @tc cmyk2rgb rgb2hsb 3 1 roll 4 1 roll 5 1
+roll sub neg nff div/kdb xd sub neg nff div/kds xd sub neg dup 0 eq{pop $frb 2
+eq{.99}{-.99}ifelse}if dup $frb 2 eq exch 0 lt and{1 add}if dup $frb 1 eq exch
+0 gt and{1 sub}if nff div/kdh xd}{$frt dup $frc $frm $fry $frk @tc 5 copy $tot
+dup $toc $tom $toy $tok @tc 5 1 roll 6 1 roll 7 1 roll 8 1 roll 9 1 roll sub
+neg nff dup 1 gt{1 sub}if div/$dk xd sub neg nff dup 1 gt{1 sub}if div/$dy xd
+sub neg nff dup 1 gt{1 sub}if div/$dm xd sub neg nff dup 1 gt{1 sub}if div/$dc
+xd sub neg nff dup 1 gt{1 sub}if div/$dt xd}ifelse}bd/ffcol{5 copy $fsit 0 eq{
+setcmykcolor pop}{SepMode 0 ne{$frn findcmykcustomcolor exch setcustomcolor}{4
+rp $frc $frm $fry $frk $frn findcmykcustomcolor exch setcustomcolor}ifelse}
+ifelse}bd/@ftl{1 index 4 index sub dup $pad mul dup/$pdw xd 2 mul sub $fst div
+/$wid xd 2 index sub/$hei xd pop Tl @dlt $fss 0 eq{ffcol n 0 0 m 0 $hei l $pdw
+$hei l $pdw 0 l @cp $ffpnt{fill}{@np}ifelse}if $fss $wid mul $pdw add 0 Tl nff
+{ffcol n 0 0 m 0 $hei l $wid $hei l $wid 0 l @cp $ffpnt{fill}{@np}ifelse $wid 0
+Tl $frb dup 1 eq exch 2 eq or{4 rp myh mys myb kdb add 3 1 roll kds add 3 1
+roll kdh add 3 1 roll 3 copy/myb xd/mys xd/myh xd hsb2rgb rgb2cmyk}{$dk add 5 1
+roll $dy add 5 1 roll $dm add 5 1 roll $dc add 5 1 roll $dt add 5 1 roll}
+ifelse}repeat 5 rp $tot dup $toc $tom $toy $tok @tc ffcol n 0 0 m 0 $hei l $pdw
+$hei l $pdw 0 l @cp $ffpnt{fill}{@np}ifelse 5 rp}bd/@ftrs{1 index 4 index sub
+dup $rox mul/$row xd 2 div 1 index 4 index sub dup $roy mul/$roh xd 2 div 2
+copy dup mul exch dup mul add sqrt $row dup mul $roh dup mul add sqrt add dup
+/$hei xd $fst div/$wid xd 4 index add $roh add exch 5 index add $row add exch
+Tl $fan rotate 4 rp @dlt $fss 0 eq{ffcol $fty 3 eq{$hei dup neg dup m 2 mul
+@sqr}{0 0 m 0 0 $hei 0 360 arc}ifelse $ffpnt{fill}{@np}ifelse}if 1.0 $pad 2 mul
+sub dup scale $hei $fss $wid mul sub/$hei xd nff{ffcol $fty 3 eq{n $hei dup neg
+dup m 2 mul @sqr}{n 0 0 m 0 0 $hei 0 360 arc}ifelse $ffpnt{fill}{@np}ifelse
+/$hei $hei $wid sub def $frb dup 1 eq exch 2 eq or{4 rp myh mys myb kdb add 3 1
+roll kds add 3 1 roll kdh add 3 1 roll 3 copy/myb xd/mys xd/myh xd hsb2rgb
+rgb2cmyk}{$dk add 5 1 roll $dy add 5 1 roll $dm add 5 1 roll $dc add 5 1 roll
+$dt add 5 1 roll}ifelse}repeat 5 rp}bd/@ftc{1 index 4 index sub dup $rox mul
+/$row xd 2 div 1 index 4 index sub dup $roy mul/$roh xd 2 div 2 copy dup mul
+exch dup mul add sqrt $row dup mul $roh dup mul add sqrt add dup/$hei xd $fst
+div/$wid xd 4 index add $roh add exch 5 index add $row add exch Tl 4 rp @dlt
+$fss 0 eq{ffcol $ffpnt{fill}{@np}ifelse}{n}ifelse/$dang 180 $fst 1 sub div def
+/$sang $dang -2 div 180 add def/$eang $dang 2 div 180 add def/$sang $sang $dang
+$fss mul add def/$eang $eang $dang $fss mul add def/$sang $eang $dang sub def
+nff{ffcol n 0 0 m 0 0 $hei $sang $fan add $eang $fan add arc $ffpnt{fill}{@np}
+ifelse 0 0 m 0 0 $hei $eang neg $fan add $sang neg $fan add arc $ffpnt{fill}
+{@np}ifelse/$sang $eang def/$eang $eang $dang add def $frb dup 1 eq exch 2 eq
+or{4 rp myh mys myb kdb add 3 1 roll kds add 3 1 roll kdh add 3 1 roll 3 copy
+/myb xd/mys xd/myh xd hsb2rgb rgb2cmyk}{$dk add 5 1 roll $dy add 5 1 roll $dm
+add 5 1 roll $dc add 5 1 roll $dt add 5 1 roll}ifelse}repeat 5 rp}bd/@ff{/$fss
+0 def $o 1 eq setoverprint 1 1 $fsc 1 sub{dup 1 sub $fsit 0 eq{$fsa exch 5 mul
+5 getinterval aload 2 rp/$frk xd/$fry xd/$frm xd/$frc xd/$frn _ def/$frt 1 def
+$fsa exch 5 mul 5 getinterval aload pop $fss add/$fse xd/$tok xd/$toy xd/$tom
+xd/$toc xd/$ton _ def/$tot 1 def}{$fsa exch 7 mul 7 getinterval aload 2 rp
+/$frt xd/$frn xd/$frk xd/$fry xd/$frm xd/$frc xd $fsa exch 7 mul 7 getinterval
+aload pop $fss add/$fse xd/$tot xd/$ton xd/$tok xd/$toy xd/$tom xd/$toc xd}
+ifelse $fsit 0 eq SepMode 0 eq or dup not CurrentInkName $frn eq and or{@sv
+$ctm setmatrix eoclip Bbllx Bblly Bburx Bbury $fty 2 eq{@ftc}{1 index 3 index m
+2 copy l 3 index 1 index l 3 index 3 index l @cp $fty dup 1 eq exch 3 eq or{
+@ftrs}{4 rp $fan rotate pathbbox @ftl}ifelse}ifelse @rs/$fss $fse def}{1 0 0 0
+0 _ $o @scc{fill}if}ifelse}for @np}bd/@Pf{@sv SepMode 0 eq $ink 3 eq or{0 J 0 j
+[]0 d $t $c $m $y $k $n $o @scc pop $ctm setmatrix 72 1000 div dup matrix scale
+dup concat dup Bburx exch Bbury exch itransform ceiling cvi/Bbury xd ceiling
+cvi/Bburx xd Bbllx exch Bblly exch itransform floor cvi/Bblly xd floor cvi
+/Bbllx xd $Prm aload pop $Psn load exec}{1 SetGry eofill}ifelse @rs @np}bd/F{
+matrix currentmatrix $sdf{$scf $sca $scp @ss}if $fil 1 eq{@pf}{$fil 2 eq{@ff}{
+$fil 3 eq{@Pf}{$t $c $m $y $k $n $o @scc{eofill}{@np}ifelse}ifelse}ifelse}
+ifelse $sdf{$dsf $dsa $dsp @ss}if setmatrix}bd/f{@cp F}bd/S{matrix
+currentmatrix $ctm setmatrix $SDF{$SCF $SCA $SCP @ss}if $T $C $M $Y $K $N $O
+@scc{matrix currentmatrix $ptm concat stroke setmatrix}{@np}ifelse $SDF{$dsf
+$dsa $dsp @ss}if setmatrix}bd/s{@cp S}bd/B{@gs F @gr S}bd/b{@cp B}bd/E{5 array
+astore exch cvlit xd}bd/@cc{currentfile $dat readhexstring pop}bd/@sm{/$ctm
+$ctm currentmatrix def}bd/@E{/Bbury xd/Bburx xd/Bblly xd/Bbllx xd}bd/@c{@cp}bd
+/@p{/$fil 1 def 1 eq dup/$vectpat xd{/$pfrg true def}{@gs $t $c $m $y $k $n $o
+@scc/$pfrg xd @gr}ifelse/$pm xd/$psy xd/$psx xd/$pyf xd/$pxf xd/$pn xd}bd/@P{
+/$fil 3 def/$Psn xd array astore/$Prm xd}bd/@k{/$fil 2 def/$roy xd/$rox xd
+/$pad xd/$fty xd/$fan xd $fty 1 eq{/$fan 0 def}if/$frb xd/$fst xd/$fsc xd/$fsa
+xd/$fsit 0 def}bd/@x{/$fil 2 def/$roy xd/$rox xd/$pad xd/$fty xd/$fan xd $fty 1
+eq{/$fan 0 def}if/$frb xd/$fst xd/$fsc xd/$fsa xd/$fsit 1 def}bd/@ii{concat 3
+index 3 index m 3 index 1 index l 2 copy l 1 index 3 index l 3 index 3 index l
+clip 4 rp}bd/tcc{@cc}def/@i{@sm @gs @ii 6 index 1 ne{/$frg true def 2 rp}{1 eq
+{s1t s1c s1m s1y s1k s1n $O @scc/$frg xd}{/$frg false def}ifelse 1 eq{@gs $ctm
+setmatrix F @gr}if}ifelse @np/$ury xd/$urx xd/$lly xd/$llx xd/$bts xd/$hei xd
+/$wid xd/$dat $wid $bts mul 8 div ceiling cvi string def $bkg $frg or{$SDF
+{$SCF $SCA $SCP @ss}if $llx $lly Tl $urx $llx sub $ury $lly sub scale $bkg{$t
+$c $m $y $k $n $o @scc pop}if $wid $hei abs $bts 1 eq{$bkg}{$bts}ifelse[$wid 0
+0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/tcc load $bts 1 eq{imagemask}{image}
+ifelse $SDF{$dsf $dsa $dsp @ss}if}{$hei abs{tcc pop}repeat}ifelse @gr $ctm
+setmatrix}bd/@M{@sv}bd/@N{/@cc{}def 1 eq{12 -1 roll neg 12 1 roll @I}{13 -1
+roll neg 13 1 roll @i}ifelse @rs}bd/@I{@sm @gs @ii @np/$ury xd/$urx xd/$lly xd
+/$llx xd/$ncl xd/$bts xd/$hei xd/$wid xd/$dat $wid $bts mul $ncl mul 8 div
+ceiling cvi string def $ngx $llx $lly Tl $urx $llx sub $ury $lly sub scale $wid
+$hei abs $bts[$wid 0 0 $hei neg 0 $hei 0 gt{$hei}{0}ifelse]/@cc load false $ncl
+ColorImage $SDF{$dsf $dsa $dsp @ss}if @gr $ctm setmatrix}bd/z{exch findfont
+exch scalefont setfont}bd/ZB{9 dict dup begin 4 1 roll/FontType 3 def
+/FontMatrix xd/FontBBox xd/Encoding 256 array def 0 1 255{Encoding exch
+/.notdef put}for/CharStrings 256 dict def CharStrings/.notdef{}put/Metrics 256
+dict def Metrics/.notdef 3 -1 roll put/BuildChar{exch dup/$char exch/Encoding
+get 3 index get def dup/Metrics get $char get aload pop setcachedevice begin
+Encoding exch get CharStrings exch get end exec}def end definefont pop}bd
+/ZBAddChar{findfont begin dup 4 1 roll dup 6 1 roll Encoding 3 1 roll put
+CharStrings 3 1 roll put Metrics 3 1 roll put end}bd/Z{findfont dup maxlength 2
+add dict exch dup{1 index/FID ne{3 index 3 1 roll put}{2 rp}ifelse}forall pop
+dup dup/Encoding get 256 array copy dup/$fe xd/Encoding exch put dup/Fontname 3
+index put 3 -1 roll dup length 0 ne{0 exch{dup type 0 type eq{exch pop}{$fe
+exch 2 index exch put 1 add}ifelse}forall pop}if dup 256 dict dup/$met xd
+/Metrics exch put dup/FontMatrix get 0 get 1000 mul 1 exch div 3 index length
+256 eq{0 1 255{dup $fe exch get dup/.notdef eq{2 rp}{5 index 3 -1 roll get 2
+index mul $met 3 1 roll put}ifelse}for}if pop definefont pop pop}bd/@ftx{{
+currentpoint 3 -1 roll(0)dup 3 -1 roll 0 exch put dup @gs true charpath $ctm
+setmatrix @@txt @gr @np stringwidth pop 3 -1 roll add exch moveto}forall}bd
+/@ft{matrix currentmatrix exch $sdf{$scf $sca $scp @ss}if $fil 1 eq{/@@txt/@pf
+ld @ftx}{$fil 2 eq{/@@txt/@ff ld @ftx}{$fil 3 eq{/@@txt/@Pf ld @ftx}{$t $c $m
+$y $k $n $o @scc{show}{pop}ifelse}ifelse}ifelse}ifelse $sdf{$dsf $dsa $dsp @ss}
+if setmatrix}bd/@st{matrix currentmatrix exch $SDF{$SCF $SCA $SCP @ss}if $T $C
+$M $Y $K $N $O @scc{{currentpoint 3 -1 roll(0)dup 3 -1 roll 0 exch put dup @gs
+true charpath $ctm setmatrix $ptm concat stroke @gr @np stringwidth pop 3 -1
+roll add exch moveto}forall}{pop}ifelse $SDF{$dsf $dsa $dsp @ss}if setmatrix}
+bd/@te{@ft}bd/@tr{@st}bd/@ta{dup @gs @ft @gr @st}bd/@t@a{dup @gs @st @gr @ft}
+bd/@tm{@sm concat}bd/e{/t{@te}def}bd/r{/t{@tr}def}bd/o{/t{pop}def}bd/a{/t{@ta}
+def}bd/@a{/t{@t@a}def}bd/t{@te}def/T{@np $ctm setmatrix/$ttm matrix def}bd/ddt
+{t}def/@t{/$stm $stm currentmatrix def 3 1 roll moveto $ttm concat ddt $stm
+setmatrix}bd/@n{/$ttm exch matrix rotate def}bd/@s{}bd/@l{}bd/@B{@gs S @gr F}
+bd/@b{@cp @B}bd/@sep{CurrentInkName(Composite)eq{/$ink -1 def}{CurrentInkName
+(Cyan)eq{/$ink 0 def}{CurrentInkName(Magenta)eq{/$ink 1 def}{CurrentInkName
+(Yellow)eq{/$ink 2 def}{CurrentInkName(Black)eq{/$ink 3 def}{/$ink 4 def}
+ifelse}ifelse}ifelse}ifelse}ifelse}bd/@whi{@gs -72000 dup moveto -72000 72000
+lineto 72000 dup lineto 72000 -72000 lineto @cp 1 SetGry fill @gr}bd/@neg{[{1
+exch sub}/exec cvx currenttransfer/exec cvx]cvx settransfer @whi}bd
+/currentscale{1 0 dtransform matrix defaultmatrix idtransform dup mul exch dup
+mul add sqrt 0 1 dtransform matrix defaultmatrix idtransform dup mul exch dup
+mul add sqrt}bd/@unscale{currentscale 1 exch div exch 1 exch div exch scale}bd
+/@sqr{dup 0 rlineto dup 0 exch rlineto neg 0 rlineto @cp}bd/corelsym{@gs @np Tl
+-90 rotate 7{45 rotate -.75 2 moveto 1.5 @sqr fill}repeat @gr}bd/@reg_cor{@gs
+@np Tl -6 -6 moveto 12 @sqr @gs 1 GetGry sub SetGry fill @gr 4{90 rotate 0 4 m
+0 4 rl}repeat stroke 0 0 corelsym @gr}bd/@reg_std{@gs @np Tl .3 w 0 0 5 0 360
+arc @cp @gs 1 GetGry sub SetGry fill @gr 4{90 rotate 0 0 m 0 8 rl}repeat stroke
+@gr}bd/@reg_inv{@gs @np Tl .3 w 0 0 5 0 360 arc @cp @gs 1 GetGry sub SetGry
+fill @gr 4{90 rotate 0 0 m 0 8 rl}repeat stroke 0 0 m 0 0 5 90 180 arc @cp 0 0
+5 270 360 arc @cp GetGry fill @gr}bd/$corelmeter[1 .95 .75 .50 .25 .05 0]def
+/@colormeter{@gs @np 0 SetGry 0.3 w/Courier findfont 5 scalefont setfont/yy xd
+/xx xd 0 1 6{dup xx 20 sub yy m 20 @sqr @gs $corelmeter exch get dup SetGry
+fill @gr stroke xx 18 sub yy 2 add m exch dup 3 ge{1 SetGry}{0 SetGry}ifelse 3
+eq{pop}{100 mul 100 exch sub cvi 20 string cvs show}ifelse/yy yy 20 add def}
+for @gr}bd/@calbar{@gs Tl @gs @np 0 0 m @gs 20 @sqr 1 1 0 0 0 _ 0 @scc pop fill
+@gr 20 0 Tl 0 0 m @gs 20 @sqr 1 1 0 1 0 _ 0 @scc pop fill @gr 20 0 Tl 0 0 m @gs
+20 @sqr 1 0 0 1 0 _ 0 @scc pop fill @gr 20 0 Tl 0 0 m @gs 20 @sqr 1 0 1 1 0 _ 0
+@scc pop fill @gr 20 0 Tl 0 0 m @gs 20 @sqr 1 0 1 0 0 _ 0 @scc pop fill @gr 20
+0 Tl 0 0 m @gs 20 @sqr 1 1 1 0 0 _ 0 @scc pop fill @gr 20 0 Tl 0 0 m @gs 20
+@sqr 1 1 1 1 0 _ 0 @scc pop fill @gr @gr @np -84 0 Tl @gs 0 0 m 20 @sqr clip 1
+1 0 0 0 _ 0 @scc pop @gain @gr 20 0 Tl @gs 0 0 m 20 @sqr clip 1 0 1 0 0 _ 0
+@scc pop @gain @gr 20 0 Tl @gs 0 0 m 20 @sqr clip 1 0 0 1 0 _ 0 @scc pop @gain
+@gr 20 0 Tl @gs 0 0 m 20 @sqr clip 1 0 0 0 1 _ 0 @scc pop @gain @gr @gr}bd
+/@gain{10 10 Tl @np 0 0 m 0 10 360{0 0 15 4 -1 roll dup 5 add arc @cp}for fill
+}bd/@crop{@gs 10 div/$croplen xd .3 w 0 SetGry Tl rotate 0 0 m 0 $croplen neg
+rl stroke @gr}bd/@colorbox{@gs @np Tl 100 exch sub 100 div SetGry -8 -8 moveto
+16 @sqr fill 0 SetGry 10 -2 moveto show @gr}bd/deflevel 0 def/@sax{/deflevel
+deflevel 1 add def}bd/@eax{/deflevel deflevel dup 0 gt{1 sub}if def deflevel 0
+gt{/eax load}{eax}ifelse}bd/eax{{exec}forall}bd/@rax{deflevel 0 eq{@rs @sv}if}
+bd/@daq{dup type/arraytype eq{{}forall}if}bd/@BMP{/@cc xd 11 index 1 eq{12 -1
+roll pop @i}{7 -2 roll 2 rp @I}ifelse}bd systemdict/pdfmark known not{/pdfmark
+/cleartomark ld}if end
+%%EndResource
+%%EndProlog
+%%BeginSetup
+wCorel5Dict begin
+@BeginSysCorelDict
+2.6131 setmiterlimit
+1.00 setflat
+/$fst 20 def
+%%EndSetup
+
+%StartPage
+@sv
+@sm
+@sv
+%StartColorLayer (COMPOSITE)
+@sm @sv @sv
+@rax %Note: Object
+2109.10 2639.59 2168.35 2701.37 @E
+ 0 O 0 @g
+0.20 0.00 0.00 0.20 k
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.216 0.216 0.000 @w
+2138.76 2701.37 m
+2155.03 2701.37 2168.35 2687.47 2168.35 2670.48 c
+2168.35 2653.49 2155.03 2639.59 2138.76 2639.59 c
+2122.42 2639.59 2109.10 2653.49 2109.10 2670.48 c
+2109.10 2687.47 2122.42 2701.37 2138.76 2701.37 c
+@c
+B
+
+@rax %Note: Object
+2099.16 2640.38 2142.72 2692.08 @E
+ 0 O 0 @g
+0.00 1.00 1.00 0.00 k
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.216 0.216 0.000 @w
+2099.16 2692.08 m
+2142.72 2692.08 L
+2142.72 2640.38 L
+2099.16 2640.38 L
+2099.16 2692.08 L
+@c
+B
+
+@rax %Note: Object
+2118.17 2643.48 2174.90 2663.14 @E
+ 0 O 0 @g
+0.00 0.00 0.00 0.40 k
+0 J 0 j [] 0 d 0 R 0 @G
+0.00 0.00 0.00 1.00 K
+0 0.216 0.216 0.000 @w
+2146.54 2663.14 m
+2130.91 2663.14 2118.17 2658.74 2118.17 2653.27 c
+2118.17 2647.87 2130.91 2643.48 2146.54 2643.48 c
+2162.16 2643.48 2174.90 2647.87 2174.90 2653.27 c
+2174.90 2658.74 2162.16 2663.14 2146.54 2663.14 c
+@c
+B
+
+@rs @rs @sm
+%EndColorLayer
+@rs
+@rs
+%EndPage
+%%Trailer
+@EndSysCorelDict
+end
+%%DocumentSuppliedResources: procset wCorel5Dict
diff --git a/Master/texmf-dist/doc/mex/base/tstmex.tex b/Master/texmf-dist/doc/mex/base/tstmex.tex
new file mode 100644
index 00000000000..a1876ad80fd
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/base/tstmex.tex
@@ -0,0 +1,102 @@
+%& --translate-file=il2-pl
+%% Staszek Wawrykiewicz (staw@gust.org.pl). Styczeñ 2000. Public domain.
+%% Przyk³adowy plik TeX-owy; ilustruje proste polecenia sk³adu, deklarowanie
+%% fontu i w³±czanie grafiki.
+%% Plik przetwarzamy z u¿yciem polskiego formatu MeX: mex tstmex.tex
+%% Zaleca siê przestudiowanie zawarto¶ci ca³ego pliku!
+% =========
+% Znak % w wierszu oznacza komentarz; od tego znaku
+% do koñca wiersza tekst jest ignorowany w sk³adzie.
+% Wyj±tkiem jest pierwszy wiersz pliku, zaczynaj±cy siê
+% od znaków %& i zawieraj±cy deklaracjê u¿ytego w tek¶cie
+% kodowania znaków.
+% ==========
+
+Najpierw test polskich liter (iso8859-2): ±æê³ñ󶼿 ¡ÆÊ£ÑÓ¦¬¯
+
+Jak zobaczysz po przetworzeniu tego pliku, kolejny akapit zaczyna siê
+wciêciem. Domy¶lnie ma ono wielko¶æ 20~pt, ale, jak wszystko w~\TeX-u,
+mo¿e to byæ zmienione.
+Sk³ad prostych tekstów jest bardzo ³atwy; \TeX{} automatycznie ³amie
+akapity i~numeruje strony. Pisz±c tekst nie musisz siê martwiæ o~spacje,
+wciêcia itp., skupiasz siê tylko na tre¶ci. Wiele
+spacji w~pisanym tek¶cie czy wiersz z³amany w~wygodnym
+dla nas miejscu
+da nam
+identyczny efekt w~sk³adzie. Zauwa¿y³e¶ pewnie znaczek tyldy, który
+pojawia siê w~tek¶cie ¼ród³owym; s³u¿y on do zaznaczenia spacji,
+na których \TeX{} nie powinien prze³amaæ wiersza.
+Pojedyncze litery na koñcu wiersza nie wygl±daj± zbyt ³adnie, prawda?
+
+\noindent % usuñ wciêcie dla tego akapitu
+Ten akapit nie ma wciêcia. Tekst sk³adany jest domy¶lnym fontem 10~pt
+o~nazwie plr10. {\it To tekst kursyw±}, a~to \bf tekst pogrubiony.
+\rm I~znów przywracamy krój prosty. Nieco dalej zobaczymy, jak mo¿na
+deklarowaæ inne fonty.
+
+\def\BSL{{\tt\char92}} % prosta definicja nowego makra
+\beginsection Punkt 1
+
+
+Polecenie {\tt\BSL beginsection} wyró¿nia tytu³ i~dodaje nieco ¶wiat³a.
+Tym razem zostawili¶my dwa wolne wiersze. Akapit rozpocz±³ siê od wciêcia.
+Spróbuj usun±æ jeden z~tych wolnych wierszy i~zobacz co siê stanie.
+Standardowy \TeX, jakiego u¿ywamy, posiada skromny zasób gotowych
+poleceñ do okre¶lania struktury dokumentu, niemniej jednak pozwala
+w~nieograniczony sposób definiowaæ w³asne polecenia dla tytu³ów,
+podtytu³ów itp. oraz ca³ego uk³adu typograficznego (ang. {\it layout\/}).
+
+\beginsection To jest punkt 2
+
+Jedn± z~najwiêkszych zalet systemu \TeX{} jest elegancki sk³ad wyra¿eñ
+matematycznych, nawet bardzo skomplikowanych, zarówno w~ramach samego
+akapitu $\sum_{n\in A} {1\over n}$, jak i~wyeksponowanych w~osi strony:
+$$\sum_{n\in A} {1\over n}$$
+Czy widzisz ró¿nicê w sk³adzie takiego samego zapisu?
+
+\medskip % pionowy odstêp
+\font\ZZ plr10 at16pt % deklaracja nowego fontu
+%\advance\baselineskip by 10pt % powiêksz interliniê
+\ZZ % w³±cz font
+Font 10pt skalowany do 16 pt.
+
+\rm % ponownie font standardowy
+\beginsection Teraz nieco grafiki
+
+\medskip
+\input epsfx % wczytujemy makra do w³±czania grafiki
+\centerline{\eps{qq.eps}}
+
+\vskip0.7cm % pionowy odstêp
+A mo¿e by tak przeskalowaæ obrazek?
+
+\medskip
+\input trans % wczytujemy makra do transformacji grafiki
+\line{%
+ \hskip2cm
+ \zscale{120}\hbox{\eps{qq.eps}} % skalowanie 120 proc.
+ \hfil albo \hfil
+ \xyscaleto{2cm}\hbox{\eps{qq.eps}} % do wymiaru poziomego 2cm
+\hskip2cm}
+
+\beginsection ¯yj kolorowo!
+
+\input colordvi % makra do obs³ugi koloru
+\centerline{\ZZ\textGreen Zielono mi!}
+
+%\bye % po zablokowaniu tego wiersza znakiem %
+ % mo¿na przetwarzaæ kolejny przyk³ad
+ % ale wynikowy plik DVI lepiej przetwarzaæ programem DVIPS:
+ % dvips tstmex -o tstmex.ps
+ % za¶ ogl±daæ przy pomocy programu GSView/gv/Ghostview.
+\textBlack % przywracamy czarny kolor tekstu
+\beginsection Fonty PostScript-owe
+
+\medskip
+\font\QQ qplri at 23pt
+\QQ
+\centerline{\Red{ABCD czerwone literki}}
+
+\bye % koniec
+Po poleceniu \bye mo¿na pisaæ dowolne komentarze.
+I tak nie uka¿e siê to w sk³adzie. ;-)
diff --git a/Master/texmf-dist/doc/mex/utf8mex/Makefile b/Master/texmf-dist/doc/mex/utf8mex/Makefile
new file mode 100644
index 00000000000..071aff64962
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/Makefile
@@ -0,0 +1,29 @@
+#
+# Wlodek Bzyl, <matwb@univ.gda.pl>
+#
+# 13.VI.2004
+
+# generate format
+
+utf8mex.fmt : utf8mex.ini utf8-pl.tex utf8plsq.tex
+ tex -enc -ini utf8mex.ini
+
+# do some tests
+
+test : test.utf8.dvi test-math.utf8.dvi
+
+test.utf8.dvi : test.utf8.tex
+ tex -fmt utf8mex test.utf8.tex
+
+test-math.utf8.dvi : test-math.utf8.tex
+ tex -fmt utf8mex test-math.utf8.tex
+
+
+%.ps : %.dvi
+ dvips $* -o
+
+clean :
+ rm -f *~ \#* *.{log,dvi,ps}
+
+xclean : clean
+ rm -f utf8mex.fmt
diff --git a/Master/texmf-dist/doc/mex/utf8mex/README b/Master/texmf-dist/doc/mex/utf8mex/README
new file mode 100644
index 00000000000..6809b1b383b
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/README
@@ -0,0 +1,53 @@
+UTF8MeX Wlodek Bzyl
+==================================================================
+June 2004
+
+Attention:
+ due to bugs in Web2C and EncTeX UTF8MeX requires the latest
+ teTeX-beta (at least tetex-src-beta-2.96.6.20040715.tar.gz).
+
+The UTF8MeX package is MeX based format which works with UTF-8
+encoded source files.
+
+------------------------------------------------------------------
+This package is free software, see COPYING for more details.
+The package consists of the following files:
+
+README ................................................. this file
+COPYING ............................... GNU GENERAL PUBLIC LICENSE
+
+utf8mex.ini .................. the ini files for making the format
+utf8-pl.tex ............................ the code tables for UTF-8
+utf8plsq.tex ................ the auxiliary files input by utf8-pl
+
+utf8math.el ............. Emacs lisp package for easier math input
+
+test.utf8.tex, test-math.utf8.tex .............. simple test files
+
+Makefile ............ contains commands to generate the format and
+ to compile the test files
+
+------------------------------------------------------------------
+
+MISCELLANEOUS INSTRUCTIONS
+
+1. To install `utf8mex.fmt' format, first run `make'.
+This should produce the format file named `utf8mex.fmt'.
+Copy this file to the place where other format files are
+stored and update the database file with `texhash'.
+
+[recommended method for current distributions:
+run texconfig, select menu Formats, add the following line
+to fmtutil.cnf
+utf8mex pdfetex mexconf.tex -enc *utf8mex.ini
+save the file and quit the editor; the format will be generated
+and placed in the proper directory]
+
+2. Run `make test'. This command creates `test.utf8.dvi' and
+`test-math.utf8.dvi'.
+
+3. To browse TeX sources start `xterm' with something like
+`xterm -en UTF-8 -fn -misc-fixed-medium-r-normal--18-*-iso10646-1'.
+Next, in the xterm window execute `less test-math.utf8.tex' or
+`less test.utf8.tex'.
+
diff --git a/Master/texmf-dist/doc/mex/utf8mex/examples/Makefile b/Master/texmf-dist/doc/mex/utf8mex/examples/Makefile
new file mode 100644
index 00000000000..2beeede59bc
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/examples/Makefile
@@ -0,0 +1,27 @@
+#
+# Wlodek Bzyl, <matwb@univ.gda.pl>
+#
+# 13.VI.2004
+
+examples = catcode.tex list.tex tilde.tex tilde2.tex
+
+logfiles = $(examples:%.tex=%.log)
+dvifiles = $(examples:%.tex=%.dvi)
+psfiles = $(examples:%.tex=%.ps)
+pdffiles = $(examples:%.tex=%.pdf)
+
+.SUFFIXES:
+.SUFFIXES: .pdf .ps .dvi .tex
+
+%.pdf : %.ps
+ ps2pdf $<
+
+%.ps : %.dvi
+ dvips $< -o
+
+%.dvi : %.tex
+ tex -fmt utf8mex $<
+# utf8mex $<
+
+clean :
+ rm -f *~ \#* $(logfiles) $(dvifiles) $(psfiles) $(pdffiles)
diff --git a/Master/texmf-dist/doc/mex/utf8mex/examples/catcode.tex b/Master/texmf-dist/doc/mex/utf8mex/examples/catcode.tex
new file mode 100644
index 00000000000..409922ef2cf
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/examples/catcode.tex
@@ -0,0 +1,10 @@
+
+\begingroup
+\catcode`\&=12 \mubyte \& &\endmubyte
+\endgroup
+\mubyte \copyright (C)\endmubyte
+\mubyte \dots ...\endmubyte
+
+(C) ... &
+
+\end
diff --git a/Master/texmf-dist/doc/mex/utf8mex/examples/list.tex b/Master/texmf-dist/doc/mex/utf8mex/examples/list.tex
new file mode 100644
index 00000000000..971e20bb56d
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/examples/list.tex
@@ -0,0 +1,12 @@
+
+\begingroup
+\uccode`X=\endlinechar \uppercase{\def\echar{X}}
+\mubyte \myitem \echar*\endmubyte
+\endgroup
+\def\myitem{\item{$\bullet$}}
+
+* the first item
+* the second item *
+* the third item$^*$
+
+\end
diff --git a/Master/texmf-dist/doc/mex/utf8mex/examples/tilde.tex b/Master/texmf-dist/doc/mex/utf8mex/examples/tilde.tex
new file mode 100644
index 00000000000..9b1604b4959
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/examples/tilde.tex
@@ -0,0 +1,8 @@
+
+\catcode`~=12
+\mubyte \atilde a~\endmubyte
+\def\atilde{\~a}
+
+a~la ma kota o~la ma psa
+
+\end
diff --git a/Master/texmf-dist/doc/mex/utf8mex/examples/tilde2.tex b/Master/texmf-dist/doc/mex/utf8mex/examples/tilde2.tex
new file mode 100644
index 00000000000..aa3f4603bd1
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/examples/tilde2.tex
@@ -0,0 +1,17 @@
+
+\input polyset
+
+\catcode`~=12
+
+%\mubyte \addtilde #2a~\endmubyte
+%\mubyte \addtilde #2o~\endmubyte
+
+\def\setmubyte #1#2{\def\runseq##1{\mubyte #1 ##1~\endmubyte}\applyset{#2}}
+
+\def\letters{abcde}
+\setmubyte {\addtilde ##2} {{\letters}}
+\def\addtilde#1~{\~#1}
+
+a~la ma kota o~la ma psa
+
+\end
diff --git a/Master/texmf-dist/doc/mex/utf8mex/test-math.utf8.tex b/Master/texmf-dist/doc/mex/utf8mex/test-math.utf8.tex
new file mode 100644
index 00000000000..aae9c008497
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/test-math.utf8.tex
@@ -0,0 +1,227 @@
+%% Note that this file is UTF-8 encoded -*- coding: utf-8 -*-
+
+%% -- modified manmac macros
+
+\outer\def\begindisplay{\obeylines\startdisplay}
+{\obeylines\gdef\startdisplay#1
+ {\catcode`\^^M=5$$#1\halign\bgroup\indent##\hfil&&\qquad##\hfil\cr}}
+
+\chardef\other=12
+\def\ttverbatim{\begingroup
+ \catcode`\\=\other
+ \catcode`\{=\other
+ \catcode`\}=\other
+ \catcode`\$=\other
+ \catcode`\&=\other
+ \catcode`\#=\other
+ \catcode`\%=\other
+ \catcode`\~=\other
+ \catcode`\_=\other
+ \catcode`\^=\other
+ \obeyspaces \obeylines \tt}
+
+\outer\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=\z@
+ \catcode`\|=0 \rightskip-5pc \ttfinish}
+{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character
+ |obeylines % end of line is active
+ |gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}}
+
+\newskip\ttglue
+\ttglue=.5em plus.25em minus.15em
+
+\catcode`\|=\active
+{\obeylines \gdef|{\ttverbatim \spaceskip\ttglue \let^^M=\ \let|=\endgroup}}
+
+\def\beginsymbols{$$%\displayindent=16pt
+ \vbox\bgroup\halign\bgroup
+ &\qquad\hbox to10pt{\hss$##$\hss}\enspace&\hbox to80pt{##\hss}\cr}
+\outer\def\enddisplay{\crcr\egroup\egroup$$}
+\let\endsymbols=\enddisplay
+
+%% ---
+
+\centerline{{\TeX}book, Chapter 16: Typing Math Formulas}
+
+$$ x × y ⋅ z \quad x ∘ y ∙ z \quad x ∪ y ∩ z $$
+$$ x ⊔ y ⊓ z \quad x ∨ y ∧ z \quad x ± y ∓ z $$
+$$ g^∘ ↦ g^∙ \quad f^*(x) ∩ f_*(y) $$
+$$ x ≤ y ≠ z \quad x ∼ y ≃ z \quad x ≡ y \not≡ z $$
+$$ x ⊂ y ⊆ z \quad f\colon A → B $$
+
+\centerline{{\TeX}book, Chapter 17: More about Math}
+
+$$ ∑_{n=0}^∞ x_n = ∫_{-∞}^{∞} f(x)\,dx $$
+
+\centerline{{\TeX}book, Chapter 18: Fine Point of Mathematics Typing}
+
+$$ \sin2θ=2\sinθ\cosθ \quad ℠= 1.0545 × 10^{-27}\,\rm erg\,sec$$
+$$ Γ_{\!2}+Δ^{\!2} \quad A_1 × A_2 × \cdots × A_n$$ % missing \cdots in u8tex.el
+$$ x_1x_2\ldots x_n $$
+
+\centerline{{\TeX}book, Appendix F: Font Tables}
+
+\bigbreak
+\centerline{\it Lowercase Greek letters}
+\beginsymbols
+α&|\alpha|&ι&|\iota|&ϱ&|\varrho|\cr
+β&|\beta|&κ&|\kappa|&σ&|\sigma|\cr
+γ&|\gamma|&λ&|\lambda|&ς&|\varsigma|\cr
+δ&|\delta|&μ&|\mu|&τ&|\tau|\cr
+ε&|\epsilon|&ν&|\nu|&υ&|\upsilon|\cr
+\varepsilon&|\varepsilon|&ξ&|\xi|&ϕ&|\phi|\cr
+ζ&|\zeta|&o&|o|&φ&|\varphi|\cr
+η&|\eta|&π&|\pi|&χ&|\chi|\cr
+θ&|\theta|&ϖ&|\varpi|&ψ&|\psi|\cr
+Ï‘&|\vartheta|&Ï&|\rho|&ω&|\omega|\cr
+\endsymbols
+
+\bigbreak
+\centerline{\it Uppercase Greek letters}
+\beginsymbols
+Γ&|\Gamma|&Ξ&|\Xi|&Φ&|\Phi|\cr
+Δ&|\Delta|&Π&|\Pi|&Ψ&|\Psi|\cr
+Θ&|\Theta|&Σ&|\Sigma|&Ω&|\Omega|\cr
+Λ&|\Lambda|&Υ&|\Upsilon|\cr
+\endsymbols
+
+\bigbreak
+\centerline{\it Miscellaneous symbols of type Ord}
+\beginsymbols
+ℵ&|\aleph|&\prime&|\prime|&∀&|\forall|\cr
+â„&|\hbar|&∅&|\emptyset|&∃&|\exists|\cr
+ı&|\imath|&∇&|\nabla|&¬&|\neg|\cr
+\jmath&|\jmath|&√&|\surd|&♭&|\flat|\cr
+ℓ&|\ell|&⊤&|\top|&♮&|\natural|\cr
+℘&|\wp|&⊥&|\bot|&♯&|\sharp|\cr
+ℜ&|\Re|&∥&|\Vert|&♣&|\clubsuit|\cr
+%ℜ&|\Re|&∥&|\|\|&♣&|\clubsuit|\cr
+ℑ&|\Im|&∠&|\angle|&♢&|\diamondsuit|\cr
+∂&|\partial|&△&|\triangle|&♡&|\heartsuit|\cr
+∞&|\infty|&\backslash&|\backslash|&♠&|\spadesuit|\cr
+\endsymbols
+
+\bigbreak
+\centerline{\it Large operators}
+$$\openup3pt
+\vbox{\halign{&\qquad\hbox to10pt{\hss$#$\hss}\enspace&
+ \hbox to10pt{\hss$\displaystyle#$\hss}\enspace&
+ \hbox to60pt{#\hss}\cr
+∑&∑&|\sum|&⋂&⋂&|\bigcap|&
+ \bigodot&\bigodot&|\bigodot|\cr
+âˆ&âˆ&|\prod|&⋃&⋃&|\bigcup|&
+ \bigotimes&\bigotimes&|\bigotimes|\cr
+âˆ&âˆ&|\coprod|&\bigsqcup&\bigsqcup&|\bigsqcup|&
+ \bigoplus&\bigoplus&|\bigoplus|\cr
+∫&∫&|\int|&â‹&â‹&|\bigvee|&
+ \biguplus&\biguplus&|\biguplus|\cr
+∮&∮&|\oint|&⋀&⋀&|\bigwedge|\cr
+}}$$
+
+\bigbreak
+\centerline{\it Binary operations}
+\beginsymbols
+±&|\pm|&∩&|\cap|&∨&|\vee|\cr
+∓&|\mp|&∪&|\cup|&∧&|\wedge|\cr
+∖&|\setminus|&⊎&|\uplus|&⊕&|\oplus|\cr
+⋅&|\cdot|&⊓&|\sqcap|&⊖&|\ominus|\cr
+×&|\times|&⊔&|\sqcup|&⊗&|\otimes|\cr
+∗&|\ast|&◃&|\triangleleft|&⊘&|\oslash|\cr
+⋆&|\star|&▹&|\triangleright|&⊙&|\odot|\cr
+⋄&|\diamond|&≀&|\wr|&†&|\dagger|\cr
+∘&|\circ|&\bigcirc&|\bigcirc|&‡&|\ddagger|\cr
+∙&|\bullet|&â–³&|\bigtriangleup|&âˆ&|\amalg|\cr
+÷&|\div|&▽&|\bigtriangledown|\cr
+\endsymbols
+
+\bigbreak
+\centerline{\it Relations}
+\beginsymbols
+≤&|\leq|&≥&|\geq|&≡&|\equiv|\cr
+≺&|\prec|&≻&|\succ|&∼&|\sim|\cr
+≼&|\preceq|&≽&|\succeq|&≃&|\simeq|\cr
+≪&|\ll|&≫&|\gg|&â‰&|\asymp|\cr
+⊂&|\subset|&⊃&|\supset|&≈&|\approx|\cr
+⊆&|\subseteq|&⊇&|\supseteq|&≅&|\cong|\cr
+⊑&|\sqsubseteq|&⊒&|\sqsupseteq|&⋈&|\bowtie|\cr
+∈&|\in|&∋&|\ni|&âˆ&|\propto|\cr
+⊢&|\vdash|&⊣&|\dashv|&⊧&|\models|\cr
+⌣&|\smile|&∣&|\mid|&â‰&|\doteq|\cr
+⌢&|\frown|&∥&|\parallel|&⊥&|\perp|\cr
+\endsymbols
+
+%\bigbreak
+%\centerline{\it Negated relations}
+
+\bigbreak
+\centerline{Arrows}
+$$\vbox{\halign\bgroup
+ \qquad\hbox to10pt{\hss$#$\hss}\enspace&\hbox to75pt{#\hss}&
+ \qquad\hbox to10pt{\hss$#$\hss}\enspace&\hbox to85pt{#\hss}&
+ \qquad\hbox to10pt{\hss$#$\hss}\enspace&\hbox to80pt{#\hss}\cr
+â†&|\leftarrow|&\longleftarrow&|\longleftarrow|&
+ ↑&|\uparrow|\cr
+â‡&|\Leftarrow|&\Longleftarrow&|\Longleftarrow|&
+ ⇑&|\Uparrow|\cr
+→&|\rightarrow|&\longrightarrow&|\longrightarrow|&
+ ↓&|\downarrow|\cr
+⇒&|\Rightarrow|&\Longrightarrow&|\Longrightarrow|&
+ ⇓&|\Downarrow|\cr
+↔&|\leftrightarrow|&\longleftrightarrow&|\longleftrightarrow|&
+ ↕&|\updownarrow|\cr
+⇔&|\Leftrightarrow|&\Longleftrightarrow&|\Longleftrightarrow|&
+ ⇕&|\Updownarrow|\cr
+↦&|\mapsto|&\longmapsto&|\longmapsto|&
+ ↗&|\nearrow|\cr
+↩&|\hookleftarrow|&\hookrightarrow&|\hookrightarrow|&
+ ↘&|\searrow|\cr
+↼&|\leftharpoonup|&\rightharpoonup&|\rightharpoonup|&
+ ↙&|\swarrow|\cr
+↽&|\leftharpoondown|&\rightharpoondown&|\rightharpoondown|&
+ ↖&|\nwarrow|\cr
+⇌&|\rightleftharpoons|\cr
+\enddisplay
+
+\bigbreak
+\centerline{\it Openings}
+\beginsymbols
+\lbrack&|\lbrack|&⌊&|\lfloor|&⌈&|\lceil|\cr
+\lbrace&|\lbrace|&⟨&|\langle|\cr
+\endsymbols
+
+\bigbreak
+\centerline{\it Closings}
+\beginsymbols
+\rbrack&|\rbrack|&⌋&|\rfloor|&⌉&|\rceil|\cr
+\rbrace&|\rbrace|&⟩&|\rangle|\cr
+\endsymbols
+
+\bigbreak
+\centerline{\it Alternate names}
+$$\vbox{\halign{\indent$\hfil#\hfil$\enspace&#\hfil\enspace&
+ (same as #)\hfil\cr
+≠&|\ne| or |\neq|&|\not=|\cr
+≤&|\le|&|\leq|\cr
+≥&|\ge|&|\geq|\cr
+\{&|\{|&|\lbrace|\cr
+\}&|\}|&|\rbrace|\cr
+→&|\to|&|\rightarrow|\cr
+â†&|\gets|&|\leftarrow|\cr
+∋&|\owns|&|\ni|\cr
+∧&|\land|&|\wedge|\cr
+∨&|\lor|&|\vee|\cr
+¬&|\lnot|&|\neg|\cr
+%\vert&|\vert|&\|\cr
+%\Vert&|\Vert|&|\|\|\cr
+}}$$
+
+\bigbreak
+\centerline{Non-math symbols}
+$$\vbox{\halign{\indent$\hfil#\hfil$\enspace&#\hfil\enspace\cr
+§&|\S|\cr
+¶&|\P|\cr
+†&|\dag|\cr
+‡&|\ddag|\cr
+}}$$
+
+
+\bye
diff --git a/Master/texmf-dist/doc/mex/utf8mex/test.utf8.tex b/Master/texmf-dist/doc/mex/utf8mex/test.utf8.tex
new file mode 100644
index 00000000000..935544aeaa4
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/test.utf8.tex
@@ -0,0 +1,23 @@
+%% Note that this file is UTF-8 encoded -*- coding: utf-8 -*-
+
+\nopagenumbers
+\baselineskip = 14pt
+\parindent = 0pt
+\parskip 6pt
+
+Polish diacritics:
+aogonek -- Ä… (uppercase Ä„),
+cacute -- ć (Ć),
+eogonek -- ę (Ę),
+lslash -- Å‚ (Å),
+nacute -- ń (Ń),
+oacute -- ó (Ó),
+sacute -- Å› (Åš),
+zdotaccent -- ż (Ż),
+zacute -- ź (Ź).
+
+Polish quotes: „Ala ma kota -- Ola ma psaâ€.
+
+French quotes: «Ala ma kota w biało\=czerwone kropki».
+
+\end
diff --git a/Master/texmf-dist/doc/mex/utf8mex/utf8math.el b/Master/texmf-dist/doc/mex/utf8mex/utf8math.el
new file mode 100644
index 00000000000..41f3c1f63da
--- /dev/null
+++ b/Master/texmf-dist/doc/mex/utf8mex/utf8math.el
@@ -0,0 +1,312 @@
+;; utf8math.el -*- coding: utf-8 -*-
+
+;; Copyright (C) 2004 Wlodek Bzyl
+
+
+;; This file aims to provide an intuitive input method `utf8math'
+;; to input UTF-8 encoded math symbols defined in plain TeX, LaTeX
+;; and other TeX macro files. To input `α' it suffices to write
+;; `/alpha', `⇔' -- /Leftrightarrow, etc.
+
+;; The code below was taken from `u8tex.el' by Sergei Pokrovsky
+;; (to be found on any CTAN server: support/emacs-modes/u8tex.el).
+;; It differs from the orignal code. The stuff not relevant
+;; to math was removed and several wrong UTF-8 codes were corrected.
+
+
+;; Author: W{\l}odek Bzyl
+;; Maintainer: matwb@univ.gda.pl
+;; Keywords: unicode, math, mule, input method, EncTeX
+
+
+;; This file is not a part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+
+;; Installation
+;;
+;; All you need to do is copy this file to any directory on your
+;; load-path (`C-h v load-path' shows all directories on the load-path)
+;; and add the following code:
+;;
+;; (register-input-method
+;; "utf8math" "utf-8" 'quail-use-package
+;; ""Unicode input using TeX macro names"
+;; "utf8math")
+;;
+;; to one of the Emacs initialization files, for example to `.emacs'
+;; or to `.../emacs/20.*/leim/leim-list.el'.
+;; After that you can switch to the utf8math input method
+;; in the usual way `C-x C-m C-\ utf8math' or by choosing input
+;; method from the menu:
+;; Options -> Mule -> Select Input Method utf8math
+
+
+;;; Code:
+
+(require 'quail)
+
+(quail-define-package
+ "utf8math" "utf-8" "∑∫" t
+ "Input Unicode characters using TeX macro names.
+Use slash (/) instead of backslash as Mule escape:
+to get `alpha' write /alpha, to get `integral' write `/int' etc.
+" nil t nil nil nil nil nil nil nil nil t)
+
+(quail-define-rules
+
+ ;; Typographic symbols
+
+ ("''" ?â€) ("``" ?“)
+ ("/lq" ?‘) ("/rq" ?’)
+ ("/flqq" ?«) ("/frqq" ?») ; French double quotes
+ ("/flq" ?‹) ("/frq" ?›) ; French double quotes
+ ("/glqq" ?„) ("/grqq" ?‟) ; German double quotes
+ ("/glq" ?‚) ("/grq" ?‛) ; German single quotes
+ ("/dots" ?…)
+ ("/plqq" ?„) ("/plrq" ?â€) ; Polish double quotes
+
+ ("/--" ?–) ; 2013 (EN DASH)
+ ("/---" ?—) ; 2014 (EM DASH)
+
+ ("/cent" ?¢) ; after HTML and wasy
+ ("/pound" ?£) ; after HTML
+ ("/euro" ?€) ; \texteuro
+ ("/yen" ?Â¥) ; \textyen
+
+ ;; Lowercase Greek letters
+ ;; (the missing caps like \Alpha come first)
+
+ ("/Alpha" ?Α) ("/alpha" ?α)
+ ("/Beta" ?Β) ("/beta" ?β)
+ ("/gamma" ?γ) ("/Gamma" ?Γ)
+ ("/delta" ?δ) ("/Delta" ?Δ)
+ ("/Epsilon" ?Ε) ("/epsilon" ?ε)
+ ("/Zeta" ?Ζ) ("/zeta" ?ζ)
+ ("/Eta" ?Η) ("/eta" ?η)
+ ("/theta" ?θ) ("/vartheta" ?ϑ) ("/Theta" ?Θ)
+ ("/Iota" ?Ι) ("/iota" ?ι)
+ ("/Kappa" ?Κ) ("/kappa" ?κ)
+ ("/lambda" ?λ) ("/Lambda" ?Λ)
+ ("/Mu" ?Μ) ("/mu" ?μ)
+ ("/Nu" ?Î) ("/nu" ?ν)
+ ("/Omicron" ?Ο) ("/omicron" ?ο)
+ ("/xi" ?ξ) ("/Xi" ?Ξ)
+ ("/pi" ?π) ("/varpi" ?ϖ) ("/Pi" ?Π)
+ ("/Rho" ?Ρ) ("/rho" ?Ï) ("/varrho" ?ϱ)
+ ("/sigma" ?σ) ("/varsigma" ?ς) ("/Sigma" ?Σ)
+ ("/Tau" ?Τ) ("/tau" ?τ)
+ ("/upsilon" ?Ï…) ("/Upsilon" ?Î¥)
+ ("/phi" ?ϕ) ("/varphi" ?φ) ("/Phi" ?Φ)
+ ("/Chi" ?Χ) ("/chi" ?χ)
+ ("/psi" ?ψ) ("/Psi" ?Ψ)
+ ("/omega" ?ω) ("/Omega" ?Ω)
+
+ ;; Miscellaneous symbols
+
+ ("/aleph" ?ℵ) ("/beth" ?ℶ) ("/gimel" ?ℷ) ("/daleth" ?ℸ)
+ ("/hbar" ?â„)
+ ("/imath" ?ı)
+ ("/ell" ?â„“)
+ ("/wp" ?℘)
+ ("/Re" ?ℜ) ("/Im" ?ℑ)
+ ("/partial" ?∂)
+ ("/infty" ?∞)
+ ("/prime" ?′)
+ ("/emptyset" ?∅)
+ ("/nabla" ?∇)
+ ("/surd" ?√)
+ ("/top" ?⊤)
+ ("/bot" ?⊥)
+ ("/|" ?∥)
+ ("/angle" ?∠)
+ ("/triangle" ?â–³)
+ ("/backslash" ?\\)
+ ("//" ?/) ; special !!
+ ("/forall" ?∀) ("/exists" ?∃)
+ ("/neg" ?¬)
+ ("/flat" ?♭) ("/natural" ?♮) ("/sharp" ?♯)
+ ("/clubsuit" ?♣) ("/diamondsuit" ?♢)
+ ("/heartsuit" ?♡) ("/spadesuit" ?♠)
+ ("/mho" ?℧) ("/complement" ?âˆ) ("/lozenge" ?â—Š) ; amssymb
+ ("/square" ?â–¡) ("/blacksquare" ?â– ) ; amssymb
+ ("/barwedge" ?⊼) ("/veebar" ?⊻) ; amssymb
+
+ ;; “Large†operators
+
+ ("/sum" ?∑)
+ ("/prod" ?âˆ)
+ ("/coprod" ?âˆ)
+ ("/int" ?∫)
+ ("/oint" ?∮)
+ ("/bigcap" ?â‹‚)
+ ("/bigcup" ?⋃)
+ ("/bigvee" ?â‹)
+ ("/bigwedge" ?â‹€)
+
+ ;; Binary operations
+
+ ("/pm" ?±) ("/mp" ?∓)
+ ("/setminus" ?∖)
+ ("/cdot" ?⋅) ("/times" ?×)
+ ("/ast" ?∗) ("/star" ?⋆)
+ ("/diamond" ?â‹„)
+ ("/circ" ?∘)
+ ("/bullet" ?∙)
+ ("/div" ?÷)
+ ("/cap" ?∩) ("/cup" ?∪)
+ ("/uplus" ?⊎)
+ ("/sqcap" ?⊓) ("/sqcup" ?⊔)
+ ("/triangleleft" ?â—ƒ) ; changed on 10.VII.2004
+ ("/triangleright" ?â–¹) ; ditto
+ ("/wr" ?≀)
+ ("/bigcirc" ?â—¯)
+ ("/bigtriangleup" ?â–³) ("/bigtriangledown" ?â–½)
+ ("/vee" ?∨) ("/wedge" ?∧)
+ ("/oplus" ?⊕) ("/ominus" ?⊖)
+ ("/otimes" ?⊗) ("/oslash" ?⊘)
+ ("/odot" ?⊙)
+ ("/dagger" ?†) ("/ddagger" ?‡)
+ ("/amalg" ?âˆ)
+
+ ;; Relations
+
+ ("/leq" ?≤)
+ ("/prec" ?≺) ("/preceq" ?≼)
+ ("/ll" ?≪)
+ ("/subset" ?⊂) ("/subseteq" ?⊆)
+ ("/sqsubseteq" ?⊑)
+ ("/in" ?∈)
+ ("/vdash" ?⊢)
+ ("/smile" ?⌣)
+ ("/frown" ?⌢)
+ ("/geq" ?≥)
+ ("/succ" ?≻) ("/succeq" ?≽)
+ ("/gg" ?≫)
+ ("/supset" ?⊃) ("/supseteq" ?⊇)
+ ("/sqsupseteq" ?⊒)
+ ("/ni" ?∋)
+ ("/dashv" ?⊣)
+ ("/mid" ?∣)
+ ("/parallel" ?∥)
+ ("/equiv" ?≡)
+ ("/sim" ?∼) ("/simeq" ?≃)
+ ("/asymp" ?â‰)
+ ("/approx" ?≈)
+ ("/cong" ?≅)
+ ("/bowtie" ?⋈)
+ ("/propto" ?âˆ)
+ ("/models" ?⊧) ; changed on 10 July 2004
+ ("/doteq" ?â‰)
+ ("/perp" ?⊥)
+
+ ;; Negated relations
+
+ ("/not<" ?≮)
+ ("/not/leq" ?≰)
+ ("/not/prec" ?⊀) ("/not/preceq" ?⋠)
+ ("/not/subset" ?⊄) ("/not/subseteq" ?⊈)
+ ("/not/sqsubseteq" ?â‹¢)
+ ("/not>" ?≯)
+ ("/not/geq" ?≱)
+ ("/not/succ" ?âŠ) ("/not/succeq" ?â‹¡)
+ ("/not/supset" ?⊅) ("/not/supseteq" ?⊉)
+ ("/not/sqsupseteq" ?â‹£)
+ ("/not=" ?≠)
+ ("/not/equiv" ?≢)
+ ("/not/sim" ?â‰) ("/not/simeq" ?≄)
+ ("/not/approx" ?≉)
+ ("/not/cong" ?≇)
+ ("/not/asymp" ?≭)
+
+ ;; Arrows
+
+ ("/leftarrow" ?â†) ("/Leftarrow" ?â‡)
+ ("/rightarrow" ?→) ("/Rightarrow" ?⇒)
+ ("/leftrightarrow" ?↔) ("/Leftrightarrow" ?⇔)
+ ("/mapsto" ?↦)
+ ("/hookleftarrow" ?↩)
+ ("/leftharpoonup" ?↼)
+ ("/leftharpoondown" ?↽)
+ ("/rightleftharpoons" ?⇌)
+ ("/hookrightarrow" ?↪)
+ ("/rightharpoonup" ?⇀)
+ ("/rightharpoondown" ?â‡)
+ ("/searrow" ?↘)
+ ("/swarrow" ?↙)
+ ("/nwarrow" ?↖)
+ ("/uparrow" ?↑) ("/Uparrow" ?⇑)
+ ("/downarrow" ?↓) ("/Downarrow" ?⇓)
+ ("/updownarrow" ?↕) ("/Updownarrow" ?⇕)
+ ("/nearrow" ?↗)
+
+ ;; Openings ;; Closings
+
+ ("/lfloor" ?⌊) ("/rfloor" ?⌋)
+ ("/langle" ?⟨) ("/rangle" ?⟩) ; changed on 10 July 2004
+ ("/lceil" ?⌈) ("/rceil" ?⌉)
+
+ ;; Alternate names
+
+ ("/ne" ?≠) ("/neq" ?≠)
+ ("/le" ?≤) ("/ge" ?≥)
+ ("/to" ?→)
+ ("/gets" ?â†)
+ ("/owns" ?∋)
+ ("/land" ?∧)
+ ("/lor" ?∨)
+ ("/lnot" ?¬)
+ ("/vert" ?∣)
+ ("/Vert" ?∥)
+
+ ;; Non-math symbols
+
+ ("/S" ?§) ("/P" ?¶)
+ ("/dag" ?†) ("/ddag" ?‡)
+ ("/brokenbar" ?¦)
+ ("/brvbar" ?¦) ; like in HTML
+ ("/reg" ?®) ; like in HTML, unlike TeX's /registered
+ ("/trade" ?â„¢) ; like in HTML
+ ("/frownie" ?☹)
+ ("/smiley" ?☺)
+ ("/blacksmiley" ?☻)
+
+ ;; Combining characters
+
+ ("/'{}" ?Ì)
+ ("/`{}" ?Ì€)
+ ("/^{}" ?Ì‚)
+ ("/\"{}" ?̈)
+ ("/~{}" ?̃)
+ ("/={}" ?¯) ; or else COMBINING MACRON = ("/={}" ?̄) ?
+ ("/.{}" ?̇)
+ ("/u{}" ?̆)
+ ("/v{}" ?̌)
+ ("/H{}" ?Ì‹)
+ ("/t{}" ?Í¡)
+ ("/c{}" ?̧)
+ ("/d{}" ?Ì£)
+ ("/b{}" ?̱)
+
+ ;; \mathbb
+
+ ("/bbC" ?â„‚) ("/bbH" ?â„) ("/bbN" ?â„•) ("/bbP" ?â„™)
+ ("/bbQ" ?â„š) ("/bbR" ?â„) ("/bbZ" ?ℤ)
+
+)
+
+;;; utf8math.el ends here
diff --git a/Master/texmf-dist/doc/plain/cellular/cellular.doc b/Master/texmf-dist/doc/plain/cellular/cellular.doc
new file mode 100644
index 00000000000..0a46d604381
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/cellular/cellular.doc
@@ -0,0 +1,114 @@
+% File: TeX Inputs cellular.doc
+% Author: J E Pittman
+% Bitnet: JEPTeX@TAMVenus
+% Internet: JEPTeX@Venus.TAMU.EDU
+% Date: November 8, 1988
+
+A cellular table is specified by:
+
+ \begincellular{specifications that change defaults}
+ appropriate macro definitions
+ column header specifications
+ row specifications (header and data)
+ \endcellular
+
+The following are examples of specifications that change defaults:
+
+ \pixelwidth=1in
+ \divide\pixelwidth by 300
+
+ The pixel width dimension register should be set to the resolution
+ of the device used. The default is 1/300th of an inch.
+
+ \setverticaladjustment -or- \sethorizontaladjustment
+
+ Some printers (such as the Xerox 9700s and 4050s) produce vertical
+ and horizontal rules that have a different visual thickness for the
+ same specified thickness. The macros set vertical and set
+ horizontal adjustment specified that vertical or horizontal rules
+ are to be thickened by pixel width, which may correct this problem.
+
+ \edef\everycolumn{\everycolumn
+ \leftrulewidth=0.4pt\relax
+ \rightrulewidth=\leftrulewidth
+ \leftborderskip=6pt plus 1fil\relax
+ \rightborderskip=\leftborderskip
+ \columnwidth=\zeropt\relax
+ \columnwidth=\zeropt\relax
+ }%
+
+ An \edef can be used to add material (usually default overrides) to
+ the every column macro. The information shown above reflect the
+ defaults. Care must be exercised to avoid introducing spurous
+ spaces, which will be very visible when output.
+
+ \edef\everyrow{\everyrow
+ \toprulewidth=0.4pt\relax
+ \bottomrulewidth=\toprulewidth
+ \topborderskip=3pt plus 1fil\relax
+ \bottomborderskip=\topborderskip
+ \rowheight=\zeropt\relax
+ }%
+
+ Same as every column.
+
+ \tracingexpansions=1
+
+ This specification will request notes on how column and rows are
+ expanded to accommedate spans.
+
+Any sort of macros can be defined within a cellular table. An obvious
+example is abbrevations for commonly used control sequence names.
+
+A column header is specified as:
+
+ \column{specifications}
+
+ The specifications are the same as for every column. Note: There
+ is a considerable amount of processing required for these
+ specifications, wise selection of defaults can decrease execution
+ time significantly.
+
+ Column headers are optional.
+
+Rows are specified as a row header (similiar to a column header) and a
+series of entry specifications.
+
+An entry specification can be any of the following:
+
+ \blank
+
+ A blank entry specification creates a completely blank spot in the
+ table (no rules or text).
+
+ \mergeright
+
+ A merge right specification merges the width of the entry into the
+ width of the entry to the right. It is used to create column
+ spans.
+
+ \mergedown
+
+ Similar to merge right. Note: The overhead for a merge down
+ specification is considerably higher than a merge right.
+ Therefore, when specifing an entry that spans both rows and
+ columns, merge rights should be used as much as possible. For
+ example:
+
+ > > > V V V V V
+ > > > V rather V V V V
+ > > > V than V V V V
+ > > > * > > > *
+
+ \entry{horizontal mode material}
+
+ An entry macro takes the specified material and formats it as
+ appropriate.
+
+It is not necessary to complete every row.
+
+Vertical mode material can be added after a row by specifying:
+
+ \noalign{vertical mode material}
+
+at any point in the row. Multiple no aligns are permitted.
diff --git a/Master/texmf-dist/doc/plain/cellular/origin b/Master/texmf-dist/doc/plain/cellular/origin
new file mode 100644
index 00000000000..89d309c957c
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/cellular/origin
@@ -0,0 +1,28 @@
+Date: Wed, 9 Nov 88 13:33:46 CST
+From: J E PITTMAN <JEPTEX@venus.tamu.edu>
+Subject: TeX Inputs cellular.tex (table-generating macros)
+Keywords: macros
+
+Several months ago, someone sent in a request for macros that allow vertical
+and horizontal spans within a ruled table. There have also been questions
+about `nubs' and `gaps' within ruled tables.
+
+After thinking about the problem for a while, I realized that a solution was to
+abandon the \halign primitive and start from scratch.
+
+I have finished my first attempt at a set of table generating macros, which I
+have chosen to call Cellular.TeX. These macros allow for both vertical and
+horizontal spans and take steps to prevent `nubs' and `gaps' when rules are
+used.
+
+They are, unfortunately, very slow and I have not been able to increase their
+speed without sacrificing memory conservation and generality.
+
+I am sending the macros under separate cover since there are nearly 1,000 lines
+of code involved, divided into five files. Detailed comments are available in
+the file TeX Inputs cellular.doc.
+
+J E Pittman Bitnet: JEPTeX@TAMVenus
+User Services Group Internet: JEPTeX@Venus.TAMU.Edu
+Computing Services Center
+Texas A&M University
diff --git a/Master/texmf-dist/doc/plain/gustlib/README b/Master/texmf-dist/doc/plain/gustlib/README
new file mode 100644
index 00000000000..addbba104d2
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/gustlib/README
@@ -0,0 +1,146 @@
+GUSTLIB
+===========
+W tym katalogu znajduje siê parê | In this catalogue you'll find a couple
+przydatnych makr do \input-owania | of useful macros (to be input).
+Jest to moja propozycja podrêcznej | It is my proposal of a handy library
+biblioteczki dla u¿ytkowników | primarily for plain format users,
+g³ównie Plain/MeX, choæ powinny | although the macros are supposed
+dzialaæ te¿ w LaTeX-u. | to work also with LaTeX.
+ |
+Niektóre pakiety s± ju¿ umieszczone | some packages are already located
+w strukturze katalogów TeXLive CD | in the TeX Live CD structure
+(patrz lista na koñcu pliku) | (see the end of this file)
+----------------------------------------------------------------------------
+1. biblo10.zip
+ BibloTeX to system makr do | Macros for generating bibliography
+ generowania bibliografii w Plain. | in Plain (emulating LaTeX's macros)
+ Od strony u¿ytkownika makra te |
+ emuluj± dzia³anie makr LaTeX-a |
+B. Lichoñski
+----------------------------------------------------------------------------
+2. infram.tex
+ niemal¿e trywialne makro do | nearly trivial macro for putting
+ ujmowania tekstu w ramkê | a frame around a text (infr-ex.tex --
+ (infr-ex.tex -- przyk³ad u¿ycia) | an example how to use it).
+folk's invention
+----------------------------------------------------------------------------
+3. licz.zip
+ makra do rozwijania liczb | macros for expanding numbers into
+ w napisy i przyk³ad. | text strings (rather for Poles ;-).
+M. Ryæko
+----------------------------------------------------------------------------
+4. map.zip
+ makra do operacji na ¿etonach | generic macros for token manipulations;
+ (token) i makra do spacjowania | macros for letter spacing (tsp.tex)
+ tekstu (tsp.tex) oraz | and underlining text (tun.tex)
+ podkre¶lania (tun.tex) wraz | with examples.
+ z przyk³adami. |
+M. Ryæko
+----------------------------------------------------------------------------
+5. meashor.tex
+ makro do wyznaczania po³o¿enia | a macro for determining a position
+ w akapicie (polecane do mierzenia | in a paragraph (recommended for
+ d³ugo¶ci ostatniego wiersza | measuring the length of the last
+ akapitu). | line of a paragraph).
+B. Jackowski
+----------------------------------------------------------------------------
+6. mimulcol.tex
+ sk³ad wielo³amowy (mcol-ex.tex | multicolumn format (mcol-ex.tex
+ -- przyk³ad u¿ycia). | -- an example how to use it).
+F. Mittelbach, | F. Mittelbach,
+ ,,splainowa³'' B. Jackowski | ``plained'' by B. Jackowski
+----------------------------------------------------------------------------
+7. plbtx993.zip
+ polskie style bibliograficzne | Polish bibliography styles for LaTeX
+ do programu BibTeX dla LaTeX | (for Plain use with macros from
+ (w Plain wraz z makrami z pakietu | biblo10.zip package)
+ biblo10.zip) |
+B. Lichoñski
+----------------------------------------------------------------------------
+8. plidxmac.zip
+ makra do tworzenia indeksów | generic macros for index entries
+ w Plain w oparciu o program | with plindex (Polish adaptation
+ plindex. | of MakeIndex).
+B. Lichoñski
+----------------------------------------------------------------------------
+9. roundbox.tex
+ ramki zaokr±glone (rbox-ex.tex | rounded frames (rbox-ex.tex
+ -- przyk³ad u¿ycia). | -- an example how to use it).
+G. Glendown i B. Jackowski
+----------------------------------------------------------------------------
+10. tp-crf.tex
+ makra do obs³ugi odsy³aczy dla | generic macros for cross-references;
+ formatu plain, na koñcu pliku | example of use at the end of file.
+ zawarto przyk³ad u¿ycia. |
+T. Przechlewski
+----------------------------------------------------------------------------
+11. verbatim.tex
+ makra do sk³adu ,,dos³ownego'': | all purpose verbatim macros
+ np. cytatów kodu programów. | (program listings, etc.).
+D. E. Knuth et al.
+
+============================================================================
+Inne makra z GUSTLIB | Other macros from GUSTLIB
+
+texmf/dvips/tex-ps/mirr.hd
+ plik nag³ówkowy dla DVIPS do | this small header for DVIPS can
+ wydruku ,,lustrzanego'' (mirror) | be used for producing mirrored
+ na drukarkach, np. | output on printers, e.g.
+ dvips -hmirr.hd [other_options1] <DVI_file> [other_options2]
+B. Jackowski, P. Pianowski
+----------------------------------------------------------------------------
+texmf/tex/generic/c_pascal/*
+ CAP (C albo Pascal) -- makra do | CAP (C and Pascal) macro package for
+ sk³adu programów w C i Pascalu | typesetting programs in C and Pascal
+----------------------------------------------------------------------------
+texmf/tex/generic/insbox/*
+ makra do umieszczania rysunków | macros for inserting pictures/boxes
+ lub pude³ek z tekstem w ramach | into paragraphs.
+ akapitu. |
+M. Gulczy\'nski
+----------------------------------------------------------------------------
+texmf/tex/generic/poligraf/poligraf.tex
+ makra do obudowy strony dokumentu | preparation of pages for prepress, color
+ dla celów drukarskich (pasery, | separation, crop-marks, color and gray
+ paski kontrolne kolorów i szaro- | scale bars, booklet preparation, etc.
+ ¶ci), separacje barwne, monta¿ |
+ stron na arkuszach drukarskich |
+J. M. Nowacki
+----------------------------------------------------------------------------
+texmf/tex/generic/tex-ps/bop-hax.tex
+ makra do obs/lugi druku | macros for landscape and mirror
+ pejza¿owego i lustrzanego | (meant for PostScript/Dvips).
+ z wykorzystaniem sterownika Dvips |
+B. Jackowski i P. Pianowski
+----------------------------------------------------------------------------
+texmf/tex/generic/tex-ps/cmyk-hax.tex
+ pakiet makr do wykonywania | the set of macros for making color
+ wyci±gów barwnych (tak¿e | separation (also bitmaps) and examples
+ bitmap) i przyk³ady | of use
+B. Jackowski, P. Pianowski
+----------------------------------------------------------------------------
+texmf/tex/generic/tex-ps/epsfx.tex
+ rozszerzenie makr epsf.tex | extension of T. Rokicki's epsf.tex:
+ T. Rokickiego; pozwala bezpiecznie| safe including of EPS files generated
+ w³±czaæ do sk³adu pliki EPS | by Dvips, can also display bounding
+ tworzone programem Dvips oraz | boxes. (for dvips 5.58)
+ wy¶wietlaæ na ¿yczenie |
+ prostok/at ograniczaj±cy |
+ (bounding box). (dla dvips 5.58) |
+B. Jackowski i P. Pianowski
+----------------------------------------------------------------------------
+texmf/tex/generic/tex-ps/trans.tex
+ makra u³atwiaj±ce geometryczne | macros for easy transformations:
+ przekszta³cenia elementów | rotation, slanting, scaling of boxes
+ sk³adu (obracanie, pochylanie, | (eg., containing text or picture).
+ przeskalowania). |
+B. Jackowski i P. Pianowski
+----------------------------------------------------------------------------
+texmf/tex/generic/tap/tap.tex
+ pakiet makr do wygodnego sk³adu | generic macros for making tables;
+ tabelek, tak¿e kolorowych. | also coloured/grayed.
+B. Jackowski, P. Pianowski, P. Strzelczyk
+
+----------------------------------------------------------------------------
+Prepared by Staszek Wawrykiewicz <StaW@gust.org.pl>
+24.03.98
diff --git a/Master/texmf-dist/doc/plain/gustlib/readme.biblotex b/Master/texmf-dist/doc/plain/gustlib/readme.biblotex
new file mode 100644
index 00000000000..20d45de5cd8
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/gustlib/readme.biblotex
@@ -0,0 +1,17 @@
+Gdynia 2 IX 1994
+================
+
+To jest pakiet BibloTeX v.1.0. ________________________________Free software!
+
+BibloTeX to system makr do generowania bibliografii w systemie plain-TeX.
+Od strony u§ytkownika makra te emuluj† dzia’anie makr LaTeX-owych.
+
+
+Dalsze informacje
+-----------------
+Dalszych informacji nale§y szuka w dokumentacji -> plik texidxbs.zip
+
+
+Test
+----
+Aby przetestowa te makra nale§y skompilowa plik -> przyklad.tex
diff --git a/Master/texmf-dist/doc/plain/gustlib/readme.plbtx993 b/Master/texmf-dist/doc/plain/gustlib/readme.plbtx993
new file mode 100644
index 00000000000..bcb5b2d3d64
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/gustlib/readme.plbtx993
@@ -0,0 +1,75 @@
+Gdynia 22 X 1997
+================
+
+To jest pakiet PLBTXBST v.0.99.3[a-z] __________________________Free software!
+
+PLBTXBST v.0.99.3[a-z] to system polskich styli bibliograficznych
+dla programu BibTeX v.0.99[a-z].
+
+Styli tych mo/zna u/zywa/c w~systemie \LaTeX\ lub
+plain-\TeX (wraz ze zbiorem makr \BibloTeX).
+
+
+Podzi/ekowania
+--------------
+Dziekuje mojemu najwytrwalszemu testerowi
+Andrzejowi Kosi/nskiemu (and@ichf.edu.pl)
+za przetrzepanie moich styli. Dzieki niemu
+powsta/ly wersje v.0.99.[1-3][a-z].
+
+
+Dalsze informacje
+-----------------
+Dalszych informacji nale/zy szuka/c w dokumentacji -> plik texidxbs.zip
+dost/epny pod adresem:
+
+ ftp://ftp.gust.org.pl/GUST/contrib/plindex/texidxbs.zip
+
+
+
+Opis plik/ow
+------------
+00CONTEN -- zawarto/s/c katalogu bie/z/acego
+
+README -- ten plik
+
+PLABBRV BST -- cztery gotowe do pracy polskie style bibliograficzne
+PLALPHA BST
+PLPLAIN BST
+PLUNSRT BST
+
+PLBTXBST DOC -- cztery polskie style bibliograficzne wraz z dokumentacj/a
+ nie gotowe do pracy
+
+MAKE-BST -- plik u/latwiaj/acy generacj/e czterech podstawowych styli
+ z~pliku plbtxbst.doc
+
+TEST.TEX
+i TEST.BIB -- ma/ly przyk/ladzik
+
+
+Generowanie styli
+-----------------
+W pliku PLBTXBST.DOC znajduj/a si/e cztery polskie style bibliograficzne
+(PLABBRV.BST, PLALPHA.BST, PLPLAIN.BST, PLUNSRT.BST), kt/ore mo/zna
+wygenerowa/c nast/epuj/aco:
+
+cc -P -E -DPLPLAIN plbtxbst.doc | grep -v "^%" > plplain.bst
+cc -P -E -DPLUNSRT plbtxbst.doc | grep -v "^%" > plunsrt.bst
+cc -P -E -DPLALPHA plbtxbst.doc | grep -v "^%" > plalpha.bst
+cc -P -E -DPLABBRV plbtxbst.doc | grep -v "^%" > plabbrv.bst
+
+Dalszych informacji na temat generacji styli nale/zy szuka/c w dokumentacji
+ftp://ftp.gust.org.pl/GUST/contrib/plindex/texidxbs.zip
+
+
+Autor
+-----
+Nie czuj opor/ow i informuj mnie o ka/zdym znalezionym b/l/edzie.
+Jestem uchwytny na li/scie dyskusyjnej GUSTu (GUST-L@man.torun.pl)
+
+Mi/lej zabawy!
+
+**Bogus/law Lichonski (b.lichonski@gwo.com.pl)
+
+[EOF]
diff --git a/Master/texmf-dist/doc/plain/gustlib/readme.plmac218 b/Master/texmf-dist/doc/plain/gustlib/readme.plmac218
new file mode 100644
index 00000000000..5a2127faa0c
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/gustlib/readme.plmac218
@@ -0,0 +1,24 @@
+Sopot 7 V 1996
+==============
+
+To jest pakiet PLIDXMAC v.2.18. ________________________________Free software!
+
+PLIDXMAC to system makr do tworzenia indeks/ow w systemie plain-TeX.
+Od strony u/zytkownika makra te emuluj/a dzia/lanie makr LaTeX-owych.
+
+Test
+----
+Aby przetestowa/c te makra nale/zy skompilowa/c plik -> przyklad.tex
+nast/pnie uruchomi/c program PLINDEX z parametrami jak w przyk/ladowym
+pliku plind.bat i ponownie skompilowa/c plik
+
+Plik stylu PLAINTEX.IST mo/zna umie/sci/c w katalogu wskazywanym przez
+zmienn/a systemow/a (np: set indexstyle=c:\emtex\idxstyle)
+
+Dalsze informacje
+-----------------
+Dalszych informacji nale/zy szuka/c w pakiecie plind211.zip (plindex.asc)
+i w dokumentacji -> plik texidxbs.zip (archiwum GUST
+ ftp.gust.org.pl:/pub/TeX/GUST/contrib/plindex/texidxbs.zip)
+
+(pakiet zmodyfikowa/l i uporz/adkowa/l St. Wawrykiewicz, 5 V 96)
diff --git a/Master/texmf-dist/doc/plain/harvmac/harvsamp.tex b/Master/texmf-dist/doc/plain/harvmac/harvsamp.tex
new file mode 100644
index 00000000000..738c1cde5d7
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/harvmac/harvsamp.tex
@@ -0,0 +1,273 @@
+\input harvmac
+
+\Title{HUTP-91/A000}{This is the Template}
+
+%For more complicated situations, substitute for {\it either\/} argument:
+%\Title{\vbox{\baselineskip12pt\hbox{HUTP-88/A000}\hbox{SLAC-PUB 88-001}
+% \hbox{photocopy at own risk}}}
+%{\vbox{\centerline{This title is too long to fit}
+% \vskip2pt\centerline{comfortably on one line*}}}
+% \footnote{}{*optional footnote on title}
+
+\centerline{Author One and Author Two\footnote{$^\dagger$}
+{(author@huhepl.hepnet, \ @huhepl.bitnet, \ or \ @huhepl.harvard.edu)}}
+\bigskip\centerline{Lyman Laboratory of Physics}
+\centerline{Harvard University}\centerline{Cambridge, MA 02138}
+
+%if too many authors for abstract on same page, say \vfill\eject\pageno0
+
+\vskip .3in
+This sample is produced by the file `sample.tex' in the directory
+tex\$macros and is intended to exhibit the conventions used
+in the file `harvmac.tex' also in this directory, as inputted above.
+{\it (You do not need to copy {\rm tex\$macros:harvmac.tex} into your own
+directory\/}, nor do you need to explicitly specify its directory as
+long as there is no harvmac.tex in your default directory.)
+The vskips, etc., on this title page have been chosen to give
+a reasonable looking HUTP style preprint in either full-sized or reduced
+format (selected by typing b or $\ell$ in response to the big/little query
+from the macro). Note that the `Title' and `Date' macros should be used
+together to choose fonts and horizontal size appropriately, suppress first
+page number, etc., for `big' and `little' formats with title page. One may
+most easily start a new paper by making a copy of this sample and then
+replacing the dummy text with something potentially more interesting. It is
+useful to read pp.~1--54, 127--201 of Knuth's {\it Texbook\/}.
+
+\Date{4/91} %replace this line by \draft for preliminary versions
+ %or specify \draftmode at some point
+
+%if you want double-space, use e.g. \baselineskip=20pt plus 2pt minus 2pt
+
+\newsec{Introduction}
+
+Sections are begun
+\def\\#1 {{\tt\char'134#1} }% (defines \\ to single backslash in macro names)
+using the macro \\newsec as above. For papers without separate sections,
+leave out \\newsec and equations will automatically be numbered consecutively
+(without section numbers).
+
+References are done using the macro \\ref as follows\ref
+\rIi{John Q. Physicist, Phys. Rev. D20 (1980) 1234.}\ref\rIii{Author
+One and Author Two, Nucl. Phys. B52 (1975) 439.}.
+The labels on the references\rIi\ and \rIii\ (which include the brackets,
+note the second backslash to provide a space) can then be used to refer
+back to them\rIi. (note no extra backslash needed before period\rIii, or
+before comma.) Here is how to put two papers in one reference\ref
+\rAG{L. Alvarez-Gaum\'e and P. Ginsparg, ``The Structure of
+Gauge and Gravitational Anomalies,'' Harvard preprint HUTP-84/A016,
+to appear in Ann. Phys.\semi
+L. Alvarez-Gaum\'e and P. Ginsparg, Nucl. Phys. B243 (1984) 449.}.
+Note the use of the macro \\semi %(= ;\hfil\break)
+to separate them (the macro \\nref can be used to suppress the immediate
+appearance of the bracketed reference number in the text if desired\ref
+\rSP{Seminal Paper.}%
+\nref\rMIF{Moderately Interesting Follow-ups.}%
+--\ref\rCUR{Completely Useless Ripoffs.}). The references are listed in the
+file refs.tmp, and can be of arbitrary length.
+
+The macro \\foot is used for footnotes.\foot{like this} They also get
+automatically numbered\foot{consecutively} throughout the paper.
+
+To do equations we use the macro \\eqn
+%
+\eqn\eIi{R^a{}_b=d\om ab+\om ac\wedge\om cb}
+%
+and
+%
+\eqn\eIii{\om a{{b,\mu}}\equiv e^a{}_\nu\grad\mu e_b{}^\nu=
+-e_b{}^\nu\grad\mu e^a{}_\nu.}
+%
+The equations are then referred to (see \eIi\ or \eIii) using the
+label (which includes the parentheses). In draftmode, the equation
+labels appear in the right margin next to the equation.
+
+%To start in the middle of text, initialize for example with
+%\pageno=5\secno=3\meqno=2\startrefs{24}%\draftmode
+
+\newsec{Body}
+
+Ordinarily one uses equations with internal eqaligns:
+%
+\eqn\eIIx{\eqalign{&d=2+2=4\cr
+&d=2\times 2=4.\cr}}
+%
+(How could Nature fail to avail herself of such a fine opportunity to base
+herself on the remarkable numerical coincidence embodied in eqn.~\eIIx?)
+To specify equation numbers in aligned equations and/or equations
+specified with a's, b's, etc., just tag the equation numbers first
+using the macro \\eqnn or \\eqna and then use \\eqalignno
+\eqna\eIIi %(only for equation labels with a,b type argument)
+\eqnn\eIIii
+%
+$$\eqalignno{\left(\int_{-\infty}^\infty e^{-x^2}\,dx\right)^2
+&={\rm something}&\eIIi a\cr
+&={\rm something\ else}\cr
+&=\pi&\eIIi b\cr
+&=2\pi/2.&\eIIii\cr}$$
+%
+We can then easily refer back to \eIIii\ or \eIIi{a}\ or \eIIi{a,b}\
+or even \eIIi{a\hbox{--}c}\ (\\eqna defines a label which takes an argument
+$\{a,b,\ldots\}$ when used to refer back; it could be used instead of
+\\eqnn if one remembers to type $\{\}$ after the label when referring
+back, e.g., \eIIi{}\ ). (Note also that \\nref and \\eqnn can always be
+used to simulate macro packages that require a separate macro to define
+labels in advance of using them.)
+
+To list the references, use the macro \\listrefs as at the end of
+this file\foot{In draftmode reference labels appear in left margin
+next to reference.}.
+
+\newsec{Conclusion}
+
+\seclab\sconcl % (defines a section label for later use)
+To call Tex on a source file filename.tex, issue the command
+$$\hbox{\$ tex filename}$$
+which creates a file filename.dvi (and also a filename.log file).
+The macro package will ask you whether you want ``big''
+output, ordinary typewritten pages, or ``little,'' reduced two-column pages
+suitable for preprinting.
+(Default is for postscript laserprinters. In order to print out in
+reduced format on qms printer at HEPL, you need to specify \\qms
+after inputting the macros.)
+
+\subsec{At Lyman}
+
+After eliminating any tex errors in your manuscript, issue the command
+%
+$$\hbox{\$ lw filename}$$
+%
+to convert the .dvi file to a postscript file that is then automatically
+sent to the lyman laserwriter.
+(To process only selected portions of a .dvi file,
+type instead \ \$ dvips filename --- then type i for interactive [or
+? for help at any time].
+\$ lw filename.ps with explicit .ps extension then sends the .ps
+file to the Lyman laserwriter.)
+
+\subsec{At HEPL}
+
+\subseclab\shepl % (defines a subsection label for later use)
+(at hepl, use instead
+%
+$$\hbox{\$ qmstex filename}$$
+%
+to convert the .dvi file to a .qms file that is then automatically
+sent to the hepl laserprinter). Before logging off, it is
+probably preferable to get rid of any .ps, .dvi, .qms, and .log files.
+
+
+\bigbreak\bigskip\bigskip\centerline{{\bf Acknowledgements}}\nobreak
+This work was supported in part by various colleagues. We also thank
+NSF contract PHY-82-15249 for discussions.
+
+\appendix{A}{}
+
+Everything same as before, now equations appear as (A.1), etc.
+Appendix A has no title.
+
+\appendix{B}{Enhancements added, 11/88}
+
+For fancier treatment of multiple references, say \refs{\rSP{--}\rCUR},
+\refs{\rIii,\rSP}, or even \refs{\rIi,\rIii,\rAG{--}\rCUR}. (The arguments
+have to be previously defined references, so use \\nref before for any
+first occurrences.) To strip off the brackets from a single reference for
+some reason, use \\xref to give \xref\rIi\ instead of \rIi.
+
+To refer to equations (or references) that occur much later in the
+paper, add \\writedefs after inputting macros.
+This redefines the equation and reference macros so they write all the
+label definitions to a file labeldefs.tmp. Then tex a second time with a
+line inputting this file. To start from the middle of a paper, tex
+the first part with \\writedefs and \\writestop %i.e. \writedefs\writestop
+(the latter adds to labeldefs a line with the pagenumber, section number,
+etc., at the point \\listrefs was called). Inputting labeldefs.tmp then
+starts the continuation where the previous left off, and allows referring
+to any of the previously defined reference and equation labels.
+
+The subsection option in section 3 above is also new.
+
+Another macro, \\footend, redefines \\foot so that it writes the footnotes
+in a file foots.tmp, which is then automatically called in by \\listrefs
+before the references. For journals that prefer the footnotes at the
+end, one can thus add \\footend after inputting harvmac,
+with no other changes necessary.
+
+A new macro \\fig (also \\nfig, \\figs, \\xfig) works for figures just
+as does \\ref. The label is defined to include the abbreviation fig.
+For papers with thousands of figures, the macro
+\fig\flabel{This is the figure caption}. This works exactly as does
+\ref\rlabel{For a compendium of references missing here, see M. Green,
+J. Schwarz, and E. Witten, {\it Superstring theory\/}, Vols. I,II,
+Cambridge Univ. Press (1987).}, with the label defined to include the
+abbreviation `fig.~'. The macro \\nfig suppresses immediate appearance of
+`fig.~x', \nfig\flabi{second dummy figure}\nfig\flabii{third dummy figure}%
+so that one can instead say, for example, \figs{\flabi,\flabii}\
+using the macro \\figs. %(here gives figs.~2,3)
+\\xfig strips off the `fig.~' to leave just the figure number,
+i.e.\ \xfig\flabel, if necessary for some reason.
+The figure captions are written in a file figs.tmp that is called in by
+saying \\listfigs after \\listrefs.
+(Note that the formerly used macro \\figures need not be used if
+\\fig is instead used in conjunction with \\listfigs.)
+
+% Instead of \listfigs, if \fig not used in text, after \listrefs say
+%
+%\figures % former version, still supported
+%\fig{1}{This is the first figure caption.}
+%\fig{2}{This is the second figure caption.}
+%\fig{3}{Note that \\fig automatically types a colon and lines up the
+%text properly.}
+%
+%\parindent=20pt
+
+\appendix{C}{Enhancements added, 6/89}
+
+A macro \\seclab sets a label equal to the current section number, useful
+for referring back to the section, e.g.\ as used in section \sconcl\ above.
+Similarly, \\subseclab sets a label equal to the current
+section.subsection, as in the definition of subsection \shepl\ in the ``at
+HEPL'' subsection above.
+(Using \\writedefs, these definitions will appear in labeldefs.tmp so can
+be used as well to refer forward. In draftmode, the definitions appear in
+the right margin.)
+
+A macro \\writetoc writes a file toc.tmp that contains section and
+subsection numbers and headings with the pagenumbers on which they appear.
+The macro \\listtoc writes the heading {\bf Contents} and inputs the file
+toc.tex. It is evidently necessary to tex in two passes, renaming toc.tmp
+to toc.tex after the first.
+%(Note that the pagenumbers will not come out properly in ``little'' mode
+% --- the easiest (and least elegant) way around this is to set
+% \output={\plainoutput} (after harvmac input) to produce toc.tmp,
+% then remove and tex again with \\listtoc to produce final .dvi file.
+
+\appendix{D}{Enhancements added, 1/91}
+
+A macro \\lref (same syntax as \\ref and \\nref)
+\lref\reflabel{Another reference.}
+defines the reflabel to be a macro that calls \\ref on itself.
+This allows making a list of references via \\lref (in any order) at the
+beginning of a file and only those used in the text will actually appear
+(automatically listed in correct order of first appearance by \\listrefs).
+(In principle \\lref can be used to compile a long standard reference file
+to input, although this might eventually cause problems due to clogging up tex
+memory with too many unused definitions.)
+
+\lref\riii{extra ref three.}
+\lref\rii{extra ref two.}
+\lref\ri{extra ref one.}
+\\refs is defined to not display reference labels that appear in succession
+(i.e.\ without intervening delimiter), so that e.g.\ \refs{\ri\rii{--}\riii}
+can expand the middle reference \rii\ if it hasn't already appeared.
+\\refs will also accept reflabels that are not previously defined so that it is
+possible to tex preliminary versions without inputting full reference list
+(For this mode, even individual refs, e.g.\ \refs{\reflabel}, need to be
+called via \\refs.)
+
+The macro \\sequentialequations inserted at beginning causes
+equations to be numbered sequentially (1)--(n) throughout paper
+(rather than with section numbers (2.1)$\ldots$).
+
+\listrefs
+\listfigs %(if necessary)
+\bye
diff --git a/Master/texmf-dist/doc/plain/jsmisc/deutsch.doc b/Master/texmf-dist/doc/plain/jsmisc/deutsch.doc
new file mode 100644
index 00000000000..8285a980c3c
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/jsmisc/deutsch.doc
@@ -0,0 +1,329 @@
+% $Id: deutsch.doc,v 1.4 1995/07/30 13:23:56 schrod Exp $
+%----------------------------------------------------------------------
+% Written by Joachim Schrod <schrod@iti.informatik.th-darmstadt.de>.
+% This file is distributed without any copyright restriction.
+
+%
+% deutsch.doc -- typeset German documents with plain TeX.
+%
+% [TeX in MAKEPROG]
+% (history at end)
+
+
+\input progdoc
+
+\input names.sty
+\def\babel{{\sf babel}}
+
+
+
+\title{Typesetting German Documents with Plain \TeX{}}
+
+
+
+\chap Introduction.
+
+There are several defencies of plain \TeX{} if used for German
+documents:
+
+\item{---} Mappings of national characters (`umlauts' and `sharp~s')
+to macros or to other character codes (if special fonts are available)
+are missing.
+
+\item{---} \TeX{} produces lots of overfull hboxes for German texts.
+That's because the words there are usually longer than English ones.
+Furthermore we have to use much more hyphenation for German texts than
+for English ones, narrow typesetting is more important than few
+hyphenations. In particular, words with umlauts are not hyphenated
+often anyhow, even with the `multiple-word' approach from |german.sty|.
+
+\item{---} It is typographic usage that between compound words
+ligatures are not built. Plain~\TeX{} has no easy, readable way to
+provide this.
+
+\noindent This file does the according definitions. They are quite
+often only a kludge. But it is hard to make the restrictions
+disappear, sometimes it is even impossible within the current
+implementation of \TeX{}---and there will never be any other
+implementation. So we must live with these kludges.
+
+
+\sect Of course, there is more to German typesetting. Hyphenation,
+also for words with umlauts and sharp~s, etc. This basic
+functionality is supplied by the \babel{} system and DANTE's
+|german.sty|, we have to load the appropriate module.
+
+There's one problem, though. \babel{}~3.5 defines
+|\DeclareTextSymbol|, a symbol used by |german.sty| to decide if it
+shall use NFSS code to access symbols. But that usage will lead to an
+endless recursion, because some text symbols are defined by
+themselves. I don't know if that problem is caused by \babel{}'s code
+or by its usage in |german.sty| -- turning it off seems to be an
+appropriate fix.
+
+\beginprog
+\let\DeclareTextSymbol\undefined
+\input german.sty
+\endprog
+
+
+\sect But before we start we declare some shorthands for category
+codes. By declaring the at sign~(`|@|') as well as the
+underscore~`(|_|)' as letters we can use them in our macros. (I
+agree with D.~Knuth that |\identifier_several_words_long| is more
+readable than |\IdentifierSeveralWordsLong| and in every case better
+than |\p@@@s|.) With the at sign we can use the ``private'' Plain
+macros and with the underscore we can make our own macros more
+readable. But as we have to restore these category codes at the end
+of this macro file we store their former values in control
+sequences. This method is better than to use
+a group because not all macros have to be defined global this way.
+
+\beginprog
+\ifx \CatEscape\undefined
+ \chardef\CatEscape=0
+ \chardef\CatOpen=1
+ \chardef\CatClose=2
+ \chardef\CatIgnore=9
+ \chardef\CatLetter=11
+ \chardef\CatOther=12
+ \chardef\CatActive=13 % \active of plain.tex
+ \chardef\CatInvalid=15
+
+ \chardef\CatAtCode=\catcode`\@
+ \chardef\CatUsCode=\catcode`\_
+\fi
+
+\catcode`\@=\CatLetter % top level macro file
+\catcode`\_=\CatLetter
+\endprog
+
+
+\sect Let's identify this macro file against the user and in the Log file.
+
+\beginprog
+\begingroup
+ \catcode`\$=\CatIgnore
+ \catcode`\:=\CatIgnore
+ \message{Support for German documents, $Revision: 1.4 $}
+\endgroup
+\endprog
+
+
+
+\chap National Characters.
+
+By default no extended characters are available, except those defined
+below. I.e., we start to treat all characters from |"7F| to |"FF| as
+invalid characters.
+
+\beginprog
+\count@="7F
+\loop
+ \catcode \the\count@ = \CatInvalid
+ \advance\count@ by 1
+ \ifnum \count@ < "100
+\repeat
+\endprog
+
+
+\sect We provide a command for the definition of non-ASCII characters:
+|\ExtendChar|. A sample definition of an ``Umlaut-a''~(\"a) in the
+extended code of an IBM~PC (hex code~|"84|) is:
+$$
+ |\ExtendChar\^^84: {^^84}{\"a}|
+$$
+First the hex code is given as a control sequence, followed by a
+colon. Afterwards come two parameters, the first is again the hex
+code, the second is the token list which should be used instead of the
+hex code.
+
+The macro definition is rather easy, we just have to make the
+respective character active and bind it to it's new meaning.
+
+\beginprog
+\def\ExtendChar #1:{%
+ \catcode`#1 \CatActive
+ \extend_char
+ }
+\def\extend_char #1#2{%
+ \def #1{#2}%
+ }
+\endprog
+
+
+\sect Now we can define some replacements.
+
+The braces after the control sequences are needed when characters from
+the extended character set are written to an auxiliary file and read
+in later. During the |\write| they are expanded and following white
+space would be gobbled if the braces would not be there.
+
+\beginprog
+% ISO-Latin-1
+\ExtendChar\^^c4: {^^c4}{\"A}
+\ExtendChar\^^d6: {^^d6}{\"O}
+\ExtendChar\^^dc: {^^dc}{\"U}
+\ExtendChar\^^df: {^^df}{\ss{}}
+\ExtendChar\^^e4: {^^e4}{\"a}
+\ExtendChar\^^f6: {^^f6}{\"o}
+\ExtendChar\^^fc: {^^fc}{\"u}
+
+% IBM PC (code page 850)
+\ExtendChar\^^81: {^^81}{\"u}
+\ExtendChar\^^84: {^^84}{\"a}
+\ExtendChar\^^8e: {^^8e}{\"A}
+\ExtendChar\^^94: {^^94}{\"o}
+\ExtendChar\^^99: {^^99}{\"O}
+\ExtendChar\^^9a: {^^9a}{\"U}
+\ExtendChar\^^e1: {^^e1}{\ss{}} % actually \beta, used as \ss in Germany
+
+% Atari ST (like IBM PC, but with a real `sharp~s')
+\ExtendChar\^^9e: {^^9e}{\ss{}}
+\endprog
+
+
+
+\chap Paragraph Breaking.
+
+As outlined in the introduction, we allow longer interword spaces. A
+line now may have a badness up to 2500, over 1500 a warning is to be
+given. Furthermore the penalties for hyphenation are lowered because a
+narrow typesetting is preferred against few hyphenations.
+
+These values are still experimental and should be tuned.
+
+As |german.sty| uses \babel{} compatible structure, the german
+language hook is a good place to store such definitions. But to
+use \babel{}'s convenient macros, too, we have to assure that it's
+kernel code is loaded first.
+
+\beginprog
+\ifx \babel@core@loaded\undefined
+ \input babel.def
+\fi
+\addto\extrasgerman{%
+ \babel@savevariable\tolerance
+ \babel@savevariable\hbadness
+ \babel@savevariable\doublehyphendemerits
+ \babel@savevariable\finalhyphendemerits
+ \babel@savevariable\adjdemerits
+ \tolerance 2500 \hbadness 1500
+ \doublehyphendemerits 50000
+ \finalhyphendemerits 25000
+ \adjdemerits 50000
+ }
+\endprog
+
+
+\sect In some languages ligatures should not appear between compound
+words. We use {\tt \string\|\/} to mark those places. This is only
+done within text mode, in math mode {\tt \string\|\/} is still
+`$\|$'. But it is sure that one can always hyphenate between compound
+words, so we insert |\-|. To allow the hyphenation in other parts of
+the word though, we use |\allowhyphens| again.
+
+\beginprog
+\def\|{% % break open a ligature (if not in math mode)
+ \relax
+ \ifmmode \Vert
+ \else \allowhyphens\-\allowhyphens
+ \fi
+ }
+\endprog
+
+
+\sect Don't use the dreaded `double quote special meaning' stuff of
+|german.sty|. And use original umlauts. Already in M\"unster I voted
+against it\dots
+
+\beginprog
+\addto\extrasgerman{%
+ \mdqoff
+ \umlautlow
+ }
+\endprog
+
+
+\sect Define |\SwitchtoLanguage| for upward compatibility. It does
+not really do the same, the old definition was more similar to
+|\selectlanguage|. But other languages have to be declared
+explicitely, that's not done by this macro file. So we just want to
+make old documents processable.
+
+\beginprog
+\def\SwitchtoLanguage#1{\language \csname l@#1\endcsname}
+\endprog
+
+
+\sect We are finished; switch to german language (to enable the new
+extras defined above), restore the catcodes and prevent from following
+garbage.
+
+\beginprog
+\selectlanguage{german}
+
+\catcode`\@=\CatAtCode
+\catcode`\_=\CatUsCode
+
+\endinput
+\endprog
+
+
+%% \sect {\it Acknowledgements:}\quad I would like to thank XXX
+
+
+\bye
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% $Log: deutsch.doc,v $
+% Revision 1.4 1995/07/30 13:23:56 schrod
+% Discard babel definition of \DeclareTextCommand before including
+% german.sty, they are incompatible.
+%
+% Revision 1.3 1995/07/29 17:58:24 schrod
+% Use german.sty, not germanb.sty. (babel 3.5 is not functional for
+% plain TeX any more.) But we still want to use babel's macros, we have
+% to load it's kernel for that.
+%
+% Revision 1.2 1995/03/13 23:18:10 schrod
+% Started to manage this package with CVS. Made minor code cleanup.
+%
+% Revision 1.1 1994/10/16 16:57:30 schrod
+% Merged macros from local.tex, codes.tex, and language.tex. This
+% new file is mainly there to provide upward compatibility for our old
+% documents.
+%
+%
+%
+% pre-CVS Version History:
+%
+% DATE WHO REMARKS
+% 91-01-18 js set all extended characters to code invalid
+% 90-12-23 js added the definition of \ExtendChar for usage in codes.tex.
+% 90-10-06 js renamed from dlocal to local, it's now international,
+% adapted to TeX 3:
+% included codes.tex and langdef.tex if they exist,
+% assumed that language.tex is already loaded,
+% defined German parameters as a language hook,
+% removed first \allowhyphens in \uml@ut,
+% documented it with MAKEPROG.
+% 89-10-27 js was reworked for ILaTeX
+% 89-05-31 js defined \| as a separator for ligatures in text mode
+% 87-10-01 js introduced \protect,
+% set parameters for German page makeup
+% 87-??-?? kg first release
+%
+% kg: Klaus Guntermann <gunterma@<schrod@iti.informatik.th-darmstadt.de>
+% js: Joachim Schrod <schrod@iti.informatik.th-darmstadt.de>
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Local Variables:
+mode: plain-TeX
+TeX-master: t
+TeX-brace-indent-level: 4
+End:
diff --git a/Master/texmf-dist/doc/plain/jsmisc/deutsch.tex b/Master/texmf-dist/doc/plain/jsmisc/deutsch.tex
new file mode 100644
index 00000000000..26f3e3719d6
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/jsmisc/deutsch.tex
@@ -0,0 +1,350 @@
+% $Id: deutsch.doc,v 1.4 1995/07/30 13:23:56 schrod Exp $
+%----------------------------------------------------------------------
+% Written by Joachim Schrod <schrod@iti.informatik.th-darmstadt.de>.
+% This file is distributed without any copyright restriction.
+
+%
+% deutsch.doc -- typeset German documents with plain TeX.
+%
+% [TeX in MAKEPROG]
+% (history at end)
+
+
+%%%%
+%%%%
+%%%% These TeX macros were documented with the documentation system
+%%%% MAKEPROG and automatically converted to the current form.
+%%%% If you have MAKEPROG available you may transform it back to
+%%%% the original input: Remove every occurence of three percents
+%%%% and one optional blank from the beginning of a line and remove
+%%%% every line which starts with four percents. The following lex
+%%%% program will do this:
+%%%%
+%%%% %%
+%%%%
+%%%% ^%%%\ ? ;
+%%%% ^%%%%.*\n ;
+%%%%
+%%%% If you just want to print the documentation you may fetch
+%%%% the archive print-makeprog.tar.Z from ftp.th-darmstadt.de (directory
+%%%% pub/tex/latex). It contains *all* used styles -- but beware, they
+%%%% may not be in a documented form...
+%%%%
+%%%%
+%%% \input progdoc
+
+%%% \input names.sty
+%%% \def\babel{{\sf babel}}
+
+
+
+%%% \title{Typesetting German Documents with Plain \TeX{}}
+
+
+
+%%% \chap Introduction.
+
+%%% There are several defencies of plain \TeX{} if used for German
+%%% documents:
+
+%%% \item{---} Mappings of national characters (`umlauts' and `sharp~s')
+%%% to macros or to other character codes (if special fonts are available)
+%%% are missing.
+
+%%% \item{---} \TeX{} produces lots of overfull hboxes for German texts.
+%%% That's because the words there are usually longer than English ones.
+%%% Furthermore we have to use much more hyphenation for German texts than
+%%% for English ones, narrow typesetting is more important than few
+%%% hyphenations. In particular, words with umlauts are not hyphenated
+%%% often anyhow, even with the `multiple-word' approach from |german.sty|.
+
+%%% \item{---} It is typographic usage that between compound words
+%%% ligatures are not built. Plain~\TeX{} has no easy, readable way to
+%%% provide this.
+
+%%% \noindent This file does the according definitions. They are quite
+%%% often only a kludge. But it is hard to make the restrictions
+%%% disappear, sometimes it is even impossible within the current
+%%% implementation of \TeX{}---and there will never be any other
+%%% implementation. So we must live with these kludges.
+
+
+%%% \sect Of course, there is more to German typesetting. Hyphenation,
+%%% also for words with umlauts and sharp~s, etc. This basic
+%%% functionality is supplied by the \babel{} system and DANTE's
+%%% |german.sty|, we have to load the appropriate module.
+
+%%% There's one problem, though. \babel{}~3.5 defines
+%%% |\DeclareTextSymbol|, a symbol used by |german.sty| to decide if it
+%%% shall use NFSS code to access symbols. But that usage will lead to an
+%%% endless recursion, because some text symbols are defined by
+%%% themselves. I don't know if that problem is caused by \babel{}'s code
+%%% or by its usage in |german.sty| -- turning it off seems to be an
+%%% appropriate fix.
+
+%%% \beginprog
+\let\DeclareTextSymbol\undefined
+\input german.sty
+%%% \endprog
+
+
+%%% \sect But before we start we declare some shorthands for category
+%%% codes. By declaring the at sign~(`|@|') as well as the
+%%% underscore~`(|_|)' as letters we can use them in our macros. (I
+%%% agree with D.~Knuth that |\identifier_several_words_long| is more
+%%% readable than |\IdentifierSeveralWordsLong| and in every case better
+%%% than |\p@@@s|.) With the at sign we can use the ``private'' Plain
+%%% macros and with the underscore we can make our own macros more
+%%% readable. But as we have to restore these category codes at the end
+%%% of this macro file we store their former values in control
+%%% sequences. This method is better than to use
+%%% a group because not all macros have to be defined global this way.
+
+%%% \beginprog
+\ifx \CatEscape\undefined
+ \chardef\CatEscape=0
+ \chardef\CatOpen=1
+ \chardef\CatClose=2
+ \chardef\CatIgnore=9
+ \chardef\CatLetter=11
+ \chardef\CatOther=12
+ \chardef\CatActive=13 % \active of plain.tex
+ \chardef\CatInvalid=15
+
+ \chardef\CatAtCode=\catcode`\@
+ \chardef\CatUsCode=\catcode`\_
+\fi
+
+\catcode`\@=\CatLetter % top level macro file
+\catcode`\_=\CatLetter
+%%% \endprog
+
+
+%%% \sect Let's identify this macro file against the user and in the Log file.
+
+%%% \beginprog
+\begingroup
+ \catcode`\$=\CatIgnore
+ \catcode`\:=\CatIgnore
+ \message{Support for German documents, $Revision: 1.4 $}
+\endgroup
+%%% \endprog
+
+
+
+%%% \chap National Characters.
+
+%%% By default no extended characters are available, except those defined
+%%% below. I.e., we start to treat all characters from |"7F| to |"FF| as
+%%% invalid characters.
+
+%%% \beginprog
+\count@="7F
+\loop
+ \catcode \the\count@ = \CatInvalid
+ \advance\count@ by 1
+ \ifnum \count@ < "100
+\repeat
+%%% \endprog
+
+
+%%% \sect We provide a command for the definition of non-ASCII characters:
+%%% |\ExtendChar|. A sample definition of an ``Umlaut-a''~(\"a) in the
+%%% extended code of an IBM~PC (hex code~|"84|) is:
+%%% $$
+%%% |\ExtendChar\^^84: {^^84}{\"a}|
+%%% $$
+%%% First the hex code is given as a control sequence, followed by a
+%%% colon. Afterwards come two parameters, the first is again the hex
+%%% code, the second is the token list which should be used instead of the
+%%% hex code.
+
+%%% The macro definition is rather easy, we just have to make the
+%%% respective character active and bind it to it's new meaning.
+
+%%% \beginprog
+\def\ExtendChar #1:{%
+ \catcode`#1 \CatActive
+ \extend_char
+ }
+\def\extend_char #1#2{%
+ \def #1{#2}%
+ }
+%%% \endprog
+
+
+%%% \sect Now we can define some replacements.
+
+%%% The braces after the control sequences are needed when characters from
+%%% the extended character set are written to an auxiliary file and read
+%%% in later. During the |\write| they are expanded and following white
+%%% space would be gobbled if the braces would not be there.
+
+%%% \beginprog
+% ISO-Latin-1
+\ExtendChar\^^c4: {^^c4}{\"A}
+\ExtendChar\^^d6: {^^d6}{\"O}
+\ExtendChar\^^dc: {^^dc}{\"U}
+\ExtendChar\^^df: {^^df}{\ss{}}
+\ExtendChar\^^e4: {^^e4}{\"a}
+\ExtendChar\^^f6: {^^f6}{\"o}
+\ExtendChar\^^fc: {^^fc}{\"u}
+
+% IBM PC (code page 850)
+\ExtendChar\^^81: {^^81}{\"u}
+\ExtendChar\^^84: {^^84}{\"a}
+\ExtendChar\^^8e: {^^8e}{\"A}
+\ExtendChar\^^94: {^^94}{\"o}
+\ExtendChar\^^99: {^^99}{\"O}
+\ExtendChar\^^9a: {^^9a}{\"U}
+\ExtendChar\^^e1: {^^e1}{\ss{}} % actually \beta, used as \ss in Germany
+
+% Atari ST (like IBM PC, but with a real `sharp~s')
+\ExtendChar\^^9e: {^^9e}{\ss{}}
+%%% \endprog
+
+
+
+%%% \chap Paragraph Breaking.
+
+%%% As outlined in the introduction, we allow longer interword spaces. A
+%%% line now may have a badness up to 2500, over 1500 a warning is to be
+%%% given. Furthermore the penalties for hyphenation are lowered because a
+%%% narrow typesetting is preferred against few hyphenations.
+
+%%% These values are still experimental and should be tuned.
+
+%%% As |german.sty| uses \babel{} compatible structure, the german
+%%% language hook is a good place to store such definitions. But to
+%%% use \babel{}'s convenient macros, too, we have to assure that it's
+%%% kernel code is loaded first.
+
+%%% \beginprog
+\ifx \babel@core@loaded\undefined
+ \input babel.def
+\fi
+\addto\extrasgerman{%
+ \babel@savevariable\tolerance
+ \babel@savevariable\hbadness
+ \babel@savevariable\doublehyphendemerits
+ \babel@savevariable\finalhyphendemerits
+ \babel@savevariable\adjdemerits
+ \tolerance 2500 \hbadness 1500
+ \doublehyphendemerits 50000
+ \finalhyphendemerits 25000
+ \adjdemerits 50000
+ }
+%%% \endprog
+
+
+%%% \sect In some languages ligatures should not appear between compound
+%%% words. We use {\tt \string\|\/} to mark those places. This is only
+%%% done within text mode, in math mode {\tt \string\|\/} is still
+%%% `$\|$'. But it is sure that one can always hyphenate between compound
+%%% words, so we insert |\-|. To allow the hyphenation in other parts of
+%%% the word though, we use |\allowhyphens| again.
+
+%%% \beginprog
+\def\|{% % break open a ligature (if not in math mode)
+ \relax
+ \ifmmode \Vert
+ \else \allowhyphens\-\allowhyphens
+ \fi
+ }
+%%% \endprog
+
+
+%%% \sect Don't use the dreaded `double quote special meaning' stuff of
+%%% |german.sty|. And use original umlauts. Already in M\"unster I voted
+%%% against it\dots
+
+%%% \beginprog
+\addto\extrasgerman{%
+ \mdqoff
+ \umlautlow
+ }
+%%% \endprog
+
+
+%%% \sect Define |\SwitchtoLanguage| for upward compatibility. It does
+%%% not really do the same, the old definition was more similar to
+%%% |\selectlanguage|. But other languages have to be declared
+%%% explicitely, that's not done by this macro file. So we just want to
+%%% make old documents processable.
+
+%%% \beginprog
+\def\SwitchtoLanguage#1{\language \csname l@#1\endcsname}
+%%% \endprog
+
+
+%%% \sect We are finished; switch to german language (to enable the new
+%%% extras defined above), restore the catcodes and prevent from following
+%%% garbage.
+
+%%% \beginprog
+\selectlanguage{german}
+
+\catcode`\@=\CatAtCode
+\catcode`\_=\CatUsCode
+
+\endinput
+%%% \endprog
+
+
+%%% %% \sect {\it Acknowledgements:}\quad I would like to thank XXX
+
+
+%%% \bye
+
+%%%
+%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% %
+%%% % $Log: deutsch.doc,v $
+%%% % Revision 1.4 1995/07/30 13:23:56 schrod
+%%% % Discard babel definition of \DeclareTextCommand before including
+%%% % german.sty, they are incompatible.
+%%% %
+%%% % Revision 1.3 1995/07/29 17:58:24 schrod
+%%% % Use german.sty, not germanb.sty. (babel 3.5 is not functional for
+%%% % plain TeX any more.) But we still want to use babel's macros, we have
+%%% % to load it's kernel for that.
+%%% %
+%%% % Revision 1.2 1995/03/13 23:18:10 schrod
+%%% % Started to manage this package with CVS. Made minor code cleanup.
+%%% %
+%%% % Revision 1.1 1994/10/16 16:57:30 schrod
+%%% % Merged macros from local.tex, codes.tex, and language.tex. This
+%%% % new file is mainly there to provide upward compatibility for our old
+%%% % documents.
+%%% %
+%%% %
+%%% %
+%%% % pre-CVS Version History:
+%%% %
+%%% % DATE WHO REMARKS
+%%% % 91-01-18 js set all extended characters to code invalid
+%%% % 90-12-23 js added the definition of \ExtendChar for usage in codes.tex.
+%%% % 90-10-06 js renamed from dlocal to local, it's now international,
+%%% % adapted to TeX 3:
+%%% % included codes.tex and langdef.tex if they exist,
+%%% % assumed that language.tex is already loaded,
+%%% % defined German parameters as a language hook,
+%%% % removed first \allowhyphens in \uml@ut,
+%%% % documented it with MAKEPROG.
+%%% % 89-10-27 js was reworked for ILaTeX
+%%% % 89-05-31 js defined \| as a separator for ligatures in text mode
+%%% % 87-10-01 js introduced \protect,
+%%% % set parameters for German page makeup
+%%% % 87-??-?? kg first release
+%%% %
+%%% % kg: Klaus Guntermann <gunterma@<schrod@iti.informatik.th-darmstadt.de>
+%%% % js: Joachim Schrod <schrod@iti.informatik.th-darmstadt.de>
+
+
+%%%
+%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Local Variables:
+%%% mode: plain-TeX
+%%% TeX-master: t
+%%% TeX-brace-indent-level: 4
+%%% End:
diff --git a/Master/texmf-dist/doc/plain/jsmisc/idverb.doc b/Master/texmf-dist/doc/plain/jsmisc/idverb.doc
new file mode 100644
index 00000000000..79fb0b183dd
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/jsmisc/idverb.doc
@@ -0,0 +1,194 @@
+% $Id: idverb.doc,v 1.1 1995/03/13 23:18:11 schrod Exp $
+%----------------------------------------------------------------------
+% Written by Joachim Schrod <schrod@iti.informatik.th-darmstadt.de>.
+% Copyright conditions see below.
+
+%
+% idverb.doc --- typeset identifiers verbatim
+%
+% [plain TeX in MAKEPROG]
+% (history at end)
+
+
+\input progdoc
+
+\input names.sty
+\def\v{{\tt \vbar\/}}
+
+
+
+\title{Identifiers Verbatim \`a la {\ttitlefont WEB}}
+
+
+
+\chap Introduction.
+
+This macro files allows to write identifiers in a \WEB{} like style,
+i.e.\ as {\tt \origvert identifier\origvert\/}. The identifiers are
+typeset verbatim in the monospace type face. The macros
+|\makevertother| and |\makevertactive| are available to activate and
+deactivate the special behaviour of the vertical bar.
+
+
+\sect This macro file uses the namespace |idv|.
+
+\beginprog
+\ifx \IdvLoaded\undefined
+ \def\IdvLoaded{$Revision: 1.1 $}
+\else \endinput \fi % <-- one line!
+\endprog
+
+
+\sect These macros are supported. Send bug reports, comments and
+repairs.
+
+The reference version may be retrieved via anonymous ftp from
+|ftp.th-darmstadt.de| [130.83.47.112], directory |pub/tex/plain|. It's
+placed there as a gzipped tar file. (The information on the
+IP~number is dated March 13, 1995. It might have changed, also this is very
+unlikely. Use your friendly nameserver.)
+
+
+\sect This is freely distributable software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version~2 of the
+License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful, but
+{\bf without any warranty\/}; without even the implied warranty of
+{\bf merchantability\/} or {\bf fitness for a particular purpose}. See
+the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License in
+the file |License| along with this package; if not, write to the Free
+Software Foundation, Inc., 675~Mass Ave, Cambridge, MA~02139,~USA.
+
+
+\sect But before we start we declare some shorthands for category
+codes. By declaring the at sign~(`|@|') as well as the
+underscore~`(|_|)' as letters we can use them in our macros. (I agree
+with D.~Knuth that |\identifier_several_words_long| is more readable
+than |\IdentifierSeveralWordsLong| and in every case better than
+|\p@@@s|.) With the at sign we can use the ``private'' Plain macros
+and with the underscore we can make our own macros more readable. But
+as we have to restore these category codes at the end of this macro
+file we store their former values in control sequences. This method is
+better than to use a group because not all macros have to be defined
+global this way.
+
+Only the first macro file read in defines the |Cat| cseqs.
+
+\beginprog
+\ifx \CatEscape\undefined
+ \chardef\CatEscape=0
+ \chardef\CatOpen=1
+ \chardef\CatClose=2
+ \chardef\CatIgnore=9
+ \chardef\CatLetter=11
+ \chardef\CatOther=12
+ \chardef\CatActive=13 % \active of plain.tex
+ \chardef\CatInvalid=15
+
+ \chardef\CatAtCode=\catcode`\@
+ \chardef\CatUsCode=\catcode`\_
+\fi
+
+\catcode`\@=\CatLetter % top level macro file
+\catcode`\_=\CatLetter
+\endprog
+
+
+\sect Let's identify this macro file against the user and in the Log file.
+
+\beginprog
+\begingroup
+ \catcode`\$=\CatIgnore
+ \catcode`\:=\CatIgnore
+ \message{Verbatim identifiers, $Revision: 1.1 $}
+\endgroup
+\endprog
+
+
+\sect The usual verbatim macros use |\dospecials| to change the
+catcode of all special characters. We have to add `\v' to this list.
+The old meaning is stored in |\idv_OrigDospecials|.
+
+\beginprog
+\let\idv_OrigDospecials=\dospecials
+\begingroup
+ \def\do#1{\noexpand\do\noexpand#1}
+ \xdef\dospecials{\idv_OrigDospecials\do\|}
+\endgroup
+\let\idv_dospecials=\dospecials
+
+\def\makevertactive{\catcode`\|\CatActive \let\dospecials\idv_dospecials}
+\def\makevertother{\catcode`\|\CatOther \let\dospecials\idv_OrigDospecials}
+
+\makevertactive
+\endprog
+
+
+\sect Now we can define `\v'. This definition is a little bit tricky,
+as it redefines itself to |\egroup| to close the hbox. But if the hbox
+is ended, `\v' is restored to its original meaning. |\origvert| is
+given the original meaning of `\v'. |\vbar| is the character from the
+current font that has the ASCII code of a vertical bar, sometimes this
+{\it is\/} a vertical bar.
+
+\beginprog
+\let\origvert=|
+\chardef\vbar=`\|
+
+\def\idv_setup_verbatim{%
+ \def\do##1{\catcode`##1\CatOther}\idv_OrigDospecials
+ \parskip\z@skip \parindent\z@
+ \obeylines \obeyspaces \frenchspacing
+ \tt
+ }
+
+\def|{%
+ \leavevmode
+ \hbox\bgroup
+ \let\par\space \idv_setup_verbatim
+ \let|\egroup
+ }
+\endprog
+
+
+\sect We are finished;
+restore the catcodes and prevent from following garbage.
+
+\beginprog
+\catcode`\@=\CatAtCode
+\catcode`\_=\CatUsCode
+
+\endinput
+\endprog
+
+
+%% \sect {\it Acknowledgements:}\quad I would like to thank XXX
+
+
+\bye
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% $Log: idverb.doc,v $
+% Revision 1.1 1995/03/13 23:18:11 schrod
+% Started to manage this package with CVS. Made minor code cleanup.
+%
+
+%
+% Pre-CVS Log:
+%
+% 27 Jul 89 js Initial revision.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Local Variables:
+mode: plain-TeX
+TeX-master: t
+TeX-brace-indent-level: 4
+End:
diff --git a/Master/texmf-dist/doc/plain/metatex/README b/Master/texmf-dist/doc/plain/metatex/README
new file mode 100644
index 00000000000..1e384d8e7ef
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/README
@@ -0,0 +1,92 @@
+
+\title METATeX
+
+\section What is METATeX?
+
+METATeX is a set of plain TeX and METAFONT macros that you can use to
+define both the text and the figures in a single source file. Because
+METATeX sets up two way communication, from TeX to METAFONT and back
+from METAFONT to TeX, drawing dimensions can be controlled by TeX and
+labels can be located by METAFONT. Only standard features of TeX and
+METAFONT are used, but two runs of TeX and one of METAFONT are needed.
+
+
+\section How to use METATeX?
+
+Please read the TUGboat paper on METATeX to get an explanation. The
+paper is provided here in pdf format (mtpaper.pdf). To recreate yourself
+the paper, you will need the plain TUGboat style files (tugboat.cmn and
+tugboat.sty), in addition to the sources located in the mtpaper subdir
+(mtpaper.tex, delay.mf, diagram.tex, frame.tex and shadow.tex),.
+
+The original TUGboat paper on METATeX is:
+
+"METATeX" by Ram\'on Casares.
+ TUGboat (ISSN 0896-3207)
+ Volume 23, Number 3/4, pp. 313-318, 2002.
+
+It is also available on-line:
+ http://www.tug.org/TUGboat/Articles/tb23-3-4/tb75casa.pdf
+
+
+\section Where to find METATeX?
+
+The home of METATeX is CTAN:
+
+ http://www.ctan.org/tex-archive/macros/plain/contrib/metatex/
+
+
+\section Bugs and comments
+
+Please address your comments and bug reports to (change # by @):
+
+ r.casares#computer.org
+
+I do not promise anything.
+
+
+\section Files
+
+METATeX comprises the following files:
+
+ metatex.tex
+ mtmp2pdf.tex
+ mtpaper.pdf
+ mtpaper/mtpaper.tex
+ mtpaper/delay.mf
+ mtpaper/diagram.tex
+ mtpaper/frame.tex
+ mtpaper/shadow.tex
+ README
+ gpl.txt
+
+
+\section License
+
+ METATeX.TeX communicates TeX and METAFONT
+ Copyright (C) 2003, 2004 Ram\'on Casares
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the
+ Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA
+
+
+\section Versions
+
+ 1.1 Date 2004.08.12. File mptopdf.tex renamed to mtmp2pdf.tex.
+ 1.0 Date 2003.10.15. The first public version.
+
+
+\bye
diff --git a/Master/texmf-dist/doc/plain/metatex/gpl.txt b/Master/texmf-dist/doc/plain/metatex/gpl.txt
new file mode 100644
index 00000000000..98acb4ffd90
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/gpl.txt
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/Master/texmf-dist/doc/plain/metatex/mtmp2pdf.tex b/Master/texmf-dist/doc/plain/metatex/mtmp2pdf.tex
new file mode 100644
index 00000000000..6cc2b4841b4
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/mtmp2pdf.tex
@@ -0,0 +1,369 @@
+% MTMP2PDF.TeX (RMCG19970919)
+
+% MTMP2PDF.TeX converts from PostScript code (by METAPost) to PDF
+% Adapted by Ram\'on Casares from ConTeXt by PRAGMA
+% ConTeXt copyright={PRAGMA / Hans Hagen & Ton Otten}
+% Under the same terms as ConTeXt
+% http://www.pragma-ade.com/general/manuals/mreadme.pdf
+
+% \catcode`\@ should be 11
+
+\newcount\MPcounter
+\newdimen\MPdimen
+
+% POSTSCRIPT operators that METAPOST uses
+
+\def \PScurveto {curveto}
+\def \PSlineto {lineto}
+\def \PSmoveto {moveto}
+\def \PSshowpage {showpage}
+\def \PSnewpath {newpath}
+\def \PSfshow {fshow}
+\def \PSclosepath {closepath}
+\def \PSfill {fill}
+\def \PSstroke {stroke}
+\def \PSclip {clip}
+\def \PSrlineto {rlineto}
+\def \PSsetlinejoin {setlinejoin}
+\def \PSsetlinecap {setlinecap}
+\def \PSsetmiterlimit {setmiterlimit}
+\def \PSsetgray {setgray}
+\def \PSsetrgbcolor {setrgbcolor}
+\def \PSsetdash {setdash}
+\def \PSgsave {gsave}
+\def \PSgrestore {grestore}
+\def \PStranslate {translate}
+\def \PSscale {scale}
+\def \PSconcat {concat}
+\def \PSdtransform {dtransform}
+
+\def \PSBoundingBox {BoundingBox:}
+\def \PSHiResBoundingBox {HiResBoundingBox:}
+\def \PSExactBoundingBox {ExactBoundingBox:}
+\def \PSPage {Page:}
+
+% A stack
+
+\newcount\nofMPsegments
+\newcount\nofMParguments
+
+\def\@@MP{@@MP}
+
+\def\setMPargument#1{\advance\nofMParguments by 1
+ \expandafter\def
+ \csname\@@MP\the\nofMPsegments\the\nofMParguments\endcsname%
+ {\do#1}}
+
+\def\gMPa#1{\csname\@@MP0#1\endcsname}
+\def\gMPs#1{\csname\@@MP\the\nofMPsegments#1\endcsname}
+
+\def\setMPkeyword#1
+ {\expandafter\def\csname\@@MP\the\nofMPsegments0\endcsname{#1}%
+ \advance\nofMPsegments by 1 \nofMParguments=0\relax}
+
+\def\getMPkeyword#1{\csname\@@MP#10\endcsname}
+
+\def\resetMPstack{\catcode`\%=13 % active
+ \let\handleMPgraphic=\handleMPendgraphic
+ \def\resetMPstack{\nofMParguments=0\relax}%
+ \resetMPstack}
+
+% Ignore, most of times, ( and ), but with care
+% Take care, also of TeX specials
+
+\def\octalMPcharacter#1#2#3{\char'#1#2#3\relax}
+
+\bgroup
+\catcode`\|=14 \catcode`\%=13 \catcode`\[=13 \catcode`\]=13
+\catcode`\{=13 \catcode`\}=13 \catcode`B=1 \catcode`E=2
+\gdef\ignoreMPspecialsB\def%BE\def[BE\def]BE\def{BE\def}BEE
+\gdef\obeyMPspecialsB\def%B\char 37\relax E|
+ \def[B\char 91\relax E\def]B\char 93\relax E|
+ \def{B\char123\relax E\def}B\char125\relax EE
+\gdef\setMPspecialsB\catcode`\%=13
+ \catcode`\[=13 \catcode`\]=13 \catcode`\{=13 \catcode`\}=13
+ \catcode`\$=11 \catcode`\_=11 \catcode`\#=11 \catcode`\^=11
+ \catcode`\&=11 \catcode`\|=11 \catcode`\~=11
+ \def\(B\char40\relax E\def\)B\char41\relax E\def\\B\char92\relax E|
+ \def\0B\octalMPcharacter0E\def\1B\octalMPcharacter1E|
+ \def\2B\octalMPcharacter2E\def\3B\octalMPcharacter3E|
+ \def\4B\octalMPcharacter4E\def\5B\octalMPcharacter5E|
+ \def\6B\octalMPcharacter6E\def\7B\octalMPcharacter7E|
+ \def\8B\octalMPcharacter8E\def\9B\octalMPcharacter9EE
+\egroup
+
+% We use the comment symbol as a sort of trigger:
+
+\bgroup \catcode`\%=13
+\gdef\startMPscanning{\let%=\startMPconversion}
+\egroup
+
+\def\startMPconversion{\catcode`\%=9 \ignoreMPspecials \handleMPsequence}
+
+% The main loop.
+% Most arguments are numbers that can be recognized by their \lccode.
+
+\def\dohandleMPsequence#1#2 {\ifnum\lccode`#1=0 \setMPargument{#1#2}%
+ \else \edef\somestring{#1#2}\ifx\somestring\PSmoveto
+ \edef\lastMPmoveX{\gMPa1}\edef\lastMPmoveY{\gMPa2}%
+ \pdfliteral{\gMPa1 \gMPa2 m}\resetMPstack
+ \else\ifx\somestring\PSnewpath \let\handleMPsequence=\handleMPpath
+ \else\ifx\somestring\PSgsave \pdfliteral{q}\resetMPstack
+ \else\ifx\somestring\PSgrestore \pdfliteral{Q}\resetMPstack
+ \else\ifx\somestring\PSdtransform % == setlinewidth
+ \let\handleMPsequence=\handleMPdtransform
+ \else\ifx\somestring\PSconcat
+ \pdfliteral{\gMPa1 \gMPa2 \gMPa3 \gMPa4 \gMPa5 \gMPa6 cm}\resetMPstack
+ \else\ifx\somestring\PSsetrgbcolor
+ \pdfliteral{\gMPa1 \gMPa2 \gMPa3 rg \gMPa1 \gMPa2 \gMPa3 RG}%
+ \resetMPstack
+ \else\ifx\somestring\PSsetgray \pdfliteral{\gMPa1 g \gMPa1 G}\resetMPstack
+ \else\ifx\somestring\PStranslate
+ \pdfliteral{1 0 0 1 \gMPa1 \gMPa2 cm}\resetMPstack
+ \else\ifx\somestring\PSsetdash \handleMPsetdash \resetMPstack
+ \else\ifx\somestring\PSsetlinejoin \pdfliteral{\gMPa1 j}\resetMPstack
+ \else\ifx\somestring\PSsetmiterlimit \pdfliteral{\gMPa1 M}\resetMPstack
+ \else\ifx\somestring\PSfshow \handleMPfshow \resetMPstack
+ \else\ifx\somestring\PSsetlinecap \pdfliteral{\gMPa1 J}\resetMPstack
+ \else\ifx\somestring\PSrlineto
+ \pdfliteral{\lastMPmoveX\space \lastMPmoveY\space l S}\resetMPstack
+ \else\ifx\somestring\PSscale
+ \pdfliteral{\gMPa1 0 0 \gMPa2 0 0 cm}\resetMPstack
+ \else \handleMPgraphic{#1#2}%
+ \fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi \fi
+ \handleMPsequence}
+
+% Graphics
+
+\def\handleMPendgraphic#1{\ifx\somestring\PSshowpage
+ \let\handleMPsequence=\finishMPgraphic \else
+ \setMPargument{#1}\fi}
+
+\def\handleMPbegingraphic#1{\ifx\somestring\PSBoundingBox
+ \let\handleMPsequence=\handleMPboundingbox
+ \else\ifx\somestring\PSHiResBoundingBox
+ \let\handleMPsequence=\handleMPboundingbox
+ \else\ifx\somestring\PSExactBoundingBox
+ \let\handleMPsequence=\handleMPboundingbox
+ \else\ifx\somestring\PSPage
+ \let\handleMPsequence=\handleMPpage
+ \else \setMPargument{#1}\fi\fi\fi\fi}
+
+\let\handleMPgraphic=\handleMPbegingraphic
+
+% There are three kind of bounding boxes:
+% BoundingBox: llx lly ucx ucy
+% HiResBoundingBox: llx lly ucx ucy
+% ExactBoundingBox: llx lly ucx ucy
+% The dimensions are saved for later use.
+
+\def\handleMPboundingbox #1 #2 #3 #4 {\nofMParguments=0
+ \let\handleMPsequence=\dohandleMPsequence \handleMPsequence}
+
+% The page comment is a signal that stackbuilding can be started
+
+\def\handleMPpage #1 #2 {\nofMParguments=0
+ \let\handleMPsequence=\dohandleMPsequence \handleMPsequence}
+
+% METAPOST: 0 0 rlineto
+
+\def\lastMPmoveX{0}\def\lastMPmoveY{0}
+
+% Text
+
+{\catcode`\.=12 \catcode`\p=12 \catcode`\t=12
+ \gdef\WITHOUTPT#1pt{#1}}
+\def\withoutpt#1{\expandafter\WITHOUTPT#1}
+\def\ScaledPointsToBigPoints#1#2{\MPdimen=#1sp\relax
+ \MPdimen=.996264\MPdimen \edef#2{\withoutpt{\the\MPdimen}}}
+
+\def\handleMPfshow{\setbox0=\hbox{\obeyMPspecials
+ \edef\size{\gMPa{\the\nofMParguments} }%
+ \advance\nofMParguments by -1
+ \font\temp=\gMPa{\the\nofMParguments} at \size bp
+ \advance\nofMParguments by -1 \temp
+ \ifnum\nofMParguments=1 \def\do(##1){##1}\gMPa1%
+ \else \MPcounter=1
+ \def\do(##1{##1}\gMPa{\the\MPcounter}\space\def\do{}%
+ \loop \advance\MPcounter by 1
+ \ifnum\MPcounter<\nofMParguments \gMPa{\the\MPcounter}\space\repeat
+ \def\do##1){##1}\gMPa{\the\MPcounter}%
+ \fi
+ \unskip}%
+ \dimen0=\lastMPmoveY bp \advance\dimen0 by \ht0
+ \ScaledPointsToBigPoints{\number\dimen0}\lastMPmoveY
+ \pdfliteral{n q 1 0 0 1 \lastMPmoveX\space\lastMPmoveY\space cm}%
+ \dimen0=\ht0 \advance\dimen0 by \dp0 \box0 \vskip-\dimen0
+ \pdfliteral{Q}}
+
+
+% Take care of dashes
+
+\def\handleMPsetdash{\bgroup \def\somestring{[}\MPcounter=1
+ \loop \ifnum\MPcounter<\nofMParguments
+ \edef\somestring{\somestring\space\gMPa{\the\MPcounter}}%
+ \advance\MPcounter by 1 \repeat
+ \edef\somestring{\somestring]\gMPa{\the\MPcounter} d}%
+ \pdfliteral{\somestring}\egroup}
+
+% setlinewidth
+
+\def\handleMPdtransform{\ifdim\gMPa1pt>0pt
+ \pdfliteral{\gMPa1 w}%
+ \def\next##1 ##2 ##3 ##4 ##5 ##6 {\handleMPsequence}\else
+ \pdfliteral{\gMPa2 w}%
+ \def\next##1 ##2 ##3 ##4 {\handleMPsequence}\fi
+ \let\handleMPsequence=\dohandleMPsequence \resetMPstack
+ \next}
+
+% Paths, concat
+
+\def\handleMPpath{\chardef\finiMPpath=0
+ \let\closeMPpath=\relax \let\flushMPpath=\flushnormalMPpath
+ \resetMPstack \nofMPsegments=1
+ \let\handleMPsequence=\dohandleMPpath \dohandleMPpath}
+
+\def\flushnormalMPpath{\MPcounter=\nofMPsegments \nofMPsegments=1
+ \loop \expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax
+ \pdfliteral{\gMPs1 \gMPs2 l}\or
+ \pdfliteral{\gMPs1 \gMPs2 \gMPs3 \gMPs4 \gMPs5 \gMPs6 c}\or
+ \pdfliteral{\lastMPmoveX\space \lastMPmoveY\space l S}\or
+ \edef\lastMPmoveX{\gMPs1}\edef\lastMPmoveY{\gMPs2}%
+ \pdfliteral{\lastMPmoveX\space \lastMPmoveY\space m}\fi
+ \advance\nofMPsegments by 1\relax
+ \ifnum\nofMPsegments<\MPcounter \repeat}
+
+\def\flushconcatMPpath{\MPcounter=\nofMPsegments \nofMPsegments=1
+ \loop \expandafter\ifcase\getMPkeyword{\the\nofMPsegments}\relax
+ \doMPconcat{\gMPs1}\a{\gMPs2}\b \pdfliteral{\a\space \b\space l}%
+ \or
+ \doMPconcat{\gMPs1}\a{\gMPs2}\b
+ \doMPconcat{\gMPs3}\c{\gMPs4}\d
+ \doMPconcat{\gMPs5}\e{\gMPs6}\f
+ \pdfliteral{\a\space \b\space \c\space \d\space \e\space \f\space c}%
+ \or
+ \bgroup \noMPtranslate \doMPconcat\lastMPmoveX\a\lastMPmoveY\b
+ \pdfliteral{\a\space \b\space l S}\egroup
+ \or
+ \edef\lastMPmoveX{\gMPs1}\edef\lastMPmoveY{\gMPs2}%
+ \doMPconcat\lastMPmoveX\a\lastMPmoveY\b
+ \pdfliteral{\a\space \b\space m}%
+ \fi
+ \advance\nofMPsegments by 1\relax
+ \ifnum\nofMPsegments<\MPcounter \repeat}
+
+% The transformation of the coordinates
+
+\def\MPconcatfactor{256}
+
+\def\doMPreducedimen#1 {\count0=\MPconcatfactor
+ \advance\dimen#1 \ifdim\dimen#1>0pt .5\else -.5\fi\count0
+ \divide\dimen#1 \count0\relax}
+
+\def\doMPexpanddimen#1 {\multiply\dimen#1 \MPconcatfactor\relax}
+
+\def\presetMPconcat%
+ {\dimen 0=\gMPs1 pt \doMPreducedimen 0 % r_x
+ \dimen 2=\gMPs2 pt \doMPreducedimen 2 % s_x
+ \dimen 4=\gMPs3 pt \doMPreducedimen 4 % s_y
+ \dimen 6=\gMPs4 pt \doMPreducedimen 6 % r_y
+ \dimen 8=\gMPs5 pt \doMPreducedimen 8 % t_x
+ \dimen10=\gMPs6 pt \doMPreducedimen10 } % t_y
+
+\def\presetMPscale%
+ {\dimen 0=\gMPs1 pt \doMPreducedimen 0
+ \dimen 2=0pt
+ \dimen 4=0pt
+ \dimen 6=\gMPs2 pt \doMPreducedimen 6
+ \dimen 8=0pt
+ \dimen10=0pt }
+
+\def\noMPtranslate% use this one grouped
+ {\dimen 8=0pt % t_x
+ \dimen10=0pt } % t_y
+
+\def\doMPconcat#1#2#3#4%
+ {\dimen12=#1 pt \doMPreducedimen12 % p_x
+ \dimen14=#3 pt \doMPreducedimen14 % p_y
+ %
+ \dimen16 \dimen 0
+ \multiply \dimen16 \dimen 6
+ \dimen20 \dimen 2
+ \multiply \dimen20 \dimen 4
+ \advance \dimen16 -\dimen20
+ %
+ \dimen18 \dimen12
+ \multiply \dimen18 \dimen 6
+ \dimen20 \dimen14
+ \multiply \dimen20 \dimen 4
+ \advance \dimen18 -\dimen20
+ \dimen20 \dimen 4
+ \multiply \dimen20 \dimen10
+ \advance \dimen18 \dimen20
+ \dimen20 \dimen 6
+ \multiply \dimen20 \dimen 8
+ \advance \dimen18 -\dimen20
+ %
+ \multiply \dimen12 -\dimen 2
+ \multiply \dimen14 \dimen 0
+ \advance \dimen12 \dimen14
+ \dimen20 \dimen 2
+ \multiply \dimen20 \dimen 8
+ \advance \dimen12 \dimen20
+ \dimen20 \dimen 0
+ \multiply \dimen20 \dimen10
+ \advance \dimen12 -\dimen20
+ %
+ \doMPreducedimen16
+ \divide \dimen18 \dimen16 \doMPexpanddimen18
+ \divide \dimen12 \dimen16 \doMPexpanddimen12
+ %
+ \edef#2{\withoutpt{\the\dimen18}}% % p_x^\prime
+ \edef#4{\withoutpt{\the\dimen12}}} % p_y^\prime
+
+\def\processMPpath{\flushMPpath \closeMPpath
+ \pdfliteral{\ifcase\finiMPpath W n\or S\or f\or B\fi}%
+ \let\handleMPsequence=\dohandleMPsequence
+ \resetMPstack \nofMPsegments=0 \handleMPsequence}
+
+\def\handleMPpathconcat{\presetMPconcat
+ \pdfliteral{\gMPs1 \gMPs2 \gMPs3 \gMPs4 \gMPs5 \gMPs6 cm}%
+ \resetMPstack}
+
+\def\handleMPpathscale{\presetMPscale
+ \pdfliteral{\gMPs1 0 0 \gMPs2 0 0 cm}\resetMPstack}
+
+\def\dohandleMPpath#1#2 {\ifnum\lccode`#1=0 \setMPargument{#1#2}%
+ \else \def\somestring{#1#2}\ifx\somestring\PSlineto \setMPkeyword0
+ \else\ifx\somestring\PScurveto \setMPkeyword1
+ \else\ifx\somestring\PSrlineto \setMPkeyword2
+ \else\ifx\somestring\PSmoveto \setMPkeyword3
+ \else\ifx\somestring\PSclip \let\handleMPsequence=\processMPpath
+ \else\ifx\somestring\PSgsave \chardef\finiMPpath=3
+ \else\ifx\somestring\PSgrestore
+ \else\ifx\somestring\PSfill
+ \ifnum\finiMPpath=0
+ \chardef\finiMPpath=2 \let\handleMPsequence=\processMPpath \fi
+ \else\ifx\somestring\PSstroke
+ \ifnum\finiMPpath=0 \chardef\finiMPpath=1 \fi
+ \let\handleMPsequence=\processMPpath
+ \else\ifx\somestring\PSclosepath \def\closeMPpath{\pdfliteral{h}}%
+ \else\ifx\somestring\PSconcat
+ \let\flushMPpath=\flushconcatMPpath \handleMPpathconcat
+ \else\ifx\somestring\PSscale
+ \let\flushMPpath\flushconcatMPpath \handleMPpathscale
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \handleMPsequence}
+
+% The main conversion command
+
+\def\MPtoPDF#1{\bgroup
+ \setMPspecials\startMPscanning\def\do{}%
+ \setbox0=\vbox\bgroup
+ \parskip=0pt \leftskip=0pt \parindent=0pt \everypar{}\offinterlineskip
+ \pdfliteral{q}\let\handleMPsequence=\dohandleMPsequence
+ \input #1 \relax}
+
+\def\finishMPgraphic{\pdfliteral{Q}\egroup\box0\egroup}
+
+\endinput
diff --git a/Master/texmf-dist/doc/plain/metatex/mtpaper.pdf b/Master/texmf-dist/doc/plain/metatex/mtpaper.pdf
new file mode 100644
index 00000000000..80953ce70b1
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/mtpaper.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/plain/metatex/mtpaper/delay.mf b/Master/texmf-dist/doc/plain/metatex/mtpaper/delay.mf
new file mode 100644
index 00000000000..72bafc9f173
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/mtpaper/delay.mf
@@ -0,0 +1,301 @@
+% DELAY.MF (RMCG19950405)
+
+% DELAY.MF delays the actual drawing till the endchar;
+% Copyright (C) 2003 Ram\'on Casares
+%
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; if not, write to the
+% Free Software Foundation, Inc.,
+% 59 Temple Place, Suite 330,
+% Boston, MA 02111-1307 USA
+
+def clear_del =
+ save _dn, _del; _dn := 0; string _del[];
+enddef;
+
+def make_del =
+ for k := 1 upto _dn: scantokens _del[k]; endfor
+enddef;
+
+extra_beginchar := extra_beginchar & "clear_del;";
+extra_endchar := "make_del;" & extra_endchar;
+
+def MTlabel(suffix i)(expr v,h,add,wd,ht,dp) =
+ x.i.l = x.i if h="c": - wd/2 elseif h="r": - wd fi;
+ y.i.t = y.i if v="c": + ht/2 elseif v="b": + ht fi;
+ x.i.r = x.i.l + wd; y.i.b = y.i.t - ht - dp;
+ if not (add=""): _del[incr _dn] := "_delete(" & str i & ");"; fi
+ _del[incr _dn] := "_pos(" & str i & ");";
+enddef;
+
+def _delete(suffix i) = erase fill (x.i.l,y.i.t) --
+ (x.i.l,y.i.b) -- (x.i.r,y.i.b) -- (x.i.r,y.i.t) -- cycle;
+enddef;
+
+def _pos(suffix i) =
+ message"\MTloglabel"; show x\i/pt; show y\i/pt; message"";
+enddef;
+
+pickup pencircle scaled 0.4pt; thin_pen:=savepen;
+pickup pencircle scaled 0.8pt; med_pen:=savepen;
+pickup pencircle scaled 1.2pt; thick_pen:=savepen;
+
+def thinpen = pickup thin_pen;
+ _del[incr _dn] := "pickup thin_pen;";
+enddef;
+
+def medpen = pickup med_pen;
+ _del[incr _dn] := "pickup med_pen;";
+enddef;
+
+def thickpen = pickup thick_pen;
+ _del[incr _dn] := "pickup thick_pen;";
+enddef;
+
+def rectangle(suffix s)(expr width,height) =
+ x.s.l = x.s - width/2; x.s.r = x.s + width/2;
+ y.s.t = y.s + height/2; y.s.b = y.s - height/2;
+ _del[incr _dn] := "_rectangle(" & str s & ");";
+enddef;
+
+def _rectangle(suffix s) =
+ draw (x.s.l,y.s.b) -- (x.s.r,y.s.b) --
+ (x.s.r,y.s.t) -- (x.s.l,y.s.t) -- cycle;
+enddef;
+
+def square(suffix s)(expr side) =
+ x.s.l = x.s - side/2; x.s.r = x.s + side/2;
+ y.s.t = y.s + side/2; y.s.b = y.s - side/2;
+ _del[incr _dn] := "_square(" & str s & ");";
+enddef;
+
+def _square(suffix s) =
+ draw (x.s.l,y.s.b) -- (x.s.r,y.s.b) --
+ (x.s.r,y.s.t) -- (x.s.l,y.s.t) -- cycle;
+enddef;
+
+def ellipse(suffix s)(expr width,height) =
+ x.s.l = x.s - width/2; x.s.r = x.s + width/2;
+ y.s.t = y.s + height/2; y.s.b = y.s - height/2;
+ _del[incr _dn] := "_ellipse(" & str s & ");";
+enddef;
+
+def _ellipse(suffix s) =
+ draw (fullcircle xscaled (x.s.r - x.s.l) yscaled (y.s.t - y.s.b)
+ shifted z.s);
+enddef;
+
+def circle(suffix s)(expr diameter) =
+ x.s.l = x.s - diameter/2; x.s.r = x.s + diameter/2;
+ y.s.t = y.s + diameter/2; y.s.b = y.s - diameter/2;
+ _del[incr _dn] := "_circle(" & str s & ");";
+enddef;
+
+def _circle(suffix s) =
+ draw (fullcircle scaled (x.s.r - x.s.l) shifted z.s);
+enddef;
+
+def oval(suffix s)(expr width,height,superness) =
+ x.s.l = x.s - width/2; x.s.r = x.s + width/2;
+ y.s.t = y.s + height/2; y.s.b = y.s - height/2;
+ x.s.ness = superness;
+ _del[incr _dn] := "_oval(" & str s & ");";
+enddef;
+
+def _oval(suffix s) =
+ draw superellipse((x.s.r,y.s),(x.s,y.s.t),(x.s.l,y.s),(x.s,y.s.b),
+ x.s.ness);
+enddef;
+
+def triangle(suffix s)(expr width,height) =
+ x.s.l = x.s - width/2; x.s.r = x.s + width/2;
+ y.s.t = y.s + height/2; y.s.b = y.s - height/2;
+ _del[incr _dn] := "_triangle(" & str s & ");";
+enddef;
+
+def _triangle(suffix s) =
+ draw (x.s.l,y.s.b) -- (x.s.r,y.s.b) -- (x.s,y.s.t) -- cycle;
+enddef;
+
+def lozenge(suffix s)(expr width,height) =
+ x.s.l = x.s - width/2; x.s.r = x.s + width/2;
+ y.s.t = y.s + height/2; y.s.b = y.s - height/2;
+ _del[incr _dn] := "_lozenge(" & str s & ");";
+enddef;
+
+def _lozenge(suffix s) =
+ draw (x.s.l,y.s) -- (x.s,y.s.b) --
+ (x.s.r,y.s) -- (x.s,y.s.t) -- cycle;
+enddef;
+
+dot_diameter := 2.4pt;
+
+def dot(suffix s) =
+ x.s.dd = dot_diameter;
+ _del[incr _dn] := "_dot(" & str s & ");";
+enddef;
+
+def _dot(suffix s) =
+ fill fullcircle scaled x.s.dd shifted z.s;
+enddef;
+
+def line(suffix s) =
+ _del[incr _dn] := "_line(" & str s & ");";
+enddef;
+
+def _line(suffix s) =
+ draw z.s.o -- z.s.d;
+enddef;
+
+dash_length := 4pt;
+
+def dottedline(suffix s) =
+ x.s.dl = dash_length; x.s.dd = dot_diameter;
+ _del[incr _dn] := "_dottedline(" & str s & ");";
+enddef;
+
+def _dottedline(suffix s) =
+ begingroup save p, n;
+ path p; p = z.s.o -- z.s.d;
+ n := floor(length(z.s.d-z.s.o)/abs(x.s.dl));
+ for i := 0 upto n:
+ fill fullcircle scaled x.s.dd shifted (point i/n of p);
+ endfor endgroup
+enddef;
+
+def dashedline(suffix s) =
+ x.s.dl = dash_length;
+ _del[incr _dn] := "_dashedline(" & str s & ");";
+enddef;
+
+def _dashedline(suffix s) =
+ begingroup save p, n;
+ path p; p = z.s.o -- z.s.d;
+ n := floor(length(z.s.d-z.s.o)/abs(x.s.dl));
+ if not (odd n): n := n + 1; fi
+ for i := 0 upto (n-1): if not (odd i):
+ draw subpath(i/n,(i+1)/n) of p;
+ fi endfor endgroup
+enddef;
+
+arrow_head_length := 6pt;
+arrow_head_width := 2.4pt;
+
+def arrowhead(suffix s) =
+ x.s.ahl = arrow_head_length; x.s.ahw = arrow_head_width;
+ _del[incr _dn] := "_arrowhead(" & str s & ");";
+enddef;
+
+def _arrowhead(suffix s) =
+ z.s.dh = (x.s.ahl/length(z.s.d-z.s.o))[z.s.d,z.s.o];
+ z.s.dr = z.s.dh + x.s.ahw / 2 * dir(angle(z.s.d-z.s.o)+90);
+ z.s.dl = z.s.dh + x.s.ahw / 2 * dir(angle(z.s.d-z.s.o)-90);
+ fill z.s.d -- z.s.dr -- z.s.dl -- cycle;
+enddef;
+
+def arrow(suffix s) =
+ arrowhead(s);
+ _del[incr _dn] := "_arrow(" & str s & ");";
+enddef;
+
+def _arrow(suffix s) =
+ draw z.s.o .. z.s.dh;
+enddef;
+
+def cillinder(suffix s)(expr width,height) =
+ x.s.l = x.s - 1/2width; x.s.r = x.s + 1/2width;
+ y.s.b = y.s - 1/2height; y.s.t = y.s + 1/2height;
+ y.s.ar = 1/6height;
+ _del[incr _dn] := "_cillinder(" & str s & ");";
+enddef;
+
+def _cillinder(suffix s) =
+ draw (x.s.l,y.s.t-y.s.ar) -- (x.s.l,y.s.b+y.s.ar);
+ draw (x.s.r,y.s.t-y.s.ar) -- (x.s.r,y.s.b+y.s.ar);
+ draw (x.s.l,y.s.b+y.s.ar){down} .. (x.s,y.s.b){right}
+ .. (x.s.r,y.s.b+y.s.ar){up};
+ draw (x.s.l,y.s.t-y.s.ar){down} .. (x.s,y.s.t-2y.s.ar){right}
+ .. (x.s.r,y.s.t-y.s.ar){up} .. (x.s,y.s.t){left} .. cycle;
+enddef;
+
+join_radius := 5pt;
+
+def box(suffix s)(expr width,height) =
+ x.s.l = x.s - width/2; x.s.r = x.s + width/2;
+ y.s.t = y.s + height/2; y.s.b = y.s - height/2;
+ x.s.jr = join_radius;
+ _del[incr _dn] := "_box(" & str s & ");";
+enddef;
+
+def _box(suffix s) =
+ if min((x.s.r-x.s.l),(y.s.t-y.s.b)) > 2x.s.jr:
+ draw (((x.s,y.s.b) .. (x.s.r,y.s.b)) softjoin
+ ((x.s.r,y.s.b) .. (x.s.r,y.s.t)) softjoin
+ ((x.s.r,y.s.t) .. (x.s.l,y.s.t)) softjoin
+ ((x.s.l,y.s.t) .. (x.s.l,y.s.b)) softjoin
+ ((x.s.l,y.s.b) .. (x.s,y.s.b)));
+ else:
+ draw (fullcircle xscaled (x.s.r-x.s.l) yscaled (y.s.t-y.s.b)
+ shifted z.s);
+ fi
+enddef;
+
+def soft(suffix s) =
+ _del[incr _dn] := "_soft(" & str s & ");";
+enddef;
+
+def _soft(suffix s) =
+ draw (z.s.o -- z.s.m) softjoin (z.s.m -- z.s.d);
+enddef;
+
+def softt(suffix s) =
+ _del[incr _dn] := "_softt(" & str s & ");";
+enddef;
+
+def _softt(suffix s) =
+ draw ((z.s.o .. z.s.m1) softjoin
+ (z.s.m1 .. z.s.m2) softjoin (z.s.m2 .. z.s.d));
+enddef;
+
+def fork(suffix s) =
+ z.s.head.o = z.s.m; z.s.head.d = z.s.d;
+ arrowhead(s.head);
+ dot(s.o);
+ z.s.body.o = z.s.o; z.s.body.m = z.s.m;
+ z.s.body.d = z.s.head.dh;
+ soft(s.body);
+enddef;
+
+def darrow(suffix s) =
+ z.s.med = 1/2[z.s.o,z.s.d];
+ z.s.one.o = z.s.med; z.s.one.d = z.s.d;
+ arrow(s.one);
+ z.s.two.o = z.s.med; z.s.two.d = z.s.o;
+ arrow(s.two);
+enddef;
+
+def arroww(suffix s) =
+ z.s.head.o = z.s.m; z.s.head.d = z.s.d;
+ arrowhead(s.head);
+ z.s.body.o = z.s.o; z.s.body.m = z.s.m;
+ z.s.body.d = z.s.head.dh;
+ soft(s.body);
+enddef;
+
+def arrowww(suffix s) =
+ z.s.head.o = z.s.m2; z.s.head.d = z.s.d;
+ arrowhead(s.head);
+ z.s.body.o = z.s.o; z.s.body.m1 = z.s.m1;
+ z.s.body.m2 = z.s.m2; z.s.body.d = z.s.head.dh;
+ softt(s.body);
+enddef;
diff --git a/Master/texmf-dist/doc/plain/metatex/mtpaper/diagram.tex b/Master/texmf-dist/doc/plain/metatex/mtpaper/diagram.tex
new file mode 100644
index 00000000000..9dd392df99f
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/mtpaper/diagram.tex
@@ -0,0 +1,83 @@
+% DIAGRAM.TEX
+
+\dimen0=\hsize \divide\dimen0 by 10
+\dimen2=\dimen0 \divide\dimen2 by 3 \multiply\dimen2 by 4
+
+\MTbeginchar(\the\dimen0,\the\dimen2,0pt);
+\MT: thickpen;
+\MT: z1 = (0,0); z2 = (0,h); z3 = (w,h); z4 = (w,0);
+\MT: z5 = (1/3w,1/8h); z6 = (1/2w,0); z7 = (2/3w,-1/16h);
+\MT: draw z1 -- z2 -- z3 -- z4;
+\MT: draw z1 .. z5 ..z6 .. z7 .. z4;
+\MT: thinpen;
+\MT: for i = 11 upto 20: y[i] = 1/8h + 7/80h*(i-10); endfor
+\MT: for i = 12,13,15,16,17,19,20:
+\MT: draw (1/8w,y[i]) -- (7/8w,y[i]);
+\MT: endfor;
+\MT: for i = 11,14,18:
+\MT: draw (1/4w,y[i]) -- (7/8w,y[i]);
+\MT: endfor;
+\MTendchar;
+
+\setbox0=\box\MTbox
+
+\ifdim\hsize<10cm
+ \let\figfont=\smallsf \def\driver{drv}
+ \dimen0=\hsize \multiply\dimen0 by 2 \divide\dimen0 by 3
+\else
+ \let\figfont=\sf \def\driver{Driver}
+ \dimen0=\hsize \multiply\dimen0 by 2 \divide\dimen0 by 4
+\fi
+
+\MTbeginchar(\the\hsize,\the\dimen0,\the\ht0);
+\MT: save u, v; u = w/10; v = h/10;
+\MT: thickpen;
+%\MT: draw (0,-d)--(0,h)--(w,h)--(w,-d)--cycle; draw(0,0)--(w,0);
+\MT: x1l = x2l = x4l = x7l = 2u;
+\MT: y1t = h - v; z1lbl = z1;
+\MT: rectangle(1)(u,v);
+\MTlabel(1lbl)"\figfont\TeX";
+\MT: y2 = y3 = y1 - 2v; z2lbl = z2; z3lbl = z3; x3 = x2 + 2u;
+\MT: ellipse(2)(u,v); rectangle(3)(u,v);
+\MTlabel(2lbl)"\figfont\TeX"; \MTlabel(3lbl)"\figfont TFM";
+\MT: y4 = y5 = y6 = y2 - 2v; x5 = x3 + 2u; x6 = x5 + 2u;
+\MT: z4lbl = z4; z5lbl = z5; z6lbl = z6;
+\MT: rectangle(4)(u,v); ellipse(5)(u,v); rectangle(6)(u,v);
+\MTlabel(4lbl)"\figfont DVI"; \MTlabel(5lbl)"\figfont MF";
+\MTlabel(6lbl)"\figfont MF";
+\MT: y7 = y8 = y4 - 2v; x8 = x3; z7lbl = z7; z8lbl = z8;
+\MT: ellipse(7)(u,v); rectangle(8)(u,v);
+\MTlabel(7lbl)"\figfont\driver"; \MTlabel(8lbl)"\figfont GF";
+\MT: x9 = x7; y9t = y7t - 2v;
+\MTlabel(9)"\box0";
+\MT: x31r = x2l - u; y31 = y2; z31lbl = z31; rectangle(31)(u,v);
+\MTlabel(31lbl)"\figfont FMT";
+\MT: x32 = x5; y32b = y5t + v; z32lbl = z32; rectangle(32)(u,v);
+\MTlabel(32lbl)"\figfont BAS";
+\MT: x33 = x31; y33 = y4; z33lbl = z33; rectangle(33)(u,v);
+\MTlabel(33lbl)"\figfont log";
+\MT: x34 = x32; y34 = y7; z34lbl = z34; rectangle(34)(u,v);
+\MTlabel(34lbl)"\figfont log";
+\MT: thinpen; join_radius:=15pt;
+\MT: z11o = (x1,h); z11d = (x1,y1t); arrow(11);
+\MT: z12o = (x1,y1b); z12d = (x2,y2t); arrow(12);
+\MT: z13o = (x3l,y3); z13d = (x2r,y2); arrow(13);
+\MT: z14o = (x2,y2b); z14d = (x4,y4t); arrow(14);
+\MT: z15o = (w,y6); z15d = (x6r,y6); arrow(15);
+\MT: z16o = (x6l,y6); z16d = (x5r,y5); arrow(16);
+\MT: z17o = (x5l,y5); z17d = (x3,y3b); z17m = (x3,y5);
+\MT: arroww(17);
+\MT: z18o = (x5l,y5); z18d = (x8,y8t); z18m = (x8,y5);
+\MT: arroww(18);
+\MT: z19o = (x4,y4b); z19d = (x7,y7t); arrow(19);
+\MT: z20o = (x8l,y8); z20d = (x7r,y7); arrow(20);
+\MT: z21o = (x7,y7b); z21d = (x9,y9t); arrow(21);
+\MT: z41o = (x31r,y31); z41d = (x2l,y2); arrow(41);
+\MT: z42o = (x32,y32b); z42d = (x5,y5t); arrow(42);
+\MT: z43o = (x2,y2b); z43d = (x33r,y33t); arrow(43);
+\MT: z44o = (x5,y5b); z44d = (x34,y34t); arrow(44);
+\MT: x0 = w/2; y0 = y9; % y0b = -d;
+\MTlabel(0)"\rm \TeX\ formats";
+\MTendchar;
+
+\centerline{\box\MTbox}
diff --git a/Master/texmf-dist/doc/plain/metatex/mtpaper/frame.tex b/Master/texmf-dist/doc/plain/metatex/mtpaper/frame.tex
new file mode 100644
index 00000000000..a1433d567c7
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/mtpaper/frame.tex
@@ -0,0 +1,23 @@
+% FRAME.TEX (RMCG19950401)
+
+\catcode`\@=11
+
+\newbox\@uxbox
+
+\let\oldhrule=\hrule \let\oldvrule=\vrule
+\def\rulethickness{\afterassignment\rul@thickness\dimen0 }
+\def\rul@thickness{\edef\hrule{\oldhrule height\dimen0 }%
+ \edef\vrule{\oldvrule width\dimen0 }}
+
+\def\framebox{\afterassignment\fr@mebox\count@=}
+\def\fr@mebox{\ifvoid\count@\else \bgroup
+ \dimen0=\wd\count@ \dimen2=\ht\count@ \advance\dimen2\dp\count@
+ \global\setbox\@uxbox=\vtop{
+ \hbox to\dimen0{\vrule\hss\vbox to \dimen2{\hrule\vss
+ \hbox to\dimen0{}\vss\hrule}\hss\vrule}\kern0pt}\egroup
+ \wd\@uxbox=0pt \ht\@uxbox=0pt \dp\@uxbox=0pt
+ \ifhbox\count@
+ \setbox\count@=\hbox{\raise\ht\count@\box\@uxbox\box\count@}\else
+ \setbox\count@=\vbox{\box\@uxbox\nointerlineskip\box\count@}\fi\fi}
+
+\catcode`\@=12
diff --git a/Master/texmf-dist/doc/plain/metatex/mtpaper/mtpaper.tex b/Master/texmf-dist/doc/plain/metatex/mtpaper/mtpaper.tex
new file mode 100644
index 00000000000..de044df2bf7
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/mtpaper/mtpaper.tex
@@ -0,0 +1,654 @@
+
+\input tugboat.sty
+
+%\input tugboat.dates
+%\input tb75pages
+%\pageno=\TBcasa
+
+% EXTRA CODE
+
+\ifx\plaindefaults\undefined \let\next=\relax
+\else \let\next=\plaindefaults \fi \next
+
+\input metatex
+\MTline{input delay.mf;}
+
+\def\MTeX{{\manual META}\-\TeX}
+\font\smallsf=cmssq8
+\font\sf=cmss10
+
+% END EXTRA CODE
+
+
+\title * {\MTeX} *
+\author * Ram\'on Casares *
+\address * Telef\'onica de Espa\~na *
+\netaddress * r.casares@computer.org *
+
+\article %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\head * Abstract *
+
+{\MTeX} is a set of {\plain} {\TeX} and {\MF} macros that you can use to
+define both the text and the figures in a single source file. Because
+{\MTeX} sets up two way communication, from {\TeX} to {\MF} and back
+from {\MF} to {\TeX}, drawing dimensions can be controlled by {\TeX} and
+labels can be located by {\MF}. Only standard features of {\TeX} and
+{\MF} are used, but two runs of {\TeX} and one of {\MF} are needed.
+
+
+\head * Overview *
+
+Together, {\TeX} and {\MF} define the page layout to the pixel. This
+means that nothing more is needed, not even a means of including figures
+in a {\TeX} document. To prove this is the aim of this paper.
+
+To split the typesetting process in two parts, one to define and draw
+the characters and the other to arrange the characters in paragraphs and
+pages, is surely the best way to reduce the complexity of the
+typesetting task, provided it needs simplification (see Figure~1). But
+this method makes it difficult, for example, to integrate labels with
+graphics in figures, because while {\TeX} is best suited to typeset the
+labels, {\MF} is the appropriate tool to draw the graphics. And, of
+course, labels should be located in accordance with the graphics.
+
+Therefore, the true successor of {\TeX} has to include in a single
+program both the capabilities of {\TeX} and {\MF}. Then the typesetting
+engine would include a powerful graphic tool, a grid in which to typeset if
+required, and it could take into account the shapes of the characters to
+determine, for example, kernings or italic corrections. The other way
+around is also possible. It could be seen as a graphic engine with a
+powerful typesetting tool. From this point of view, the page would be a
+graphic object that could contain paragraphs of different shapes
+requested from the typesetting tool.
+
+\MTeX, although it does not fulfill the requirements of such a
+successor, can be seen as an early sign of its possibilities. For the
+moment, {\MTeX} takes advantage of {\MF}'s equation solving capabilities
+to locate objects, including the labels, which are typeset by {\TeX}. The
+cost of this nice feature is that two {\TeX} passes are required.
+
+During the first {\TeX} pass a {\MF} file is written. As it is {\TeX}
+itself who writes the {\MF} file, any dimension controlled by {\TeX} can
+be used and incorporated in {\MF}'s calculations. For example, the label
+sizes, as they will be typeset by {\TeX}, are made known to {\MF}.
+
+After the first {\TeX} pass, {\MF} draws the graphic figures and
+writes the label locations in its log file. So it is {\MF}'s
+responsibility to locate the labels. Note that, depending on the style
+of {\MF} programming, this can be completely determined from {\TeX}. In
+other words, you can relate the label location to the location and size
+of other {\MF} objects, or not.
+
+When {\TeX} executes its second pass, it takes the graphics
+from the new font, reads the location of labels from the
+{\MF} log file, and then everything is complete.
+
+Because labels are just |\hbox|es typeset by \TeX, every macro currently
+defined for text automatically applies also to figures. For example, if
+a macro |\person| is defined to write its argument in a small caps font
+and save it to an index file, the same happens whenever it is used
+inside a figure label.
+
+
+\head * Methods *
+
+{\MTeX} allows the source file to include, in addition to the customary
+{\TeX} macros to control the text, other commands to generate
+figures with {\MF}.
+
+\subhead * Steps *
+
+In order to use {\MTeX} the following three steps are to be executed:
+
+\list[\numbered]
+
+\item The {\MTeX} file, suppose it is |filename.ext|, is first
+processed by |TEX|, with the {\plain} format, during which a {\MF} file
+named |auxiliar.mf| is created. This {\MF} file contains information
+provided by {\TeX} concerning the size of the labels, so the |MF|
+program can delete this area from the figure if requested. If the output
+file |filename.dvi| were typeset now, it would have blanks in place of
+the figures, but otherwise be the same as the final document.
+
+\item Then |MF|, with the {\plain} base, is run on |auxiliar.mf|.
+As a result, information specifying where to typeset the labels is
+written in the log file, |auxiliar.log|. In addition, the metric file,
+|auxiliar.tfm|, and the generic format bitmap font, |auxiliar.329gf|,
+are created. On my system I have to process this |gf| file to get a
+|pk| file that my drivers can read, so I execute the program |GFtoPK| on
+it, getting the packed bitmap font |auxiliar.329pk|. Please note three
+points. i)~The number |329|, referring to the resolution, varies
+according to the {\MF} mode. ii)~The |tfm| and |pk| files must be in or
+moved to directories where programs can find them. iii)~{\MTeX} sets the
+{\MF} mode to |localfont|, thus assuming that |localfont| is assigned
+the appropriate name.
+
+\item Lastly, |filename.ext| is again run through |TEX|. During this
+second run, both the font |auxiliar| containing the figures and the
+information explaining where to locate the labels are available, so the
+document is complete.
+
+\endlist
+
+The figures fill exactly the same area in both the first and second
+|TEX| program runs, so indices, tables of contents, and other references
+that also need two passes to be resolved can take advantage of the two
+runs needed by {\MTeX}.
+
+\subhead * Use *
+
+To use the {\MTeX} macros, they must be imported by writing in the
+source file: ||\input metatex||
+
+\noindent This has to be written after |\mag| has been given its final
+value. When |metatex.tex| is read, {\MTeX} checks whether the file
+|auxiliar.mf| exists. If it does not exist, then things are set up for
+the first pass; for example, |auxiliar.mf| is opened for writing. If it
+does exist, then things are set for the second pass; for example,
+|auxiliar.log| is opened for reading. This means that if
+|auxiliar.mf| is not deleted, then step~3, the second |TEX| program
+pass, is executed directly. This saves time when only the text in file
+|filename.ext|, but not the figures, were modified.
+
+\subhead * User macros *
+
+The {\MTeX} user macros are:
+
+\list
+
+\item |\MTbeginchar(wd,ht,dp);| states that a figure sized as given
+(width |wd|, height |ht|, depth |dp|) will be created. These values
+should be known both by {\TeX} and by {\MF}, so for example |12pt|,
+|6cm|, |\the\hsize| or |\the\dimen0|, always without |#|, are allowed.
+During the {\it first pass}, {\TeX} writes in |auxiliar.mf| the {\MF}
+macro |beginchar| assigning character codes sequentially, and box
+|\MTbox| is made empty but sized as specified by the arguments of this
+macro. During the {\it second pass}, {\TeX} puts the corresponding
+character of the font |auxiliar| in box |\MTbox|. The size of |\MTbox| is
+that specified and not affected by the character dimensions.
+
+\item |\MTendchar;| finishes the figure definition. During the
+{\it first pass}, {\TeX} writes the {\MF} macro |endchar;| in file
+|auxiliar.mf|. During the {\it second pass}, box |\MTbox| contains the
+complete figure, including labels. Something like |\box\MTbox| is
+used to typeset the figure.
+
+\item |\MTlabel*(s)cc"Text";| adds a label to the current figure.
+The parameter between quotes, |Text| in the example, is the label
+content; it will be put inside an |\hbox| and therefore could be
+anything that {\TeX} allows inside an |\hbox|. The optional asterisk
+after |\MTlabel| instructs {\MTeX} to erase the area of the figure
+already drawn that it is under the label.
+
+The label will be located at {\MF} point |z.s|, where |s| is the parameter
+between parentheses. The reference point is further specified by the
+optional parameter after the right parenthesis, |cc| in the example.
+This parameter is composed of exactly two letters: the first can be |t|
+meaning top, |c| meaning center or |b| meaning bottom; and the second
+letter can be |l| meaning left, |c| meaning center or |r| meaning right.
+So, for example, |tl| means that the label reference point is its top
+left corner. The default value for the reference point is |cc|, that is,
+its center.
+
+|\MTlabel| should only be used between |\MTbeginchar| and |\MTendchar|.
+During the {\it first pass}, it writes the following three elements in
+|auxiliar.mf|: i)~the {\MF} macros which in turn cause |MF| to write the
+label reference point location to its log file, |auxiliar.log|; ii)~the
+four label sides, which are by this means made available to the
+following {\MF} code for the figure, notated as |y.s.t| for the top side,
+|y.s.b| for the bottom side, |x.s.l| for the left side and |x.s.r| for the right
+side; and iii)~the code to delete, if requested, the figure area already
+drawn that is under the rectangle occupied by the label. During the {\it
+second pass}, it adds the label to the box |\MTbox| in the place that
+reads from file |auxiliar.log|, making no modification to the dimensions of
+|\MTbox|, even if the label is typeset outside the box.
+
+\endlist
+
+There are three more macros for passing information to \MF, that is, for
+writing general text in |auxiliar.mf|: |\MT:|, |\MTcode| and |\MTline|.
+This happens only during the first pass; during the second pass, these
+macros do nothing.
+
+\list
+
+\item |\MT:| writes in file |auxiliar.mf| everything till the end of
+line. It writes verbatim except for the character |\|, which keeps its
+normal {\TeX} |\catcode| of |0|. Spaces are {\it not\/} ignored after
+macros. The sequence |\\| writes a single |\| in file |auxiliar.mf|.
+
+\item |\MTcode| writes in file |auxiliar.mf| everything until it finds a
+line equal (including |\catcode|s) to the current value of |\MTendmark|.
+By default, this is a blank line, thus, |\def\MTendmark{}|. As with
+|\MT:|, it writes verbatim except for |\|, which still operates as an
+escape character. The control sequence |\\| writes a single |\| in file
+|auxiliar.mf|.
+
+\item |\MTline{text}| writes its parameter to |auxiliar.mf|,
+|text| in the example. It does not change the |\catcode|s in the
+argument, so it does not perform verbatim writing. But all {\plain}
+special characters can be written prefixing them by the escape character
+|\|. The {\plain} special characters are (not including the first colon
+nor the final period): |\{}$&#^_~%|. For example, |\#| results in
+|#|.
+
+\endlist
+
+When defining {\TeX} macros that write to |auxiliar.mf|, |\MTline|
+should generally be used in preference to |\MT:| or |\MTcode|, because
+the latter two use
+the end of line in a special way that is not usually available when
+{\TeX} is reading a macro.
+
+{\TeX} dimensions can be included using any of these three writing
+macros. For example, |\the\hsize| will be expanded to {\tt \the\hsize}
+(for the present article),
+and written as such to the {\MF} file |auxiliar.mf|. Note that the character
+|\| keeps its escape |\catcode| in all three writing macros. In the
+case of |\MTline|, braces |{}| also keep their |\catcode|s and therefore
+macros with parameters can be used normally.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\head * Examples *
+
+\subhead * Diagram *
+
+First a typical example of {\MTeX} usage, showing the file formats,
+programs, and their relationships. The figure width is exactly
+|\hsize|, but what is more important is that the same code will adapt
+itself to any value for the measure. Well, of course, not to {\it any\/}
+width but to any width between, let's say, $8\,$cm and $25\,$cm.
+
+\figure[\caption{Figure 1: One column diagram}]
+ \input diagram
+\endfigure
+
+%\twocolfigure[\caption{Figure 2: Two columns diagram}]
+% \input diagram
+%\endfigure
+
+Figure~1 is the one column version, and Figure~2 (above the appendix) is
+the two column version, generated by the same source.
+
+
+%%%%%%%%%%%%%%%%%%%
+
+\input shadow
+
+\def\beginshadowpar{\setbox0=\vbox\bgroup \kern3pt
+ \advance\parindent by -3pt \leftskip=3pt\rightskip=3pt }
+\def\endshadowpar{\par\kern3pt\egroup\framebox0\shadowbox0\box0 }
+
+% \subhead * Shadowing *
+\bigskip % \subhead skip
+
+\beginshadowpar\noindent
+{\bf Shadowing.} Both {\TeX} and {\MF} are ill suited to creating
+shadows. In {\TeX}, one straightforward technique is double use of
+|\leaders|, but in practice this results in huge |dvi| files. In {\MF},
+drawing lots of tiny points easily exceeds the capacity of the program.
+The solution is to coordinate the work of both programs.
+\endshadowpar
+
+To create a large rectangular shadow we divide it into an array of $n
+\times m$ smaller rectangles. The smaller rectangles are all identical,
+so it is enough for {\MF} to draw one shadow character and then for
+{\TeX} to typeset a solid area repeating it.
+
+To simplify the tasks of both {\TeX} and {\MF}, the size of the shadow
+character should be similar to that of normal characters, because neither
+program was designed to work well with extraordinarily large (or small)
+characters. So a
+good approach is to make the shadow character as big as possible but
+never wider nor higher than 16$\,$pt.
+
+For {\MTeX}, each figure is a character. This causes problems with {\MF}
+when the figure is big and the resolution is high, because it cannot
+draw areas bigger than $4095\times4095$ pixels. This is not usually a
+problem working at 300$\,$dpi. (It is never a problem with {\MP}, see
+the following section on {\PS}. Another advantage of using {\PS} is that
+you get a shadow simply by drawing a grey rule, and none of the above
+machinations are necessary.)
+
+%%%%%%%%%%%%%%%%%%%
+
+\subhead * Keys *
+
+After the following {\MTeX} macros:
+
+\verbatim[\numbered\outputtofile{keys.tex}]
+\MTcode
+def keybox =
+ pickup pencircle scaled 0.8pt;
+ x1 = x3 = 1pt;
+ x2 = x4 = w - 1pt;
+ x5 = 0; x6 = w;
+ y1 = y2 = -d;
+ y3 = y4 = h;
+ y5 = y6 = (h - d)/2;
+ draw z1 -- z2 .. z6{up} ..
+ z4 -- z3 .. z5{down} .. cycle;
+ z0 = (x1,0);
+enddef;
+
+\def\defkey#1#2{\setbox0=\hbox{\sf#2}%
+ \dimen0=\wd0\advance\dimen0 by 2pt
+ \dimen2=\ht0\advance\dimen2 by 1pt
+ \dimen4=\dp0\advance\dimen4 by 1pt
+ \MTbeginchar(\the\dimen0,%
+ \the\dimen2,%
+ \the\dimen4);%
+ \MTline{keybox;}%
+ \MTlabel(0)bl"\sf #2";%
+ \MTendchar;%
+ \expandafter\newbox
+ \csname\string#1box\endcsname
+ \expandafter\setbox
+ \csname\string#1box\endcsname
+ =\vtop{\unvbox\MTbox}%
+ \def#1{\expandafter\copy
+ \csname\string#1box\endcsname}}
+
+\def\makekey#1{\expandafter\defkey%
+ \csname#1\endcsname{#1}}
+\endverbatim
+
+\input keys
+
+Then, we can declare |\makekey{Alt}|\makekey{Alt} to
+typeset {\Alt} simply via |\Alt|. It is also possible to
+declare |\defkey\escape{\tt\char92}|\defkey\escape{\tt\char92} and then
+|\escape| results in \escape.
+
+%%%%%%%%%%%%%%%%%%%
+
+\subhead * Baroque tables *
+
+Baroque periods are the result of new technical achievements providing
+unexplored possibilities and hence the urgent need to experiment with them,
+frequently far away from what discretion might recommend. This explains
+the time of baroque software that we live in, and increases the value of
+\MTeX, because it provides the means to easily draw baroque tables. I am not
+a baroque man, so my baroque table example is not baroque but, and this
+is the point, it is at least not built with straight lines.
+
+\MTcode
+def tablebox =
+ pickup pencircle scaled 1.6pt;
+ x0 = 5pt; y0 = 5pt;
+ draw (0,h) ... (w/2,h+y0) ... (w,h) ... (w+x0,(h-d)/2) ... (w,-d) ...
+ (w/2,-d-y0) ... (0,-d) ... (-x0,(h-d)/2) ... cycle;
+enddef;
+
+\def\beginbaroquetable{\setbox0=\vbox\bgroup
+ \halign\bgroup##\hfil&&\quad##\hfil\cr}
+\def\endbaroquetable{\crcr\egroup\egroup
+ \MTbeginchar(\the\wd0,\the\ht0,\the\dp0);%
+ \MTline{ tablebox;}%
+ \MTendchar;%
+ $$\rlap{\box\MTbox}\box0$$}
+
+\beginbaroquetable
+ This is not a straight table\cr
+ but it's only an example\cr
+ and therefore not so ample\cr
+ of what's {\MTeX}-able!
+\endbaroquetable
+
+%%%%%%%%%%%%%%%%%%%
+
+\MTcode
+def leftbrace =
+ pickup penrazor scaled 2pt rotated 30;
+ x3 = 0; x0 = x6 = w; x1 = x5 = w/5; x2 = x4 = w-x1;
+ y0 = 0; y1 = h/8; y2 = h/3; y3 = h/2;
+ y4 + y2 = h; y1 + y5 = h; y6 = h;
+ draw z0 .. z1 .. z2 .. z3;
+ draw z6 .. z5 .. z4 .. z3;
+enddef;
+
+\def\beginbracedpar{\setbox0=\vbox\bgroup
+ \leftskip=20pt }
+\def\endbracedpar{\strut\par\egroup
+ \MTbeginchar(20pt,\the\ht0,0pt);%
+ \MTline{ leftbrace;}%
+ \MTendchar;%
+ \hbox to\hsize{\rlap{\box\MTbox}\box0\hss}}
+
+%\subhead * Ornate paragraphs *
+\bigskip % \subhead skip
+
+\beginbracedpar\noindent
+{\bf Ornate paragraphs.} Only if you are truly baroque can you get the
+most from {\MTeX}. If, for example, you like ornate paragraphs, you are
+in your element. Just put the material in a |\vbox| to get the height
+and the depth, and pass these dimensions to {\MF} to draw a right sized
+embellishment. Ah!, but be aware that Computer Modern is a neoclassical
+font, so it won't mix well with your elaborations.
+\endbracedpar
+
+%%%%%%%%%%%%%%%%%%%
+
+% To fill unused space!
+\MTcode
+ def tribar(expr alpha) =
+ pickup pencircle scaled 0.8pt;
+ % draw (0,0)--(w,0)--(w,h)--(0,h)--cycle;
+ save u, v; u = w/2; v = 12;
+ z1 = (w/2,h/2) + u*(right rotated alpha);
+ z2 = (w/2,h/2) + u*(right rotated (alpha+120));
+ z3 = (w/2,h/2) + u*(right rotated (alpha-120));
+ z1r = (w/2,h/2) + u*(right rotated (alpha+v));
+ z2r = (w/2,h/2) + u*(right rotated (alpha+120+v));
+ z3r = (w/2,h/2) + u*(right rotated (alpha-120+v));
+ draw z1 .. z1r; draw z2 .. z2r; draw z3 .. z3r;
+ draw z1 .. z3r; draw z2 .. z1r; draw z3 .. z2r;
+ z1m = whatever[z1,z2r]; z1m = whatever[z1r,z3];
+ z2m = whatever[z2,z3r]; z2m = whatever[z2r,z1];
+ z3m = whatever[z3,z1r]; z3m = whatever[z3r,z2];
+ draw z1 .. z2m; draw z2 .. z3m; draw z3 .. z1m;
+ z1ra = z1 reflectedabout (z1r,z1m);
+ z2ra = z2 reflectedabout (z2r,z2m);
+ z3ra = z3 reflectedabout (z3r,z3m);
+ draw z1m .. z1ra; draw z2m .. z2ra; draw z3m .. z3ra;
+ z3x - z1x = whatever*(z3-z1m);
+ z2x - z3x = whatever*(z2-z3m);
+ z1x - z2x = whatever*(z1-z2m);
+ z1ra - z1x = whatever*(z3-z1m);
+ z3ra - z3x = whatever*(z2-z3m);
+ z2ra - z2x = whatever*(z1-z2m);
+ z1y = whatever[z1m,z3]; z1y = whatever[z1x,z2x];
+ z2y = whatever[z2m,z1]; z2y = whatever[z2x,z3x];
+ z3y = whatever[z3m,z2]; z3y = whatever[z3x,z1x];
+ draw z1x .. z3y;
+ draw z2x .. z1y;
+ draw z3x .. z2y;
+ enddef;
+
+\def\tribar#1#2{% #1=ht, #2=angle
+ \MTbeginchar(#1,#1,0pt);\MTline{tribar(#2);}\MTendchar;\box\MTbox}
+
+\newcount\angle \angle=-36
+\newdimen\tribarht \tribarht=75pt
+
+%\subhead * Exercice *
+\bigskip % \subhead skip
+
+ \noindent
+ {\bf Exercise.}\footnote*{The real exercise is to fill the rest of the
+ page with tribars. A clue: let {\TeX} to calculate how many are needed,
+ so you can concentrate your efforts in drawing the figure.}
+ Take three equal bars and build as shown.
+ Ask Roger Penrose if you don't find the solution.
+ \vskip1pc
+
+ \loop
+ \vfil
+ \line{\tribar{\the\tribarht}{\the\angle}\hfil \global\advance\angle5
+ \tribar{\the\tribarht}{\the\angle}\hfil \global\advance\angle5
+ \tribar{\the\tribarht}{\the\angle}\global\advance\angle5 }
+ \dimen0=\pagegoal \advance\dimen0 by-\pagetotal
+ \ifdim\dimen0>\tribarht
+ \repeat
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\head * {\PS} *
+
+By taking advantage of {\MP}, we can make {\PS} versions of the
+{\MTeX} files. Simply execute |mpost &plain auxiliar.mf| instead of
+{\MF} and, after {\TeX}'s second pass, execute |dvips| ({\MTeX} uses
+|dvips| specials). This works because |auxiliar.mf| is valid code
+for both {\MF} and {\MP}, and because, in the second {\TeX} pass,
+{\MTeX} checks which one was used and adapts itself to the situation.
+
+And thanks to {\PDF\TeX} and the Con{\TeX}t files |supp-mis.tex| and
+|supp-pdf.tex|, it is also possible to get \acro{PDF} output. Just
+execute {\PDF\TeX} twice, instead of {\TeX}, and once {\MP}, instead of
+{\MF}. (In practice, {\MTeX} uses its own macro file |mtmp2pdf.tex| for
+this, instead of the Con{\TeX}t files. I extracted all that {\MTeX}
+needs from the Con{\TeX}t files into |mtmp2pdf.tex|.)
+
+This works because, if {\MTeX} determines that {\MP} was employed to
+draw the figures, it then checks which program, {\TeX} or {\PDF\TeX}, is
+executing. If {\TeX}, then it includes the files produced by {\MP} using
+the |dvips| specials. If {\PDF\TeX}, it translates from |ps| to |pdf|.
+
+Therefore, the same {\MTeX} source file generates at will any of the
+three output formats---|dvi|, |ps|, or |pdf|---just by running the
+appropriate programs. In the appendix, as an example, there is a
+\acro{DOS} batch file that shows how to get the |pdf| version of a file
+|filename.ext|.
+
+
+\head * Other graphical tools *
+
+There are other tools to include pictures in a {\TeX} document.
+{\LaTeX}'s |picture| environment, {\PiCTeX}, and |mfpic|, are three of
+them. {\MTeX} is similar to |mfpic|, in that both use {\MF} to draw.
+
+The aim of |mfpic| is to overcome the difficulties of {\LaTeX}'s
+|picture| environment and of {\PiCTeX}. {\LaTeX}'s |picture| environment
+uses four pre-cooked special fonts, and its drawings are just
+compositions of these characters (as well as {\TeX}'s builtin |\hrule|s and
+|\vrule|s). {\PiCTeX} only uses a tiny point to compose the pictures, so
+it is more general. But letting {\TeX} to draw the figures setting point
+after point is painful, as noted above. The |mfpic| solution uses a
+better tool for drawing: {\MF}.
+
+With these origins, for |mfpic|, {\MF} is a hidden back-end processor,
+and |mfpic| imposes only two requirements on its users: to know {\TeX},
+and to know |mfpic|. On the other hand, {\MTeX}'s approach is
+minimalist, at the cost of being more demanding with its users. A
+{\MTeX} user has to know {\TeX}, {\MF}, and {\MTeX}\Dash although this
+last requirement is small, because {\MTeX} only builds the necessary
+bridges to use {\TeX} and {\MF} in a cooperative way.
+
+A feature that shows the different strategies employed in designing
+|mfpic| and {\MTeX} is label positioning. {\MTeX} labels are located by
+{\MF}, so {\TeX} has to read the {\MF} log file to learn where to
+typeset them. For |mfpic|, {\TeX} itself locates the labels,
+but by doing so |mfpic| has to give up some nice {\MF} characteristics,
+such as its equation solving capabilities.
+
+% |mfpic| is to {\LaTeX} as {\MTeX} is to |plain| {\TeX}.
+In summary, |mfpic|'s aim is to draw pictures in {\TeX} documents in a
+better way than using {\LaTeX}'s |picture| environment or {\PiCTeX};
+while {\MTeX}'s intention is to coordinate the work of {\TeX} and
+{\MF}. In this way, {\MTeX} provides the full raw power of {\TeX} and
+{\MF}, and it is up to you to harness them.
+
+
+\head * Final remarks *
+
+I have been using {\MTeX} for some years. The first version was dated
+1994, but it has been used only for personal purposes. For this reason,
+it is not truly a straightforward end-user tool, as for example {\LaTeX} packages
+should be. It has to be used knowledgeably and with care. And though
+most tasks can be automated, by chaining {\TeX} and {\MF} errors are
+even more difficult to pinpoint than in {\TeX} or {\MF} alone.
+
+Nevertheless, {\MTeX} serves to validate the feasibility of a closer
+collaboration between {\TeX} and {\MF} and to appraise the interest of
+such a collaboration. And, of course, if you dare, you can get lots of
+fun, and at least an equal amount of frustration, using {\MTeX}. Try it!
+
+The {\MTeX} package is available from {\CTAN} in
+\acro{CTAN}|:/macros/plain/contrib/metatex|.
+
+Happy {\MTeX}ing!
+
+
+\makesignature
+
+
+\newpage
+
+
+\onecol % Annex in one column, can't switch to \twocol on the same page
+ % with current plain tugboat macros.
+
+\figure[\caption{Figure 2: Two-column diagram}]
+\input diagram
+\endfigure
+
+\head * Appendix: Pseudo-batch example *
+
+This is an example based on \acro{DOS} batch files that can be adapted for
+other operating systems. It processes the file |filename.ext|, generating
+|filename.pdf|. We will comment each line of pseudo-code.
+
+\list[\numbered]
+\item We go to the directory where our working files are.
+ ||cd c:\dir\subdir\mydir||
+\item We set environment variables (if necessary). In this case we are
+using a |web2c| system, so it is enough to set one. In |web2c|, by
+default, all programs look for files in the current dir, ``|.|'', and
+that is enough for us.
+ ||set TEXMFCNF=c:\tex\texmf.local\web2c;c:\tex\texmf\web2c;d:\texmf\web2c||
+\item We tell the operating system where to find the programs.
+ ||path=$path$;c:\tex\bin\dos||
+\item After the settings, we force the first {\TeX} pass.
+ ||if exist auxiliar.mf del auxiliar.mf||
+\item Then, we execute the first {\TeX} pass (in this case, it is {\PDF\TeX}).
+ ||pdftex &plain filename.ext||
+\item If {\MTeX} was not used, and no |auxiliar.mf| was written, then we
+are done.
+ ||if not exist auxiliar.mf goto end||
+\item Otherwise we run {\MP} with its |&plain| memory (format),
+also known as |&mpost|.
+ ||mpost &plain auxiliar.mf||
+\item Finally, we execute the second {\TeX} pass.
+ ||pdftex &plain filename.ext||
+\item We now have the complete |filename.pdf| file.
+ ||:end||
+
+\endlist
+
+\MTline{end.} % METATeX changes \bye
+\endarticle
+
+
+% To check labels (ink intensive example!)
+\MTbeginchar(5cm,5cm,0cm);
+\MT: fill (0,0)--(w,0)--(w,h)--(0,h)--cycle;
+\MT: z0 = (w/2,h/2);
+\MT: z1 = (w/2,3h/4); z11 = z1;
+\MT: z2 = (w/2,h/4);
+\MT: z3 = (0,h/2);
+\MT: z4 = (0,h/4);
+\MTlabel*(0)"Center";
+\MTlabel*(1)tl".";
+\MTlabel*(11)br".";
+\MTlabel*(2)":";
+\MTlabel(3)"Out";
+\MTlabel*(4)"Intruder";
+\MTendchar;
+$$\box\MTbox$$
diff --git a/Master/texmf-dist/doc/plain/metatex/mtpaper/shadow.tex b/Master/texmf-dist/doc/plain/metatex/mtpaper/shadow.tex
new file mode 100644
index 00000000000..5ac184ef523
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/metatex/mtpaper/shadow.tex
@@ -0,0 +1,85 @@
+% SHADOW.TEX (RMCG19950401)
+
+\ifx\MT\undefined \input metatex \fi
+\ifx\framebox\undefined \input frame \fi
+
+\let\TMline=\MTline
+
+\catcode`\@=11
+
+\newdimen\shadowdim \shadowdim=0.3pt % for 600dpi; try 0.85 for 300dpi
+
+\TMline{\% Defined by SHADOW.TEX}
+\TMline{}
+\TMline{ if unknown prologues: font_size 12pt\#; fi}
+\TMline{}
+\TMline{ def shadowall(expr dist) =}
+\TMline{ begingroup}
+\TMline{ save u,v,distx,disty,zbase,zcur;}
+\TMline{ pair zbase,zcur;}
+\TMline{ u := floor(w/dist); if odd u: u := u + 1; fi distx = w/u;}
+\TMline{ v := floor(h/dist); if odd v: v := v + 1; fi disty = h/v;}
+\TMline{ zbase := (1/2distx,1/2disty);}
+\TMline{ for i := 0 upto (u-1):}
+\TMline{ zcur := zbase if odd i: + (0,disty) fi;}
+\TMline{ for j := 0 upto (v-1): if (not odd(i+j)):}
+\TMline{ addto currentpicture contour unitsquare shifted zcur;}
+\TMline{ zcur := zcur + (0,2disty);}
+\TMline{ fi endfor}
+\TMline{ zbase := zbase + (distx,0);}
+\TMline{ endfor}
+\TMline{ endgroup;}
+\TMline{ enddef;}
+\TMline{}
+
+\def\shadowbox{\afterassignment\sh@dowbox\count@=}
+\def\sh@dowbox{\ifvoid\count@ \let\next=\relax \else
+ \shadowchar
+ \ifMTmf \let\next=\MTsh@dow \else
+ \ifx\pdfliteral\undefined \let\next=\PSsh@dow \else
+ \let\next=\ACsh@dow \fi \fi \fi
+ \next}
+
+\def\shadowchar{\bgroup
+ \dimen0=\wd\count@ \dimen2=\ht\count@ \advance\dimen2\dp\count@
+ \dimen4=16pt \count2=\dimen4
+ \count0=\dimen0 \divide\count0 by \count2 \advance\count0 by 1
+ \dimen4=\dimen0 \divide\dimen4 by \count0
+ \count0=\dimen2 \divide\count0 by \count2 \advance\count0 by 1
+ \dimen6=\dimen2 \divide\dimen6 by \count0
+ \setbox0=\box\MTbox
+ \MTbeginchar(\the\dimen4,\the\dimen6,0pt);%
+ \MTline{ shadowall(\the\shadowdim);}%
+ \MTendchar;%
+ \global\setbox\@uxbox=\vtop to \dimen2{\cleaders
+ \hbox to \dimen0{\cleaders\box\MTbox\hfil}\vfil}%
+ \global\setbox\MTbox=\box0 \egroup}
+
+\def\MTsh@dow{\wd\@uxbox=0pt \ht\@uxbox=0pt \dp\@uxbox=0pt
+ \ifhbox\count@
+ \setbox\count@=\hbox{\raise\ht\count@\box\@uxbox\box\count@}\else
+ \setbox\count@=\vbox{\box\@uxbox\nointerlineskip\box\count@}\fi}
+
+\def\PSsh@dow{\ifhbox\count@
+ \setbox\count@=\hbox{\special{ps:gsave 0.8 setgray}%
+ \rlap{\vrule width \wd\count@ height \ht\count@ depth \dp\count@}%
+ \special{ps:0 setgray grestore}%
+ \unhbox\count@}\else
+ \setbox\count@=\vbox{\special{ps:gsave 0.8 setgray}
+ \vtop to 0pt{\vbox to 0pt{
+ \hrule width \wd\count@ height \ht\count@ depth \dp\count@
+ \vss}\vss}
+ \special{ps:0 setgray grestore}
+ \nointerlineskip
+ \unvbox\count@}\fi}
+
+\def\ACsh@dow{\ifhbox\count@
+ \setbox\count@=\hbox{\pdfliteral{q 0.8 g}%
+ \rlap{\vrule width \wd\count@ height \ht\count@ depth \dp\count@}%
+ \pdfliteral{0 g Q}\unhbox\count@}\else
+ \setbox\count@=\vbox{\pdfliteral{q 0.8 g}
+ \vtop to 0pt{\vbox to 0pt{
+ \hrule width \wd\count@ height \ht\count@ depth \dp\count@
+ \vss}\vss}\pdfliteral{0 g Q}\nointerlineskip\unvbox\count@}\fi}
+
+\catcode`\@=12
diff --git a/Master/texmf-dist/doc/plain/mnras/fonttest.tex b/Master/texmf-dist/doc/plain/mnras/fonttest.tex
new file mode 100644
index 00000000000..c84aa89bc44
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/mnras/fonttest.tex
@@ -0,0 +1,169 @@
+% FONTTEST.TEX
+%
+% Test all the possible font combinations in the MN design
+%
+% v0.4 --- released 25th August 1994 (M. Reed)
+% v0.3 --- released 22nd February 1994
+% v0.25 --- released 24th July 1992
+% v0.1 --- first released 27th February 1992
+%
+% Copyright Cambridge University Press
+
+% The following line automatically loads the mn macros if you are not
+% using a format file.
+\ifx\mnmacrosloaded\undefined \input mn\fi
+
+
+% If your system has the AMS fonts version 2.0 installed, MN.tex can be
+% made to use them by uncommenting the line: %\AMStwofontstrue
+%
+% By doing this, you will be able to obtain upright Greek characters.
+% e.g. \umu, \upi etc. See the section on "Upright Greek characters" in
+% the author guide for further information.
+
+\newif\ifAMStwofonts
+%\AMStwofontstrue
+
+\ifCUPmtplainloaded
+ \AMStwofontstrue
+\else
+ \NewTextAlphabet{textbfit} {cmbxti10} {}
+ \NewTextAlphabet{textbfss} {cmssbx10} {}
+ \NewMathAlphabet{mathbfit} {cmbxti10} {} % for math mode
+ \NewMathAlphabet{mathbfss} {cmssbx10} {} % " " "
+ %
+ \ifAMStwofonts
+ \NewSymbolFont{upmath} {eurm10}
+ \NewSymbolFont{AMSa} {msam10}
+ \NewMathSymbol{\upi} {0}{upmath}{19}
+ \NewMathSymbol{\umu} {0}{upmath}{16}
+ \NewMathSymbol{\upartial}{0}{upmath}{40}
+ \NewMathSymbol{\leqslant}{3}{AMSa}{36}
+ \NewMathSymbol{\geqslant}{3}{AMSa}{3E}
+ \let\oldle=\le \let\oldleq=\leq
+ \let\oldge=\ge \let\oldgeq=\geq
+ \let\leq=\leqslant \let\le=\leqslant
+ \let\geq=\geqslant \let\ge=\geqslant
+ \fi
+ %
+\fi
+
+\def\tface{\ifCUPmtplainloaded (Monotype Times)\else (Computer Modern)\fi}
+
+\parindent=0pt
+
+\onecolumn
+
+\pageoffset{-2.5pc}{0pc}
+
+\begintopmatter
+\title{A test file showing all of the possible font combinations}
+
+\shortauthor{Monthly Notices font test \tface}
+\shorttitle{Monthly Notices font test \tface}
+\maketitle
+
+\overfullrule=0pt
+
+\loadboldmathnames
+
+% not available in sub, sub sub and super, super super script:
+% \it, \sl, \tt, \sc and \sf (Computer Modern version)
+
+\def\digs{0123456789}
+\def\testfont#1{%
+ \advance\baselineskip by 5pt
+ {\tenrm #1:}\medskip
+ {$\rm Roman^{\rm Roman^{\rm Roman}}$}\ \
+ {$\bf Boldface^{\bf Boldface^{\bf Boldface}}$}\par
+%
+ \ifCUPmtplainloaded % Times version
+ {$\it Italic^{\it Italic^{\it Italic}}$}\ \
+ {$\sl Slanted^{\sl Slanted^{\sl Slanted}}$}\par
+ {$\tt Typewriter^{\tt Typewriter^{\tt Typewriter}}$}\ \
+ {$\sc Small\ Caps^{\sc Small\ Caps^{\sc Small\ Caps}}$}\par
+ {$\sf Sans\ Serif^{\sf Sans\ Serif^{\sf Sans\ Serif}}$}\par
+ \else
+ {\it Italic}\ \
+ {\sl Slanted}\ \
+ {\tt Typewriter}\par
+ {\sc Small Caps}\ \
+ {\sf Sans Serif}\par
+ \fi
+ %
+ {\textbfit{Bold text italic}%
+ $^{\mathbfit{Bold\ text\ italic^{\mathbfit{Bold\ text\ italic}}}}$}\par
+ {\textbfss{Bold sans-serif}%
+ $^{\mathbfss{Bold\ sans-serif}^{\mathbfss{Bold\ sans-serif}}}$}\par
+ %
+ \ifAMStwofonts
+ Upright math, and others $\upi^{\upi^{\upi}}, \umu^{\umu^{\umu}},
+ \upartial^{\upartial^{\upartial}}, \le^{\le^{\le}}, \ge^{\ge^{\ge}}$
+ \par
+ \fi
+ %
+ {$\cal CALAGRAPHIC^{\cal CALAGRAPHIC^{\cal CALAGRAPHIC}}$}\par
+ {$\bmath{\cal BOLD\ CALAGRAPHIC^{\cal BOLD\ CALAGRAPHIC^{\cal BOLD\ CALAGRAPHIC}}}$}\par
+
+ {$Math\ italic^{Math\ italic^{Math\ italic}}$}\par
+ {$\bmath{Bold\ math\ italic^{Bold\ math\ italic^{Bold\ math\ italic}}}$}\par
+
+ {${\rm Oldstyle}\ \oldstyle \digs^{\oldstyle \digs^{\oldstyle \digs}}$}\par
+ {${\rm Bold\ oldstyle}\ \bmath{\oldstyle \digs^{\oldstyle \digs^{\oldstyle \digs}}}$}\par
+
+ {\rm Math symbols}\ \
+ $\gamma^{\gamma^{\gamma}}\quad \theta^{\theta^{\theta}}
+ \quad \nu^{\nu^{\nu}}\quad \nabla^{\nabla^{\nabla}}$\par
+ {\rm Bold math symbols}\ \
+ $\bgamma^{\bgamma^{\bgamma}}\quad \btheta^{\btheta^{\btheta}}
+ \quad \bnu^{\bnu^{\bnu}}\quad \bnabla^{\bnabla^{\bnabla}}$\par
+% $$
+% \bar x_1-\bar x_2-\left (t_{1-{\alpha\over 2}}
+% \ \times \ s\sqrt{{1\over n_1}+{1\over n_2}}\right )\ {\rm to} \ \bar
+% x_1-\bar x_2+\left (t_{1-{\alpha\over 2}}
+% \times s\sqrt{{1\over n_1}+{1\over n_2}}\right )
+% $$
+% }%
+ Special symbols:
+ $\la$\ $\ga$\ $\getsto$\ $\cor$\ $\lid$\ $\gid$\ $\sol$\ $\sog$\
+ $\lse$\ $\gse$\ $\grole$\ $\leogr$\ $\loa$\ $\goa$\ \sun\ \degr\
+ \diameter\ $\sq$\ \fd\ \fh\ \fm\ \fs\ \fdg\ \fp\ \farcs\ \farcm\
+ \arcsec\ \arcmin\ $\bbbr$ $\bbbm$ $\bbbn$ $\bbbf$ $\bbbh$ $\bbbk$
+ $\bbbp$ $\bbbone$ $\bbbc$ $\bbbq$ $\bbbt$ $\bbbs$ $\bbbz$\par
+ %
+ \ifCUPmtplainloaded
+ \Half
+ \noindent (Monotype Times version only)\par
+ \noindent AMS symbol fonts:
+ $\boxplus$, $\boxtimes$, $\blacksquare$, $\centerdot$, $\lozenge$,
+ $\blacklozenge$, $\yen$, $\checkmark$, $\circledR$, $\maltese$,
+ $\nleqq$, $\ngeqq$,
+ $\precneqq$, $\succneqq$, $\precnapprox$, $\succnapprox$, $\lnapprox$,
+ $\gnapprox$\par
+ \noindent Blackboard Bold: $\Bbb{A}\ldots\Bbb{Z}$\par
+ \fi
+ \Two
+}
+
+
+\eightpoint\testfont{8 point}%
+
+\ninepoint\testfont{9 point}%
+
+\vfil\eject
+
+\tenpoint\testfont{10 point}%
+
+\elevenpoint\testfont{11 point}%
+
+\vfil\eject
+
+\fourteenpoint\testfont{14 point}%
+
+\vfil\eject
+
+\seventeenpoint\testfont{17 point}%
+
+\bye
+
+% end of fonttest.tex
diff --git a/Master/texmf-dist/doc/plain/mnras/mnguide.tex b/Master/texmf-dist/doc/plain/mnras/mnguide.tex
new file mode 100644
index 00000000000..f68e7a06bef
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/mnras/mnguide.tex
@@ -0,0 +1,1988 @@
+% MNGUIDE.TEX
+%
+% Authors' guide for the plain TeX MN macros
+%
+% v1.5 --- released 25th August 1994 (M. Reed)
+% v1.4 --- released 22nd February 1994
+% v1.3 --- released 21st December 1992
+%
+% Copyright Cambridge University Press
+
+% The following line automatically loads the mn macros if you are not
+% using a format file.
+\ifx\mnmacrosloaded\undefined \input mn\fi
+
+% If your system has the AMS fonts version 2.0 installed, MN.tex can be
+% made to use them by uncommenting the line: %\AMStwofontstrue
+%
+% By doing this, you will be able to obtain upright Greek characters.
+% e.g. \umu, \upi etc. See the section on "Upright Greek characters" in
+% this guide for further information.
+
+\newif\ifAMStwofonts
+%\AMStwofontstrue
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%% Macros for this guide %%%%%%%%%%%%%%%%%%%%%%%%%%%
+\makeatletter
+\newskip\ttglue \ttglue=0pt
+
+\chardef\other=12
+\def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other
+ \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other
+ \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other
+ \catcode`\_=\other \catcode`\^=\other
+ \obeyspaces \obeylines \tt}%
+{\obeyspaces\gdef {\ }}
+
+\outer\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=0pt%
+ \catcode`\|=0 \rightskip=-5pc \ttfinish}
+
+{\catcode`\|=0 |catcode`|\=\other
+ |obeylines
+ |gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}}
+
+\catcode`\|=\active
+{\obeylines\gdef|{\ttverbatim\spaceskip=\ttglue\let^^M=\ \let|=\endgroup}}
+
+\newdimen\macind \macind=1em % the default indent
+
+\def\beginlines{\par\begingroup\nobreak\Half
+ \leftskip=\macind
+ \parindent=0pt%
+ \nobreak \obeylines \everypar{\strut}%
+}
+\def\endlines{\endgroup\Half\noindent}
+
+\def\hang#1#2{%
+ \par\hangindent=70pt%
+ \advance\hangindent by 1em
+ \noindent\hskip 1em \rlap{\tt #1}\hskip 70pt\relax
+ #2\par%
+}
+
+\def\beginexhang#1{\par\bgroup\let\item=\ex@hang}
+
+\def\ex@hang#1{%
+ \everypar{}\par
+ \Half
+ \everypar{\noindent \ignorespaces}%
+ \noindent %\hskip-\hangindent
+ \boxw{\tt\char"5C #1}\quad\ignorespaces
+}
+
+\def\endexhang{\par\egroup\Half}
+
+\def\beginquote{\bgroup\par\Half\leftskip=2em \rightskip=2em
+ \eightpoint\noindent\ignorespaces}
+\def\endquote{\par\Half\egroup\noindent}
+
+\newdimen\fboxrule \fboxrule=.4pt
+\newdimen\fboxsep \fboxsep=3pt
+\newdimen\tempdimA
+\newbox\BoxA
+
+\newif\ifnocr
+\def\boxw#1{{\global\nocrtrue \fboxsep=2pt \boxit{#1}}}
+
+\long\def\boxit#1{%
+ \setbox\BoxA=\hbox{\kern\fboxsep #1\kern\fboxsep}%
+ \tempdimA=\fboxrule
+ \advance\tempdimA by \fboxsep
+ \advance\tempdimA by \dp\BoxA
+ \noindent \hbox{\lower\tempdimA
+ \hbox{%
+ \vbox{%
+ \hrule height \fboxrule
+ \hbox{%
+ \vrule width \fboxrule \hskip-\fboxrule
+ \vbox{\vskip\fboxsep \box\BoxA\vskip.5\fboxsep}%
+ \hskip -\fboxrule \vrule width \fboxrule
+ }%
+ \hrule height \fboxrule
+ }%
+ }%
+ }%
+ \ifnocr \global\nocrfalse\else \par\medskip\noindent\ignorespaces\fi
+}
+
+\def\multi{\vbox\bgroup\advance\hsize by -2\fboxsep \def\\{\hfil\break}}
+\def\endmulti{\egroup}
+
+\def\Notes{%
+ \if@nobreak \everypar{}\half \else \addpen{\gds@cbrk}\addvspace{\half}\fi
+ \noindent\@nohdbrk {\em Notes}\par
+ \nobreak \vskip\half \nobreak \@noafterindent
+}
+
+
+\def\LaTeX{La\TeX}
+\makeatother
+%%%%%%%%%%%%%%%%%%%%%% End of macros for guide %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\ifCUPmtplainloaded \else
+ \NewTextAlphabet{textbfit} {cmbxti10} {}
+ \NewTextAlphabet{textbfss} {cmssbx10} {}
+ \NewMathAlphabet{mathbfit} {cmbxti10} {} % for math mode
+ \NewMathAlphabet{mathbfss} {cmssbx10} {} % " " "
+ %
+ \ifAMStwofonts
+ %
+ \NewSymbolFont{upmath} {eurm10}
+ \NewSymbolFont{AMSa} {msam10}
+ \NewMathSymbol{\upi} {0}{upmath}{19}
+ \NewMathSymbol{\umu} {0}{upmath}{16}
+ \NewMathSymbol{\upartial}{0}{upmath}{40}
+ \NewMathSymbol{\leqslant}{3}{AMSa}{36}
+ \NewMathSymbol{\geqslant}{3}{AMSa}{3E}
+ \let\oldle=\le \let\oldleq=\leq
+ \let\oldge=\ge \let\oldgeq=\geq
+ \let\leq=\leqslant \let\le=\leqslant
+ \let\geq=\geqslant \let\ge=\geqslant
+ \else
+ \def\umu{\mu}
+ \def\upi{\pi}
+ \def\upartial{\partial}
+ \fi
+\fi
+
+% Marginal adjustments using \pageoffset maybe required when printing
+% proofs on a Laserprinter (this is usually not needed).
+% Syntax: \pageoffset{ +/- hor. offset}{ +/- vert. offset}
+% e.g. \pageoffset{-3pc}{-4pc}
+
+\pageoffset{-2.5pc}{0pc}
+
+\loadboldmathnames
+
+\begintopmatter % start the two spanning material
+
+\title{Monthly Notices of the Royal Astronomical Society:\hfil\break
+ plain \TeX\ style guide for authors}
+\author{M. A. Reed}
+\affiliation{Cambridge University Press, Shaftesbury Road,
+ Cambridge CB2 2BS}
+
+\shortauthor{M. A. Reed}
+\shorttitle{Monthly Notices: plain \TeX\ guide for authors}
+
+\acceptedline{Accepted 1993 December 11. Received 1993 March 17}
+
+\abstract {This guide is for authors who are preparing papers for the
+Monthly Notices of the Royal Astronomical Society using the
+Monthly Notices plain \TeX\ macros.}
+
+\keywords {Plain \TeX, {\tt mn.tex} -- sample text -- user guide.}
+\pagerange{1--13}%%
+\pubyear{1994}
+
+\maketitle
+
+% Start of main text
+
+\section{Introduction}
+
+In addition to the standard submission of hardcopy from authors,
+Monthly Notices accepts machine-readable forms of papers in \TeX.
+The layout design for Monthly Notices has been implemented as a
+\TeX\ format. This guide is not a substitute for the \TeX\ manual
+itself. Authors planning to submit their papers in \TeX\ are advised
+to use |mn.tex| as early as possible in the creation of their files.
+
+
+\subsection{The MN macros}
+
+MN is a set of plain \TeX\ macros for the Monthly Notices design,
+incorporating both the single- and double-column formats.
+MN.STY is the corresponding \LaTeX\ style file.
+The MN design package consists of the following files; do not edit these
+files in any way.
+\Half
+\hang{MN.TEX} {the macro definitions}
+\hang{MNGUIDE.TEX} {the input file for this guide}
+\hang{MNSAMPLE.TEX} {the input file for a sample article}
+\hang{MNLAND.TEX} {a landscape figure for use with the sample article}
+\hang{FONTTEST.TEX} {a file to test all of the fonts used in MN}
+\Half
+\noindent The input files for the guide, sample pages, landscape sample and
+fonttest automatically call in the MN macros if you haven't preloaded them
+by using a format file.
+Therefore, this guide can be typeset by typing: |tex MNGUIDE|, or
+|tex &mn MNGUIDE|.
+
+When your article is printed in the Monthly Notices journal, it is typeset
+in Monotype Times. As most authors do not have this font, it is likely that
+the make-up will change with the change of font. For this reason, we ask
+you to ignore details such as slightly long lines, page stretching, or
+figures falling out of synchronization, because these details can be dealt with at a later stage.
+
+
+\subsection{General style issues}
+
+For general style issues, authors are referred to the `Instructions for
+Authors' on the inside back cover of Monthly Notices. Authors who are
+interested in the details of style are referred to Butcher (1992) and
+The Chicago Manual (1982). The language of the journal is British
+English and spelling should conform to this.
+
+
+\subsection{Submission of \TeX\ articles to the journal}
+
+Authors are urged to state that electronic submission is intended when
+first submitting their paper. Papers should initially be submitted in the
+usual way to the Executive Secretary, Royal Astronomical Society, Burlington
+House, London W1V~0NL, as set out on the inside front cover of each issue
+of Monthly Notices. Three hard copies should be supplied. One of these
+copies should be single-sided and double-spaced throughout, while the other
+two should be weight-reduced, by being either single-spaced or double-sided.
+Note that articles, or revised versions thereof, may not be submitted by
+electronic mail. Appropriate gaps should be left for figures, original
+versions and copies of which should also be supplied. Authors should ensure
+that their figures are suitable (in terms of lettering, size, etc.) for the
+reduction they intend.
+
+Authors who wish to include PostScript artwork dir\-ectly into their
+articles can do so, by using either Tomas Rokicki's {\sf EPSF} macros
+or Trevor Darrell's {\sf PSFIG} macros (both of which are supplied with
+the DVIPS PostScript driver). Please remember to supply any additional
+figure macros you use with your article.
+Please also supply hard copies of your figures, for the use of production
+editors and as a back-up.
+Authors should not attempt to
+use implementation specific |\special|'s directly.
+
+The correct Monthly Notices House
+Style should be used -- details are given in the Instructions for Authors,
+in the Style Guide published in the 1~January 1993 issue (\hbox{MNRAS},
+260,~1), and in Appendix C of this guide.
+No disk should be submitted at this initial stage. When the paper has been
+accepted, the double-spaced copy will be marked up by the subeditors at
+Blackwell Science (BS) and returned to you for correction.
+When the requested corrections have been made, you should send the following
+material to BS:
+\beginlist
+\item (i) a 3.5-inch or 5.25-inch disk for PC (double or high density or
+Apple Mac), containing the {\em corrected\/} version of the paper; the file
+for the final version should be text-only, with no source-dependent control
+codes (i.e. an ASCII file);
+
+\item (ii) two hard copies of the corrected version, plus the original
+marked up copy of the article; {\em any further author corrections should
+be clearly indicated on the latter\/};
+
+\item (iii) a signed statement that the revised hard copy and the disk do
+indeed correspond.
+\endlist
+In addition, you should submit the following information concerning the disk
+and its contents:
+\beginlist
+\item (i) the disk format (e.g. PC 360k);
+
+\item (ii) how many files the disk contains, their names, a description of
+the file contents and the number of pages each file will produce when
+printed; details of any user-defined macros;
+
+\item (iii) the computer system and implementation of \TeX\ used (e.g.
+IBM~PC-386, PC\TeX~v3.14).
+\endlist
+Unless the layout of the paper has to be significantly changed by the
+typesetter (for example, if the gaps left for figures are not suitable), it
+will not be necessary to send you a typeset proof to check, as the paper
+will be set directly from your submitted disk. However, you should note
+that, if serious problems are encountered with the coding of your paper
+(missing author-defined macros, for example), it may prove necessary to
+divert the paper to conventional typesetting.
+
+
+\section{General instructions for installation}
+
+The simplest way to use this macro package is to copy the above files into a
+suitable directory or work area on your computer. Write your
+article using the macros described below (or use the sample article as a
+template) and ensure that the following is included at the very beginning of your input file:
+\beginlines
+|\ifx\mnmacrosloaded\undefined \input mn\fi|
+\endlines
+
+When you typeset your article using |tex <article file name>| the macro
+definitions will be loaded automatically before your text is processed.
+This will happen rather slowly on a small computer and you may find it much
+faster to work with the \TeX\ format file for the MN macros.
+This can be created by using the program INITEX:
+\beginlines
+|initex &plain mn|
+\endlines
+This usage of this command will vary from one installation of \TeX\ to
+another. In {\sc Unix} implementations of \TeX\ the `|&|' character must
+be `escaped' with a `|\|` because it is a magic character,
+e.g. |initex \&plain mn|.
+In PC\TeX\ you type the following (seek local advice if you
+are not sure how to use INITEX on your system):
+\beginlines
+|tex &plain mn /i|
+\endlines
+
+When the process is complete type |\dump| at the \TeX\ prompt.
+This creates the format file |MN.FMT|. Type the following command to
+typeset your article:
+\beginlines
+|tex &mn <article file name>|
+\endlines
+\TeX\ will process your article at high speed.
+
+
+\subsection{The font test and sample pages}
+
+Once you have installed the MN macros, run the following test. The file
+|FONTTEST.TEX| produces a sample of each font size used in the MN design.
+To use this do |tex FONTTEST| or |tex &mn FONTTEST| (after creating the
+|MN.FMT| format file).
+Preview the resulting |DVI| file on-screen and generate hard copy output on
+your facilities. It will show you whether any of the fonts selected by the
+Monthly Notices design are going to cause problems on your system.
+
+As a final test of the installation, typeset the sample article, using
+|tex MNSAMPLE| or |tex &mn MNSAMPLE|.
+Use this article in conjunction with the instructions in this guide to
+work out how to typeset an article for Monthly Notices.
+
+
+\subsubsection{Page margins}
+
+Some \TeX\ sites may find that pages from the MN design are positioned
+incorrectly on the paper from local laserprinters. This can be corrected by the
+use of the |\pageoffset| macro. It takes two parameters, the first being
+the horizontal offset, the second the vertical offset, e.g.
+\beginlines
+|\pageoffset{-1pc}{2pc}|
+\endlines
+The above example will shift the output one pica to the left, and two picas
+down the page. Usually there is no need to use this macro; only use it if
+required.
+
+
+\subsubsection{Author macro names}
+
+For efficiency, some authors may wish to write their own macros. Those who
+intend to do this will be aware of the problem of creating unique
+identifiers (macro names). The most common way around this problem has been
+to include |@| somewhere in the identifier, e.g. |\@utput| or |\sec@tion|.
+Knuth, the creator of \TeX, has adopted this method in the plain \TeX\
+definitions and it can also be found in other format packages such as
+\LaTeX.
+
+However, use of this method can cause problems if the internals of plain
+\TeX\ or the MN macros get `over-ridden'. There is a simpler method which is
+much safer. Simply prefix your macro names with your initials,
+e.g.\ |\MARmacro|.
+
+
+\section{The design macros}
+
+Refer to the source code of the sample pages for examples of the following
+design macros in use. It is very important that the article should end
+with a |\bye| as this typesets `This paper$\ldots$' at the very end.
+
+
+\subsection{Article opening}
+
+There are certain macros that should appear near the top of your input file.
+The following is the recommended way to begin your article.
+%
+\beginexhang{begintopmatter}
+\item{onecolumn} Selects single-column output (default = two-column).
+ The |\onecolumn| command {\em must\/} be used before |\begintopmatter|
+ for the article opening to work correctly.
+
+ You should not use |\onecolumn| unless your article has a high
+ mathematical content which won't fit into the two-column measure easily.
+ Selection of one-column output also affects the actions of other macros,
+ particularly those controlling figures and tables.
+
+\item {Referee} This selects referee mode (double spaced) if required
+ (default = not selected). Figure captions and Tables are not double
+ spaced by this option.
+
+\item {authorcomment} This creates a catchline at the bottom of the page
+ which authors may wish to use to keep track of the versions of their
+ article.
+
+\item {begintopmatter} This macro should be used just before defining the
+ article title and author names. If you omit this macro \TeX\ will
+ complain loudly when it reaches the |\maketitle| macro.
+
+\item {title} Set the article title, e.g.
+\beginlines
+|\title{Dust envelopes around RV Tauri stars}|
+\endlines
+
+\item {author} Set the article author(s), e.g.
+\beginlines
+|\author{A. V. Raveendran}|
+\endlines
+
+\item {affiliation} Set the author affiliation(s), e.g.
+\beginlines
+|\affiliation{Indian Institute of Astrophysics..}|
+\endlines
+Multiple author names should be set as follows. Do not use
+`\&' between names, always use `and'. Each author name is
+listed, followed by a reference mark (usually a superscripted
+number). The reference mark refers to each author's
+respective affiliations in a list which follows afterwards.
+For example,
+\beginlines
+\vbox{%
+|\author{A.~Moorhouse,$^{1,2}$|
+| P.~W.~J.~L.~Brand,$^1$|
+| T.~R.~Geballe$^3$ and M.~G.~Burton$^4$}|
+|\affiliation{$^1$ Department of Astronomy, ...}|
+|\affiliation{$^2$ Present address: Dublin|
+| Institute for ...}|
+|\affiliation{$^3$ Joint Astronomy Centre ...}|
+|\affiliation{$^4$ NASA Ames Research Center ...}|
+}%
+\endlines
+Note that the `present address' in
+the above example is treated as though it were an affiliation. Similarly,
+fellowships or other posts, for example `Visiting Observer, Mount John
+University Observatory \dots' should be listed in the acknowledgments.
+
+\item {shortauthor} Define the even-page running head.
+\beginlines
+|\shortauthor{R. A. Stathakis and E. M. Sadler}|
+\endlines
+Initials only should be used in running heads; use `and',
+not~`\&', to separate the final two names. When there is a
+long list of authors (four or more) use the form
+\beginlines
+|\shortauthor{D.~T.~Wickramasinghe et al.}|
+\endlines
+
+\item {shorttitle} Define the odd-page running head.
+\beginlines
+|\shorttitle{The H\,{\eightit I} spectra}|
+\endlines
+Notice the use of the |\,| (thinspace) after the `H' in the above example.
+The |\eightit| simulates the effect of an italic small-caps.
+If you require roman (upright) text in the short-title, say for `IRAS',
+you would use:
+\beginlines
+|\shorttitle{...{\rm IRAS}...}|
+\endlines
+It may also be necessary to add an italic correction |\/| before the |\rm|
+to improve the spacing.
+
+\item {abstract} Set the abstract information, e.g.
+\beginlines
+|\abstract {This is the text of the abstract ...}|
+\endlines
+This design macro requires that the text (which can be
+longer than one paragraph) is enclosed in braces.
+The abstract must fit on to the
+first page of the article when typeset.
+
+\item {keywords} Set any article key words, e.g.
+\beginlines
+|\keywords {circumstellar matter|
+| -- infrared: stars.}|
+\endlines
+The same applies for |\keywords| as for the |\abstract| macro.
+
+\item {maketitle} This macro must be used just before the first section
+ or the first text paragraph.
+\endexhang
+
+
+\subsection{Headings}
+
+Some headings are capitalized. Where this is true the design macro will
+automatically capitalize whatever you key. As a rule, it is advisable to
+capitalize the first letter, and any words that normally start with a capital,
+i.e. proper nouns, abbreviations, but key all other words in lower case.
+
+The |\section|, |\subsection| and |\subsubsection| mac\-ros are
+automatically numbered. To produce unnumbered headings, `star' forms of
+these macros exist, e.g. |\section*|.
+%
+\beginexhang{subsubsection}
+\item {section} Start a new section, e.g.
+\beginlines
+|\section{Introduction}|
+\endlines
+For main section headings such as `Acknowledgments' and
+`References' use the |\section*| macro, e.g.
+\beginlines
+|\section*{Acknowledgments}|
+\endlines
+The |\section| command is also used to produce appendices
+(see Subsection~3.11 for more information).%%
+
+\item {subsection} Start a new subsection, e.g.
+\beginlines
+|\subsection{Colour--colour diagram}|
+\endlines
+
+\item {subsubsection} Start a new subsubsection, e.g.
+\beginlines
+|\subsubsection{Correlation with subgroups}|
+\endlines
+
+\item {paragraph} Start a new subsubsubsection, e.g.
+\beginlines
+|\paragraph{Correlation with subgroups.} Text|
+| runs on after heading...|
+\endlines
+It is important to note that text runs on after a
+|\paragraph|. There should be no break between this heading
+and the next paragraph.
+\endexhang
+
+\noindent The macro |\section| forces the text of the heading into upper
+case, and |\subsection| emboldens the text. When headings contain names
+with lowercase or small capital letters, place these letters in the
+argument of |\lowercase|, e.g.
+\beginlines
+|N\lowercase{a}\,{\sixbf I}/%|
+|C\lowercase{a}\,{\sixbf II}|
+\endlines
+to get `\dots\ {\bf Na\,{\sixbf I}/Ca\,{\sixbf II}}\ \dots' in a section
+heading. The |\sixbf| commands produce a simulated bold small-caps.
+This technique can also be applied to the running heads; see the example in
+|\shorttitle|.
+
+The paragraph indent on any text following a |\section|, |\subsection|
+or |\subsubsection| is automatically removed by the macros.
+
+
+\subsection{Lists}
+\subsubsection{Numbered lists}
+
+Numbered lists are keyed in a simple and straightforward way. They begin
+with a |\beginlist| command. Each item is marked with |\item| with its
+number (in round braces) followed by the text for the item. The number
+should be in lower case roman numerals. The list is ended with |\endlist|.
+For example,
+\beginlines
+|\beginlist|
+|\item (i) the attenuated and diluted stellar|
+| radiation;|
+|\item (ii) scattered radiation, and|
+|\item (iii) reradiation from other grains.|
+|\endlist|
+\endlines
+
+\Notes
+
+\beginlist
+\item (i) Extra white space is automatically added above and below the list.
+\item (ii) Outside the scope of the |\beginlist| and |\endlist| commands the
+ |\item| command reverts to its plain \TeX\ definition. Don't use the
+ plain \TeX\ |\item| command on its own, as the spacing and indents will
+ be incorrect.
+\item (iii) The paragraph indentation on the first paragraph following the
+ |\endlist| command is removed automatically if you leave no blank
+ line between the |\endlist| and the text.
+\endlist
+
+
+\subsubsection{Unnumbered lists}
+
+These should be keyed in the same way as numbered lists (described above),
+except that each item in the list has no number in round braces.
+
+
+\subsection{Illustrations (or figures)}
+
+Figures should be keyed as follows:
+\beginlines
+|\beginfigure{|{\em n\/}|}|
+| \vskip 3cm|
+| \caption{{\bf Figure |{\it f}|.} An example figure in|
+| which space has been left for the artwork.}|
+|\endfigure|
+\endlines
+Figure captions should be below the figure itself, therefore
+the |\caption| command should appear after the figure or space
+left for an illustration.
+The {\em n\/} value is the logical figure number. This number determines
+the output order of the figure (in two-column mode).
+It must start at~1 and increase with each successive figure.
+\beginfigure{1}
+ \vskip 3cm
+ \caption{{\bf Figure 1.} An example figure in which space has been
+ left for the artwork.}
+\endfigure
+The |\caption| macro is only valid in the scope of
+|\beginfigure|$\ldots$|\endfigure|.
+
+The example above will produce a single-column figure in two-column mode.
+To produce a double-spanning figure use:
+\beginlines
+|\beginfigure*{|{\em n\/}|}|
+| |$\ldots$
+| \caption{|$\ldots$|}|
+|\endfigure|
+\endlines
+Notice that |\beginfigure*| ends with |\endfigure|. If the text in the
+caption is less than one line long it is centred automatically, otherwise
+it is set full-out.
+
+\Notes
+
+\beginlist
+\item (i) If there is more than one figure panel to a caption, the depth
+ value should increase by 13pt (4.5mm) for every extra figure (if they are
+ one above another). This allows for a gap between each figure panel.
+
+\item (ii) If a figure occupies one complete page, insert a depth that does
+ not completely fill the page, otherwise the figure may be output at the
+ end of the paper (or not at all)!
+\endlist
+
+See `Instructions for Authors' in Monthly Notices for submission of
+artwork.
+
+\subsubsection{Points to note for figures in one-column articles}
+
+\beginlist
+\item (i) All figures (and their captions) will be set to full width even
+ if they are keyed using |\beginfigure|$\ldots$|\endfigure|.
+ Captions shorter than one line will be centred as normal.
+
+\item (ii) The logical figure number is ignored in one-column mode.
+ Therefore the figures are output in the order in which they appear in
+ the source.
+
+\item (iii) If a figure is placed very early in the source code,
+ it is possible for it to float to the top of the first page
+ (above the title). In this case, move the figure one paragraph down and
+ try again. It may be necessary to do this with other figures to keep the
+ output order correct.
+\endlist
+
+
+\subsection{Tables}
+
+Tables should be keyed something like this:
+\beginlines
+|\begintable{|{\em n\/}|}|
+| \caption{{\bf Table |{\em t\/}|.} |$\ldots$|}|
+| \halign{| $<$alignment$>$ |}|
+| \tabletext{| text below table, table footnotes, etc. |}|
+|\endtable|
+\endlines
+The {\em n\/} value is the logical table number, and {\em t\/} is the
+table number. The logical table number determines the output order of the
+table (in two-column mode).
+It must start at~1 and increase with each successive table.
+
+The table caption should appear before the body of the table.
+The |\tabletext| macro is provided for table notes, and table footnotes.
+It can contain more than one paragraph of text. Ten points of space are
+automatically added above |\tabletext|. Only one |\tabletext| is allowed
+per table. The usage of |\tabletext| is optional.
+
+If you wish to insert non-aligned text into the body of the alignment do
+not use |\noalign{|{\em text\/}|}| as this will make the table appear to
+be full width to the macros, resulting in the table being set flush left.
+In this case you can either use |\multispan| or use
+|\noalign{\hbox{|{\em text\/}|}}|.
+
+The caption, and any text below the table will be set to the table
+width, when the table is centred by the macros.
+The |\caption| and |\tabletext| macros are only valid in the scope of the
+|\begintable|$\ldots$|\endtable|.
+
+Table~1 is produced with the following code:
+\beginlines
+|\begintable{1}|
+| \caption{{\bf Table 1.} Radio-band beaming|
+| model parameters for FSRQs and BL Lacs.}|
+| \halign{#\hfil & \quad \hfil#\hfil\quad &|
+| \hfil#\hfil\quad & \hfil#\hfil\quad &|
+| \hfil#\hfil\quad & \hfil#\hfil\quad &|
+| \hfil#\hfil\cr|
+| Class & $\gamma_1$ & $\gamma_2$ & $\langle|
+| \gamma \rangle$ & $G$ & $f$|
+| & $\theta_{\rm c}$ \cr|
+| BL Lacs & 5 & 36 & 7 & $-4.0$ & $1.0\times|
+| 10^{-2}$ & 10$^\circ$ \cr|
+| FSRQs & 5 & 40 & 11 & $-2.3$ & $0.5\times|
+| 10^{-2}$ & 14$^\circ$ \cr|
+| }|
+| \tabletext{{\em G} is the slope of the Lorentz|
+| factor distribution, i.e. $n(\gamma)\propto|
+| \gamma^G$, extending between $\gamma_1$|
+| and $\gamma_2$, with mean value $\langle|
+| \gamma\rangle$, {\em f\/} is the ratio|
+| between the intrinsic jet luminosity and the|
+| extended, unbeamed luminosity, while|
+| $\theta_{{\rm c}}$ is the critical angle|
+| separating the beamed class from the parent|
+| population.}|
+|\endtable|
+\endlines
+
+\begintable{1}
+ \caption{{\bf Table 1.} Radio-band beaming model parameters
+ for FSRQs and BL Lacs.}
+ \halign{#\hfil&\quad \hfil#\hfil\quad& \hfil#\hfil\quad&
+ \hfil#\hfil\quad& \hfil#\hfil\quad& \hfil#\hfil\quad&
+ \hfil#\hfil\cr
+ Class & $\gamma_1$ & $\gamma_2$ & $\langle \gamma \rangle$ & $G$ & $f$
+ & $\theta_{\rm c}$ \cr
+ BL Lacs & 5 & 36 & 7 & $-4.0$ & $1.0\times 10^{-2}$ & 10$^\circ$ \cr
+ FSRQs & 5 & 40 & 11 & $-2.3$ & $0.5\times 10^{-2}$ & 14$^\circ$ \cr
+ }
+ \tabletext{{\em G} is the slope of the Lorentz factor distribution, i.e.
+ $n(\gamma)\propto \gamma ^G$, extending between $\gamma _1$ and
+ $\gamma_2$, with mean value $\langle \gamma \rangle$, {\em f\/} is the
+ ratio between the intrinsic jet luminosity and the extended, unbeamed
+ luminosity, while $\theta_{{\rm c}}$ is the critical angle separating
+ the beamed class from the parent population.}
+\endtable
+
+\noindent The example above will produce a single-column table in two-column
+mode. To produce a double-spanning table use:
+\beginlines
+|\begintable*{|{\em n\/}|}|
+| \caption{|$\ldots$|}|
+| \halign{|$\ldots$|}|
+| \tabletext{|$\ldots$|}|
+|\endtable|
+\endlines
+Notice that |\begintable*| ends with |\endtable|.
+
+Tables are allowed to have single horizontal rules, at the head
+and foot only. Horizontal rules should have 3pt of space above and below
+them. Vertical rules should not be used.
+
+If a table occupies one complete page, you may find it necessary to reduce
+its depth slightly, so that it doesn't completely fill the page, otherwise
+the table may be output at the end of the paper (or not at all)!
+
+
+\subsubsection{Points to note for tables in one-column articles}
+
+\beginlist
+\item (i) Tables that will fit into a column in two-column mode will be
+ centred on the full page width in one-column mode.
+
+\item (ii) The logical table number is ignored in two-column mode.
+ Therefore the tables are output in the order in which they appear in
+ the source.
+
+\item (iii) If a table is placed very early in the source code,
+ it is possible for it to float to the top of the first page
+ (above the title). In this case, move the table one paragraph down and
+ try again. It may be necessary to do this with other tables to keep the
+ output order correct.
+\endlist
+
+
+\subsection{Captions for continued figures and tables}
+
+If a very large figure or table does not fit on one page,
+it must be split into two floats; the second float should use a
+continued caption in the form:
+\smallskip
+\centerline{{\bf Figure 6} -- {\it continued}}
+\smallskip
+\noindent The figure or table number in the continued caption should be
+the same as in the original caption. These captions should be keyed as
+follows:
+\beginlines
+|\begintable{|{\it n\/}|}|
+| \caption{{\bf Table |{\it t\/}|} -- {\it continued}}|
+| :|
+|\endtable|
+\endlines
+Notice that there is no full-point after the figure/table number.
+
+
+\subsection{Landscape pages}
+
+If a table or illustration is too wide to fit the standard measure, it
+must be turned, with its caption, through 90 degrees anticlockwise.
+Landscape illustrations and/or tables cannot be produced directly
+using the MN macros because \TeX\ itself cannot turn the
+page, and not all device drivers provide such a facility.
+
+The first step is to produce blank pages (with a running head) in the
+output, so that the landscape material can be pasted in later. How
+this is done depends on whether your article is in one or two columns.
+
+For one-column articles use the following:
+\beginlines
+|\pageinsert|
+| \vfil\centerline{{\bf Figure |{\em f\/}|.} Landscape|
+| figure to go here.}\vfil|
+|\endinsert|
+\endlines
+otherwise use
+\beginlines
+|\beginfigure*{|{\em n\/}|}|
+| \vbox to 646pt{\vfil \caption{{\bf Figure |{\em f\/}|.}|
+| Landscape figure to go here.}\vfil}|
+|\endfigure|
+\endlines
+for two-column articles. You may find it necessary to move the above code
+up or down the source code until the blank page appears on the page after
+the first reference.
+
+Next create a separate document containing the command |\landscape| near
+the top (or use |mnland.tex| as a template).
+In this file include the complete tables and illustrations (with captions)
+using the figure and table macros provided, remembering to number the
+captions in the correct sequence, e.g.
+\ifCUPmtplainloaded \else \eject\fi %%
+\beginlines
+|\ifx\mnmacrosloaded\undefined \input mn\fi|
+\smallskip
+|% use the following if your driver supports it|
+|% \special{landscape}|
+\smallskip
+|% you may require \pageoffset for landscape|
+|% \pageoffset{0pc}{-1.5pc}|
+\smallskip
+|\landscape|
+|\authorcomment{Landscape material to be pasted|
+| into the article.}|
+\smallskip
+|\begintopmatter|
+|\maketitle|
+\smallskip
+|\beginfigure{1}|
+|\caption{{\bf Figure 4.} Photometric|
+| comparisons |$\ldots$|}|
+|\endfigure|
+\smallskip
+|:|
+\smallskip
+|\bye|
+\endlines
+Once you have successfully processed the new file with the MN macros, you
+can pass the resulting output through your dvi printer driver. Because the
+output of the MN macros is wider than it is deep, the page has to be printed
+landscape on your output device.
+
+Some dvi printer drivers will understand the `landscape' |\special| command
+and will automatically rotate the output, while others need to be told from
+the command line. Consult your local documentation if you don't know how to
+do this.
+
+
+\subsection{Plate pages}
+
+These are provided for tip-in plates, and should only be used for
+these. The plate page macros create a blank page with a special running
+head; its contents can be set using the |\plate| command. The text in the
+head should be keyed as shown below. The {\em no\/} and {\em vol\/}
+numbers will be determined by the typesetter.
+\beginlines
+|\beginplatepage|
+| \plate{Opposite p.~|{\em no\/}|, MNRAS, {\bf |{\em vol\/}|}}|
+| \caption{{\bf Figure |{\em f\/}|.} |$\ldots$|}|
+|\endplatepage|
+\endlines
+If the plate is a `landscape' plate its caption (if any) should be set
+using a separate `landscape' file (as described above). If the plate is
+to be placed `portrait' its caption can be set by using the |\caption|
+command as shown above. The style of the caption should be the same as for
+normal figure captions. If the plate fills most of the page, it is advisable
+to place the caption at the very bottom of the page -- this can be achieved
+by using |\vfill| above the caption.
+
+Plate pages will always appear on the page following the one on which the
+|\endplatepage| command is encountered. At present it is impossible to have
+two plate pages side by side, since there must be at least one page between
+them. If a new plate page is started before a previous one is output the
+first plate page is lost.
+
+
+\subsection{Footnotes}
+
+Footnotes are only available in the one-column format. They should be
+keyed in the standard plain \TeX\ way using |\footnote|, e.g.
+\beginlines
+|text\footnote {|{\em symbol\/}|}{|{\em footnote text}$\ldots$|} text|
+\endlines
+where {\em symbol\/} should be in the sequence:
+$\star$ (|\star|), \dag, \ddag, \S, \P, $\|$, $\star\star$ (|\star\star|),
+\dag\dag, \ddag\ddag, \S\S, \P\P, $\|\|$.
+The |\footnote| command should only be used for footnotes in the main text.
+
+
+\subsection{Bibliography}
+
+References to published literature should be quoted in text by author
+and date: e.g.\ Draine (1978) or (Begelman, Blandford \& Rees 1984).
+Where more than one reference is cited having the same author(s) and date,
+the letters a,b,c, $\ldots$ should follow the date: e.g.\ Smith (1988a),
+Smith (1988b), etc.
+
+
+\subsubsection{References in the text}
+
+References in the text are given by author and date, and, whichever
+method is used to produce the bibliography, the references in the text
+are done in the same way.
+When you introduce a three-author paper, you should list all
+three authors at the first citation, and thereafter use et al.
+
+\subsubsection{The list of references}
+
+The following listing shows how references should be keyed in the style of
+the journal.
+\beginlines
+|\section*{References}|
+\smallskip
+|\beginrefs|
+|\bibitem Butcher J., 1992, Copy-editing:|
+| The Cambridge Handbook, 3rd edn.|
+| Cambridge Univ. Press, Cambridge|
+|\bibitem The Chicago Manual of Style, 1982.|
+| Univ. Chicago Press, Chicago|
+|\bibitem Blanco P., 1991, PhD thesis,|
+| Edinburgh University|
+|\bibitem Brown A. B., Jones C. D., 1989,|
+| in Robinson E. F., Smith G. H., eds,|
+| Proc. IAU Symp. 345, Black Dwarfs.|
+| Kluwer, Dordrecht, p. 210|
+|\bibitem Edelson R. A., 1987, ApJ, 313, 651|
+|\bibitem Lamport L., 1986, \LaTeX: A Document|
+| Preparation System. Addison--Wesley,|
+| New York|
+|\bibitem Mirabel I. F., Sanders D. B., 1989,|
+| ApJ, 340, L53|
+|\bibitem Misner C. W., Thorne K. S.,|
+| Wheeler J. A., 1973, Gravitation.|
+| Freeman, San Francisco|
+|\bibitem Sopp H. M., Alexander P., 1991,|
+| MNRAS, 251, 112|
+|\bibitem Stella L., Campana S., 1991, in|
+| Treves A., Perola G. C., Stella L., eds,|
+| Iron Line Diagnostic in X-ray Sources.|
+| Springer--Verlag, Berlin, p. 230|
+|\endrefs|
+\endlines
+The following rules apply for the ordering of your references:
+\beginlist
+\item (i) if an author has written several papers, some with other authors,
+ the rule is that the single-author papers precede the two-author
+ papers, which, in turn, precede the multi-author papers;
+\item (ii) within the two-author paper citations, the order is determined
+ by the second author's surname, regardless of date;
+\item (iii) within the multi-author paper citations, the order is
+ chronological, regardless of author surnames.
+\endlist
+
+\Notes
+
+\beginlist
+\item (i) The |\bibitem| command is undefined unless it is used in the
+ scope of the |\beginrefs|$\ldots$|\endrefs|.
+\item (ii) Bibliographical items can be longer than one paragraph.
+\item (iii) The paragraph indentation on the first paragraph following the
+ |\endrefs| command is removed automatically if you leave no blank
+ line between the |\endrefs| and the text.
+\endlist
+
+
+\subsection{Appendices}
+
+The appendices section of your article should start with a |\appendix|,
+after which each |\section| starts a new appendix. For example,
+\beginlines
+|\appendix|
+|\section{for authors}|
+\endlines
+will yield:\par
+\smallskip
+\centerline{\bf APPENDIX A:\enskip FOR AUTHORS}\par
+\smallskip
+\noindent The |\appendix| macro should only be used once.
+
+If the appendix has no subtitle, the parameter to the |\section| command
+should be left empty. For example,
+\beginlines
+|\section{}|
+\endlines
+will produce:\par
+\smallskip
+\centerline{\bf APPENDIX B}\par
+\smallskip
+\noindent Any subsections or subsubsections in the appendix are
+automatically numbered.
+You should also note that displayed equations in appendices should be
+numbered (A1), (A2) for Appendix A, and (B1), (B2) for Appendix B, etc.
+
+The numbering for displayed equations can be made automatic by using the
+|\stepeq| macros described in Subsubsection~3.13.2.%%
+
+Figures and Tables should also be numbered in a similar way,
+e.g. Fig. A1, A2, Table A1, A2 in appendices.
+
+
+\subsection{Typeface selection}
+
+The normal plain \TeX\ typeface conventions apply. The following faces
+are available as normal: |\rm|, |\it|, |\bf|, |\sl|, |\sf|, |\sc|,
+|\tt|, |\mit|, |\cal| and |\oldstyle|.
+
+Bold versions of |\cal| and |\oldstyle| can be produced in
+combination with |\bmath|. Use of |\bmath| on its own will provide bold
+math italic letters.
+
+A new |\em| command provides {\em emphasis\/} for important words.
+The |\em| command will automatically switch the face of the emphasized
+words to make them stand out. So,
+\beginlines
+|\rm this is an {\em emphasized\/} word.|
+|\it this is an {\em emphasized} word.|
+\endlines
+gives\par
+\centerline{\rm this is an {\em emphasized\/} word.}
+\centerline{\it this is an {\em emphasized\/} word.}
+\Half
+\noindent Notice the use of the italic correction command (|\/|) in the
+above example.
+
+The following are fully loaded in text, script and scriptscript sizes:
+|\rm|, |\bf|, math italic, math symbol, bold math italic and bold symbol.
+The faces |\it|, |\sl|, |\tt|, |\sc| and |\sf| are loaded at text size only.
+See |fonttest.tex| for a better idea of how these work.
+
+
+\subsection{Typesetting mathematics}
+\subsubsection{Displayed mathematics}
+
+Equations should be keyed using normal plain \TeX\ macros.
+Display mathematics are automatically set flush left by the macros.
+The standard plain \TeX\ math commands |\eqalign|, |\eqalignno| will
+work as before. The |\leqalignno| command is switched automatically
+to |\eqalignno| to prevent the equation number from crashing into the
+equation. If you wish to use |\displaylines|, this has to be handled
+in a slightly different way. For example,
+$$
+\displaylines{%
+ \hbox to \hsize{}\cr
+ [\nu_1]-[\nu_2]=-2.5\log [f(\nu_1)/f(\nu_2)],\hfill\stepeq\cr
+ \alpha=-(1+Q)\beta-3,\hfill\stepeq\cr
+ q=2+\gamma -Q.\hfill\stepeq\cr}
+$$
+was produced with:
+\beginlines
+|$$|
+|\displaylines{%|
+| \hbox to \hsize{}\cr|
+| [\nu_1]-[\nu_2]=-2.5\log [f(\nu_1)/f(\nu_2)],|
+| \hfill\stepeq\cr|
+| \alpha=-(1+Q)\beta-3,\hfill\stepeq\cr|
+| q=2+\gamma -Q.\hfill\stepeq\cr}|
+|$$|
+\endlines
+Notice the |\hbox to \hsize{}| to ensure that the equation is set to the
+full width. The |\hfill|'s ensure that the equations are set flush left
+and the equation numbers are set flush right.
+
+If the equations in |\displaylines| are unnumbered, you still need the
+|\hfill|'s to ensure the equations are set flush left.
+
+
+\subsubsection{Automatic equation numbering}
+
+Displayed equations can be numbered automatically by the use of |\stepeq|.
+For example,
+\beginlines
+|$$|
+| \alpha=-(1+Q)\beta-3,\eqno\stepeq|
+|$$|
+\endlines
+which produces:
+$$
+\alpha=-(1+Q)\beta-3,\eqno\stepeq
+$$
+The |\stepeq| macro can be used in any of the places where a equation
+number is normally expected. Sub-equation numbering is also provided,
+allowing equation numbers in the form (2a) to be produced. For example,
+$$
+\eqalignno{%
+ \alpha & =-(1+Q)\beta-3, & \startsubeq\cr
+ q & =2+\gamma -Q. & \stepsubeq\cr
+ [\nu_1]-[\nu_2] & =-2.5\log [f(\nu_1)/f(\nu_2)] & \stepsubeq\cr}
+$$
+was produced by:
+\ifCUPmtplainloaded \else \eject\fi %%
+\beginlines
+|$$|
+|\eqalignno{%|
+| \alpha & =-(1+Q)\beta-3, & \startsubeq\cr|
+| q & =2+\gamma -Q. & \stepsubeq\cr|
+| [\nu_1]-[\nu_2] & =-2.5\log [f(\nu_1)/f(\nu_2)]|
+| & \stepsubeq\cr}|
+|$$|
+\endlines
+The sub-equation number is reset each time a |\stepeq| is used. Equation
+numbering is automatically reset to `(A1)' when a |\appendix| is used.
+
+
+\subsubsection{Bold math italic}
+
+To obtain bold math italic, you should use |\bmath|.
+So to obtain:
+$$
+ d(\bmath{s_{t_u}}) = \langle [RM(\bmath{X_y}
+ + \bmath{s_t}) - RM(\bmath{x_y})]^2 \rangle
+$$
+you would key:
+\beginlines
+|$$|
+| d(\bmath{s_{t_u}}) = \langle [RM(\bmath{X_y}|
+| + \bmath{s_t}) - RM(\bmath{x_y})]^2 \rangle|
+|$$|
+\endlines
+This facility is available in all typesizes.
+
+
+\subsubsection{Bold Greek and other bold symbols}
+
+Bold lowercase Greek characters can be obtained by prefixing
+the normal (unbold) symbol name with a `b', e.g.\ |\bgamma| gives $\bgamma$.
+This rule does not apply to bold |\eta|, as this would lead to a name
+clash with |\beta|. Instead use |\boldeta| for bold eta. Note that there
+is no |\omicron| (so there is no |\bomicron|), just use `o' in math mode
+for omicron and `|\bmath{o}|' for bold omicron.
+
+Bold versions of most of the other symbols in appendix~F in the \TeX book
+can be obtained in the same way.
+
+For bold uppercase Greek, prefix the unbold character name with |\bf|,
+e.g.\ |\bf\Gamma| gives $\bf\Gamma$.
+Upper and lowercase Greek characters are available in all typesizes.
+
+You can then use these definitions in math mode, as you would normal Greek
+characters:
+%
+\beginlines
+|$$|
+| \balpha_{\bmu} = {\bf\Theta} \alpha.|
+|$$|
+\endlines
+%
+will produce
+%
+$$
+ \balpha_{\bmu} = {\bf\Theta} \alpha.
+$$
+To save \TeX's valuable memory the symbol names for the bold math
+characters are not loaded automatically. To load them simply type
+\beginlines
+| \loadboldmathnames|
+\endlines
+in the document. Alternatively, if you only need one or two of them,
+simply copy the appropriate definitions from |mn.tex|
+to your document. For a complete list of the bold math symbols
+supplied, see the file |mn.tex|.
+
+
+\subsubsection{Upright Greek characters}
+
+You can obtain upright Greek characters if you have access to the
+American Maths Society Euler fonts (version 2.0), but you may not
+have these. In this case, you will have to use the normal math italic
+symbols and the typesetter will substitute the corresponding upright
+characters. You will make this easier if you can use the macros |\upi|,
+|\umu| and |\upartial| etc.\ in your text to indicate the need for upright
+characters, together with the following definitions in the preamble
+(before |\begintopmatter|):
+
+\subsubsection*{Authors with AMS fonts}
+
+\beginlines
+|\ifCUPmtplainloaded \else|
+| \NewSymbolFont{upmath} {eurm10}|
+| \NewMathSymbol{\upi} {0}{upmath}{19}|
+| \NewMathSymbol{\umu} {0}{upmath}{16}|
+| \NewMathSymbol{\upartial}{0}{upmath}{40}|
+|\fi|
+\endlines
+
+\subsubsection*{Authors without AMS fonts}
+
+\beginlines
+|\ifCUPmtplainloaded \else|
+| \def\umu{\mu}|
+| \def\upi{\pi}|
+| \def\upartial{\partial}|
+|\fi|
+\endlines
+Wether you have AMS fonts or not, the |\if..| and |\fi| are required in the
+above examples to ensure that when your article is typeset in Monotype
+Times, the correct definitions for these symbols are used.
+
+The sample pages, guide and fonttest can be made to use AMS fonts if you
+have them. To use them, just uncomment the following line in the preamble
+of |mnguide.tex|, |mnsample.tex| and |fonttest.tex|:
+%
+\beginlines
+|%\AMStwofontstrue|
+\endlines
+%
+If you do this, the following upright symbols are used in the
+sample pages, guide and fonttest: |\upi|, |\umu| and |\upartial|.
+
+
+\subsubsection{Special symbols}
+
+The macros for the special symbols in Tables~2 and~3 have been taken from
+the Springer Verlag `Astronomy and Astrophysics' design, with their
+permission. They are directly compatible and use the same macro names.
+These symbols will work in all text sizes, but are only guaranteed to work
+in text and displaystyles. Some of the symbols will not get any smaller
+when they are used in sub- or superscripts, and will therefore be displayed
+at the wrong size. Don't worry about this as the typesetter will be able to
+sort it out.
+%
+\begintable*{2}
+\caption{{\bf Table 2.} Special symbols which can only be used in
+math mode.}
+\advance\baselineskip by 2pt
+\halign{#\hfil\quad&#\hfil\quad&#\hfil\qquad\qquad
+ &#\hfil\quad&#\hfil\quad&#\hfil\cr
+Input & Explanation & Output & Input & Explanation & Output\cr
+\noalign{\vskip 3pt\hrule\vskip 3pt}
+|\la| & less or approx & $\la$ &
+ |\ga| & greater or approx & $\ga$\cr
+|\getsto| & gets over to & $\getsto$ &
+ |\cor| & corresponds to & $\cor$\cr
+|\lid| & less or equal & $\lid$ &
+ |\gid| & greater or equal & $\gid$\cr
+|\sol| & similar over less & $\sol$ &
+ |\sog| & similar over greater & $\sog$\cr
+|\lse| & less over simeq & $\lse$ &
+ |\gse| & greater over simeq & $\gse$\cr
+|\grole| & greater over less & $\grole$ &
+ |\leogr| & less over greater & $\leogr$\cr
+|\loa| & less over approx & $\loa$ &
+ |\goa| & greater over approx & $\goa$\cr
+|\bbbr| & Blackboard bold R & $\bbbr$ &
+ |\bbbm| & Blackboard bold M & $\bbbm$ \cr
+|\bbbn| & Blackboard bold N & $\bbbn$ &
+ |\bbbf| & Blackboard bold F & $\bbbf$ \cr
+|\bbbh| & Blackboard bold H & $\bbbh$ &
+ |\bbbk| & Blackboard bold K & $\bbbk$ \cr
+|\bbbp| & Blackboard bold P & $\bbbp$ &
+ |\bbbone| & Blackboard bold 1 & $\bbbone$ \cr
+|\bbbc| & Blackboard bold C & $\bbbc$ &
+ |\bbbq| & Blackboard bold Q & $\bbbq$ \cr
+|\bbbt| & Blackboard bold T & $\bbbt$ &
+ |\bbbs| & Blackboard bold S & $\bbbs$ \cr
+|\bbbz| & Blackboard bold Z & $\bbbz$ \cr
+%
+\noalign{\vskip 3pt\hrule}
+}
+\endtable
+
+\begintable*{3}
+\caption{{\bf Table 3.} Special symbols which don't have to be
+used in math mode.}
+\advance\baselineskip by 2pt
+\halign{#\hfil\quad&#\hfil\quad&#\hfil\qquad\qquad
+ &#\hfil\quad&#\hfil\quad&#\hfil\cr
+Input & Explanation & Output & Input & Explanation & Output\cr
+\noalign{\vskip 3pt\hrule\vskip 3pt}
+|\sun| & sun symbol & $\sun$ &
+ |\degr| & degree & $\degr$\cr
+|\diameter| & diameter & \diameter &
+ |\sq| & square & $\sq$\cr
+|\fd| & fraction of day & \fd &
+ |\fh| & fraction of hour & \fh\cr
+|\fm| & fraction of minute & \fm &
+ |\fs| & fraction of second & \fs\cr
+|\fdg| & fraction of degree & \fdg &
+ |\fp| & fraction of period & \fp\cr
+|\farcs| & fraction of arcsecond & \farcs &
+ |\farcm| & fraction of arcmin & \farcm\cr
+|\arcsec| & arcsecond & \arcsec &
+ |\arcmin| & arcminute & \arcmin\cr
+\noalign{\vskip 3pt\hrule}
+}
+\endtable
+
+\ifCUPmtplainloaded
+\subsubsection{Extra features in the Monotype Times version}
+
+This section of the guide will only be included if the guide is \TeX ed
+with the Times version of the MN macros (mtmn.tex). The following features
+are only available in the Times version:
+\beginlist
+\item (i) All of the type sizes available are fully loaded.
+\item (ii) Most of the symbols in Table~2 will be substituted
+ with symbols from the |mtxm| font. Only |\sq| is substituted in Table~3.
+\item (iii) All of the symbols in the |mtxm| and |mtym| fonts can be used,
+ at any size (using the normal AMS names).
+ If the author has used |mssymb.tex| then this can be removed, as most
+ of this file is now included in MN. If the author has used the new AMS
+ symbol fonts |msam| and |msbm| -- check the log file for missing
+ characters (once you've removed |msam| and |msbm|).
+ You have to do this because |msam| and |msbm| contain a few extra
+ characters NOT in |mtxm| and |mtym|. If you find missing characters get
+ help!
+\item (iv) Uppercase blackboard bold is available in all sizes. e.g.
+ \beginlines
+ |$\Bbb{A}\ldots\Bbb{Z}$|\qquad gives\qquad $\Bbb{A}\ldots\Bbb{Z}$
+ \endlines
+ If the author has made-up their own uppercase blackboard bold characters
+ you can safely use |\Bbb| instead.
+\item (v) If the author has used the simulated Blackboard bold symbols
+ these are automatically substituted for the real characters, except for
+ |\bbbone| which is redefined to work better with Times fonts.
+\endlist
+\fi
+
+\section{Example of section heading with
+ S{\sevenbf MALL} C{\sevenbf APS},
+ \lowercase{lowercase}, \textbfit{italic}, and bold
+ Greek such as $\bmu^{\bkappa}$}
+
+The above heading was produced with:
+\beginlines
+|\section{Example of section heading with|
+| S{\sevenbf MALL} C{\sevenbf APS},|
+| \lowercase{lowercase}, \textbfit{italic},|
+| and bold Greek such as $\bmu^{\bkappa}$}|
+\endlines
+
+\appendix
+\section{for authors}
+
+Table~A1 is a list of design macros which are unique to |mn.tex|. The list
+displays each macro's name and description.
+%
+\begintable*{4}
+\caption{{\bf Table A1.} Authors' notes.}
+\vbox to 630pt{%
+\halign{#\hfil&\quad #\hfil\cr
+Macro name and syntax & Description\cr
+\noalign{\vskip 3pt\hrule\vskip 3pt}
+|\pageoffset {h-off}{v-off}| & Adjust positioning of text area on paper.\cr
+|\Referee| & Enable double-spaced referee mode.\cr
+|\onecolumn| & Enable one-column mode (default =
+ two-column).\cr
+|\landscape| & Enable landscape mode (default = portrait).\cr
+ & The |\landscape| command automatically calls |\onecolumn|.\cr
+|\loadboldmathnames| & Enable the use of bold symbols, e.g. |\bgamma|\cr
+|\authorcomment| & Catchline for draft version/date.\cr
+\noalign{\Half}
+|\begintopmatter| & Start the two-spanning topmatter.\cr
+|\title {<text>}| & Article title.\cr
+|\author {<text>}| & Author(s).\cr
+|\affiliation {<text>}| & Author affiliation(s).\cr
+|\shortauthor {<text>}| & Set the even-page running head.\cr
+|\shorttitle {<text>}| & Set the odd-page running head.\cr
+|\abstract {<text>}| & Abstract.\cr
+|\keywords {<text>}| & Key words.\cr
+|\maketitle| & End the two-spanning topmatter.\cr
+\noalign{\Half}
+|\section {<text>}| & Heading level A.\cr
+|\section* {<text>}| & Unnumbered A-heading.\cr
+|\subsection {<text>}| & Heading level B.\cr
+|\subsubsection {<text>}| & Heading level C.\cr
+|\paragraph {<text>}| & Heading level D.\cr
+|\appendix| & Start the articles appendix section.
+ The |\section| command starts\cr
+ & a new appendix.\cr
+\noalign{\Half}
+|\stepeq|, |\startsubeq|, |\stepsubeq| & Automatic equation numbering.\cr
+\noalign{\Half}
+|\beginlist| & Numbered list:\cr
+| \item (i) <text>| & Omit the number and round braces from
+ each |\item| for an unnumbered list.\cr
+| \item (ii) <text>|\cr
+\noalign{\vskip-.25\baselineskip}
+| |$\ldots$\cr
+\noalign{\vskip-.2\baselineskip}
+|\endlist|\cr
+\noalign{\Half}
+|\beginrefs| & Bibliography.\cr
+| \bibitem <text>|\cr
+\noalign{\vskip-.25\baselineskip}
+| |$\ldots$\cr
+\noalign{\vskip-.2\baselineskip}
+|\endrefs|\cr
+\noalign{\Half}
+|\beginfigure{n}| & Figures:\cr
+| <figure space>| & Use the |\beginfigure*| form for a
+ double-spanning figure\cr
+| \caption{{\bf Figure n.} caption}| & in two-column mode.\cr
+|\endfigure|\cr
+\noalign{\Half}
+|\begintable{n}| & Tables:\cr
+| \caption{{\bf Table n.} caption}|
+ & Use the |\begintable*| form for a double-spanning table\cr
+| <alignment>| & in two-column mode.\cr
+| \tabletext{<text>}|\cr
+|\endtable|\cr
+\noalign{\Half}
+|\caption{{\bf Figure n} -- {\it continued}}| & Continued captions.\cr
+|\caption{{\bf Table n} -- {\it continued}}|\cr
+\noalign{\Half}
+|\beginplatepage| & Plate pages.\cr
+| \plate{Opposite p.\ n, MNRAS, {\bf n}}|\cr
+| <figure space>|\cr
+| \caption{{\bf Figure n.} caption}|\cr
+|\endplatepage|\cr
+\noalign{\Half}
+|\Two, \OneHalf, \One, \Half| & Extra vertical space: These macros insert
+ white space, in multiples\cr
+ & of the linefeed, between paragraphs. Use during page make-up in \cr
+ & preference to plain \TeX's |\smallskip|, |\medskip| and |\bigskip|.\cr
+\noalign{\Half}
+|\bmath{math text}|, |\em| & Bold math and emphasized text.\cr
+|\textbfit{text}|, |\mathbfit{text}| & Bold text italic (defined in
+ the preamble of |mnsample.tex|).\cr
+|\textbfss{text}|, |\mathbfss{text}|& Bold text sans serif (defined in
+ the preamble of |mnsample.tex|).\cr
+|\umu|, |\upi|, |\upartial| & Upright math characters. These will only
+ appear upright if you have\cr
+ & AMS v2.0 fonts. See ``upright greek
+ characters" for further information.\cr
+\noalign{\vskip 3pt\hrule\vskip 3pt}
+}}
+\endtable
+
+
+\section{for editors}
+
+The additional features shown in Table~B1 may be used for production
+purposes only.
+%
+\begintable*{5}
+\caption{{\bf Table B1.} Editors' notes.}
+\halign{#\hfil&\quad #\hfil\cr
+Macro name and syntax & Description\cr
+\noalign{\vskip 3pt\hrule\vskip 3pt}
+|\pageno=000| & to set pagination; default = 1.\cr
+|\pagerange{000--000}| & note the use of the en-rule\cr
+|\letters| & for short communications (adds L to folios)\cr
+|\pagerange{L00--L00}| & for short communications\cr
+|\microfiche{MN000/0}| & for articles accompanied by microfiche\cr
+|\pubyear{0000}| & catchline date\cr
+|\volume{000}| & catchline volume\cr
+|\acceptedline{text}| & acceptance date\cr
+|\nofloat| & Position a figure or table at the current position
+ (one-column only).\cr
+ & The |\nofloat| macro should be positioned directly after the\cr
+ & |\beginfigure|/|table|, and will cause the macros to use |\midinsert|\cr
+ & (remember that |\midinsert| will turn into a |\topinsert| if there\cr
+ & is not enough space).\cr
+\noalign{\vskip 3pt\hrule\vskip 3pt}
+}
+\endtable
+
+
+\section{Monthly Notices journal style}
+
+Authors submitting \TeX\ or \LaTeX\ papers to Monthly Notices
+may wish to note the following points regarding journal style.
+Adherence to correct style from the start will obviously save time
+and effort later on, in terms of fewer requested subeditorial
+corrections. The notes given here relate to common style errors found
+in Monthly Notices manuscripts, and are {\it not\/} intended to be
+exhaustive. Please see the editorials in issues 257/2 and 260/1, as
+well as any recent issue of the journal, for more details. As far
+as possible, the subeditor will indicate which of your changes
+would be best done globally, thus saving you time.
+
+\subsection{Punctuation}
+
+When deciding where to add commas, it may be helpful to read
+ through the sentence and note where the natural `pauses' occur.
+The needs of readers for whom English is not a first language
+should be borne in mind when punctuating long sentences.
+\ifCUPmtplainloaded \else \vadjust{\eject}\fi %%
+For example, consider the following sentence as it
+appeared in Monthly Notices:
+`When we do not limit ourselves by constraints arising
+from the choice of an initial fluctuation spectrum, structures in
+an open universe, including the peculiar velocity structure, can
+be reproduced in a flat Lema\^{\i}tre universe for a large part of
+their evolution.' Now consider the same sentence without commas:
+`When we do not limit ourselves by constraints arising
+from the choice of an initial fluctuation spectrum structures in
+an open universe including the peculiar velocity structure can be
+reproduced in a flat Lema\^{\i}tre universe for a large part of their
+evolution.'
+
+
+\subsection{Spelling}
+
+Please use British spelling -- e.g.\ centre not center, labelled
+not labeled. The following style regarding -ise and -ize spellings is
+followed. -ise: devise, surprise, comprise, revise,
+exercise, analyse. -ize: recognize, criticize, minimize, emphasize, organize.
+
+
+\subsection{Titles and section/subsection headings}
+
+With the exception of section headings (e.g.\
+{\bf INTRO\-DUC\-TION}$\ldots$),
+capital letters should be used only where they occur in a normal
+sentence -- e.g.\
+`\textbfit{ROSAT\/} {\bf observations of the unusual star}$\ldots$', not
+`\textbfit{ROSAT\/} {\bf Observations of the Unusual Star}$\ldots$'.
+
+\subsection{Key words}
+
+The list of Monthly Notices key words is published with the 4th
+issue of each volume. No other key words should be used. Please
+use the correct layout for key words:
+\smallskip
+
+\noindent {\bf Key words:} galaxies: active -- galaxies: Seyfert --
+radio continuum: galaxies.
+
+\subsection{Hyphens and N-rules}
+
+\beginlist
+\item (i) Hyphens (one dash in \TeX/\LaTeX). Monthly Notices uses hyphens
+for compound adjectives (e.g.\ low-density gas, least-squares fit,
+two-component model). This also applies to simple units (e.g.\
+1.5-m telescope, 284.5-nm line), but not to complex units or
+ranges, which could become cumbersome (e.g.\ 15 km s$^{-1}$ feature,
+100--200 $\umu$m observations).
+
+\item (ii) N-rules (two dashes in \TeX/\LaTeX). These are used (a) to
+separate key words, (b) as parentheses (e.g.\ `the results --
+assuming no temperature gradient -- are indicative of$\ldots$), (c) to
+denote a range (e.g.\ 1.6--2.2 $\umu$m), and (d) to denote the joining
+of two words (e.g.\ Kolmogorov--Smirnov test, Herbig--Haro
+object).
+
+\item (iii) The M-rule (three dashes in \TeX/\LaTeX) is not used in
+Monthly Notices.
+\endlist
+
+
+\subsection{References}
+
+It is important to use the correct reference style, details of
+which can be found in the editorials cited above, and which is
+demonstrated in any recent issue of the journal. The main points
+are summarized below.
+%
+\beginlist
+\item (i) In text -- for three-author papers, give all three authors
+at first mention, and `et al.' thereafter.
+
+\item (ii) In references list -- no bold or italic, no commas after
+author surnames, and no ampersand between final two author names.
+Use simplified abbreviations for frequently used journals (e.g.\
+MNRAS, ApJ, A\&A, PASP -- see full list in editorial in issue
+260/1). List all authors if eight or less, otherwise `et al.' For
+example,
+\endlist
+
+\beginrefs
+\bibitem Biggs J.D., Lyne A.G., 1992, MNRAS, 254, 257
+
+\bibitem Brown A.B., Jones C.D., 1989, in Robinson E.F.,
+Smith G.H., eds, Proc. IAU Symp. 345, Black Dwarfs. Kluwer, Dordrecht,
+p.~210
+
+\bibitem Felsteiner J., Opher R., 1991, in Treves A., ed.,
+Iron Line Diagnostics in X-ray Sources. Springer-Verlag, Berlin, p.~209
+
+\bibitem Gunn J.E., Knapp G., 1993, in Soifer B.T., ed., ASP
+Conf.\ Ser.\ Vol.~43, Sky Surveys. Astron.\ Soc.\ Pac., San Francisco,
+p.~267
+
+\bibitem Peebles P.J.E., 1980, The Large-Scale Structure of the Universe. Princeton Univ. Press, Princeton, NJ
+
+\bibitem Pounds K.A. et al., 1993, MNRAS, 260, 77
+
+\bibitem Williams B.G., 1992, PhD thesis, Univ.\ Edinburgh
+\endrefs
+
+
+\subsection{Maths}
+
+Scalar variables are italic; vectors are bold italic; matrices
+are `bold Univers' font (like bold sans serif). Differential d,
+complex i, exponential e, sin, cos, tan, log, etc., are roman.
+Sub/superscripts that are physical variables are italic, while
+those that are just labels are roman (e.g.\ $C_p$, but $T_{{\rm eff}}$).
+Equations should be punctuated as part of the sentence.
+
+
+\subsection{Miscellaneous}
+
+e.g., i.e., cf., etc., are roman.
+Single quotes ` ' not double quotes `` ".
+Take care to use correct units -- see recent \hbox{issues} for details.
+Use superscript $-1$, not solidus /, for units -- e.g.\ km~s$^{-1}$ not
+km/s. The unit of arcseconds is arcsec when used to denote angular
+size or separation (e.g.\ `beamsize 12~arcsec', `30~arcsec
+west of the star'); use \arcsec\ for positions (e.g.\
+Dec.~$-30^\circ$~29\arcmin~23\arcsec) (similarly for arcminutes).
+The unit of magnitudes is mag,
+not superscript m. Percentages should be written `per cent', not
+\%. Use the degree symbol $^\circ$ (|$^\circ$|) except to denote, e.g., areas, where
+`deg$^2$' may be more appropriate (e.g.\ `a survey area of 3~deg$^2$').
+Degree symbols should be positioned above the decimal point if
+there is one -- i.e.\ 23\fdg 4 not 23.4$^\circ$ (similarly for
+\ifCUPmtplainloaded \vadjust{\eject}\else\fi %%
+superscript
+h, m, s, and \arcmin, \arcsec\ symbols in coordinates). See guide for coding.
+Ionized species should be denoted by small caps, with a thin
+space -- e.g.\ \hbox{He\,{\sc ii}}, \hbox{C\,{\sc iv}},
+\hbox{[Fe\,{\sc ii}]} 465.8 nm, \hbox{N\,{\sc iii}} 463.4~nm. If
+lack of the correct font at your site prevents this from coming
+out on your printout, it would be helpful if you were to indicate
+as such on your manuscript so that the subeditor knows that there
+is no need for correction.
+Computer software (e.g.\ {\sc figaro}) should be in small capitals.
+Satellite names should be italic (e.g.\ {\it Ginga, IRAS\/}).
+The correct bracket order is $\{[( )]\}$.
+
+
+\section{Trouble-shooting}
+
+Authors may from time to time encounter problems with the preparation
+of their papers in \TeX/\LaTeX. The appropriate action to
+take will depend on the nature of the problem -- the following is
+intended to act as a guide.
+%
+\beginlist
+\item (i) If a problem is with \TeX/\LaTeX\ itself, rather than with the
+actual macros, \ifCUPmtplainloaded \else \vadjust{\eject}\fi %%
+please refer to the appropriate handbooks for
+initial advice.\footnote{\dag}{\TeX : Knuth D., 1986, The \TeX book.
+Addison Wesley; \LaTeX: Lamport L., 1985, \LaTeX\ User's Guide and
+Reference Manual. Addison Wesley.} If the
+solution cannot be found, and you suspect that the problem lies
+with the macros, then please contact the RAS Journal Production
+team at Blackwell Science (BS), 23 Ainslie
+Place, Edinburgh EH3 6AJ, UK (Tel: 031 226 7232; Fax: 031 226 3803;
+omit the first zero if calling from outside the UK).
+The BS office will shortly be
+accessible by email -- please see the Instructions for Authors on
+the inside back cover of Monthly Notices for details. Please
+provide precise details of the problem (what you were trying to
+do -- ideally, include examples of source code as well -- and
+what exactly happened; what error message was received).
+
+\item (ii) Problems with page make-up, particularly in the two-column
+mode (e.g.\ large spaces between paragraphs, or under headings or
+figures; uneven columns; figures/tables appearing out of order).
+Please do {\it not\/} attempt to remedy these yourself using `hard' page
+make-up commands -- the typesetters at Cambridge University Press
+(CUP) will sort out problems when typesetting. (You may, if you
+wish, draw attention to particular problems when submitting the
+final version of your paper.)
+
+\item (iii) If a required font is not available at your site, allow \TeX\
+to substitute the font and report the problem on your disk
+documentation form.
+\endlist
+
+
+\subsection{Fixes for coding problems}
+
+The new versions of the style files and macros have been designed
+to minimize the need for user-defined macros to create special
+symbols. Authors are urged, wherever possible, to use the following
+coding rather than create their own. This will minimize the
+danger of author-defined macros being accidentally `over-ridden'
+when the paper is typeset in Monotype Times (see Subsection~3.13, %%
+`Typesetting mathematics').
+%
+\beginlist
+\item (i) Fonts in sections and paper titles. The following are examples
+of styles that sometimes prove difficult to code.
+\endlist
+
+
+\subsection*{\it P\lowercase{aper titles}}
+
+\boxit{\multi\seventeenpoint\bf
+ A survey of \textbfit{IRAS\/} galaxies\\
+ at $\bmath{\delta > {\bf 50}^\circ}$\endmulti}
+%
+is produced by:
+%
+\beginlines
+|\title{A survey of \textbfit{IRAS\/} galaxies|
+| \hfil\break at $\bmath{\delta>{\bf 50}^\circ}$}|
+\smallskip
+|\shorttitle{A survey of IRAS galaxies at $\delta|
+| > 50^\circ$}|
+\endlines
+\bigskip
+
+\boxit{\multi\seventeenpoint\bf\noindent
+ Observations of compact\\
+ H\,{\elevenbf II} regions\endmulti}
+%
+is produced by:
+%
+\beginlines
+|\title{Observations of compact|
+| H\,{\elevenbf II} regions}|
+\smallskip
+|\shorttitle{Observations of compact|
+| H\,{\eightit II} regions}|
+\endlines
+
+
+\subsection*{\it S\lowercase{ection headings}}
+
+\boxit{\bf 1\quad THE \textbfit{IRAS\/} DATA FOR
+ $\bmath{\delta > {\bf 50}^\circ}$}
+%
+is produced by:
+%
+\beginlines
+|\section{The \textbfit{IRAS\/} data for|
+| $\bmath{\delta>{\bf 50}^\circ}$}|
+\endlines
+\bigskip
+
+\boxit{\bf 2\quad H\,{\sevenbf II} GALAXIES AT
+ $\bmath{\lowercase{z} > {\bf 1.6}}$}
+%
+is produced by:
+%
+\beginlines
+|\section{H\,{\sevenbf II} galaxies at|
+| $\bmath{\lowercase{z}>{\bf 1.6}}$}|
+\endlines
+
+
+\subsection*{\it S\lowercase{ubsection headings}}
+
+\boxit{\multi\bf 2.1\quad The \textbfit{IRAS\/} data for
+ $\bmath{\delta > {\bf 50}^\circ}$: galaxies\\
+ at $\bmath{z > {\bf 1.5}}$\endmulti}
+%
+is produced by:
+%
+\beginlines
+|\subsection{The \textbfit{IRAS\/} data for|
+| $\bmath{\delta > {\bf 50}^\circ}$: galaxies|
+| \hfil\break at $\bmath{z > {\bf 1.5}}$}|
+\endlines
+\bigskip
+
+\boxit{\bf 2.2\quad Observations of compact H\,{\sevenbf II} regions}
+%
+is produced by:
+%
+\beginlines
+|\subsection{Observations of compact|
+| H\,{\sevenbf II} regions}|
+\endlines
+\bigskip
+
+\boxit{\it 2.2.1\quad A survey of radio galaxies
+ for $\delta > {\it 50}^\circ$}
+%
+is produced by:
+%
+\beginlines
+|\subsubsection{A survey of radio galaxies|
+| for $\delta > {\it 50}^\circ$}|
+\endlines
+\bigskip
+
+\boxit{\it 2.2.2\quad Determination of T$_{eff}$ in compact
+ H\,{\sevenit II} regions}
+%
+is produced by:
+%
+\beginlines
+|\subsubsection{Determination of T$_{eff}$ in|
+| compact H\,{\sevenit II} regions}|
+\endlines
+
+\beginlist
+\item (ii) Small capitals and other unusual fonts in table and figure
+captions:
+\par\smallskip
+\boxit{\eightpoint {\bf Figure 1.} Profiles of the H$\alpha$ and
+ N\,{\sc iii} lines observed.}
+%
+is produced by:
+%
+\beginlines
+|\caption{Profiles of the H$\alpha$ and|
+| N\,{\sc iii} lines observed.}|
+\endlines
+
+\item (iii) Multiple author lists (to get the correct vertical spacing
+and wraparound on the title page of a multiple-author paper).
+\par\smallskip
+
+\boxit{\multi
+ \seventeenpoint\bf\noindent
+ The variation in the\\
+ strength of low-$\bmath{l}$ solar\\
+ $\bmath{p}$-modes: 1981--2
+ \medskip
+ \fourteenpoint\noindent
+ Y. Elsworth, R. Howe, G.R. Isaac,\\
+ C.P. McLeod, B.A. Miller, R. New,\\
+ C.C. Speake and S.J. Wheeler\endmulti
+}
+%
+is produced by:
+%
+\beginlines
+|\title{The variation in the\hfil\break|
+| strength of low-$\bmath{l}$ solar\hfil\break|
+| $\bmath{p}$-modes: 1981--2}|
+\smallskip
+|\shorttitle{The variation in the strength of|
+| low-$l$ solar $p$-modes: 1981--2}|
+\smallskip
+|\author{Y. Elsworth, R. Howe, G.R. Isaac,|
+| \hfil\break C.P. McLeod, B.A. Miller, R. New,|
+| \hfil\break C.C. Speake and S.J. Wheeler}|
+\smallskip
+|\shortauthor{Y. Elsworth et al.}|
+\endlines
+
+\item (iv) Ionized species (as used in the examples above). The correct
+style calls for the use of small capitals and a thin space after
+the symbol for the element: e.g.\ for \hbox{H\,{\sc ii}}, use the code
+|\hbox{H\,{\sc ii}}|. The use of the |\hbox| will stop the
+H and the {\sc ii} being separated.
+
+\item (v) Lower case greek pi ($\pi$), mu ($\mu$) and partial ($\partial$).
+In certain circumstances, the Monthly Notices style calls for these to be
+roman [when pi is used to denote the constant 3.1415$\ldots$, mu is
+used to denote `micro' in a unit (e.g.\ $\umu$m, $\umu$Jy), and partial
+is a differential symbol]. See Subsubsection~3.13.5 for instructions.
+
+\item (vi) Decimal degrees, arcmin, arcsec, hours, minutes and seconds.
+The symbol needs to be placed vertically above the decimal point.
+For example, the sentence
+%
+\beginquote
+The observations were made along position angle
+120\fdg 5, starting from the central coordinates
+${\rm RA}(1950)=19^{\rm h}~22^{\rm m}~18\fs 2$,
+${\rm Dec.}~(1950)=45^\circ~18'~36\farcs 4$
+\endquote
+%
+uses the following coding:
+%
+\beginlines
+|The observations were made along position angle|
+|120\fdg 5, starting from the central coordinates|
+|${\rm RA}(1950)=19^{\rm h}~22^{\rm m}~18\fs 2$,|
+|${\rm Dec.}~(1950)=45^\circ~18'~36\farcs 4$|
+\endlines
+
+\item (vii) The correct coding for the prime symbol \arcmin\ is
+|\arcmin|, and that for \arcsec\ is |\arcsec|; see the two
+tables on special symbols.
+
+\item (viii) N-rules, hyphens and minus signs (see style guide for
+correct usage). To create the correct symbols in the sentence
+%
+\beginquote
+The high-resolution observations were made along a
+line at an angle of $-15^\circ$ (east from north)
+from the axis of the jet, which runs north--south
+\endquote
+%
+you would use the following code:
+%
+\beginlines
+|The high-resolution observations were made along|
+|a line at an angle of $-15^\circ$ (east from|
+|north) from the axis of the jet, which runs|
+|north--south|
+\endlines
+
+\item (ix) Vectors and matrices should be bold italic and bold sans
+serif respectively. To create the correct fonts for the vector $\bmath{x}$
+and the matrix \textbfss{P}, you should use |$\bmath{x}$| and
+|\textbfss{P}| respectively; |\mathbfss| is for use in
+math mode. Bold face text italic can be obtained by using
+|\textbfit{..}| and |\mathbfit{..}| for math mode.
+\ifCUPmtplainloaded \else \vfil\eject\fi %%
+\item (x) Bold italic superscripts and subscripts. To get these
+to come out in the correct font and the right size, you need to use
+|\bmath|. You can create the output $\bmath{k_x}$ by typing |$\bmath{k_x}$|.
+Try to avoid using \TeX\ commands to determine script sizes that are
+already defined in the macros. For example, macros such as
+%
+\beginlines
+|\def\th{^\hbox{\sevenrm th}}|
+\endlines
+%
+are generating extra work;
+%
+\beginlines
+|\def\th{^{\rm th}}|
+\endlines
+%
+will do, and will get the size of the superscript right whether in main
+text, tables or captions (the use of |\sevenrm| over-rides the macros).
+Also, the |\hbox| is not necessary, as \TeX\ won't split a
+superscript/subscript from its variable at a line break.
+
+\item (xi) Calligraphic letters (uppercase only).
+%
+Normal uppercase calligraphic can be produced with |\cal| as
+normal (in math mode). Bold calligraphic can be produced with |\bmath|,
+e.g.\ |$\bmath{\cal A}$| gives $\bmath{\cal A}$.
+
+\item (xii) Automatic scaling of brackets. The codes |\left| and
+|\right| should be used to scale brackets automatically to
+fit the equation being set. For example, to get
+$$
+ v = x \left( {N+2}\over {N} \right)
+$$
+use the code
+%
+\beginlines
+|$$|
+| v = x \left( {N+2}\over {N} \right)|
+|$$|
+\endlines
+
+\item (xiii) Roman font in equations. It is often necessary to make some
+symbols roman in an equation (e.g.\ units, subscripts). For example,
+to get the following output:
+$$
+ \sigma \simeq (r/13~h^{-1}~{\rm Mpc})^{-0.9},
+ \qquad \omega = {{N-N_{\rm s}}\over {N_{\rm R}}},
+$$
+you should use:
+%
+\beginlines
+|$$|
+| \sigma\simeq (r/13~h^{-1}~{\rm Mpc})^{-0.9},|
+| \qquad\omega={{N-N_{\rm s}}\over {N_{\rm R}}},|
+|$$|
+\endlines
+
+\item (xiv) Continuation figure and table captions.
+See Subsection~3.6. %%
+\endlist
+
+
+\subsection{Springer-Verlag macro names}
+
+These have been incorporated from the Astronomy \& Astrophysics \LaTeX\
+style file, to aid in the creation of various commonly used
+astronomical symbols. Please see Subsubsection~3.13.6 for details. %%
+
+\bye
+
+% end of mnguide.tex
diff --git a/Master/texmf-dist/doc/plain/mnras/mnland.tex b/Master/texmf-dist/doc/plain/mnras/mnland.tex
new file mode 100644
index 00000000000..968077488f8
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/mnras/mnland.tex
@@ -0,0 +1,82 @@
+% MNLAND.TEX
+%
+% A landscape figure for the sample plain TeX Monthly Notices article.
+%
+% v1.1 --- released 25th August 1994 (M. Reed)
+% v1.0 --- first released 17th February 1994
+%
+% Copyright Cambridge University Press
+
+% The following line automatically loads the mn macros if you are not
+% using a format file.
+\ifx\mnmacrosloaded\undefined \input mn\fi
+
+% If your system has the AMS fonts version 2.0 installed, MN.tex can be
+% made to use them by uncommenting the line: %\AMStwofontstrue
+%
+% By doing this, you will be able to obtain upright Greek characters.
+% e.g. \umu, \upi etc. See the section on "Upright Greek characters" in
+% this guide for further information.
+
+% !! AMS fonts are not used in this file. The following code is provided
+% for your convenience !!
+\newif\ifAMStwofonts
+%\AMStwofontstrue
+
+\ifCUPmtplainloaded \else
+ \NewTextAlphabet{textbfit} {cmbxti10} {}
+ \NewTextAlphabet{textbfss} {cmssbx10} {}
+ \NewMathAlphabet{mathbfit} {cmbxti10} {} % for math mode
+ \NewMathAlphabet{mathbfss} {cmssbx10} {} % " " "
+ %
+ \ifAMStwofonts
+ %
+ \NewSymbolFont{upmath} {eurm10}
+ \NewSymbolFont{AMSa} {msam10}
+ \NewMathSymbol{\upi} {0}{upmath}{19}
+ \NewMathSymbol{\umu} {0}{upmath}{16}
+ \NewMathSymbol{\upartial}{0}{upmath}{40}
+ \NewMathSymbol{\leqslant}{3}{AMSa}{36}
+ \NewMathSymbol{\geqslant}{3}{AMSa}{3E}
+ \let\oldle=\le \let\oldleq=\leq
+ \let\oldge=\ge \let\oldgeq=\geq
+ \let\leq=\leqslant \let\le=\leqslant
+ \let\geq=\geqslant \let\ge=\geqslant
+ \else
+ \def\umu{\mu}
+ \def\upi{\pi}
+ \def\upartial{\partial}
+ \fi
+\fi
+
+
+%\special{landscape} % only use this if your driver supports it
+
+% Marginal adjustments using \pageoffset maybe required when printing
+% proofs on a Laserprinter (this is usually not needed).
+% Syntax: \pageoffset{ +/- hor. offset}{ +/- vert. offset}
+% e.g. \pageoffset{-3pc}{-4pc}
+
+\pageoffset{0pc}{-1.5pc}
+
+\landscape
+\authorcomment{Landscape material to be pasted into the article.}
+
+\begintopmatter % these must be here
+\maketitle %
+
+
+\beginfigure{1}
+\caption{{\bf Figure 4.} Photometric comparisons in the overlap areas
+ between the fields. The differences between photometry of individual images
+ from different fields for the overlapping fields 52--51, 50--51, 50--28 and
+ 30--29 are shown for the $B_{\rm J}$ and $R$ wavebands. The axes are as
+ follows. Left-hand panels: $\Delta B$ ($-1$ to 1) against
+ $\langle B \rangle$ (13 to 21). Right-hand panels: $\Delta R$ ($-1$ to 1)
+ against $\langle R \rangle$ (12 to 20).}
+\endfigure
+
+
+\bye
+
+% end of mnland.tex
diff --git a/Master/texmf-dist/doc/plain/mnras/mnsample.tex b/Master/texmf-dist/doc/plain/mnras/mnsample.tex
new file mode 100644
index 00000000000..b19ea01c605
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/mnras/mnsample.tex
@@ -0,0 +1,705 @@
+% MNSAMPLE.TEX
+%
+% A sample plain TeX single/two column Monthly Notices article.
+%
+% v1.5 --- released 25th August 1994 (M. Reed)
+% v1.4 --- released 22nd February 1994
+% v1.3 --- released 8th December 1992
+%
+% Copyright Cambridge University Press
+
+% The following line automatically loads the mn macros if you are not
+% using a format file.
+\ifx\mnmacrosloaded\undefined \input mn\fi
+
+% If your system has the AMS fonts version 2.0 installed, MN.tex can be
+% made to use them by uncommenting the line: %\AMStwofontstrue
+%
+% By doing this, you will be able to obtain upright Greek characters.
+% e.g. \umu, \upi etc. See the section on "Upright Greek characters" in
+% this guide for further information.
+
+\newif\ifAMStwofonts
+%\AMStwofontstrue
+
+\ifCUPmtplainloaded \else
+ \NewTextAlphabet{textbfit} {cmbxti10} {}
+ \NewTextAlphabet{textbfss} {cmssbx10} {}
+ \NewMathAlphabet{mathbfit} {cmbxti10} {} % for math mode
+ \NewMathAlphabet{mathbfss} {cmssbx10} {} % " " "
+ %
+ \ifAMStwofonts
+ %
+ \NewSymbolFont{upmath} {eurm10}
+ \NewSymbolFont{AMSa} {msam10}
+ \NewMathSymbol{\upi} {0}{upmath}{19}
+ \NewMathSymbol{\umu} {0}{upmath}{16}
+ \NewMathSymbol{\upartial}{0}{upmath}{40}
+ \NewMathSymbol{\leqslant}{3}{AMSa}{36}
+ \NewMathSymbol{\geqslant}{3}{AMSa}{3E}
+ \let\oldle=\le \let\oldleq=\leq
+ \let\oldge=\ge \let\oldgeq=\geq
+ \let\leq=\leqslant \let\le=\leqslant
+ \let\geq=\geqslant \let\ge=\geqslant
+ \else
+ \def\umu{\mu}
+ \def\upi{\pi}
+ \def\upartial{\partial}
+ \fi
+\fi
+
+
+% Marginal adjustments using \pageoffset maybe required when printing
+% proofs on a Laserprinter (this is usually not needed).
+% Syntax: \pageoffset{ +/- hor. offset}{ +/- vert. offset}
+% e.g. \pageoffset{-3pc}{-4pc}
+
+\pageoffset{-2.5pc}{0pc}
+
+\loadboldmathnames
+
+% \Referee % uncomment this for referee mode (double spaced)
+
+% \pagerange, \pubyear and \volume are defined at the Journals office and
+% not by an author.
+
+% \onecolumn % enable one column mode
+% \letters % for `letters' articles
+\pagerange{1--7} % `letters' articles should use \pagerange{Ln--Ln}
+\pubyear{1989}
+\volume{226}
+% \microfiche{} % for articles with microfiche
+% \authorcomment{} % author comment for footline
+
+\begintopmatter % start the two spanning material
+
+\title{Dust envelopes around RV Tauri stars}
+\author{A. V. Raveendran}
+\affiliation{Indian Institute of Astrophysics, Bangalore 560034, India}
+
+\shortauthor{A. V. Raveendran}
+\shorttitle{Dust envelopes around RV Tauri stars}
+
+% \acceptedline is to be defined at the Journals office and not
+% by an author.
+
+\acceptedline{Accepted 1988 December 15. Received 1988 December 14;
+ in original form 1988 October 11}
+
+\abstract {In the {\it IRAS\/} [12]--[25], [25]--[60]
+colour--colour diagram, RV Tauri stars are found to populate
+cooler temperature regions $(T<600\,{\rm K})$, distinctly
+different from those occupied by the oxygen and carbon Miras.
+The {\it IRAS\/} fluxes are consistent with the dust density in
+the envelope varying as the inverse square of the radial
+distance, implying that the grain formation processes in these
+objects are most probably continuous and not sporadic. It is
+found that the spectroscopic subgroups A and B are
+well separated in the far-infrared two-colour diagram, with
+group B objects having systematically cooler dust envelopes. We
+interpret this as being due to a difference in the nature of
+grains, including the chemical composition, in the two cases.}
+
+\keywords {circumstellar matter -- infrared: stars.}
+
+\maketitle % finish the two spanning material
+
+
+\section{Introduction}
+
+It has been well established that RV Tauri variables
+possess infrared emission far in excess of their expected
+blackbody continuum, arising from their extended cool dust
+envelopes (Gehrz \& Woolf 1970; Gehrz 1972; Gehrz \& Ney 1972).
+Recently, Lloyd Evans (1985) and Goldsmith et~al.\ (1987)
+have given detailed descriptions of the near-infrared
+properties of RV Tauri stars. In this paper we present an
+analysis of the {\it IRAS\/} data of RV Tauri stars with the help
+of the far-infrared two-colour diagram and a grid computed
+using a simple model of the dust envelope. Such two-colour plots
+have already been employed extensively by several investigators
+to study the circumstellar envelopes around oxygen-rich and
+carbon-rich objects which are in the late stages of stellar
+evolution (Hacking et~al.\ 1985; Zuckerman \& Dyck 1986;
+van der Veen \& Habing 1988; Willems \& de Jong 1988).
+
+Table~1 summarizes the basic data on the 17 objects
+detected at 60$\,\umu$m. Apart from the {\it IRAS\/} identification
+and the flux densities at 12-, 25-, 60- and 100-$\umu$m wavebands,
+it gives the spectroscopic groups of Preston et~al.\ (1963),
+the light-curve classes of Kukarkin et~al.\ (1969) and the periods of
+light variation. The list, which
+contains about 20 per cent of all the known RV Tauri stars,
+is essentially the same as that given by Jura (1986). The
+spectroscopic subgroups are from either Preston et~al.\ (1963) or
+Lloyd Evans (1985).
+%
+\begintable*{1}
+\caption{{\bf Table 1.} Data on the RV Tauri stars detected by {\it IRAS}.}
+\halign{%
+\rm#\hfil&\qquad\rm#\hfil&\qquad\rm\hfil#&\qquad\rm\hfil
+#&\qquad\rm\hfil#&\qquad\rm\hfil#&\qquad\rm#\hfil
+&\qquad\rm\hfil#&\qquad\rm#\hfil&\qquad\hfil\rm#\cr
+Name&&\multispan4\hskip23pt\hss Flux density (Jy)$^a$\hss \cr
+Variable&{\it IRAS}&12$\;\umu$m&25$\;\umu$m
+&60$\;\umu$m&100$\;\umu$m&Sp.&Period&Light-&$T_0({\rm K})$\cr
+&&&&&&group&(d)\hfill&curve\cr
+&&&&&&&&type\cr
+\noalign{\vskip 10pt}
+TW Cam&04166$+$5719&8.27&5.62&1.82&$<$1.73&A&85.6&a&555\cr
+RV Tau&04440$+$2605&22.53&18.08&6.40&2.52&A&78.9&b&460\cr
+DY Ori&06034$+$1354&12.44&14.93&4.12&$<$11.22&B&60.3&&295\cr
+CT Ori&06072$+$0953&6.16&5.57&1.22&$<$1.54&B&135.6&&330\cr
+SU Gem&06108$+$2734&7.90&5.69&2.16&$<$11.66&A&50.1&b&575\cr
+UY CMa&06160$-$1701&3.51&2.48&0.57&$<$1.00&B&113.9&a&420\cr
+U Mon&07284$-$0940&124.30&88.43&26.28&9.24&A&92.3&b&480\cr
+AR Pup&08011$-$3627&131.33&94.32&25.81&11.65&B&75.0&b&450\cr
+IW Car&09256$-$6324&101/06&96.24&34.19&13.07&B&67.5&b&395\cr
+GK Car&11118$-$5726&2.87&2.48&0.78&$<$12.13&B&55.6&&405\cr
+RU Cen&12067$-$4508&5.36&11.02&5.57&2.01&B&64.7&&255\cr
+SX Cen&12185$-$4856&5.95&3.62&1.09&$<$1.50&B&32.9&b&590\cr
+AI Sco&17530$-$3348&17.68&11.46&2.88&$<$45.62&A&71.0&b&480\cr
+AC Her&18281$+$2149&41.47&65.33&21.12&7.79&B&75.5&a&260\cr
+R Sct&18448$-$0545&20.88&9.30&8.10&$<$138.78&A&140.2&a\cr
+R Sge&20117$+$1634&10.63&7.57&2.10&$<$1.66&A&70.6&b&455\cr
+V Vul&20343$+$2625&12.39&5.72&1.29&$<$6.96&A&75.7&a&690\cr
+}
+\tabletext{\noindent $^a$Observed by {\it IRAS}.}
+\endtable
+
+
+\section{Description of the envelope model}
+
+If we assume that the dust grains in the envelope are
+predominantly of the same kind and are in thermal equilibrium,
+the luminosity at frequency $\nu$ in the infrared is given by
+$$
+ L(\nu)=\mskip-25mu\int\limits_{\rm envelope}\mskip-25mu
+ \rho(r)Q_{{\rm abs}}
+ (\nu)B[\nu,T_{\rm g}(r)]\exp [-\tau(\nu,r)]\> {\rm d}V, \eqno\stepeq
+$$
+where
+$Q_{{\rm abs}}(\nu)$ is the absorption efficiency at frequency $\nu$,
+$\rho(r)$ is the dust grain density,
+$T_{\rm g}(r)$ is the grain temperature,
+$B[\nu,T_{\rm g}(r)]$ is the Planck function and
+$\tau(\nu,r)$ is the optical depth at distance {\it r\/} from the
+centre of the star.
+
+The temperature $T_{\rm g}(r)$ is determined by the condition of
+energy balance: amount of energy radiated = amount of energy
+absorbed. The amount of energy absorbed at any point is
+proportional to the total available energy at that point, which
+consists of:
+\beginlist
+\item (i) the attenuated and diluted stellar radiation;
+\item (ii) scattered radiation, and
+\item (iii) reradiation from other grains.
+\endlist
+
+Detailed solutions of radiative transfer in circumstellar
+dust shells by Rowan-Robinson \& Harris (1983a,b) indicate that
+the effect of heating by other grains becomes significant only at
+large optical depths at the absorbing frequencies $[\tau({\rm
+UV})\gg 10]$, and at optical depths $\tau({\rm UV})<1$ the grains
+have approximately the same temperature that they would have if
+they were seeing the starlight unattenuated and no other
+radiation.
+
+The Planck mean optical depths of circumstellar envelopes
+around several RV Tauri stars, derived from the ratios of the
+luminosities of the dust shell (at infrared wavelengths) and
+the star, range from 0.07 to 0.63 (Goldsmith et~al.\ 1987).
+There is much uncertainty in the nature of the optical
+properties of dust grains in the envelope. The carbon-rich RV
+Tauri stars are also reported to show the 10-$\umu$m silicate
+emission feature typical of oxygen-rich objects (Gehrz \& Ney
+1972; Olnon \& Raimond 1986). The pure terrestrial silicates or
+lunar silicates are found to be completely unsuitable to account
+for the infrared emission from circumstellar dust shells around
+M-type stars (Rowan-Robinson \& Harris 1983a). We assume that
+the absorption efficiency $Q_{{\rm abs}} (\nu)$ in the infrared
+varies as $\nu^{\gamma}$. ${\gamma}=1$ appears to provide a
+reasonable fit in a variety of sources (Harvey, Thronson \&
+Gatley 1979; Jura 1986). Under these circumstances the
+condition of energy balance implies that the dust temperature
+$T_{\rm g}$ will vary as $r^{\beta}$.
+
+In view of the low value of the observed Planck mean optical
+depth for the stellar radiation and the nature of the assumed
+frequency dependence of the absorption efficiency, the
+extinction of the infrared radiation by the dust envelope can
+be neglected. If we consider the envelope to be spherically
+symmetric, equation (1) reduces to
+$$
+ L(\nu)=\!\!\int_{r_{1}}^{r_{2}}\!\!4\upi r^2\rho(r)\> Q_{{\rm abs}}
+ (\nu)B[\nu,T_{\rm g}(r)]\> {\rm d}r, \eqno\stepeq
+$$
+where $r_1$ and $r_2$ are the inner and outer radii of the
+shell. For a dusty density distribution $\rho(r)\propto
+r^{\alpha}$ and $r_2\gg r_1$, equation (2) reduces to
+$$
+ L(\nu)\propto \nu^{2+\gamma-Q}
+ \int_{X_0}^{\infty}{{x^Q}\over{{\rm e}^x-1}}{\rm d}x, \eqno\stepeq
+$$
+where $Q=-(\alpha+\beta+3)/\beta$ and $X_0=(h\nu /kT_0)$.
+$T_0$ represents the temperature at the inner boundary of the
+dust shell where grains start condensing. In a steady radiation
+pressure driven mass outflow in the optically thin case, values of
+$\alpha$ lie near $-2$ (Gilman 1972). $\gamma$ and $\beta$ are
+related by $\beta=-2/(\gamma+4)$.
+
+In the {\it IRAS\/} Point Source Catalog (PSC, Beichman et~al.\ 1985a),
+the flux densities have been quoted at the effective
+wavelengths 12, 25, 60 and 100$\,\umu$m, assuming a flat energy
+spectrum $[\nu F(\nu)=1]$ for the observed sources. For each model
+given by equation (3), using the relative system response, the
+colour-correction factors (Beichman et~al.\ 1985b) in each
+of the {\it IRAS\/} passbands were calculated and the fluxes
+were converted into flux densities expected for a flat energy
+distribution, as assumed in the {\it IRAS\/} PSC, so that the
+computed colours can be directly compared with the colours
+determined from the catalogue quantities. Such a procedure
+is more appropriate than correcting the {\it IRAS\/}
+colours for the energy distribution given by a particular model
+and then comparing them with those computed by the model.
+
+
+\subsection{Colour--colour diagram}
+
+The IR colour is defined as
+$$
+ [\nu_1]-[\nu_2]=-2.5\log [f(\nu_1)/f(\nu_2)],
+$$
+where $\nu_1$ and $\nu_2$ are any two wavebands and
+$f(\nu_1)$ and $f(\nu_2)$ are the corresponding flux densities
+assuming a flat energy spectrum for the source.
+%
+\beginfigure{1}
+\vskip 91mm
+\caption{{\bf Figure 1.} Plot of [25]--[60] colours of
+RV Tauri stars against their [12]--[25] colours after normalizing
+as indicated in Beichman et~al.\ (1985b). Some of the objects
+are identified by their variable-star names. Typical error bars
+are shown in the bottom right-hand corner. The lines represent
+the loci for constant inner shell temperature and the quantity
+$Q$. Note the separation of group A and B stars at $T_0 \sim$
+460$\,$K. Positions occupied by a sample of carbon and oxygen
+Miras are also shown. The $Q=1.0$ line differs from the
+blackbody line by a maximum of $\sim 0.05$.}
+\endfigure
+
+In Fig.~1, we have plotted the [25]--[60] colours of
+RV Tauri stars against their corresponding [12]--[25] colours
+derived from the {\it IRAS\/} data. Filled circles represent
+stars of group A and open circles stars of group B. The two
+sets of near-parallel lines represent the loci of constant
+inner shell temperature $T_0$ and the quantity $Q$ defined
+above. The models correspond to the case of absorption
+efficiency $Q_{{\rm abs}}(\nu)$ varying as $\nu$ (with
+$\gamma=1$ and hence $\beta=-0.4$). We have omitted R Sct in
+Fig.~1 because it shows a large deviation from the average
+relation shown by all the other objects. R Sct has a
+comparatively large excess at 60$\,\umu$m, but the extent of a
+possible contamination by the infrared cirrus (Low et~al.\ 1984)
+is unknown. Goldsmith et~al.\ (1987) found no
+evidence of the presence of a dust envelope at near-IR
+wavelengths and the spectrum was consistent with a stellar
+continuum. This explains why R Sct lies well below the mean
+relation shown by stars of groups A and C between the
+[3.6]--[11.3] colour excess and the photometrically determined
+(Fe/H) (Dawson 1979). R Sct has the longest period of 140$\,$d
+among the RV Tauri stars detected at far-infrared wavelengths
+and does not have the 10-$\umu$m emission feature seen in other
+objects (Gehrz 1972; Olnon \& Raimond 1986). R Sct is probably
+the most irregular RV Tauri star known (McLaughlin 1932).
+
+The inner shell temperatures $(T_0)$ derived for the various
+objects are also given in Table~1 and we find the majority of
+them to have temperatures in the narrow range 400--600$\,$K. If
+the dependences of $Q_{{\rm abs}}(\nu)$ on $\nu$ and $\rho(r)$ on
+$r$ are similar in all the objects considered, then in the
+colour--colour diagram they all should lie along a line
+corresponding to different values of $T_0$ and in Fig.~1 we find
+that this is essentially the case. In view of the quoted
+uncertainties in the flux measurements, we cannot attach much
+significance to the scatter in Fig.~1.
+%
+\beginfigure*{2}
+\vskip 5.9cm
+\caption{{\bf Figure 2.} Plot of the [60]--[100] colours
+of RV Tauri stars against their [25]--[60] colours after normalizing
+as indicated in Beichman et~al.\ (1985b). The solid lines
+represent the loci for constant inner shell temperature and the
+quantity $Q$. The dashed line shows the locus for a blackbody
+distribution.}
+\endfigure
+
+At 100$\,\umu$m the infrared sky is characterized by emission,
+called infrared cirrus, from interstellar dust on all spatial
+scales (Low et~al.\ 1984), thereby impairing the
+measurements at far-infrared wavelengths. In Fig.~2, we have
+plotted the [60]--[100] colours of the six RV Tauri stars
+detected at 100$\,\umu$m against their [25]--[60] colours, along
+with the grid showing the regions of different values for inner
+shell temperature $T_0$ and the quantity $Q$, as in Fig.~1. The
+results indicated by Fig.~2 are consistent with those derived
+from Fig.~1. AR Pup shows a large excess at 100$\,\umu$m but, in
+view of the large values for the cirrus flags given in the
+catalogue, the intrinsic flux at 100$\,\umu$m is uncertain.
+
+
+\subsection{Radial distribution of dust}
+
+From Fig.~1, it is evident that all RV Tauri stars lie
+between the lines corresponding to $Q=1.5$ and $0.5$. With
+$$
+ \alpha=-(1+Q)\beta-3,
+$$
+these values suggest limits of $r^{-2.0}$ and $r^{-2.4}$
+for the dust density variation, indicating a near-constant
+mass-loss rate. Jura (1986) has suggested that the density in
+the circumstellar envelope around RV Tauri stars varies as
+$r^{-1}$, implying a mass-loss rate that was greater in the
+past than it is currently. By fitting a power law to the
+observed fluxes, such that $f(\nu)$ varies as $\nu^q$, values
+of $q$ determined by him for the various objects given in
+Table~1 lie in the range 0.6--1.2, with a mean $\bar q=0.98$. The
+assumption of a power law corresponds to the case of $X_0=0$ in
+equation (3) and hence we get
+$$
+ q=2+\gamma -Q.
+$$
+Since we assume that $Q_{{\rm abs}}(\nu)$ varies as $\nu$,
+the resulting value for $Q$=2.0. None of the objects is found
+to lie in the corresponding region in the colour--colour
+diagram. Even this extreme value for $Q$ implies a density
+which varies as $r^{-1.8}$.
+
+Goldsmith et~al.\ (1987) have reported that the
+simultaneous optical and near-IR data of AC Her can be fitted
+by a combination of two blackbodies at 5680 and 1800$\,$K,
+representing, respectively, the stellar and dust shell
+temperatures, and suggested that in RV Tauri stars the grain
+formation is a sporadic phenomenon and not a continuous
+process. Apparently, they have been influenced by the remark by
+Gehrz \& Woolf (1970) that their data in the 3.5--11$\,\umu$m
+region of AC Her indicated a dust temperature of $\sim300\,$K. We
+find that the {\it K--L\/} colours given by Gehrz (1972), Lloyd
+Evans (1985) and Goldsmith et~al.\ (1987) are all
+consistent with each other. Surely, hot dust ($\sim 1800\,$K), if
+present at the time of observations by Goldsmith et~al.\ (1987),
+would have affected the {\it K--L\/} colour
+significantly. AC Her, like other members of its class, is
+found to execute elongated loops in the ({\it U--B\/}), ({\it
+B--V\/}) plane (Preston et~al.\ 1963), indicating that
+significant departure of the stellar continuum from the
+blackbody is to be expected. Further, their data show only a
+marginal excess at the near-IR wavelengths. We feel that the
+case for the existence of hot dust around AC Her and hence for
+the sporadic grain formation around RV Tauri stars is not
+strong. In Fig.~3 we find that AC Her and
+RU Cen lie very close to R Sct which, according to Goldsmith
+et~al.\ (1987), shows no evidence for the presence of a hot
+dust envelope.
+
+
+\subsubsection{Comparison with oxygen and carbon Miras}
+
+In Fig.~1 we have also shown the positions of a sample of
+oxygen-rich and carbon-rich Miras. At the low temperatures
+characteristic of the Miras, a part of the emission at 12$\,\umu$m
+comes from the photosphere. For a blackbody at 2000$\,$K, the ratio
+of fluxes at wavelengths of 12 and 2$\,\umu$m $(f_{12}/f_{2})\sim
+0.18$. The Miras shown in Fig.~1 have $(f_{12}/f_{2})$
+ratios larger than twice the above value. It is clear that the
+three groups of objects populate three different regions of the
+diagram. Hacking et~al.\ (1985) have already noticed that
+there are distinct differences between the {\it IRAS\/} colours
+of oxygen-rich and carbon-rich objects. On the basis of an
+analysis, using a bigger sample of bright giant stars in the
+{\it IRAS\/} catalogue, this has been interpreted by Zuckerman \&
+Dyck (1986) as being due to a systematic difference in the dust
+grain emissivity index. U Mon shows the 10-$\umu$m silicate
+emission convincingly and, in most of the other objects for
+which low-resolution spectra in the near-infrared have been
+reported (Gehrz 1972; Olnon \& Raimond 1986), the 10-$\umu$m
+emission may be partly attributed to silicates. Hence it is
+reasonable to expect that, in the envelopes around at least some
+of the RV Tauri stars, the dust grains are predominantly of
+silicates, as in the case of oxygen Miras (Rowan-Robinson \&
+Harris 1983a). The fact that none of the RV Tauri stars is
+found in the region of the two-colour diagram occupied by the
+oxygen Miras indicates that the emissivity indices of the
+silicate grains in the two cases are different. Because of the
+higher temperatures and luminosities, the environment of grain
+formation will be different in RV Tauri stars.
+
+
+\subsubsection{Correlation with subgroups}
+
+Preston et~al.\ (1963) have identified three spectroscopic
+subgroups, which are designated as groups A, B and C. Objects of
+group A are metal-rich; group C are metal-poor; group~B objects are
+also metal-poor, but show carbon enhancements (Preston et~al.\ 1963;
+Lloyd Evans 1974; Dawson 1979; Baird 1981). It is interesting
+to see that Table~1 contains no group C objects and that in Fig.~1
+there is a clear separation of the two spectroscopic subgroups A
+and B, with the demarcation occurring at an inner shell
+temperature of about 450$\,$K, group~B stars having lower
+temperatures than group A. SX Cen is the only exception. Lloyd
+Evans (1974) has reported that metal lines are stronger in SX Cen
+than in other group~B objects. It may be worth noting that SX Cen
+has the shortest period among the 100 or so objects with the RV
+Tauri classification. RU Cen has the coolest inner shell
+temperature, as already suggested by the near-infrared spectrum
+(Gehrz \& Ney 1972).
+%
+\beginfigure{3}
+\vskip 59mm
+\caption{{\bf Figure 3.} Plot of $(K$--$L)$ colours of
+RV Tauri stars detected by {\it IRAS\/} against their corresponding
+$(J$--$K)$ colours. The position of AR Pup is indicated. The three
+objects lying close to the blackbody line are AC Her, RU Cen and R Sct.}
+\endfigure
+
+Group~B objects follow a different mean relationship from those
+of group~A, having systematically larger 11-$\umu$m excess for a
+given excess at 3$\,\umu$m (Lloyd Evans 1985). For a general
+sample of RV Tauri stars, the distinction between the
+oxygen-rich and carbon-rich objects is not that apparent in the
+{\it JHKL\/} bands. In Fig.~3 we have plotted the near-IR
+magnitudes of the objects given in Table~1 (except V Vul which
+has no available measurements) in the {\it J--K, K--L\/} plane.
+The colours, taken from Lloyd Evans (1985) and Goldsmith
+et~al.\ (1987), are averaged if more than one observation
+exists, because the internal agreements are found to be often
+of the order of observational uncertainties, in accordance with
+the earlier finding by Gehrz (1972) that variability has
+relatively little effect on colours. Barring RU Cen and AC Her,
+it is evident that stars belonging to group~B show
+systematically larger excesses at {\it L\/}~band for a given
+excess at {\it K}. The low excesses at near-IR wavelengths for
+AC Her and RU Cen are consistent with the very low dust
+temperatures indicated by the far-infrared colours.
+%
+\ifsinglecol
+ \pageinsert
+ \vfil
+ \centerline{Landscape figure to go here. This figure was not
+ part of the original paper and is inserted here for illustrative
+ purposes.}
+ \centerline{See the author guide for details on how to handle landscape
+ figures or tables, and {\tt mnland.tex}.}
+ \centerline{{\bf Figure 4.}}
+ \vfil
+ \endinsert
+\else
+ \beginfigure*{4}
+ \vbox to 646pt{\vfil
+ \centerline{Landscape figure to go here. This figure was not
+ part of the original paper and is inserted here for illustrative
+ purposes.}
+ \centerline{See the author guide for details on how to handle landscape
+ figures or tables, and {\tt mnland.tex}.}
+ \caption{{\bf Figure 4.}}
+ \vfil}
+ \endfigure
+\fi
+
+It is already well established that from {\it UBV\/} photometry
+one can distinguish between groups A and~B, members of group~A
+being significantly redder than those of group~B (Preston
+et~al.\ 1963). Similarly, Dawson (1979) has found that the two
+spectroscopic groups are well separated in the DDO
+colour--colour diagrams when mean colours are used for the
+individual objects.
+
+The clear separation of the spectroscopic subgroups A and~B in
+the IR two-colour diagram suggests that the natures of dust
+grains in the envelopes in the two cases are not identical.
+This is to be expected because of the differences in the
+physical properties of the stars themselves. The average
+colours of group~B stars are bluer than group A, but the
+envelope dust temperatures of B are cooler than those of~A. The
+near-IR spectra of AC Her and RU Cen are extremely similar
+(Gehrz \& Ney 1972). The striking similarities in the optical
+spectra of AC Her and RU Cen have been pointed out by Bidelman
+(O'Connell 1961). We feel that the physical properties,
+including the chemical composition, of the grains formed in
+the circumstellar envelope strongly depend on those of the
+embedded star. This, probably, explains the diversity of the
+energy distributions of RV Tauri stars in the near-infrared
+found by Gehrz \& Ney (1972). On the basis of the observed
+differences in chemical abundances and space distribution of RV
+Tauri stars, Lloyd Evans (1985) has already pointed out that
+there is no direct evolutionary connection between group~A and
+group~B objects, thus ruling out the possibility that group~B
+objects are the evolutionary successors of group~A, in which
+grain formation has stopped and the cooler temperatures for the
+former are caused by an envelope expansion.
+
+Kukarkin et~al.\ (1969) have subdivided RV Tauri stars
+into two classes, RVa and RVb, on the basis of their light
+curves; the former shows a constant mean brightness, whereas
+the latter shows a cyclically varying mean brightness.
+Extensive observations in the near-infrared show that, on
+average, RVb stars are redder than RVa stars, and Lloyd Evans
+(1985) has suggested that in RVb stars dust shells are denser
+in the inner regions and hence radiate strongly in the
+1--3$\,\umu$m region. Fig.~3 confirms this; RVb objects show
+systematically larger ({\it J--K\/}) and ({\it K--L\/}) colours than RVa
+objects. Apparently, there is no distinction between objects of
+the two light-curve types at far-infrared wavelengths (Fig.~1).
+
+
+\section{Conclusions}
+
+In the [12]--[25], [25]--[60] colour diagram, RV Tauri
+stars populate cooler temperature regions $(T<600\,\rm {K})$,
+distinctly different from those occupied by the oxygen and
+carbon Miras. Using a simple model in which
+\beginlist
+\item (i) the envelope is spherically symmetric,
+\item (ii) the IR-emitting grains are predominantly of the same kind, and
+\item (iii) in the IR the absorption efficiency $Q_{{\rm abs}} (\nu)\propto\nu$,
+\endlist
+we find that the {\it IRAS\/} fluxes
+are consistent with the density in the envelope $\rho(r)\propto
+r^{-2}$, where {\it r\/} is the radial distance. Such a
+dependence for the dust density implies that the mass-loss
+rates in RV Tauri stars have not reduced considerably during
+the recent past, contrary to the suggestion by Jura (1986). In
+the two-colour diagram, the blackbody line and the line
+corresponding to $\rho(r)\propto r^{-2.2}$ nearly overlap and
+the present data are insufficient to resolve between the two
+cases. The latter case is more physically reasonable, however.
+
+The spectroscopic subgroups A and B are well separated in
+the {\it IRAS\/} two-colour diagram, with group B objects having
+systematically cooler dust envelopes. If we consider only the
+objects detected by {\it IRAS}, we find that stars
+belonging to group B show systematically larger excess at {\it
+L\/}~band for a given excess at {\it K}. Apparently, there is no
+correlation between the light-curve types (RVa and RVb) and the
+far-infrared behaviour of these objects. It is fairly certain
+that the physical properties, including the chemical
+composition, of the embedded stars are directly reflected by
+those of the dust grains. Most probably, the grain formation
+process in RV Tauri stars is continuous and not sporadic as
+suggested by Goldsmith et~al.\ (1987).
+
+
+\section*{Acknowledgments}
+
+I thank Professor N. Kameswara Rao for some helpful
+suggestions, Dr H. C. Bhatt for a critical reading of the
+original version of the paper and an anonymous referee for
+very useful comments that improved the presentation of the paper.
+
+
+\section*{References}
+
+\beginrefs
+\bibitem Baird S.R., 1981, ApJ, 245, 208
+\bibitem Beichman C.A., Neugebauer G., Habing H.J., Clegg P.E.,
+ Chester T.J., 1985a, {\it IRAS\/} Point Source Catalog. Jet
+ Propulsion Laboratory, Pasadena
+\bibitem Beichman C.A., Neugebauer G., Habing H.J., Clegg P.E.,
+ Chester T.J., 1985b, {\it IRAS\/} Explanatory Supplement. Jet
+ Propulsion Laboratory, Pasadena
+\bibitem Dawson D.W., 1979, ApJS, 41, 97
+\bibitem Gerhz R.D., 1972, ApJ, 178, 715
+\bibitem Gerhz R.D., Ney E.P., 1972, PASP, 84, 768
+\bibitem Gerhz R.D., Woolf N.J., 1970, ApJ, 161, L213
+\bibitem Gilman R.C., 1972, ApJ, 178, 423
+\bibitem Goldsmith M.J., Evans A., Albinson J.S., Bode M.F., 1987, MNRAS,
+ 227, 143
+\bibitem Hacking P. et al., 1985, PASP, 97, 616
+\bibitem Harvey P.M., Thronson H.A., Gatley I., 1979, ApJ, 231, 115
+\bibitem Jura M., 1986, ApJ, 309, 732
+\bibitem Kukarkin B.V. et al., 1969, General Catalogue of Variable Stars.
+ Moscow
+\bibitem Lloyd Evans T., 1974, MNRAS, 167, 17{\sc p}
+\bibitem Lloyd Evans T., 1985, MNRAS, 217, 493
+\bibitem Low F.J. et al., 1984, ApJ, 278, L19
+\bibitem McLaughlin D.B., 1932, Publ. Univ. Obs. Mich., 4, 135
+\bibitem O'Connell J.K., 1961, Specola Vaticana Ric. Astron., 6, 341
+\bibitem Olnon F.M., Raimond E., 1986, A\&AS, 65, 607
+\bibitem Preston G.W., Krzeminski W., Smak J., Williams J.A.,
+ 1963, ApJ, 137, 401
+\bibitem Rowan-Robinson M., Harris S., 1983a, MNRAS, 202, 767
+\bibitem Rowan-Robinson M., Harris S., 1983b, MNRAS, 202, 797
+\bibitem van der Veen W.E.C.J., Habing H.J., 1988, A\&A, 194, 125
+\bibitem Willems F.J., de Jong T., 1988, A\&A, 196, 173
+\bibitem Zuckerman B., Dyck H.M., 1986, ApJ, 311, 345
+\endrefs
+
+
+\appendix
+
+\section{Large gaps in {$\bf L\lowercase{y}\balpha$} forests
+ due to fluctuations in line distribution}
+
+(This appendix was not part of the original paper by A.V.~Raveendran and is
+included here just for illustrative purposes.)
+
+Spectroscopic\looseness=1\ observations of bright quasars show that the mean number
+density of ${\rm Ly}\alpha$ forest lines, which satisfy certain criteria,
+evolves
+like ${\rm d}N/{\rm d}z=A(1+z)^\gamma$, where $A$ and~$\gamma$ are two
+constants. Given
+the above intrinsic line distribution we examine the probability of finding
+large gaps in the ${\rm Ly}\alpha$ forests. We concentrate here only on
+the statistics and neglect all observational complications such as the line
+blending effect (see Ostriker, Bajtlik \&~Duncan 1988).
+
+Suppose we have observed a ${\rm Ly}\alpha$ forest between redshifts $z_1$
+and~$z_2$
+and found $N-1$ lines. For high-redshift quasars $z_2$~is usually the emission
+redshift $z_{\rm em}$ and $z_1$ is set to $(\lambda_{\rm Ly\beta}/\lambda_{\rm
+Ly\alpha})(1+z_{\rm em})=0.844(1+z_{\rm em})$ to avoid contamination by
+Ly$\beta$ lines. We want to know whether the largest gaps observed in the
+forest are significantly inconsistent with the above line distribution. To do
+this we introduce a new variable~$x$:
+$$
+ x={(1+z)^{\gamma+1}-(1+z_1)^{\gamma+1} \over
+ (1+z_2)^{\gamma+1}-(1+z_1)^{\gamma+1}}. \eqno\stepeq
+$$
+$x$ varies from 0 to 1. We then have ${\rm d}N/{\rm d}x=\lambda$,
+where $\lambda$ is the mean number of lines between $z_1$ and $z_2$ and is
+given by
+$$
+ \lambda\equiv{A[(1+z_2)^{\gamma+1}-(1+z_1)^{\gamma+1}]\over\gamma+1}.
+ \eqno\stepeq
+$$
+This means that the ${\rm Ly}\alpha$ forest lines are uniformly distributed
+in~$x$.
+The probability of finding $N-1$ lines between $z_1$ and~$z_2$, $P_{N-1}$, is
+assumed to be the Poisson distribution.
+%
+\beginfigure{5}
+\vskip 11pc
+\caption{{\bf Figure A1.} $P(>x_{\rm gap})$ as a function of
+$x_{\rm gap}$ for, from left to right, $N=160$, 150, 140, 110, 100, 90, 50,
+45 and~40.}
+\endfigure
+
+\subsection{Subsection title}
+
+We plot in Fig.~A1 $P(>x_{\rm gap})$ for several $N$ values.
+We see that, for $N=100$ and $x_{\rm gap}=0.06$, $P(>0.06)\approx 20$
+per cent. This means that the
+\ifsinglecol\else \vadjust{\vfill\eject}\fi
+probability of finding a gap with a size
+larger than six times the mean separation is not significantly small.
+When the mean number of lines is large, $\lambda\sim N>>1$, our
+$P(>x_{\rm gap})$ approaches the result obtained by Ostriker et~al.\ (1988)
+for small (but still very large if measured in units of the mean separation)
+$x_{\rm gap}$, i.e., $P(>x_{\rm gap})\sim N(1-x_{\rm gap})^{N-1}\sim N
+{\rm exp}(-\lambda x_{\rm gap})$.
+
+
+\bye
+
+% end of mnsample.tex
diff --git a/Master/texmf-dist/doc/plain/mnras/readme.txt b/Master/texmf-dist/doc/plain/mnras/readme.txt
new file mode 100644
index 00000000000..167ae336a0c
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/mnras/readme.txt
@@ -0,0 +1,15 @@
+% readme.txt (v1.1 released 2nd September 1994)
+% for Monthly Notices (plain TeX)
+%
+% The files for MN are as follows:
+%
+% README.TXT this file
+% FONTTEST.TEX a file to test all of the fonts used in the MN design
+% with your output device
+% MN.TEX the design macros
+% MNGUIDE.TEX authors' instructions
+% MNSAMPLE.TEX sample pages
+% MNLAND.TEX landscape page for sample pages
+%
+% Typeset MNGUIDE.TEX, MNSAMPLE.TEX and MNLAND.TEX for instructions
+% and examples.
diff --git a/Master/texmf-dist/doc/plain/newsletr/READ.ME b/Master/texmf-dist/doc/plain/newsletr/READ.ME
new file mode 100644
index 00000000000..53d258b0d55
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/newsletr/READ.ME
@@ -0,0 +1,76 @@
+% Save file as: AAAREAD.ME Source: FILESERV@SHSU.BITNET
+
+ NEWSLETR - A newsletter format for Plain TeX
+ Hunter Goatley
+ August 21, 1991
+
+NEWSLETR is a file of plain TeX macros that has been used for the last few
+years to publish a newsletter about a horror author (Robert R. McCammon).
+Most of the macros are original, but some came from _The TeXbook_ and other
+sources; most of these have been either rewritten or modified. The following
+files should be found here (and the names are short for people using MS-DOS):
+
+ AAAREAD.1ST This file
+ NEWSLETR.TEX The newsletter format
+ NEWSLETR.TXT List of commands in newsletter format
+ NEWSSAMP.TEX Sample newsletter file
+ NEWSSAMP.UUE Uuencoded sample .DVI file
+ LODRIVER.TEX Sample newsletter driver (part of a real newsletter)
+ LOSAMPLE.TEX Sample newsletter title page, articles, etc.
+
+The format is for plain TeX, not LaTeX---real TeXies don't use LaTeX! 8-)
+Seriously, I developed my newsletter format because LaTeX wasn't flexible
+enough for the stuff I wanted to do---namely multiple columns (1--6 columns),
+switching columns on the same page, and including figures.
+
+When you see it, some of the stuff will look kludged---but it sounds like
+what some of you are using now was kludged, so it shouldn't be much worse!
+
+Because the format file (NEWSLETR.TEX) is pretty big, I'd suggest that you
+create a new TeX format file that contains it. Under VMS using DECUS TeX,
+the command would be:
+
+ $ TEX/INIT/NOFORMAT "&plain \input newsletr \dump"
+ $ TEX/FORMAT=newsletr
+
+NEWSLETR is set up so that it can be used as an extended plain TeX (you have
+access to the macros, with all of TeX's default settings). When building
+a newsletter, you can execute \newspage to use pages that are a little taller
+and wider (7" x 9") and to change some of TeX's penalties, etc.
+
+Finally, I would like to point out a couple of features that I think would be
+useful for anybody who uses TeX for any reason. I've extracted these two
+pieces into separate files so that you can easily include them in other
+documents.
+
+As you all know, TeX requires that you use `` and '' instead of " to get
+proper double-quotes. I have written a macro that will let the double-quote
+character (") work like `` and ''. It assumes that they come in pairs, except
+that a " as the first character of a paragraph is treated as ``. To enable
+the double-quote recognition, simply add \begindoublequotes to your file.
+(You can disable it using \enddoublequotes.) Proper spacing after '' is
+maintained. (QUOTE.TEX)
+
+I've also included macros \ital and \slant for typesetting text in the
+italic (\it) and slanted (\sl) fonts, respectively. A lot of people don't
+seem to know about---or forget to use---the italic correction (\/) when
+switching among fonts. The \ital and \slant macros look at the next character
+following the parameter and add the italic correction unless the next character
+is a period or a comma, as recommended on page 14 of _The TeXbook_. Using
+these macros, you should never need to type \/ again. (ITALIC.TEX)
+
+I would appreciate being kept informed of bug fixes or improvements you make
+to the file. To that end, I've created a mailing list that can be used to
+discuss the NEWSLETR format. Feel free to post questions, problems, or
+solutions to the list; as usually with freeware, I can't promise support,
+but I use these macros too, and I'm willing to help whenever/wherever I can.
+To subscribe to the list, send e-mail with the body SUBSCRIBE NEWSLETR to
+LISTSERV@WKUVX1.BITNET. Note that this isn't a real LISTSERV, so commands
+other than UNSUBSCRIBE and REVIEW won't work.
+
+Questions, comments, or suggestions are welcome.
+
+Hunter Goatley, VAX Systems Programmer E-mail: goathunter@WKUVX1.BITNET
+Academic Computing, STH 226 Voice: (502) 745-5251
+Western Kentucky University
+Bowling Green, KY 42101
diff --git a/Master/texmf-dist/doc/plain/newsletr/losample.tex b/Master/texmf-dist/doc/plain/newsletr/losample.tex
new file mode 100644
index 00000000000..660019319ee
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/newsletr/losample.tex
@@ -0,0 +1,380 @@
+% Save file as: LOSAMPLE.TEX Source: FILESERV@SHSU.BITNET
+%% TITLE.TEX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begingroup
+\font\HUGE=cmss17 %scaled\magstep2
+
+\pageheader{}{}{}
+\pagefooter{}{}{}
+
+\setbox0=\vbox{\hsize=2.25in
+ \vskip4.25in
+ {\baselineskip=21pt
+ \centerline{\HUGE Vol.\ 1\ \ No.\ 4}
+ \centerline{\HUGE June 1990}
+ }
+ }
+
+\vbox to9in{\unvbox0
+
+\vskip 1.75in
+\vfil
+\vbox{\hbox to\hsize{\hfill
+\leftshadowbox{
+ \hsize=6in
+ \vsize=1.75in
+ \vbox to\vsize{
+ \vfil
+ {\baselineskip=19pt
+ \centerline{\HUGE Inside This Issue:}
+ }
+ \vfil
+ \centerline{$\bullet$\ "The State of Where," by \RRM}
+ \centerline{$\bullet$\ An interview with Jeffrey Sackett, by Hunter Goatley}
+ \centerline{$\bullet$\ Interviews with Al Sarrantonio and Kazue Tanaka,
+ by \RRM}
+ \centerline{$\bullet$\ A letters column}
+ \centerline{$\bullet$\ Reports on NECON X and the 1990 WFC}
+ \centerline{$\bullet$\ A Joe R. Lansdale update}
+ \centerline{$\bullet$\ News of \McC's new novel \book{Boy's Life}}
+ \vfil
+ }}
+\hfill}
+\vfil
+}} % End of \vbox
+
+\eject
+\endgroup
+
+%% EDITORIAL.TEX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Lights Out! Vol. 2 No. 1
+% Editorial page
+%
+\newbox\edboxone \newbox\edboxtwo % \newbox\edbox3 \newbox\edbox4
+\newdimen\edcolwidth
+
+%
+%\edcolwidth=\pagewidth
+%\advance\edcolwidth by -\wd\edboxone
+%\advance\edcolwidth by -\columnsep
+%\advance\edcolwidth by -\columnsep
+%
+%\setbox\edboxtwo=\vbox to 9in{\hsize\edcolwidth
+%%{\hsize 4in
+\articletitle{"And Now, the End Is Near\edots"}{A Look at the Future by Hunter
+Goatley}
+
+\begincolumns{2}
+\ninepoint \rm
+
+\noindent
+Well, once again, finally! As you all know, I think,
+this issue has been delayed because my family and I moved again, this
+time from Knoxville to Bowling Green, KY. Again, I appreciate your
+patience and understanding.
+
+Each time I go to press, the issue seems to change from what I originally
+intended. I've been telling you for awhile that this issue would feature a new
+McCammon short story---well, it doesn't. It does, however, have an essay
+entitled "The State of Where," written by \McC\ exclusively for \LO\ \ The
+essay describes where McCammon is in his career, and where he's going. I think
+you'll find it interesting.
+
+Now the bad news. As you probably gathered from the title above, I'm
+extinguishing the lights on \LO\ \ Despite my best efforts, finding the time to
+devote to the newsletter is becoming more and more difficult.
+The fact that I've only been able to do three
+issues in the last 13 months shows that something's not right.
+There are several reasons that I won't be able to keep up \LO:
+
+\beginlist\parindent=18pt
+\item{1.)} Production costs have steadily risen as I've moved around the
+ country. The last issue and this one were more expensive than
+ the previous three issues had been; in fact, much of the
+ subscription renewals went to pay for those issues. I also
+ severely
+ over-estimated the growth of \LO---the renewals since June
+ will not cover the cost of four more issues; more on that in
+ a minute.
+\item{2.)} I \slant{like} my job now. In the beginning, \LO\ was a
+ much-needed diversion from a programming job that had become
+ unbearable---only I didn't realize it at the time. Now that
+ I'm out of the "hell-job," I find myself less willing to spend
+ my free time working on \LO
+\item{3.)} I've been stepping up my writing for the technical journal
+ \book{VAX Professional}. Since 1986 I've written 16 articles
+ for them; this year I'm to start a series of programming
+ articles that will probably be published as a book.
+\item{4.)} I'm going to be teaching some programming classes this fall at
+ Western Kentucky University.
+\item{5.)} And most importantly, my almost-two-year-old daughter Margaret
+ wants---and should have---more
+ time to spend with Daddy. Lately, between work and \LO\ she
+ and Dana have had to spend too much time without me---and vice
+ versa.
+\endlist
+
+Since renewals have been lower than anticipated and new subscriptions have been
+virtually non-existent, I cannot afford to publish four more issues of
+\LO---instead of offering refunds, I've decided that there will be one more
+issue of \LO\ sometime later this year. This special issue will be longer than
+previous issues and will be available to \slant{current subscribers only}.
+Book dealers will not be selling them and I won't have any extra copies for
+sale.
+
+Rick McCammon has been a joy to work with, and when I told him of my plans
+to discontinue \LO\ he offered to help me make the last issue very special
+for you. Therefore, the next and final issue of \LO\ will feature not one,
+but \slant{two} excerpts from abandoned \RRM\ novels!
+
+Though Rick once told me that he would never show \book{The Address} to anyone,
+he has volunteered to let me publish what he had written at the time he shelved
+the book. That's about 50 manuscript pages. Rick is also providing me with the
+beginning of \book{The Midnight Man}, a novel he started last year. In addition,
+the issue will feature a brand-new interview with Rick, where we'll discuss
+\book{Boy's Life} and more about Rick's plans for the future. I'll be driving
+to Birmingham in March or April to sit down and talk with Rick, so if you have
+any questions you want me to ask him, please send them soon.
+
+As you can see, I'm planning for \LO\ to go with a {\ss BANG!} And since the
+next issue is for current subscribers only, there won't be very many copies.
+I've got plenty of back issues of issues 2 and 3 sitting around being a fire
+hazard; if you'd like extra copies of those issues, send \$1 for each copy and
+I'll mail them out immediately. The \$1 will cover postage and the envelope(s).
+There are no limits, except that the offer is available only to current
+subscribers. I still have some of issues 1 and 4, but I'm not sure how many;
+let me know if you want those issues and I'll include them as long as they last.
+Please send all correspondence to the address at the bottom of this page. And
+thanks for your patience---the last issue will be out this summer.
+
+\vskip.5\baselineskip \hrule \vskip.5\baselineskip
+{\eightpoint\ss\noindent
+On the cover: the artwork for McCammon's upcoming novel, \book{Boy's Life},
+and a magazine illustration accompanying a Japanese translation of "The Thang."
+\eoa}
+\endcolumns
+
+
+\vfill
+
+\setbox0=\vbox to 1.25in{\hsize=125pt%
+ \vfil\elevenpoint
+ \centerline{\bf Lights Out!}
+ \vfil\hrule\vfil
+ \centerline{The}
+ \centerline{\RRM}
+ \centerline{Newsletter}
+ \vfil \hrule \vfil\ninepoint
+ \line{Vol.~2\ \ No.~1\hfill February 1991\hskip2pt}
+ \vfil
+ }
+
+\setbox1=\vbox to 1.25in{\hsize=120pt%
+ \vfil\vfil
+ \centerline{\ss Published by:}
+ \centerline{\bf Hunter Goatley}
+ \vfil \hrule \vfil
+ \centerline{\LO}
+ \centerline{\POBox}
+ \centerline{\CityState}
+ \centerline{\ZipCode}
+ \vfil\vfil
+ }
+
+\setbox2=\vbox to 1.25in{\hsize=120pt%
+ \vfil\noindent\eightpoint\ss\parindent=6pt\narrower
+ Thanks to Paddy McKillop, Jodi Strissel, Paul Schulz, Adam Rothberg,
+ \& you.
+ Thanks especially to Jeffrey Sackett, Kazue Tanaka, Al Sarrantonio,
+ Joe Lansdale, and Rick \& Sally McCammon.
+ Incredibly special thanks to Dana \& Margaret Goatley!
+ % for putting up with me!
+ \par
+ \vfil}
+
+\setbox3=\vbox to 1.25in{\hsize=125pt%
+ \vfil\noindent\eightpoint\ss\leftskip=6pt
+ This newsletter was typeset on a Digital VAX 6320, using the \TeX\
+ typesetting system developed by Donald~E. Knuth.
+ \par
+ \vfil \hrule \vfil
+ \noindent\smallcopyright\ 1991 by Hunter Goatley. All rights reserved.
+ Permission to reprint required.\par
+ \vfil}
+
+
+\setbox\edboxone=\vbox{\hbox{\box0\vrule\box1\vrule\box2\vrule\box3}}
+
+\setbox\edboxone=\vbox to1.5in{
+ \boxitspace=6pt
+ \vfill
+ \boxit{\unvbox\edboxone}
+ \vfill
+ }
+
+\box\edboxone
+
+\eject % Force a page break
+
+%% KAZUE.TEX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% TeX file: KAZUE.TEX
+%
+% Desc: Interview with Kazue Tanaka, by Robert R. McCammon
+%
+% Interview Date: 03-NOV-1990
+% Transcription Date: 24-NOV-1990
+%
+\articletitle{Interview: Kazue Tanaka}{Conducted by \RRM; transcribed by Hunter Goatley}
+
+\begincolumns{2}
+\definefigs{2} % Define figures for up to 7 pages
+
+%\definefig{2}{2}{top}{\Certo}
+
+%\definefig{3}{2}{middle}{\Quote{%
+% I think it's a challenge to see the world
+% through different eyes. And I think that's what writing, in a way, is
+% all about.\qRM}}
+
+%\handlefigures
+%
+% "RM:" in 10pt roman is 22.xx pts wide, so let's put these things in boxes
+% that size with about 5pts whitespace following them.
+%
+\def\RM:{\vskip6pt\noindent\hbox to27pt{\bf RM:\hfil}}
+\def\KT:{\vskip6pt\noindent\hbox to27pt{\bf KT:\hfil}}
+
+
+\ednote{Ms.~Kazue Tanaka is a Japanese writer/translator who has translated
+\RRM's stories from \book{Night Visions IV} into Japanese. The following
+interview was conducted at the 1990 World Fantasy Convention, where Ms.~Tanaka
+finished up a month-long visit to the United States. Ms.~Tanaka is currently
+at work translating \McC's 1981 vampire epic, \book{They Thirst}.
+%\hfill\break\vskip-12pt
+}
+
+\RM: I'd like to know how you go about translating, say, one of my books.
+Do you read the book first?
+
+\KT: Yes. Usually I read the book a couple of times and then I start
+translating. Maybe you know that we have a completely different grammatical
+diction from English, so we can't put a word in the same order in Japanese.
+Usually I read a sentence and grasp the meaning of it and reconstruct it in
+Japanese.
+
+\RM: I would think that would be very difficult to do.
+
+\KT: It is!
+
+\RM: I'm sure it is, because there's such a great difference in the grammatical
+form. You have to be very careful, I guess, in terms of reading in English and
+translating to Japanese. That seems to me to be very difficult. How did you
+train to do this?
+
+\KT: Usually we have some kind of mentor or teacher.
+
+\RM: Were you like an apprentice, and someone teaches you to do this?
+
+\KT: Yes. We put the original stories [beside] the translations and compare
+the sentences.
+
+\RM: How long would it take you to translate \book{They Thirst}?
+
+\KT: It depends on how long the story is. \book{They Thirst} will take at
+least three months. How long did it take you to write~it?
+
+\RM: Well, it took about six or seven months to write.
+
+\KT: Maybe I'll need that kind of time, too!
+
+\RM: But it's almost like, if you're interpreting, you're almost doing some
+writing yourself. If you're making something more concise, or---do you do that?
+Are you abridging? Do you think anything gets changed in the translation?
+
+\KT: We try not to change, but sometimes a little change is necessary. We
+don't have some things that you have here in America. For instance, some brand
+names. We don't have the culture of your country, and the Japanese readers
+don't know if I translated correctly, but it is impossible for Japanese readers
+to understand that culture. Maybe, in that case, things get changed sometimes.
+
+\RM: Do you feel that you interpret the story more so your countrymen can
+understand what's going on in the book? Do you think you add more of your
+culture to the story?
+
+\KT: Basically, we don't add anything, we don't take away anything. But in
+that case, we explain [the cultural differences] after the story in an
+afterword.
+
+\RM: How many books have you translated?
+
+\KT: Maybe twelve, or something. Among them, \book{Brain Child}, by John Saul,
+and some mysteries. I'm going to translate some stories of Orson Scott Card's.
+
+\RM: I think it would be very interesting, if I could read Japanese, to read my
+book and see what the changes are. Or how it's geared toward that culture.
+
+\KT: Conversation---when people talk---is very difficult to put
+into Japanese. If the character is a woman, a man, a boy, or a girl, Japanese
+has a very distinctive way of speaking. Especially between a man and woman.
+English does not have as much difference.
+
+\RM: Well, that's fascinating. I think it would be a very tough thing to
+do---to translate something into an entirely different culture and still have
+the flavor of the American version, at least. I wouldn't want to do it---I
+don't think I could do it very well.
+
+\KT: Your stories are very American---that may be why they appeal to Japanese
+readers.
+
+\RM: Really? I was going to ask you why my stories appeal---if they do
+appeal---to Japanese readers. Well, first, I didn't know that horror fiction
+was so popular in Japan. Is it? Is it becoming more popular? What do you
+think the situation is?
+
+\KT: Your [novels] have not been translated at all yet. So, apart from you,
+Stephen King and Dean~R. Koontz are very popular---they are as popular as
+other big writers. Other horror writers are not so well-known. Some very keen
+fans like American horror.
+
+\RM: Why do you think that is? King and Koontz are definitely very American
+writers. Do you think that's their appeal---the American style?
+
+\KT: Yes, I do.
+
+\RM: Not necessarily because of the story being told, but because maybe it's
+told in an American voice?
+
+\KT: Yes, sometimes. I'm still trying to [learn] the American voice---it's
+very hard to do.
+
+\RM: Well, I know that's very tough to do, and I'm looking forward to seeing
+the books when they are translated.
+
+\KT: I'm looking forward to it too!\eoa
+
+\endcolumns
+
+%% NEXTTIME.TEX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\vfill
+
+\begingroup
+\font\HUGE=cmss17 %scaled\magstep2
+\setbox0=\vbox{\hsize=5in
+ \twelvepoint\ss\noindent%
+ The final issue of \LO\ will feature excerpts from \RRM's unpublished
+ novels \book{The Address} and \book{The Midnight Man}, a brand-new
+ interview with \McC\ about \book{Boy's Life}, more author
+ interviews, and the latest news! Coming Summer 1991!
+ \vfill%
+ }
+
+\centerline{\shadowbox{\vbox to 1in{%
+ \hsize=6in
+ \vfil
+ \offinterlineskip
+ \noindent\hfil\box0\hfil
+ \vfil
+ }}}
+
+\endgroup
diff --git a/Master/texmf-dist/doc/plain/newsletr/newsletr.txt b/Master/texmf-dist/doc/plain/newsletr/newsletr.txt
new file mode 100644
index 00000000000..df802b00264
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/newsletr/newsletr.txt
@@ -0,0 +1,134 @@
+% Save file as: NEWSLETR.TXT Source: FILESERV@SHSU.BITNET
+ Help for NEWSLETTER_FORMAT.TEX
+ Hunter Goatley
+ August 21, 1991
+
+\newspage - Sets up larger page for newsletter (taller/wider)
+\DATE - Include current month and year (July 1989)
+\include{file.ext} - Include a .TeX file (prints message)
+\say{Message} - Writes a message to the terminal
+\newpage - Begin a new page
+\nullpage - Creates an empty page with header/footer in place
+\nullline - Creates an empty line
+
+\ignoreunderfill - Avoids undervfill and underhfill messages
+
+\articlesep - Article separator; creates hrule = \hsize
+
+\ital{text} - Set in \it font (with proper italic correction)
+\slant{text} - Set in \sl font (with proper italic correction)
+\book{Title} - Book titles (uses \ital)
+
+\Quote{quote}{quotee} - Insert a quote with the quotee in small caps font
+\beginquote - Begins a quote; draws hrule, indents, larger font
+\endquote - Ends a quote; resets font to original size
+
+\articletitle{Title}{Byline}
+ - Builds an articletitle box (see example)
+\coltitle{Title} - Builds boxed title for use in double-column format
+
+\headfootrule=Xpt - Define height of rule in header & footer
+\columnsep=Xpt - Amount of space between columns in multi-column mode
+\columnwidth=Xpt - Width of a column in multi-column mode (calc. by def.)
+\columnseprule=Xpt - Width of vertical rule between columns (can be 0pt)
+\begincolumns{x} - Begins multiple-column mode (1 < X < 7)
+\endcolumns - Ends multiple-column mode
+
+\definefigs{#ofPages} - Initializes figures for multi-column mode
+\handlefigures - Must be specified right after \definefigs (bug)
+\definefig{Page}{Col}{Pos}{box}
+ - Defines a figure
+\abovedisplayskip - Amount of vskip before middle and bottom figures
+\belowdisplayskip - Amount of vskip below top and middle figures
+
+\shadowbox{some_box} - Draw a shadow box around an hbox or vbox
+\leftshadowbox{somebox} - Draw a left-hand shadow box around an hbox or vbox
+\centerbox{somebox} - Center a \vbox on a page
+\boxshadowsize=Xpt - Width of shadow boxes
+\boxit{some_box} - Draw a box around an hbox or vbox
+\boxitrule=Xpt - Width of rules used to draw boxes
+\boxitspace=Xpt - Space between box rules and box contents
+\bestbreak - Tell TeX that this is a pretty good place to break
+\ednote - Do editor's note in a box
+
+\listindent - Specify the amount to indent lists
+\beginlist - Begin a simple list of dotted items
+\endlist - End item list
+\beginlistt{title} - Begin list with a title (attached with vglue)
+\endlistt - End list with title (ends with \par)
+\dotitem - Item list with a bullet
+
+\beginbibliography - Begin a bibliography - main setup
+\endbibliography - End a bibliography
+\beginbiblist - Begin a list of references
+\beginanotherlist - Begin a dotitem list inside a \beginbiblist
+\endbiblist - End a bibliography list of references
+\ENUM item - Number items in a list
+\ENum item - Don't number, but indent as if number is present
+\NoENUM item - Don't number; start text where number would appear
+\bibshort{Title} - Short story entry
+\bibbook{Title} - Book entry
+\bibview{The...} - Interview entry
+\subbib{Subheading} - Subtitle for an entry
+\bibsectitle{title} - Adds a bibliography section title (BOOKS, etc.)
+
+\begindoublequote - Enable double-quote as a macro
+\enddoublequote - Disable double-quote as a macro
+" - Alternates between `` and ''
+\eoa - End of Article; draws black rectangle at right of line
+\smallcopyright - Insert a small (7pt) copyright character
+\farright{text} - Place text flush against the right-margin, possibly
+ on a new line if it won't fit.
+\ellip - Insert ellipsis with proper spacing (word\ellip word)
+\edots - Insert ellipsis at end of sentence (4 dots)
+
+The font commands below redefine \sl, \it, \bf, \rm, \ss, and \ssi for that font
+
+\twelvepoint - Switch to twelve-point fonts
+\elevenpoint - Switch to eleven-point fonts
+\tenpoint - Switch to ten-point fonts
+\ninepoint - Switch to nine-point fonts
+\eightpoint - Switch to eight-point fonts
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ These macros implement the headers and footers for the newsletter format.
+ The macros accept three parameters: text that is to appear flush-left on
+ the line, text that should be centered, and text that should be flush-right
+ on the line. Parameters can be omitted by specifying empty braces ({}).
+
+ The following macros are defined for headers and footers:
+
+ \evenpageheader{LEFT}{CENTER}{RIGHT}
+ \oddpageheader{LEFT}{CENTER}{RIGHT}
+ \evenpagefooter{LEFT}{CENTER}{RIGHT}
+ \oddpagefooter{LEFT}{CENTER}{RIGHT}
+
+ If the headers/footers are the same for even & odd pages, the following
+ macros can be used instead of the four above:
+
+ \pageheader{LEFT}{CENTER}{RIGHT}
+ \pagefooter{LEFT}{CENTER}{RIGHT}
+
+ Additional header/footer definitions:
+
+ \pageheaderlinetrue - A line should extend below header text
+ \pageheaderlinefalse - Header does NOT have a line
+ \pagefooterlinetrue - A line should extend above footer text
+ \pagefooterlinefalse - Footer does NOT have a line
+ \headfootrule=Xpt - Thickness of header/footer lines
+ \pageheaderskip=Xpt - \vskip between header and line
+ \pagefooterskip=Xpt - \vskip between footer and line
+ \headfont=\fontname - Font to use for header text
+ \footfont=\fontname - Font to use for footer text
+
+ Example:
+
+ \pageheader{}{My Newsletter}{}
+ \pagefooter{#1}{}{\pageno}
+
+ Defaults:
+
+ \pageheaderlinefalse \pagefooterlinefalse
+ \pageheaderskip=4pt \pageheaderskip=4pt
+ \pageheader{}{}{} \pagefooter{}{}{}
+
diff --git a/Master/texmf-dist/doc/plain/newsletr/newssamp.tex b/Master/texmf-dist/doc/plain/newsletr/newssamp.tex
new file mode 100644
index 00000000000..006946ed2d9
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/newsletr/newssamp.tex
@@ -0,0 +1,267 @@
+% Save file as: NEWSSAMP.TEX Source: FILESERV@SHSU.BITNET
+%
+% File: NEWSLETTER_SAMPLE.TEX
+%
+% Functional description:
+%
+% This file is a sample TeX file to demonstrate the functionality of the
+% NEWSLETTER_FORMAT macros.
+%
+% It depends on the file NEWSLETTER_FORMAT.TEX.
+%
+% Author: Hunter Goatley
+%
+% Date: August 15, 1991
+%
+\ifx\undefined\eoa\input newsletr \fi % Include macro definitions
+\say{Producing sample newsletter}
+%
+% Define the page headers and footers. Different for even/odd pages.
+%
+\pageheaderlinetrue \pagefooterlinetrue
+\evenpageheader{}{Goat Droppings!}{}
+\oddpageheader{}{My Newsletter}{}
+\evenpagefooter{August\ 1991}{}{Page\ \folio}
+\oddpagefooter{Page \folio}{}{Vol.\ 1\ \ No.\ 1}
+
+\begindoublequotes % Handle double quotes
+
+\ignoreunderfill % Ignore undervfill errors
+\parskip=0pt % Don't skip between paragraphs
+\parindent=18pt % Indent paragraphs 18pt
+\rm % Use tenpoint roman
+
+%
+% Define a few commands to make typing easier.
+%
+\def\RRM{Robert~R. McCammon}
+\edef\TeX{\TeX\null}
+\def\LaTeX{{\rm L\kern-.36em\raise.3ex\hbox{\quoteefont a}\kern-.15em
+ T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
+%
+% Now define a short verbatim, which can be used for short strings:
+%
+\def\cmd#1{{\tt\string#1}}
+
+%
+% Setup for newsletter page (a little taller and wider, with increased
+% \tolerance, etc.)
+%
+\newspage
+
+%\nullpage % Null page w/ head/foot
+
+%
+% Now start the first article. Do the article in double-column format.
+%
+% The title and by-line are written in a double-box.
+%
+\articletitle{Using \TeX\ to Do A Newsletter}{By Hunter Goatley}
+
+\begincolumns{2} % Begin double-columns
+
+%
+% Reserve boxes for up to 3 pages of figures.
+%
+\definefigs{3}
+
+%
+% Define a quote as a figure in the middle of column 2 on page 1 of this
+% article.
+%
+\definefig{1}{2}{middle}{\Quote{%
+ Nothing beats \TeX\null. Nothing.}{Hunter Goatley}}
+%
+% Now do one that extends across the whole page.
+%
+\definefig{2}{0}{top}{\hsize=\normalhsize%
+\vbox{\centerline{\shadowbox{%
+ \hsize=5in
+ \vsize=.5in
+ \vbox to\vsize{
+ \vfill
+ \centerline{This is inside a \cmd{\shadowbox}.}
+ \vfill
+ } %End vbox
+ } %End shadowbox
+ }} %End vbox
+ \vskip12pt
+ \centerline{This is a figure across the whole page.}
+ } %End definefig
+
+\handlefigures % Necessary, but shouldn't be.
+\noindent
+This document attempts to describe how my plain \TeX\ newsletter format works.
+The documentation is sparse, but I hope to let it speak for itself through
+the use of examples. Will they be meaningful examples? Probably not. But,
+hey, I'll give it a shot.
+
+I started producing {\it Lights Out!---The \RRM\ Newsletter\/}
+in June 1989. For those who don't know, \RRM\ is a very popular author whose
+books have primarily been categorized in the horror genr\'e. His latest,
+\book{Boy's Life}, was published in hardcover by Pocket Books in August 1991.
+\book{Boy's Life} is {\sl not\/} horror---it's a wonderful tale of how 1964
+looked to a 12-year-old boy. There's a mystery, but the book is primarily
+about remembering life when you were young. I urge you to find the book and
+give it a try. Here are quotes from a couple of reviews of McCammon's previous
+novel, \book{Mine}:
+
+%
+% A sample \dotitem'ed list.
+%
+\bgroup % Start a new group to keep \listindent local
+\listindent{10pt}\beginlist
+\dotitem "\book{Mine} grips you tightly by the throat, right at the
+ start, and squeezes\edots" \farright{---\book{The New York Daily
+ News}}
+\dotitem "McCammon at his very best\ \dots\ and then some."
+ \farright{---\book{The Birmingham News}}%
+\endlist
+\egroup
+
+\noindent % Don't indent the paragraph after the quotes.
+Well, enough about \RRM. Even if you don't like horror, I think you'll like
+McCammon's work. Other titles include \book{Swan Song}, \book{Blue World},
+and \book{Mystery Walk}.
+
+I'll now break and we'll start a new sub-article under this main
+article. I used this approach in a regular column entitled "Things Unearthed,"
+which consisted of various news items about new book releases and other
+news items.
+
+%
+% Begin a new sub-article. \coltitle draws a box around the title. This
+% one has two centered lines, with a box around it.
+%
+\articlesep
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\coltitle{\centerline{Why I Chose \TeX\ Over}\break
+ \centerline{Ventura and PageMaker}}
+
+When I decided I was going to start producing a newsletter, I started looking
+at the options I had available to me. Because I'm a VAX systems programmer,
+I preferred to use something on the VAX. I had had some exposure to \TeX\ and
+knew that it would do the job, but I thought I'd look at PC-based choices.
+
+I played around with PageMaker some, and read about Ventura---and decided that
+they were way too clumsy to do what I wanted. I liked the fact that \TeX\ used
+regular text files with embedded commands---I could use the editor I was
+accustomed to, \TeX\ was available for a variety of platforms, and \TeX\ was
+incredibly flexible.
+
+So I decided on \TeX, I had to decide if I was going to use \TeX\ or \LaTeX.
+But that's another sub-article.
+
+\articlesep % Line to separate arts
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\coltitle{\centerline{Why I Chose Plain \TeX}\break % Column title box
+ \centerline{Instead of \LaTeX}}
+
+I had originally intended to use \LaTeX, because that's what the technical
+writing group of my employer-at-the-time was using to produce their manuals.
+I knew that I wanted multiple columns and to be able to switch back and forth
+between single- and double-columns on the same page at will. After trying
+many variations of the \LaTeX\ double-column style, I finally decided I
+couldn't easily do it. (This was before Frank Mittelbach's \LaTeX\ macros
+appeared in {\it The TUGboat\/}.)
+
+So, once I decided on \TeX, I decided I better learn about \TeX\ so I could
+write my own macros. Two years later, I still modify the file some, but it
+has been lots of fun and I learned a whole lot about \TeX.
+
+I've since learned that, apparently, not many people use plain \TeX.
+Personally, I don't know why everybody flocks to \LaTeX---plain \TeX\ is
+so much more flexible. It is true that you need a default set of macros
+to get you going, but once they're there, I believe \TeX\ is actually
+easier to use than \LaTeX.
+
+An aside here: if you haven't seen \book{\TeX\ for the Impatient}, by Paul~W.
+Abrahams, I strongly recommend a copy. It's a great reference book for
+plain \TeX, and his {\tt eplain.tex} (Extended Plain \TeX) provides some
+very useful macros. It was published last year by Addison-Wesley.
+
+\articlesep
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\coltitle{\centerline{Some of the Highlights}\break
+ \centerline{of the Newsletter Format}}
+
+There are variety of commands provided by my newsletter format. Because
+{\it Lights Out!\/} covered a horror author, some of the commands are
+specifically designed to handle books and interviews. While I was developing
+the format, I tried to make sure that I kept things as generic as possible
+so that it could be used to generate other newsletters. It remains to be
+seen if whether or not I was successful.
+
+%The next page features a list of some of the commands that are available
+%and how they're used.
+
+I've included the commands \cmd{\twelvepoint}, \cmd{\elevenpoint},
+\dots, \cmd{\eightpoint} to change font sizes. I didn't do these
+the "official" \TeX\ way (font families) out of laziness. To get the
+eight-point font {\tt cmss8} you simply type: \cmd{\eightpoint\string\ss},
+probably within a group.
+
+My multiple columns command supports up to 6 columns on a page. When you
+increase the number of columns on a page, you usually need to change
+the font size (for three columns, I switched to the {\tt cmss8} font---it
+seemed to work out OK because the sans serif font helped differentiate
+between the "Letters" column and the rest of the newsletter).
+
+One of the things that seems to be hardest in \TeX---especially when multiple
+columns are involved---is the insertion of figures. I like things to be
+very structured---the mathematical side of me, I guess---so when I added
+figure support to my macros, I did it by setting up my multiple column
+output routine to place figures in certain locations on a page. You can
+specify that a figure is inserted across the entire page at the top and
+bottom of the page, or at the top, middle, or bottom of each column.
+Here comes the really kludgy part of my format.
+
+The macro \cmd{\definefigs} must be executed to tell \TeX\ how many pages
+are following that may contain figures. What happens is that a large block
+of boxes is allocated. I tried various combinations to make it more dynamic,
+but had little luck. Because of time constraints, I went with the way that
+worked. This shouldn't really cause a problem, because you define figures
+within an article, and most articles aren't so long that you exceed the number
+of boxes \TeX\ has. The command to define a figure is:
+\vskip\baselineskip
+\centerline{\cmd{\definefig\string{Page\string}\string{Column\string}%
+ \string{Position\string}\string{Box\string}}}
+\vskip\baselineskip
+where \cmd{Box} is a \cmd{\vbox} containing your figure. This can be an empty
+\cmd{\vbox} \cmd{\vfill}'ed to the correct size for later pasting. The quote
+on the previous page was inserted with a \cmd{\Quote} as the argument to
+the \cmd{\definefig} command.
+
+That's all I'm going to say about the commands for now. Notice that when
+you end the double columns, they are automatically balanced.\eoa
+
+\endcolumns % End of double columns
+
+
+\articlesep % Separate the articles w/ rule
+
+%
+% Now do another article in single column format.
+%
+\articletitle{This Is Another Article}{By Me, Of Course}
+
+\begincolumns{3}
+
+This is more just to show that you can also do three-columns on the same page
+with single- and double-column formats without \TeX\ complaining about it.
+I hope this example has been of some use to you.
+
+Note that balancing these columns still has a few glitches---but nothing adding
+or subtracting a few words won't fix. I've been using this format to generate
+five newsletters so far.
+
+\endcolumns
+
+\articlesep
+
+This is more just to show that you can keep both single-, double-, and
+triple-column formats on the same page. \TeX\ won't complain about it
+at all (usually).\eoa
+
+
+\bye
diff --git a/Master/texmf-dist/doc/plain/patch/patch.doc b/Master/texmf-dist/doc/plain/patch/patch.doc
new file mode 100644
index 00000000000..9f70895d02f
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/patch/patch.doc
@@ -0,0 +1,543 @@
+%\iffalse This is patch.doc, and it's -*-LaTeX-*- text
+%% patch.doc/patch.tex
+%% (c) 1994 by David Kastrup (dak@pool.informatik.rwth-aachen.de)
+%% Version 0.91
+%% Redistribution of patch.doc is allowed, provided it is not modified
+%% in any way. The stripped version patch.tex may only be distributed
+%% as part of other packages, and only if the unstripped version
+%% is distributed on demand.
+% Stripping is to be done by removing all lines starting with a single
+% percent sign.
+% You may extract a driver file for printing the documentation with
+% the doc style package by extracting all lines starting with
+% %<+driver>, while removing the %<+driver> directive.
+%\fi
+% \CheckSum{360}
+% \title{Using {\tt patch.tex}}
+% \author{David Kastrup\\dak@pool.informatik.rwth-aachen.de}
+% \date{January 22, 1994}
+% \maketitle
+% \MakeShortVerb\"
+% \begin{abstract}
+% Often one has the need to use a preestablished format, such
+% as~\LaTeX, but with some slight changes to some of the macros.
+% Of~course, it is possible to just copy the offendin maco
+% definitions into your application or style file, and~modify them
+% there. This can lead to parts of your macros being from different
+% versions of \LaTeX{} resp.~\TeX.
+%
+% This input file is a tool for replacing just parts of existing macros
+% by user defined parts. If those parts are no longer recognizable,
+% an~error message is produced, calling the user to~attention.
+% \end{abstract}
+% \tableofcontents
+% \section{User Interface}
+% The macros defined here will allow ``patching'' up already existing
+% macros. A~typical example, included from a~style file used for
+% typesetting Greek text (to~appear in "kdgreek") is the following:
+%\begin{verbatim}
+%\input patch.tex
+%\ifx\descriptionlabel\undefined\else
+%\gpatch\descriptionlabel#1{{#1}}{%
+% \bf {\grbf}} \fi
+%\ifx\@part\undefined\else
+%\gpatch\@part[#1]#2{[#1]{#2}}{%
+% \bf\partname~{\grbf\partname\nobreak\ }%
+% \bf {\grbf}} \fi
+%...
+%\endpatch
+%\end{verbatim}
+%This shows almost all features that are really there. You start by
+%inputting "patch.tex". This, among other things, opens a~local
+%group in which all of the definitions of~"patch.tex" are read~in.
+%In~order not to use up unnecessary hash~space, almost all local
+%commands are in the form~"\^^80" and upwards. For this reason,
+%you cannot {\em use\/} any macros of yours with such names
+%(Note: they are {\em
+%not\/} active characters, but rather regular one-letter control
+%sequences), and you should not patch them, but you can patch any
+%macros containing them, or patch them into macros.
+%
+%One macro is {\em very\/} special and must not appear in any macro
+%you patch, nor in any arguments to~"\patch": this is~"\@ndp@tch".
+%
+%\DescribeMacro{\patch}
+%\DescribeMacro{\gpatch}
+%You follow the "\input" by several "\patch" or "\gpatch"
+%commands. These commands
+%consist of several parts:
+%\begin{itemize}
+%\item[Optional "\bslash long"] for definition of macros possibly containing
+% "\par" tokens in their arguments. Note that the prefixes "\global"
+% and~"\outer" are not supported. "\global"ness is achieved by~usage
+% of~"\gpatch" as opposed to~"\patch", and is explained later, and
+% "\outer" macros are detestable.
+%\item ["\bslash patch" or "\bslash gpatch"] To be expected.
+%\item [\meta{Argument list}] which is the argument list the macro will
+% have in the patched version (usually the same as the original one).
+% It~is terminated by the opening brace of
+%\item [\meta{Argument replacement}] which is enclosed in braces. This
+% is fed as an argument list into the old macro, in order to get the
+% replacement text for the new macro. Basically this means that you
+% will have to use, say, "{#1}" for an undelimited parameter~"#1",
+% "#1@" for a delimited parameter "#1@", and "@$#!?!!" for a brace
+% delimited parameter "#1#{" (don't try patching any macros like
+% that. Presume you have never heard of~them).
+%\item [\meta{Substitution list}] This contains a~brace enclosed list
+% of~replacements. Each replacement consists of
+% \begin{itemize}
+% \item [\meta{Matching sequence}] which is a sequence of tokens not
+% containing any braces. If really need to match braces, you can
+% match by using implicit braces you get by saying something like
+% "\let\openbrace={". If you think of using the default implicit
+% braces "\bgroup" and~"\egroup", forget~it. They are used in
+% several macros we might want to~patch, and thus are disabled
+% by~default.
+% \item [\meta{Replacement sequence}] which is enclosed in~braces.
+% Again, if you want braces to appear in your replacement, you can
+% make that happen by using implicit braces. Matched braces,
+% however, you may include explicitly.
+% \end{itemize}
+%\end{itemize}
+%\DescribeMacro{\endpatch}
+%Then the patches are followed by~"\endpatch", which closes the group
+%opened by~"\input", thus freeing up almost all \TeX{} space
+%"patch.tex" took up. Since~mismatched patches can be hard to
+%diagnose, "\endpatch" is defined as being~"\outer". As~long as
+%the "\outer" nuisance prevails, we~might use it for what it~is
+%useful~for.
+%
+%That's all there is to it! Except for the "\global" issue we promised
+%to explain\dots{}
+%Usually you will be patching macros of some style, and there will be no
+%point in using~"\patch" instead of~"\gpatch". So~mostly "\gpatch" does
+%no harm, and will cause a~global definition. "\patch", on the other
+%hand, has the problem that its definitions should hold in the group
+%ended by~"\endpatch", but not globally. So~"\patch" cannot just make
+%the definitions. Instead, it collects the new definitions, and~does
+%them all at~"\endpatch".
+%
+%\DescribeMacro{\globaldefs}
+%Here is one friendly feature: If "\globaldefs" is negative,
+%"\gpatch"~will invoke "\patch" instead of its own behaviour, so that
+%local patches will be performed instead of none at~all (since the then
+%non-global definition would disappear at~"\endpatch"). This feature was
+%deemed desirable\footnote{Reason:
+%I~made an example file showing the effects of several
+%"\bslash documentstyle" commands with my Greek macro set. The Greek style
+%patched up some \LaTeX{} macros, and this was wanted only
+%locally, namely for the length of the demonstration of one particular
+%document style.}.
+%\subsection{Things to beware of (aka bugs)}
+%"patch.doc" is a very simple package (sort~of). It can fail for
+%a~number of reasons, and is not applicable in every situation. You
+%will have problems if
+%\begin{enumerate}
+%\item You use implicit tokens which are implicit at the time the
+% patches are applied. "\bgroup" and~"\egroup" are explicitly disabled
+% for this reason. Implicit spaces will be regarded as explicit ones
+% by~"\patch". Implicit macro parameter characters I~am not so sure
+% about. \TeX~behaves pretty wierd with regard to them anyhow. Other
+% implicits should do no~harm. "\patch"~will take the problematic
+% implicit
+% tokens for explicit ones while it is analyzing tokens. It analyzes
+% both matching and replacement tokens, and all tokens in the original
+% macro up to the last replacement performed. This means that, for
+% example, matching implicit braces in locations where you did not
+% intend it can lead to mismatched explicit braces and lots
+% of~confusion.
+%\item You use outer tokens in any respect.
+% "\patch" does not care for them.
+%\item When "\@ndp@tch" appears anywhere, namely in a~macro to be
+% patched, or in a matching or replacement sequence. It~is used for
+% internal purposes, and you can cause lots of confusion when
+% using~it. This means, for one thing, that you should not try
+% "\patch"ing up any macros of this package with itself.
+%\item And this is harsh: if the macro you patch contains "#" marks
+% (which originally were produced by writing "##") these will not be
+% reduplicated, leading to missing parameter number errors (which will
+% do the right thing if you ignore them, but that's ugly), or to
+% recombination with a following number, which is plain wrong. You can
+% work around this ugliness in an~ugly way: specify a~replacement
+% "#{##}" for any such token. I~am pretty much afraid I~know no
+% better way around this one.
+%\item Since "\bgroup" and~"\egroup" are disabled, using any macro that
+% in turn uses those will not work while in patch~mode. What
+% I~guarantee to keep working in future versions is "\let" (locally,
+% for making implicit tokens),
+% all expandable constructs (like conditionals) not
+% using any of the macros of this package, and~"\patch"es.
+% Other things are not necessarily supported in patch~mode.
+% Specifically, do not use "\def" or~"\gdef", since manipulation of
+% localness might unnecessarily be thwarted if you~do.
+%\item Do not change "\toks@" in any way, or use a~macro changing it.
+% Cannot happen really, if you listen to the last advice.
+%\item Do not rely on the patches either taking place or not before the
+% final "\endpatch"! This means, do not use a~patched macro before
+% "\endpatch" in ways which require specifically the patched or
+% the unpatched version. For example, do not patch one and the same macro
+% with two separate "\patch" commands in the same patch session! The
+% reason for this is the collecting behaviour for non-global patches.
+% And you never really know when a~package of yours might come handy
+% non-globally.
+%\item For similar reasons,
+% do not use "\input patch.tex" in a local group when you are doing
+% "\gpatch"es (unless you know what you are doing, as in the case of
+% negative~"\globaldefs"). It~might get to~being a~problem sometime.
+%\item Never set "\globaldefs" to a~non-zero {\em positive\/} value
+% while working with~"\patch", since it will interfere disastrously with
+% "patch.tex"'s internals, which heavily work with local groups.
+% Anyway, "patch.tex" is by its nature intended for local use only.
+%\item Just as a note aside: it is a~very bad idea to set "\globaldefs"
+% to non-zero values longer than strictly necessary. It is especially
+% a~bad idea to set it to a~negative value while {\em typesetting\/}
+% anything,
+% because the output routine (implicitly enclosed in a~group) will
+% never be able to get anything done permanently, and will therefore
+% be repeated over and~over.
+%\end{enumerate}
+%
+%Ok, this should be all there really is to it. If I~look that list over
+%again, it seems like groups really occupy my fantasy.
+%
+%Happy "\patch"ing!
+%\StopEventually{\PrintIndex}
+%\section{The Implementation}
+%We begin by opening our local group and making private control
+%sequences accessible:
+% \begin{macrocode}
+\begingroup
+\catcode`@=11
+% \end{macrocode}
+%We then set "\toks@" to the initial set of~actions to~perform at the
+%end of the~patches.
+% \begin{macrocode}
+\toks@={\endgroup}
+% \end{macrocode}
+% \begin{macro}{\endpatch}
+% Rather simple. "\outer"~seems not to do much harm here. It might
+% help better pinpointing severe failures when using~"\patch".
+% \begin{macrocode}
+\outer\def\endpatch{\the\toks@}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\futuredef}
+% This is somewhat similar to "\futurelet", only not at~all. It
+% defines the macro which is its first argument as~code which can
+% by use of~"\aftergroup" reproduce the third argument~token,
+% and after doing that it will call the second argument.
+% All~arguments are removed from the input, unlike "\futurelet"'s
+% behaviour.
+% \begin{macrocode}
+\def\futuredef#1#2{\begingroup
+% \end{macrocode}
+% We do this locally, and set up a few things to do after the
+% group. Since a~"\def" is going to finish what we want, we can
+% insert the ``do-after'' token via "\afterassignment".
+% \begin{macrocode}
+ \aftergroup\afterassignment \aftergroup#2%
+ \aftergroup\def \aftergroup#1%
+ \futurelet\next\^^90}
+% \end{macrocode}
+% \end{macro}
+% We still have the token in our input stream, but also a copy of
+% its meaning in "\next". We first try out some cases which will
+% not allow us to treat the next token as an undelimited macro
+% parameter. Of course we cannot distinguish explicit from implicit
+% tokens, but we rely on the user to explicitly unimplicate possibly
+% implicit characters. We will do this ourselves with the following
+% two ones:
+% \begin{macrocode}
+\let\bgroup\relax \let\egroup\relax
+% \end{macrocode}
+% Now we start checking all problematic cases.
+% "\^^90" will substitute an appropriate definition given
+% explicitly instead of the following token. If we can, however, we
+% rather use the token we get. If you wonder about this name, here
+% is why: we have to use hosts of macros because of various
+% "\futurelet"-like constructions. Patches occur just in a local group,
+% and should not permanently require resources. If we did not use
+% one-letter control sequences here, the hash table size would be
+% somewhat reduced, permanently, because entries never leave the
+% hash table. One letter control sequences, however, are not
+% hashed, and can disappear without a trace again.
+% \begin{macrocode}
+\def\^^90{%
+ \ifcat\noexpand\next{%
+ \^^91{\aftergroup{\iffalse}\fi}%
+ \else\ifcat\noexpand\next}%
+ \^^91{\iffalse{\fi\aftergroup}}%
+ \else\ifcat\noexpand\next\space
+ \^^91{\expandafter\aftergroup\space}%
+ \else\ifcat\noexpand\next##
+ \^^91{\aftergroup########}%
+ \else
+ \let\next\^^93%
+ \fi\fi\fi\fi\next}
+% \end{macrocode}
+% "\^^91" is rather simple. We save the definition in
+% "\next@", and we'll call upon this after disposing of the next
+% token.
+% \begin{macrocode}
+\def\^^91#1{\def\next@{\endgroup{#1}}%
+ \let\next\^^92}
+\def\^^92{\afterassignment\next@ \let\next= }
+% \end{macrocode}
+% "\^^93" will actively get the next token, and produce an
+% "\aftergroup" definition from that. It is "\long" in case we are
+% dealing with a "\par" token.
+% \begin{macrocode}
+\long\def\^^93#1{\endgroup{\aftergroup#1}}
+% \end{macrocode}
+% \begin{macro}{\@ndp@tch}
+% This is supposed to be used as a delimiter. So that we may
+% check for its appearance conveniently, we define it as its own
+% "\futuredef" expansion.
+% \begin{macrocode}
+\def\@ndp@tch{\aftergroup\@ndp@tch}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\gpatch}
+% This is it. If you are in doubt as to what the "\def\next{}" is
+% supposed to~achieve, this is~easy. We want to detect whether you
+% want a~long macro to be~patched. In that case, you say
+% "\long\gpatch"\dots. We can figure this out by comparing
+% "\next" to the non-long~"\empty". Of course, we do not
+% explicitly check for "\outer"ness. You should not even think of
+% wanting to make an "\outer" definition.
+%
+% We start by defining~"\gpatch", which will in the case
+% of~disabled "global"ness revert to~"\patch". Both~"\patch"
+% and~"\gpatch" define "\next" as a~macro getting one
+% "\@ndp@tch"-delimited argument:
+% it is all what should appear after a~"\def".
+% "\next"~should make all necessary actions for doing
+% the~definition. After setting~up "\next", "\^^a0"~is called, for
+% which we wrap up the argument list as a~separate argument.
+% \begin{macrocode}
+\def\gpatch{\ifnum\globaldefs<\z@
+ \expandafter\patch
+ \else
+ \expandafter\^^98%
+ \fi}
+\long\def\^^98#1#2#{\def\next{}%
+ \long\edef\next##1\@ndp@tch%
+ {\ifx\next\empty\else\long\fi\gdef##1}%
+ \^^a0#1{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\patch}
+% "\patch"~is a~bit more complicated, because we need to~make
+% additions to the current "\toks@"~list.
+% \begin{macrocode}
+\def\patch#1#2#{\def\next{}%
+ \long\edef\next##1\@ndp@tch
+ {\toks@ \noexpand\expandafter {\noexpand\the \toks@
+ \ifx\next\empty\else\long\fi \def##1}}%
+ \^^a0#1{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% Now the real fun starts. We get the argument replacement list,
+% and the macro body replacement list. We define a~macro~"\^^e0"
+% (the "e" means error) just for knowing the proper macro name for
+% error messages.
+%
+% We prepare in a local
+% "\toks@" the definition (because we could not simply
+% "\aftergroup" the argument replacement, which could consist of
+% any number of~tokens). Note that we start yet another group,
+% making the definitions of "\toks@" and "\next" stable.
+%
+% \begin{macrocode}
+\long\def\^^a0#1#2#3#4{\begingroup
+ \def\^^e0{#1}%
+ \toks@{\endgroup\next#1#2}%
+ \begingroup
+ \aftergroup\the\aftergroup\toks@
+% \end{macrocode}
+% We collect the replacement in a continually shrinking token list.
+% Do not get annoyed, but we'll use "\toks@" for that, too.
+% When we are through with replacements, we'll say "\endgroup",
+% after which the definition takes place.
+%
+% The replacement needs
+% to be in a token list instead of a macro in order not to break upon
+% encountering hash marks. The use of "\toks@" for this does not
+% conflict with its other uses due to the grouping.
+%
+% After that, we are ready to start the fun by expanding our macro,
+% and putting~"\p@check" to~work.
+% \begin{macrocode}
+ \toks@{#4}%
+ \expandafter\p@check\expandafter{#1#3}\@ndp@tch}
+% \end{macrocode}
+% \begin{macro}{\p@match}
+% \begin{macro}{\p@replace}
+% These are token lists holding the current string to be matched
+% next, and its replacement string. We
+% use token lists~1 and~2 for that.
+% \begin{macrocode}
+\toksdef\p@match=\@ne
+\toksdef\p@replace=\tw@
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\p@check}
+% We check for any remaining replacements. If there are none, we
+% may quit. "\toks@"~is the list of
+% remaining substitutions. "\endgroup"~stops and makes the
+% definition (check~"\^^a0" to~see~why), "\^^a1"~continues. By the
+% way, in case of an~error, we will later use~"\next@" in order to
+% tell what replacements were not carried out.
+% \begin{macrocode}
+\def\p@check{\edef\next@{\the\toks@}%
+ \ifx\empty\next@ \expandafter\endgroup
+ \else \expandafter\^^a1\fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\p@first}
+% This sets "\p@first" to the "\futuredef" expansion of the first
+% token we want to~match. "\^^a2"~will rewrap the rest of~"\toks@",
+% and needs an (as~to~yet) unmatched closing brace for that.
+% It~will provide the matching open one by~itself.
+% \begin{macrocode}
+\def\^^a1{\iffalse{\fi
+ \expandafter\futuredef \expandafter\p@first
+ \expandafter\^^a2\the\toks@}}
+% \end{macrocode}
+% \end{macro}
+% Ok, we rewrap the rest to be matched into~"\p@match", and the
+% replacement into~"\p@replace", after which we continue with~"\^^a3".
+% \begin{macrocode}
+\def\^^a2#1#{\p@match{#1}\afterassignment\^^a3\p@replace}
+% \end{macrocode}
+% The remaining substitutions we repack into~"\toks@". Now we need to
+% insert the matching opening brace for the closing one we put~before.
+% \begin{macrocode}
+\def\^^a3{\afterassignment\^^a4\toks@\expandafter{\iffalse}\fi}
+% \end{macrocode}
+% We now get the first (or next) token of the original macro.
+% \begin{macrocode}
+\def\^^a4{\futuredef\next\^^a5}
+% \end{macrocode}
+% If this token matches~"\p@first", we check the rest in~"\^^a6". We
+% collect in~"\toks@" all tokens matched so far (excluding "\p@first"),
+% so that we can
+% reinsert them if the match cannot be completed successfully. This~is
+% done in a~separate group. If~"\next" turns out to
+% be~"\@ndp@tch", however,
+% this is an~error indication. It~means that the end of patchable
+% material was reached. We call then~"\^^e1", which quits in that
+% case in a somewhat unusual (but relatively fast) way, reinserting
+% the gotten~"\@ndp@tch".
+%
+% It does not do any harm that "\next" is contained in conditional
+% context. Coming from~"\futuredef", it cannot be "\let" to an
+% unmatched conditional, and will correctly be~skipped.
+% \begin{macrocode}
+\def\^^a5{\ifx\next\p@first
+ \begingroup \toks@{}\expandafter\^^a6%
+ \else\ifx\next\@ndp@tch \^^e1\fi
+ \next \expandafter \^^a4%
+ \fi}
+% \end{macrocode}
+% In case of an error, we give the original macro (which has not yet
+% been patched). And at definition time, we will show how the macro
+% looks like afterwards.
+% \begin{macrocode}
+\def\^^e1{\let\^^a4\endgroup
+ \newlinechar`\^^J
+ \toks@\expandafter{\next@}%
+ \errorcontextlines\m@ne
+ \errhelp{I am ignoring inapplicable patches. Go on.}%
+ \errmessage{When trying to patch
+ \expandafter\string\^^e0, which was defined as^^J%
+ \expandafter\meaning\^^e0^^J%
+ the following patches remained inapplicable:^^J%
+ \the\toks@^^J%
+ I will show the results of the succeeded patches as soon^^J%
+ as I can without further comment, so do not be surprised.}%
+ \aftergroup\show \expandafter\aftergroup\^^e0%
+}
+% \end{macrocode}
+% Ok, we look whether there are any tokens remaining to be matched. If
+% there are not, replacement can go~forth. In~that case, we end our
+% local group, and go over to~"\^^ac". If~there are, we continue
+% with~"\^^a7".
+% \begin{macrocode}
+\def\^^a6{\edef\next{\the\p@match}%
+ \ifx\next\empty \endgroup\expandafter\^^ac%
+ \else \expandafter\^^a7\fi}
+% \end{macrocode}
+% We get the next token to be matched into~"\next@" from~"\p@match".
+% We~will have to adjust "\p@match" again with a token list
+% reassignment. For this we need to insert an unmatched closing brace
+% after its expansion, which will again be matched later.
+% \begin{macrocode}
+\def\^^a7{\iffalse{\fi
+ \expandafter\futuredef\expandafter\next@
+ \expandafter\^^a8\the\p@match}}
+% \end{macrocode}
+% Ok, here we gather the rest into~"\p@match" and~continue.
+% \begin{macrocode}
+\def\^^a8{\afterassignment\^^a9\p@match\expandafter{\iffalse}\fi}
+% \end{macrocode}
+% Now we get the next token from the original macro into~"\next".
+% \begin{macrocode}
+\def\^^a9{\futuredef\next\^^aa}
+% \end{macrocode}
+% In case of a match, we continue with~"\^^ab". Otherwise, if~we have
+% reached the illegal end of~macro ("\next" set to~"\@ndp@tch"),
+% we~stop.
+% If~we have no match legally, we reinsert~"\p@first", continue
+% scanning with~"\^^a4", reinserting everything matched with the help
+% of the "\futuredef" generated "\aftergroup"-sequence in~"\toks@".
+% This will hapen also if "\@ndp@tch" indicates something went
+% haywire, because "\@ndp@tch" cannot be in a~match sequence (if you
+% do not put it there, and you are not allowed to).
+% this we do also in the case of error, as you can easily see.
+% \begin{macrocode}
+\def\^^aa{\ifx\next@\next
+ \expandafter\^^ab%
+ \else \aftergroup\p@first
+ \aftergroup\^^a4%
+ \the\toks@\next\expandafter\endgroup\fi}
+% \end{macrocode}
+% We now have to append the "\aftergroup" sequence of the next matched
+% token in~"\next" to~"\toks@". After that, we can loop.
+% \begin{macrocode}
+\def\^^ab{\toks@\expandafter\expandafter\expandafter{%
+ \expandafter\the\expandafter\toks@\next}%
+ \^^a6}
+% \end{macrocode}
+% Ok, here follows the code if a~match {\em was\/} completed. We
+% insert the tokens of~"\p@replace". We~have to scan "\p@replace"
+% token by~token, so that implicit braces work like in the match
+% code sequences. We do this until "\p@replace" is exhausted. Which we
+% can detect by finding "\@ndp@tch".
+% \begin{macrocode}
+\def\^^ac{\expandafter\^^ad\the\p@replace\@ndp@tch}
+% \end{macrocode}
+% The following analysis loop is about as straight as it can get.
+% \begin{macrocode}
+\def\^^ad{\futuredef\next\^^ae}
+\def\^^ae{\ifx\next\@ndp@tch
+ \expandafter\p@check
+ \else
+ \next \expandafter\^^ad%
+ \fi}
+% \end{macrocode}
+% We end here by giving the driver file for the documentation, which
+% will typically be extracted using~"docstrip.sty".
+% \begin{macrocode}
+%<+driver>\documentstyle[doc]{article}
+%<+driver> \EnableCrossrefs
+%<+driver>% \DisableCrossrefs
+%<+driver>
+%<+driver> \CodelineIndex
+%<+driver>\begin{document}
+%<+driver> \DocInput{patch.doc}
+%<+driver>\end{document}
+% \end{macrocode}
+%\Finale
diff --git a/Master/texmf-dist/doc/plain/pdcmac/00readme.txt b/Master/texmf-dist/doc/plain/pdcmac/00readme.txt
new file mode 100644
index 00000000000..5739d05b91d
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pdcmac/00readme.txt
@@ -0,0 +1,21 @@
+00readme.txt -*-text-*- Time-stamp: <pdc 1995-03-20>
+
+ PDCMAC, a collection of macros for plain TeX documents.
+ Release 1.0 -- Spring 1995
+
+This is collection of TeX definition files which may be useful for
+setting documents using plain TeX (as opposed to more complex formats
+like LaTeX). See "install.txt" for installation hints.
+
+This software may be used and distributed without fee under certain
+conditions. While I would like it to be useful, I cannot offer any
+guarantee or warranty. See "pdcguide.tex" for more information.
+
+Please send reports of problems, comments and suggestions to the address
+below. If you find pdcmac useful or amusing, please send me a pretty
+postcard.
+
+P. Damian Cugley * * * * * * * * * * * * * * * <damian.cugley@comlab.ox.ac.uk>
+Oxford University Computing Laboratory, Parks Road, Oxford OX1 3QD, UK
+Alleged Literature, c/o Damian Cugley, 255B Banbury Road, Oxford OX2 7HN, UK
+http://boothp1.ecs.ox.ac.uk:5705/people/pdc.html * My other computer is a Linux
diff --git a/Master/texmf-dist/doc/plain/pdcmac/copying.txt b/Master/texmf-dist/doc/plain/pdcmac/copying.txt
new file mode 100644
index 00000000000..87bc9146ac2
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pdcmac/copying.txt
@@ -0,0 +1,358 @@
+ GNU GENERAL PUBLIC LICENSE
+ **************************
+
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+Preamble
+========
+
+ The licenses for most software are designed to take away your freedom
+to share and change it. By contrast, the GNU General Public License is
+intended to guarantee your freedom to share and change free software--to
+make sure the software is free for all its users. This General Public
+License applies to most of the Free Software Foundation's software and
+to any other program whose authors commit to using it. (Some other Free
+Software Foundation software is covered by the GNU Library General
+Public License instead.) You can apply it to your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it if
+you want it, that you can change the software or use pieces of it in new
+free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 1. This License applies to any program or other work which contains a
+ notice placed by the copyright holder saying it may be distributed
+ under the terms of this General Public License. The "Program",
+ below, refers to any such program or work, and a "work based on the
+ Program" means either the Program or any derivative work under
+ copyright law: that is to say, a work containing the Program or a
+ portion of it, either verbatim or with modifications and/or
+ translated into another language. (Hereinafter, translation is
+ included without limitation in the term "modification".) Each
+ licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are
+ not covered by this License; they are outside its scope. The act
+ of running the Program is not restricted, and the output from the
+ Program is covered only if its contents constitute a work based on
+ the Program (independent of having been made by running the
+ Program). Whether that is true depends on what the Program does.
+
+ 2. You may copy and distribute verbatim copies of the Program's source
+ code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate
+ copyright notice and disclaimer of warranty; keep intact all the
+ notices that refer to this License and to the absence of any
+ warranty; and give any other recipients of the Program a copy of
+ this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy,
+ and you may at your option offer warranty protection in exchange
+ for a fee.
+
+ 3. You may modify your copy or copies of the Program or any portion of
+ it, thus forming a work based on the Program, and copy and
+ distribute such modifications or work under the terms of Section 1
+ above, provided that you also meet all of these conditions:
+
+ a. You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b. You must cause any work that you distribute or publish, that
+ in whole or in part contains or is derived from the Program or
+ any part thereof, to be licensed as a whole at no charge to
+ all third parties under the terms of this License.
+
+ c. If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display
+ an announcement including an appropriate copyright notice and
+ a notice that there is no warranty (or else, saying that you
+ provide a warranty) and that users may redistribute the
+ program under these conditions, and telling the user how to
+ view a copy of this License. (Exception: if the Program
+ itself is interactive but does not normally print such an
+ announcement, your work based on the Program is not required
+ to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the
+ Program, and can be reasonably considered independent and separate
+ works in themselves, then this License, and its terms, do not apply
+ to those sections when you distribute them as separate works. But
+ when you distribute the same sections as part of a whole which is a
+ work based on the Program, the distribution of the whole must be on
+ the terms of this License, whose permissions for other licensees
+ extend to the entire whole, and thus to each and every part
+ regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or
+ contest your rights to work written entirely by you; rather, the
+ intent is to exercise the right to control the distribution of
+ derivative or collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the
+ Program with the Program (or with a work based on the Program) on a
+ volume of a storage or distribution medium does not bring the other
+ work under the scope of this License.
+
+ 4. You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms
+ of Sections 1 and 2 above provided that you also do one of the
+ following:
+
+ a. Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of
+ Sections 1 and 2 above on a medium customarily used for
+ software interchange; or,
+
+ b. Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a
+ medium customarily used for software interchange; or,
+
+ c. Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with
+ such an offer, in accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete
+ source code means all the source code for all modules it contains,
+ plus any associated interface definition files, plus the scripts
+ used to control compilation and installation of the executable.
+ However, as a special exception, the source code distributed need
+ not include anything that is normally distributed (in either source
+ or binary form) with the major components (compiler, kernel, and so
+ on) of the operating system on which the executable runs, unless
+ that component itself accompanies the executable.
+
+ If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent
+ access to copy the source code from the same place counts as
+ distribution of the source code, even though third parties are not
+ compelled to copy the source along with the object code.
+
+ 5. You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense or distribute the Program is
+ void, and will automatically terminate your rights under this
+ License. However, parties who have received copies, or rights,
+ from you under this License will not have their licenses terminated
+ so long as such parties remain in full compliance.
+
+ 6. You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify
+ or distribute the Program or its derivative works. These actions
+ are prohibited by law if you do not accept this License.
+ Therefore, by modifying or distributing the Program (or any work
+ based on the Program), you indicate your acceptance of this License
+ to do so, and all its terms and conditions for copying,
+ distributing or modifying the Program or works based on it.
+
+ 7. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject
+ to these terms and conditions. You may not impose any further
+ restrictions on the recipients' exercise of the rights granted
+ herein. You are not responsible for enforcing compliance by third
+ parties to this License.
+
+ 8. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent
+ issues), conditions are imposed on you (whether by court order,
+ agreement or otherwise) that contradict the conditions of this
+ License, they do not excuse you from the conditions of this
+ License. If you cannot distribute so as to satisfy simultaneously
+ your obligations under this License and any other pertinent
+ obligations, then as a consequence you may not distribute the
+ Program at all. For example, if a patent license would not permit
+ royalty-free redistribution of the Program by all those who receive
+ copies directly or indirectly through you, then the only way you
+ could satisfy both it and this License would be to refrain entirely
+ from distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable
+ under any particular circumstance, the balance of the section is
+ intended to apply and the section as a whole is intended to apply
+ in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of
+ any such claims; this section has the sole purpose of protecting
+ the integrity of the free software distribution system, which is
+ implemented by public license practices. Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is
+ willing to distribute software through any other system and a
+ licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed
+ to be a consequence of the rest of this License.
+
+ 9. If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces,
+ the original copyright holder who places the Program under this
+ License may add an explicit geographical distribution limitation
+ excluding those countries, so that distribution is permitted only
+ in or among countries not thus excluded. In such case, this
+ License incorporates the limitation as if written in the body of
+ this License.
+
+ 10. The Free Software Foundation may publish revised and/or new
+ versions of the General Public License from time to time. Such new
+ versions will be similar in spirit to the present version, but may
+ differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+ Program specifies a version number of this License which applies to
+ it and "any later version", you have the option of following the
+ terms and conditions either of that version or of any later version
+ published by the Free Software Foundation. If the Program does not
+ specify a version number of this License, you may choose any
+ version ever published by the Free Software Foundation.
+
+ 11. If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the
+ author to ask for permission. For software which is copyrighted by
+ the Free Software Foundation, write to the Free Software
+ Foundation; we sometimes make exceptions for this. Our decision
+ will be guided by the two goals of preserving the free status of
+ all derivatives of our free software and of promoting the sharing
+ and reuse of software generally.
+
+ NO WARRANTY
+
+ 12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
+ LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
+ AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+ PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+ DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
+ OR CORRECTION.
+
+ 13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
+ MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
+ LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
+ INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+ INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
+ OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
+ OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+
+How to Apply These Terms to Your New Programs
+=============================================
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
+ Copyright (C) 19YY NAME OF AUTHOR
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than `show w' and `show
+c'; they could even be mouse-clicks or menu items--whatever suits your
+program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ SIGNATURE OF TY COON, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications
+with the library. If this is what you want to do, use the GNU Library
+General Public License instead of this License.
+
diff --git a/Master/texmf-dist/doc/plain/pdcmac/install.txt b/Master/texmf-dist/doc/plain/pdcmac/install.txt
new file mode 100644
index 00000000000..51455322ef0
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pdcmac/install.txt
@@ -0,0 +1,91 @@
+install.txt -*-text-*- Time-stamp: <pdc 1995-02-23>
+
+ INSTALLING PDCMAC
+
+1. GNERIC INSTALLATION
+
+ The file "contents.txt" gives a list of all the files (except
+ itself) with their sizes in bytes.
+
+ The macro files are packaged with their documentation in "dtx"
+ files (the LaTeX 2e distribution uses files with the same suffix
+ for a similar purpose).
+
+ You do not need Docstrip or LaTeX to unpack these files; all you
+ need is a copy of "pdccode.tex". Just run plain TeX on the
+ "dtx" files to generate the macro files and the printed
+ documentation all at the same time.
+
+ Then put the macro files somewhere where TeX can find them. For
+ systems with the new TeX Directory Structure this directory
+ might be "$texmf/tex/plain/pdcmac/"; for UNIXTeX 6.1 it might be
+ "$texmf/tex/plain/"; for older TeX it might be "$tex/inputs" or
+ "$tex/macros".
+
+ You may want to put the DVI files and the DTX files together in
+ a documentation directory if you have one. On TDS systems this
+ might be "$texmf/doc/pdcmac/".
+
+
+2. UNIX SYSTEMS
+
+ For the benefit of people on UNIX systems I can supply a
+ Makefile template and a configuration script. The conventions
+ for the config scriopt are based on the GNU Coding Standards.
+
+(1) Configuration. Run the command "./configure" (you may need to say
+ "sh configure"); this is a shell script that attempts to guess
+ sensible values for things like "texdir" (the directory to put
+ TeX macro files). It generates a shellscript "config.status"
+ which records the current configuration; running it recreates
+ the "Makefile".
+
+ The "configure" script understands the following options.
+ *You should not need to specify any of these.*
+
+ -n, -nocreate, --nocreate
+ Make "config.status" but don't run it to generate "Makefile".
+
+ -h, -help, --help
+ Print a summary of options.
+
+ -pDIR, -prefix DIR, --prefix=DIR
+ Set the "prefix" for directory names. FOr example, "-p/usr"
+ indcates that TeX files are under "/usr/texmf" or "/usr/tex" or
+ somesuch.
+
+ -sDIR, -srcdir DIR, --srcdir=DIR
+ Tell "configure" where the source files are. This is used when
+ building the package in a different directory. Normally even
+ in this case "configure" can guess the cirrect dierctory by
+ examining $0.
+
+ -tDIR, -texdir DIR, --texdir=DIR
+ Tell "configure" where TeX files are (this makes -p redundant).
+ For example "-t/usr/texmf".
+
+ -wtds, -with tds, --with-tds
+ Tell "configure" you have a new-style TeX Directory Structure.
+ Usually "configure" can guess correctly.
+
+ Other options are ignored.
+
+(2) Run "make". The makefile generated by "configure" is tested with
+ GNU "make". The makefile understands the following conventional
+ targets:
+
+ "make"
+ Generates all the "tex" macro files, and runs TeX on the other
+ documentation files.
+
+ "make install"
+ Copies the macro files into TeX's macros directory, and the DVI
+ files into the $docdir.
+
+ "make uninstall"
+ Deletes the files that would be created by "make install".
+
+ "make mostlyclean|clean|distclean|realclean"
+ Delete files made from source files. "mostlyclean" removes the
+ ones that are generated most often; "realclean" removes even
+ those that are rarely deleted.
diff --git a/Master/texmf-dist/doc/plain/pdcmac/news.txt b/Master/texmf-dist/doc/plain/pdcmac/news.txt
new file mode 100644
index 00000000000..79c7dc241d0
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pdcmac/news.txt
@@ -0,0 +1,14 @@
+news.txt -*-text-*- Time-stamp: <pdc 1995-04-06>
+
+
+Changes to the PDCMAC package since Release 1.0
+
+* Support for Emacs tags added
+
+The shellscript "dtxtags" generates a tags file in the style of etags(1).
+
+* Bug fixes
+
+** Nested numbered lists will work beyond (e)
+** partial pages don't have spurious space added
+** Maamac.tex can be used on its own (it lacked a definition of \toksa)
diff --git a/Master/texmf-dist/doc/plain/pdcmac/oput01.eps b/Master/texmf-dist/doc/plain/pdcmac/oput01.eps
new file mode 100644
index 00000000000..78056236005
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pdcmac/oput01.eps
@@ -0,0 +1,423 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Title: oput01.fig
+%%Creator: fig2dev
+%%CreationDate: Thu Apr 6 12:42:28 1995
+%%For: pdc@booth35.ecs (Damian Cugley,MC86,S.E.H.,N)
+%%BoundingBox: 0 0 424 499
+%%Pages: 1
+%%EndComments
+/mtrx matrix def
+/l {lineto} bind def
+/m {moveto} bind def
+/s {stroke} bind def
+/n {newpath} bind def
+/gs {gsave} bind def
+/gr {grestore} bind def
+/clp {closepath} bind def
+/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+4 -2 roll mul setrgbcolor} bind def
+/col0 {0 0 0 setrgbcolor} bind def
+/col1 {0 0 1 setrgbcolor} bind def
+/col2 {0 1 0 setrgbcolor} bind def
+/col3 {0 1 1 setrgbcolor} bind def
+/col4 {1 0 0 setrgbcolor} bind def
+/col5 {1 0 1 setrgbcolor} bind def
+/col6 {1 1 0 setrgbcolor} bind def
+/col7 {1 1 1 setrgbcolor} bind def
+%%EndProlog
+
+%%Page: 1 1
+
+0 setlinecap 0 setlinejoin
+-8 27 translate
+0.0 499.0 translate 0.900 -0.900 scale
+0.500 setlinewidth
+% Polyline
+n 89 329 m 224 329 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 329 m 224 317 l 89 317 l 89 329 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 299 m 224 299 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 299 m 224 287 l 89 287 l 89 299 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 284 m 224 284 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 284 m 224 272 l 89 272 l 89 284 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 269 m 224 269 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 269 m 224 257 l 89 257 l 89 269 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 254 m 224 254 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 254 m 224 242 l 89 242 l 89 254 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 239 m 224 239 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 239 m 224 227 l 89 227 l 89 239 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 224 m 224 224 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 224 m 224 212 l 89 212 l 89 224 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 209 m 224 209 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 209 m 224 197 l 89 197 l 89 209 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 194 m 224 194 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 194 m 224 182 l 89 182 l 89 194 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 179 m 224 179 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 179 m 224 167 l 89 167 l 89 179 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 164 m 224 164 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 164 m 224 152 l 89 152 l 89 164 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 149 m 224 149 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 149 m 224 137 l 89 137 l 89 149 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 134 m 224 134 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 134 m 224 122 l 89 122 l 89 134 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 119 m 224 119 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 119 m 224 107 l 89 107 l 89 119 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 104 m 224 104 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 104 m 224 92 l 89 92 l 89 104 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 89 89 m 224 89 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 224 89 m 224 77 l 89 77 l 89 89 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 149 m 374 149 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 149 m 374 137 l 239 137 l 239 149 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 134 m 374 134 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 134 m 374 122 l 239 122 l 239 134 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 119 m 374 119 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 119 m 374 107 l 239 107 l 239 119 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 104 m 374 104 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 104 m 374 92 l 239 92 l 239 104 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 89 m 374 89 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 89 m 374 77 l 239 77 l 239 89 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 224 m 374 224 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 224 m 374 212 l 239 212 l 239 224 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 209 m 374 209 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 209 m 374 197 l 239 197 l 239 209 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 194 m 374 194 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 194 m 374 182 l 239 182 l 239 194 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 179 m 374 179 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 179 m 374 167 l 239 167 l 239 179 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 164 m 374 164 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 164 m 374 152 l 239 152 l 239 164 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 299 m 374 299 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 299 m 374 287 l 239 287 l 239 299 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 284 m 374 284 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 284 m 374 272 l 239 272 l 239 284 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 269 m 374 269 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 269 m 374 257 l 239 257 l 239 269 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 254 m 374 254 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 254 m 374 242 l 239 242 l 239 254 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 239 m 374 239 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 239 m 374 227 l 239 227 l 239 239 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 374 m 374 374 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 374 m 374 362 l 239 362 l 239 374 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 359 m 374 359 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 359 m 374 347 l 239 347 l 239 359 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 344 m 374 344 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 344 m 374 332 l 239 332 l 239 344 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 329 m 374 329 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 329 m 374 317 l 239 317 l 239 329 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 314 m 374 314 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 314 m 374 302 l 239 302 l 239 314 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 449 m 374 449 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 449 m 374 437 l 239 437 l 239 449 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 434 m 374 434 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 434 m 374 422 l 239 422 l 239 434 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 419 m 374 419 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 419 m 374 407 l 239 407 l 239 419 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 404 m 374 404 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 404 m 374 392 l 239 392 l 239 404 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 389 m 374 389 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 389 m 374 377 l 239 377 l 239 389 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 494 m 374 494 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 494 m 374 482 l 239 482 l 239 494 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 479 m 374 479 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 479 m 374 467 l 239 467 l 239 479 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 239 464 m 374 464 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 374 464 m 374 452 l 239 452 l 239 464 l
+ clp gs 0.85 setgray fill gr
+% Polyline
+n 449 59 m 449 47 l 89 47 l 89 59 l
+ clp gs 0.80 setgray fill gr
+% Polyline
+n 449 524 m 449 512 l 89 512 l 89 524 l
+ clp gs 0.80 setgray fill gr
+0.500 setlinewidth
+n 254 344 m 254 344 l gs s gr
+ [4.000000] 0 setdash
+% Polyline
+n 449 494 m 449 77 l 389 77 l 389 494 l
+ clp gs s gr
+ [] 0 setdash
+ [4.000000] 0 setdash
+% Polyline
+n 299 494 m 299 77 l 239 77 l 239 494 l
+ clp gs s gr
+ [] 0 setdash
+ [4.000000] 0 setdash
+% Polyline
+n 149 494 m 149 77 l 89 77 l 89 494 l
+ clp gs s gr
+ [] 0 setdash
+ [4.000000] 0 setdash
+% Polyline
+n 374 494 m 374 77 l 314 77 l 314 494 l
+ clp gs s gr
+ [] 0 setdash
+ [4.000000] 0 setdash
+% Polyline
+n 224 494 m 224 77 l 164 77 l 164 494 l
+ clp gs s gr
+ [] 0 setdash
+% Polyline
+n 308 569 m 317 581 l 320 581 l gs s gr
+1.000 setlinewidth
+% Polyline
+n 479 554 m 479 29 l 59 29 l 59 554 l
+ clp gs s gr
+% Polyline
+n 89 308 m 224 308 l gs s gr
+0.500 setlinewidth
+% Polyline
+n 89 59 m 449 59 l gs s gr
+% Polyline
+n 29 344 m 83 308 l gs s gr
+n 75.234 310.774 m 83.000 308.000 l 77.453 314.102 l gs 2 setlinejoin s gr
+% Polyline
+n 269 563 m 269 569 l 344 569 l 344 563 l gs s gr
+% Polyline
+n 89 524 m 449 524 l gs s gr
+/Times-Roman findfont 12.00 scalefont setfont
+113 326 m
+gs 1 -1 scale (caption) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+146 215 m
+gs 1 -1 scale (column 0) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+311 218 m
+gs 1 -1 scale (column 1) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+275 53 m
+gs 1 -1 scale (headline) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+359 515 m
+gs 1 -1 scale (footline) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+323 584 m
+gs 1 -1 scale (grid cell) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+8 371 m
+gs 1 -1 scale (separator) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+8 359 m
+gs 1 -1 scale (caption) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+104 419 m
+gs 1 -1 scale (illustration) show gr
+/Times-Roman findfont 12.00 scalefont setfont
+419 404 m
+gs 1 -1 scale 90.0 rotate (illustration) show gr
+showpage
diff --git a/Master/texmf-dist/doc/plain/pdcmac/oput02.eps b/Master/texmf-dist/doc/plain/pdcmac/oput02.eps
new file mode 100644
index 00000000000..b36b202cea1
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pdcmac/oput02.eps
@@ -0,0 +1,404 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Title: oput02.fig
+%%Creator: fig2dev
+%%CreationDate: Thu Apr 6 12:42:30 1995
+%%For: pdc@booth35.ecs (Damian Cugley,MC86,S.E.H.,N)
+%%BoundingBox: 0 0 443 499
+%%Pages: 1
+%%EndComments
+/mtrx matrix def
+/l {lineto} bind def
+/m {moveto} bind def
+/s {stroke} bind def
+/n {newpath} bind def
+/gs {gsave} bind def
+/gr {grestore} bind def
+/clp {closepath} bind def
+/graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+4 -2 roll mul setrgbcolor} bind def
+/col0 {0 0 0 setrgbcolor} bind def
+/col1 {0 0 1 setrgbcolor} bind def
+/col2 {0 1 0 setrgbcolor} bind def
+/col3 {0 1 1 setrgbcolor} bind def
+/col4 {1 0 0 setrgbcolor} bind def
+/col5 {1 0 1 setrgbcolor} bind def
+/col6 {1 1 0 setrgbcolor} bind def
+/col7 {1 1 1 setrgbcolor} bind def
+%%EndProlog
+
+%%Page: 1 1
+
+0 setlinecap 0 setlinejoin
+-54 27 translate
+0.0 499.0 translate 0.900 -0.900 scale
+0.000 setlinewidth
+% Polyline
+n 254 329 m 254 317 l 179 317 l 179 329 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 329 m 254 329 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 344 m 254 332 l 179 332 l 179 344 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 344 m 254 344 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 299 m 254 287 l 179 287 l 179 299 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 299 m 254 299 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 284 m 254 272 l 179 272 l 179 284 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 284 m 254 284 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 269 m 254 257 l 179 257 l 179 269 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 269 m 254 269 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 254 m 254 242 l 179 242 l 179 254 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 254 m 254 254 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 239 m 254 227 l 179 227 l 179 239 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 239 m 254 239 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 224 m 254 212 l 179 212 l 179 224 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 224 m 254 224 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 209 m 254 197 l 179 197 l 179 209 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 209 m 254 209 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 194 m 254 182 l 179 182 l 179 194 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 194 m 254 194 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 254 179 m 254 167 l 179 167 l 179 179 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 179 179 m 254 179 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 359 m 344 347 l 269 347 l 269 359 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 359 m 344 359 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 329 m 344 317 l 269 317 l 269 329 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 329 m 344 329 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 344 m 344 332 l 269 332 l 269 344 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 344 m 344 344 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 299 m 344 287 l 269 287 l 269 299 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 299 m 344 299 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 284 m 344 272 l 269 272 l 269 284 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 284 m 344 284 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 269 m 344 257 l 269 257 l 269 269 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 269 m 344 269 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 254 m 344 242 l 269 242 l 269 254 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 254 m 344 254 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 239 m 344 227 l 269 227 l 269 239 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 239 m 344 239 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 224 m 344 212 l 269 212 l 269 224 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 224 m 344 224 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 209 m 344 197 l 269 197 l 269 209 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 209 m 344 209 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 194 m 344 182 l 269 182 l 269 194 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 194 m 344 194 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 179 m 344 167 l 269 167 l 269 179 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 179 m 344 179 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 374 m 344 362 l 269 362 l 269 374 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 374 m 344 374 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 389 m 344 377 l 269 377 l 269 389 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 389 m 344 389 l gs s gr
+0.000 setlinewidth
+% Polyline
+n 344 314 m 344 302 l 269 302 l 269 314 l
+ clp gs 0.85 setgray fill gr
+0.500 setlinewidth
+% Polyline
+n 269 314 m 344 314 l gs s gr
+% Polyline
+n 254 389 m 254 164 l 179 164 l 179 389 l
+ clp gs s gr
+ [4.000000] 0 setdash
+% Polyline
+n 164 389 m 164 164 l 89 164 l 89 389 l
+ clp gs s gr
+ [] 0 setdash
+% Polyline
+n 344 389 m 344 164 l 269 164 l 269 389 l
+ clp gs s gr
+ [4.000000] 0 setdash
+% Polyline
+n 434 164 m 434 74 l 89 74 l 89 164 l
+ clp gs s gr
+ [] 0 setdash
+0.000 setlinewidth
+% Polyline
+n 434 59 m 434 47 l 89 47 l 89 59 l
+ clp gs 0.80 setgray fill gr
+% Polyline
+n 434 524 m 434 512 l 89 512 l 89 524 l
+ clp gs 0.80 setgray fill gr
+0.500 setlinewidth
+ [4.000000] 0 setdash
+% Polyline
+n 434 389 m 434 164 l 359 164 l 359 389 l
+ clp gs s gr
+ [] 0 setdash
+n 97.000 571.000 m 89.000 569.000 l 97.000 567.000 l gs 2 setlinejoin s gr
+% Polyline
+n 89 569 m 434 569 l gs s gr
+n 426.000 567.000 m 434.000 569.000 l 426.000 571.000 l gs 2 setlinejoin s gr
+n 522.000 502.000 m 524.000 494.000 l 526.000 502.000 l gs 2 setlinejoin s gr
+% Polyline
+n 524 494 m 524 554 l gs s gr
+n 526.000 546.000 m 524.000 554.000 l 522.000 546.000 l gs 2 setlinejoin s gr
+n 537.000 37.000 m 539.000 29.000 l 541.000 37.000 l gs 2 setlinejoin s gr
+% Polyline
+n 539 29 m 539 554 l gs s gr
+n 541.000 546.000 m 539.000 554.000 l 537.000 546.000 l gs 2 setlinejoin s gr
+n 67.000 586.000 m 59.000 584.000 l 67.000 582.000 l gs 2 setlinejoin s gr
+% Polyline
+n 59 584 m 479 584 l gs s gr
+n 471.000 582.000 m 479.000 584.000 l 471.000 586.000 l gs 2 setlinejoin s gr
+n 522.000 37.000 m 524.000 29.000 l 526.000 37.000 l gs 2 setlinejoin s gr
+% Polyline
+n 524 29 m 524 74 l gs s gr
+n 526.000 66.000 m 524.000 74.000 l 522.000 66.000 l gs 2 setlinejoin s gr
+ [4.000000] 0 setdash
+% Polyline
+n 425 89 m 515 89 l gs s gr
+ [] 0 setdash
+% Polyline
+n 449 59 m 449 74 l gs s gr
+n 451.000 66.000 m 449.000 74.000 l 447.000 66.000 l gs 2 setlinejoin s gr
+% Polyline
+n 449 104 m 449 89 l gs s gr
+n 447.000 97.000 m 449.000 89.000 l 451.000 97.000 l gs 2 setlinejoin s gr
+% Polyline
+n 329 158 m 344 158 l gs s gr
+n 336.000 156.000 m 344.000 158.000 l 336.000 160.000 l gs 2 setlinejoin s gr
+% Polyline
+n 374 158 m 359 158 l gs s gr
+n 367.000 160.000 m 359.000 158.000 l 367.000 156.000 l gs 2 setlinejoin s gr
+n 507.000 67.000 m 509.000 59.000 l 511.000 67.000 l gs 2 setlinejoin s gr
+% Polyline
+n 509 59 m 509 89 l gs s gr
+n 511.000 81.000 m 509.000 89.000 l 507.000 81.000 l gs 2 setlinejoin s gr
+n 492.000 502.000 m 494.000 494.000 l 496.000 502.000 l gs 2 setlinejoin s gr
+% Polyline
+n 494 494 m 494 527 l gs s gr
+n 496.000 519.000 m 494.000 527.000 l 492.000 519.000 l gs 2 setlinejoin s gr
+ [4.000000] 0 setdash
+% Polyline
+n 431 59 m 515 59 l gs s gr
+ [] 0 setdash
+n 492.000 82.000 m 494.000 74.000 l 496.000 82.000 l gs 2 setlinejoin s gr
+% Polyline
+n 494 74 m 494 494 l gs s gr
+n 496.000 486.000 m 494.000 494.000 l 492.000 486.000 l gs 2 setlinejoin s gr
+% Polyline
+n 89 524 m 434 524 l gs s gr
+% Polyline
+n 89 59 m 434 59 l gs s gr
+1.000 setlinewidth
+% Polyline
+n 479 554 m 479 29 l 59 29 l 59 554 l
+ clp gs s gr
+0.500 setlinewidth
+% Polyline
+n 155 284 m 155 299 l gs s gr
+n 157.000 291.000 m 155.000 299.000 l 153.000 291.000 l gs 2 setlinejoin s gr
+% Polyline
+n 155 329 m 155 314 l gs s gr
+n 153.000 322.000 m 155.000 314.000 l 157.000 322.000 l gs 2 setlinejoin s gr
+n 187.000 160.000 m 179.000 158.000 l 187.000 156.000 l gs 2 setlinejoin s gr
+% Polyline
+n 179 158 m 254 158 l gs s gr
+n 246.000 156.000 m 254.000 158.000 l 246.000 160.000 l gs 2 setlinejoin s gr
+n 363.000 172.000 m 365.000 164.000 l 367.000 172.000 l gs 2 setlinejoin s gr
+% Polyline
+n 365 164 m 365 389 l gs s gr
+n 367.000 381.000 m 365.000 389.000 l 363.000 381.000 l gs 2 setlinejoin s gr
+1.000 setlinewidth
+% Polyline
+n 170 164 m 170 389 l gs s gr
+% Polyline
+n 179 308 m 254 308 l gs s gr
+% Polyline
+n 260 164 m 260 389 l gs s gr
+% Polyline
+n 350 164 m 350 389 l gs s gr
+0.500 setlinewidth
+ [4.000000] 0 setdash
+% Polyline
+n 89 389 m 89 494 l 434 494 l 434 389 l
+ clp gs s gr
+ [] 0 setdash
+/Times-Italic findfont 10.00 scalefont setfont
+269 566 m
+gs 1 -1 scale (bodywd) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+269 581 m
+gs 1 -1 scale (paperwd) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+521 524 m
+gs 1 -1 scale 90.0 rotate (botmg) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+491 509 m
+gs 1 -1 scale 90.0 rotate (footlineskip) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+491 284 m
+gs 1 -1 scale 90.0 rotate (bodyht) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+536 284 m
+gs 1 -1 scale 90.0 rotate (paperht) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+506 74 m
+gs 1 -1 scale 90.0 rotate (headlineskip) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+521 53 m
+gs 1 -1 scale 90.0 rotate (topmg) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+449 86 m
+gs 1 -1 scale (topskip) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+350 155 m
+gs 1 -1 scale (colsep) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+269 119 m
+gs 1 -1 scale (topbox) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+269 464 m
+gs 1 -1 scale (botbox) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+269 518 m
+gs 1 -1 scale (footline) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+254 56 m
+gs 1 -1 scale (headline) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+218 266 m
+gs 1 -1 scale (column 0) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+305 266 m
+gs 1 -1 scale (column 1) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+125 221 m
+gs 1 -1 scale (leftbox) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+218 338 m
+gs 1 -1 scale (caption) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+215 374 m
+gs 1 -1 scale (illo) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+215 152 m
+gs 1 -1 scale (colwd) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+374 284 m
+gs 1 -1 scale 90.0 rotate (colht) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+407 251 m
+gs 1 -1 scale (rightbox) dup stringwidth pop 2 div neg 0 rmoveto show gr
+/Times-Italic findfont 10.00 scalefont setfont
+152 308 m
+gs 1 -1 scale 90.0 rotate (capsep) dup stringwidth pop 2 div neg 0 rmoveto show gr
+showpage
diff --git a/Master/texmf-dist/doc/plain/pdcmac/version.txt b/Master/texmf-dist/doc/plain/pdcmac/version.txt
new file mode 100644
index 00000000000..bb3870108d0
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/pdcmac/version.txt
@@ -0,0 +1,19 @@
+* pdcmac release 1.0, patch level 01 *
+Version ID list generated 1995-04-06
+
+maamac.dtx = 1.5 1995/04/06 13:33:44 pdc Exp
+magrmac.dtx = 1.3 1995/03/29 16:32:24 pdc Exp
+pdcadobe.dtx = 1.3 1995/03/30 16:07:31 pdc Exp
+pdccode.dtx = 1.6 1995/03/30 16:08:32 pdc Exp
+pdcfmt2.dtx = 2.4 1995/04/06 11:55:16 pdc Exp
+pdcfsel.dtx = 3.5 1995/03/28 19:05:54 pdc Exp
+pdcl1maa.dtx = 1.3 1995/03/30 16:09:52 pdc Exp
+pdcmisc.dtx = 1.4 1995/03/30 16:13:08 pdc Exp
+pdcoput5.dtx = 5.3 1995/04/06 11:51:03 pdc Exp
+pdcsty.dtx = 1.2 1995/03/30 16:12:17 pdc Exp
+
+configure = 1.0 Time-stamp: <pdc 1995-03-24>
+dtxtags = 1.1 Time-stamp: <pdc 1995-04-06>
+fig2epsf = 1.0 Time-stamp: <pdc 1995-03-24>
+pinstall = 1.1 Time-stamp: <pdc 1995-03-24>
+pmkdir = 1.0 Time-stamp: <pdc 1995-03-27>
diff --git a/Master/texmf-dist/doc/plain/plgraph/00readme.txt b/Master/texmf-dist/doc/plain/plgraph/00readme.txt
new file mode 100644
index 00000000000..ccabe9f77ca
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plgraph/00readme.txt
@@ -0,0 +1,105 @@
+
+Graphics code for non-LaTeX users.
+==================================
+
+This directory provides a small wrapper file such that users of
+formats based on plain TeX may make use of some of the parts of the
+standard LaTeX distribution.
+
+These files are *NOT* supported by the LaTeX3 project, and any
+problems with them should *NOT* be reported to the LaTeX bugs system.
+
+Currently problems may be reported to me, david@dcarlisle.demon.co.uk
+although as I only ever use LaTeX for documents, these files have not
+been extensively tested. If some plain TeX user wants to `adopt' them
+and take over their support then they are welcome to it:-)
+
+David Carlisle 1995/01/29
+ 1996/11/13
+
+Copyright 1995 1996 David Carlisle
+
+ All the files in this directory may be redistributed and/or modified
+ under the terms of the LaTeX Project Public License distributed from
+ CTAN archives in directory macros/latex/base/lppl.txt; either
+ version 1 of the License, or (at your option) any later version.
+
+
+
+This directory contains
+
+00readme.txt This file.
+
+exmplpic.tex
+ A plain TeX document using LaTeX' `picture mode': a portable
+ means of producing simple diagrams.
+
+exmplgrf.tex
+ A plain TeX document using the LaTeX graphicx package, for
+ rotating and scaling text, and include PostScript and other
+ graphics formats. (This will include the file a.ps available
+ in the LaTeX graphics distribution.)
+
+exmplcol.tex
+ A plain TeX document using the LaTeX color package, for
+ producing colour.
+
+exmplpfg.tex
+ A plain TeX document using the contributed LaTeX psfrag package,
+ for including PostScript documents, while replacing certain text
+ strings with TeX typeset replacements. This uses the example.eps
+ figure from the psfrag 3.0 distribution.
+
+miniltx.tex
+ A small `miniLaTeX' that defines fakes or otherwise hacks
+ sufficient bits of LaTeX internals so that the packages can load.
+
+picture.tex
+ The user interface to the picture environment.
+ \input picture.
+ Normally a plain-style syntax is used, viz
+ \picture(100,100)
+ ....
+ \endpicture
+
+ However if the command \LaTeXbegin is issued, then a LaTeX
+ syntax of
+ \begin{picture}(100,100)
+ ....
+ \end{picture}
+ May be used. this may be prefered if the picture is being copied
+ from a LaTeX document, or if it is produced automatically from
+ a drawing tool such as xfig or texcad.
+
+autopict.ins
+ picture.tex requires the use of the Standard LaTeX file
+ autopict.sty. To generate this, either run the autoload.ins
+ install file in the main LaTeX distribution, which will make
+ autopict.sty along with some other files (not needed here) or
+ alternatively just obtain obtain ltpictur.dtx and docstrip.tex
+ from the LaTeX distribution, and TeX the file autopict.ins that
+ is included in this distribution.
+
+
+graphicx.tex
+ The user interface to the graphicx package.
+ \input graphicx
+ See the documentation in grfguide.ps in the LaTeX graphics
+ distribution.
+ This file sets the driver to be dvips. If you
+ use another driver, edit accordingly.
+
+color.tex
+ The user interface to the color package.
+ \input color
+ See the documentation in grfguide.ps in the LaTeX graphics
+ distribution.
+ This file sets the driver to be dvips. If you
+ use another driver, edit accordingly.
+
+
+psfrag.tex
+ The user interface to the psfrag package.
+ \input psfrag
+ See the documentation in pfgguide.tex in the psfrag distribution,
+ and the example document pfgexmpl.tex included here. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/plain/plgraph/autopict.ins b/Master/texmf-dist/doc/plain/plgraph/autopict.ins
new file mode 100644
index 00000000000..f6cc2fc7814
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plgraph/autopict.ins
@@ -0,0 +1,102 @@
+%%
+%% docstrip install file for autopict.sty (only)
+%% based on autoload.ins in the LaTeX distribution.
+
+%%
+\def\batchfile{autopict.ins}
+\input docstrip
+
+\let\interactive\relax
+
+{\ifx\generate\undefined
+\Msg{**********************************************}
+\Msg{*}
+\Msg{* This installation requires docstrip}
+\Msg{* version 2.3c or later.}
+\Msg{*}
+\Msg{* An older version of docstrip has been input}
+\Msg{*}
+\Msg{**********************************************}
+\errhelp{Move or rename old docstrip.tex.}
+\errmessage{Old docstrip in input path}
+\batchmode
+\csname @@end\endcsname
+\fi}
+
+\keepsilent
+\declarepreamble\mainpreamble
+
+This is a generated file.
+
+Copyright 1993 1994 1995 1996
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+For further copyright information, and conditions for modification
+and distribution, see the file legal.txt, and any other copyright
+notices in this file.
+
+This file is part of the LaTeX2e system.
+----------------------------------------
+ This system is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ For error reports concerning UNCHANGED versions of this file no
+ more than one year old, see bugs.txt.
+
+ Please do not request updates from us directly. Primary
+ distribution is through the CTAN archives.
+
+
+IMPORTANT COPYRIGHT NOTICE:
+
+You are NOT ALLOWED to distribute this file alone.
+
+You are allowed to distribute this file under the condition that it
+is distributed together with all the files listed in manifest.txt.
+
+If you receive only some of these files from someone, complain!
+
+
+Permission is granted to copy this file to another file with a
+clearly different name and to customize the declarations in that
+copy to serve the needs of your installation, provided that you
+comply with the conditions in the file legal.txt.
+
+However, NO PERMISSION is granted to generate or to distribute a
+modified version of this file under its original name.
+
+You are NOT ALLOWED to change this file.
+
+
+MODIFICATION ADVICE:
+
+If you want to customize this file, it is best to make a copy of
+the source file(s) from which it was produced. Use a different
+name for your copy(ies) and modify the copy(ies); this will ensure
+that your modifications do not get overwritten when you install a
+new release of the standard system. You should also ensure that
+your modified source file does not generate any modified file with
+the same name as a standard file.
+
+You can then easily distribute your modifications by distributing
+the modified and renamed copy of the source file, taking care to
+observe the conditions in legal.txt; this will ensure that other
+users can safely use your modifications.
+
+You will also need to produce your own, suitably named, .ins file to
+control the generation of files from your source file; this file
+should contain your own preambles for the files it generates, not
+those in the standard .ins files.
+
+The names of the source files used are shown above.
+
+
+
+\endpreamble
+\usepreamble\mainpreamble
+
+\generate{\file{autopict.sty}{\from{ltpictur.dtx}{def}}}
+
+
diff --git a/Master/texmf-dist/doc/plain/plgraph/exmplcol.tex b/Master/texmf-dist/doc/plain/plgraph/exmplcol.tex
new file mode 100644
index 00000000000..0442ed9a404
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plgraph/exmplcol.tex
@@ -0,0 +1,6 @@
+
+\input color
+
+a \textcolor{red}{bbb} \colorbox{green}{one two}
+
+\bye
diff --git a/Master/texmf-dist/doc/plain/plgraph/exmplgrf.tex b/Master/texmf-dist/doc/plain/plgraph/exmplgrf.tex
new file mode 100644
index 00000000000..d1a51b8ef10
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plgraph/exmplgrf.tex
@@ -0,0 +1,10 @@
+
+\input graphicx
+
+\includegraphics{a}
+
+\includegraphics[scale=2]{a}
+
+hello\rotatebox[origin=c]{180}{hello}hello
+
+\bye
diff --git a/Master/texmf-dist/doc/plain/plgraph/exmplpfg.tex b/Master/texmf-dist/doc/plain/plgraph/exmplpfg.tex
new file mode 100644
index 00000000000..0026cd0ee68
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plgraph/exmplpfg.tex
@@ -0,0 +1,17 @@
+
+\input psfrag
+
+First without psfrag:
+
+ \includegraphics[width=3.5in]{example.eps}
+
+and now with:
+
+ \psfragscanon
+ \psfrag{p1}[][l]{$\ast$}
+ \psfrag{p2}[][l]{$\ast$}
+ \psfrag{p3}{$\cos(t)$}
+ \includegraphics[width=3.5in]{example.eps}
+
+
+\bye
diff --git a/Master/texmf-dist/doc/plain/plgraph/exmplpic.tex b/Master/texmf-dist/doc/plain/plgraph/exmplpic.tex
new file mode 100644
index 00000000000..cb8852123be
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plgraph/exmplpic.tex
@@ -0,0 +1,15 @@
+\input picture
+
+\picture(100,100)
+\put(0,0){\line(1,1){50}}
+\endpicture
+
+\LaTeXbegin
+
+\begin{picture}(40,40)
+\put(0,0){\vector(1,1){40}}
+\multiput(0,5)(10,10){4}{a}
+\end{picture}
+
+\bye
+
diff --git a/Master/texmf-dist/doc/plain/plnfss/LPPL.txt b/Master/texmf-dist/doc/plain/plnfss/LPPL.txt
new file mode 100644
index 00000000000..bfe13a27b8b
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plnfss/LPPL.txt
@@ -0,0 +1,405 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3a 2004-10-01
+
+Copyright 1999 2002-04 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+you may use it with small modifications even if your work is unrelated
+to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ "LaTeX-Format".
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete, unmodified
+ copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do
+not apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under this license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for
+a particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you
+assume the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of
+the Work, or any other party who may distribute and/or modify the Work
+as permitted above, be liable to you for damages, including any
+general, special, incidental or consequential damages arising out of
+any use of the Work or out of inability to use the Work (including,
+but not limited to, loss of data, data being rendered inaccurate, or
+losses sustained by anyone as a result of any failure of the Work to
+operate with any other programs), even if the Copyright Holder or said
+author or said other party has been advised of the possibility of such
+damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2003 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2003/12/01 or later.
+ %
+ % This work has the LPPL maintenance status "maintained".
+ %
+ % This Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any "LaTeX-Format", and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change "maintained" above into "author-maintained".
+However, we recommend that you use "maintained" as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
diff --git a/Master/texmf-dist/doc/plain/plnfss/plnfss.txt b/Master/texmf-dist/doc/plain/plnfss/plnfss.txt
new file mode 100644
index 00000000000..1f60345b574
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plnfss/plnfss.txt
@@ -0,0 +1,132 @@
+plnfss-1.1
+
+Copyright 2003-2005 Han The Thanh <hanthethanh@gmx.net>.
+This file is part of plnfss. License: LPPL, version 1.3 or newer,
+according to http://www.latex-project.org/lppl.txt
+
+
+Description
+===========
+plnfss is a set of macros to provide easy font access (somewhat similar to
+NFSS but with some limitations) with plain tex.
+
+plnfss can automatically make use of PSNFSS fd files, ie. when a postscript
+font is used the relevant fd file will be loaded automatically.
+For cmr-like fonts (ec, vnr, csr or plr fonts), a special format called pfd
+(plain fd) is required and must be loaded manually.
+
+
+Authors
+=======
+The authors of plnfss are
+
+ Han The Thanh <HanTheThanh@gmx.net> and
+ Michal Konecny <mik@konecny.aow.cz>.
+
+
+License
+=======
+All files are under LPPL, version 1.3 or newer.
+
+See
+ http://www.latex-project.org/lppl.txt
+
+
+Support
+=======
+The current maintainer is
+
+ Reinhard Kotucha <Reinhard.Kotucha@web.de>
+
+
+Recent Changes
+==============
+The current version contains
+
+ * Copyright messages in all files,
+
+ * a bugfix provided by Hartmut Henkel to avoid spurious white spaces,
+
+ * additional .pfd files.
+
+
+Installation
+============
+plnfss.zip is supposed to be extracted in the root of a TDS compliant
+texmf tree. In most cases texmf-local is an appropriate place.
+
+On web2c based systems you have to update the file database. Read the
+documentation of the TeX system you are using for details.
+
+-------------------------
+You only need plnfss.zip.
+-------------------------
+
+
+Usage Example
+=============
+______________________________________________________________________
+\input plnfss
+\input ot1cm.pfd % plain font description file for CM fonts
+
+\setfontsize{12pt} % set the default font size to 12pt
+\selectfont % activate the font with requested attributes
+
+%% default attributes:
+% \setfontencoding{OT1}
+% \setfontfamily{cmr}
+% \setfontseries{m}
+% \setfontshape{n}
+% \setfontsize{10pt}
+% \setrmdefault{cmr}
+% \setttdefault{cmtt}
+% \setsfdefault{cmss}
+
+...
+some text and some \textit{italic} and some {\bfseries bold}.
+
+\usefont{OT1}{ptm}{m}{n} % switch to Times; the fd file ot1ptm.fd will
+ % be loaded automatically
+...
+______________________________________________________________________
+
+
+Supported Encodings
+===================
+The following encoding files are provided:
+
+ ams.pfd
+ il2cm.pfd
+ ly1lm.pfd
+ ot1cm.pfd
+ ot4cm.pfd
+ qxlm.pfd
+ t1lm.pfd
+ t5cm.pfd
+ t5lm.pfd
+ ts1lm.pfd
+
+Using the files
+
+ il2cmr.pfd
+ ot1cmr.pfd
+ t5cmr.pfd
+
+is deprecated, they are provided for backward compatibility only.
+
+
+Supported Commands
+==================
+\rmfamily \sffamily \ttfamily \mdseries
+\bfseries \upshape \itshape \slshape \scshape
+\normalfont
+\textrm \textsf \texttt \textmd \textbf \textup \textit \textsl \textsc
+\rm \sf \tt \md \bf \up \it \sl \sc
+
+
+What is missing?
+================
+- size commands: \large, \huge etc. Use \fontsize{20pt} instead.
+- scaling
+- math support is poor
+
diff --git a/Master/texmf-dist/doc/plain/plnfss/test-plnfss.tex b/Master/texmf-dist/doc/plain/plnfss/test-plnfss.tex
new file mode 100644
index 00000000000..9edcfa22a76
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/plnfss/test-plnfss.tex
@@ -0,0 +1,40 @@
+% plnfss-1.1
+
+% Copyright 2003-2005 Han The Thanh <hanthethanh@gmx.net>.
+% This file is part of plnfss. License: LPPL, version 1.3 or newer,
+% according to http://www.latex-project.org/lppl.txt
+
+\input plnfss
+\input ot1cm.pfd
+
+\def\testfontdecl#1#2{%
+ \expandafter\setfont#1/10pt/%
+ \leftline{%
+ \hbox to 4cm{\setfont OT1/cmtt/m/n/10pt/#1\hss}%
+ The quick brown fox jumps over a lazy dog
+ }
+ \smallskip
+}
+
+\def\testpfd#1{{%
+ \centerline{\setfont OT1/cmr/m/n/15pt/Test of \texttt{#1}}
+ \bigskip
+ \input #1
+ \let\DeclareFont=\testfontdecl
+ \input #1
+ \vfil\eject
+}}
+
+\testpfd{il2cm.pfd}
+\testpfd{ly1lm.pfd}
+\testpfd{ot1cm.pfd}
+\testpfd{ot4cm.pfd}
+\testpfd{qxlm.pfd}
+\testpfd{t1lm.pfd}
+\testpfd{t5cm.pfd}
+\testpfd{t5lm.pfd}
+
+% \testpfd{ot1cmr.pfd}
+% \testpfd{t5cmr.pfd}
+% \testpfd{ams.pfd}
+\bye
diff --git a/Master/texmf-dist/doc/plain/treetex/epodd.bbl b/Master/texmf-dist/doc/plain/treetex/epodd.bbl
new file mode 100644
index 00000000000..0d07cfe5fb8
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/treetex/epodd.bbl
@@ -0,0 +1,107 @@
+\begin{thebibliography}{10}
+
+\bibitem{BaezaTrees}
+R.~A. Baeza-Yates.
+\newblock On embedding a binary tree on a hypercube.
+\newblock Submitted for publication, November 1988.
+
+\bibitem{Tables}
+R.~J. Beach.
+\newblock {\em Setting Tables and Illustrations with Style}.
+\newblock PhD thesis, University of Waterloo, 1985.
+
+\bibitem{Karlsruhe}
+A.~Br{\"u}ggemann-Klein, P.~Dolland, and A.~Heinz.
+\newblock How to please authors and publishers: A versatile document
+ preparation system at {K}arlsruhe.
+\newblock In J.~D\'esarm\'enien, editor, {\em {\TeX{}} for Scientific
+ Documentation}, pages 8--31, Strasbourg, France, June 1986.
+\newblock Springer-Verlag Lecture Notes in Computer Science~236.
+
+\bibitem{Exeter}
+A.~Br{\"u}ggemann-Klein and D.~Wood.
+\newblock Drawing trees nicely with {\TeX}.
+\newblock In M.~Clark, editor, {\em Proceedings of the Third European
+ \TeX{}-Conference}, Exeter, England, July 1988.
+\newblock To appear.
+
+\bibitem{BinarySearchTrees}
+L.~Devroye.
+\newblock A note on the height of binary search trees.
+\newblock {\em Journal of the ACM}, 33(3):489--498, July 1986.
+
+\bibitem{BinaryTrees}
+Ph. Flajolet and A.~Odlyzko.
+\newblock The average height of binary trees and other simple trees.
+\newblock {\em Journal of Computer and System Sciences}, 25:171--213, 1982.
+
+\bibitem{DocumentFormatting}
+R.~Furuta, J.~Scofield, and A.~Shaw.
+\newblock Document formatting systems: Surveys, concepts, issues.
+\newblock {\em Computing Surveys}, 14(3):417--472, 1982.
+
+\bibitem{GML}
+Ch.~F. Goldfarb.
+\newblock A generalized approach to document markup.
+\newblock {\em SIGPLAN Notices of the ACM}, 16(6):68--73, June 1981.
+
+\bibitem{KWIFIP}
+R.~Klein and D.~Wood.
+\newblock On binary trees.
+\newblock In G.~Ritter, editor, {\em Proceedings of the 11th World Computer
+ Congress}, San Francisco, USA, 1989.
+\newblock To appear.
+
+\bibitem{ACP}
+D.~E. Knuth.
+\newblock {\em Fundamental Algorithms}, volume~1 of {\em The Art of Computer
+ Programming}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1973.
+
+\bibitem{TeXbook}
+D.~E. Knuth.
+\newblock {\em The {\TeX{}}book}, volume~A of {\em Computers \& Typesetting}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1986.
+
+\bibitem{LaTeX}
+L.~Lamport.
+\newblock {\em {\LaTeX}, User's Guide \& Reference Manual}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1986.
+
+\bibitem{OAPD}
+Th. Ottmann and P.~Widmayer.
+\newblock {\em Algorithmen und Datenstrukturen}.
+\newblock Bibliographisches Institut, Mannheim, 1989.
+\newblock To appear.
+
+\bibitem{Grif}
+V.~Quint, I.~Vatton, and H.~Bedor.
+\newblock Grif: An interactive environment for {\TeX{}}.
+\newblock In J.~D\'esarm\'enien, editor, {\em {\TeX{}} for Scientific
+ Documentation}, pages 145--158, Strasbourg, France, June 1986.
+\newblock Springer-Verlag Lecture Notes in Computer Science~236.
+
+\bibitem{Scribe}
+B.~K. Reid.
+\newblock {\em Scribe: A Document Specification Language and its Compiler}.
+\newblock PhD thesis, Carnegie Mellon University, 1980.
+
+\bibitem{TidierTrees}
+E.~M. Reingold and J.~S. Tilford.
+\newblock Tidier drawings of tree.
+\newblock {\em IEEE Transactions on Software Engineering}, 7(2):223--228, March
+ 1981.
+
+\bibitem{Complexity}
+K.~J. Supowit and E.~M. Reingold.
+\newblock The complexity of drawing trees nicely.
+\newblock {\em Acta Informatica}, 18(4):377--392, 1983.
+
+\bibitem{TidyTrees}
+Ch. Wetherell and A.~Shannon.
+\newblock Tidy drawings of trees.
+\newblock {\em IEEE Transactions on Software Engineering}, 5(5):514--520,
+ September 1979.
+
+\end{thebibliography}
+
diff --git a/Master/texmf-dist/doc/plain/treetex/epodd.tex b/Master/texmf-dist/doc/plain/treetex/epodd.tex
new file mode 100644
index 00000000000..06d5b65bd9f
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/treetex/epodd.tex
@@ -0,0 +1,1189 @@
+% This is epodd.tex, the description of the treetex macro package as it will
+% appear in EP-ODD in summer 89. It is in some aspects more general
+% than tree_doc.tex and corrects an error in the computation of
+% the number of registers used by treetex. The user interface of
+% treetex is explained in more detail in tree_doc.tex.
+
+\documentstyle[12pt,fullpage]{article}
+
+\clubpenalty=10000
+\widowpenalty=10000
+
+\def\addcontentsline#1#2#3{\relax}% Some captions are too long for some
+ % TeX installations (buffer size too small)
+
+\newenvironment{lemma}{\begingroup\samepage\begin{lemmma}\ }{\end{lemmma}%
+ \endgroup}
+\newtheorem{lemmma}{Lemma}[section]
+\newenvironment{proof}{\begin{prooof}\rm\ \nopagebreak}{\end{prooof}}
+\newcommand{\proofend}{\qquad\ifmmode\Box\else$\Box$\fi}
+\newtheorem{prooof}{Proof}
+\renewcommand{\theprooof}{} % makes shure that prooof doesn't get numbers
+\newenvironment{Figure}{\begin{figure}\vspace{1\baselineskip}}%
+ {\vspace{1\baselineskip}\end{figure}}
+\newlength{\figspace} % space between figures in a single
+\setlength{\figspace}{30pt} % Figure environment
+
+\newcommand{\var}[1]{{\it #1\/}} % use it for names of variables
+\renewcommand{\emph}[1]{{\em #1\/}} % use it for emphazided text
+ % (This notion sticks to the
+ % applicative style of markup.)
+\renewcommand{\O}{{\rm O}} % O-notation, also for math mode
+\newcommand{\T}{{\cal T}} % the set T in math mode
+\newcommand{\TreeTeX}{Tree\TeX}
+\newcommand{\fig}[1]{Figure~\ref{#1}}
+\let\p\par
+
+\input treetex
+\Treestyle{\vdist{20pt}\minsep{16pt}}
+\dummyhalfcenterdim@n=2pt
+
+% \def\Tree#1\end#2{\end{Tree}} % Trees are not processed
+% \let\endTree\relax %
+
+\def\Node(#1,#2){\put(#1,#2){\circle*{4}}}
+\def\Edge(#1,#2,#3,#4,#5){\put(#1,#2){\line(#3,#4){#5}}}
+
+\def\enode{\node{\external\type{dot}}}
+\def\inode{\node{\type{dot}}}
+
+\def\e{\node{\external\type{dot}}}
+\def\i{\node{\type{dot}}}
+\def\il{\node{\type{dot}\leftonly}}
+\def\ir{\node{\type{dot}\rightonly}}
+
+\newcommand{\stack}[3]{%
+ \vtop{\settowidth{\hsize}{#1}%
+ \setlength{\leftskip}{0pt plus 1fill}%
+ \setlength{\baselineskip}{#2}#3}}
+
+\let\multic\multicolumn
+
+\newlength{\hd} % hidden digit
+\setbox0\hbox{1}
+\settowidth{\hd}{\usebox{0}}
+\newcommand{\ds}{\hspace{\hd}} % digit space
+
+\newcommand{\ccol}[1]{\multicolumn{1}{c}{#1}}
+
+\hyphenation{post-or-der sym-bol Karls-ruhe bool-ean}
+
+\begin{document}
+
+\bibliographystyle{plain}
+
+\title{Drawing Trees Nicely with \TeX\thanks{This work was supported by
+ a Natural Sciences and Engineering Research Council of Canada
+ Grant~A-5692, a Deutsche Forschungsgemeinschaft Grant~Sto167/1-1,
+ and a grant from the Information Technology Research Centre.
+ It was begun during the first author's stay with
+ the Data Structuring Group in Waterloo.}}
+\author{Anne Br\"uggemann-Klein\thanks{Institut f\"ur Informatik,
+ Universit\"at Freiburg, Rheinstr.~10--12, 7800~Freiburg,
+ West~Germany}\ \and Derick Wood\thanks{Data
+ Structuring Group, Department of Computer Science, University of
+ Waterloo, Waterloo, Ontario N2L~3G1, Canada}}
+\date{}
+\maketitle
+
+\begin{abstract}
+
+We present a new solution to the tree drawing problem that
+integrates an excellent tree drawing algorithm into one of the best text
+processing systems available. More precisely, we present a \TeX{} macro package
+called \TreeTeX{} that produces drawings of trees from a purely logical
+description. Our approach has three advantages: Labels
+for nodes can be handled in a reasonable way; porting
+\TreeTeX{} to any site running \TeX{} is a trivial operation; and
+modularity in the description of a tree and \TeX{}'s macro capabilities
+allow for libraries of subtrees and tree classes.
+
+In addition, \TreeTeX{} has an option that produces
+drawings that make the
+\emph{structure} of the trees more obvious to the human eye,
+even though they may not be as aesthetically pleasing.
+
+\end{abstract}
+
+\section{Introduction}
+
+The problem of successfully integrating pictures and text in a
+document processing environment is tantalizing and difficult.
+Although there are systems available that allow such integration, they
+fall short in many ways, usually in document quality. Furthermore,
+most authors using document preparation systems are neither book
+designers nor graphic artists. Just as modern document preparation
+systems do not expect an author to be a book designer, so we would
+prefer that they do not expect an author to be a graphic artist. The
+second author, Wood, needed to draw many trees in a series of papers
+on trees and in a projected book on trees. This problem enabled us
+to tackle the integration issue for one subarea of graphics, namely,
+tree drawing. We had the decided advantage that there already existed good
+algorithms to draw trees {\em without any author intervention}.
+Previous experience of the integration of pictures and text had been
+uninspiring; the systems expected the author to prepare each picture
+in total. For example, a tree could be built up from smaller
+subtrees but the relative placement of them was left to the author.
+This situation continues to hold today with the drawing facilities
+available on most personal computers, and, because of this, the
+resulting figures still appear to be ``hand-drawn.'' Additionally,
+they are of inferior quality when compared with the quality of
+the surrounding text.
+
+In this paper we present an entirely new solution that integrates
+a tree drawing algorithm into one of the best text processing
+systems available. More precisely, we describe \TreeTeX{}, a
+\TeX{} macro package that produces an aesthetically pleasing
+drawing of a tree from a purely logical description.
+We made two fundamental design
+decisions that heavily influenced the method of implementation.
+First, we wanted to allow an author to label the nodes of a tree.
+This decision means that the tree drawing package must be able to
+typeset labels exactly as they would be typeset by the typesetting
+program. There are two reasons for this. Text should be typeset
+consistently, wherever it appears in a document, and the tree
+drawing program needs to know the dimensions of the typeset labels.
+Second, we wanted to ensure that the program could be ported
+easily to other installations and sites, so that other, putative
+users would be able to use it easily.
+Indeed, \TreeTeX{} has been used successfully to typeset trees in
+\cite{BaezaTrees}, \cite{KWIFIP}, and \cite{OAPD}.
+
+By basing our package on \TeX{}, which for more subjective
+reasons we preferred over other typesetting systems such as
+troff, we could ensure wide interest
+in the package. By implementing it as a \TeX{} macro package
+instead of a preprocessor
+we made porting trivial and, furthermore, this also ensured
+consistency of typeset text within a document.
+The down side of this decision is that we had to program with
+\TeX{} macros, not an experience to be recommended, and we had to live
+with the inherent register limitations of \TeX{}.
+
+This paper consists of a further nine sections. In Sections~2, 3 and~4,
+we discuss the aesthetics of tree drawing and the algorithm of
+Reingold and Tilford~\cite{TidierTrees}. In Sections~5, 6, and~7, we
+describe our method of incorporating tree drawing into \TeX{}. Then,
+in the last three short sections, we consider the expected number of
+registers \TeX{} needs to draw a tree, the user interface (and three
+\TreeTeX{} examples), and discussion of, among other things, the
+performance of \TreeTeX{}.
+
+\section{Aesthetical criteria for drawing trees}
+
+In this paper, we are dealing with ordered
+trees in the sense of~\cite{ACP}, specifically binary and unary-binary
+trees. A {\em binary tree\/} is a finite set of nodes that either
+is empty, or consists of a root and two disjoint binary trees called
+the left and right subtrees of the root. A {\em unary-binary tree\/} is
+a finite set of nodes that either is empty, or consists of a root and
+two disjoint unary-binary trees, or consists of a root and one
+nonempty unary-binary tree. An {\em extended binary tree\/} is a binary tree
+in which each node has either two nonempty subtrees or two
+empty subtrees.
+
+There are some basic agreements on how such trees should be drawn, reflecting
+the top-down and left-right ordering of nodes in a tree.
+In \cite{TidierTrees} and \cite{TidyTrees} these basic agreements were
+formalized as the following axioms.
+
+\begin{enumerate}
+\item[1.] Trees impose a distance on the nodes; no node
+ should be closer to the root than any of its
+ ancestors.
+\item[2.] Nodes on the same level should lie on a straight
+ line, and the straight lines defining the levels should be
+ parallel.
+\item[3.] The relative order of nodes on any level should be the same
+ as in the level order traversal of the tree.
+\end{enumerate}
+
+These axioms guarantee that trees are drawn as planar graphs: edges do
+not intersect except at nodes. Two further axioms improve the aesthetical
+appearance of trees.
+
+\begin{enumerate}
+\item[4.] In a unary-binary tree, each left child should be positioned
+ to the left of its parent, each
+ right child to the right of its parent, and each unary child
+ should be positioned below its parent.
+\item[5.] A parent should be centered over its children.
+\end{enumerate}
+
+An additional axiom deals with the problem of tree drawings becoming too wide
+and therefore exceeding the physical limit of the output medium:
+
+\begin{enumerate}
+\item[6.] Tree drawings should occupy as little width as possible without
+ violating the other axioms.
+\end{enumerate}
+
+In \cite{TidyTrees}, Wetherell and Shannon introduce two algorithms for
+tree drawings, the first of which fulfills axioms~1--5, and the second
+1--6. However, as Reingold and Tilford in \cite{TidierTrees}
+point out, there is a lack of symmetry in the algorithms of
+Wetherell and Shannon which may lead to unpleasant results;
+therefore, Reingold and Tilford introduce a new structured
+axiom.
+
+\begin{enumerate}
+\item[7.] A subtree of a given tree should be
+ drawn the same way regardless of where it occurs in the tree.
+\end{enumerate}
+
+Axiom~7 allows the same tree to be drawn differently only when it occurs as
+a subtree in different trees.
+Reingold and Tilford give an algorithm which fulfills axioms~1--5
+and~7. Although
+this algorithm doesn't fulfill axiom~6,
+the aesthetical improvements are well worth the additional space.
+\fig{algorithms} illustrates the benefits of axiom~7, and \fig{narrowtrees}
+shows that the algorithm of Reingold and Tilford violates axiom~6.
+
+\begin{Figure}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\enode
+\enode\enode\inode\enode\enode\inode\inode\inode
+\node{\external\type{dot}\rght{\unskip\hskip2\mins@p\hskip2\dotw@dth}}
+\enode\enode\inode\enode\enode\inode\inode\inode
+\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\enode
+\enode\enode\inode\enode\enode\inode\inode\inode
+\enode
+\enode\enode\inode\enode\enode\inode\inode\inode
+\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\caption{The left tree is drawn by the algorithm of Wetherell and Shannon,
+and the tidier right one is drawn by the algorithm of Reingold and Tilford.}
+\label{algorithms}
+
+\vspace{\figspace}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\enode\enode\enode\enode\enode\enode\enode\enode\enode
+\enode\inode\inode\inode
+\enode\inode\inode\inode
+\enode\inode\inode\inode
+\enode\inode\inode\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\enode\enode\enode\enode\enode\enode\enode\enode
+\node{\external\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\node{\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\node{\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\node{\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\caption{The left tree is drawn by the algorithm of Reingold and Tilford, but
+the right tree shows that narrower drawings fulfilling all aesthetic axioms
+are possible.}
+\label{narrowtrees}
+\end{Figure}
+
+
+\section{The algorithm of Reingold and Tilford}
+
+The algorithm of Reingold and Tilford (hereafter called ``the RT~algorithm'')
+takes a modular approach to the
+positioning of nodes. The relative positions of the nodes in a subtree
+are calculated independently of the rest of the tree. After the
+relative positions of two subtrees have been calculated, they can be
+joined as siblings in a larger tree by placing them as close
+together as possible and centering the parent node above them.
+Incidentally, this modular approach is the reason that the
+algorithm fails to fulfill axiom~6; see~\cite{Complexity}.
+Two sibling subtrees are placed as close together as possible,
+during a postorder traversal, as follows.
+Imagine that the two subtrees of a binary node
+have been drawn and cut out of paper along
+their contours. Then, starting with the two subtrees superimposed at their
+roots, move them apart until a minimal agreed upon distance
+between the trees is obtained at each level. This can be done gradually.
+Initially, their roots are separated by some agreed upon minimum
+distance; then, at the next level, they are pushed
+apart until the minimum separation is established there.
+This process is continued at successively lower levels until the
+last level of the shorter subtree is reached. At some levels no movement may be
+necessary, but at no level are the two subtrees moved closer
+together. When the process is complete, the position of the
+subtrees is fixed relative to their parent, which is centered over them.
+Assured that the subtrees will never be placed closer together,
+the postorder traversal is continued.
+
+A nontrivial implementation of
+this algorithm has been obtained by Reingold and Tilford in~\cite{TidierTrees}
+that runs in time $\O(N)$, where $N$ is the number of
+nodes of the tree to be drawn.
+Their crucial idea is to keep track of the contour of the subtrees
+by special pointers, called threads, such that whenever
+two subtrees are joined, only the
+top part of the trees down to the lowest level of the
+smaller tree need to be taken into account.
+
+The nodes are positioned on a fixed grid and are
+considered to have zero width; labeling is not provided.
+Although the algorithm only draws binary trees, it is easily
+extended to multiway trees.
+
+\section{Improving human perception of trees}
+
+It is common understanding in book design that aesthetics and readability
+don't necessarily coincide, and---as Lamport (\cite{LaTeX}) puts it---%
+``documents are meant to be read, not hung in museums.''
+Therefore, readability is more important than aesthetics.
+
+When it comes to tree drawings, readability means that the structure of
+a tree must be easily recognizable. This criterion is not always met
+by the RT~algorithm. As an example, there are trees whose structure is
+different even though they have the same number
+of nodes on each level. The RT~algorithm might assign identical positions to
+these nodes making it very hard to perceive the structural differences.
+Hence, we have modified the RT~algorithm such that additional white space
+is inserted between subtrees of
+\emph{significant} nodes. Here a binary node
+is called significant if the minimum distance
+between its two subtrees is achieved \emph{below} their root level.
+Setting the amount of additional white space to zero retains the original RT~%
+placement. The effect of having nonzero additional white space between
+the subtrees of significant
+nodes is illustrated in \fig{addspace}.
+
+Another feature we have added to the RT~algorithms is the possibility to draw
+an unextended binary tree with the same placement of nodes as its
+associated extended version;
+this makes the structure of a tree more prominent; see \fig{extended}.
+We define the \emph{associated extended version}
+of a binary tree to be the binary tree obtained by replacing each empty subtree
+having a nonempty sibling with a subtree consisting of one node.
+
+\begin{Figure}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\e\il\e\e\i\i\il % the left subtree
+\e\ir\il % the right subtree
+\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\e\il\il\il % the left subtree
+\e\e\i\e\i\il % the right subtree
+\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\adds@p10pt
+\begin{Tree}
+\e\il\e\e\i\node{\type{dot}\lft{$\longrightarrow$}}\il % the left subtree
+\e\ir\il % the right subtree
+\node{\type{dot}\lft{$\longrightarrow$}}
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\e\il\il\il % the left subtree
+\e\e\i\e\i\il % the right subtree
+\node{\type{dot}\lft{$\longrightarrow$}}
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\adds@p0pt
+
+\caption{The nodes of the first two trees are placed in the same positions
+by the RT~algorithm, although the structure of the two trees is different.
+The alternative drawings highlight the structural differences
+of the trees by adding additional white space between the subtrees of
+($\longrightarrow$) significant nodes.}
+\label{addspace}
+\end{Figure}
+
+\begin{Figure}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\e\e\i\il\e\e\i\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\hbox{}\qquad
+\begin{Tree}
+\e\e\i\e\i\e\ir\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\hbox{}\\
+\extended
+\begin{Tree}
+\e\e\i\il\e\e\i\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\hbox{}\qquad
+\begin{Tree}
+\e\e\i\e\i\e\ir\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\hbox{}\\
+\noextended
+\begin{Tree}
+\e\e\i\e\i\e\e\i\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\caption{As in the previous figure, the nodes of the first two trees
+are placed in the same position by the RT algorithm,
+although their structure is different. The modified
+RT~algorithms highlights the structural differences of the trees by
+drawing them like their identical extended
+version (given in the third row), but suppressing the additional nodes.}
+\label{extended}
+\end{Figure}
+
+
+\section{Trees in a document preparation environment}
+
+Drawings of trees do not usually appear by themselves,
+but are included in some text
+that is itself typeset by a text processing system. Therefore, a typical
+scenario is a pipe of three stages. First, we have a tree drawing
+program that calculates the positioning of the nodes of the tree to
+be drawn and outputs a description of the tree drawing in
+some graphics language; this is followed by
+a graphics system that transforms this
+description into an intermediate language that can be interpreted by the output
+device; and, finally, we have the
+text processing system that integrates the output of the
+graphics system into the text.
+
+This scenario loses its linear structure once nodes have to be labeled, since
+the labeling influences the positioning of the nodes. Labels usually occur
+inside, to the left of, to the right of, or beneath nodes (the latter only for
+external nodes). Their widths should certainly be taken into account
+by the tree drawing algorithm. But the labels have to be typeset first
+to determine their extensions,
+preferably by the typesetting program that
+is used for the regular text, because this ensures uniformity in the textual
+parts of the document and provides the author with the full power of a
+text processing system for composing the labels. Hence, a more complex
+communication scheme than a simple pipe is required.
+
+Although a system of two processes running simultaneously might be the most
+elegant solution, we wanted a system that is easily portable to
+widely different machines at our sites
+including personal computers with single process
+operating systems.
+Therefore, we decided to use a text processing system
+having programming facilities powerful enough to
+program a tree drawing algorithm and graphics facilities powerful enough
+to draw a tree. One text processing system
+rendering outstanding typographic quality and satisfactory programming
+facilities is \TeX, developed by Knuth at Stanford University;
+see~\cite{TeXbook}.
+The \TeX{} system includes the following programming facilities.
+
+\begin{enumerate}
+\item[1.] Datatypes:\\
+ integers~(256), dimensions\footnote{The term \emph{dimension} is used
+ in \TeX\ to describe physical measurements of typographical objects;
+ for example, the length of a word.}~(512),
+ boxes~(256), tokenlists~(256), and
+ boolean variables~(unrestricted).
+\item[2.] Elementary statements:\\
+ $a:=\rm const$, $a:=b$ (all types);\\
+ $a:=a+b$, $a:=a*b$, $a:=a/b$ (integers and dimensions); and\\
+ horizontal and vertical nesting of boxes.
+\item[3.] Control constructs:\\
+ if-then-else statements testing relations between integers,
+ dimensions, boxes, or boolean variables.
+\item[4.] Modularization constructs:\\
+ macros with up to 9~parameters (can be viewed as procedures without
+ the concept of local variables).
+\end{enumerate}
+
+Although the programming
+facilities of \TeX{} hardly exceed the abilities of a Turing machine,
+they are sufficient to
+handle small programs. How about the graphics facilities?
+Although \TeX{} has no built-in graphics facilities, it
+allows the placement of characters in arbitrary positions on
+the page. Therefore, complex pictures can be synthesized from elementary
+picture elements treated as characters. Lamport has included such
+a picture drawing environment in his macro package \LaTeX, using
+quarter circles of different sizes and line segments (with and without
+arrow heads) of different slopes as basic elements; see~\cite{LaTeX}.
+These elements are sufficient for drawing trees.
+
+This survey of \TeX's capabilities implies that \TeX{} may be a suitable
+text processing system to implement a tree drawing algorithm directly.
+We base our algorithm on the RT~algorithm, because this algorithm
+gives, aesthetically, the most pleasing results. In the first version
+presented here, we
+restrict ourselves to unary-binary trees, although our method is
+applicable to arbitrary multiway trees. But to take advantage
+of the text processing environment, we expand the algorithm to allow
+labeled nodes.
+
+In contrast to previous tree drawing programs, we feel no necessity to
+position the nodes of a tree on a fixed grid. While this may be
+reasonable for a plotter with a coarse resolution, it is certainly not
+necessary for \TeX, a system that is capable of handling
+arbitrary dimensions
+and producing device \emph{independent} output.
+
+
+\section{A representation method for \TeX{}trees}
+
+The first problem to be solved in implementing our tree drawing algorithm
+is how to choose a good internal representation
+for trees. A straightforward adaptation
+of the implementation by Reingold and Tilford requires, for each node,
+at least:
+%
+\begin{enumerate}
+\item two pointers to the children of the node,
+\item two dimensions for the offset to the left and the right child (these
+ may be different once there are labels of different widths to the
+ left and right of the nodes),
+\item two dimensions for the $x$- and $y$-coordinates of the final
+ position of the nodes,
+\item three or four labels, and
+\item one token to store the geometric shape (circle, square, framed text, etc.)
+ of the node.
+\end{enumerate}
+%
+Because these data are used frequently in calculations, they should be
+stored in registers (that's what variables are called in \TeX)
+rather than being recomputed, to obtain
+reasonably fast performance. This gives a total of $10N$ registers for
+a tree with $N$ nodes, which quickly exceeds
+\TeX's limited supply of registers. Therefore, we present a
+modified algorithm hand-tailored to the abilities of \TeX{}.
+We start with the following observation.
+Suppose a unary-binary tree is built bottom-up, using a postorder
+traversal. This can be done by repeating the following three steps in
+an order determined by the tree to be built.
+
+\begin{enumerate}
+\item Create a new subtree consisting of one external node.
+\item Create a new subtree by appending the two subtrees last created
+ to a new binary node; see \fig{Construct}.
+\item Create a new subtree by appending the subtree created last as a left,
+ right, or unary subtree of a new node; see \fig{Construct}.
+\end{enumerate}
+
+(A pointer to) each subtree that has been
+created in steps 1--3 is pushed onto a stack, and
+steps 2 and 3 remove two trees or one tree, respectively,
+from the stack before the push
+operation is carried out. The tree to be built is
+the tree remaining on the stack.
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\treesymbol{\lvls{2}}%
+\hspace{-\l@stlmoff}\usebox{\l@sttreebox}\hspace{\l@strmoff}
+$+$
+\treesymbol{\lvls{2}}%
+\hspace{-\l@stlmoff}\usebox{\l@sttreebox}\hspace{\l@strmoff}\quad
+$\Longrightarrow$\quad
+\treesymbol{\lvls{2}}%
+\treesymbol{\lvls{2}}%
+\node{\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\end{Tree}
+
+\vskip\baselineskip
+
+\begin{Tree}
+\treesymbol{\lvls{2}}%
+\hspace{-\l@stlmoff}\usebox{\l@sttreebox}\hspace{\l@strmoff}\quad
+$\Longrightarrow$\quad
+\treesymbol{\lvls{2}}%
+\node{\leftonly\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\quad or\quad
+\treesymbol{\lvls{2}}%
+\node{\unary\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\quad or\quad
+\treesymbol{\lvls{2}}%
+\node{\rightonly\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\end{Tree}
+
+\caption{Construction steps 2 and 3}
+\label{Construct}
+\end{Figure}
+
+This tree traversal is performed twice in the RT~algorithm.
+During the first pass,
+at each execution of steps 2 or~3, the relative positions of the
+subtree(s) and of the new node are computed.
+A closer examination of the RT~algorithm reveals that information about the
+subtree's coordinates is not needed during this pass; the contour information
+alone is sufficient. Complete information is only needed in the second
+traversal, when the tree is really drawn. This is where we can use
+a special feature of \TeX{} that allows us to save registers.
+Unlike Pascal, \TeX{} has the capability of
+storing a drawing in a single box register that can be positioned freely in
+later drawings. This means that in our implementation the two passes
+of the original RT~algorithm can be woven into a single pass,
+storing the contour and drawing of each subtree on the stack.
+Although the latter is a complex object, it takes only one of
+\TeX's precious registers.
+
+
+\section{The internal representation}
+
+Given a tree, the corresponding \TeX{}tree is a box containing
+the ``drawing'' of the tree, together with some additional
+information about the contour of the tree.
+The reference point of a \TeX{}tree-box is always in the root of the
+tree. The height, depth, and width of the box of a \TeX{}tree are
+of no importance in this context.
+
+The additional information about the contour of the tree is stored in some
+registers for numbers and dimensions and
+is needed in order to put subtrees together to form a larger tree.
+An array \var{loff} of dimensions contains for each
+level of the tree the horizontal offset between the
+left end of the leftmost node at the current level and the
+left end of the leftmost node at the next level.
+The horizontal offset between the root
+and the leftmost node of the whole tree is hold in \var{lmoff}, and
+the horizontal offset between the root and the leftmost node at
+the bottom level of the tree is hold in \var{lboff}.
+Finally, \var{ltop} holds the distance between the reference point
+of the tree and the leftmost end of the root.
+We use
+\var{roff}, \var{rmoff}, \var{rboff}, and \var{rtop}
+as the corresponding variables for ``left'' replaced by ``right.'' Finally,
+\var{height} holds the height of the tree, and \var{type} holds the
+geometric shape of the root of the tree. \fig{TeXtree} shows an example
+\TeX{}tree, that is a tree drawing and the corresponding additional information.
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\e\ir\ir\e
+ \node{\type{dot}\rightonly\rght{\unskip\vrule height.8pt width5pt depth0pt}}%
+ \i % A
+\end{Tree}
+\leavevmode
+\stack{-10pt}{\vd@st}{%
+ -10pt\\10pt\\10pt\\\var{loff}}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 15pt\\5pt\\-10pt\\\var{roff}}%
+
+\vskip\baselineskip\raggedright
+height:~3, type:~dot, ltop:~2pt, rtop:~2pt, lmoff:~-10pt, rmoff:~20pt, lboff:~10pt,
+rboff:~10pt.
+
+\caption{A \TeX{}tree consists of the drawing of the tree and the additional
+information. The width of the dots is 4pt, the minimal separation between
+adjacent nodes is 16pt, making for a distance of 20pt center to center.
+The length of the small rule labeling
+one of the nodes is 5pt. The column left (right)
+of the tree drawing is the array \var{loff} (\var{roff}),
+describing the left (right) contour of the tree. At each level,
+the dimension given is the horizontal
+offset between the border at the current and
+at the next level. The offset between
+the left border of the root node and the leftmost node at level~1 is -10pt,
+the offset between the right border of the root node and the rightmost node at
+level~1 is 15pt, etc.}
+\label{TeXtree}
+\end{Figure}
+
+Given two \TeX{}trees \var{A} and \var{B},
+how can a new \TeX{}tree \var{C} be built that
+consists of a new root and has \var{A} and \var{B} as subtrees?
+An example is given in \fig{AddInfo}.
+First we determine which tree is higher; this is
+\var{B} in the example.
+Then we have to compute the minimal distance
+between the roots of \var{A} and \var{B}, such that at all levels
+of the trees there is free space of at least \var{minsep} between
+the trees when they are drawn side by side.
+For this purpose we keep track of two values, \var{totsep} and
+\var{currsep}. The variables \var{totsep} and \var{currsep}
+hold the total distance between the roots and the distance
+between the rightmost node of \var{A} and the leftmost node
+of \var{B} at the current level. To calculate
+\var{totsep} and \var{currsep}, we start at level 0 and
+visit each level of the trees until we reach the bottommost level
+of the smaller tree; this is \var{A} in our example.
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\e\ir\ir\e
+ \node{\type{dot}\rightonly\rght{\unskip\vrule height.8pt width5pt depth0pt}}%
+ \i % A
+\end{Tree}
+\leavevmode
+A: \stack{-10pt}{\vd@st}{%
+ -10pt\\10pt\\10pt\\\ \\\var{loff}(\var{A})}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 15pt\\5pt\\-10pt\\\ \\\var{roff}(\var{A})}%
+\qquad
+\begin{Tree}
+\e\il\e\i\il\il\ir % B
+\end{Tree}
+\leavevmode
+B: \stack{-10pt}{\vd@st}{%
+ 10pt\\-10pt\\-10pt\\-10pt\\-10pt\\\ \\\var{loff}(\var{B})}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 10pt\\-10pt\\-10pt\\10pt\\-30pt\\\ \\\var{roff}(\var{B})}%
+\\[\figspace]
+\begin{Tree}
+\e\ir\ir\e
+ \node{\type{dot}\rightonly\rght{\unskip\vrule height.8pt width5pt depth0pt}}%
+ \i % A
+\e\il\e\i\il\il\ir % B
+\i % C
+\end{Tree}
+\leavevmode
+C: \stack{-10pt}{\vd@st}{%
+ -20\\-10pt\\%
+ \makebox[0pt][r]{\var{loff}(\var{A})$\smash{\left\{\vrule height\vd@st
+ depth\vd@st width0pt\right.}$ }%
+ 10pt\\10pt\\%
+ \makebox[0pt][r]{$\longrightarrow$ }%
+ 10pt\\%
+ \makebox[0pt][r]{\raisebox{-.5\vd@st}{\var{loff}(\var{B})$\smash
+ {\left\{\vrule height.5\vd@st
+ depth.5\vd@st width0pt\right.}$ }}%
+ \makebox[0pt][r]{-}10pt\\\ \\\var{loff}(\var{C})}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 20pt\\10pt\\-10pt\\-10pt%
+ \makebox[0pt][l]{\raisebox{-.5\vd@st}{
+ $\smash{\left\}\vrule height2.5\vd@st
+ depth2.5\vd@st width0pt\right.}$\var{roff}(\var{B})}}%
+ \\10pt\\-30pt\\\ \\\var{roff}(\var{C})}%
+
+\vspace{\figspace}
+\centering
+\begin{tabular}{|l|r|r|r|}
+\hline
+&\multic{1}{c|}{\var{A}}&\multic{1}{c|}{\var{B}}&\multic{1}{c|}{\var{C}}\\
+\hline
+height&\multic{1}{c|}{3}& \multic{1}{c|}{5}& \multic{1}{c|}{6}\\
+type& \multic{1}{c|}{dot}&\multic{1}{c|}{dot}&\multic{1}{c|}{dot}\\
+ltop& 2pt& 2pt& 2pt\\
+rtop& 2pt& 2pt& 2pt\\
+lmoff& -10pt& -30pt& -30pt\\
+rmoff& 20pt& 10pt& 30pt\\
+lboff& 10pt& -30pt& -10pt\\
+rboff& 10pt& -30pt& -10pt\\
+\hline
+\end{tabular}\qquad
+\begin{tabular}{|c|r|r|}
+\hline
+\multic{1}{|c|}{level}&\multic{1}{c|}{\var{totsep}}&
+ \multic{1}{c|}{\var{currsep}}\\
+\hline
+0&20pt&0/16pt\\
+1&25pt&11/16pt\\
+2&40pt&1/16pt\\
+3&40pt&16pt\\
+\hline
+\end{tabular}
+\caption{The \TeX{}trees \var{A} and~\var{B} are combined to form the
+larger \TeX{}\-tree~\var{C}. The first table gives the additional
+information of the three \TeX{}trees,
+and the second table gives the
+history of the computation for \var{totsep} and \var{currsep}.}
+\label{AddInfo}
+\end{Figure}
+
+At level 0, the distance between the roots of \var{A} and \var{B}
+should be at least \var{minsep}. Therefore, we set
+$\var{totsep}:=\var{minsep} + \var{rtop}(\var{A})
++ \var{ltop}(\var{B})$ and $\var{currsep}:=\var{minsep}$.
+Using $\var{roff}(\var{A})$ and $\var{loff}(\var{B})$, we can
+calculate \var{currsep} for the next level.
+If $\var{currsep} < \var{minsep}$, we have to increase \var{totsep} by
+the difference and update \var{currsep}. This process is
+repeated until we reach the lowest level of \var{A}
+at which point \var{totsep} holds the final distance between the
+nodes of \var{A} and \var{B}, as calculated by the RT~algorithm.
+If the root of \var{C} is a significant node, then the additional space,
+which is 0pt by default, is added to \var{totsep}.
+However, the approach of synthesizing
+drawings from simple graphics characters allows only a finite
+number of orientations for the tree edges; therefore, \var{totsep}
+must be increased slightly to fit the next orientation
+available.
+
+Now we are ready to build the box of \TeX{}tree~\var{C}.
+Simply put \var{A} and~\var{B} side by side, with the reference
+points \var{totsep}~units apart, insert a new node
+above them, and connect the parent and children by edges.
+Next, we compute the additional information
+for \var{C}. This can be done by using the additional information
+for \var{A} and~\var{B}.
+Note that most components of $\var{roff}(\var{C})$ and
+$\var{lroff}(\var{C})$ are the same as in the higher tree, which
+is \var{B} in our case.
+So, if we can avoid moving this information around,
+the number of counters we have to access to update the additional information
+for \var{C} is within a small constant of the height of~\var{A}.
+Hence, we can apply the same argument as
+in~\cite{TidierTrees}, which gives
+us a running time of $\O(N)$ for drawing a tree with N nodes.
+
+We must design the allocation of storage registers for
+the additional information of \TeX{}trees carefully to fulfill the
+following requirement. If a new tree is built from
+two subtrees, the additional information of the new tree
+shares storage with its larger subtree.
+Organizational overhead, that is,
+pointers that keep track of the locations of different parts of additional
+information, must be avoided.
+This means that the additional information
+for one \TeX{}tree should be stored in a sequence
+of consecutive dimension registers
+such that only one pointer for access to the first element
+in this sequence is needed. On the other hand, each parent
+tree is higher and, therefore, needs more storage than its subtrees.
+So we must ensure that there is always enough space in the sequence
+for more information.
+
+The obvious way to fulfill these requirements is to use a stack and to
+allow only the topmost \TeX{}trees of this stack to be
+combined into a larger tree at any time.
+This leads to the following allocation of registers: A contiguous sequence of
+box registers contains the treeboxes of the subtrees in the stack. A
+contiguous sequence of token registers contains the type information for the
+nodes of the subtrees in the stack. For each subtree in the stack,
+a contiguous sequence of dimension registers contains the contour
+information of the subtree. The ordering of these groups of dimension
+registers reflects the ordering of the subtrees in the
+stack. Finally, a contiguous sequence of counter registers contains
+the height and the address of the first dimension register for
+each subtree in the stack. Four address counters store the addresses
+of the last treebox, type information, height, and address of contour
+information. A sketch of the register organization for a stack of \TeX{}trees
+is provided in \fig{Registers}.
+
+\begin{Figure}
+Dimension registers\\
+\var{lmoff}(1) \var{rmoff}(1) \var{lboff}(1) \var{rboff}(1) \var{ltop}(1)
+ \var{rtop}(1)\\
+\var{loff}($h_1$) \var{roff}($h_1$) \dots\ \var{loff}(1) \var{roff}(1)\\
+\dots\\
+\var{lmoff}($n$) \var{rmoff}($n$) \var{lboff}($n$) \var{rboff}($n$)
+ \var{ltop}($n$) \var{rtop}($n$)\\
+\var{loff}($h_n$) \var{roff}($h_n$) \dots\ \var{loff}(1) \var{roff}(1)\\
+\mbox{}\\
+Counter registers\\
+\var{lasttreebox} \var{lasttreeheight} \var{lasttreeinfo} \var{lasttreetype}\\
+\var{treeheight}(1) \var{diminfo}(1) \dots\ \var{treeheight}($n$)
+ \var{diminfo}($n$)\\
+\mbox{}\\
+Box registers\\
+\var{treebox}(1) \dots\ \var{treebox}($n$)\\
+\mbox{}\\
+Token registers\\
+\var{type}(1) \dots\ \var{type}($n$)
+
+\caption{\var{lasttreebox}, \var{lasttreeheight}, \var{lasttreeinfo},
+\var{lasttreetype} contain pointers to \var{treebox}($n$)
+\var{treeheight}($n$), \var{lmoff}($n$), \var{type}($n$),
+\var{diminfo}($i$) contains a pointer to
+\var{lmoff}($i$). Unused dimension registers are
+allowed between the dimension registers of subsequent trees. The counter
+registers \var{lasttreebox},\ldots,\var{diminfo}($n$) serve as a directory
+mechanism to access the \TeX{}trees on the stack.}
+\label{Registers}
+\end{Figure}
+
+
+When a new node is pushed onto the stack, the treebox, type information,
+height, address of contour information, and contour information are
+stored in the next free registers of the appropriate type, and the
+four address counters are updated accordingly.
+
+When a new tree is formed from the topmost subtrees on the stack,
+the treebox, type information, height, and address of contour information
+of the new tree are sorted in the registers formerly used by the bottommost
+subtree that has occurred in the construction step,
+and the four address registers are
+updated accordingly. This means that this information for the subtrees
+is no longer accessible. The contour information of the new subtree
+is stored in the same registers as the contour information of the larger
+subtree used in the construction, apart from the left and right offset
+of the root to the left and right child, which are stored in the
+following dimension registers. This means that gaps can occur
+between the contour information of subtrees in the
+stack, namely when the right subtree, which is in a higher position in the
+stack, is higher than the left one. To avoid these
+gaps, the user can specify an option \verb.\lefttop. when entering a
+binary node, which makes the topmost tree in the stack the
+left subtree of the node.
+
+This stack concept also has consequences for the design of the user interface
+that is discussed in Section~\ref{Interface}.
+
+\section{Space cost analysis}
+
+Suppose we want to draw a unary-binary tree $T$ of height $h$ having
+$N$ nodes\footnote{The height $h$ and the number of nodes $N$ refer to the
+drawing of the tree. $N$ is the number of circles, squares,~etc., actually
+drawn, and $h$ is the number of levels in the drawing minus 1.}.
+According to our internal representation,
+for each subtree in the stack we need:
+
+\begin{enumerate}
+\item one box register to store the box of the \TeX{}tree;
+\item one token register to store the type of the root of the subtree;
+\item $2h^\prime+6$ dimension registers to store the additional
+ information, where $h^\prime$ is the height of the
+ subtree; and
+\item three counter registers to store the register numbers of the
+ box register, the token register, and the first dimension register above.
+\end{enumerate}
+
+\begin{lemma}
+Let $T$ be a unary-binary tree of height~$h$ and size~$N$; then:
+\begin{enumerate}
+\item at any time, there are at most $h+1$ subtrees of $T$ on the
+ stack; and
+\item for each set $\T$ of subtrees of $T$ that are on the stack
+ simultaneously we have
+ $$\sum_{T^\prime\in \T}({\rm ht}(T^\prime)+1) \le N$$
+\end{enumerate}
+\end{lemma}
+
+The lemma implies that our implementation
+uses at most $9h+2N$~registers.
+To compare this with the
+$10N$ registers used in the straightforward implementation,
+an estimation of the average height of a tree with $N$ nodes is
+needed. Several results, depending on the type of trees and of the
+randomization model, are cited in \fig{Stat}, which
+compares the number of registers used in a straightforward
+implementation with the average number of registers used in our
+implementation. This table shows clearly the advantage of our
+implementation.
+
+\begin{Figure}
+\centering
+
+\begin{tabular}{|c|c|c|c|c|}
+\hline
+&registers&\multicolumn{3}{c|}{average registers}\\
+\cline{3-5}
+nodes&(straight-&&unary-binary&binary\\
+&forward)&binary trees&trees&search trees\\
+$N$&&($2\sqrt{\pi N}$) \cite{BinaryTrees}&
+ ($\sqrt{3\pi N}$) ~\cite{BinaryTrees}&
+ ($4.311\log N$) \cite{BinarySearchTrees}\\
+\hline
+\ds10 & \ds100 & 120.89 & 107.37 & 109.34 \\
+\ds20 & \ds200 & 182.68 & 163.56 & 156.23 \\
+\ds30 & \ds300 & 234.75 & 211.33 & 191.96 \\
+\ds40 & \ds400 & 281.78 & 254.75 & 223.12 \\
+\ds50 & \ds500 & 325.60 & 295.37 & 251.78 \\
+\ds60 & \ds600 & 367.13 & 334.02 & 278.86 \\
+\ds70 & \ds700 & 406.93 & 371.17 & 304.84 \\
+\ds80 & \ds800 & 445.36 & 407.13 & 330.02 \\
+\ds90 & \ds900 & 482.67 & 442.12 & 354.59 \\
+100 & 1000 & 519.04 & 476.30 & 378.68 \\
+\hline
+\end{tabular}
+
+\caption{The numbers of registers used by a straightforward implementation
+(second column) and by our modified implementation (third to fifth column)
+of the RT~algorithm are
+given for different types of trees and randomization models.
+The formulas in parentheses indicate the average height of the respective
+classes of trees.}
+\label{Stat}
+\end{Figure}
+
+
+\section{The user interface}\label{Interface}
+
+The user interface of \TreeTeX{} has been designed in the spirit of
+the thorough separation of the logical description of document components
+and their layout; see~\cite{DocumentFormatting,GML}. This concept
+ensures both uniformity and flexibility of document layout and frees
+authors from layout problems that have nothing to do with the
+substance of their work. For some powerful implementations and projects
+see \cite{Tables,Karlsruhe,LaTeX,Grif,Scribe}.
+
+The description of a tree consists of a description of its nodes
+in postorder. Each description of a node, in turn, has to specify
+the outdegree, the geometric shape and the labels of the node.
+Defaults are provided for all specifications,
+thereby allowing the user to omit many definitions
+if the defaults match what he or she wants.
+
+A separate style command defines layout parameters for tree drawings
+that are valid for all trees of a document.
+Layout parameters include the font to be used for labels, the diameter
+of circle nodes, the vertical distance between two subsequent levels
+of the tree, and the minimal horizontal distance between nodes.
+
+Standard versions of \TeX{} provide only a limited number of
+font and circle sizes. Hence, the user of the style command must make
+sure that the specified sizes can be realized. This is especially
+cumbersome when everything has to be magnified for later reproduction
+with reduction. But the style variables can be made parametric for
+installations that provide scalable fonts and replace \LaTeX{}'s
+circle- and line-drawing commands with routines that provide arbitrary
+diameters and slopes.
+
+Three examples of tree descriptions are given in
+Figures~\ref{firstex}--\ref{lastex}.
+A more detailed description of the user interface is
+given in~\cite{Exeter}.
+
+\section{Conclusions}
+
+We hope that, by now, we have convinced the reader of the main advantages
+of \TreeTeX{}: It integrates graphics and text; it is portable to all
+sites running \TeX{};
+and it is easy to use for the author, because it derives the drawing
+of a tree from a purely structural description. But our decision to
+implement \TreeTeX{} as a \TeX{} macro package has also some
+drawbacks, both for the programmer and for the user of the system.
+
+>From the programmer's point of view, \TeX{}'s macro language is
+a low level programming language. Hence, maintaining and extending
+the package is a more tedious task than it would be if we had used
+a higher level language with better support for modularization.
+
+>From the author's point of view, \TreeTeX{}'s limitations lie in
+speed, size of trees, and graphical primitives.
+Typesetting all the trees in this article takes about two~minutes on
+a VAX~750, and typesetting a complete binary tree with 63~internal
+and 64~external nodes takes about one~minute on the same machine.
+The size of the trees is limited by three factors, namely,
+the number of registers, the complexity of the nested boxes that
+contain the drawing of a tree, and the limited number of slopes
+that are available for the edges, the latter being the most severe
+problem at present. Hence, the main area of application for
+\TreeTeX{} is modest use such as in textbooks; displaying
+large amounts of statistical data, for example, is out of the question.
+
+Currently edges and circular nodes are drawn from \LaTeX{}'s set of
+predefined graphical characters. Hence, \TreeTeX{} cannot draw
+arbitrarily wide trees or large circular nodes. We consider
+this restriction, however, to be a temporary one, since a committee inside
+the \TeX{} Users Group is working on standard graphic
+extensions to \TeX{} that will remove these limitations.
+
+As to further developments of \TreeTeX{}, it would be desirable to
+draw larger classes of trees, for example multiway trees, and to allow
+labels not only for nodes, but also for edges and whole subtrees.
+
+
+\Treestyle{\vdist{60pt}}
+\dummyhalfcenterdim@n=10pt
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\node{\external\bnth{first}\cntr{1}\lft{Beeton}}
+\node{\external\cntr{3}\rght{Kellermann}}
+\node{\cntr{2}\lft{Carnes}}
+\node{\external\cntr{6}\lft{Plass}}
+\node{\external\bnth{last}\cntr{8}\rght{Tobin}}
+\node{\cntr{7}\rght{Spivak}}
+\node{\leftonly\cntr{5}\rght{Lamport}}
+\node{\cntr{4}\rght{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}\
+
+\begin{verbatim}
+\begin{Tree}
+\node{\external\bnth{first}\cntr{1}\lft{Beeton}}
+\node{\external\cntr{3}\rght{Kellermann}}
+\node{\cntr{2}\lft{Carnes}}
+\node{\external\cntr{6}\lft{Plass}}
+\node{\external\bnth{last}\cntr{8}\rght{Tobin}}
+\node{\cntr{7}\rght{Spivak}}
+\node{\leftonly\cntr{5}\rght{Lamport}}
+\node{\cntr{4}\rght{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}
+\end{verbatim}
+
+\caption{This is an example of a tree that includes labels.}
+\label{firstex}
+\end{Figure}
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\node{\external\type{frame}\bnth{first}\cntr{Beeton}}
+\node{\external\type{frame}\cntr{Kellermann}}
+\node{\type{frame}\cntr{Carnes}}
+\node{\external\type{frame}\cntr{Plass}}
+\node{\external\type{frame}\bnth{last}\cntr{Tobin}}
+\node{\type{frame}\cntr{Spivak}}
+\node{\leftonly\type{frame}\cntr{Lamport}}
+\node{\type{frame}\cntr{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}\
+
+\begin{verbatim}
+\begin{Tree}
+\node{\external\type{frame}\bnth{first}\cntr{Beeton}}
+\node{\external\type{frame}\cntr{Kellermann}}
+\node{\type{frame}\cntr{Carnes}}
+\node{\external\type{frame}\cntr{Plass}}
+\node{\external\type{frame}\bnth{last}\cntr{Tobin}}
+\node{\type{frame}\cntr{Spivak}}
+\node{\leftonly\type{frame}\cntr{Lamport}}
+\node{\type{frame}\cntr{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}
+\end{verbatim}
+\caption{This is an example of a tree with framed center labels.}
+\end{Figure}
+
+\begin{Figure}
+\Treestyle{\treefonts{\small\it}\nodesize{16pt}\vdist{40pt}\minsep{16pt}}
+\centering
+\begin{Tree}
+\node{\external\bnth{first}\cntr{1}\lft{Beeton}}
+\node{\external\cntr{3}\rght{Kellermann}}
+\node{\cntr{2}\lft{Carnes}}
+\node{\external\cntr{6}\lft{Plass}}
+\node{\external\bnth{last}\cntr{8}\rght{Tobin}}
+\node{\cntr{7}\rght{Spivak}}
+\node{\leftonly\cntr{5}\rght{Lamport}}
+\node{\cntr{4}\rght{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}\
+
+\caption{This tree was produced from the same logical description as in
+Figure~\ref{firstex}, but with different style parameters}
+\label{lastex}
+\end{Figure}
+
+\clearpage
+\bibliography{trees}
+\end{document}
+
+
diff --git a/Master/texmf-dist/doc/plain/treetex/readme b/Master/texmf-dist/doc/plain/treetex/readme
new file mode 100644
index 00000000000..575afc2fe0b
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/treetex/readme
@@ -0,0 +1,19 @@
+TreeTeX is a public domain macro package for drawing
+trees with TeX. It may be freely distributed, provided
+that the following files are kept together:
+
+ README epodd.bbl epodd.tex tree_doc.bbl tree_doc.tex
+ classes.tex l_pic.tex treetex.tex
+
+Copyright is with Anne Brueggemann-Klein and Derick Wood.
+
+All remarks, bug reports etc. should be directed to
+
+ Dr. Anne Brueggemann-Klein
+ Institut fuer Informatik
+ Rheinstr. 10--12
+ 7800 Freiburg, West Germany
+
+ email: abk@sun1.ruf.uni-freiburg.dbp.de
+
+
diff --git a/Master/texmf-dist/doc/plain/treetex/tree_doc.bbl b/Master/texmf-dist/doc/plain/treetex/tree_doc.bbl
new file mode 100644
index 00000000000..88c540ee0b7
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/treetex/tree_doc.bbl
@@ -0,0 +1,97 @@
+\begin{thebibliography}{10}
+
+\bibitem{Tables}
+R.~J. Beach.
+\newblock {\it Setting Tables and Illustrations with Style}.
+\newblock PhD thesis, University of Waterloo, 1985.
+
+\bibitem{Karlsruhe}
+A. Br{\"u}ggemann-Klein, P. Dolland, and A. Heinz.
+\newblock How to please authors and publishers: a versatile document
+ preparation system at {K}arlsruhe.
+\newblock In J. D\'esarm\'enien, editor, {\it {\TeX{}} for Scientific
+ Documentation}, Strasbourg, France, June 1986.
+\newblock LNCS~236.
+
+\bibitem{TreeTeX}
+A. Br{\"u}ggemann-Klein and D. Wood.
+\newblock {\it Tree{\TeX}: Documentation and User Handbook}.
+\newblock Technical Report, University of Waterloo, 1987.
+
+\bibitem{AverageHeight}
+N.G. de~Bruijn, D. Knuth, and S.O. Rice.
+\newblock The average height of planted plane trees.
+\newblock In R.C. Read, editor, {\it Graph Theory and Computing}, 1972.
+
+\bibitem{BinarySearchTrees}
+L. Devroye.
+\newblock A note on the height of binary search trees.
+\newblock {\it Journal of the ACM}, 33(3), July 1986.
+
+\bibitem{BinaryTrees}
+Ph. Flajolet and A. Odlyzko.
+\newblock The average height of binary trees and other simple trees.
+\newblock {\it Journal of Computer and System Sciences}, 25, 1982.
+
+\bibitem{DocumentFormatting}
+R. Furuta, J. Scofield, and A. Shaw.
+\newblock Document formatting systems: surveys, concepts, issues.
+\newblock {\it Computing Surveys}, 14(3), 1982.
+
+\bibitem{GML}
+Ch.~F. Goldfarb.
+\newblock A generalized approach to document markup.
+\newblock {\it SIGPLAN Notices of the ACM}, June 1981.
+
+\bibitem{ACP}
+D.~E. Knuth.
+\newblock {\it Fundamental Algorithms}.
+\newblock Volume~1 of {\it The Art of Computer Programming}, Addison-Wesley,
+ Reading, Massachusetts, 1973.
+
+\bibitem{TeXbook}
+D.~E. Knuth.
+\newblock {\it The {\TeX{}}book}.
+\newblock Volume~A of {\it Computers \& Typesetting}, Addison-Wesley, Reading,
+ Massachusetts, 1986.
+
+\bibitem{LaTeX}
+L. Lamport.
+\newblock {\it {\LaTeX}, User's Guide \& Reference Manual}.
+\newblock Addison-Wesley, Reading, Massachusetts, 1986.
+
+\bibitem{Brother}
+Th. Ottmann, H.-W. Six.
+\newblock Eine neue Klasse ausgeglichener Bin\"arb\"aume.
+\newblock {\it Angewandte Informatik}, 9, 1976.
+
+\bibitem{Grif}
+V. Quint, I. Vatton, and H. Bedor.
+\newblock Grif: an interactive environment for {\TeX{}}.
+\newblock In J. D\'esarm\'enien, editor, {\it {\TeX{}} for Scientific
+ Documentation}, Strasbourg, France, June 1986.
+\newblock LNCS~236.
+
+\bibitem{Scribe}
+B.~K. Reid.
+\newblock {\it Scribe: A Document Specification Language and its Compiler}.
+\newblock PhD thesis, Carnegie Mellon University, 1980.
+
+\bibitem{TidierTrees}
+E.~M. Reingold and J.~S. Tilford.
+\newblock Tidier drawings of tree.
+\newblock {\it IEEE Transactions on Software Engineering}, 7(2), March 1981.
+
+\bibitem{Complexity}
+K.~J. Supowit and E.~M. Reingold.
+\newblock The complexity of drawing trees nicely.
+\newblock {\it Acta Informatica}, 18, 1983.
+
+\bibitem{TidyTrees}
+Ch. Wetherell and A. Shannon.
+\newblock Tidy drawings of trees.
+\newblock {\it IEEE Transactions on Software Engineering}, 5(5), September
+ 1979.
+
+\end{thebibliography}
+
diff --git a/Master/texmf-dist/doc/plain/treetex/tree_doc.tex b/Master/texmf-dist/doc/plain/treetex/tree_doc.tex
new file mode 100644
index 00000000000..635d0dab5d6
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/treetex/tree_doc.tex
@@ -0,0 +1,1331 @@
+% This is tree_doc.tex, the documentation for the treetex macro package
+% as it will appear in the conference proceedings of the third European
+% TeX meeting in Exeter, England, 1988.
+
+\documentstyle[12pt,a4]{article}
+
+\advance\voffset by -2cm
+
+\clubpenalty=10000
+\widowpenalty=10000
+\def\addcontentsline#1#2#3{\relax}% Some captions are too long for some
+ % TeX installations (buffer size too small)
+
+
+\newenvironment{lemma}{\begingroup\samepage\begin{lemmma}\ }{\end{lemmma}%
+ \endgroup}
+\newtheorem{lemmma}{Lemma}[section]
+\newenvironment{proof}{\begin{prooof}\rm\ \nopagebreak}{\end{prooof}}
+\newcommand{\proofend}{\qquad\ifmmode\Box\else$\Box$\fi}
+\newtheorem{prooof}{Proof}
+\renewcommand{\theprooof}{} % makes shure that prooof doesn't get numbers
+\newenvironment{Figure}{\begin{figure}\vspace{1\baselineskip}}%
+ {\vspace{1\baselineskip}\end{figure}}
+\newlength{\figspace} % space between figures in a single
+\setlength{\figspace}{30pt} % Figure environment
+
+\newcommand{\var}[1]{{\it #1\/}} % use it for names of variables
+\renewcommand{\emph}[1]{{\em #1\/}} % use it for emphazided text
+ % (This notion sticks to the
+ % applicative style of markup.)
+\renewcommand{\O}{{\rm O}} % O-notation, also for math mode
+\newcommand{\T}{{\cal T}} % the set T in math mode
+\newcommand{\TreeTeX}{Tree\TeX}
+\newcommand{\fig}[1]{Figure~\ref{#1}}
+\let\p\par
+
+\input treetex
+\Treestyle{\vdist{20pt}\minsep{16pt}}
+\dummyhalfcenterdim@n=2pt
+
+\def\Node(#1,#2){\put(#1,#2){\circle*{4}}}
+\def\Edge(#1,#2,#3,#4,#5){\put(#1,#2){\line(#3,#4){#5}}}
+
+\def\enode{\node{\external\type{dot}}}
+\def\inode{\node{\type{dot}}}
+
+\def\e{\node{\external\type{dot}}}
+\def\i{\node{\type{dot}}}
+\def\il{\node{\type{dot}\leftonly}}
+\def\ir{\node{\type{dot}\rightonly}}
+
+\newcommand{\stack}[3]{%
+ \vtop{\settowidth{\hsize}{#1}%
+ \setlength{\leftskip}{0pt plus 1fill}%
+ \setlength{\baselineskip}{#2}#3}}
+
+\let\multic\multicolumn
+
+\newlength{\hd} % hidden digit
+\setbox0\hbox{1}
+\settowidth{\hd}{\usebox{0}}
+\newcommand{\ds}{\hspace{\hd}} % digit space
+
+\newcommand{\ccol}[1]{\multicolumn{1}{c}{#1}}
+
+\hyphenation{post-or-der sym-bol Karls-ruhe bool-ean}
+
+\begin{document}
+
+\bibliographystyle{plain}
+
+\title{Drawing Trees Nicely with \TeX\thanks{This work was supported by
+ a Natural Sciences and Engineering Research Council of Canada
+ Grant~A-5692 and a Deutsche Forschungsgemeinschaft Grant~Sto167/1-1.
+ It was started during the first author's stay with
+ the Data Structuring Group in Waterloo.}}
+\author{Anne Br\"uggemann-Klein\thanks{Institut f\"ur Informatik,
+ Universit\"at Freiburg, Rheinstr.~10--12, 7800~Freiburg,
+ West~Germany}\ \and Derick Wood\thanks{Data
+ Structuring Group, Department of Computer Science, University of
+ Waterloo, Waterloo, Ontario, N2L~3G1, Canada}}
+\maketitle
+
+\begin{abstract}
+
+Various algorithms have been proposed for the difficult problem of
+producing aesthetically pleasing drawings of trees, see~%
+\cite{TidierTrees,TidyTrees} but
+implementations only exist as ``special purpose software'',
+designed for special environments. Therefore,
+many users resort to the
+drawing facilities available on most personal computers, but the
+figures obtained in this way still look ``hand-drawn''; their quality is
+inferior to the quality of the surrounding text that can be realized by
+today's high quality text processing systems.
+
+In this paper we present an entirely new solution that
+integrates a tree drawing algorithm into one of the best text
+processing systems available. More precisely, we present a \TeX{} macro package
+\TreeTeX{} that produces a drawing of a tree from a purely logical
+description. Our approach has three advantages. First, labels
+for nodes can be handled in a reasonable way. On the one hand, the tree
+drawing algorithm can compute the widths of the labels and take
+them into account for the positioning of the nodes; on the other hand,
+all the textual parts of the document can be treated uniformly. Second,
+\TreeTeX{} can be trivially ported to any site running \TeX{}. Finally,
+modularity in the description of a tree and \TeX{}'s macro capabilities
+allow for libraries of subtrees and tree classes.
+
+In addition, we have implemented an option that produces
+drawings which make the
+\emph{structure} of the trees more obvious to the human eye,
+even though they may not be as aesthetically pleasing.
+
+\end{abstract}
+
+\section{Aesthetical criteria for drawing trees}
+
+One of the most commonly used data structures in computer science is the tree.
+As many people are using trees in their research or just as illustration
+tools, they are usually struggling with the problem of
+\emph{drawing} trees. We are concerned primarily with ordered
+trees in the sense of~\cite{ACP}, especially binary and unary-binary
+trees. A binary tree is a finite set of nodes which either
+is empty, or consists of a root and two disjoint binary trees called
+the left and right subtrees of the root. A unary-binary tree is
+a finite set of nodes which either is empty, or consists of a root and
+two disjoint unary-binary trees, or consists of a root and one
+nonempty unary-binary tree. An extended binary tree is a binary tree
+in which each node has either two nonempty subtrees or two
+empty subtrees.
+
+For these trees there
+are some basic agreements on how they should be drawn, reflecting
+the top-down and left-right ordering of nodes in a tree;
+see \cite{TidierTrees} and \cite{TidyTrees}.
+
+\begin{enumerate}
+\item[1.] Trees impose a distance on the nodes; no node
+ should be closer to the root than any of its
+ ancestors.
+\item[2.] Nodes of a tree at the same height should lie on a straight
+ line, and the straight lines defining the levels should be
+ parallel.
+\item[3.] The relative order of nodes on any level should be the same
+ as in the level order traversal of the tree.
+\end{enumerate}
+
+These axioms guarantee that trees are drawn as planar graphs: edges do
+not intersect except at nodes. Two further axioms improve the aesthetical
+appearance of trees:
+
+\begin{enumerate}
+\item[4.] In a unary-binary tree, each left child should be positioned
+ to the left of its parent, each
+ right child to the right of its parent, and each unary child
+ should be positioned below its parent.
+\item[5.] A parent should be centered over its children.
+\end{enumerate}
+
+An additional axiom deals with the problem of tree drawings becoming too wide
+and therefore exceeding the physical limit of the output medium:
+
+\begin{enumerate}
+\item[6.] Tree drawings should occupy as little width as possible without
+ violating the other axioms.
+\end{enumerate}
+
+In \cite{TidyTrees}, Wetherell and Shannon introduce two algorithms for
+tree drawings, the first of which fulfills axioms~1--5, and the second
+1--6. However, as Reingold and Tilford in \cite{TidierTrees}
+point out, there is a lack of symmetry in the algorithms of
+Wetherell and Shannon which may lead to unpleasant results.
+Therefore, Reingold and Tilford introduce a new structured
+axiom:
+
+\begin{enumerate}
+\item[7.] A subtree of a given tree should be
+ drawn the same way regardless of where it occurs in the given tree.
+\end{enumerate}
+
+Axiom~7 allows the same tree to be drawn differently when it occurs as
+a subtree in different trees.
+Reingold and Tilford give an algorithm which fulfills axioms~1--5
+and~7. Although
+this algorithm doesn't fulfill axiom~6,
+the aesthetical improvements are well worth the additional space.
+\fig{algorithms} illustrates the benefits of axiom~7, and \fig{narrowtrees}
+shows that the algorithm of Reingold and Tilford violates axiom~6.
+
+\begin{Figure}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\enode
+\enode\enode\inode\enode\enode\inode\inode\inode
+\node{\external\type{dot}\rght{\unskip\hskip2\mins@p\hskip2\dotw@dth}}
+\enode\enode\inode\enode\enode\inode\inode\inode
+\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\enode
+\enode\enode\inode\enode\enode\inode\inode\inode
+\enode
+\enode\enode\inode\enode\enode\inode\inode\inode
+\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\caption{The left tree is drawn by the algorithm of Wetherell and Shannon,
+and the tidier right one is drawn by the algorithm of Reingold and Tilford.}
+\label{algorithms}
+
+\vspace{\figspace}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\enode\enode\enode\enode\enode\enode\enode\enode\enode
+\enode\inode\inode\inode
+\enode\inode\inode\inode
+\enode\inode\inode\inode
+\enode\inode\inode\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\enode\enode\enode\enode\enode\enode\enode\enode
+\node{\external\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\node{\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\node{\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\node{\type{dot}\rght{\unskip\hskip\mins@p\hskip\dotw@dth}}
+\enode\inode\inode\inode
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\caption{The left tree is drawn by the algorithm of Reingold and Tildford, but
+the right tree shows that narrower drawings fulfilling all aesthetic axioms
+are possible.}
+\label{narrowtrees}
+\end{Figure}
+
+
+\section{The algorithm of Reingold and Tilford}
+
+The algorithm of Reingold and Tilford (hereafter called ``the RT~algorithm'')
+takes a modular approach to the
+positioning of nodes: The relative positions of the nodes in a subtree
+are calculated independently from the rest of the tree. After the
+relative positions of two subtrees have been calculated, they can be
+joined as siblings in a larger tree by placing them as close
+together as possible and centering the parent node above them.
+Incidentally, the modularity principle is the reason that the
+algorithm fails to fulfill axiom~6; see~\cite{Complexity}.
+Two sibling subtrees are placed as close together as possible,
+during a postorder traversal, as follows. At each node \var{T},
+imagine that its two subtrees have been drawn and cut out of paper along
+their contours. Then, starting with the two subtrees superimposed at their
+roots, move them apart until a minimal agreed upon distance
+between the trees is obtained at each level. This can be done gradually:
+Initially, their roots are separated by some agreed upon minimum
+distance. Then, at the next lower level,
+they are pushed
+apart until the minimum separation is established there.
+This process is continued at successively lower levels until the
+bottom of the shorter subtree is reached. At some levels no movement may be
+necessary; but at no level are the two subtrees moved closer
+together. When the process is complete, the position of the
+subtrees is fixed relative to their parent, which is centered over them.
+Assured that the subtrees will never be placed closer together,
+the postorder traversal is continued.
+
+A nontrivial implementation of
+this algorithm has been obtained by Reingold and Tilford that runs
+in time $\O(N)$, where $N$ is the number of
+nodes of the tree to be drawn.
+Their crucial idea is to keep track of the contour of the subtrees
+by special pointers, called threads, such that whenever
+two subtrees are joined, only the
+top part of the trees down to the lowest level of the
+smaller tree need to be taken into account.
+
+The RT algorithm is given in \cite{TidierTrees}.
+The nodes are positioned on a fixed grid and are
+considered to have zero width. No labelling is provided. The algorithm only
+draws binary trees, but is easily extendable to multiway trees.
+
+\section{Improving human perception of trees}
+
+It is common understanding in book design that aesthetics and readability
+don't necessarily coincide, and---as Lamport (\cite{LaTeX}) puts it---%
+books are meant to be read, not to be hung on walls. Therefore, readability is
+more important than aesthetics.
+
+When it comes to tree drawings, readability means that the structure of
+a tree must be easily recognizable. This criterion is not always met
+by the RT~algorithm. As an example, there are trees whose structure is very
+different, the only common thing being the fact that they have the same number
+of nodes at each level. The RT~algorithm might assign identical positions to
+these nodes making it very hard to perceive the different structures.
+Hence, we have modified the RT~algorithm such that additional white space
+is inserted between subtrees of
+\emph{significant} nodes. Here a binary node
+is called significant if the minimum distance
+between its two subtrees is taken \emph{below} their root level.
+Setting the amount of additional white space to zero retains the original RT~%
+placement. The effect of having nonzero additional white space between
+the subtrees of significant
+nodes is illustrated in \fig{addspace} .
+
+Another feature we have added to the RT~algorithms is the possibility to draw
+an unextended binary tree with the same placement of nodes as its
+associated extended version. We define the \emph{associated extended version}
+of a binary tree to be the binary tree obtained by replacing each empty subtree
+having a nonempty sibling with a subtree consisting of one node. This feature
+also makes the structure of a tree more prominent; see \fig{extended}.
+
+\begin{Figure}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\e\il\e\e\i\i\il % the left subtree
+\e\ir\il % the right subtree
+\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\e\il\il\il % the left subtree
+\e\e\i\e\i\il % the right subtree
+\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\adds@p10pt
+\begin{Tree}
+\e\il\e\e\i\node{\type{dot}\lft{$\longrightarrow$}}\il % the left subtree
+\e\ir\il % the right subtree
+\node{\type{dot}\lft{$\longrightarrow$}}
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\e\il\il\il % the left subtree
+\e\e\i\e\i\il % the right subtree
+\node{\type{dot}\lft{$\longrightarrow$}}
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\adds@p0pt
+
+\caption{The first two trees get the same placement of their nodes
+by the RT~algorithm, although the structure of the two trees is very different.
+The alternative drawings highlight the structure of the trees by adding
+additional white space between the subtrees of
+($\longrightarrow$) significant nodes.}
+\label{addspace}
+\end{Figure}
+
+\begin{Figure}
+\centering
+\leavevmode\noindent
+\begin{Tree}
+\e\e\i\il\e\e\i\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\e\e\i\e\i\e\ir\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\extended
+\begin{Tree}
+\e\e\i\il\e\e\i\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\qquad
+\begin{Tree}
+\e\e\i\e\i\e\ir\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\\
+\noextended
+\begin{Tree}
+\e\e\i\e\i\e\e\i\i
+\end{Tree}
+\hskip\leftdist\box\TeXTree\hskip\rightdist\
+\caption{In the first two drawings, the RT~algorithm assigns the same placement
+to the nodes of two trees although their structure is very different. The modified
+RT~algorithms highlights the structure of the trees by optionally
+drawing them like their extended
+counterpart, which is given in the second row.}
+\label{extended}
+\end{Figure}
+
+
+\section{Trees in a document preparation environment}
+
+Drawings of trees usually don't come alone, but are included in some text
+which is itself typeset by a text processing system. Therefore, a typical
+scenario is a pipe of three stages. First comes the tree drawing
+program which calculates the positioning of the nodes of the tree to
+be drawn and outputs a description of the tree drawing in
+some graphics language; next comes a graphics system which transforms this
+description into an intermediate language which can be interpreted by the output
+device; and finally comes the
+text processing system which integrates the output of the
+graphics system into the text.
+
+This scenario loses its linear structure once nodes have to be labelled, since
+the labelling influences the positioning of the nodes. Labels usually occur
+inside, to the left of, to the right of, or beneath nodes (the latter only for
+external nodes), and their extensions certainly should be taken into account
+by the tree drawing algorithm. But the labels have to be typeset first
+in order to determine their extensions,
+preferably by the typesetting program that
+is used for the regular text, because this method makes for the uniformity in the textual
+parts of the document and provides the author with the full power of the
+text processing system for composing the labels. Hence, a more complex
+communication scheme than a simple pipe is required.
+
+Although a system of two processes running simultaneously might be the most
+elegant solution, we wanted a system that is easily portable to
+a large range of hardware at our sites
+including personal computers with single process
+operating systems.
+Therefore, we thought of using a text processing system
+having programming facilities powerful enough to program a tree drawing algorithm
+and graphics facilities powerful enough
+to draw a tree. One text processing system
+rendering outstanding typographic quality and good enough programming
+facilities is \TeX, developed by Knuth at Stanford University;
+see~\cite{TeXbook}.
+The \TeX{} system includes the following programming facilities:
+
+\begin{enumerate}
+\item[1.] datatypes:\\
+ integers~(256), dimensions\footnote{The term \emph{dimension} is used
+ in \TeX\ to describe physical measurements of typographical objects,
+ like the length of a word.}~(512), boxes~(256), tokenlists~(256), boolean
+ variables~(unrestricted)
+\item[2.] elementary statements:\\
+ $a:=\rm const$, $a:=b$ (all types);\\
+ $a:=a+b$, $a:=a*b$, $a:=a/b$ (integers and dimensions);\\
+ horizontal and vertical nesting of boxes
+\item[3.] control constructs:\\
+ if-then-else statements testing relations between integers,
+ dimensions, boxes, or boolean variables
+\item[4.] modularization constructs:\\
+ macros with up to 9~parameters (can be viewed as procedures without
+ the concept of local variables).
+\end{enumerate}
+
+Although the programming
+facilities of \TeX{} hardly exceed the abilities of a Turing machine,
+they are sufficient to
+handle relatively small programs. How about the graphics facilities?
+Although \TeX{} has no built-in graphics facilities, it
+allows the placement of characters in arbitrary positions on
+the page. Therefore, complex pictures can be synthesized from elementary
+picture elements treated as characters. Lamport has included such
+a picture drawing environment in his macro package \LaTeX, using
+quarter circles of different sizes and line segments (with and without
+arrow heads) of different slopes as basic elements; see~\cite{LaTeX}.
+These elements are sufficient for drawing trees.
+
+This survey of \TeX's capabilities implies that \TeX{} may be a suitable
+text processing system to implement a tree drawing algorithm directly.
+We are basing our algorithm on the RT~algorithm, because this algorithm
+gives the aesthetically most pleasing results. In the first version
+presented here, we
+restrict ourselves to unary-binary trees, although our method is
+applicable to arbitrary multiway trees. But in order to take advantage
+of the text processing environment, we expand the algorithm to allow
+labelled nodes.
+
+In contrast to previous tree drawing programs, we feel no necessity to
+position the nodes of a tree on a fixed grid. While this may be
+reasonable for a plotter with a coarse resolution, it is certainly not
+necessary for \TeX, a system that is capable of handling
+arbitrary dimensions
+and produces device \emph{independent} output.
+
+
+\section{A representation method for \TeX{}trees}
+
+The first problem to be solved in implementing our tree drawing algorithm
+is how to choose a good internal representation
+for trees. A straightforward adaptation
+of the implementation by Reingold and Tilford requires, for each node,
+at least the following fields:
+
+\begin{enumerate}
+\item two pointers to the children of the node
+\item two dimensions for the offset to the left and the right child (these
+ may be different once there are labels of different widths to the
+ left and right of the nodes)
+\item two dimensions for the $x$- and $y$-coordinates of the final
+ position of the nodes
+\item three or four labels
+\item one token to store the geometric shape (circle, square, framed text etc.)
+ of the node.
+\end{enumerate}
+
+Because these data are used very frequently in calculations, they should be
+stored in registers (that's what variables are called in \TeX),
+rather than being recomputed, in order to obtain
+reasonably fast performance. This gives a total of $10N$ registers for
+a tree with $N$ nodes, which would exceed
+\TeX's limited supply of registers. Therefore, we present a
+modified algorithm hand-tailored to the abilities of \TeX{}.
+We start with the following observation.
+Suppose a unary-binary tree is constructed bottom-up, in a postorder
+traversal. This is done by iterating the following three steps in
+an order determined by the tree to be constructed.
+
+\begin{enumerate}
+\item Create a new subtree consisting of one external node.
+\item Create a new subtree by appending the two subtrees created last
+ to a new binary node; see \fig{Construct}.
+\item Create a new subtree by appending the subtree created last as a left,
+ right, or unary subtree of a new node; see \fig{Construct}.
+\end{enumerate}
+
+(A pointer to) each subtree that has been
+created in steps 1--3 is pushed onto a stack, and
+steps 2 and 3 remove two trees or one, respectively,
+from the stack before the push
+operation is carried out. Finally, the tree to be constructed will
+be the remaining tree on the
+stack.
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\treesymbol{\lvls{2}}%
+\hspace{-\l@stlmoff}\usebox{\l@sttreebox}\hspace{\l@strmoff}
+$+$
+\treesymbol{\lvls{2}}%
+\hspace{-\l@stlmoff}\usebox{\l@sttreebox}\hspace{\l@strmoff}\quad
+$\Longrightarrow$\quad
+\treesymbol{\lvls{2}}%
+\treesymbol{\lvls{2}}%
+\node{\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\end{Tree}
+
+\vskip\baselineskip
+
+\begin{Tree}
+\treesymbol{\lvls{2}}%
+\hspace{-\l@stlmoff}\usebox{\l@sttreebox}\hspace{\l@strmoff}\quad
+$\Longrightarrow$\quad
+\treesymbol{\lvls{2}}%
+\node{\leftonly\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\quad or\quad
+\treesymbol{\lvls{2}}%
+\node{\unary\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\quad or\quad
+\treesymbol{\lvls{2}}%
+\node{\rightonly\type{dot}}%
+\hspace{-\l@stlmoff}\raisebox{\vd@st}{\usebox\l@sttreebox}\hspace{\l@strmoff}%
+\end{Tree}
+
+\caption{Construction steps 2 and 3}
+\label{Construct}
+\end{Figure}
+
+This tree traversal is performed twice in the RT~algorithm.
+During the first pass,
+at each execution of step 2 or step 3, the relative positions of the
+subtree(s) and of the new node are computed.
+A closer examination of the RT~algorithm reveals that information about the
+subtree's coordinates is not needed during this pass; the contour information
+alone would be sufficient. Complete information is only needed in the second
+traversal, when the tree is actually drawn. Here a special feature of
+\TeX{} comes in that allows us to save registers.
+Unlike Pascal, \TeX{} provides the capability of
+storing a drawing in a single box register that can be positioned freely in
+later drawings. This means that in our implementation the two passes
+of the original RT~algorithm can be intertwined into a single pass,
+storing for each subtree on the stack its contour and its drawing.
+Although the latter is a complex object, it takes only one of
+\TeX's precious registers.
+
+
+\section{The internal representation}
+
+Given a tree, the corresponding \TeX{}tree is a box containing
+the ``drawing'' of the tree, together with some additional
+information about the contour of the tree.
+The reference point of a \TeX{}tree-box is always in the root of the
+tree. The height, depth, and width of the box of a \TeX{}tree are
+of no importance in this context.
+
+The additional information about the contour of the tree is stored in some
+registers for numbers and dimensions and
+is needed in order to put subtrees together to form a larger tree.
+\var{loff} is an array of dimensions which contains for each
+level of the tree the horizontal offset between the
+left end of the
+leftmost node at the current level and the
+left end of the leftmost node at
+the next level.
+\var{lmoff} holds the horizontal offset between the root
+and the leftmost node of the whole tree. \var{lboff} holds the
+horizontal offset between the root and the leftmost node at
+the bottom level of the tree.
+Finally, \var{ltop} holds the distance between the reference point
+of the tree and the leftmost end of the root.
+The same is true for
+\var{roff}, \var{rmoff}, \var{rboff}, and \var{rtop}; just replace
+``left'' by ``right''. Finally,
+\var{height} holds the height of the tree, and \var{type} holds the
+geometric shape of the root of the tree. \fig{TeXtree} shows an example \TeX{}tree,
+i.e. a tree drawing and the corresponding additional information.
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\e\ir\ir\e
+ \node{\type{dot}\rightonly\rght{\unskip\vrule height.8pt width5pt depth0pt}}%
+ \i % A
+\end{Tree}
+\leavevmode
+\stack{-10pt}{\vd@st}{%
+ -10pt\\10pt\\10pt\\\var{loff}}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 15pt\\5pt\\-10pt\\\var{roff}}%
+
+\vskip\baselineskip\raggedright
+height:~3, type:~dot, ltop:~2pt, rtop:~2pt, lmoff:~-10pt, rmoff:~20pt, lboff:~10pt,
+rboff:~10pt.
+
+\caption{A \TeX{}tree consists of the drawing of the tree and the
+additional information. The width of the dots is 4pt, the minimal separation between
+adjacent nodes is 16pt, making for a distance of 20pt center to center.
+The length of the small rule labelling one of the nodes is 5pt. The column left (right)
+of the tree drawing is the array \var{loff} (\var{roff}),
+describing the left (right) contour of the tree. At each level,
+the dimension given is the horizontal
+offset between the border at the current and at the next level. The offset between
+the left border of the root node and the leftmost node at level~1 is -10pt,
+the offset between the right border of the root node and the rightmost node at
+level~1 is 15pt, etc.}
+\label{TeXtree}
+\end{Figure}
+
+Given two \TeX{}trees \var{A} and \var{B},
+how can a new \TeX{}tree \var{C} be built that
+consists of a new root and has \var{A} and \var{B} as subtrees?
+An example is given in \fig{AddInfo}.
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\e\ir\ir\e
+ \node{\type{dot}\rightonly\rght{\unskip\vrule height.8pt width5pt depth0pt}}%
+ \i % A
+\end{Tree}
+\leavevmode
+A: \stack{-10pt}{\vd@st}{%
+ -10pt\\10pt\\10pt\\\ \\\var{loff}(\var{A})}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 15pt\\5pt\\-10pt\\\ \\\var{roff}(\var{A})}%
+\qquad
+\begin{Tree}
+\e\il\e\i\il\il\ir % B
+\end{Tree}
+\leavevmode
+B: \stack{-10pt}{\vd@st}{%
+ 10pt\\-10pt\\-10pt\\-10pt\\-10pt\\\ \\\var{loff}(\var{B})}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 10pt\\-10pt\\-10pt\\10pt\\-30pt\\\ \\\var{roff}(\var{B})}%
+\\[\figspace]
+\begin{Tree}
+\e\ir\ir\e
+ \node{\type{dot}\rightonly\rght{\unskip\vrule height.8pt width5pt depth0pt}}%
+ \i % A
+\e\il\e\i\il\il\ir % B
+\i % C
+\end{Tree}
+\leavevmode
+C: \stack{-10pt}{\vd@st}{%
+ -20\\-10pt\\%
+ \makebox[0pt][r]{\var{loff}(\var{A})$\smash{\left\{\vrule height\vd@st
+ depth\vd@st width0pt\right.}$ }%
+ 10pt\\10pt\\%
+ \makebox[0pt][r]{$\longrightarrow$ }%
+ 10pt\\%
+ \makebox[0pt][r]{\raisebox{-.5\vd@st}{\var{loff}(\var{B})$\smash
+ {\left\{\vrule height.5\vd@st
+ depth.5\vd@st width0pt\right.}$ }}%
+ \makebox[0pt][r]{-}10pt\\\ \\\var{loff}(\var{C})}%
+\hspace{1em}%
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}%
+\hspace{1em}%
+\stack{-10pt}{\vd@st}{%
+ 20pt\\10pt\\-10pt\\-10pt%
+ \makebox[0pt][l]{\raisebox{-.5\vd@st}{
+ $\smash{\left\}\vrule height2.5\vd@st
+ depth2.5\vd@st width0pt\right.}$\var{roff}(\var{B})}}%
+ \\10pt\\-30pt\\\ \\\var{roff}(\var{C})}%
+
+\vspace{\figspace}
+\centering
+\begin{tabular}{|l|r|r|r|}
+\hline
+&\multic{1}{c|}{\var{A}}&\multic{1}{c|}{\var{B}}&\multic{1}{c|}{\var{C}}\\
+\hline
+height&\multic{1}{c|}{3}& \multic{1}{c|}{5}& \multic{1}{c|}{6}\\
+type& \multic{1}{c|}{dot}&\multic{1}{c|}{dot}&\multic{1}{c|}{dot}\\
+ltop& 2pt& 2pt& 2pt\\
+rtop& 2pt& 2pt& 2pt\\
+lmoff& -10pt& -30pt& -30pt\\
+rmoff& 20pt& 10pt& 30pt\\
+lboff& 10pt& -30pt& -10pt\\
+rboff& 10pt& -30pt& -10pt\\
+\hline
+\end{tabular}\qquad
+\begin{tabular}{|c|r|r|}
+\hline
+\multic{1}{|c|}{level}&\multic{1}{c|}{\var{totsep}}&
+ \multic{1}{c|}{\var{currsep}}\\
+\hline
+0&20pt&0/16pt\\
+1&25pt&11/16\\
+2&40pt&1/16pt\\
+3&40pt&16pt\\
+\hline
+\end{tabular}
+\caption{The \TeX{}trees \var{A} and~\var{B} are combined to form the
+larger \TeX{}\-tree~\var{C}. The small table gives the
+history of computation for \var{totsep} and \var{currsep}.}
+\label{AddInfo}
+\end{Figure}
+
+
+First we determine which tree is higher; this is
+\var{B} in the example.
+Then we have to compute the minimal distance
+between the roots of \var{A} and \var{B}, such that at all levels
+of the trees there is free space of at least \var{minsep} between
+the trees when they are drawn side by side.
+For this purpose we keep track of two values, \var{totsep} and
+\var{currsep}. The variables \var{totsep} and \var{currsep}
+hold the total distance between the roots and the distance
+between the rightmost node of \var{A} and the leftmost node
+of \var{B} at the current level. In order to calculate
+\var{totsep} and \var{currsep}, we start at level 0 and
+visit each level of the trees until we reach the bottom level
+of the smaller tree; this is \var{A} in our example.
+
+At level 0, the distance between the roots of \var{A} and \var{B}
+should be at least \var{minsep}. Therefore, we set
+$\var{totsep}:=\var{minsep} + \var{rtop}(\var{A})
++ \var{ltop}(\var{B})$ and $\var{currsep}:=\var{minsep}$.
+Using $\var{roff}(\var{A})$ and $\var{loff}(\var{B})$, we can
+proceed to calculate \var{currsep} for the next level.
+If $\var{currsep} < \var{minsep}$, we have to increase \var{totsep} by
+the difference and update \var{currsep}. This process is
+iterated until we reach the lowest level of \var{A}.
+Then \var{totsep} holds the final distance between the
+nodes of \var{A} and \var{B}, as calculated by the RT~algorithm.
+If the root of \var{C} is a significant node, then the additional space ,
+which is 0pt by default, is added to \var{totsep}.
+However, the approach of synthesizing
+drawings from simple graphics characters allows only a finite
+number of orientations for the tree edges; therefore, \var{totsep}
+must be increased slightly to fit the next orientation
+available.
+
+Now we are ready to construct the box of \TeX{}tree~\var{C}.
+Simply put \var{A} and~\var{B} side by side, with the reference
+points \var{totsep}~units apart, insert a new node
+above them, and connect the parent and children by edges.
+
+Next, we update the additional information
+for \var{C}. This can be done by using the additional information
+for \var{A} and~\var{B}.
+Note that most components of $\var{roff}(\var{C})$ and
+$\var{lroff}(\var{C})$ are the same as in the higher tree, which
+is \var{B} in our case.
+So, if we can avoid moving this information around, we only have
+to access $\var{height}(\var{A}) + \var{const}$ many counters in
+order to update the additional information for \var{C}.
+This implies that we can apply the same argument as
+in~\cite{TidierTrees}, which gives
+us a running time of $\O(N)$ for drawing a tree with N nodes.
+
+Therefore, we must carefully design the storage allocation for
+the additional information of \TeX{}trees in order to fulfill the
+following requirements:
+If a new tree is built from
+two subtrees, the additional information of the new tree should
+share storage with its larger subtree.
+Organizational overhead, that is,
+pointers which keep track of the locations of different parts of additional
+information, must be avoided.
+This means that all the additional information
+for one \TeX{}tree should be stored in a row of consecutive dimension registers
+such that only one pointer granting access to the first element
+in this row is needed.
+On the other hand, each parent
+tree is higher and therefore needs more storage than its subtrees.
+So we must ensure that there is always enough space in the row
+for more information.
+
+The obvious way to fulfill these requirements is to use a stack and to
+allow only the topmost \TeX{}trees of this stack to be
+combined into a larger tree at any time.
+This leads to the following register allocation: A subsequent number of
+box registers contains the treeboxes of the subtrees in the stack. A
+subsequent number of token registers contains the type information for the
+nodes of the subtrees in the stack. For each subtree in the stack,
+a subsequent number of dimension registers contains the contour
+information of the subtree. The ordering of these groups of dimension
+registers reflects the ordering of the subtrees in the
+stack. Finally, a subsequent number of counter registers contains
+the height and the address of the first dimension register for
+each subtree in the stack. Four address counters store the addresses
+of the last treebox, type information, height, and address of contour
+information. A sketch of the register organization for a stack of \TeX{}trees
+is provided in \fig{Registers}.
+
+\begin{Figure}
+Dimension registers\\
+\var{lmoff}(1) \var{rmoff}(1) \var{lboff}(1) \var{rboff}(1) \var{ltop}(1)
+ \var{rtop}(1)\\
+\var{loff}($h_1$) \var{roff}($h_1$) \dots\ \var{loff}(1) \var{roff}(1)\\
+\dots\\
+\var{lmoff}($n$) \var{rmoff}($n$) \var{lboff}($n$) \var{rboff}($n$)
+ \var{ltop}($n$) \var{rtop}($n$)\\
+\var{loff}($h_n$) \var{roff}($h_n$) \dots\ \var{loff}(1) \var{roff}(1)\\
+\ \\
+Counter registers\\
+\var{lasttreebox} \var{lasttreeheight} \var{lasttreeinfo} \var{lasttreetype}\\
+\var{treeheight}(1) \var{diminfo}(1) \dots\ \var{treeheight}($n$)
+ \var{diminfo}($n$)\\
+\ \\
+Box registers\\
+\var{treebox}(1) \dots\ \var{treebox}($n$)\\
+\ \\
+Token registers\\
+\var{type}(1) \dots\ \var{type}($n$)
+
+\caption{\var{lasttreebox}, \var{lasttreeheight}, \var{lasttreeinfo},
+\var{lasttreetype} contain pointers to \var{treebox}($n$)
+\var{treeheight}($n$), \var{lmoff}($n$), \var{type}($n$),
+\var{diminfo}($i$) contains a pointer to
+\var{lmoff}($i$). Unused dimension registers are
+allowed between the dimension registers of subsequent trees. The counter
+registers \var{lasttreebox},\ldots,\var{diminfo}($n$) serve as a directory
+mechanism to access the \TeX{}trees on the stack.}
+\label{Registers}
+\end{Figure}
+
+
+When a new node is pushed onto the stack, the treebox, type information,
+height, address of contour information, and contour information are
+stored in the next free registers of the appropriate type, and the
+four address counters are updated accordingly.
+
+When a new tree is formed from the topmost subtrees on the stack,
+the treebox, type information, height, and address of contour information
+of the new tree are sorted in the registers formerly used by the bottommost
+subtree that has occured in the construction step, and the four address registers are
+updated accordingly. This means that these informations for the subtrees
+are no longer accessible. The contour information of the new subtree
+is stored in the same registers as the contour information of the larger
+subtree used in the construction, apart from the left and right offset
+of the root to the left and right child, which are stored in the
+following dimension registers. That means that gaps can occur
+between the contour information of subsequent subtrees in the
+stack, namely when the right subtree, which is on a higher position on the
+stack, is higher than the left one. In order to avoid these
+gaps, the user can specify an option \verb.\lefttop. when entering a
+binary node, which makes the topmost tree in the stack the
+left subtree of the node.
+
+This stack concept also has consequences for the design of the user interface
+that is discussed in Section~\ref{Interface}.
+
+\section{Space cost analysis}
+
+Suppose we want to draw a unary-binary tree $T$ of height $h$ having
+$N$ nodes\footnote{The height $h$ and the number of nodes $N$ refer to the
+drawing of the tree. $N$ is the number of circles, squares etc.~actually
+drawn, and $h$ is the number of levels in the drawing minus 1.}.
+According to our internal representation,
+for each subtree in the stack we need
+
+\begin{enumerate}
+\item one box register to store the box of the \TeX{}tree.
+\item one token register to store the type of the root of the subtree.
+\item $2h^\prime+6$ dimension registers to store the additional
+ information, where $h^\prime$ is the height of the
+ subtree.
+\item three counter registers to store the register numbers of the
+ box register, the token register, and the first dimension register above.
+\end{enumerate}
+
+The following lemma relates to $h$ and $N$ the number
+of subtrees of $T$ which are on the
+stack simultaneously and their heights.
+
+\begin{lemma}
+\begin{enumerate}
+\item At any time, there are at most $h+1$ subtrees of $T$ on the
+ stack.
+\item For each set $\T$ of subtrees of $T$ which are on the stack
+ simultaneously we have
+ $$\sum_{T^\prime\in \T}({\rm ht}(T^\prime)+1)
+ \le\min(N,{(h+1)(h+2)\over2}).$$
+\end{enumerate}
+\end{lemma}
+
+\begin{proof}
+\begin{enumerate}
+\item By induction on $h$.\label{stackdepth}
+\item The trees in $\T$ are pairwise disjoint, and each tree of
+ height $h^\prime$ has at least $h^\prime+1$ nodes. This implies
+ $$\sum_{T^\prime\in \T}({\rm ht}(T^\prime)+1)
+ \le N.$$
+ The second part is shown by induction on $h$.
+ The basis $h=0$ is clear.
+ Assume the assumption holds for all trees of height less than
+ $h$. If $\T$
+ contains only subtrees of either the left or the right subtree
+ of $T$, we have
+ $$\sum_{T^\prime\in \T}({\rm ht}(T^\prime)+1)\le
+ {h(h+1)\over2}\le{(h+1)(h+2)\over2}.$$
+ Otherwise, $\T$ contains the left or the right subtree $T_s$ of
+ $T$. Then all elements of $\T-\{T_s\}$ belong to the other
+ subtree. This implies
+ \begin{eqnarray*}
+ \sum_{T^\prime\in \T}({\rm ht}(T^\prime)+1)&\le&
+ {\rm ht}(T_s)+1
+ +\sum_{T^\prime\in \T-\{T_s\}}({\rm ht}(T^\prime)+1)\\
+ &\le& h+{h(h+1)\over2}\le{(h+1)(h+2)\over2}.\proofend
+ \end{eqnarray*}
+\end{enumerate}
+\end{proof}
+
+Therefore, our implementation uses at most $9h+2\min(N,(h+1)(h+2)/2)$
+registers. In order to compare this with the
+$10N$ registers used in the straightforward implementation,
+an estimation of the average height of a tree with $N$ nodes is
+needed. Several results, depending on the type of trees and of the
+randomization model, are cited in \fig{Stat}, which
+compares the number of registers used in a straightforward
+implementation with the average number of registers used in our
+implementation. This table shows clearly the advantage of our
+implementation.
+
+\begin{Figure}
+\centering
+\begin{tabular}{|c|c|c|c|c|}
+\hline
+&registers&\multicolumn{3}{c|}{average registers}\\
+\cline{3-5}
+nodes&(straight-&extended&unary-binary&binary\\
+&forward)&binary trees&trees&
+ search trees\\
+&&($\sqrt{\pi n}$) \cite{AverageHeight}&
+ ($\sqrt{3\pi n}$) ~\cite{BinaryTrees}&
+ ($4.311\log n$) \cite{BinarySearchTrees}\\
+\hline
+\ds8& \ds80& \ds61.12& \ds94.15& \ds51.04\\
+\ds9& \ds90& \ds65.86& 100.89& \ds55.02\\
+ 10& 100& \ds70.44& 107.37& \ds58.80\\
+ 11& 110& \ds74.91& 113.64& \ds62.41\\
+ 12& 120& \ds79.26& 119.71& \ds65.87\\
+ 20& 200& 111.34& 163.56& \ds90.48\\
+ 30& 300& 147.37& 211.33& 117.31\\
+ 40& 400& 180.89& 254.75& 132.58\\
+ 50& 500& 212.80& 295.37& 143.54\\
+\hline
+\end{tabular}
+
+\caption{The numbers of registers used by a straightforward implementation
+(second column) and by our modified implementation (third to fifth column)
+of the RT~algorithm are
+given for different types of trees and randomization models.
+The formula in parentheses indicates the average height of the respective class
+of trees, as depending on the number of nodes.}
+\label{Stat}
+\end{Figure}
+
+
+\section{The user interface}\label{Interface}
+
+\subsection{General design considerations}
+
+The user interface of \TreeTeX{} has been designed in the spirit of
+the thorough separation of the logical description of document components
+and their layout; see~\cite{DocumentFormatting,GML}. This concept
+ensures both uniformity and flexibility of document layout and frees
+authors from layout problems which have nothing to do with the
+substance of their work. For some powerful implementations and projects
+see \cite{Tables,Karlsruhe,LaTeX,Grif,Scribe}.
+
+In this context, the description of a tree is given in a purely
+logical form, and layout variations are defined by a separate style
+command which is valid for all trees of a document.
+
+A second design principle is to provide defaults for all specifications,
+thereby allowing the user to omit many definitions
+if the defaults match what he or she wants.
+
+The node descriptions of a tree must be entered in postorder.
+This fits the internal representation
+of \TeX{}trees best. Although this is a natural method of describing a
+tree, a user might prefer more flexible description methods.
+However, note that instances of well defined tree classes can be described
+easily by \TeX{} macros. In section~\ref{ExampleClasses}. we give examples of macros
+for complete binary trees and Fibonacci trees.
+
+\TreeTeX{} uses the picture making macros of \LaTeX. If \TreeTeX{} is used with
+any other macro package or format, the picture macros of
+\LaTeX{} are included automatically.
+
+\subsection{The description of a tree}
+
+The description of a tree is started by the command \verb.\beginTree.
+and closed by \verb.\endTree. (or \verb.\begin{Tree}. and
+\verb.\end{Tree}. in \LaTeX). The description can be
+started in any mode; it defines a box and two dimensions. The
+box is stored in the box register \verb.\TeXTree. and contains the
+drawing of the tree. The box has zero height and width, and its depth
+is the height of the drawing. The reference point is in the
+center of the node of the tree. The dimensions are stored in the
+registers \verb.\leftdist. and \verb.\rightdist. and describe
+the distance between the reference point and the left and
+right margin of the drawing. These data can be used to position the
+drawing of the tree.
+
+Note that the \TreeTeX{} macros don't contribute anything to the current
+page but only store their results in the registers
+\verb.\TeXTree., \verb.\leftdist., and \verb.\rightdist.. It is the
+user's job to put the drawing onto the page, using the
+commands \verb.\copy. or \verb.\box. (or \verb.\usebox. in \LaTeX).
+
+Each matching pair of \verb.\beginTree. and \verb.\endTree. must
+contain the description for only \emph{one} tree.
+Descriptions of trees cannot be nested and
+new registers cannot be allocated inside
+a matching pair of \verb.\beginTree. and \verb.\endTree..
+
+As already stated, each tree description defines the nodes of the tree in
+postorder, that is, a tree description is a particular sequence of node
+descriptions.
+
+A node description, in turn, consists of the macro \verb.\node.,
+followed by a list of node options, included in braces. The list
+of node options may be empty. The node options describe the labels,
+the geometric shape (type), and the outdegree of the node. Default values are
+provided for all options which are not explicitly specified.
+The following node options are available:
+
+\begin{enumerate}
+\item[1.] \verb.\lft{<label>}., \verb.\rght{<label>}.,
+ \verb.\cntr{<label>}.,\\\verb.\bnth{<label>}.:\\
+ These options describe the labels which are put to the left of, to the
+ right of, in the
+ center of, or beneath the node (the latter only makes sense for
+ external nodes). The arguments of these macros are processed in
+ internal horizontal mode (LR-mode in \LaTeX), but can consist of
+ arbitrary nested boxes for more sophisticated labels. For each of
+ these options, the default is an empty label.
+
+\item[2.] \verb.\external., \verb.\unary.,
+ \verb.\leftonly., \verb.\rightonly.:\\
+ These options describe the outdegree
+ of the node.
+ The default is binary (no outdegree option is specified).
+
+\item[3.] \verb.\type{<type>}.:\\
+ This option describes the type or geometric shape of the node.
+ \verb.<type>. can have the values \verb.square.,
+ \verb.dot., \verb.text., or \verb.frame..
+ The default value is \verb.circle. (no type is specified). A node of type
+ \verb.square. has a fixed width, while a node of type \verb.frame. has its
+ width determined by the center label. A node of type \verb.text. has no frame
+ around its center label. The center label can have arbitrary width.
+
+\item[3.] \verb.\leftthick., \verb.\rightthick.:
+ These options change the thickness of the left or right outgoing edge of
+ a binary node. Defaults are thin edges (neither option is specified).
+
+\item[4.] \verb.\lefttop.:\\
+ The node option \verb.\lefttop. in a binary node makes the
+ last entered subtree the left child of the node (the right child is the
+ default). This option helps to cut down on the number of dimension registers
+ used during the construction of a tree. As a rule of thumb,
+ this option is recommended when the left subtree has a smaller
+ height than the right subtree, that is,
+ in this case the right subtree should
+ be entered before the left one and their parent should be assigned the option
+ \verb.\lefttop..
+\end{enumerate}
+
+\subsection{Macros for classes of trees}
+\label{ExampleClasses}
+
+Tree descriptions can be produced by macros. This is especially useful
+for trees which belong to a larger class of trees and which can be specified
+by some simple parameters. A small library of such
+macros is provided in the file \verb!TreeClasses.tex!.
+
+\begin{enumerate}
+\item[1.] \verb.\treesymbol{<node options>}.:\\
+ This macro produces a triangular tree symbol which can be included in
+ a tree description instead of an external node. Labels for these
+ tree symbols are described as for ordinary nodes. In addition, the
+ options \verb.\lvls{<number>}. and \verb.\slnt{<number>}.
+ are provided. \verb.\lvls. defines the number of levels in the
+ tree over which the triangle extends, and \verb.\slnt. gives
+ the slant of the sides of the triangle, ranging from 1~(minimal)
+ to 24~(maximal). On the other hand,
+ \verb.\treesymbol. does not expand to a tree description, because
+ a tree symbol cannot be built from subtrees, and, on the other hand,
+ it is not a node, because it is allowed to extend over several tree
+ levels and therefore has a longer contour than an ordinary node.
+
+\item[2.] \verb.\binary{<bin specification>}.:\\
+ This macro truly expands to a tree description. It produces
+ a complete binary tree, that is, an extended binary tree,
+ where, for a given $h$, all external nodes appear at level $h$
+ or $h-1$, and all external nodes at level $h$ lie left of those at
+ level $h-1$. \verb.<bin specification>. consists of the
+ following options:
+ \verb.\no{<number>}. defines the number of internal nodes,
+ with \verb.<number>. greater than 0, and
+ \verb.\squareleaves. produces leaves of type
+ \verb.square.. Defaults are \verb.\no{1}. and
+ leaves of type \verb.circle..
+
+\item[3.] \verb.fibonacci{<fib specification>}.:\\
+ This macro produces a Fibonacci tree.
+ \verb.<fib specification>. allows for the three options
+ \verb.\hght{<number>}., \verb.\unarynodes.,
+ and \verb.\squareleaves..
+ Normally, a Fibonacci tree of height $h+2$ is a binary tree
+ with Fibonacci trees of height $h$ and $h+1$ as left and
+ right subtrees. The option \verb.\unarynodes. means that the
+ Fibonacci tree is augmented by unary nodes such that each
+ two subtree siblings have the same height. These are examples
+ of what has been called brother-trees in the literature;
+ see~\cite{Brother}. Defaults are
+ \verb.\hght{0}., the unaugmented version of a Fibonacci tree,
+ and external nodes of type \verb.circle..
+\end{enumerate}
+
+\subsection{Style options for trees}
+\sloppy
+The \TreeTeX{} package includes a style command
+\verb.\Treestyle{<style option>}., where \verb.<style option>.
+contains all the parameter settings the user might want
+to change.
+Normally, the command \verb.\Treestyle. appears only once at the beginning
+of the document and the style options are valid for all trees of the
+document.
+
+\fussy
+The changes in the style options are global. A \verb.\Treestyle. command
+changes only the specified style options; non-specified options retain
+the last specified value or the default value, respectively. The following
+style options are available:
+
+\begin{enumerate}
+\item[1.] \verb.\treefonts{<font options>}.:\\
+ \sloppy
+ \verb.\treefonts. is invoked by \verb.\beginTree., and it simply executes
+ whatever is specified in \verb.<font options>.. Defaults are
+ \verb.\treefonts{\tenrm}. (or \verb.\treefonts{\normalsize\rm}. in
+ \LaTeX).
+
+\fussy
+\item[2.] \verb.\nodesize{<size>}.:\\
+ \verb.\nodesize. defines the size of the nodes. \verb.<size>. is a
+ dimension and specifies the diameter of circle nodes. The
+ width of square nodes is adjusted accordingly to be slightly
+ smaller than the diameter of circle nodes in order to
+ balance their appearance. Furthermore,
+ \verb.\nodesize. adjusts the amount of space by which the
+ baseline of the labels is placed beneath the center of the node.
+ The default value of \verb.\nodesize. suits the default of
+ \verb.\treefonts. (taking into account the size option
+ of \LaTeX's document style).
+
+\item[3.] \verb.\vdist{<dimen>}., \verb.\minsep{<dimen>}.,
+ \verb.\addsep{<dimen>}.:\\
+ \sloppy
+ \verb.vdist. specifies the vertical distance between two
+ subsequent levels of the tree. Default is \verb.\vdist{60pt}..
+ \verb.\minsep. specifies the minimal horizontal distance between two
+ adjacent nodes. Default is \verb.\minsep{20pt}..
+ \verb.\addsep. specifies the additional amount of horizontal space
+ by which two subtree siblings are pushed apart farther than
+ calculated by the RT~algorithm,
+ if the level at which they are closest is beneath
+ their root level. Default is \verb.\addsep{0pt}.
+
+\fussy
+\item[4.] \verb.\extended., \verb.\nonextended.:\\
+ With the option \verb.\extended. in effect, the nodes of a binary
+ tree are placed in exactly the same way as they would be in the
+ associated extended version of the tree (the missing nodes are
+ assumed to have no labels). The default is \verb.\nonextended.,
+ that is the usual layout.
+\end{enumerate}
+
+Some examples of tree descriptions
+are given in the next figures.
+A detailed description of the
+\TreeTeX{} macros is given in~\cite{TreeTeX}.
+
+\Treestyle{\vdist{60pt}}
+\dummyhalfcenterdim@n=10pt
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\node{\external\bnth{first}\cntr{1}\lft{Beeton}}
+\node{\external\cntr{3}\rght{Kellermann}}
+\node{\cntr{2}\lft{Carnes}}
+\node{\external\cntr{6}\lft{Plass}}
+\node{\external\bnth{last}\cntr{8}\rght{Tobin}}
+\node{\cntr{7}\rght{Spivak}}
+\node{\leftonly\cntr{5}\rght{Lamport}}
+\node{\cntr{4}\rght{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}\
+
+\begin{verbatim}
+\begin{Tree}
+\node{\external\bnth{first}\cntr{1}\lft{Beeton}}
+\node{\external\cntr{3}\rght{Kellermann}}
+\node{\cntr{2}\lft{Carnes}}
+\node{\external\cntr{6}\lft{Plass}}
+\node{\external\bnth{last}\cntr{8}\rght{Tobin}}
+\node{\cntr{7}\rght{Spivak}}
+\node{\leftonly\cntr{5}\rght{Lamport}}
+\node{\cntr{4}\rght{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}
+\end{verbatim}
+
+\caption{This is an example of a tree that includes labels.}
+\end{Figure}
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\node{\external\type{frame}\bnth{first}\cntr{Beeton}}
+\node{\external\type{frame}\cntr{Kellermann}}
+\node{\type{frame}\cntr{Carnes}}
+\node{\external\type{frame}\cntr{Plass}}
+\node{\external\type{frame}\bnth{last}\cntr{Tobin}}
+\node{\type{frame}\cntr{Spivak}}
+\node{\leftonly\type{frame}\cntr{Lamport}}
+\node{\type{frame}\cntr{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}\
+
+\begin{verbatim}
+\begin{Tree}
+\node{\external\type{frame}\bnth{first}\cntr{Beeton}}
+\node{\external\type{frame}\cntr{Kellermann}}
+\node{\type{frame}\cntr{Carnes}}
+\node{\external\type{frame}\cntr{Plass}}
+\node{\external\type{frame}\bnth{last}\cntr{Tobin}}
+\node{\type{frame}\cntr{Spivak}}
+\node{\leftonly\type{frame}\cntr{Lamport}}
+\node{\type{frame}\cntr{Knuth}}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}
+\end{verbatim}
+\caption{This is an example of a tree with framed center labels.}
+\end{Figure}
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\binary{\no{6}\squareleaves}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}\
+
+\begin{verbatim}
+\begin{Tree}
+\binary{\no{6}\squareleaves}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}
+\end{verbatim}
+\caption{This is an example of a complete binary tree.}
+\end{Figure}
+
+
+\begin{Figure}
+\centering
+\begin{Tree}
+\fibonacci{\hght{4}\unarynodes\squareleaves}
+\end{Tree}
+
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}\
+
+\begin{verbatim}
+\begin{Tree}
+\fibonacci{\hght{4}\unarynodes\squareleaves}
+\end{Tree}
+\hspace{\leftdist}\usebox{\TeXTree}\hspace{\rightdist}
+\end{verbatim}
+
+\caption{This is an example of a Fibonacci tree.}
+\end{Figure}
+
+
+\clearpage
+\bibliography{trees}
+\end{document}
+
+
+
diff --git a/Master/texmf-dist/doc/plain/tugboat/tubguide.pdf b/Master/texmf-dist/doc/plain/tugboat/tubguide.pdf
new file mode 100644
index 00000000000..19e97d6f1f0
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/tugboat/tubguide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/plain/tugboat/tubguide.tex b/Master/texmf-dist/doc/plain/tugboat/tubguide.tex
new file mode 100644
index 00000000000..ef930b2ebaa
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/tugboat/tubguide.tex
@@ -0,0 +1,844 @@
+%% @texfile{
+%% filename="tubguide.sty",
+%% version="1.02",
+%% date="9-Mar-1992",
+%% filetype="TUGboat Authors' Guide",
+%% copyright="Copyright (C) TeX Users Group.
+%% Copying of this file is authorized only if either:
+%% (1) you make absolutely no changes to your copy, OR
+%% (2) if you do make changes, you first rename it to some
+%% other name.",
+%% author="TeX Users Group",
+%% address="TeX Users Group",
+%% P. O. Box 9506,
+%% Providence, RI 02940,
+%% USA",
+%% telephone="401-751-7760",
+%% email="Internet: TUGboat@Math.AMS.com",
+%% codetable="ISO/ASCII",
+%% checksumtype="line count",
+%% checksum="844",
+%% keywords="tex users group, tugboat, authors' guide",
+%% abstract="This file is an updated version of the file
+%% that produced the original Authors' Guide in
+%% TUGboat 10, no. 3, November 1989."
+%% }
+%% *********************************************************
+%%
+%% TeXing this file requires the following files:
+%% TUGBOAT.STY (version 1.09+)
+%% TUGBOAT.CMN (version 1.08+) (loaded by TUGBOAT.STY)
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\input tugboat.sty
+
+\enablemetacode
+\everyverbatim{\enablemetacode}
+\def\halfline{\vskip 0.5\baselineskip \ignoreendline}
+
+% ****************************************************************
+
+\title *\TUB\/ Authors' Guide*
+
+\author * Ron Whitney *
+\address * \TUG\\
+ \POBox 9506\\
+ Providence, RI 02940-9506 *
+\netaddress * TUGboat@Math.AMS.com *
+
+\author * Barbara Beeton *
+\address * American Mathematical Society\\
+ \POBox 6248\\
+ Providence, RI 02940-6248 *
+\netaddress * TUGboat@Math.AMS.com *
+
+
+\vfootnote{}{Revised March 1992; the original appeared in \tubissue 10(3),
+November 1989.}
+
+\article
+
+With this article we hope to fill a lacuna (some might say ``void'')
+whose existence we have been attributing to the usual factors: tight
+schedules, alternative priorities and warty \TeX\ code. We now feel
+the macros in use for \TUB\/ have stabilized to the extent that
+documentation and suggestions for authors will remain fairly constant,
+and we hope this article can serve as a reasonable guide to
+preparation of manuscripts for \TUB. Authors who have used the \TUB\/
+macros before will note several changes (including more modern names
+for the style files). Suggestions and comments are quite welcome at
+the addresses listed below.
+
+\TUB\/ was originally typeset with a package based only on \plain.
+Later, as demand for style files follows wherever
+\LaTeX-devotees wander, a \TUB\/ variant of the \LaTeX\ {\tt article}
+style was also created. The two macro sets yield
+much the same output, differing in certain ways for input. Below we
+make comment on various aspects of the \TUB\/ package, first for the
+\plain-based macros, then for \LaTeX. The macro sets share
+the file |tugboat.cmn|,\footnote{$^1$}{This file used to be named
+{\tt tugboat.com}, but that notation was in conflict with conventions
+of MS-DOS and other operating systems; no conflicts are known to
+exist for the new name.} and users of either style should read the
+section entitled ``Common Abbreviations and Utilities''. We conclude
+with some general suggestions to help make the lives of those on the
+receiving end of (any kind of) electronic copy a little easier.
+
+
+\head * The \plain-based macros: {\tt tugboat.sty} *
+
+The macros are contained in two files, |tugboat.sty| and |tugboat.cmn|.$^1$
+
+\subhead * General description of tags *
+We attempt wherever possible to tag the various elements of \TUB\/
+articles in a ``generic'' way, modified in some respects by
+convenience. Authors and editors, of course, need tools to shape
+their articles to the form they desire, but we also wish to encourage
+a tagging style which is appropriate for electronic interchange. It
+seems unfair to expect much thought from authors concerning the
+markup of their information if we only provide a bag of widgets and
+do-hickies to hack and pound an article together. The tags whose use
+we encourage are the higher-level tags that mark the logical
+document structure. Below these are formatting macros that we
+recognize may be essential for certain applications. Both sorts of
+tags are described in the following article.
+
+Generally, to ``mark up'' the data <foo>, a tag |\xxx| will precede
+<foo> and |\endxxx| will follow (thus: |\xxx <foo>\endxxx|). We use
+the |{...}| form to delimit arguments of lower-level formatting
+macros. Optional commands follow tags and are enclosed in
+|[\lastoption][...]|, \`a la \LaTeX. Several options may be enclosed
+within one set of square brackets, or each
+option may be enclosed in its own set of brackets. These ``options''
+are actually just \TeX{} commands, and it is always possible to
+insert raw \TeX{} code as an option. Such practice violates truly
+generic markup, but it is {\it helpful\/} and at least confines
+The Raw and Dirty to a smaller area.
+\subtext
+Perhaps a little more detail is of use to some readers here.
+Upon encountering a tag, the general operational scheme of the
+macros is as follows:
+\verbatim[\makecomment\%]%
+[\def\lquote{`}\def\rquote{'}\makeescape\|\makebgroup\`\makeegroup\']%
+[\displaystyle{\everypar{\hangindent2\parindent}\advance\baselineskip by 1pt}]
+<read tag>
+\begingroup
+<set defaults>
+\the\every...
+<read options>
+<branch to appropriate action,|hfil|break|ignoreendline
+using `|rm|lquote|lquote'argument|/`|rm|rquote|rquote' as necessary>
+<cleanup>
+\endgroup
+\endverbatim
+The scheme shows that code inserted as an option is localized and that
+it may be used to override certain defaults and to guide branching.
+Things are not always simple, however. Sometimes parameters are set
+after a branch is taken (e.g.\ the macros might only call |\raggedright|
+after determining whether the mode is ``|\inline|'' or
+``|\display|''), and, despite localization, parameter setting might
+affect the current paragraph if a branch has yet to be taken.
+This is {\it not\/} to say the macros don't work, but rather that
+those authors who venture beyond the documented regions of the
+macros should do so with their eyes open.
+\endtext
+
+For convenience, we also allow the |*| as a delimiter for the
+higher-level tags; thus we could use either
+||\title \TUB\/ Authors' Guide \endtitle||
+or
+||\title * \TUB\/ Authors' Guide *||
+to indicate the title of this paper. To typeset a \ast{} within text
+delimited by |*|, the \plain\ control sequence |\ast| has been extended
+to give
+\ast{} in text and the usual $\ast$ in math.
+\subtext
+This markup scheme may suffer at the hands of \TeX's parsing mechanism
+when tagged data is nested. In these cases, one may group (|{...}|)
+embedded data so that \TeX{} knows to proceed to the next |\end...|
+or |*|.
+\endtext
+
+In the cases where we show extra spaces and carriage returns around
+arguments in this article, those (discretionary) spaces are
+accommodated in the macros. Thus, for example, when the argument to
+|\title| above is typeset, |\ignorespaces| and |\unskip| surround it
+and the extra spaces have no untoward effect. Spaces are also
+gobbled between options.
+
+
+\subhead * Outer form *
+At the outermost level, a source file will have the form (using the
+|*...*| delimiters):
+\verbatim[\makeescape\|]
+\input tugboat.sty
+|halfline
+<perhaps additional macros for article>
+|halfline
+\title * <title> *
+\author * <author> *
+\address * <address> *
+\netaddress * <network address> *
+|halfline
+\article
+|vellipsis
+<body of article>
+|vellipsis
+\makesignature
+\endarticle
+\endverbatim
+
+Data preceding |\article| is saved and typeset when |\article|
+is encountered. Each author should have his/her own
+||
+\author ...
+\address ...
+\netaddress ...
+||
+block, and the macros will do their best to combine the information
+properly in the appropriate places. Explicit linebreaks can be
+achieved within any of these items via |\\|. Title and authors are,
+of course, set at the beginning of an article; the address
+information is listed separately in a ``signature'' near the end of
+an article, and is present for the convenience of those who might
+photocopy excerpts from an issue of \TUB. |\makesignature| does the
+typesetting work. Generally authors are listed separately in the
+signature. In cases where authors and addresses are to be combined,
+one may use |\signature{...}| and |\signaturemark| with some or all
+of
+||
+\theauthor {<author number>}
+\theaddress {<author number>}
+\thenetaddress {<author number>}
+||
+to get the desired result. For example, for an article with
+\verbatim[\outputtofile{ray.vbm}]
+\author * Ray Goucher *
+\address * \TUG *
+\netaddress *TUG@Math.AMS.com*
+
+\author * Karen Butler *
+\address * \TUG *
+\netaddress *TUG@Math.AMS.com*
+\endverbatim
+we could say
+\verbatim[\outputtofile{sig.vbm}]
+\signature {
+ \signaturemark
+ \theauthor1 and \theauthor2\\
+ \theaddress1\\
+ \thenetaddress1}
+\endverbatim
+to obtain the signature
+\begingroup
+\authornumber=0
+\input ray.vbm
+\input sig.vbm
+\makesignature
+\medskip
+\endgroup
+
+\noindent
+Use of at least |\thenetaddress| is recommended for this just so that
+the network address gets formatted properly. The optional command
+|[\lastoption][\network{...}]| will introduce the network address
+with a network name, so
+||[\outputtofile{code.vbm}]
+\netaddress[\network{Internet}]
+ * TUGboat@Math.AMS.com *
+||
+produces
+{\authornumber=1
+ \input code.vbm
+ \figure[\mid\nofloat] \leftline{\kern\parindent\thenetaddress1} \endfigure
+}
+
+\leavevmode|\endarticle| marks the end of input and is defined as
+|\vfil\end| for most uses. We redefine it as |\endinput| to
+assemble streams of articles in \TUB.
+
+
+\subhead * Section Heads *
+Heads of sections, subsections, etc.\ are introduced with |\head|,
+|\subhead|, etc., respectively. The underlying macros all use
+|\head|, so |\endhead| is the long-form ending for all these tags.
+For example, the first two heads of this article could have been
+keyed as
+||
+\head The \plain-based macros:
+ {\tt tugboat.sty} \endhead
+||
+and
+||
+\subhead General description of
+ tags \endhead
+||
+
+In \TUB\/ style, the paragraph following a first-level head is not
+indented. This is achieved by a look-ahead mechanism which gobbles
+|\par|s and calls |\noindent|. Actually all of the |\...head| tags
+gobble pars and spaces after their occurrence. This allows one to
+enter a blank line in the source file between head and text, such
+practice being a visual aid to your friendly \TUB\/ editors (if not to
+you). Be careful of that |\noindent| after a first-level head:
+you will be in horizontal mode after the |\head *...*|, so spaces
+which {\it appear\/} innocuous, may not be so.
+
+
+\subhead * Lists *
+Lists are everywhere, of course, and a simple list hierarchy can
+transform a one-dimensional typesetting problem into something
+nasty. All of which is to say, we are certainly not done with
+this area of tagging, but here are the available macros.
+
+Not surprisingly, |\list| marks the beginning of a list. A list
+can be itemized, wherein each item is tagged with |\item|, or
+unitemized wherein items are delimited by |^^M| (the end of your
+input line). The itemized
+style is the default and |[\lastoption][\unitemized]| will get
+the other. Tags for the items default to the |\bullet|
+($=\bullet$), but can be changed by feeding an argument to
+|\tag{...}|. The |[\lastoption][\tag{...}]| option
+used with |\list| assigns the tag for each item of the entire
+list, while |[\lastoption][\tag{...}]| used with |\item| changes
+only the tag for that item. The obvious dynamical tags are available
+with options
+\verbatim[\makeescape\|\makebgroup\`\makeegroup\']
+\numbered
+\romannumeraled
+\lettered `|rm(lowercase)'
+\Lettered `|rm(uppercase)'
+\endverbatim
+
+Lists can be set in several columns by setting |\cols=...|. The
+columns are aligned on their top baselines and the user must
+break the columns with |\colsep|. Thus,
+\verbatim[\outputtofile{code.vbm}]
+\list[\unitemized\numbered][\cols=2]
+Fourscore
+and seven
+years ago
+our fathers
+\colsep
+brought forth
+on this
+continent
+\endlist
+\endverbatim
+yields
+\input code.vbm
+
+|\everylist| is a token register which is scanned at the beginning
+of each list
+after the default parameters are set and before
+options are read. If you want all your lists numbered, for example,
+you might insert ||\everylist{\numbered}|| at the top of your file
+rather than giving an option to each list.
+
+Implementation of sublists is under construction.
+
+\subhead * Verbatim Modes *
+
+There are several variations on this theme. In each case, text is
+printed in a typewriter font and (almost) all input characters
+produce the glyph in the font position of their character-code (i.e.\
+you get what you type, no escaping it). In addition to the long form
+||\verbatim...\endverbatim|| the \verbinline|\endverbatim\ character
+can be used to enter and leave verbatim mode, acting as a toggle much
+as the |$| does with math. \verbinline|...|\endverbatim\space
+produces inline verbatim text, while \verbinline||...||\endverbatim
+displays its output. |\verbatim| itself defaults to display form,
+but |\verbatim[\inline]| and its contraction |\verbinline| (both
+terminated by |\endverbatim|) produce the inline form. |^^M| yields
+a space inline, and a new paragraph in display. Generally, for
+snippets of text we use the \verbinline|...|\endverbatim form, and
+for longer items the
+||[\makeescape\!]
+\verbatim
+!vellipsis
+\endverbatim
+||
+form (although \verbinline||...||\endverbatim is a good way to
+display a single line of code).
+
+In addition to formatting text between |\verbatim| and
+|\endverbatim|, |\verbatim| may read and write data from and to
+files. We find this variant useful in ({\it almost\/}) guaranteeing
+consonance between macros in use and their published listings.
+||[\makeescape\!]
+\verbatim[\inputfromfile{foo.inp}]
+!vellipsis
+\endverbatim
+||
+will incorporate the contents of file |foo.inp| in the listing before
+the text between |\verbatim| and |\endverbatim|. The shortened form
+||\verbfile{foo.inp}\endverbatim|| accomplishes the above in the case
+that the text is empty. While the code around the data, |foo.inp|,
+above looks excessively long, do remember the implementation
+uses the basic |\verbatim| macro, so options can also be read after
+the filename. For example,
+||
+\verbfile{foo.inp}[\numbered]
+\endverbatim
+||
+would number the lines of the listing.
+
+We often rearrange code supplied to us so
+that it fits in the narrow measure of \TUB's two-column format, and
+we sometimes make corrections to macro sets (you thought you were
+perfect!). Since errors can (and do\Dash we aren't perfect either)
+creep in with these modifications, we use the above technique to
+maintain consistency between the listing published in \TUB\/ and the
+underlying macros used for examples.
+
+To write out information, use
+||[\makeescape\!]
+\verbatim[\outputtofile{foo.out}]
+!vellipsis
+\endverbatim
+||
+An added bonus here is that characters which get internalized as
+moribund ``letters'' or ``others'' in the process of listing them,
+can return revitalized for perhaps their real use when written out to
+another file and read in again. The example above involving Ray
+and Karen was coded as
+||[\makeescape\/][\makeactive\!][\def!{\VertChar}]
+... to get the desired result. For
+example, for an article with
+\verbatim[\outputtofile{ray.vbm}]
+\author * Ray Goucher *
+/vellipsis
+\endverbatim
+we could say
+\verbatim[\outputtofile{sig.vbm}]
+\signature {
+ \signaturemark
+ \theauthor1 and \theauthor2\\
+ \theaddress1\\
+ \thenetaddress1}
+\endverbatim
+to obtain the signature
+\begingroup
+\authornumber=0
+\input ray.vbm
+\input sig.vbm
+\makesignature
+\endgroup
+||
+This is perhaps not the most edifying example, but you get the gist.
+(We localize the process of storing and retrieving these
+authors and addresses so as not to clobber our own.)
+We would encourage our authors to use these mechanisms for connecting
+verbatim text to external files for the sake of maintaining
+consistency between active code and its documentation.
+
+\leavevmode|\verbatim| scans to |\endverbatim| (a 12-token sequence
+since the |\| is of type `other' after |\verbatim| gets going). Only
+this sequence of characters will interrupt the scan. On the other
+hand, \verbinline|\endverbatim and \verbinline||\endverbatim scan to
+the next \verbinline|\endverbatim and \verbinline||\endverbatim,
+respectively. Needless to say, one should use forms of |\verbatim|
+to set text which contains \verbinline|\endverbatim (and
+\verbinline|\endverbatim or \verbinline||\endverbatim to set text
+containing |\endverbatim| if you are writing an article like this
+one). Both the \verbinline|\endverbatim and |\verbatim| tags scan
+ahead for the usual |[\lastoption][| to check for options. In those
+rare cases when the |[\lastoption][| is really supposed to be the
+first character of the verbatim text, use the option
+|[\lastoption][\lastoption]| to stop option parsing. For example, to
+show ||[\lastoption][\lastoption]|| we keyed
+\verbatim
+|[\lastoption][\lastoption]|
+\endverbatim
+
+There are situations where one wants to typeset most things verbatim,
+but ``escape'' to format something exceptional. For example, the
+insertions of metacode given in the listings above require some
+access to the italic font. By giving the option
+|[\lastoption][\makeescape\!]| to |\verbatim|, the |!| is made an
+escape character in that block. Thus,
+||[\makeescape\/]
+\verbatim[\makeescape\!]
+/vellipsis
+...!it...
+/vellipsis
+\endverbatim
+||
+really calls the italic font in the middle of the listing (one might
+also want to use |\makebgroup| and |\makeegroup| in the options to define
+characters to localize this call; see p.~384). Situations
+will dictate preferences for what character may be used as an escape
+(we use the \verbinline|\endverbatim, |!|, and |/| in this article).
+There is also a means of changing the setup of every occurrence of
+verbatim mode. The contents of token register |\everyverbatim|
+is scanned after the defaults of verbatim mode
+have been set. In this article, for example, we have made
+|[\makeother\<]<| active and defined it in such a way that
+|[\makeother\<]<...>| typesets as metacode. Since |\verbatim|
+ordinarily changes |[\makeother\<]<| to type `other' on startup, we key
+||\everyverbatim{\enablemetacode}|| at the beginning of the file
+to have the proper adjustment made whenever verbatim is started.
+
+When ``escaping'' within a verbatim block, one should be aware that
+spaces and carriages returns are {\it active\/} and hence not gobbled
+as usual. Using the |!| as the active character, one might key
+||[\makeescape\/]
+\verbatim[\makeescape\!]
+/vellipsis
+!vskip .5!baselineskip
+/vellipsis
+\endverbatim
+||
+to get an extra half line of space in the middle of the listing. The
+space and carriage return on this line, however, cause problems. The
+space expands to |\ifvmode\indent\fi\space| and \TeX\ will not like
+the |\indent| after |\vskip|. The |^^M| expands to
+|\leavevmode\endgraf|, and therefore puts an extra line into the
+listing. The solutions, in this case, are to drop the space and to
+use |!ignoreendline| (which just gobbles the |^^M|), but one should
+be aware, generally, that some thought may be required in these situations.
+
+The option |[\lastoption][\numbered]| causes the lines of a
+verbatim listing to be numbered, while |[\lastoption][\ruled]|
+places rules around the whole thing:
+\verbatim[\numbered\ruled]
+<code>
+<more code>
+<yet more code>
+...
+\endverbatim
+The option |[\lastoption][\continuenumbers]| picks up the numbering
+where it last left off.
+\verbatim[\continuenumbers]
+<more>
+<and more>
+...
+\endverbatim
+
+The code underlying |\verbatim| in display style implements each line
+as a paragraph and places math-display-size whitespace above and
+below the verbatim section. Page and column breaks {\it are\/}
+permitted within these listings. To prohibit breaks at specific
+points or globally, one must insert penalties or redefine |^^M| to
+insert |\nobreak| in the vertical list at the end of each
+``paragraph'' (i.e.\ line). We should also note that the bottom of
+such a verbatim listing is implemented so that ensuing
+text may or may not start a new paragraph depending on whether an
+intervening blank line (or |\par|) is or is not present.
+
+
+\subhead * Figures and Page Layout *
+Figures are keyed as
+\verbatim[\makeescape\|]
+\figure
+|halfline
+<vertical mode material>
+|halfline
+\endfigure
+\endverbatim
+These are generally implemented as single-column floating
+top-insertions, but the options |[\lastoption][\mid]| and
+|[\lastoption][\bot]| can change specific items to be mid- or
+bottom-insertions, respectively. Here we recommend that the
+long-form terminator be used ({\it not\/} the |*...*| form). One can
+think of the information ``passed'' as being ``long'' in the sense of
+possibly containing paragraphs, this being a mnemonic device only.
+The primary reason for the recommendation is that one is (in some
+sense, maybe) more likely to encounter a rogue |*| in longer text
+than in shorter text and hence more likely to encounter a surprising
+result due to a macro stopping short at the wrong |*|.
+
+\subtext
+Perhaps here is a natural place to mention also that these macros
+sometimes read their arguments and then act, and sometimes act on the
+fly, not actually storing an argument as a string of tokens at all.
+|\title|, for example, is in the former category, while |\figure| is
+in the latter. Reasons may vary for the choice in
+methods. Storing a string of tokens as an argument does not allow
+re-interpretation of the category codes of the underlying
+character string. Thus, storing
+the ``argument'' of |\figure| all at once might misinterpret some
+characters which should appear as verbatim text. For this reason we
+set figures as we go and just close off the box with |\endfigure|. On
+the other hand, using information in multiple situations (e.g.\
+titles and running heads) requires storing the information as a token
+string, not as a typeset list.
+
+When text delimited by |*...*| is read as an argument, the |*|s are
+dropped by the parsing process. When the text is handled on the fly,
+the first |*| is gobbled and the second is made active to perform
+whatever action is necessary at the close of the macro. When
+possible, we prefer to operate on the fly since nested tags are
+handled properly in that case and no memory is consumed to store
+arguments. Examination of |tugboat.sty| will show which case applies
+in a given situation, but this general knowledge may help when trying
+to debug those situations in which an unexpected |*| has disrupted
+things.
+\endtext
+
+
+A primitive |\caption{...}| option is available to |\ulap|
+(i.e.\ lap upward) its argument into the figure space, but
+formatting of the caption is left to the user. For example,
+the code:
+\verbatim[\outputtofile{code.vbm}]
+\figure[\top]
+ [\caption{\centerline{Odd Fig.~1}}]
+\vbox to 5pc{}
+\endfigure
+\endverbatim
+produces the figure at the top of this column or the next.
+
+\input code.vbm
+
+Figures spanning columns at the top and bottom of a page are currently
+supported only on the first page of an article, but we expect they
+will soon be allowed on any page (a general rewrite of the output
+routine is in progress). |\twocolfigure| (terminated by |\endfigure|)
+starts up such a figure and currently {\it must\/} occur before any
+material has been typeset on the first page (i.e.\ {\it before\/}
+|\article|).
+
+
+Macros |\onecol|, |\twocol|, and |\threecol| provide one-, two-, and
+three-column layouts, but these cannot currently be intermixed on a
+page. We hope to provide automatic column-balancing and convenient
+switching between one- and two-column format within a year.
+|\newpage| in each format is defined to fill and eject enough columns
+to get to the next page. |\newcol| is just |\par\vfill\eject|.
+
+\subhead * Command List Summary *
+Tags are listed in the order discussed. Options are
+listed under tags.
+||
+\title
+\author
+\address
+\netaddress
+ \network
+\signature
+\article
+\makesignature
+\endarticle
+\head
+\subhead
+\subsubhead
+\list
+ \numbered
+ \romannumeraled
+ \lettered
+ \Lettered
+ \ruled
+ \tag{...}
+\item
+ \tag{...}
+\everylist
+\verbatim
+ \numbered
+ \ruled
+ \inputfromfile{...}
+ \outputtofile{...}
+\verbinline
+\verbfile
+\figure
+ \mid
+ \bot
+ \caption{...}
+\twocolfigure
+||
+and, of course, \verbinline|\endverbatim and \verbinline||\endverbatim.
+
+\head * The \LaTeX\ macros: {\tt ltugboat.sty} *
+
+|ltugboat.sty| is the primary macro file, and is based on the \LaTeX{}
+|article.sty|. |tugboat.cmn|, a collection of items common to both
+\LaTeX\ and \plain\ input, is also required. Articles will have
+the form:\footnote{$^2$}{{\tt ltugboat} used to be a substyle; it now
+stands on its own, by automatically inputting {\tt article.sty}.}
+\verbatim[\makeescape\|]
+\documentstyle{ltugboat}
+|halfline
+<perhaps additional macros for article>
+|halfline
+\title {<title>}
+\author{<author>}
+\address{<address>}
+\netaddress{<netaddress>}
+
+\begin{document}
+\maketitle
+|vellipsis
+<body of article>
+|vellipsis
+\makesignature
+\end{document}
+\endverbatim
+This is the usual form for \LaTeX\ documents, of course, except
+that now each author will have his/her own
+\verbatim
+\author{...}
+\address{...}
+\netaddress{...}
+\endverbatim
+block. As with the \plain{} style, the author and address
+macros will store their information for later display.
+See the discussion of |\address|, |\netaddress| and |\makesignature|
+on the second page of this article to understand more. Linebreaks
+within |\title|, |\author|, and |\...address| are specified with |\\|.
+
+We refer the user to the \LaTeX\ manual for description of section
+heads, verbatim mode, insertions, and movement between one- and
+two-column format. The style of printed output has, of course, been
+somewhat modified to fit \TUB\/ style. |ltugboat.sty| might be of some
+use to others wishing to modify the |article| option in this
+direction.
+
+
+
+\head * Common Abbreviations and Utilities *
+
+Definitions of a number of commonly used abbreviations such as |\MF|
+and |\BibTeX| are contained in |tugboat.cmn|. Please use these whenever
+possible rather than creating your own. We will add to the list as
+necessary.
+
+Several other constructions that we have found useful for both
+\plain- and \LaTeX-style input have been incorporated in
+|tugboat.cmn|. Various |\*lap|\,s (|\ulap|, |\dlap|, |\xlap|,
+|\ylap|, |\zlap|) and |\*smash|\,es provide means of setting type
+which ``laps'' into neighboring regions. |\dash| and |\Dash| are en-
+and em-dashes that break properly. |\slash| is a breakable slash.
+The macro
+\verbatim
+\makestrut [<ascender dimen>;
+ <descender dimen>]
+\endverbatim
+allows {\it ad hoc\/} construction of
+struts.
+
+|\makeatletter| |\catcode|s the |@| for internal control-sequences.
+There are also more general functions
+\verbatim
+\makeescape
+\makebgroup
+\makeegroup
+\makeletter
+\makeother
+\makeactive
+\endverbatim
+that change the category of a given character into the type mentioned
+at the end of the macro name. For example, |\makeactive\!| changes the
+category of the |!| to 13. We have given many other examples of these in
+this article. Readers may look at the end of |tugboat.cmn| after the
+|\endinput| statement to see further documentation on the contents of the file.
+
+
+\subhead * Issue Makeup *
+Constructing an entire issue of \TUB\/ requires use of a few features
+that authors may notice when articles are returned for proofing.
+|\xrefto| allows for symbolic cross-referencing, but is enabled only
+late in the production process. The distribution version of
+|tugboat.cmn| defines |\xrefto| so that ``???'' is typeset whenever it
+is called. Not to worry.
+
+We also put notes into the file since there are many things to
+remember, and these appear as |\TBremark{...}|. Authors can look for
+such things, if they are interested.
+
+
+\head * General Coding Suggestions *
+
+Probably 90\% of the code we receive is easily handled, and for this
+we are most appreciative. We do have suggestions of a general nature
+that authors should keep in mind as they create articles for
+transmission here or anywhere else.
+
+Those who create code find it much easier to read and understand their
+own code than do others who read the ``finished'' product. In fact,
+some people seem to forget that the electronic file will be viewed (in
+fact, studied) in addition to the printed copy. Documentation and
+uniform habits of presentation always help. Blank lines are easier to
+digest by eye than |\par|s. Tables and display math can often be
+keyed in such a way that rows and columns are clear in the source file
+on a display screen as well as in print. Explanations or warnings of
+tricky code can be {\it very} helpful. Authors should place font and
+macro definitions in one location at the beginning of an article
+whenever possible.
+
+Authors should anticipate that articles will undergo some
+transformation, and that positioning of some elements may change
+simply because articles are {\it run together\/} in \TUB. Decisions
+on linebreaks, pagebreaks, figure and table placement are generally
+made after the text is deemed correct. We avoid inserting ``hard''
+line- and page-breaks whenever possible, and will not do so, in any
+case, until the last minute. We also use floating insertions for
+figure and table placement when we first receive an article. It is
+easier for us to work with a clean file containing some bad breaks,
+overfull boxes or other unsightliness, than it is to handle a document
+containing {\it ad hoc\/} code dedicated to a beauteous (albeit
+narrowly specific) result.
+
+
+When authors proof their articles in formats other than that of \TUB\/
+(for example), they should expect that \TUB's changes in pagewidth and
+pagedepth may drastically alter text layout. Paragraphs are rebroken
+automatically when |\hsize| and |\vsize| change, but |\centerline|
+does not break, and we often see tables and math displays which are
+rigidly laid out. When possible, authors might use paragraphing
+techniques instead of calls to, say, |\centerline| (Beeton will be
+writing up her lectures on paragraphing techniques for a future issue
+of \TUB\/), and they should try to code tables in such a way that
+widths of columns can be changed easily. Generally, authors should
+attempt to anticipate the work that might be necessary if requests for
+other reasonable formats of their texts are made. In the case of
+\TUB, we make a strong effort to stuff macro listings and tables into
+the two-column format. Since these types of items are not generally
+susceptible to automatic line-breaking, we give thanks to stuffings
+made by authors ahead of time. In this context, we recommend the use
+of |\verbfile{...}| (see the section {\bf Verbatim Modes}) to maintain
+consistency between documentation and reality.
+
+Specifically in the domain of \TeX\ macros, we find that many authors
+throw in unnecessary |%| characters to end code lines. Except in
+cases where the |^^M| means something other than end-of-line,
+linebreaks can reliably be placed after control-words and numerical
+assignments. We have seen \TeX's buffer size exceeded when |%|
+was placed after {\it every\/} line.
+
+A wider perspective in the matter of naming macros can prevent
+problems that occur when definitions are overwritten as articles are
+run together. The names of control sequences used in \plain, \LaTeX,
+and \AmSTeX\ are documented and authors should avoid using them for
+other purposes. It is also wise to avoid commonly used names such as
+|\temp|, |\result|, |\1|, and |\mac| in presenting code that might be
+cribbed by other users. The frequently used technique of temporarily
+|\catcode|ing a character to be a letter (e.g.\ the |@|) provides a
+good method of hiding control sequences so that they will not be
+clobbered later. Readers are in need of small macros to do little
+tricks, and they often try suggestions brought forth in \TUB. A
+little extra effort in making these macros consistent with the macros
+in wide distribution and in making them robust will be much
+appreciated.
+
+\TBremark{Anything about formatting macros?}
+
+
+\head * Electronic Documentation and Submission Procedure *
+
+In addition to |tugboat.sty|, |ltugboat.sty|, and |tugboat.cmn|,
+a copy of this article, |tubguide.tex|, will be available at
+most \TeX{} archives, including those at SHSU, Aston, and Stuttgart.
+
+Please address all electronic correspondence to the \TUB{} maildrop:
+||TUGboat@Math.AMS.com||
+Mail to either of our personal addresses is liable to go unseen if
+vacation or illness intervenes. We also request that you supply
+an abstract of any expository article. This will be used as the
+basis for translation of abstracts to languages other than that
+in which the article is published.
+
+
+\makesignature
+
+\endarticle
diff --git a/Master/texmf-dist/doc/plain/typespec/TypeSpec.pdf b/Master/texmf-dist/doc/plain/typespec/TypeSpec.pdf
new file mode 100644
index 00000000000..5a63b687b7f
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/typespec/TypeSpec.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/plain/typespec/TypeSpec.tex b/Master/texmf-dist/doc/plain/typespec/TypeSpec.tex
new file mode 100644
index 00000000000..5b2f19781c1
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/typespec/TypeSpec.tex
@@ -0,0 +1,255 @@
+\hsize4.5in
+\hoffset6.5in
+\advance\hoffset-\hsize
+\divide\hoffset2
+
+\def\ob{\tt\string{}
+\def\cb{\tt\string}}
+
+\footline={\ifnum\pageno=1 \else \hss\folio\hss\fi}
+
+\chardef\other=12
+\def\deactivate{%
+\catcode`\\=\other \catcode`\{=\other
+\catcode`\}=\other \catcode`\$=\other
+\catcode`\&=\other \catcode`\#=\other
+\catcode`\%=\other \catcode`\~=\other
+\catcode`\^=\other \catcode`\_=\other}
+
+\def\makeactive#1{\catcode`#1=\active \ignorespaces}
+
+\def\LaTeX{L\kern-.26em \raise.6ex\hbox{\fivei A}%
+\kern-.15em TeX}%
+
+{\makeactive\^^M %
+\gdef\obeywhitespace{\makeactive\^^M %
+\let^^M=\newline %
+\aftergroup\removebox %
+\obeyspaces}}
+
+\def\newline{\par\indent}
+\def\removebox{\setbox0=\lastbox}
+
+{\catcode`\|=\active
+\gdef\verbatim{%
+ \par\begingroup\deactivate\obeywhitespace\tt
+ \catcode`\|=\active
+ \def|{\endgroup\par}}}
+
+\clubpenalty10000
+\widowpenalty10000
+\raggedbottom
+\interlinepenalty10000
+
+\def\section#1\par{%
+\medskip
+\noindent\llap{\raise1.25pt\hbox{$\diamond$\enskip}}{\bf#1}\par\nobreak\noindent}
+
+\section Introduction
+
+I use a lot of type. I also use \TeX~--~what better medium can there be for showing off type?~--~in
+its Macintosh incarnation as Textures. I need samples that I can show clients, and that I can
+refer to for the technical details of the typeface. The results are the type specimens you see
+here. The code itself has some annotations that you might want to read. The macros are not
+complex~--~I don't have time to decode clever macros, and I may need to alter them for unusual
+situations as they arise. You are encouraged to do the same. The current distribution of these
+specimens includes: This introduction; eight type specimens; an Acrobat PDF file with typeset
+examples of the specimens and this introduction.
+
+Some of the fonts in these examples (particularly {\it Centaur} in {\tt TypeSpc8.tex}) were made \TeX-ready
+by using Alan Jeffrey's {\tt fontinst}. The {\tt fontinst} package is discussed in considerable detail in Alan
+Hoenig's new book {\it\TeX\ Unbound:\ \LaTeX\ and \TeX\ Strategies for Fonts, Graphics \& More} (Oxford 1998), which
+discusses {\tt fontinst} over the course of several chapters and works through numerous examples. If you deal at all with
+fonts and
+\TeX\ you will need this book.
+
+Clearly, these specimens will be most easily produced on systems that use outline fonts
+as opposed to bitmaps. I have used these specimens on a Mac with Textures using both PostScript and TrueType, and on a PC
+with PC\TeX using TrueType. Textures (now at version 2.0) is interesting in that it can create font metrics
+``on the fly'' from the Mac's bitmap files. For more demanding work, you will, however, want to stick with {\tt fontinst}.
+
+\section A word about color
+
+Blue Sky Research {\it Textures} is a wonderful implementation of \TeX\ that has a very convenient
+way to use color through the {\tt\string\special} mechanism. I'm going to describe it so that if
+you use a different implementation that can take advantage of color, you will understand the
+macros here. Color is invoked by:
+
+\verbatim\special{color rgb 1.0 0.0 0.0}|
+
+\noindent This tells \TeX\ to trun everything red from this point on. This specification could
+also have been given by:
+
+\verbatim\special{color cmyk 0.0 1.0 0.1 0.0}|
+
+\noindent as red in the CMYK model is 100\% of magenta and yellow. To jump back and forth between
+colors, Textures has a color stack and you can push colors onto the stack and pop them off. So, a
+typical use of color might be something like this:
+
+\verbatim\special{color push}% Puts current color (black) on stack|
+\verbatim%%% Calls red and puts it on stack:|
+\verbatim\special{color rgb 1.0 0.0 0.0}|
+\verbatim Some text in red.|
+\verbatim\special{color pop}% Pops red off stack, restores black|
+\verbatim More text in black.|
+
+\noindent Simple. You can also define a color for later use:
+
+\verbatim\special{color define red rgb 1.0 0.0 0.0}|
+
+\noindent and summon it by calling:
+
+\verbatim\special{color red}|
+
+\noindent The advantage of this is that you can call colors that downstream processors (separation
+software, or a printer) can use to identify color use. You can even screen the color for tints:
+
+\verbatim\special{color red .5}|
+
+\noindent which would give a 50\% tint of red, or pink.
+
+\section TypeSpc1.tex, TypeSpc2.tex, TypeSpc3.tex
+
+These are essentially variations on a theme, differing only in the display type at the top of the
+page. TypeSpc1 has a selection of telltale characters. The top of the {\it A\/} often has a distinctive
+treatment; the lower half of the {\it G\/} and the tail of the {\it Q\/} also tend to
+be distinctive; the shape and size of the enclosed
+areas of the lowercase {\it a\/} and {\it e\/} are also
+telltale, and important in that very small such spaces
+are likely to close up under less than ideal printing
+conditions; the ampersand frequently has a good deal of
+creativity lavished upon it. TypeSpc2 sets the
+uppercase and lowercase of each letter next to each other. TypeSpc3 has a line of uppercase
+characters (not good design, but some people like or expect it) followed by a line of lowercase characters.
+
+\section Selecting the type
+
+At the beginning you can insert three items of information: the \TeX\ name of the font; the name
+of the font that will appear as the `title' of the specimen; and any comments that you wish to
+have at the end of the chart. I like this specimen because the chosen typeface is used for the
+whole specimen, including annotations. Clearly, these specimens and macros are more suited to
+PostScript and TrueType fonts than bitmaps -- proceed accordingly.
+
+\section Column width
+
+Under normal circumstances, a column of type should be about 70 lowercase characters (about 2.5
+lowercase alphabets) in width, or about 4.5 inches in width, which ever comes first. Much longer, and the eye tires, and
+loses its place when moving to the next line; much shorter and you increase the level of visual
+noise such as hyphenation and highly variable word spacing. This sample shows 10pt type at the
+width of 2.5 lowercase alphabets, and calculates the size of type necessay to set 70 characters
+to a measure of 4.5 inches. Interestingly, 10pt type
+usually comes very close to fitting 4.5 inches with 70
+characters. One of the most common signs of uninformed typography is
+column width that pays no attention to the realities of
+type and reading.
+
+\section Leading
+
+The calculation of leading~--~{\tt\string\baselineskip} in \TeX~--~is based purely on the
+physical realities of the type being set. The maximum height and depth of the typeface's characters is found, and then a
+percentage of that amount is added to itself to arrive at the leading. The x-height of the font
+is also given some influence over the leading.
+
+\section Choice of text
+
+I have provided three sample texts in token registers. The first is a simple piece of English
+prose. The second is a collection of {\it pangrams}~--~sentences using all twenty-six letters of the alphabet~--~from the large
+collection of David Lemon of Adobe Systems, Inc.; so you get to see all of the letters of the alphabet in
+use. The third is an amalgam of Latin and semi-Latin texts. In the first place, Latin~--~as
+Beatrice Warde pointed out~--~has fewer descenders so the text sits more cleanly on the baseline;
+second, as W.\ A.\ Dwiggins pointed out to Beatrice Warde, it is good to have a sample of text in
+a language the reader does not read~--~in this way the reader looks at the type itself, and not
+through the type to the information it conveys.
+
+\section Type factor
+
+The type factor is basically an extension of the the characters per pica concept, but scaled to
+the size of the typeface. It is based on a sample of type in which $f=(c\,t)/m$ where $f$ is the
+typefactor, $c$ is the number of characters in the sample, $t$ is the type size in points, and $m$
+is the total horizontal width of the sample. The formula can be put to some good use. For
+instance, characters per pica, $p$, can be obtained from $p=h/f$ where $h$ is the size of the type
+in points; the size of the type, $h$, necessary to place $n$ characters on a column width of $w$
+(in picas) is: $h=(fw)/n$. I have used a sample based on the relative frequency of letters in
+English. This gives excellent agreement with published figures, particularly those in {\it Brown's
+Index}. It is best not to take figures like characters-per-pica or type factors too seriously. They are very useful for
+judging the relative characteristics of typefaces. Before computer typesetting they were far more useful when the actual
+typesetting of material was costly and time-consuming. Computers allow us to be able to change typesetting parameters
+interactively and quickly, relieving us from having to know precisely ahead of time how the material is going to layout.
+
+\section The ratio of the x-height to the ascender height
+
+This is an important characheristic of type. As x-height increases, type tends to look darker, or
+more crowded on the page. The antidote to this is to increase the leading slightly. {\it See above.}
+
+\section TypeSpc4.tex -- a mini-specimen
+
+The principal attraction of TypeSpc4 is the
+{\tt\string\makefontbox} macro which gives a kind miniature specimen that can be as little or as
+large as you like. In the examples I give, the grid is certainly optional as is the use of color:
+They are merely suggestions to get you started. The five arguments to {\tt\string\makefontbox} are
+as follows:
+
+\medskip
+
+\vbox{\raggedright\parskip3pt
+
+\itemitem{\#1}\TeX's name for the desired font
+
+\itemitem{\#2}The name font name as you want it to print
+
+\itemitem{\#3}The name of the type's designer, or other salient
+ piece of information that lends itself to display
+
+\itemitem{\#4}The size of the type inside the box
+
+\itemitem{\#5}The overall desired width of the box}
+
+\section TypeSpc5.tex -- by the numbers
+
+It is very often useful to know where the characters of a typeface are, and to gain an overall
+impression of all of the characters of a font. This specimen is simply an enumeration of the
+characters with respect to their character numbers. The macro to notice is
+{\tt\string\lineofchars}. You can specify how may characters are to be in the line, and what the
+numerical starting point will be. Numerous other design variables can be specified, and they are
+discussed in TypeSpc5.tex.
+
+\section TypeSpc6.tex -- for florid fonts
+
+There are times when you simply have to see a font in all its splendor. You don't need it at every
+imaginable size. And in the case of ornate calligraphic fonts, it does not make any sense at all
+to shove uppercase letters together for any reason, not even for display.
+
+\section TypeSpc7.tex -- homage \`a Caslon
+
+This ornate example is meant to be both fun and useful. It was inspired by the specimen sheets of
+William Caslon. The names of the type sizes~--~Ruby, Minion, Brevier, etc.~--~are traditional and
+could be replaced with sizes in points. This is a useful sample for PostScript typefaces which are
+often packaged as a family of four fonts: roman, italic, bold and bold-italic. The principle fonts
+are the roman and italic, however, and these are the fonts primarily featured in this specimen. The
+sample text is in a token list and can be changed at will~--~just make sure that there is enough
+of it.
+
+\section TypeSpc8.tex
+
+This specimen uses techniques that we have established in earlier samples. Again, this is suitable
+for typefaces that exist in pairs (or pairs of pairs) of fonts: roman and italic, bold and
+bold-italic. There is also a macro for a single, centered paragraph that could be used, say, for
+small caps. The type size, leading and type factor are given for each font.
+
+\section TypeSpc9.tex
+
+I combined two formats here to show off the principal characteristics of the roman along with the
+fonts of the family as used for text.
+
+\section TypeSp10.tex
+
+Another variation using one sample per line. Also notice the very beautiful typeface.
+
+\bigskip
+\hrule
+
+\section Stephen Moye, 23 IV 1998
+
+Stephen\hbox to .5em{\hrulefill}Moye@brown.edu\hfill\break Brown University Graphic Services
+
+\bye \ No newline at end of file
diff --git a/Master/texmf-dist/doc/plain/vertex/vertex.doc b/Master/texmf-dist/doc/plain/vertex/vertex.doc
new file mode 100644
index 00000000000..c5e98292b66
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/vertex/vertex.doc
@@ -0,0 +1,289 @@
+\magnification=\magstep1
+\input vertex
+\input ppt.sty
+
+\topmatter
+ \title{Ver\TeX\ User's Manual}
+ \author{Hal R. Varian}
+ \affil{University of Michigan}
+ \abstract{This documentation describes Ver\TeX, a package of \TeX\
+macros that will produce beautiful working papers, and allow you to
+simulate final versions in a variety of journal styles.}
+ \keywords{\TeX, typesetting, economics}
+ \address{Prof. Hal R. Varian, Department of Economics, University of
+Michigan, Ann Arbor, MI 48109, U.S.A.\ \ Internet address: {\tt
+Hal\_Varian@UM.CC.UMICH.EDU}}
+ \thanks{Thanks to Kari Gluski, the participants of {\tt tex:forum},
+the members of the Economics Department at the University of Michigan,
+and all the \TeX\ hackers who made this work possible.} \date{August,
+1986}
+ \version{\today}
+ \prelim
+ \endtopmatter
+ \document
+
+There are several \TeX\ macro packages already available, so why is one
+more necessary? Basically I felt that there was a need for a simple,
+flexible package that added a minimum amount to {\tt PLAIN.TEX}, and yet
+still provided useful features for writing technical reports.
+
+Ver\TeX\ will help you to {\bf V}isualize {\bf E}conomics {\bf R}eports
+using \TeX. Ver\TeX\ will produce nice looking preprints and will aid in
+formatting your bibliography, but it will also produce simulated journal
+styles for a variety of economics journals. It is very easy to add new
+journal styles to Ver\TeX for someone who knows a little bit of \TeX.
+
+\section Ver\TeX\ Commands
+
+The easiest way to show you Ver\TeX's commands is to show you the
+start of this paper. It looks like something like this:
+
+\verbatim/
+\magnification=\magstep1
+\input vertex
+\input ppt.sty
+
+\topmatter
+ \title{Ver\TeX\ User's Manual}
+ \author{Hal R. Varian}
+ \affil{University of Michigan}
+ \abstract{This documentation describes Ver\TeX, a package of \TeX\
+macros that will produce beautiful working papers, and allow you to
+simulate final versions in a variety of journal styles.}
+ \keywords{\TeX, typesetting, economics}
+ \address{Prof. Hal R. Varian, Department of Economics, University of
+Michigan, Ann Arbor, MI 48109, U.S.A.\ \ Internet address: {\tt
+Hal\_Varian@UM.CC.UMICH.EDU}}
+ \thanks{Thanks to Kari Gluski, the participants of {\tt tex:forum},
+the members of the Economics Department at the University of Michigan,
+and all the \TeX\ hackers who made this work possible.} \date{August,
+1986}
+ \version{\today}
+ \prelim
+ \endtopmatter
+ \document
+
+There are several \TeX\ macro packages already available, so why is
+one more necessary? Basically I felt that there was a need for a
+simple, flexible package that added a minimum amount to {\tt
+PLAIN.TEX}, and yet still provided useful features for writing
+technical reports./
+
+\bigskip
+
+That's pretty simple, isn't it? The only extra feature that you need to
+know is that you can put \verbatim/\cr/ into the \verbatim/\title/ macro if
+you want to split the title into two or more lines, as in
+ $$\verbatim/\title{A very, very, very, very \cr very long title}/$$
+
+If there are two authors of a paper, use the commands
+ $$\verbatim/\authortwo{The Name}\affiltwo{The University}/$$
+The \verbatim/\thanks/ should come {\it before\/} the \verbatim/\author/
+and \verbatim/\title/ keywords, if the style you are using attaches the
+thanks as a footnote to the author or title.
+
+What if there are more than two authors? In that case you are on your
+own, except in the preprint style. There you can do something like:
+
+\verbatim/\author{A. Winken \cr {\it MIT} \cr B. Blinken \cr
+ {\it University of California} \cr {\rm and} \cr C. Nod \cr
+ {\it University of Michigan}}/
+
+This will set the authors and affiliations up the way you want them.
+Be sure to leave the \verbatim/\affil/ box out if you do this trick.
+I intend to provide better support for multi-authored papers in the
+next release of Ver\TeX.
+
+When you want to start a new section, you type
+ $$\verbatim/\section title of the section \par/$$
+and when you want to start a subsection you type
+ $$\verbatim/\subsection title of the subsection \par/$$
+Ver\TeX\ will handle the section numbers for you, automatically numbering
+each section as required.
+
+You can enter footnotes by using the construction
+ $$\verbatim/\fnote{This is a footnote}/$$ and you get a
+footnote.\fnote{Like this!} If at the end of your document, you type
+\verbatim/\PrintEndNotes/, \TeX\ will print out an end page with all your
+footnotes on it, for those journals who just have to have it.
+
+If you want the paper to be double spaced, put \verbatim#\doublespace#
+between \verbatim#\endtopmatter# and \verbatim#\document#. This way the
+cover will come out single spaced and the document will come out double
+spaced, which is what people usually want.
+
+If you are in doublespace mode and want to put a paragraph in single
+spaced mode for some reason, type \verbatim#\singlespace#. The document
+will now revert to single spaced mode until you enter \verbatim#\doublespace#
+again.
+
+One common reason to want to use single spacing in a doublespaced document
+is for long quotes. Ver\TeX\ provides this via the command
+\verbatim/\quote/, as in \verbatim/\quote{Four score and seven $\ldots$}/.
+
+\section Extra Goodies for Math and Figures
+
+But there are more goodies in Ver\TeX. For example, you can attach {\it
+names\/} to equations, and have \TeX\ automatically number (and renumber!)
+them for you. To use this feature you type something like the following
+when you first introduce an equation:
+ $$\verbatim/$$e=mc^2\eqno\Equation\Einstein$$/$$
+and then when you want to reference it, you say
+ $$\ldots\verbatim/as in equation (\Einstein)./$$
+The same sort of thing works with figures. When you first reference a
+figure, called, say \verbatim/\MonaLisa/, you type
+\verbatim/\Fig\MonaLisa/. \TeX\ will assign the next figure number to it
+and enter ``Figure 2'' (or whatever) in the text. At the end of the
+paragraph, or roughly where you want the figure to appear, you
+type
+ $$\verbatim/\Figure\MonaLisa{2in}{The great painting Mona Lisa.}/$$
+The three arguments to the \verbatim/\Figure/ macro are: (1) the
+figure name, (2) the vertical size of the figure, and (3) the
+caption for the figure. \TeX\ will insert the figure using the
+\verbatim/\midinsert/ command, so it will appear on the page you
+ask for it if there is room, and otherwise float to the top of the
+next page.
+
+There are couple of things about equation and figure names that are worth
+pointing out. First, \TeX\ does not allow you to use {\it numbers\/} as
+part of a name. Thus names like \verbatim/\Eq1/ and \verbatim/\Eq2/ are
+not allowed. However, you can {\it reuse\/} names as often as you wish.
+You can refer to an equation as \verbatim/\A/ in one section of the paper
+and later on redefine \verbatim/\A/ to refer to another equation. I find
+it convenient to use rather long descriptive names like
+\verbatim/\FirstOrderCondition/ for equations that I refer to throughout the
+paper and use short names like \verbatim/\A/ for equations that I only
+refer to once or twice.
+
+There a couple of handy math commands. You can type \verbatim/\text{for all}/
+if you want ``for all'' to appear in math mode. You can type
+\verbatim/\D{f(x)}{x_i}/ to get
+ $$\D{f(x)}{x_i}$$ and
+\verbatim/d{f(x)}{x_i}/ to get $\d{f(x)}{x_i}$.
+
+The command \verbatim/\proof/ sets a nice {\it Proof.} The command
+\verbatim/\qed/ gives you a box: \qed The command \verbatim/\proclaim/
+works the same as described in {\it The \TeX book}, but the style has been
+changed slightly.
+
+The command \verbatim/\today/ gives today's date nicely spelled out, like:
+\today.
+
+To get verbatim \TeX\ listings, use the construction
+
+ $$\verbatim/\verbatim#This will appear verbatim#/$$
+
+Any convenient symbols can be used as a delimiter in place of the
+\verbatim/#/ signs.
+
+\section References
+
+Ver\TeX\ has nice way to deal with references. You type something
+like the following:
+
+\verbatim/
+
+\ref \by{Afriat, S.} \paper{The Construction of a Utility Function from
+Expenditure Data} \jour{International Economic Review} \vol{8}
+\yr{1967} \pages{67--77}\endref
+
+\ref \by{Afriat, S.} \paper{On the Constructability of Consistent Price
+Indices Between Several Periods Simultaneously} \inbook{Essays in
+the Theory and Measurement of Consumer Behavior in Honor of Sir
+Richard Stone}\editor{A. Deaton} \publ{Cambridge University Press}
+\publaddr{Cambridge, England}\yr{1984}\endref
+
+\ref \by{Browning, M.}\paper{A Non-Parametric Test of the Life-Cycle
+Rational Expectations Hypothesis} \paperinfo{Princeton University
+Discussion Paper 64} \yr{1984}\endref
+
+\ref \by{Varian, H.} \paper{Nonparametric Test of Models of Consumer
+Behavior}\jour{Review of Economic Studies} \vol{50} \yr{1982b} \no{3}
+\pages{99--110}\endref
+
+\ref \by{Varian, H.} \book{Microeconomic Analysis} \publ{W.
+W. Norton \& Co.} \publaddr{New York} \yr{1984}\endref
+/
+\medskip
+
+and you will get a nice typeset output like:
+
+\bigskip
+
+\ref \by{Afriat, S.} \paper{The Construction of a Utility Function from
+Expenditure Data} \jour{International Economic Review} \vol{8}
+\yr{1967} \pages{67--77}\endref
+
+\ref \by{Afriat, S.} \paper{On the Constructability of Consistent Price Indices
+Between Several Periods Simultaneously} \inbook{Essays in the Theory and
+Measurement of Consumer Behavior in Honor of Sir Richard Stone}
+\editor{A. Deaton} \publ{Cambridge University Press} \publaddr{Cambridge,
+England}\yr{1984}\endref
+
+\ref \by{Browning, M.}\paper{A Non-Parametric Test of the Life-Cycle Rational
+Expectations Hypothesis} \paperinfo{Princeton University Discussion Paper 64}
+\yr{1984}\endref
+
+\ref \by{Varian, H.} \paper{Nonparametric Test of Models of Consumer
+Behavior} \jour{Review of Economic Studies} \vol{50} \yr{1982b} \no{3}
+\pages{99--110}\endref
+
+\ref \by{Varian, H.} \book{Microeconomic Analysis} \publ{W.
+W. Norton \& Co.} \publaddr{New York} \yr{1984}\endref
+
+\medskip
+
+The reference macros are quite complicated and are still being fixed; use
+them at your own risk. Currently if you omit a field that is
+require---like leaving out the page numbers or something like
+that---Ver\TeX\ will sometimes print out excess commas and other
+punctuation. Eventually this will be fixed, but for now it is better to
+put in a dummy value, like \verbatim#\pages{???}# or something like that.
+
+If you have a fancy reference that doesn't fit one of the above models,
+just use the \verbatim#\ref# macro to start the reference. You'll get
+the right hanging indentation and inter-reference spacing that way.
+
+Refer to the file \verbatim#vertex.hst# for the history of revisions to
+Ver\TeX. If you add some peachy macros of your own, I strongly suggest
+that you put them in a separate file. Then as new revisions of Ver\TeX\
+come out, you won't have to modify them in any way.
+
+Ver\TeX\ is in the public domain; please feel free to distribute it however
+you want, as long as you indicate the original author.
+
+\section Journals
+
+Want to get published quick? Then use Ver\TeX's journal simulation
+feature. Instead of using the command \verbatim\input ppt.sty\ use
+the style files:
+
+\medskip
+
+\verbatim\jpe.sty\ --- for the {\it Journal of Polemical Economy}.
+
+\verbatim\jep.sty\ --- for the {\it Journal of Economic Perspectives}.
+
+\verbatim\jet.sty\ --- for the {\it Journal of Economic Theorems}.
+
+\verbatim\aer.sty\ --- for the {\it Armenian Economic Review}.
+
+\verbatim\ecnmet.sty\ --- for {\it Economagica}.
+
+\verbatim\restud.sty\ --- for {\it Review for Economic Students}.
+
+\verbatim\qje.sty\ --- for the {\it Quartered Journal of Economics}.
+
+\medskip
+
+When you use one of these styles, Ver\TeX\ will automatically adjust the
+style of the document and the style of the references to be more-or-less
+consistent with the journal style. Some fine tuning may be needed, but
+the output generally looks pretty good.
+
+If you want to see a small sample of each output, \TeX\ the file {\tt
+vertest.tex}.
+
+\enddocument
+
+\bye
diff --git a/Master/texmf-dist/doc/plain/yannisgr/00changes.txt b/Master/texmf-dist/doc/plain/yannisgr/00changes.txt
new file mode 100644
index 00000000000..9be612e38ba
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/00changes.txt
@@ -0,0 +1,36 @@
+ -Files renamed to avoid conflicts with CM:
+ accent.mf renamed to rgraccent.mf
+ punct.mf renamed to rgrpunct.mf
+
+ -Files renamed to avoid conflicts with Levy's Greek
+ gen_acc.mf renamed to rgen_acc.mf
+ grbase.mf renamed to rgrbase.mf
+ greek.mf renamed to rgreek.mf
+ greekmacros.tex renamed to rgreekmacros.tex
+ grtestfont.tex renamed to rgrtestfont.tex
+ lig.mf renamed to rgrlig.mf
+ lower.mf renamed to rgrlower.mf
+ upper.mf renamed to rgrupper.mf
+
+ -Files renamed to conform to HMC foreign language conventions
+ rgrhyph.tex renamed to grhypha.tex
+
+ -Files replaced with near-identical files from Levy's Greek
+ digits.mf
+
+ -Files changed to reflect above renamings:
+ greekcsc.mf
+ mrgrbf10.mf
+ mrgrrg10.mf
+ mrgrsl10.mf
+ mrgrti10.mf
+ m_greek.mf
+ rgrbf10.mf
+ rgreek.mf
+ rgrpaper.tex
+ rgrrg10.mf
+ rgrsc10.mf
+ rgrsl10.mf
+ rgrtestfont.tex
+ rgrti10.mf
+ tomakeformat.txt
diff --git a/Master/texmf-dist/doc/plain/yannisgr/00readme.txt b/Master/texmf-dist/doc/plain/yannisgr/00readme.txt
new file mode 100644
index 00000000000..9110bf9a1c1
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/00readme.txt
@@ -0,0 +1,49 @@
+
+Directory TEX_ROOT:[BABEL.GREEK.YANNIS]
+
+00CHANGES.TXT;5
+00README.TXT;1
+CSC_MISCE.MF;1
+DIGITS.MF;2
+GEN_ACC.MF;2
+GEN_M_ACC.MF;1
+GREEKCSC.MF;2
+IT_DIGITS.MF;1
+IT_LIG.MF;1
+IT_LOWER.MF;1
+LIGCSC.MF;1
+MONSYL.TXT;1
+MRGRBF10.MF;2
+MRGRRG10.MF;2
+MRGRSL10.MF;2
+MRGRTI10.MF;2
+M_ACCENT.MF;1
+M_GREEK.MF;2
+RGEN_ACC.MF;1
+RGR.README;2
+RGRACCENT.MF;1
+RGRBASE.MF;1
+RGRBF10.MF;3
+RGREEK.MF;3
+RGREEKMACROS.TEX;1
+RGRHYPH.TEX;1
+RGRLIG.MF;1
+RGRLOWER.MF;1
+RGRPAPER.DVI;1
+RGRPAPER.LIS;2
+RGRPAPER.TEX;3
+RGRPUNCT.MF;1
+RGRRG10.MF;3
+RGRSC10.300GF;1
+RGRSC10.LIS;1
+RGRSC10.MF;2
+RGRSC10.PL;1
+RGRSC10.TFM;1
+RGRSL10.MF;3
+RGRTESTFONT.TEX;2
+RGRTI10.MF;3
+RGRUPPER.MF;1
+SCSC.MF;1
+TOMAKEFORMAT.TXT;2
+
+Total of 44 files.
diff --git a/Master/texmf-dist/doc/plain/yannisgr/monsyl.txt b/Master/texmf-dist/doc/plain/yannisgr/monsyl.txt
new file mode 100644
index 00000000000..b704a49ee7f
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/monsyl.txt
@@ -0,0 +1,456 @@
+%
+% This is part of the rgr-package, version 1.0
+%
+% LIST OF ONE-SYLLAB WORDS WHICH TAKE NO ACCENT
+% IN THE NEW ONE-ACCENT SYSTEM
+%
+% Source: Dictionnary of Mhqi'wthc (ref. 3 in the paper)
+%
+%
+% Exceptions are: >'h, p~wc, po~u, und mo~u, so~u, to~u etc
+% in case of misunderstanding:
+% for example o pat'erac mou e'ipe
+% can mean: my father said (<o pat'erac mou, e>~ipe)
+% or father said to me (<o pat'erac, mo~u e>~ipe).
+% In the first case it would be: o pat'erac mou e'ipe
+% and in the second one: o pat'erac mo'u e'ipe.
+% But if there is no possible misunderstanding, these words get no
+% accent.
+%
+%
+>~a
+>'a
+<'a
+>'ai
+>'ah
+<'alc
+>'alt
+>'an
+>'aq
+b'att
+b'aq
+b'hx
+b'olt
+bo~u
+bo~uc
+bg'ec
+br'ec
+bg~w
+bge~ic
+bge~i
+bgo~un
+br'e
+b~wx
+bi'oc
+br~w
+bre~ic
+bre~i
+bro~un
+bo~un
+g'a
+g'ar
+g~h
+g~hc
+g~hn
+gi'a
+gi'en
+gi'wt
+gk'el
+gk'i
+gk'olf
+gi'oc
+gio~u
+gi'o
+gio'i
+gi~wn
+gio'uc
+gkro'um
+gla~ux
+gra~uc
+gr'i
+gr~u
+gr'uy
+gk'ol
+g'in
+gi'angk
+gi'ok
+g'uy
+d'a
+da'ic
+d'ac
+d'e
+de~i
+de~in
+d'en
+d'ec
+d~w
+de~ic
+do~un
+d'h
+d'hx
+di'a
+d'ic
+d'on
+do'ux
+dr'ax
+du'o
+dr~w
+dr~ac
+dr~a
+dro~un
+dr~uc
+>'e
+>'ea
+e<~ic
+>'em
+<'en
+<'ex
+e>~u
+ze'uc
+ze~i
+ze~ic
+z~hn
+zo~un
+z~w
+z'en
+>~hn
+<'h
+<~hc
+<'hn
+j'a
+j'in
+j'ic
+jl~a
+jl~ac
+jlo~un
+jl~w
+j'ec
+jr'ix
+jr'iy
+jro~uc
+j'wc
+jei'oc
+jei'a
+jeio'i
+jeio'uc
+jei~wn
+jeio~u
+jei~ac
+jei'ec
+>'ic
+>'i
+ka'i
+k>'an
+k'ic
+k~in
+kl~a
+kl~ac
+klo~un
+kl~w
+k'itc
+k'atc
+kr'a
+kr'aq
+kr'hc
+kte'ic
+k'ur
+k'wk
+k~wc
+k~w
+kla~ic
+ka~ic
+ka~in
+kl'unn
+l'a
+l'ax
+l'iy
+l'ugx
+l'ec
+l'en
+l'ok
+m'a
+ma'itr
+m'arc
+m~ac
+m'at
+m'atc
+m'e
+mo'utc
+m'en
+m'h
+m'hn
+m'i
+m'ic
+mn~an
+mn~ac
+mn~a
+m'orc
+mi'a
+m'ec
+mp~a
+mp'a
+mp'ar
+mp'ac
+mp'iz
+mpl'e
+mpl'ok
+mo~u
+mp'ec
+mplo'um
+mplo'uz
+mp'ol
+mp'ox
+mpr'e
+mpr'ik
+mpr'itz
+mp'it
+mp'ip
+mpr'oc
+m~u
+m~uc
+m'wy
+mp'ak
+mpo'um
+mp'am
+n'a
+na'i
+na~u
+na~un
+na~uc
+n'h
+n'i
+ni'a
+nt'an
+n'ok
+nt'e
+nt'o
+nt'ok
+nt'on
+nto'uc
+n~u
+n~un
+n'ux
+n'ec
+nt'ip
+ntr'in
+nto~u
+ni'oc
+nio~u
+ni'o
+nio'i
+ni~wn
+nio'uc
+ni~ac
+ni'an
+ni'ec
+>'on
+<'oc
+o<~u
+<'on
+<'o
+o<'i
+o<'uc
+o<'u
+o>~uc
+o>'ust
+o>'uf
+o>'uq
+>'oq
+p'a
+pa~ic
+pa~i
+p~an
+p'an
+p~ac
+p'at
+p~w
+pe~ic
+pe~i
+po~un
+p'ec
+p'ik-n'ik
+pl'hn
+plo~uc
+plo~i
+plo~un
+plo~u
+p'i
+pi'ec
+pie~i
+pio~un
+pi~w
+pie~ic
+pn'ux
+po'u
+po'uc
+po'uf
+pr'in
+pr'o
+pro'ix
+pi'a
+pi'o
+pr'oc
+p'ux
+p~ur
+p'w
+p'wc
+poi'oc
+poi'a
+poi'o
+poio'i
+poio'uc
+poi~wn
+poio~u
+poi~ac
+poi'an
+poi'on
+poi'ec
+r'ax
+r'e
+r'ingk
+r'ic
+ro~uc
+ro~u
+ro~un
+r'wx
+r'wc
+r~w
+r'o
+r'ok
+re~i
+s'an
+s'a
+s'arx
+s~ac
+s'e
+s'ex
+s'er
+s'hc
+s'hy
+s'ef
+st'a
+st'o
+s'ik
+sk'i
+sk'wr
+sk'wy
+sn'omp
+s'ok
+s'oc
+so'ut
+so~u
+sto~u
+st'on
+sto'uc
+spl'hn
+sp'or
+sp~w
+sp~ac
+sp~an
+st'ar
+st'ul
+st'ux
+s'u
+st~hc
+st'hn
+st~wn
+st'h
+s'un
+s~uc
+s~un
+sf'hn
+sf'hx
+sf'igx
+st'op
+str'ac
+st'ok
+t'a
+ta~u
+t'akt
+t'an
+t~ac
+t'e
+t'est
+tz'in
+t'i
+ts'ok
+tz'im
+tz'wn
+t'ik
+t'ic
+t'o
+to~u
+t'on
+to'uc
+t~hc
+t'hn
+t~wn
+tr'ak
+t'h
+tz'ak
+tr'am
+tr'ast
+tre~ic
+tr'ic
+tr'ik
+tr'wc
+tr~wc
+tr~wn
+ts'ak
+t'ak
+t'ok
+ts'e
+ts'ek
+ts'if
+tso'u
+ts'a
+tso'uf
+ts'af
+tz'az
+t'ost
+tz'ast
+ts'ingk
+f'i
+f~ac
+f~an
+fe~u
+fl'ert
+fl'ey
+fl'it
+fl'ux
+f'wr
+f~wc
+f'wc
+f'ilm
+fl'ac
+f'ic
+f'on
+fto~u
+f'ast
+fo~unt
+q'a
+q'i
+q'e
+qo'u
+qe'ir
+q'hn
+qj'ec
+qt'ec
+qj'wn
+jo~uc
+jo~un
+jr'h
+jr'wc
+j'wl
+y'i
+y'ec
+y'hn
+y'it
+>'w
+>~w
+>'wm
+>'wn
+>'wq
+>'wy
+<'wc
+
diff --git a/Master/texmf-dist/doc/plain/yannisgr/rgr.readme b/Master/texmf-dist/doc/plain/yannisgr/rgr.readme
new file mode 100644
index 00000000000..f7a455b19aa
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/rgr.readme
@@ -0,0 +1,39 @@
+List of files:
+accent.mf, csc_misce.mf, digits.mf, gen_acc.mf, gen_m_acc.mf, grbase.mf,
+greek.mf, greekcsc.mf, it_digits.mf, it_lig.mf, it_lower.mf, lig.mf,
+ligcsc.mf, lower.mf, m_accent.mf, m_greek.mf, punct.mf, scsc.mf, upper.mf,
+
+rgrrg10.mf, rgrsl10.mf, rgrti10.mf, rgrbf10.mf, rgrsc10.mf, mrgrrg10.mf,
+mrgrsl10.mf, mrgrti10.mf, mrgrbf10.mf,
+
+greekmacros.tex, monsyl.txt, rgrhyph.tex, rgrpaper.tex, tomakeformat.txt,
+grtestfont.tex
+
+*************************************************************************
+ USERS'S GUIDE
+*************************************************************************
+
+Run all the fonts with \mag:=1; Run rgrrg10 also with \mag:=.9;. Make sure
+that the fonts cmssqi8 and mcyr10 are available. Same thing for tugbot.sty
+and tugbot.com (version 0.5 at least). Run rgrpaper.tex (this is a NEW version
+of "Y. Haralambous, K. Thull, Typesetting modern greek with 128 character
+codes, TUGboat 10 (1989) 354-359).
+
+Read it!
+
+If you want to make a greek format, remove "\input hyphen.tex" from plain.tex,
+and replace by he contents of tomakeformat.txt.
+
+If you want to make the PASCAL word processor mentionned in rgrpaper, you
+will find in monsyl.txt a list of monosyllabes.
+
+That's it. If you are a satisfied user you can send me a postcard for my
+collection (or perhaps some work you have done with this package), else send
+me your remarks and complaints. My address is
+
+ Yannis Haralambous
+ 101/11, rue Breughel
+ 59650 Villeneuve d'Ascq, France
+ Tel. (33) 20.05.28.80
+ email: (Bitnet) yannis@frcitl71
+ (after June, 1, 1990 yannis@frcitl81)
diff --git a/Master/texmf-dist/doc/plain/yannisgr/rgreekmacros.tex b/Master/texmf-dist/doc/plain/yannisgr/rgreekmacros.tex
new file mode 100644
index 00000000000..3aad8fd1ac0
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/rgreekmacros.tex
@@ -0,0 +1,159 @@
+\def\lt{<}
+\def\gt{>}
+\newcount\fontnumber
+\fontnumber=0
+\newif\ifoneaccent\oneaccenttrue
+\def\ifnextchar#1#2#3{\let\tempe #1\def\tempa{#2}\def\tempb{#3}\futurelet
+ \tempc\ifnch}
+\def\ifnch{\ifx\tempc\tempe\let\tempd\tempa\else\let\tempd\tempb\fi\tempd}
+\def\gobble#1{}
+\def\greekmode{%
+\catcode`\<=13%
+\catcode`\>=13%
+\catcode`\'=11%
+\catcode`\`=13%
+\catcode`\~=11%
+\catcode`\"=13%
+\lccode`\<=`\<%
+\lccode`\>=`\>%
+\lccode`\'=`\'%
+\lccode`\~=`\~%
+\lccode`\"=`\"%
+\def\rg{\fontnumber=1\tengr}%
+\def\sl{\fontnumber=2\tengrsl}%
+\def\it{\fontnumber=3\tengrit}%
+\def\bf{\fontnumber=4\tengrbf}%
+\def\smc{\fontnumber=5\tengrsmc}%
+\def\I##1{\setbox0\hbox{##1}\ifdim\ht0=1ex\accent'174 ##1%
+ \else{\ooalign{\hidewidth\char'174\hidewidth\crcr\unhbox0}}\fi}}%
+\newcount\vwl
+\newcount\acct
+{
+ \greekmode
+ \gdef>{\ifnextchar ~{\expandafter\smoothcircumflex\gobble}{\char\lq\>}}
+ \gdef<{\ifnextchar ~{\expandafter\roughcircumflex\gobble}{\char\lq\<}}
+ \gdef\smoothcircumflex#1{\acct=\rq134 \vwl=\lq#1 \dobreathingcircumflex}
+ \gdef\roughcircumflex#1{\acct=\rq100 \vwl=\lq#1 \dobreathingcircumflex}
+ \gdef\dobreathingcircumflex{\ifnum\vwl\lt\rq140 %if uppercase
+ \char\the\acct\kern -.2em\char\the\vwl\else
+ \doaccent\fi}
+ \gdef\doaccent{\accent\the\acct \char\the\vwl\relax}
+ \gdef"{\ifnextchar '{\expandafter\diaeresisacute\gobble}{\accent\lq\"}}
+ \gdef\diaeresisacute#1{\accent\rq043 #1}
+ \gdef`{'}
+}
+
+\newif\ifgreek\greekfalse
+
+\def\begingreek{\bgroup\font\tengr=rgrrg10\font\tengrsl=rgrsl10%
+\font\tengrbf=rgrbf10\font\tengrit=rgrti10\font\tengrsmc=rgrsc10%
+\greektrue\greekmode\rg}
+\def\beginmgreek{\bgroup\font\tengr=mrgrrg10\font\tengrsl=mrgrsl10%
+\font\tengrbf=mrgrbf10\font\tengrit=mrgrti10\font\tengrsmc=rgrsc10%
+\greektrue\greekmode\rg}
+\def\endgreek{\egroup}
+\def\endmgreek{\egroup}
+\def\monotoniko{%
+\font\tengr=mrgrrg10\font\tengrsl=mrgrsl10%
+\font\tengrbf=mrgrbf10\font\tengrit=mrgrti10%
+\ifnum\fontnumber=5\smc%
+ \else\ifnum\fontnumber=4\bf%
+ \else\ifnum\fontnumber=3\it%
+ \else\ifnum\fontnumber=2\sl%
+ \else\rg%
+ \fi%
+ \fi%
+ \fi%
+\fi%
+}
+\def\polutoniko{%
+\font\tengr=rgrrg10\font\tengrsl=rgrsl10%
+\font\tengrbf=rgrbf10\font\tengrit=rgrti10%
+\ifnum\fontnumber=5\smc%
+ \else\ifnum\fontnumber=4\bf%
+ \else\ifnum\fontnumber=3\it%
+ \else\ifnum\fontnumber=2\sl%
+ \else\rg%
+ \fi%
+ \fi%
+ \fi%
+\fi%
+}
+\let\math=$%
+{\catcode`\$=13%
+\gdef\greekdelims{\catcode`\$=13%
+\def${\ifgreek\endgreek\else\begingreek\fi}
+\def\display{\math\math}\def\enddisplay{\math\math}}}
+\def\grave#1{{\edef\next{\the\font}\smc\accent\rq001\next#1}}
+\def\roughgrave#1{{\edef\next{\the\font}\smc\accent\rq002\next#1}}
+\def\smoothgrave#1{{\edef\next{\the\font}\smc\accent\rq003\next#1}}
+\def\diaeresisgrave#1{{\edef\next{\the\font}\smc\accent\rq004\next#1}}
+\def\diaeresiscircumflex#1{{\edef\next{\the\font}\smc\accent\rq005\next#1}}
+\def\breve#1{{\edef\next{\the\font}\smc\accent\rq006\next#1}}
+\def\macron#1{{\edef\next{\the\font}\smc\accent\rq007\next#1}}
+\def\rhorough{{\tengrsmc
+\ifnum\fontnumber=5\char\rq162
+ \else\ifnum\fontnumber=4\char\rq016
+ \else\ifnum\fontnumber=3\char\rq014
+ \else\ifnum\fontnumber=2\char\rq012
+ \else\char\rq010
+ \fi
+ \fi
+ \fi
+\fi
+}}
+\def\rhosmooth{{\tengrsmc
+\ifnum\fontnumber=5\char\rq162
+ \else\ifnum\fontnumber=4\char\rq017
+ \else\ifnum\fontnumber=3\char\rq015
+ \else\ifnum\fontnumber=2\char\rq013
+ \else\char\rq011
+ \fi
+ \fi
+ \fi
+\fi
+}}
+\def\digamma{{\smc\char\rq135}}
+\def\smallDigamma{{\smc\char\rq140}}
+\def\Digamma{{\tengrsmc
+\ifnum\fontnumber=5\char\rq021
+ \else\ifnum\fontnumber=4\char\rq027
+ \else\ifnum\fontnumber=3\char\rq025
+ \else\ifnum\fontnumber=2\char\rq023
+ \else\char\rq021
+ \fi
+ \fi
+ \fi
+\fi
+}}
+\def\vardigamma{{\tengrsmc
+\ifnum\fontnumber=5\char\rq020
+ \else\ifnum\fontnumber=4\char\rq026
+ \else\ifnum\fontnumber=3\char\rq024
+ \else\ifnum\fontnumber=2\char\rq022
+ \else\char\rq020
+ \fi
+ \fi
+ \fi
+\fi
+}}
+\def\understroke{{\smc\char\rq046}}
+\def\overstroke{{\smc\char\rq044}}
+\def\sanpi{{\smc\char\rq136}}
+\def\Sanpi{{\smc\char\rq137}}
+\def\qoppa{{\smc\char\rq133}}
+\def\varqoppa{{\smc\char\rq134}}
+\def\Qoppa{{\smc\char\rq103}}
+\def\Tao{{\smc\char\rq177}}
+\def\ssh{\breve{s}}\def\SSH{\breve{S}}
+\def\dz{\breve{z}}\def\DZ{\breve{Z}}
+\def\psh{\breve{y}}\def\PSH{\breve{Y}}
+\def\ksh{\breve{x}}\def\KSH{\breve{X}}
+\def\inviota{{\smc\char\rq126}}
+\def\grMF{{\smc\char\rq030\char\rq031\char\rq032\char\rq033}\-{\smc%
+\char\rq034\char\rq036\char\rq037\char\rq032}}
+\def\MF{{\smc\char\rq030\char\rq031\char\rq032\char\rq033}\-{\smc%
+\char\rq040\char\rq036\char\rq037\char\rq032}}
+
+\endinput
+
diff --git a/Master/texmf-dist/doc/plain/yannisgr/rgrhyph.tex b/Master/texmf-dist/doc/plain/yannisgr/rgrhyph.tex
new file mode 100644
index 00000000000..5ae489b008c
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/rgrhyph.tex
@@ -0,0 +1,1179 @@
+%
+% This is part of the rgr-package version 1.1
+% as of March 2, 1990 Lille (France)
+%
+% Hyphenation patterns for modern greek language
+% **********************************************
+%
+\patterns{%
+.>a4
+.>'a4
+.>~a4
+.<a4
+.<'a4
+.<~a4
+.'a4
+.>e4
+.>'e4
+.>~e4
+.<e4
+.<'e4
+.<~e4
+.'e4
+.>h4
+.>'h4
+.>~h4
+.<h4
+.<'h4
+.<~h4
+.'h4
+.>i4
+.>'i4
+.>~i4
+.<i4
+.<'i4
+.<~i4
+.'i4
+.>o4
+.>'o4
+.>~o4
+.<o4
+.<'o4
+.<~o4
+.'o4
+.<u4
+.<'u4
+.<~u4
+.'u4
+.>w4
+.>'w4
+.>~w4
+.<w4
+.<'w4
+.<~w4
+.'w4
+a1
+a2i
+a2'i
+a2~i
+a2>i
+a2>'i
+a2>~i
+a2<i
+a2<'i
+a2<~i
+'a3i
+a3"
+a2u
+a2'u
+a2~u
+a2>u
+a2>'u
+a2>~u
+a2<u
+a2<'u
+a2<~u
+'a3u
+e1
+e2i
+e2'i
+e2~i
+e2>i
+e2>'i
+e2>~i
+e2<i
+e2<'i
+e2<~i
+'e3i
+e3"
+e2u
+e2'u
+e2~u
+e2>u
+e2>'u
+e2>~u
+e2<u
+e2<'u
+e2<~u
+'e3u
+h1
+h2u
+h2'u
+h2~u
+h2>u
+h2>'u
+h2>~u
+h2<u
+h2<'u
+h2<~u
+'h3u
+h3"
+i1
+i2a
+i2'a
+i2~a
+'i3a
+~i3a
+u2'a
+i2e
+i2'e
+'i3e
+~i3e
+u2'e
+i2o
+i2'o
+'i3o
+~i3o
+u2'o
+i2w
+i2'w
+i2~w
+'i3w
+~i3w
+u2'w
+'4'
+''4'
+''4>
+''4<
+'''a4
+''>a'4
+''<a'4
+''>~a4
+''<~a4
+'''e4
+'''>e'4
+'''<e'4
+'''h4
+''>h'4
+''<h'4
+''>~h4
+''<~h4
+'''i4
+''>i'4
+''<i'4
+''>~i4
+''<~i4
+'''o4
+''>o'4
+''<o'4
+'''u4
+''>u'4
+''<u'4
+''>~u4
+''<~u4
+'''w4
+''>w'4
+''<w'4
+''>~w4
+''<~w4
+o1
+o2i
+o2'i
+o2~i
+o2>i
+o2>'i
+o2>~i
+o2<i
+o2<'i
+o2<~i
+'o3i
+o3"
+o2u
+o2'u
+o2~u
+o2>u
+o2>'u
+o2>~u
+o2<u
+o2<'u
+o2<~u
+'o3u
+u1
+u2i
+u2'i
+u2~i
+u2>i
+u2>'i
+u2>~i
+u2<i
+u2<'i
+u2<~i
+u3"
+w1
+~a3i
+~a3u
+~h3u
+a1b
+a1g
+a1d
+a1z
+a1j
+a1k
+a1l
+a1m
+a1n
+a1x
+a1p
+a1r
+a1s
+a1t
+a1f
+a1q
+a1y
+e1b
+e1g
+e1d
+e1z
+e1j
+e1k
+e1l
+e1m
+e1n
+e1x
+e1p
+e1r
+e1s
+e1t
+e1f
+e1q
+e1y
+h1b
+h1g
+h1d
+h1z
+h1j
+h1k
+h1l
+h1m
+h1n
+h1x
+h1p
+h1r
+h1s
+h1t
+h1f
+h1q
+h1y
+i1b
+i1g
+i1d
+i1z
+i1j
+i1k
+i1l
+i1m
+i1n
+i1x
+i1p
+i1r
+i1s
+i1t
+i1f
+i1q
+i1y
+o1b
+o1g
+o1d
+o1z
+o1j
+o1k
+o1l
+o1m
+o1n
+o1x
+o1p
+o1r
+o1s
+o1t
+o1f
+o1q
+o1y
+u1b
+u1g
+u1d
+u1z
+u1j
+u1k
+u1l
+u1m
+u1n
+u1x
+u1p
+u1r
+u1s
+u1t
+u1f
+u1q
+u1y
+w1b
+w1g
+w1d
+w1z
+w1j
+w1k
+w1l
+w1m
+w1n
+w1x
+w1p
+w1r
+w1s
+w1t
+w1f
+w1q
+w1y
+2b1b
+2b1z
+2b1j
+2b1k
+2b1m
+2b1n
+2b1x
+2b1s
+2b1t
+2b1f
+2b1q
+2b1y
+2g1b
+2g1g
+2g1z
+2g1j
+2g1m
+2g1x
+2g1s
+2g1t
+2g1f
+2g1q
+2g1y
+2d1b
+2d1g
+2d1d
+2d1z
+2d1j
+2d1k
+2d1l
+2d1m
+2d1n
+2d1x
+2d1p
+2d1s
+2d1t
+2d1f
+2d1q
+2d1y
+2z1b
+2z1g
+2z1d
+2z1z
+2z1j
+2z1k
+2z1l
+2z1m
+2z1n
+2z1x
+2z1p
+2z1r
+2z1s
+2z1t
+2z1f
+2z1q
+2z1y
+2j1b
+2j1g
+2j1d
+2j1z
+2j1j
+2j1k
+2j1m
+2j1n
+2j1x
+2j1p
+2j1s
+2j1t
+2j1f
+2j1q
+2j1y
+2k1b
+2k1g
+2k1d
+2k1z
+2k1j
+2k1k
+2k1m
+2k1n
+2k1x
+2k1p
+2k1s
+2k1f
+2k1q
+2k1y
+2l1b
+2l1g
+2l1d
+2l1z
+2l1j
+2l1k
+2l1l
+2l1m
+2l1n
+2l1x
+2l1p
+2l1r
+2l1s
+2l1t
+2l1f
+2l1q
+2l1y
+2m1b
+2m1g
+2m1d
+2m1z
+2m1j
+2m1k
+2m1l
+2m1m
+2m1x
+2m1r
+2m1s
+2m1t
+2m1f
+2m1q
+2m1y
+2n1b
+2n1g
+2n1d
+2n1z
+2n1j
+2n1k
+2n1l
+2n1m
+2n1n
+2n1x
+2n1p
+2n1r
+2n1s
+2n1f
+2n1q
+2n1y
+2x1b
+2x1g
+2x1d
+2x1z
+2x1j
+2x1k
+2x1l
+2x1m
+2x1n
+2x1x
+2x1p
+2x1r
+2x1s
+2x1t
+2x1f
+2x1q
+2x1y
+2p1b
+2p1g
+2p1d
+2p1z
+2p1j
+2p1k
+2p1m
+2p1x
+2p1p
+2p1s
+2p1f
+2p1q
+2p1y
+2r1b
+2r1g
+2r1d
+2r1z
+2r1j
+2r1k
+2r1l
+2r1m
+2r1n
+2r1x
+2r1p
+2r1r
+2r1s
+2r1t
+2r1f
+2r1q
+2r1y
+2s1b
+2s1d
+2s1z
+sj2m
+2s1l
+2s1n
+2s1x
+2s1r
+2s1s
+2s1y
+2t1b
+2t1g
+2t1d
+2t1z
+2t1j
+2t1k
+2t1l
+2t1m
+2t1n
+2t1x
+2t1p
+2t1t
+2t1f
+2t1q
+2t1y
+2f1b
+2f1g
+2f1d
+2f1z
+2f1k
+2f1m
+2f1n
+2f1x
+2f1p
+2f1s
+2f1f
+2f1y
+2q1b
+2q1g
+2q1d
+2q1z
+2q1j
+2q1k
+2q1m
+2q1n
+2q1x
+2q1p
+2q1s
+2q1f
+2q1q
+2q1y
+2y1b
+2y1g
+2y1d
+2y1z
+2y1j
+2y1k
+2y1l
+2y1m
+2y1n
+2y1x
+2y1p
+2y1r
+2y1s
+2y1t
+2y1f
+2y1q
+2y1y
+a1"'i
+e1"'i
+o1"'i
+a1"'u
+e1"'u
+o1"'u
+h1"'u
+a1"~1
+e1"~i
+o1"~i
+a1"~u
+e1"~u
+o1"~u
+h1"~u
+4'a.
+4~a.
+4'e.
+4~e.
+4'h.
+4~h.
+4'i.
+4~i.
+4'u.
+4~u.
+4'o.
+4~o.
+4'w.
+4~w.
+4'aa.
+4'ab.
+4'ag.
+4'ad.
+4'ae.
+4'az.
+4'ah.
+4'aj.
+4'ai.
+4'ak.
+4'al.
+4'am.
+4'an.
+4'ax.
+4'ao.
+4'ap.
+4'ar.
+4'ac.
+4'at.
+4'au.
+4'af.
+4'aq.
+4'ay.
+4'aw.
+4'ea.
+4'eb.
+4'eg.
+4'ed.
+4'ee.
+4'ez.
+4'eh.
+4'ej.
+4'ei.
+4'ek.
+4'el.
+4'em.
+4'en.
+4'ex.
+4'eo.
+4'ep.
+4'er.
+4'ec.
+4'et.
+4'eu.
+4'ef.
+4'eq.
+4'ey.
+4'ew.
+4'ha.
+4'hb.
+4'hg.
+4'hd.
+4'he.
+4'hz.
+4'hh.
+4'hj.
+4'hi.
+4'hk.
+4'hl.
+4'hm.
+4'hn.
+4'hx.
+4'ho.
+4'hp.
+4'hr.
+4'hc.
+4'ht.
+4'hu.
+4'hf.
+4'hq.
+4'hy.
+4'hw.
+4'ia.
+4'ib.
+4'ig.
+4'id.
+4'ie.
+4'iz.
+4'ih.
+4'ij.
+4'ii.
+4'ik.
+4'il.
+4'im.
+4'in.
+4'ix.
+4'io.
+4'ip.
+4'ir.
+4'ic.
+4'it.
+4'iu.
+4'if.
+4'iq.
+4'iy.
+4'iw.
+4'oa.
+4'ob.
+4'og.
+4'od.
+4'oe.
+4'oz.
+4'oh.
+4'oj.
+4'oi.
+4'ok.
+4'ol.
+4'om.
+4'on.
+4'ox.
+4'oo.
+4'op.
+4'or.
+4'oc.
+4'ot.
+4'ou.
+4'of.
+4'oq.
+4'oy.
+4'ow.
+4'ua.
+4'ub.
+4'ug.
+4'ud.
+4'ue.
+4'uz.
+4'uh.
+4'uj.
+4'ui.
+4'uk.
+4'ul.
+4'um.
+4'un.
+4'ux.
+4'uo.
+4'up.
+4'ur.
+4'uc.
+4'ut.
+4'uu.
+4'uf.
+4'uq.
+4'uy.
+4'uw.
+4'wa.
+4'wb.
+4'wg.
+4'wd.
+4'we.
+4'wz.
+4'wh.
+4'wj.
+4'wi.
+4'wk.
+4'wl.
+4'wm.
+4'wn.
+4'wx.
+4'wo.
+4'wp.
+4'wr.
+4'wc.
+4'wt.
+4'wu.
+4'wf.
+4'wq.
+4'wy.
+4'ww.
+4~aa.
+4~ab.
+4~ag.
+4~ad.
+4~ae.
+4~az.
+4~ah.
+4~aj.
+4~ai.
+4~ak.
+4~al.
+4~am.
+4~an.
+4~ax.
+4~ao.
+4~ap.
+4~ar.
+4~ac.
+4~at.
+4~au.
+4~af.
+4~aq.
+4~ay.
+4~aw.
+4~ha.
+4~hb.
+4~hg.
+4~hd.
+4~he.
+4~hz.
+4~hh.
+4~hj.
+4~hi.
+4~hk.
+4~hl.
+4~hm.
+4~hn.
+4~hx.
+4~ho.
+4~hp.
+4~hr.
+4~hc.
+4~ht.
+4~hu.
+4~hf.
+4~hq.
+4~hy.
+4~hw.
+4~ia.
+4~ib.
+4~ig.
+4~id.
+4~ie.
+4~iz.
+4~ih.
+4~ij.
+4~ii.
+4~ik.
+4~il.
+4~im.
+4~in.
+4~ix.
+4~io.
+4~ip.
+4~ir.
+4~ic.
+4~it.
+4~iu.
+4~if.
+4~iq.
+4~iy.
+4~iw.
+4~ua.
+4~ub.
+4~ug.
+4~ud.
+4~ue.
+4~uz.
+4~uh.
+4~uj.
+4~ui.
+4~uk.
+4~ul.
+4~um.
+4~un.
+4~ux.
+4~uo.
+4~up.
+4~ur.
+4~uc.
+4~ut.
+4~uu.
+4~uf.
+4~uq.
+4~uy.
+4~uw.
+4~wa.
+4~wb.
+4~wg.
+4~wd.
+4~we.
+4~wz.
+4~wh.
+4~wj.
+4~wi.
+4~wk.
+4~wl.
+4~wm.
+4~wn.
+4~wx.
+4~wo.
+4~wp.
+4~wr.
+4~wc.
+4~wt.
+4~wu.
+4~wf.
+4~wq.
+4~wy.
+4~ww.
+4a'a.
+4b'a.
+4g'a.
+4d'a.
+4e'a.
+4z'a.
+4h'a.
+4j'a.
+4i'a.
+4k'a.
+4l'a.
+4m'a.
+4n'a.
+4x'a.
+4o'a.
+4p'a.
+4r'a.
+4s'a.
+4t'a.
+4u'a.
+4f'a.
+4q'a.
+4y'a.
+4w'a.
+4a'e.
+4b'e.
+4g'e.
+4d'e.
+4e'e.
+4z'e.
+4h'e.
+4j'e.
+4i'e.
+4k'e.
+4l'e.
+4m'e.
+4n'e.
+4x'e.
+4o'e.
+4p'e.
+4r'e.
+4s'e.
+4t'e.
+4u'e.
+4f'e.
+4q'e.
+4y'e.
+4w'e.
+4a'h.
+4b'h.
+4g'h.
+4d'h.
+4e'h.
+4z'h.
+4h'h.
+4j'h.
+4i'h.
+4k'h.
+4l'h.
+4m'h.
+4n'h.
+4x'h.
+4o'h.
+4p'h.
+4r'h.
+4s'h.
+4t'h.
+4u'h.
+4f'h.
+4q'h.
+4y'h.
+4w'h.
+4a'i.
+4b'i.
+4g'i.
+4d'i.
+4e'i.
+4z'i.
+4h'i.
+4j'i.
+4i'i.
+4k'i.
+4l'i.
+4m'i.
+4n'i.
+4x'i.
+4o'i.
+4p'i.
+4r'i.
+4s'i.
+4t'i.
+4u'i.
+4f'i.
+4q'i.
+4y'i.
+4w'i.
+4a'o.
+4b'o.
+4g'o.
+4d'o.
+4e'o.
+4z'o.
+4h'o.
+4j'o.
+4i'o.
+4k'o.
+4l'o.
+4m'o.
+4n'o.
+4x'o.
+4o'o.
+4p'o.
+4r'o.
+4s'o.
+4t'o.
+4u'o.
+4f'o.
+4q'o.
+4y'o.
+4w'o.
+4a'u.
+4b'u.
+4g'u.
+4d'u.
+4e'u.
+4z'u.
+4h'u.
+4j'u.
+4i'u.
+4k'u.
+4l'u.
+4m'u.
+4n'u.
+4x'u.
+4o'u.
+4p'u.
+4r'u.
+4s'u.
+4t'u.
+4u'u.
+4f'u.
+4q'u.
+4y'u.
+4w'u.
+4a'w.
+4b'w.
+4g'w.
+4d'w.
+4e'w.
+4z'w.
+4h'w.
+4j'w.
+4i'w.
+4k'w.
+4l'w.
+4m'w.
+4n'w.
+4x'w.
+4o'w.
+4p'w.
+4r'w.
+4s'w.
+4t'w.
+4u'w.
+4f'w.
+4q'w.
+4y'w.
+4w'w.
+4a~a.
+4b~a.
+4g~a.
+4d~a.
+4e~a.
+4z~a.
+4h~a.
+4j~a.
+4i~a.
+4k~a.
+4l~a.
+4m~a.
+4n~a.
+4x~a.
+4o~a.
+4p~a.
+4r~a.
+4s~a.
+4t~a.
+4u~a.
+4f~a.
+4q~a.
+4y~a.
+4w~a.
+4a~h.
+4b~h.
+4g~h.
+4d~h.
+4e~h.
+4z~h.
+4h~h.
+4j~h.
+4i~h.
+4k~h.
+4l~h.
+4m~h.
+4n~h.
+4x~h.
+4o~h.
+4p~h.
+4r~h.
+4s~h.
+4t~h.
+4u~h.
+4f~h.
+4q~h.
+4y~h.
+4w~h.
+4a~i.
+4b~i.
+4g~i.
+4d~i.
+4e~i.
+4z~i.
+4h~i.
+4j~i.
+4i~i.
+4k~i.
+4l~i.
+4m~i.
+4n~i.
+4x~i.
+4o~i.
+4p~i.
+4r~i.
+4s~i.
+4t~i.
+4u~i.
+4f~i.
+4q~i.
+4y~i.
+4w~i.
+4a~u.
+4b~u.
+4g~u.
+4d~u.
+4e~u.
+4z~u.
+4h~u.
+4j~u.
+4i~u.
+4k~u.
+4l~u.
+4m~u.
+4n~u.
+4x~u.
+4o~u.
+4p~u.
+4r~u.
+4s~u.
+4t~u.
+4u~u.
+4f~u.
+4q~u.
+4y~u.
+4w~u.
+4a~w.
+4b~w.
+4g~w.
+4d~w.
+4e~w.
+4z~w.
+4h~w.
+4j~w.
+4i~w.
+4k~w.
+4l~w.
+4m~w.
+4n~w.
+4x~w.
+4o~w.
+4p~w.
+4r~w.
+4s~w.
+4t~w.
+4u~w.
+4f~w.
+4q~w.
+4y~w.
+4w~w.
+}
+\endinput
+
diff --git a/Master/texmf-dist/doc/plain/yannisgr/rgrpaper.tex b/Master/texmf-dist/doc/plain/yannisgr/rgrpaper.tex
new file mode 100644
index 00000000000..98aa8cd94e5
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/rgrpaper.tex
@@ -0,0 +1,763 @@
+%
+% ************ tb26haralambous.tex
+\input tugboat.sty
+
+%\input mssymb
+\font\cyr=mcyr10
+%\input cyracc.def
+
+\input rgreekmacros
+\newcount\m \newcount\n \newcount\p \newdimen\dim
+\chardef\other=12
+\def\oct#1{\hbox{\tenrm\'{}\kern-.2em\tenit#1\/\kern.05em}} % octal constant
+\def\hex#1{\hbox{\tenrm\H{}\tentt#1}} % hexadecimal constant
+\def\setdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
+ \m=\n \divide\m by 64 \xdef\0{\the\m}%
+ \multiply\m by-64 \advance\m by\n \divide\m by 8 \xdef\1{\the\m}}
+\def\testrow{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
+ \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
+ \global\p=\lastpenalty}} % \p=1 if none of the characters exist
+\def\oddline{\cr
+ \noalign{\nointerlineskip}
+ \multispan{19}\hrulefill&
+ \setbox0=\hbox{\lower 2.3pt\hbox{\hex{\h x}}}\smash{\box0}\cr
+ \noalign{\nointerlineskip}}
+\newif\ifskipping
+\def\evenline{\loop\skippingfalse
+ \ifnum\n<128 \m=\n \divide\m 16 \chardef\next=\m
+ \expandafter\setdigs\meaning\next \testrow
+ \ifnum\p=1 \skippingtrue \fi\fi
+ \ifskipping \global\advance\n 16 \repeat
+ \ifnum\n=128 \let\next=\endchart\else\let\next=\morechart\fi
+ \next}
+\def\morechart{\cr\noalign{\hrule}
+ \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
+ \chartline \evenline}
+\def\chartline{&\oct{\0\1x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&}
+\def\chartstrut{\lower4.5pt\vbox to14pt{}}
+\def\table{$$\global\n=0
+ \halign to\hsize\bgroup
+ \chartstrut##\tabskip0pt plus10pt&
+ &\hfil##\hfil&\vrule##\cr
+ \lower6.5pt\null
+ &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
+\def\endchart{\cr\noalign{\hrule}
+ \raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
+ &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$\par}
+\def\:{\setbox0=\hbox{\char\n}%
+ \ifdim\ht0>7.5pt\reposition
+ \else\ifdim\dp0>2.5pt\reposition\fi\fi
+ \box0\global\advance\n 1 }
+\def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
+ \advance\dim 2pt \dp0=\dim}
+\def\centerlargechars{
+ \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
+\greekdelims
+\font\ninergr=rgrrg10 scaled 900
+
+\TBremark{Pick up fonts for Imagen. Make fonts for APS}
+
+\def\blash{\math\backslash\math}
+\let\bs=\blash
+\def\begineight{\smallskip\bgroup\eightpoint}
+\def\endeight{\par\egroup\smallskip}
+%\font\smallrg=rgrrg8 % commented out by rw
+\def\QED.{\math\square\mah}
+\def\O#1{\hbox{\rm\char'23\kern-.2em\it#1\/\kern.05em}} % octal constant
+\def\refersto#1{\math{}^#1\math}
+\def\referred#1{\par\hang\noindent#1.} % overwritten below
+\newdimen\thehangindent
+\setbox0=\hbox{0. }
+\thehangindent=\wd0
+\def\referred#1{\par\hangindent\thehangindent\noindent
+ \hbox to \thehangindent{\hss#1.\ }\ignorespaces}
+
+\def\infoot{\baselineskip9.4pt\eightrm}
+\def\@{@}
+%\def\.#1{{\def\\{\backslash}\tentex#1}} % commented out by rfw
+\font\qq=cmssqi8
+\def\mottoline#1{{\rightline{\qq #1}}}
+\def\htb{\hskip2pt\relax}
+\def\frak{\fam\euffam}
+%\def\cyr{\cyracc\tencyr}
+
+% ***********************************************************************
+
+\title * Typesetting Modern Greek with\\ 128 Character Codes \\ version 1.1*
+
+\author * Yannis Haralambous *
+\address * U.F.R. de Math\'ematiques\\
+ Universit\'e de Lille--Flandres--Artois\\
+ 59655 Villeneuve d'Ascq Cedex, France *
+\netaddress[\network{Bitnet}] * yannis@frcitl81 *
+
+\author * Klaus Thull *
+\address * Freie Universit\"at Berlin *
+\netaddress[\network{Usenet}] * thull@fubinf.uucp *
+\TBremark{Check Thull's network address; gateway didn't like "unido".}
+\TBremark{this one generally works--kt}
+
+\article
+
+{\baselineskip11.3pt
+\mottoline{``Ved dette v\ae ret,}
+\mottoline{n\aa r det regner}
+\mottoline{s\aa\ sn\o r det''}
+\smallskip
+\mottoline{--- Fr\o ydis Frosk}
+}
+
+\vskip8pt\noindent
+In european scripts where diacritical marks are common,
+there are (at least) two reasons to avoid \TeX's accent mechanism
+in favor of many accented characters.
+
+One is the possible misplacement of accents by |dvitype|'s rounding
+algorithm;\TBremark{dvitype or a driver?}
+\TBremark{really dvitype--kt}
+the second is lack or invalidity of hyphenation. For
+example, large portions of german text may be unhyphenatable, and,
+given the german inclination to long words, may not be in shape to be
+typeset at all. Thus, in Europe, the obvious thing to do is: let
+$\MF$\ put the accents onto the letters, then access these characters
+via \TeX's ligature mechanism.
+
+Accordingly, the greek fonts created by Silvio Levy\refersto1 have
+256 characters each, and are a fine tool to typeset greek texts,
+ancient as well as modern, except those containing the most recent
+unique accent ``$\monotoniko '{}$'' (see below). But alas, there is
+the commercial world, whose device drivers just cannot do 256-code
+fonts (even |.pxl|-fonts were seen on the ``Big-Tech'' sales
+exhibition in West Berlin last winter). The free drivers are in
+better shape generally, but often the commercial ones cannot be
+disposed of in a hurry. So we decided to reduce these fonts to 128
+characters. We kept only the ones strictly necessary for writing
+modern greek without misusing the |\accent| primitive. At the same
+time, we constructed some new fonts, which we describe below.
+
+\head * The Reduced Greek Fonts *
+
+In modern post-war greek, the use of the grave accent ``$\grave{}$''
+($bare'ia$) progressively faded, so that only two accents and the
+breathings were left (this was the kind of greek the first author
+learned at school). So the first reduction we did on Levy's fonts was
+to omit all grave accents. Secondly, we made $s$ a free character
+again, so that in the transliteration one has to type |s| for $s$,
+and |c| for $c$. Thirdly, we omitted the iota subscribed letters.
+All these, however, can still be accessed by macros if so wished.
+
+Let's recall now the procedure, most of which is due to Levy: to
+typeset greek, you get into ``Greek mode'' by typing |\begingreek|.
+Similarly, you get out by typing |\endgreek|, but if you have to do
+this often, it is better to type |\greekdelims| at the beginning of
+your file. In that case |$| is used to enter and leave greekmode, and
+|\math| takes the former meaning of |$| (do not forget to type
+``{\tt\bs\SP}''). The transliteration code is the following:
+\display
+\tabskip1.1pt
+\hbox{\valign
+{\hbox to
+8pt{\null\hfil\strut$#$\hfil}&\hbox to 8pt{\null\hfil\strut\tt#\hfil}\cr
+a&a\cr b&b\cr g&g\cr d&d\cr e&e\cr z&z\cr h&h\cr j&j\cr
+i&i\cr k&k\cr l&l\cr m&m\cr n&n\cr x&x\cr o&o\cr p&p\cr
+r&r\cr s&s\cr c&c\cr t&t\cr u&u\cr f&f\cr q&q\cr y&y\cr w&w\cr}}
+\enddisplay
+To get an acute ($>oxe'ia$), or circumflex ($perispwm'enh$) accent you
+type |'|~(single quote), or |~|~(tilde) resp.\ in front of the vowel.
+To get a rough ($dase'ia$) or smooth ($yil'h$) breathing you type |<|
+or |>|, resp., in front of the vowel or the accent, if there is one.
+A diaeresis ($dialutik'a$) is represented by |"|~(double quote), and
+for a diaeresis with acute accent, just type |"'|~(double quote,
+single quote). To get a vowel with a iota subscript
+($<upogegramm'enh$) you have to use the macro |\I{...}|.
+
+If you need one of the omitted accents or combination of accents,
+you can get it by a macro:
+for example
+\list[\unitemized]
+$\grave{e}$ by |\grave{e}|,
+$\breve{a}$ by |\breve{a}|,
+$\macron{h}$ by |\macron{h}|,
+$\roughgrave{i}$ by |\roughgrave{i}|,
+$\smoothgrave{o}$ by |\smoothgrave{o}|,
+$\diaeresisgrave{w}$ by |\diaeresisgrave{w}|,
+$\diaeresiscircumflex{u}$ by |\diaeresiscircumflex{u}|,
+$\rhorough$ by |\rhorough|, and
+$\rhosmooth$ by |\rhosmooth|.
+\endlist
+
+Finally, you have access to the following punctuation marks:
+\display
+\hbox{\tabskip1.5pt
+\valign
+{\hbox to 15pt{\hfil\strut$#$\hfil}&\hbox to 15pt{\hfil\strut\tt#\hfil}\cr
+.&.\cr ,&,\cr ;&;\cr :&:\cr !&!\cr ?&?\cr ''&''\cr ((&((\cr
+))&))\cr
+}}
+\enddisplay
+as well as the ten digits, parentheses, hyphen, en-dash, slash,
+percent sign, asterisk, plus and equal signs.
+
+\head * Some New Fonts *
+
+To write mathematics in greek one also needs slanted letters (for
+statements of theorems, according to |amsppt| style) and small
+capital letters (for titles and references). We have constructed
+these fonts, in the same reduced way, so that, together with the
+reduced Levy fonts, we obtain a complete family of greek fonts,
+namely regular, boldface, slanted, and small caps. We have called
+these fonts |rgrrg|, |rgrbf|, |rgrsl|, |rgrsc|. Inside of greek mode
+you just write |\bf|, |\sl|, |\smc| as usual and |\rg| (instead of
+|\rm|) to get the regular gree font.
+
+Here is an example of an alleged mathematical text, complete with
+translation:
+$
+\proclaim \smc {1.1.4.} Jewrhma.
+Gi'a k'aje jetik'o >ak'eraio
+\math n\math,
+<up'arqei m'ia tri'ada m'h mhdenik~wn >akera'iwn \math(x,y,z)\math, t'etoia
+<~wste\math\math x^n+y^n=z^n.\math\math
+
+\noindent{\smc Apodeixh tou 1.1.4.} Gi'a \math n=2\math, ft'anei n'a p'aroume
+\math x=3,y=4,z=5\math. Gi'a \math n\gt 2\math,
+>af'hnoume t'hn >ap'odeixh st'on >anagn'wsth s'an >'askhsh.
+{\bf <'o.>'e.d.}
+$
+
+\proclaim \smc {1.1.4.} Theorem.
+For each positive integer \math n\math,
+there exists a triple of non-zero integers \math (x,y,z)\math\ such that
+\math\math x^n+y^n=z^n.\math\math
+
+\noindent{\smc Proof of 1.1.4.} For \math n=2\math, we find
+\math x=3,y=4,z=5\math. For \math n\gt 2\math, the proof
+left to the reader as an exercise. {\bf q.e.d.}
+
+\head * Fonts for one-accent greek *
+
+Some years after the re-establishment of democracy in Greece in 1974,
+a new system of accentuation has been introduced, omitting completely
+breathings and subscript iota, and simplifying the two remaining
+accents into one ``universal accent,'' $\monotoniko ' \polutoniko
+(tonik'o shme~io).$ This system is currently taught at school and it
+seems that any official document (including written examinations in
+some high schools) written in the old fashion multi-accent system is
+considered invalid (!).
+
+So we thought that perhaps people would like to write in the old
+system and have a font to print the same text in fully official
+one-accent greek. We created fonts analogous to the reduced regular,
+boldface, and slanted which we have denoted by the prefix ``|m|''
+(for $monotonik'o$): |mrgrrg|, |mrgrbf|, |mrgrsl|. Note that the
+small capitals font |rgrsc| doesn't have any accents at all, and so
+may be used in any accent system.
+
+These new fonts are designed to work with the same input as the old
+accent system. The printed text will follow the current
+grammar\refersto2 (at least concerning the accent), with one
+exception: monosyllables (like articles, prepositions and other
+auxiliary words) don't take any accent at all. To solve this problem
+we are working at a Pascal word processor program, based on Fred
+M.~Liang's packed trie device, which will, once given the list of the
+accented monosyllables, recognize them, and replace them by
+non-accented words. According to the dictionary of
+H.~Mihiotis\refersto3, there are 284 such words, to which we ust
+add many new and foreign words.
+
+Of course, you can write your text in one-accent greek right away
+(unfortunately there is no ``magic'' macro to transform it back into
+multi-accent greek~\dots). With these new fonts you will get a nice
+symmetric ``universal'' accent instead of an acute or a circumflex.
+
+To write in one-accent greek you get into ``Greek one-accent mode'',
+by typing |\beginmgreek|. If you are in greek multi-accent mode
+already, you must use the macro |\monotoniko|. There is also the
+converse macro |\polutoniko|. So if you want to obtain
+\display\vbox{$
+\centerline{\monotoniko O Hr'akleitoc 'elege \polutoniko
+((t\grave{a} p'anta \rhorough e~i))}
+\centerline{\monotoniko kai e'iqe d'ikio! \dots}
+$}\enddisplay
+you type
+\verbatim
+\beginmgreek O Hr'akleitoc 'elege
+\polutoniko
+ ((t\grave{a} p'anta \rhorough e~i))
+\monotoniko
+ kai e'iqe d'ikio!...\endgreek
+\endverbatim
+
+\head * The Greek Numeral Symbols *
+
+The so-called Ionian\refersto4 system of numeration (\math{\sim}\math
+fifth century {\smc bc}) consisted of the following numerals:
+\display
+\hbox{\valign
+{\hbox to 15pt{\hfil\strut$#$\hfil}&\hbox to 15pt{\hfil\strut\rm#\hfil}\cr
+A&1\cr B&2\cr G&3\cr D&4\cr E&5\cr {\Digamma}&6\cr Z&7\cr H&8\cr J&9\cr}}
+\enddisplay
+\display
+\hbox{\valign
+{\hbox to 15pt{\hfil\strut$#$\hfil}&\hbox to 15pt{\hfil\strut\rm#\hfil}\cr
+I&{10}\cr K&{20}\cr L&{30}\cr M&{40}\cr N&{50}\cr X&{60}\cr
+O&{70}\cr P&{80}\cr {\Qoppa}&{90}\cr}}
+\enddisplay
+\display
+\hbox{\valign
+{\hbox to 20pt{\hfil\strut$#$\hfil}&\hbox to 20pt{\hfil\strut\rm#\hfil}\cr
+R&{100}\cr S&{200}\cr T&{300}\cr U&{400}\cr F&{500}\cr Q&{600}\cr Y&{700}\cr
+W&{800}\cr {\Sanpi}&{900}\cr}}
+\enddisplay
+
+The letters $\Digamma, \Qoppa, \Sanpi$ are called digamma, qoppa,
+sanpi. They belong to an older alphabet. Later on, as lowercase
+letters were introduced and as the need for higher numbers grew, the
+numerals became:
+\display
+\hbox{\tabskip1pt
+\valign
+{\hbox to 15pt{\hfil\strut$#\overstroke$\hfil}&
+ \hbox to 15pt{\hfil\strut\rm#\hfil}\cr
+a&1\cr b&2\cr g&3\cr d&4\cr e&5\cr {\digamma}&6\cr z&7\cr h&8\cr
+j&9\cr}}
+\enddisplay
+\display
+\hbox{\tabskip1pt
+\valign
+{\hbox to 15pt{\hfil\strut$#\overstroke$\hfil}&
+ \hbox to 15pt{\hfil\strut\rm#\hfil}\cr
+i&{10}\cr k&{20}\cr l&{30}\cr m&{40}\cr n&{50}\cr x&{60}\cr
+o&{70}\cr p&{80}\cr {\qoppa}&{90}\cr}}
+\enddisplay
+\display
+\hbox{\tabskip1pt
+\valign
+{\hbox to 20pt{\hfil\strut$#\overstroke$\hfil}&
+ \hbox to 20pt{\hfil\strut\rm#\hfil}\cr
+r&{100}\cr s&{200}\cr t&{300}\cr u&{400}\cr f&{500}\cr q&{600}\cr y&{700}\cr
+w&{800}\cr {\sanpi}&{900}\cr}}
+\enddisplay
+\display
+\hbox{\tabskip2.5pt\valign
+{\hbox to 30pt{\hfil\strut$\understroke#$\hfil}&
+ \hbox to 30pt{\hfil\strut\rm#000\hfil}\cr
+a&1\cr b&2\cr g&3\cr d&4\cr e&5\cr {\digamma}&6\cr z&7\cr}}
+\enddisplay
+\display
+\hbox{\valign
+{\hbox to 30pt{\hfil\strut$#$\hfil}&
+ \hbox to 30pt{\hfil\strut\rm#000\hfil}\cr
+h&8\cr j&9\cr M&{10}\cr}}
+\enddisplay
+So, for example, the date {\sl February 16th, 1989} would be written
+$i\digamma\overstroke\ Febrouar'iou \understroke a\sanpi pj$ and the
+following equality holds:
+$
+\display\vbox{
+\centerline{sz\overstroke\math{} + {}\math ypj\overstroke\ =
+ \sanpi\qoppa\digamma\hskip1pt\overstroke.}
+}
+\enddisplay
+$
+
+Notice that there is no zero. Zero is, and has always been, the
+cardinal of the empty set which in Ancient Greece was not considered
+an entity in its own right.
+
+To express numbers greater than 10,000 there were many ways. One of
+them was to use 10,000 as a base: thus, for example, 67,536,753
+(\math {}= 6753 \mathbin\cdot 10,000 + 6753\math) was written
+$M\understroke\digamma yng\math\cdot\math \understroke\digamma yng$.
+
+\medskip
+\noindent{\smc Exercise}:
+ {\sl If $-gwno$ means ``-gon'', which of the following
+polygons can by constructed by rule and compasses?}\par
+\smallskip
+$\centerline{iz\overstroke -gwno, l\digamma\overstroke -gwno, \understroke
+dtxj-gwno,}
+\centerline{\understroke akd-gwno, Me\overstroke\math\cdot\math\understroke
+eflz-gwno, \sanpi\qoppa\digamma\overstroke-gwno.}$
+\medskip
+
+Let's return now to \TeX: you can obtain these symbols by the following
+macros:
+|\digamma| for
+$\digamma$,
+|\vardigamma| for
+$\vardigamma$,
+|\Digamma| for
+$\Digamma$,
+|\qoppa| for
+$\qoppa$,
+|\Qoppa| for
+$\Qoppa$,
+|\sanpi| for
+$\sanpi$, and
+|\Sanpi| for
+$\Sanpi$.
+To get the tick marks which distinguish units and thousands, you can
+use |\overstroke| after the numeral, or |\understroke| in front of
+the numeral.
+
+\head * Symbols for cypriotic greek *
+
+The official language of Cyprus is greek. It is also the language
+used in the mass-media and at school. But the language actually
+spoken is a dialect, derived from byzantine greek (and as it seems,
+far more faithful to ancient greek than the one spoken
+in Greece). Some literature has been written in the dialect, and
+since there are phonemes not available in the greek alphabet,
+cypriotic writers use several conventions of new symbols to express
+them.
+
+In the convention we followed,\refersto5 the symbols $\ssh$, $\SSH$
+stand for the sound ``sh'' (like ``shower'' in english, or ``{\cyr
+shashka}'' in russian), $\dz$, $\DZ$ stand for ``j'' (like ``jazz''
+in english or ``{\cyr dzhungli}'' in russian), $\psh$, $\PSH$ stand
+for a $y$ followed by a $\ssh$ (like ``{\cyr pshenitza}'' in russian)
+and $\ksh$, $\KSH$ stand for a $k$ followed by a $\ssh$ (like in
+hindi ``k\d setriya'').
+
+You can get these symbols by the macros |\ssh|, |\SSH|, |\dz|, |\DZ|,
+|\psh|, |\PSH|, |\ksh|, |\KSH|. Here is an example of a small text
+using these symbols:
+\smallskip
+$
+\ninergr
+\frenchspacing
+\parindent0pt
+\advance\baselineskip1.0pt
+\tolerance=5000
+\obeylines
+Dki'alexec to'uc xer'orotsouc, dentr'on mou, n'a riz'wseic,
+n'a f'aeic t'hn zwo'ullan sou, pott'e s>'on j'a sterk'wseic.
+T\dz i >'en kane~i p>'on''xerokagi'ac t\dz i >'en >'e\ssh ei st'axhn %
+q~wma
+n'a \ssh\ssh iepasto~un o<i r'izec sou, plast~hkan t\dz i >'all''>a\-k'o\-ma.
+O<i spalajki'ec t\dz a'i o<i bati'ec p~asin n'a s'e tul'ixoun,
+>epki'asan se po'u t'on laim'on, sf'iggoun se n'a s'e pn'i\-xoun.
+T\dz i >'an pp'esei mi'a sta\ksh i'a ner'on, >enn'a t'hn p'innoun >'alloi
+t\dz i >enn'a skent\dz 'ereic t\dz eiaqama'i, <'enan xerodroump'a\-lin.
+>'Ejja xort'wseic n'a \ssh\ssh iaste~ic pott'e to~u <'hliou >amm'a\-ti,
+giat''>enn'a s'e qaski'azousin o<i spalajki'ec t\dz i o<i b'atoi.
+T\dz i >eso'unh, kakor'izikon, >enn'a doule'ukeic gr'onouc
+t\dz a'i n'a gure'ukeic ''pospa\ssh i'an po'u to'uc kako'uc geit'o\-nouc.
+T\dz i o<i k'opoi e>ic t''>an'ajjeman. M'agkoumou m'en prok'a\-meic\dots
+t\dz i >eso'unh t'o qa"'irin mou, ftwq'on mou, >'enna k'ameic.
+$
+\rightline{\sevenrm From Ilias Georgiou's ``Geloklaman"}
+
+\smallskip
+
+\head * On hyphenation *
+
+There is still no greek hyphenation list, so one has to use
+hyphenation from other languages. We have compared on an ordinary
+text, the standard english (Liang), the german (Schwarz) and
+portuguese (Rezende)\refersto6 hyphenation patterns. The results
+were surprising: on 267 possible hyphens, these three patterns missed
+199 (!!), 141 and 149 resp, found 46, 115, 111 correct ones and 22,
+11, 7 bad ones (the portuguese mistakes were less embarrassing than
+the german ones). So, for a temporary substitute, we would choose
+either the german or the portuguese patterns.
+
+And since you will be forced to make corrections by hand, here are the
+complete actual rules of greek hyphenation:
+
+{\sl Let \math c_1,c_2,\dots,c_n\math\ be consonants \math (n\geq2)\math\
+and \math v_1,v_2,v_3,v_4\math\ vowels. Then we have}
+\list[\parindent0pt\leftskip0pt\sl][\def\tagform#1{{\smc #1\enspace}}]
+
+\item[\tag{Rule 1.}] The combination \math v_1c_1v_2\math\ is
+separated as \math v_1-c_1v_2\math\ {\rm(ex. $pa-ra-ka-l~w$)}
+
+\item[\tag{Rule 2.}] The combination \math v_1c_1\dots c_nv_2\math\
+is separated as \math v_1-c_1\dots c_nv_2\math\ {\bf if }there
+is a greek word starting with \math c_1c_2\math\ $(l'a-sph,
+ko-fte-r'oc),$ {\bf else }\math v_1c_1-c_2\dots c_nv_2\math\
+$(j'ar-roc, >eq-jr'oc)$
+
+\item[\tag{Rule 3.}] The combinations of vowels \math v_1v_2,
+v_1v_2v_3\math\ or \math v_1v_2v_3v_4\math\ are not to be separated
+if they are pronounced as one phoneme $(>ah-d'o-ni$ but
+$>a-'ht-th-toc$, $pi'o$ but $p'u-o).$
+\endlist
+
+S.~Levy made in his fonts separate characters of all possible accented
+letters, to prevent problems of hyphenation (\TeX\ doesn't yet
+hyphenate words with accents). The only exceptions he made, were the
+two combinations $ \roughgrave{}, \smoothgrave{}$ which occur only on
+monosyllables.
+
+In our case, to be able to reduce the fonts, we were forced to make
+accents also of $\char\rq134$, $\char\rq100$, $"{}$, $"'{}$, $\I{}$
+(and macros of $\grave{}$, $\smoothgrave{}$, $\roughgrave{}$,
+$\breve{}$, $\macron{}$, $\diaeresisgrave{}$,
+$\diaeresiscircumflex{}$, $\rhorough$, $\rhosmooth$ as already
+mentioned). This of course adds problems to hyphenation.
+Nevertheless, $\char\rq134$, $\char\rq100$ occur on one- and
+2-syllable words only, $"{}$, $"'{}$ occur rarely and $\I{}$ depends
+on the kind of language one is writing (to find it, you have to go
+back to older versions of $kajare'uousa$ as for example in the
+following lovely text:
+
+\medskip
+
+{\tolerance=5000
+$ \advance\baselineskip1pt >En\I{~w} <esp'eran tin\grave{a}
+>exantl'hsac t\grave{a} murol'ogi'a tou >ekoim~ato <o Froum'entioc
+>ep\grave{i} t~hc >'ammou t~hc paral'iac, katab\grave{a}c >ex
+o>uran~wn <o >ap'ostoloc >eke~inoc t~wn Sa\-x'o\-nwn >'hnoixe
+di\grave{a} maqa'irac t\grave{a} st'hjh to~u koimwm'enou, e>is'hgage
+to\grave{u}c <iero\grave{u}c dakt'ulouc tou e>ic \def\hhh{\grave{h}}
+t\hhh n >op\hhh n ka\grave{i} >exag\grave{w}n t\hhh n kard'ian
+>eb'ujisen a>ut'hn e>ic l'akkon pl'hrh <'udatoc, <'oper <hg'iasen
+prohgoum'enwc. <H fl'egousa >eke'inh kard'ia >'efrixen e>ic
+t\grave{o} <'udwr <wc smar\grave{i}c
+\def\ooo{\grave{o}}%
+\def\aaa{\grave{a}}%
+\def\uuu{\grave{u}}%
+\def\iii{\grave{i}}%
+>ent\ooo c to~u thgan'iou, >afo~u d\grave{e} >ekr'uwsen,
+>'ejese p'alin a>ut\hhh n <o <'agioc e>ic t\ooo n t'opon thc ka\iii\
+kle'isac t\hhh n plhg\hhh n >ep'estreyen e>ic t\ooo n >idik'on tou.
+
+>'Etuq'e pote, >anagn~wst'a mou, n\aaa\ >apokoimhj\I{~h}c m\grave{e}
+>anup'oforon b~hqa, koim'wmenoc n\aaa\ <idr'ws\I{h}c ka\iii\ >exu\-pn'h\-sac
+n\aaa\ e<urej\I{~h}c >iatreum'enoc? >Agno~wn <'oti e>~isai kal\aaa\
+>ano'igeic mhqanik~wc t\ooo\ st'oma, <'ina plh\-r'w\-s\I{h}c e>ic t\ooo n
+>epikat'araton b~hqa t\ooo n sun'hjh f'oron. >All\aaa\ p'oshn a>isj'anesai
+qar'an, m\hhh\ e<ur'iskwn e>ic t\ooo n l'a\-rugga t\ooo\ >oqlhr\ooo n
+jhr'ion! O<'utw <'ama >'hnoixe ka\iii\ <o Frou\-m'entioc to\uuu c
+>ofjalmo'uc, <htoim'asjh n\aaa\ prosf'e\-r\I{h} e>ic t\hhh n >aq'a\-riston
+>Iw'annan t\hhh n sun'hjh dakr'uwn spo\-nd'hn, >all\aaa\ par\aaa\ p~asan
+prosdok'ian o<i >ofjalmo'i tou e<u\-r'e\-jhsan xhro\iii\ ka\iii\ n\aaa\
+progeumat'is\I{h} m~allon \smoothgrave{h} n\aaa\ kla'us\I{h}
+\I{>h}sj'a\-ne\-to >'orexin met\aaa\ polu'hmeron nhste'i\-an <o kal\ooo c
+Be\-ne\-de\-kt~i\-noc.
+$
+}
+
+\rightline{\sevenrm From Emmanouil~Ro\"\i dis' ``The Popess Johanna (1866)''}
+\medskip
+
+Note that in one-accent greek, all accented letters are represented
+by separate characters in the code table, so that no hyphenation
+problem arises.
+
+$
+\gdef\tttt{
+Kaj'otan mprost'a thc ka'i t'hn k'uttaze. Noi'w\-jo\-ntac mi'a >ap'eranth
+ e>uqar'isthsh n'a t'hn bl'epei >'etsi mprost'a tou ka'i <'ena >ap'eranto
+ >ani\-ka\-no\-po'i\-h\-to po'u d'en mpo\-ro~u\-se n'a t'hn
+ tra\-b'h\-xei st'hn >agka\-li'a tou ka'i n'a t'hn fi\-l'h\-sei
+ >eke~i st'on laim'o
+ po'u t'hn e>~iqe fi\-l'h\-sei t'hn m'ia ka'i mo\-na\-di\-k'h
+ for'a ka'i e>~iqe
+ noi'w\-sei m'esa tou t'hn pi'o >'omor\-fh stig\-m'h to~u ka\-lo\-kai\-rio~u
+ ki <'oti
+ t'o ka\-lo\-ka'i\-ri a>u\-t'o, ft'a\-no\-ntac st'o >apo\-ko\-r'u\-fw\-m'a
+ tou, e>~iqe ki'o\-lac pe\-r'a\-sei. >All'a d'en e>~iqe >ak'oma
+ pe\-r'a\-sei tele'iwc, giat'i >eke'inh bris\-k'o\-tan t'wra mpro\-st'a
+ tou. Ka'i d'en mpo\-ro~u\-se n'a k'anei t'i\-po\-ta.
+}
+$
+
+
+\head * Samples, Tables, and Remarks *
+
+\head * The font {\tt rgrrg10} *
+$\tttt$
+
+\head * The font {\tt rgrbf10} *
+$\bf\tttt$
+
+\head * The font {\tt rgrsl10} *
+$\sl\tttt$
+
+\figure[\top]
+\raggedcenter
+Layout for fonts |rgrrg|, |rgrbf|, |rgrsl|
+$\table$
+\endfigure
+
+$\monotoniko
+\gdef\ttttt
+{
+Kaj'otan mprost'a thc kai thn k'uttaze. Noi'w\-jo\-ntac mia >ap'eranth
+ e>uqar'isthsh na thn bl'epei >'etsi mprost'a tou kai <'ena >ap'eranto
+ >ani\-ka\-no\-po'i\-h\-to pou den mpo\-ro~u\-se na thn
+ tra\-b'h\-xei sthn >agka\-li'a tou kai na thn fi\-l'h\-sei
+ >eke~i ston laim'o
+ pou thn e>~iqe fi\-l'h\-sei thn m'ia kai mo\-na\-di\-k'h
+ for'a kai e>~iqe
+ noi'w\-sei m'esa tou thn pio >'omor\-fh stig\-m'h tou ka\-lo\-kai\-rio~u
+ ki <'oti
+ to ka\-lo\-ka'i\-ri a>u\-t'o, ft'a\-no\-ntac sto >apo\-ko\-r'u\-fw\-m'a
+ tou, e>~iqe ki'o\-lac pe\-r'a\-sei. >All'a den e>~iqe >ak'oma
+ pe\-r'a\-sei tele'iwc, giat'i >eke'inh bris\-k'o\-tan t'wra mpro\-st'a
+ tou. Kai den mpo\-ro~u\-se na k'anei t'i\-po\-ta.
+}
+$
+
+
+\figure[\bot]
+\raggedcenter
+Layout for fonts |mrgrrg|, |mrgrbf|, |mrgrsl|
+$\monotoniko\table$
+\endfigure
+
+\head * The font {\tt mrgrrg10} *
+$\monotoniko\ttttt$
+
+\head * The font {\tt mrgrbf10} *
+$\monotoniko\bf\ttttt$
+
+\head * The font {\tt mrgrsl10} *
+$\monotoniko\sl\ttttt$
+
+
+\figure[\top]
+\raggedcenter
+Layout for font |rgrsc|
+$\smc\table$
+\endfigure
+
+
+We conclude with the following remark: people writing french, czech,
+turkish or other languages with many diacritical marks complain that
+there is no space left in Computer Modern to incorporate
+already-accented letters. The solution (in the case of French) that
+D\'esarm\'enien\refersto7 proposed, was to replace greek uppercase
+letters by the french \'e, \`e, \^ e, \^ o, \^\i, \^ a, \^ u, \`a,
+\`u. But then the question is: where to put the greek uppercase
+letters, which are necessary for mathematical formulas. We answer: if
+you have the greek |rgr| family of fonts, you already have all kinds
+of greek uppercase letters. Just take them from there! Of course,
+math families must be restructured in that case since math family~7
+cannot be used for those letters anymore. As Gariepy\refersto8
+pointed out already, the inconvenience with this solution is that for
+every language with accents you will need another |cm| family of
+fonts. That's why we still believe that the best once and for all
+solution would be to be able to work with fonts of 256 characters.
+
+
+\head * Improvements and changes -- version 1.1 (as of March 4, 1990) *
+
+(by the first author)\medskip
+
+\noindent An hyphenation list has been added.
+Greek grammar has changed very often in
+the last 20 years, mainly because greek is a very manifold language (some
+people find it {\it chaotic}, I find it {\it beautiful\/}). I followed the
+hyphenation rules of \refersto2\ as presented in section ``On hyphenation''
+of this paper. These rules
+are very simple and hold as well for the multi-accent as for the one-accent
+system. I found exactly 1168 patterns; many of them came simply from the
+following fact: since |'|,|~|,|>|,|<| are of category 11 during hyphenation,
+|<'o-so| could occur. This leaves $<'o$ alone, which is rather ugly.
+
+Italics fonts (|rgrti| and |mrgrti|) have been added.
+Since in the |cm| family,
+|cmti| has almost the same lowercase letters as |cmmi| and the same uppercase
+ones as |cmsl|, I tried to do the same. Some changes were necessary: 1) the
+handwritten modern greek alpha looks more like {\it a} and 2) tau's stem has a
+hook. There is still some kerning to do. I call this version {\it
+``experimental''}. Maybe in some later (1.2?) version there will be an entirely
+new italics font.
+
+In the |rgrsc| font (as you can see in the table) the symbols $\rhorough,
+\rhosmooth, \Digamma$ and $\vardigamma$ exist now in all styles: regular,
+slanted, italic and boldface. \TeX\ will know which one to choose, depending on
+the font you are using (inside |greekmode|). If you add some new style (for
+example typewriter or sans-serif) 1) please let me know, 2) add these four
+letters in |rgrsc|, 3) add the information in |greekmacros.tex|.
+
+There is |\smallDigamma| for the small capital digamma $\smallDigamma$. Some
+people still persist in calling it {\it ``ef''}. Also there are two new
+symbols:
+
+1) following an advice of my father, I added a variation $\varqoppa$
+of lowercase qoppa. This symbol is used in our days for the numeral 90 (the
+current year is $\understroke a\sanpi\varqoppa$). The macro for $\varqoppa$ is
+|\varqoppa|.
+
+2) a funny ``upside-down'' iota with circumflex $\inviota$ (the macro is
+|\inviota|). This symbol was used in the last century for the sound of $i$ in
+$gi'a$ (cf. ``$pi'o$'' in hyphenation {\smc rule 3}). Here is an example
+of such a text, taken from a 1907 edition\refersto9:
+
+\let\w=\grave
+$
+{\ninergr
+\frenchspacing
+\parindent0pt
+\advance\baselineskip1.0pt
+\tolerance=5000
+\obeylines
+Kair\w oc f'ernei t\w a l'aqana, kair\w oc t\w a parapo'ul\inviota a,
+M\w e t\w on kair\w o ka\w i t\w o dendr\w i k'anei karp\w o ka\w i f'ulla.
+>'A"inte, >or'e, m\inviota\w a kopan\inviota\w a s>'an n>~atan qulop'hta,
+N\w a ''p\inviota\I{~h}c t\w hn Gk'olfw j'arreuec?
+D\w en e>~in'' mall\inviota\w a t\w a g'ene\inviota a.
+J'el''<h >ag'ap'' >apomon\w h ki''>ahto~u grhgorws'unh.
+J'elei lago~u pat'hmata, >allo\inviota ~wc <uge\inviota\w a s''>af'inei.
+X'ereic t'i magar'oplash po~u e>~inai \I{<h} guna~ikec?
+$
+\rightline{\sevenrm From Spyridon Peresiadis's ``I Golfo"}
+}
+
+\smallskip
+
+Finally I inserted the logos $\grMF$ and $\MF$ in the |rgrsc| font (the macros
+are |\grMF| and the usual |\MF|). There is still no PASCAL word processor
+program to detect monosyllabes, volunteers are welcome. This upgrading has been
+done on a Macintosh SE/30 using Andrew Trevorrow's Oz\TeX\ and Victor
+Ostromoukhov's Mac$\MF$.
+
+
+\setbox0=\hbox{22. }
+\thehangindent=\wd0
+\def\referred#1{\par\hangindent\thehangindent\noindent
+ \hbox to \thehangindent{\hss#1.\ }\ignorespaces}
+\raggedright
+
+\head * References *
+
+\referred1 {\smc S.Levi}: Using Greek Fonts with \TeX, {\sl TUGboat},
+{\bf 9} (1988) 20--24
+%\referred2 $\monotoniko {\smc M.Triantafullidh:} Grammatik'h
+\referred2 $\monotoniko {\smc M.Triantafullidh:}
+{\rg Neoellhnik'h Grammatik'h, }
+{\sl Organism'oc 'Ek\-do\-shc Sqolik'wn Bibl'iwn},
+Aj'hna 1982$
+\referred3 {$\smc Q.Mhqiwth:$} $Ne'wtaton Lexik'on t~hc Neoellhnik~hc Gl'wsshc,
+{\sl >Ek\-d'o\-seic Kastal'ia}, >Aj~hnai 1972$
+\referred4 {\smc C.B.Boyer}: A History of Mathematics, {J.\ Wiley \&
+Sons,} New~York 1968
+\referred5 ${\smc H.Gewrgiou:} Gel'oklam'an, {\sl Seir'a Kupriak~hc
+La"ik~hc Po'ihshc <Upourge'iou paide'iac\/} {\bf 4}, Leukws'ia 1980$
+\referred6 {\smc Unix} \TeX\ distribution tape, Seattle 1988
+\referred7 {\smc J.D\'esarm\'enien:} How to run \TeX\ in a French
+environment: hyphenation, fonts, typography, {\sl TUGboat}, {\bf 5} (1984)
+91--102
+\referred8 {\smc A.Gariepy:} French in \TeX, {\sl TUGboat}, {\bf 9}
+(1988) 65--69
+\referred9 {$\smc S.Peresiadhc:$} $<H Gk'olfw. Dr'ama e>idulliak\w on e>ic
+pr'axeic p'ente, {\sl >Ekdotik\w oc O>~ikoc Gewrg'iou F'exh,} >Aj~hnai 1907$
+
+
+\makesignature
+\endarticle
+
+% version 19.6.1989
+
+\hbox{Yannis Haralambous}
+\hbox{Universit\'e de Lille--Flandres--Artois}
+\smallskip
+\hbox{Klaus Thull}
+\hbox{Freie Universit\"at Berlin}
+-------
+
diff --git a/Master/texmf-dist/doc/plain/yannisgr/rgrtestfont.tex b/Master/texmf-dist/doc/plain/yannisgr/rgrtestfont.tex
new file mode 100644
index 00000000000..4b4b770f71b
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/rgrtestfont.tex
@@ -0,0 +1,274 @@
+% This file is based on Knuth's and Levy's "testfont"files
+%
+% The text is taken from the book of Kwsto'ula Mhtropo'ulou, Za'ar 19.
+%
+\tracinglostchars=0
+\tolerance=1000
+\raggedbottom
+\nopagenumbers
+\parindent=0pt
+\newlinechar=`@
+\input rgreekmacros %not necessary if you have a greek format
+
+\newcount\m \newcount\n \newcount\p \newdimen\dim
+\chardef\other=12
+
+\def\today{\ifcase\month\or
+ January\or February\or March\or April\or May\or June\or
+ July\or August\or September\or October\or November\or December\fi
+ \space\number\day, \number\year}
+\def\hours{\n=\time \divide\n 60
+ \m=-\n \multiply\m 60 \advance\m \time
+ \twodigits\n\twodigits\m}
+\def\twodigits#1{\ifnum #1\lt10 0\fi \number#1}
+
+{\catcode`\|=0 \catcode`\\=\other
+|gdef|help{|message{%
+\init switches to another font;@%
+\end or \bye finishes the run;@%
+\table prints the font layout in tabular format;@%
+\text prints a sample text, assuming TeX text font conventions;@%
+\sample combines \table and \text;@%
+\mixture mixes a background character with a series of others;@%
+\alternation interleaves a background character with a series;@%
+\alphabet prints all lowercase letters within a given background;@%
+\alphabets does one \alphabet for each lowercase background letter;@%
+\ALPHABET prints all uppercase letters within a given background;@%
+\ALPHABETs does one \ALPHABET for each uppercase background letter;@%
+\accents prints all lowercase vowels with accents and breathings;@%
+\series prints a series of letters withing a given background;@%
+\lowers prints a comprehensive test of lowercase;@%
+\uppers prints a comprehensive test of uppercase;@%
+\digits prints a comprehensive test of numerals;@%
+\math prints a comprehensive test of TeX math italic;@%
+\names prints a text that mixes upper and lower case;@%
+\punct prints a punctuation test;@%
+\bigtest combines many of the above routines;@%
+\help repeats this message;@%
+and you can use ordinary TeX commands (e.g., to \input a file).}}}
+
+\def\setbaselineskip{\setbox0=\hbox{\n=0
+\loop\char\n \ifnum \n\lt255 \advance\n 1 \repeat}
+\baselineskip=6pt \advance\baselineskip\ht0 \advance\baselineskip\dp0 }
+
+\def\setchar#1{{\escapechar-1\message{\string#1 character = }%
+ \def\do##1{\catcode`##1=\other}\dospecials
+ \read-1 to\next
+ \expandafter\finsetchar\next\next#1}}
+\def\finsetchar#1#2\next#3{\global\chardef#3=`#1
+ \ifnum #3=`\# \global\chardef#3=#2 \fi}
+\def\promptthree{\setchar\background
+ \setchar\starting \setchar\ending}
+
+\def\init{\message{@Name of the font to test = }
+ \read-1 to\fontname
+ \font\testfont=\fontname
+ \headline={\sevenrm Test of \fontname\unskip\ on \today\ at \hours\hfil
+ Page \folio}
+ \testfont \setbaselineskip
+ \ifdim\fontdimen6\testfont\lt10pt \rightskip=0pt plus 20pt
+ \else\rightskip=0pt plus 2em \fi
+ \spaceskip=\fontdimen2\testfont % space between words (\raggedright)
+ \xspaceskip=\fontdimen2\testfont \advance\xspaceskip by\fontdimen7\testfont
+ \message{Now type a test command (\string\help\space for help):}}
+
+\def\mixture{\promptthree \domix\mixpattern}
+\def\alternation{\promptthree \domix\altpattern}
+\def\mixpattern{\0\1\0\0\1\1\0\0\0\1\1\1\0\1}
+\def\altpattern{\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0}
+\def\domix#1{\par\chardef\0=\background \n=\starting
+ \until\ifnum\n=\ending\do\chardef\1=\n #1\par\n=\count\n \repeat}
+
+\count`w=`a\count`a=`b\count`b=`g\count`g=`d\count`d=`e\count`e=`z
+\count`z=`h\count`h=`j\count`j=`i\count`i=`k\count`k=`l\count`l=`m
+\count`m=`n\count`n=`x\count`x=`o\count`o=`p\count`p=`r\count`r=`c
+\count`c=`t\count`t=`u\count`u=`f\count`f=`q\count`q=`y\count`y=`w
+\count`W=`A\count`A=`B\count`B=`G\count`G=`D\count`D=`E\count`E=`Z
+\count`Z=`H\count`H=`J\count`J=`I\count`I=`K\count`K=`L\count`L=`M
+\count`M=`N\count`N=`X\count`X=`O\count`O=`P\count`P=`R\count`R=`S
+\count`S=`T\count`T=`U\count`U=`F\count`F=`Q\count`Q=`Y\count`Y=`W
+\count`0=`1\count`1=`2\count`2=`3\count`3=`4\count`4=`5
+\count`5=`6\count`6=`7\count`7=`8\count`8=`9\count`9=`0
+
+\long\def\until#1\do#2\repeat{\def\body{#2}\def\cond{#1}\etareti}
+\def\etareti{\cond\let\next=\relax\else\let\next=\etareti\fi\body\next}
+
+\def\alphabet{\setchar\background \dosseries{`a}{`w}}
+\def\ALPHABET{\setchar\background \doseries{`A}{`W}}
+\def\series{\promptthree \doseries\starting\ending}
+\def\doseries#1#2{\def\!{\discretionary{\background}{\background}{\background}}
+ \!\n=#1\until\ifnum\n=#2\do\char\n\!\n=\count\n \repeat\par}
+\def\dosseries#1#2{\def\!{\discretionary{\background}{\background}{\background}}
+ \!\n=#1\until\ifnum\n=#2\do\char\n\!\n=\count\n \repeat s\par}
+
+\def\lowers{\docomprehensive hs{`a}{`w}}
+\def\uppers{\docomprehensive HO{`A}{`W}}
+\def\digits{\docomprehensive H0{`0}{`9}}
+\def\docomprehensive#1#2#3#4{\par\n=#3
+ \until\ifnum\n=#4\do\line{\altr#1\hfil\altr#2}\n=\count\n\repeat}
+\def\altr#1{\setbox0=\hbox{#1}\setbox2=\hbox{#1\char\n}%
+ \dim=.5\hsize \advance\dim-\wd0 \divide\dim\wd2 \multiply\dim\wd2
+ \xleaders\box2\hskip\dim\box0}
+\def\alphabets{\m=`a\until\ifnum\m=`w
+ \do\chardef\background=\m{\dosseries{`a}{`w}}\m=\count\m \repeat}
+\def\ALPHABETS{\m=`A\until\ifnum\m=`W
+ \do\chardef\background=\m{\doseries{`A}{`W}}\m=\count\m \repeat}
+
+\def\separator{\vfil\penalty-100\vfilneg
+ \medskip\leaders\hrule height.4pt\vskip.4pt\medskip}
+
+\def\bigtest{%
+\sample\vfil\break
+\accents\separator
+\names\separator
+\punct\separator
+\alphabets\separator
+\lowers\separator
+\uppers\separator
+\digits}
+
+\def\math{\message{(Sorry, that's not here yet.)}}
+
+\def\oct#1{\hbox{\tenrm\'{}\kern-.2em\tenit#1\/\kern.05em}} % octal constant
+\def\hex#1{\hbox{\tenrm\H{}\tentt#1}} % hexadecimal constant
+\def\setdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
+ \m=\n \divide\m by 64 \xdef\0{\the\m}%
+ \multiply\m by-64 \advance\m by\n \divide\m by 8 \xdef\1{\the\m}}
+\def\testrow{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
+ \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
+ \global\p=\lastpenalty}} % \p=1 if none of the characters exist
+\def\oddline{\cr
+ \noalign{\nointerlineskip}
+ \multispan{19}\hrulefill&
+ \setbox0=\hbox{\lower 2.3pt\hbox{\hex{\h x}}}\smash{\box0}\cr
+ \noalign{\nointerlineskip}}
+\newif\ifskipping
+\def\evenline{\loop\skippingfalse
+ \ifnum\n\lt128 \m=\n \divide\m 16 \chardef\next=\m
+ \expandafter\setdigs\meaning\next \testrow
+ \ifnum\p=1 \skippingtrue \fi\fi
+ \ifskipping \global\advance\n 16 \repeat
+ \ifnum\n=128 \let\next=\endchart\else\let\next=\morechart\fi
+ \next}
+\def\morechart{\cr\noalign{\hrule}
+ \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
+ \chartline \evenline}
+\def\chartline{&\oct{\0\1x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&}
+\def\chartstrut{\lower4.5pt\vbox to14pt{}}
+\def\table{$$\global\n=0
+ \halign to\hsize\bgroup
+ \chartstrut##\tabskip0pt plus10pt&
+ &\hfil##\hfil&\vrule##\cr
+ \lower6.5pt\null
+ &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
+\def\endchart{\cr\noalign{\hrule}
+ \raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
+ &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$\par}
+\def\:{\setbox0=\hbox{\char\n}%
+ \ifdim\ht0>7.5pt\reposition
+ \else\ifdim\dp0>2.5pt\reposition\fi\fi
+ \box0\global\advance\n 1 }
+\def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
+ \advance\dim 2pt \dp0=\dim}
+\def\centerlargechars{
+ \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
+
+\begingreek
+
+\def\accents{\longseries a\shortseries e\longseries h\mediumseries i
+\shortseries o\mediumseries u\longseries w \rseries}
+\def\longseries#1{#1 `#1 '#1 ~#1 #1| `#1| '#1| ~#1| <#1 <`#1 <'#1 <~#1 <#1|
+ <`#1| <'#1| <~#1| >#1 >`#1 >'#1 >~#1 >#1| >`#1| >'#1| >~#1| \par}
+\def\shortseries#1{#1 `#1 '#1 <#1 <`#1 <'#1 >#1 >`#1 >'#1 \par}
+\def\mediumseries#1{#1 `#1 '#1 ~#1 %
+ <#1 <`#1 <'#1 <~#1 >#1 >`#1 >'#1 >~#1 "#1 "`#1 "'#1 "~#1 \par}
+\def\rseries{r <r >r\par}
+\def\names{ >Afrod'ith Beatr'ikh Gi'annhc Dhm'htrhc E>ugen'ia
+ Zw'h <Hrakl~hc Je'ofiloc >Iw'anna Kl'aouc Louk~ac
+ Mar'ia N'ikh Xanjo'ula O>id'ipouc Pl'atwn Rox'anh S'ilbio
+ Ter'eza <Upat'ia F'ilippoc Qar'a Yuq'h >Wrig'enhc \par}
+\def\punct{{\hyphenpenalty=10000\par\dopunct{ka'i}\dopunct{t~hs}\dopunct{<'ena}
+ \dopunct{<ELLAS}\par}}
+\def\dopunct#1{#1, #1: #1; ''#1'' #1? #1! ((#1)) (#1) [#1] #1* #1.\par}
+\def\from#1{{\sevenrm\unskip\nobreak\hfil\penalty50\hskip2em\hbox{}
+ \nobreak\hfil (From #1)\parfillskip=0pt\finalhyphendemerits=0 \par}}
+
+\def\text{{\advance\baselineskip-4pt
+\setbox0=\hbox{abcdefghijklmnopqrstuvwxyz}
+\ifdim\hsize\gt2\wd0 \ifdim 15pc\gt2\wd0 \hsize=15pc \else \hsize=2\wd0 \fi\fi
+((T'o br~hka!)) f'wnaxe. ((T'o br~hka! E>~isai <'ena pr'oswpo m'esa >ap'o
+<'ena bibl'io po'u pot'e d'en gr'afthke, giat'i >eg'w prosp'ajhsa, >eg'w
+m'ono, ka'i m''a>ut'h t'h nekr'h gl'wssa ka'i d'en mp'oresa n'a t'o p~w, n'a
+t'o fti'axw, d'en mp'oresa pot'e, giat'i <h gl'wssa e>~inai nekr'h,
+>endi'amesh, mi'a gl'wssa gi'a poiht'ec, gi'a >anjr'wpouc po'u >oneire'uontai
+s'an a>ut'o t'o paid'i, t'on >Ast'erh po'u to~u f'ortwsan >'adika du'o
+jan'atouc ka'i d'en m'ilhse. D'en e>~inai mi'a gl'wssa gi'a >emp'orio to'uth
+>ed~w <h dik'h mou ka'i gi''a>ut'o d'en s'e >anagn'wrise kan'enac <'otan
+milo~usa gi'a s'ena. D'en j'a mporo~use pot'e n'a e>~inai s'ugqronh <h pr'axh
+m'e t'h fantas'ia. Pot'e >'idia <h pragmatik'h <istor'ia m'e t'h nekr'h
+gl'wssa. Pot'e. T'a pr'oswpa <up'hrxane, na'i, e>~inai >al'hjeia, <up'hrxane
+>all'a pot'e s'e sq'esh m'e t'hn pragmatik'othta po'u dihg'hjhka m'e t'h
+nekr'h, >'aqrhsth gl'wssa t~wn qam'enwn >Etro'uskwn. <Up'hrxane s'e qr'ono
+ka'i q~wro parwqhm'eno, >'asqeto, qr'ono mhd'en, pr'oswpa po'u <h
+pragmatik'othta <h dik'h mac t'a e>~iqe de~i >alli~wc. Ka'i m'ono >es'u,
+m'ono >es'u e>~isai mis'oc, e>~isai KANENAS, giat'i >eg'w d'en pr'oftasa
+n'a s'e k'anw >al'hjeia, >eg'w d'en mp'oresa n'a s'e k'anw pr'oswpo
+<uparkt'o m'esa >ap'o t'h fjor'a. E>~isai <'ena pr'oswpo m'esa >ap'o <'ena
+mujist'orhma po'u pot'e d'en gr'afthke giat'i <h gl'wssa a>ut'h e>~inai
+m'ono gi'a t'oso, t'oso l'igo, <'oso >~htan o<i 19 m'erec s'e ke~ino t'o
+Sept'embrh ka'i >'etsi >~htan po'u s''>'afhsa mis'o, s''<'ena trago'udi
+m'esa, s'e mi'a l'exh pali'a, s''<'ena >anastenagm'o, s'e mis'o >'oneiro
+spasm'eno. S''>'afhsa >'etsi ka'i d'en >'eginec pot'e mi'a >al'hjeia gi'a
+to'uc >'allouc, gi'a to'uc tr'itouc, gi'a to'uc logiko'uc, gi'a <'osouc
+rwto~usan gi'a s'ena, gi'a t'h guna'ika sou >ak'oma po'u nom'izei p'wc s'e
+x'erei ka'i d'en x'erei t'ipota >ap'o s'ena. >Eg'w fta'iw >ag'aph mou ka'i
+p'ali >ag'aph j'a so~u''dina ka'i l'exeic nekr'ec, >'aqrhstec ka'i
+m''a>ut'ec j'a prospajo~usa, j'a >'hjela n'a g'ineic <'ena >ast'eri ka'i mi'a
+ter'astia fwtein'h gramm'h st'hn >'akrh to~u k'osmou, >en~w >es'u mo~u
+mil~ac gi'a qrus'afi ka'i p'wc gi''a>ut'o t'o mis'o qrus'afi, mis'o ka'i
+klemm'eno, sk'otwsec du'o >aj'wouc, du'o x'enouc, du'o zw'ec, >es'u, t'o
+>'astro mou ka'i t'o f~wc mou. M'ilhs'e mou loip'on, p'ec mou p'wc >'eqw
+>'adiko ka'i p'wc d'en e>~inai gi'a s'ena <'ola to~uta, p'ec mou t'hn
+>al'hjeia >'h <'ena y'ema, p'ec mou, p'ec mou Za'ar >ag'aph mou...))
+
+Logik'oc. M'e t'ic l'exeic metrhm'enec. Du'o, t'esseric, >oqt'w, d'wdeka. <O
+>'erwt'ac tou kr'athse <'oso krat~ane o<i >epoq'ec. Mi'a >epoq'h. M'e broq'ec
+ka'i ke~ino t'o jamp'o k'itrino <'hlio. Sept'embrhc. <'Enac. M'ono. Met'a
+xanag'urise st'o sp'iti tou. X'enoc. Ka'i m'onoc. Ka'i >'emeine >eke~i.
+X'eqase. >'H o>'ute ki a>ut'o. P'erase st'hn >'allh >'oqjh, st'o pot'ami,
+p'anta t'o''lege p'wc <h >'allh >'oqjh e>~inai <h pi'o e>'ukolh. >'Oqi a>ut'h
+>ed~w po'u t'hn perpat~ame. <H >'allh. A>ut'h po'u d'en t'hn x'eroume >ak'oma.
+Za'ar, t'o d'eqthke n'a t'on l'eei m'ono >eke'inh. Na'i e>~iqe skot'wsei. Du'o
+>aj'wouc. >'Enoqouc. D'en e>~iqe shmas'ia. >'Afhse n'a <upoyiasto~un t'on
+>Ast'erh. >Eke~inoc >'agnwstoc. Ka'i m'ono gi'a t'o qrus'afi milo~use. <O
+>Ast'erhc j'a pono~use. <'Opwc p'onese >eke'inh. >'Oqi, d'en >'hjele n'a
+pon~ane o<i >'anjrwpoi. >'Oqi po'u noiaz'otan. >'Oqi po'u d'en t'o >'anteqe.
+<'Omwc fob'otan. Fob'otan pol'u k'aje for'a po'u >'emene m'onoc m'e t'on
+<eaut'o tou. Ka'i <h logik'h d'en >'eftane. T'ote, d'en >'eftane <h logik'h.
+>'Htane gi'a to'uc pol'u >aj'wouc a>ut'h <h logik'h. A>ut'oc tetrag'wnize to'uc
+k'uklouc. T'esseric gwn'iec. M'ia, d'uo, tre~ic, t'esseric. Gwn'ies. <'Olec.
+Ka'i <h logik'h tou. <O >'erwt'ac tou m'ono mi'a >epoq'h.
+
+((>Eg'w d'en >erwte'uomai)) e>~iqe pe~i. D'en t'on e>~iqe pist'eyei. >~Htan <o
+k'itrinoc jamp'oc Sept'embrhc ka'i <h l'imnh ka'i o<i stajmo'i ka'i o<i n'uqtec
+m'e t'on >'erwta. D'en t'on e>~iqe pist'eyei.
+
+((T'i >'eqeic n'a mo~u pe~ic t'wra? S''t'o e>~iqa pe~i. <H gl'wssa po'u
+>epim'eneic n'a mil~ac, <h dik'h sou <h gl'wssa e>~inai >'aqrhsth >entel~wc
+ka'i d'en mpore~i kan'enac n'a t'hn zwntan'eyei. >Eg'w >'emeina p'anta <o
+x'enoc, t'o e>~idec, t'o x'ereic, t'o''majec pi'a. Giat'i >epim'eneic? T'i
+zht~ac >ap'o m'ena? >Eg'w >'etsi <'opwc e>~imai ftiagm'enoc d'en qwr'aw s'e
+kan'ena >'oneiro, d'en qwr'aw s'e kami'a nekr'h di'alekto. E>~imai <o x'enoc
+ka'i d'en j'a s''>anagnwr'izw s'e l'igo. D'en j'a x'erw giat'i ka'i p~wc ka'i
+p'oso m''>ag'aphsec. Ka'i j'a''jela st''>al'hjeia n'a mo~u t'o pe~ic a>ut'o:
+Nom'izeic <'oti m''>ag'amhsec? >Es'u, >em'ena!! M'a poi'a sq'esh j'a mporo~use
+n'a <up'arqei >an'ames'a mac? M'ila mou. S'>ako'uw. E>~imai <o x'enoc. >'Emeina
+<o x'enoc. K'anenac d'en kat'alabe t'hn >erhmi'a mou. Pot'e. M'onoc ka'i
+x'enoc. Ka'i s'e koit'azw st'a m'atia. P~wc s'e l'ene? Poi'a e>~isai? Giat'i
+s''>ar'esei n'a >epim'eneic <'oti m''>ag'aphsec? T'i x'ereic >es'u >ap'o
+m'ena?))}}
+
+\def\sample{\names\table\text}
+
+\init
+
diff --git a/Master/texmf-dist/doc/plain/yannisgr/tomakeformat.txt b/Master/texmf-dist/doc/plain/yannisgr/tomakeformat.txt
new file mode 100644
index 00000000000..b2f85c8fdcf
--- /dev/null
+++ b/Master/texmf-dist/doc/plain/yannisgr/tomakeformat.txt
@@ -0,0 +1,26 @@
+% Hyphenation, miscellaneous macros, and initial values for standard layout
+\message{hyphenation}
+
+\def\lt{<}\def\gt{>}
+\catcode`\<=11
+\catcode`\>=11
+\catcode`\'=11
+\catcode`\~=11
+\catcode`\"=11
+\lccode`\<=`\<%
+\lccode`\>=`\>%
+\lccode`\'=`\'%
+\lccode`\~=`\~%
+\lccode`\"=`\"%
+
+\input grhypha
+
+\catcode`\<=12
+\catcode`\>=12
+\catcode`\'=12
+\catcode`\~=13
+\catcode`\"=12
+
+\message{greekmacros v1.1}
+\input rgreekmacros
+
diff --git a/Master/texmf-dist/doc/texdraw/getopt.c b/Master/texmf-dist/doc/texdraw/getopt.c
new file mode 100644
index 00000000000..36ebf5c5b03
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/getopt.c
@@ -0,0 +1,762 @@
+/* Getopt for GNU.
+ NOTE: getopt is now part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
+ before changing it!
+
+ Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+ Ditto for AIX 3.2 and <stdlib.h>. */
+#ifndef _NO_PROTO
+#define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if !defined (__STDC__) || !__STDC__
+/* This is a separate conditional since some stdc systems
+ reject `defined (const)'. */
+#ifndef const
+#define const
+#endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C
+ Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object files,
+ it is simpler to just do this in the source for each such file. */
+
+#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+ contain conflicting prototypes for getopt. */
+#include <stdlib.h>
+#endif /* GNU C library. */
+
+/* This is for other GNU distributions with internationalized messages.
+ The GNU C Library itself does not yet support such messages. */
+#if HAVE_LIBINTL_H
+# include <libintl.h>
+#else
+# define gettext(msgid) (msgid)
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+ but it behaves differently for the user, since it allows the user
+ to intersperse the options with the other arguments.
+
+ As `getopt' works, it permutes the elements of ARGV so that,
+ when it is done, all the options precede everything else. Thus
+ all application programs are extended to handle flexible argument order.
+
+ Setting the environment variable POSIXLY_CORRECT disables permutation.
+ Then the behavior is completely standard.
+
+ GNU application programs can use a third alternative mode in which
+ they can distinguish the relative order of options and other arguments. */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+char *optarg = NULL;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns EOF, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+/* XXX 1003.2 says this must be 1 before any call. */
+int optind = 0;
+
+/* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+ for unrecognized options. */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+ This must be initialized on some systems to avoid linking in the
+ system's own getopt implementation. */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters.
+
+ PERMUTE is the default. We permute the contents of ARGV as we scan,
+ so that eventually all the non-options are at the end. This allows options
+ to be given in any order, even with programs that were not written to
+ expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were written
+ to expect options and other ARGV-elements in any order and that care about
+ the ordering of the two. We describe each non-option ARGV-element
+ as if it were the argument of an option with character code 1.
+ Using `-' as the first character of the list of option characters
+ selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return EOF with `optind' != ARGC. */
+
+static enum
+{
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable. */
+static char *posixly_correct;
+
+#ifdef __GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+ because there are many ways it can cause trouble.
+ On some systems, it contains special magic macros that don't work
+ in GCC. */
+#include <string.h>
+#define my_index strchr
+#else
+
+/* Avoid depending on library functions or files
+ whose names are inconsistent. */
+
+char *getenv ();
+
+static char *
+my_index (str, chr)
+ const char *str;
+ int chr;
+{
+ while (*str)
+ {
+ if (*str == chr)
+ return (char *) str;
+ str++;
+ }
+ return 0;
+}
+
+/* If using GCC, we can safely declare strlen this way.
+ If not using GCC, it is ok not to declare it. */
+#ifdef __GNUC__
+/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
+ That was relevant to code that was here before. */
+#if !defined (__STDC__) || !__STDC__
+/* gcc with -traditional declares the built-in strlen to return int,
+ and has done so at least since version 2.4.5. -- rms. */
+extern int strlen (const char *);
+#endif /* not __STDC__ */
+#endif /* __GNUC__ */
+
+#endif /* not __GNU_LIBRARY__ */
+
+/* Handle permutation of arguments. */
+
+/* Describe the part of ARGV that contains non-options that have
+ been skipped. `first_nonopt' is the index in ARGV of the first of them;
+ `last_nonopt' is the index after the last of them. */
+
+static int first_nonopt;
+static int last_nonopt;
+
+/* Exchange two adjacent subsequences of ARGV.
+ One subsequence is elements [first_nonopt,last_nonopt)
+ which contains all the non-options that have been skipped so far.
+ The other is elements [last_nonopt,optind), which contains all
+ the options processed since those non-options were skipped.
+
+ `first_nonopt' and `last_nonopt' are relocated so that they describe
+ the new indices of the non-options in ARGV after they are moved. */
+
+static void
+exchange (argv)
+ char **argv;
+{
+ int bottom = first_nonopt;
+ int middle = last_nonopt;
+ int top = optind;
+ char *tem;
+
+ /* Exchange the shorter segment with the far end of the longer segment.
+ That puts the shorter segment into the right place.
+ It leaves the longer segment in the right place overall,
+ but it consists of two parts that need to be swapped next. */
+
+ while (top > middle && middle > bottom)
+ {
+ if (top - middle > middle - bottom)
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ register int i;
+
+ /* Swap it with the top part of the top segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[top - (middle - bottom) + i];
+ argv[top - (middle - bottom) + i] = tem;
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
+ else
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ register int i;
+
+ /* Swap it with the bottom part of the bottom segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[middle + i];
+ argv[middle + i] = tem;
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
+ }
+
+ /* Update records for the slots the non-options now occupy. */
+
+ first_nonopt += (optind - last_nonopt);
+ last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+static const char *
+_getopt_initialize (optstring)
+ const char *optstring;
+{
+ /* Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ first_nonopt = last_nonopt = optind = 1;
+
+ nextchar = NULL;
+
+ posixly_correct = getenv ("POSIXLY_CORRECT");
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (posixly_correct != NULL)
+ ordering = REQUIRE_ORDER;
+ else
+ ordering = PERMUTE;
+
+ return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+ given in OPTSTRING.
+
+ If an element of ARGV starts with '-', and is not exactly "-" or "--",
+ then it is an option element. The characters of this element
+ (aside from the initial '-') are option characters. If `getopt'
+ is called repeatedly, it returns successively each of the option characters
+ from each of the option elements.
+
+ If `getopt' finds another option character, it returns that character,
+ updating `optind' and `nextchar' so that the next call to `getopt' can
+ resume the scan with the following option character or ARGV-element.
+
+ If there are no more option characters, `getopt' returns `EOF'.
+ Then `optind' is the index in ARGV of the first ARGV-element
+ that is not an option. (The ARGV-elements have been permuted
+ so that those that are not options now come last.)
+
+ OPTSTRING is a string containing the legitimate option characters.
+ If an option character is seen that is not listed in OPTSTRING,
+ return '?' after printing an error message. If you set `opterr' to
+ zero, the error message is suppressed but we still return '?'.
+
+ If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+ so the following text in the same ARGV-element, or the text of the following
+ ARGV-element, is returned in `optarg'. Two colons mean an option that
+ wants an optional arg; if there is text in the current ARGV-element,
+ it is returned in `optarg', otherwise `optarg' is set to zero.
+
+ If OPTSTRING starts with `-' or `+', it requests different methods of
+ handling the non-option ARGV-elements.
+ See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+ Long-named options begin with `--' instead of `-'.
+ Their names may be abbreviated as long as the abbreviation is unique
+ or is an exact match for some defined option. If they have an
+ argument, it follows the option name in the same ARGV-element, separated
+ from the option name by a `=', or else the in next ARGV-element.
+ When `getopt' finds a long-named option, it returns 0 if that option's
+ `flag' field is nonzero, the value of the option's `val' field
+ if the `flag' field is zero.
+
+ The elements of ARGV aren't really const, because we permute them.
+ But we pretend they're const in the prototype to be compatible
+ with other systems.
+
+ LONGOPTS is a vector of `struct option' terminated by an
+ element containing a name which is zero.
+
+ LONGIND returns the index in LONGOPT of the long-named option found.
+ It is only valid when a long-named option has been found by the most
+ recent call.
+
+ If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+ long-named options. */
+
+int
+_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+ const struct option *longopts;
+ int *longind;
+ int long_only;
+{
+ optarg = NULL;
+
+ if (optind == 0)
+ {
+ optstring = _getopt_initialize (optstring);
+ optind = 1; /* Don't scan ARGV[0], the program name. */
+ }
+
+ if (nextchar == NULL || *nextchar == '\0')
+ {
+ /* Advance to the next ARGV-element. */
+
+ if (ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (last_nonopt != optind)
+ first_nonopt = optind;
+
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (optind < argc
+ && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
+ optind++;
+ last_nonopt = optind;
+ }
+
+ /* The special ARGV-element `--' means premature end of options.
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
+
+ if (optind != argc && !strcmp (argv[optind], "--"))
+ {
+ optind++;
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (first_nonopt == last_nonopt)
+ first_nonopt = optind;
+ last_nonopt = argc;
+
+ optind = argc;
+ }
+
+ /* If we have done all the ARGV-elements, stop the scan
+ and back over any non-options that we skipped and permuted. */
+
+ if (optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (first_nonopt != last_nonopt)
+ optind = first_nonopt;
+ return EOF;
+ }
+
+ /* If we have come to a non-option and did not permute it,
+ either stop the scan or describe it to the caller and pass it by. */
+
+ if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
+ {
+ if (ordering == REQUIRE_ORDER)
+ return EOF;
+ optarg = argv[optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Skip the initial punctuation. */
+
+ nextchar = (argv[optind] + 1
+ + (longopts != NULL && argv[optind][1] == '-'));
+ }
+
+ /* Decode the current option-ARGV-element. */
+
+ /* Check whether the ARGV-element is a long option.
+
+ If long_only and the ARGV-element has the form "-f", where f is
+ a valid short option, don't consider it an abbreviated form of
+ a long option that starts with f. Otherwise there would be no
+ way to give the -f short option.
+
+ On the other hand, if there's a long option "fubar" and
+ the ARGV-element is "-fu", do consider that an abbreviation of
+ the long option, just like "--fu", and not "-f" with arg "u".
+
+ This distinction seems to be the most useful approach. */
+
+ if (longopts != NULL
+ && (argv[optind][1] == '-'
+ || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound;
+ int option_index;
+
+ for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, nextchar, nameend - nextchar))
+ {
+ if (nameend - nextchar == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, gettext ("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ optind++;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ optind++;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ gettext ("%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ gettext ("%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[optind - 1][0], pfound->name);
+
+ nextchar += strlen (nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ gettext ("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short
+ option, then it's an error.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[optind][1] == '-'
+ || my_index (optstring, *nextchar) == NULL)
+ {
+ if (opterr)
+ {
+ if (argv[optind][1] == '-')
+ /* --option */
+ fprintf (stderr, gettext ("%s: unrecognized option `--%s'\n"),
+ argv[0], nextchar);
+ else
+ /* +option or -option */
+ fprintf (stderr, gettext ("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[optind][0], nextchar);
+ }
+ nextchar = (char *) "";
+ optind++;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *nextchar++;
+ char *temp = my_index (optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*nextchar == '\0')
+ ++optind;
+
+ if (temp == NULL || c == ':')
+ {
+ if (opterr)
+ {
+ if (posixly_correct)
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, gettext ("%s: illegal option -- %c\n"),
+ argv[0], c);
+ else
+ fprintf (stderr, gettext ("%s: invalid option -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ return '?';
+ }
+ if (temp[1] == ':')
+ {
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ optind++;
+ }
+ else
+ optarg = NULL;
+ nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr,
+ gettext ("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+ nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int
+getopt (argc, argv, optstring)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0);
+}
+
+#endif /* _LIBC or not __GNU_LIBRARY__. */
+
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+ the above definition of `getopt'. */
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+
+ c = getopt (argc, argv, "abc:d:0123456789");
+ if (c == EOF)
+ break;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/Master/texmf-dist/doc/texdraw/getopt.h b/Master/texmf-dist/doc/texdraw/getopt.h
new file mode 100644
index 00000000000..952f4830d3d
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/getopt.h
@@ -0,0 +1,129 @@
+/* Declarations for getopt.
+ Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns EOF, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+#if defined (__STDC__) && __STDC__
+ const char *name;
+#else
+ char *name;
+#endif
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+#if defined (__STDC__) && __STDC__
+#ifdef __GNU_LIBRARY__
+/* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+#endif /* __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+ const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind);
+
+/* Internal only. Users should not call this directly. */
+extern int _getopt_internal (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind,
+ int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GETOPT_H */
diff --git a/Master/texmf-dist/doc/texdraw/texdraw.cps b/Master/texmf-dist/doc/texdraw/texdraw.cps
new file mode 100644
index 00000000000..ea48e456f9e
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw.cps
@@ -0,0 +1,109 @@
+\initial {A}
+\entry {accessing \TeX{}draw}{3, 23}
+\entry {angle of a vector}{35}
+\entry {arcs}{12, 32}
+\entry {arrowhead parameters}{8}
+\entry {arrows}{7}
+\initial {B}
+\entry {Bezier curves}{14}
+\initial {C}
+\entry {circles}{12}
+\entry {command syntax}{5}
+\entry {coordinate parsing}{35}
+\entry {coordinate specification}{6}
+\entry {coordinate, symbolic}{18}
+\entry {coordinates}{6}
+\entry {cosine of a vector direction}{35}
+\entry {current position}{7, 21, 35}
+\entry {current position in PostScript}{31}
+\entry {curves}{14}
+\initial {D}
+\entry {dashed lines}{8}
+\entry {direction of a line}{35}
+\entry {distribution}{1}
+\entry {dotted lines}{8}
+\entry {drawing segments}{17}
+\entry {\code {dvi2ps} printer driver}{23}
+\entry {\code {dvialw} printer driver}{23}
+\entry {\code {dvilaser} printer driver}{23}
+\entry {\code {dvips} printer driver}{1, 23, 28}
+\entry {\code {dvipsone} printer driver}{23}
+\entry {\code {dvitops} printer driver}{23}
+\entry {\code {dviwindo} printer driver}{23}
+\initial {E}
+\entry {ellipses}{12}
+\entry {Encapsulated PostScript File}{28}
+\entry {errors while using \TeX{}draw}{25}
+\entry {example, arrow curve}{36}
+\entry {example, block diagram}{39}
+\entry {example, circle and ellipse}{44}
+\entry {example, graph}{42}
+\initial {F}
+\entry {fill operations, interaction with drawing segments}{17}
+\entry {filled circles}{12}
+\entry {filling regions}{15, 31}
+\initial {G}
+\entry {\code {graphics} package}{1, 3, 23, 28}
+\entry {graphics placement}{28}
+\entry {gray levels for lines}{8}
+\initial {I}
+\entry {implementation}{26}
+\entry {initial current position}{21}
+\entry {invoking \TeX{}draw}{3, 23}
+\initial {L}
+\entry {La\TeX{}}{1, 3, 23}
+\entry {length of a vector}{35}
+\entry {line cap}{31}
+\entry {line join}{31}
+\entry {line width}{8}
+\entry {lines}{7, 32}
+\entry {listing of commands}{47}
+\initial {M}
+\entry {moves}{7, 32}
+\initial {O}
+\entry {\code {oztex} printer driver}{23}
+\initial {P}
+\entry {painting regions}{15}
+\entry {paths}{15, 17, 31}
+\entry {\code {pctexps} printer driver}{23}
+\entry {\code {pctexwin} printer driver}{23}
+\entry {placement of graphics and text}{28}
+\entry {plain \TeX{}}{3}
+\entry {position specification}{6}
+\entry {positions, saving}{18}
+\entry {PostScript commands}{31}
+\entry {PostScript printer drivers}{23, 28}
+\entry {printer drivers}{23, 28}
+\entry {problems while using \TeX{}draw}{25}
+\entry {\code {psprint} driver}{23}
+\initial {R}
+\entry {relative positioning}{8}
+\entry {relative scaling}{19}
+\entry {resolution}{27}
+\entry {rotated text}{10, 23, 27, 28}
+\initial {S}
+\entry {saving positions}{18}
+\entry {scaling}{26}
+\entry {scaling coordinates}{19}
+\entry {segment scale}{19}
+\entry {segments}{17}
+\entry {sine of a vector direction}{35}
+\entry {size of the drawing}{21}
+\entry {stroking lines}{17, 31}
+\entry {symbolic coordinate}{18}
+\entry {syntax of commands}{5}
+\initial {T}
+\entry {\code {texdraw} package}{3, 23, 28}
+\entry {text commands}{10}
+\entry {text placement}{28}
+\entry {text rotation}{10, 23, 27, 28}
+\entry {\code {textures} printer driver}{23}
+\initial {U}
+\entry {unit scale}{19}
+\initial {V}
+\entry {vectors}{7}
+\entry {vertical text}{10}
+\initial {W}
+\entry {width of lines}{8}
+\initial {X}
+\entry {\code {xdvi} driver}{23}
diff --git a/Master/texmf-dist/doc/texdraw/texdraw.fns b/Master/texmf-dist/doc/texdraw/texdraw.fns
new file mode 100644
index 00000000000..3ec2274f466
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw.fns
@@ -0,0 +1,74 @@
+\initial {{\tt\indexbackslash }}
+\entry {\code {{\tt\indexbackslash }arc}}{13}
+\entry {\code {{\tt\indexbackslash }arrowheadsize}}{9}
+\entry {\code {{\tt\indexbackslash }arrowheadtype}}{9}
+\entry {\code {{\tt\indexbackslash }avec}}{8}
+\entry {\code {{\tt\indexbackslash }begin{\tt\char'173}texdraw{\tt\char'175}}}{5}
+\entry {\code {{\tt\indexbackslash }bsegment}}{17}
+\entry {\code {{\tt\indexbackslash }btexdraw}}{5}
+\entry {\code {{\tt\indexbackslash }centertexdraw}}{5}
+\entry {\code {{\tt\indexbackslash }clvec}}{14}
+\entry {\code {{\tt\indexbackslash }cossin}}{35}
+\entry {\code {{\tt\indexbackslash }currentpos}}{35}
+\entry {\code {{\tt\indexbackslash }drawbb}}{21}
+\entry {\code {{\tt\indexbackslash }drawdim}}{7}
+\entry {\code {{\tt\indexbackslash }end{\tt\char'173}texdraw{\tt\char'175}}}{5}
+\entry {\code {{\tt\indexbackslash }esegment}}{17}
+\entry {\code {{\tt\indexbackslash }etexdraw}}{5}
+\entry {\code {{\tt\indexbackslash }everytexdraw}}{5}
+\entry {\code {{\tt\indexbackslash }fcir}}{13}
+\entry {\code {{\tt\indexbackslash }fellip}}{13}
+\entry {\code {{\tt\indexbackslash }getpos}}{35}
+\entry {\code {{\tt\indexbackslash }htext}}{10}
+\entry {\code {{\tt\indexbackslash }ifill}}{15}
+\entry {\code {{\tt\indexbackslash }lcir}}{12}
+\entry {\code {{\tt\indexbackslash }lellip}}{13}
+\entry {\code {{\tt\indexbackslash }lfill}}{15}
+\entry {\code {{\tt\indexbackslash }linewd}}{8}
+\entry {\code {{\tt\indexbackslash }lvec}}{8}
+\entry {\code {{\tt\indexbackslash }move}}{8}
+\entry {\code {{\tt\indexbackslash }PSarc}}{32}
+\entry {\code {{\tt\indexbackslash }PSarcn}}{32}
+\entry {\code {{\tt\indexbackslash }PSclosepath}}{31}
+\entry {\code {{\tt\indexbackslash }PSfill}}{31}
+\entry {\code {{\tt\indexbackslash }PSlineto}}{32}
+\entry {\code {{\tt\indexbackslash }PSmoveto}}{32}
+\entry {\code {{\tt\indexbackslash }PSnewpath}}{31}
+\entry {\code {{\tt\indexbackslash }PSsetlinecap}}{31}
+\entry {\code {{\tt\indexbackslash }PSsetlinejoin}}{31}
+\entry {\code {{\tt\indexbackslash }PSstroke}}{31}
+\entry {\code {{\tt\indexbackslash }ravec}}{8}
+\entry {\code {{\tt\indexbackslash }realadd}}{36}
+\entry {\code {{\tt\indexbackslash }realdiv}}{36}
+\entry {\code {{\tt\indexbackslash }realmult}}{36}
+\entry {\code {{\tt\indexbackslash }relsegscale}}{20}
+\entry {\code {{\tt\indexbackslash }relunitscale}}{20}
+\entry {\code {{\tt\indexbackslash }rlvec}}{8}
+\entry {\code {{\tt\indexbackslash }rmove}}{8}
+\entry {\code {{\tt\indexbackslash }rtext}}{10}
+\entry {\code {{\tt\indexbackslash }savecurrpos}}{18}
+\entry {\code {{\tt\indexbackslash }savepos}}{18}
+\entry {\code {{\tt\indexbackslash }setgray}}{8}
+\entry {\code {{\tt\indexbackslash }setsegscale}}{20}
+\entry {\code {{\tt\indexbackslash }setunitscale}}{19}
+\entry {\code {{\tt\indexbackslash }textref}}{11}
+\entry {\code {{\tt\indexbackslash }vectlen}}{35}
+\entry {\code {{\tt\indexbackslash }vtext}}{10}
+\entry {\code {{\tt\indexbackslash }writeps}}{32}
+\initial {A}
+\entry {\code {arc}}{32}
+\entry {\code {arcn}}{32}
+\initial {C}
+\entry {\code {closepath}}{31}
+\initial {F}
+\entry {\code {fill}}{31}
+\initial {L}
+\entry {\code {lineto}}{32}
+\initial {M}
+\entry {\code {moveto}}{32}
+\initial {N}
+\entry {\code {newpath}}{31}
+\initial {S}
+\entry {\code {setlinecap}}{31}
+\entry {\code {setlinejoin}}{31}
+\entry {\code {stroke}}{31}
diff --git a/Master/texmf-dist/doc/texdraw/texdraw.pdf b/Master/texmf-dist/doc/texdraw/texdraw.pdf
new file mode 100644
index 00000000000..52fc2263f72
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/texdraw/texdraw.texi b/Master/texmf-dist/doc/texdraw/texdraw.texi
new file mode 100644
index 00000000000..05573b650e7
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw.texi
@@ -0,0 +1,2957 @@
+% -*-texinfo-*-
+
+% TeXdraw texinfo file
+% Edition 2.0
+
+% $Id: texdraw.texi,v 2.5 1995/12/19 texdraw-V2R0 $
+
+% To produce a TeX version of this manual, you must have the following
+% files accessible by TeX.
+% texdraw.texi - this file, the TeXdraw manual, part of the TeXdraw
+% distribution
+% texdraw.tex - the TeXdraw macros, part of the TeXdraw distribution
+% txdtools.tex - extra macros for TeXdraw, part of the TeXdraw
+% distribution
+% texinfo.tex - texinfo manual macros (distributed by FSF, for instance
+% with the GNUemacs editor). This version of the manual has
+% been tested with version 2.145 of texinfo.tex. The file
+% texinfo.tex is available by anonymous ftp as
+% pub/gnu/texinfo-3.6.tar.Z on prep.ai.mit.edu.
+%
+\input texdraw % bring in TeXdraw before texinfo changes "\" to "@"
+\input txdtools
+
+\input texinfo @c -*-texinfo-*-
+@comment %**start of header
+@setfilename texdraw
+@settitle @TeX{}draw
+@comment %**end of header
+
+@ifinfo
+This file documents @TeX{}draw, a system for producing PostScript drawings
+from @TeX{}.
+
+Copyright @copyright{} 1993-95 Peter Kabal
+
+Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+@ignore
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries a copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+
+@end ignore
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+@end ifinfo
+
+@setchapternewpage odd
+@titlepage
+@title @TeX{}draw
+@subtitle PostScript Drawings from @TeX{}
+@subtitle Edition 2.0
+@subtitle December 1995
+
+@author Peter Kabal
+
+@page
+@vskip 0pt plus 1filll
+Copyright @copyright{} 1993-95 Peter Kabal
+
+@sp 2
+This is edition 2.0 of the documentation for the @TeX{}draw macros for
+the @TeX{} typesetting program.
+@sp 2
+
+Peter Kabal @*
+Department of Electrical Engineering @*
+McGill University @*
+3480 University @*
+Montreal, Quebec @*
+Canada {} H3A@thinspace 2A7
+
+@code{kabal@@TSP.EE.McGill.CA}
+
+@sp 2
+Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+@end titlepage
+
+
+@ifinfo
+@node Top, Introduction, (dir), (dir)
+@top TeXdraw
+
+@TeX{}draw is a collection of macros that allow drawings to be created
+from @emph{within} @TeX{}.
+
+This is edition 2.0 of the @TeX{}draw documentation.
+@end ifinfo
+
+@menu
+* Introduction::
+* TeXdraw Commands::
+* Drawing Segments and Scaling::
+* Using TeXdraw with LaTeX::
+* More Details::
+* PostScript Commands::
+* TeXdraw Toolbox::
+* Examples::
+* Command Listing::
+
+Indices
+* Concept Index::
+* Command Index::
+
+ --- The Detailed Node Listing ---
+
+Introduction
+
+* Distribution::
+
+TeXdraw Commands
+
+* Accessing TeXdraw::
+* Command syntax::
+* TeXdraw coordinates::
+* Coordinate specification::
+* Line vectors::
+* TeX text::
+* Circles and arcs::
+* Bezier curves::
+* Fill commands::
+
+Drawing Segments and Scaling
+
+* Drawing segments::
+* Drawing paths::
+* Saving positions::
+* Scaling coordinates::
+* Drawing size::
+* Initial current position::
+
+Using TeXdraw with LaTeX
+
+* PostScript printer drivers::
+
+More Details
+
+* Errors while using TeXdraw::
+* Extending TeXdraw::
+* How TeXdraw merges graphics and text::
+
+Extending TeXdraw
+
+* Scaling::
+* Resolution::
+* Text placement::
+* Intermediate PostScript file::
+
+PostScript Commands
+
+TeXdraw Toolbox
+
+* Coordinate parsing::
+* Real arithmetic::
+* Arrow curve::
+
+Examples
+
+* Block diagram::
+* Filter response graph::
+* Geometric construction::
+
+Command Listing
+
+Command Index
+
+Concept Index
+@end menu
+
+
+@node Introduction, TeXdraw Commands, Top, Top
+@chapter Introduction
+
+@TeX{} is a powerful typesetting program which allows for complex text
+layouts but by itself lacks a general graphics capability. However,
+when coupled with an appropriate printer driver program, external
+graphics files can be inserted into the printed document. In this mode,
+@TeX{} is instructed to leave space for a drawing. The drawing is
+inserted by the printer driver program. The @TeX{}draw macros described
+here generate the external graphics file from within @TeX{} and generate
+the instructions to the the print driver program to position the
+graphics at the appropriate position on the page.
+
+@TeX{}draw consists of a set of @TeX{} macros that create line drawings
+and other figures. The drawing primitives include solid lines,
+patterned lines, Bezier curves, circles and arrows. Other commands
+allow for the filling of a region with a gray level. The drawing
+commands generate PostScript code. This limits @TeX{}draw to systems
+which use PostScript printers. @TeX{}draw also provides commands to
+position @TeX{} text, including mathematics, on the drawing. The final
+drawing, with text and graphics, can be positioned on the page like any
+other @TeX{} box.
+
+@cindex @code{dvips} printer driver
+@cindex La@TeX{}
+@cindex @code{graphics} package
+The basic @TeX{}draw macros for @TeX{} use the @code{\special} syntax
+recognized by the printer driver program @code{dvips}. However, when
+invoked as a La@TeX{}2e package, the @TeX{}draw macros can be used with
+any of the PostScript printer driver programs supported by the standard
+@code{graphics} package for La@TeX{}2e.
+
+The basic @TeX{}draw macros provide only simple drawing commands.
+However, @TeX{}draw provides a drawing segment environment which allows
+parameter changes and coordinate scaling changes to be kept local to the
+drawing segment. This facility, together with @TeX{}'s macro
+capabilities allows one to modularize drawing units and extend
+@TeX{}draw by building more complex graphics entities from simpler
+elements.
+
+@menu
+* Distribution::
+@end menu
+
+@node Distribution, , , Introduction
+@section Distribution information
+@cindex distribution
+
+The @TeX{}draw routines are provided free of charge without warranty of
+any kind. Note that the @TeX{}draw routines are copyrighted. They may
+be distributed freely provided that the recipients also acquire the
+right to distribute them freely. The notices to this effect must be
+preserved when the source files are distributed.
+
+
+@node TeXdraw Commands, Drawing Segments and Scaling, Introduction, Top
+@chapter Using the @TeX{}draw Commands
+
+The main @TeX{}draw macros (commands) are defined in the file
+@file{texdraw.tex}. These macros may be used directly in @TeX{}. The
+file @file{texdraw.sty} provides an interface for use with La@TeX{}2e.
+The following sections describe the basic commands for @TeX{}draw.
+
+@menu
+* Accessing TeXdraw::
+* Command syntax::
+* TeXdraw coordinates::
+* Coordinate specification::
+* Line vectors::
+* TeX text::
+* Circles and arcs::
+* Bezier curves::
+* Fill commands::
+@end menu
+
+@node Accessing TeXdraw, Command syntax, , TeXdraw Commands
+@section Accessing @TeX{}draw
+@cindex accessing @TeX{}draw
+@cindex invoking @TeX{}draw
+
+@cindex plain @TeX{}
+@cindex La@TeX{}
+The form of the user command to run the @TeX{} program depends on which
+version of @TeX{} is being used, and which other macro packages are
+preloaded as format files. Typically, installations have at least two
+versions of @TeX{} --- plain @TeX{} which includes basic typesetting
+macros (usually invoked as @file{tex}) and La@TeX{}2e which includes the
+La@TeX{}2e typesetting macros (usually invoked as @file{latex}). An
+older version of La@TeX{}, version 2.09, may also be available. The
+@TeX{}draw macros can be used with plain @TeX{} and with either version
+of La@TeX{}.
+
+For use with plain @TeX{}, the user must read in the @TeX{}draw macros
+from the file @file{texdraw.tex}.
+@example
+@group
+\input texdraw % Read in the TeXdraw macros
+ ...
+\btexdraw
+ ... % TeXdraw commands to generate a drawing
+\etexdraw
+@end group
+@end example
+
+For use with La@TeX{} version 2.09, the user reads in the @TeX{}draw
+macros from the file @file{texdraw.tex} and optionally defines the
+@code{\begin@{texdraw@}} / @code{\end@{texdraw@}} environment.
+@example
+@group
+\documentstyle[11pt]@{article@} % Article style with the 11pt size options
+...
+\input texdraw % Read in the TeXdraw macros
+\newenvironment@{texdraw@}@{\leavevmode\btexdraw@}@{\etexdraw@}
+ ...
+\begin@{texdraw@}
+ ... % TeXdraw commands to generate a drawing
+\end@{texdraw@}
+...
+\end@{document@}
+@end group
+@end example
+
+@cindex @code{texdraw} package
+@cindex @code{graphics} package
+For use with La@TeX{}2e, the user must load the @code{texdraw} package
+(file @file{texdraw.sty}). This package file defines the
+@code{\begin@{texdraw@}} / @code{\end@{texdraw@}} environment, brings in
+the standard @code{graphics} package and reads in the file
+@file{texdraw.tex} containing the definitions of the @TeX{}draw macros.
+@example
+@group
+\documentclass[11pt]@{article@} % Article class with the 11pt size option
+\usepackage@{texdraw@} % TeXdraw commands
+
+\begin@{document@}
+ ...
+\begin@{texdraw@}
+ ... % TeXdraw commands to generate a drawing
+\end@{texdraw@}
+ ...
+\end@{document@}
+@end group
+@end example
+
+As the @TeX{}draw commands are processed by @TeX{}, an intermediate
+PostScript file is generated. The intermediate PostScript has a name of
+the form @file{@var{name}.ps1}. The name part is derived from the name
+of the main @TeX{} file being processed. If more than one drawing is
+produced, the digit in the file name extension is
+incremented.@footnote{After the ninth PostScript file, the name of the
+intermediate PostScript file takes the form @file{@var{name}.p10}, with
+the number increasing from 10 with each file.}
+
+The @TeX{}draw commands to produce a drawing are inserted between
+@code{\btexdraw} and @code{\etexdraw} commands, or for La@TeX{}, between
+@code{\begin@{texdraw@}} and @code{\end@{texdraw@}} commands. This
+results in a @TeX{} box of appropriate size containing the drawing
+generated by the @TeX{}draw commands. The @TeX{}draw box can be
+positioned in a document like any other @TeX{} box.
+
+The @code{\centertexdraw@{...@}} macro centers the box generated by
+@TeX{}draw. The vertical space taken up is equal to the vertical size
+of the drawing. The @code{\centertexdraw} macro is normally used in
+vertical mode (between paragraphs). A @code{\par} command (a blank line
+will do also) before a @code{\centertexdraw} command will terminate
+horizontal mode and return to vertical mode. For La@TeX{}, a structured
+equivalent to the @code{\centertexdraw@{...@}} command is shown below.
+@example
+@group
+\begin@{center@}
+\begin@{texdraw@}
+ ...
+\end@{texdraw@}
+\end@{center@}
+@end group
+@end example
+
+The @code{\everytexdraw} command can be used to define a set of
+@TeX{}draw commands that will be executed at the beginning of every
+@TeX{}draw drawing. It is invoked as @code{\everytexdraw@{ ...@}},
+with the desired @TeX{}draw commands as arguments.
+
+@table @code
+@findex \btexdraw
+@item \btexdraw
+Start a @TeX{}draw drawing. The drawing is terminated with an
+@code{\etexdraw} command.
+@findex \etexdraw
+@item \etexdraw
+End a @TeX{}draw drawing started with a @code{\btexdraw} command. The
+resulting @TeX{}draw drawing is placed in a box with height equal to the
+height of the drawing and width equal to the width of the drawing. The
+depth of the box is zero.
+@findex \begin@{texdraw@}
+@item \begin@{texdraw@}
+Start a @TeX{}draw drawing. The drawing is terminated with an
+@code{\end@{texdraw@}} command. This command is for use with La@TeX{}.
+@findex \end@{texdraw@}
+@item \end@{texdraw@}
+End a @TeX{}draw drawing started with a @code{\begin@{texdraw@}}
+command. The resulting @TeX{}draw drawing is placed in a box with
+height equal to the height of the drawing and width equal to the width
+of the drawing. The depth of the box is zero. This command is for use
+with La@TeX{}.
+@findex \centertexdraw
+@item \centertexdraw@{ ... @}
+Center a @TeX{}draw box horizontally. The argument contains @TeX{}draw
+commands. The resulting box has the horizontal size @code{\hsize} and
+height equal to the height of the drawing.
+@findex \everytexdraw
+@item \everytexdraw@{ ... @}
+Specify @TeX{}draw commands to be executed at the beginning of every
+@TeX{}draw drawing.
+@end table
+
+@node Command syntax, TeXdraw coordinates, Accessing TeXdraw, TeXdraw Commands
+@section Command syntax
+@cindex command syntax
+@cindex syntax of commands
+
+Generally @TeX{}draw commands that take a single argument need a
+terminating blank or newline after the argument. Arguments that are
+self-delimiting, such as coordinates within parentheses and text within
+braces, do not need the terminating blank. However, even when not
+needed by the defining syntax of the command, blanks following command
+arguments are allowed and ignored within the @TeX{}draw environment.
+
+On entering the @TeX{}draw environment, @TeX{} is in internal vertical
+mode (vertical mode inside a @code{\vbox}). In this mode, spaces can be
+placed freely between commands. However, any other extraneous input
+that generates output that is not part of the @TeX{}draw environment is
+disallowed.
+
+Blank lines are interpreted as paragraph breaks, equivalent to a
+@code{\par} command. The @TeX{}draw macro @code{\centertexdraw} is
+defined with the @code{\long} attribute to allow @code{\par} commands
+and blank lines to be interspersed between @TeX{}draw commands. The
+@code{\btexdraw} and @code{\etexdraw} commands also allow @code{\par}
+command and blank lines to be included.
+
+@node TeXdraw coordinates, Coordinate specification, Command syntax, TeXdraw Commands
+@section @TeX{}draw coordinates
+@cindex coordinates
+
+The @TeX{}draw coordinate system has increasing @var{x} to the right and
+increasing @var{y} upward. The coordinates (without the unit) are
+floating point numbers. Integer values can be written without a decimal
+point. The size of the drawing is determined by the maximum excursions
+of the coordinates specified in @TeX{}draw commands.
+@tex
+\bigskip
+\centertexdraw{
+ \avec (0 0.8) \textref h:C v:B \htext (0 0.9){\sl y}
+ \move (0 0) \avec (0.8 0) \textref h:L v:C \htext(0.9 0){\sl x}
+ \move (0 1.0)}
+@end tex
+
+Consider the following example of @TeX{}draw commands to draw a simple
+figure.
+@example
+@group
+\centertexdraw@{
+ \drawdim cm \linewd 0.02
+ \move(2 2) \lvec(3 3) \lvec(2 4) \lvec(1 3) \lvec(2 2)
+ \textref h:C v:C \htext(2 3)@{$\sum \rho_n$@}
+@}
+@end group
+@end example
+@tex
+\bigskip
+\centertexdraw{
+ \drawdim{cm} \linewd 0.02
+ \move(2 2) \lvec(3 3) \lvec(2 4) \lvec(1 3) \lvec(2 2)
+ \textref h:C v:C \htext(2 3){$\sum \rho_n$}
+}
+@end tex
+This drawing uses units of centimetres, with a line width of 0.02 cm.
+The @var{x} coordinate ranges between 1 and 3 while the @var{y}
+coordinate ranges between 2 and 4. When included into a document, the
+size of the drawing is 2 cm by 2 cm. The drawing is placed in a @TeX{}
+box, with the lower lefthand corner of the box corresponding to
+@TeX{}draw coordinate @code{(1 2)} and the upper righthand corner at
+@code{(3 4)}. The @code{\centertexdraw} command centers the drawing
+horizontally. The @code{\textref} command controls the centering of the
+text. The text in this drawing is centered (both horizontally and
+vertically) at the coordinate @code{(2 3)}.
+
+@node Coordinate specification, Line vectors, TeXdraw coordinates, TeXdraw Commands
+@section Coordinate specification
+@cindex coordinate specification
+@cindex position specification
+
+Coordinates are specified within parentheses, with blanks (but no comma)
+between the values. Leading blanks and trailing blanks are permitted
+within the parentheses. The coordinates refer to units, which are
+specified by the @code{\drawdim} command. The default is inches, but
+any valid @TeX{} dimension unit can be specified. Symbolic
+specification of saved coordinate values will be discused later
+(@pxref{Saving positions}).
+
+@table @code
+@findex \drawdim
+@item \drawdim @var{dim}
+Set the units to @var{dim}. The argument @var{dim} can be any valid
+@TeX{} dimension unit. The units are used to interpret coordinate
+values. Examples of valid units: @code{cm}, @code{mm}, @code{in},
+@code{pt}, and @code{bp}.
+@end table
+
+Examples of coordinate and scaling specifications:
+@table @code
+@item \drawdim @{cm@} \move(2 2)
+Set the units to centimetres, move to a position 2 cm to the right and 2
+cm up from the origin of the drawing coordinate system.
+@item \drawdim bp
+Set the units to big points.
+@item \lvec ( 2.2 +5.5) \lvec(2.3 -2) \lvec(2.2 5.4 )
+Examples of acceptable coordinate specifications.
+@end table
+
+@node Line vectors, TeX text, Coordinate specification, TeXdraw Commands
+@section Line vectors
+@cindex lines
+@cindex vectors
+@cindex arrows
+@cindex moves
+@cindex current position
+
+@TeX{}draw implements moves, line vectors and arrow vectors. There are
+both absolute and relative motion versions of these vector commands.
+@TeX{}draw maintains a current position. Lines are drawn from the
+current position to a new coordinate, with the new coordinate becoming
+the new current position. An explicit move can be used to establish a
+new current position. The position @code{(0 0)} is used if there is no
+move to an initial current position.
+
+The @code{\move} and @code{\rmove} commands establish a new current
+position without drawing a line. The @code{\lvec} and @code{\rlvec}
+commands draw a line from the current position to a new position, which
+then becomes the new current position. The @code{\avec} and
+@code{\ravec} commands draw a line with an arrowhead from the current
+position to a new coordinate, which then becomes the new current
+position. The tip of the arrow is at the new current position. The
+direction of the arrow follows the direction of the line. Since this
+direction is undefined for zero length vectors, these are not allowed
+for @code{\avec} or @code{\ravec}. Zero length arrow vectors will
+generate a PostScript print error: @code{undefinedresult}. For any
+non-zero length vector, the full size arrowhead is drawn, even if that
+arrowhead is longer than the line length.
+
+The absolute motion versions of these commands specify the coordinate of
+the final position.
+
+@table @code
+@findex \move
+@item \move (@var{x} @var{y})
+Move to coordinate @code{(@var{x} @var{y})}. The new current position
+is @code{(@var{x} @var{y})}.
+@findex \lvec
+@item \lvec (@var{x} @var{y})
+Draw a line from the current position to coordinate @code{(@var{x}
+@var{y})}. The new current position is @code{(@var{x} @var{y})}.
+@findex \avec
+@item \avec (@var{x} @var{y})
+Draw a line with an arrowhead from the current position to
+@code{(@var{x} @var{y})}. The new current position is @code{(@var{x}
+@var{y})}. The arrowhead is aligned with the line, with the tip at
+@code{(@var{x} @var{y})}.
+@end table
+
+@cindex relative positioning
+The relative motion versions of these commands interpret the coordinates
+as displacements relative to the current position. Given the
+displacements @code{(@var{dx} @var{dy})} as a parameter, each of the
+relative motion commands moves @var{dx} units in the @var{x} direction
+and @var{dy} units in the @var{y} direction.
+
+@table @code
+@findex \rmove
+@item \rmove (@var{dx} @var{dy})
+Move from the current position, @var{dx} units in the @var{x} direction
+and @var{dy} units in the @var{y} direction. The final position becomes
+the new current position.
+@findex \rlvec
+@item \rlvec (@var{dx} @var{dy})
+Draw a line from the current position, @var{dx} units in the @var{x}
+direction and @var{dy} units in the @var{y} direction. The final
+position becomes the new current position.
+@findex \ravec
+@item \ravec (@var{dx} @var{dy})
+Draw a line with an arrowhead from the current position, @var{dx} units
+in the @var{x} direction and @var{y} units in the @var{y} direction.
+The final position becomes the new current position. The arrowhead is
+aligned with the line, with the tip at the new current position.
+@end table
+
+Lines can be customized with commands to change the line width, line
+pattern and line gray level rendition. In addition, commands for
+changing the type and size of the arrowhead are available.
+
+@cindex line width
+@cindex width of lines
+@cindex dashed lines
+@cindex dotted lines
+@cindex gray levels for lines
+@cindex arrowhead parameters
+@table @code
+@findex \linewd
+@item \linewd @var{width}
+Set the line width to @var{width} units. Initially @var{width} is 0.01
+inches (corresponding to 3 pixels at 300 pixels to the inch).
+@item \lpatt (@var{pattern})
+Set lines to have the pattern @code{(@var{pattern})}. A pattern is a
+sequence of on/off lengths separated by blanks and enclosed in parentheses.
+The lengths alternately specify the length of a dash and the length of a
+gap between dashes. Each length is interpreted using the current
+scaling and drawing units. The pattern is used cyclically. The empty
+pattern signifies a solid line. The initial line pattern is a solid
+line, corresponding to the empty pattern @code{\lpatt ()}.
+@findex \setgray
+@item \setgray @var{level}
+Set the gray level of lines. Gray levels are real values from 0 (black)
+through intermediate values (gray) to 1 (white). The initial gray level
+is 0 corresponding to black.
+@findex \arrowheadtype
+@item \arrowheadtype t:@var{type}
+Set the arrowhead type to @var{type}, where @var{type} is one of
+@code{F}, @code{T}, @code{W}, @code{V}, or @code{H}. There are two
+kinds of arrowheads. The first kind is a triangle. There are 3
+variants: type @code{T} is an empty triangle, type @code{F} is a filled
+triangle (using the current gray level for lines), type @code{W} is a
+triangle filled with white. The second kind of arrowhead is an open
+ended Vee. There are 2 variants: type @code{V} has the stem continue to
+the tip, type @code{H} has the stem stop at the base of the arrowhead.
+The initial arrowhead type is @code{T}.
+@findex \arrowheadsize
+@item \arrowheadsize l:@var{length} w:@var{width}
+Set the arrowhead size to be @var{length} units long and @var{width}
+units wide. The width is measured across the ``base'' of the arrowhead.
+The initial arrowhead size has a @var{length} of 0.16 inches and a
+@var{width} of 0.08 inches.
+@end table
+
+Note that the lines which outline the arrowhead will be drawn with the
+same line pattern used for the stem. Normally, arrow vectors are drawn
+with the line pattern set for a solid line. Note that the fill level
+used for the @code{F} variant of the arrowhead uses the same gray level
+as used for lines. The difference between the @code{T} variant and the
+@code{W} variant only shows up if the arrowhead is placed over non-white
+areas of the drawing. The @code{W} variant obliterates the area under
+the arrowhead.
+
+Examples of line parameter and arrowhead settings are shown in the
+following code.
+@example
+@group
+\centertexdraw@{
+ \drawdim in
+ \linewd 0.03 \setgray 0.6 \arrowheadtype t:F \avec(0 0.5)
+ \linewd 0.01 \setgray 0 \arrowheadtype t:V \avec(0.5 0.5)
+ \linewd 0.015 \lpatt(0.067 0.1) \lvec (1 0)
+ \linewd 0.02 \lpatt() \arrowheadtype t:T \avec(1.5 0.5)
+ \arrowheadtype t:H \avec(2.0 0.5)
+ \setgray 0.4 \arrowheadtype t:W \avec(3.0 0)
+@}
+@end group
+@end example
+@tex
+\bigskip
+\centertexdraw{
+ \drawdim in
+ \linewd 0.03 \setgray 0.6 \arrowheadtype t:F \avec(0.5 0.5)
+ \linewd 0.01 \setgray 0 \arrowheadtype t:V \avec(1.0 0.5)
+ \linewd 0.015 \lpatt(0.067 0.1) \lvec (1.5 0)
+ \linewd 0.02 \lpatt() \arrowheadtype t:T \avec(2.0 0.5)
+ \arrowheadtype t:H \avec(2.5 0.5)
+ \setgray 0.4 \arrowheadtype t:W \avec(3.0 0)
+ \textref h:R v:T \htext (0.35 0.50){\tt t:F}
+ \textref h:R v:T \htext (1.0 0.43){\tt t:V}
+ \textref h:R v:T \htext (1.82 0.50){\tt t:T}
+ \textref h:R v:T \htext (2.5 0.43){\tt t:H}
+ \textref h:R v:B \htext (2.8 0){\tt t:W}
+}
+@end tex
+
+@node TeX text, Circles and arcs, Line vectors, TeXdraw Commands
+@section @TeX{} text
+@cindex text commands
+
+Text may be superimposed on the drawing. The text argument of the
+@code{\htext} command is in horizontal mode. This text can be ordinary
+text, math mode expressions, or even more complicated boxes consisting
+of tables and the like. The resulting @TeX{} text is placed in a box.
+The reference point of the box can be chosen to be one of nine
+locations: horizontally left, center or right; vertically top, center or
+bottom. The @code{\htext} command takes one of two forms.
+
+@table @code
+@findex \htext
+@item \htext (@var{x} @var{y})@{@var{text}@}
+@itemx \htext @{@var{text}@}
+The first form of this command places the @TeX{} text @var{text}
+horizontally with the text reference point at the coordinate
+@code{(@var{x} @var{y})}. The new current position is @code{(@var{x}
+@var{y})}. The second form of this command places the @TeX{} text
+@var{text} horizontally with the text reference point at the current
+position. The text reference point is set with the @code{\textref}
+command.
+@end table
+
+@cindex vertical text
+@cindex rotated text
+@cindex text rotation
+Text can be placed vertically using the @code{\vtext} command. The text
+argument is in horizontal mode. The @TeX{} text is placed in a box and
+then rotated counterclockwise. The reference point is the point in the
+box, @emph{before} rotation of the text. Not all PostScript printer
+drivers support vertical text.
+
+@table @code
+@findex \vtext
+@item \vtext (x y)@{@var{text}@}
+@itemx \vtext @{@var{text}@}
+The first form of this command places the @TeX{} text @var{text}
+vertically with the text reference point at the coordinate
+@code{(@var{x} @var{y})}. The new current position is @code{(@var{x}
+@var{y})}. The second form of this command places the @TeX{} text
+@var{text} vertically with the text reference point at the current
+position. In both cases, the @TeX{} text is placed in a box and the box
+is rotated counterclockwise by 90 degrees about the text reference
+point. The text reference point is set with the @code{\textref}
+command.
+@end table
+
+@cindex rotated text
+@cindex text rotation
+Text can be placed at an arbitrary angle using the @code{\rtext}
+command. The text argument is in horizontal mode. The @TeX{} text is
+placed in a box and then rotated counterclockwise. The reference point
+is the point in the box, @emph{before} rotation of the text. Not all
+PostScript printer drivers support rotated text.
+
+@table @code
+@findex \rtext
+@item \rtext td:@var{angle} (x y)@{@var{text}@}
+@itemx \rtext td:@var{angle} @{@var{text}@}
+The first form of this command places the @TeX{} text @var{text} at an
+angle with the text reference point at the coordinate @code{(@var{x}
+@var{y})}. The new current position is @code{(@var{x} @var{y})}. The
+second form of this command places the @TeX{} text @var{text} at an
+angle with the text reference point at the current position. In both
+cases, the @TeX{} text is placed in a box and the box is rotated
+counterclockwise by @var{angle} degrees about the text reference point.
+The text reference point is set with the @code{\textref} command.
+@end table
+
+The reference point for subsequent @TeX{} text in a @code{\htext},
+@code{\vtext} or @code{\rtext} command is set with the @code{\textref}
+command.
+
+@table @code
+@findex \textref
+@item \textref h:@var{h-ref} v:@var{v-ref}
+Set the text reference point for subsequent text commands. The
+horizontal reference point @var{h-ref} is one of @code{L}, @code{C} or
+@code{R} (left, center or right). The vertical reference point
+@var{v-ref} is one of @code{T}, @code{C} or @code{B} (top, center or
+bottom). For rotated text, the reference point is determined before
+rotation. The initial text reference point corresponds to
+@code{\textref h:L v:B}.
+@end table
+@noindent
+
+@tex
+\centertexdraw{
+ \def\bdot {\bsegment
+ \fcir f:0 r:0.02
+ \esegment}
+ \def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 +0.06){#1}
+ \esegment}
+ \def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.06){#1}
+ \esegment}
+ \def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.08 0){#1}
+ \esegment}
+ \def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.08 0){#1}
+ \esegment}
+ \move (-1.5 0)
+ \bsegment
+ \move (+1.55 +0.45) \move (-1.55 -0.45) \move (0 0)
+ \Ttext{Horizontal Text}
+ \bdot \Btext{\tt h:C v:C}
+ \move (-0.9 0) \bdot \Ltext{\tt h:L v:C}
+ \move (+0.9 0) \bdot \Rtext{\tt h:R v:C}
+ \move (0 +0.3) \bdot \Ttext{\tt h:C v:T}
+ \move (0 -0.3) \bdot \Btext{\tt h:C v:B}
+ \move (-0.9 -0.3) \bdot \Ltext{\tt h:L v:B}
+ \lvec (-0.9 +0.3) \bdot \Ltext{\tt h:L v:T}
+ \lvec (+0.9 +0.3) \bdot \Rtext{\tt h:R v:T}
+ \lvec (+0.9 -0.3) \bdot \Rtext{\tt h:R v:B}
+ \lvec (-0.9 -0.3)
+ \esegment
+ \def\atext {\rtext td:45 }
+ \def\ATtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:C v:B \atext (-0.06 +0.06){#1}
+ \esegment}
+ \def\ABtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:C v:T \atext (+0.060 -0.06){#1}
+ \esegment}
+ \def\ALtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:R v:C \atext (-0.08 -0.08){#1}
+ \esegment}
+ \def\ARtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:L v:C \atext (+0.08 +0.08){#1}
+ \esegment}
+ \move (+1.5 0)
+ \bsegment
+ \move (+1.33 +1.33) \move (-1.33 -1.33) \move (0 0)
+ \setsegscale 0.707
+ \ATtext{Rotated Text}
+ \bdot \ABtext{\tt h:C v:C}
+ \move (-0.9 -0.9) \bdot \ALtext{\tt h:L v:C}
+ \move (+0.9 +0.9) \bdot \ARtext{\tt h:R v:C}
+ \move (-0.3 +0.3) \bdot \ATtext{\tt h:C v:T}
+ \move (+0.3 -0.3) \bdot \ABtext{\tt h:C v:B}
+ \move (-0.6 -1.2) \bdot \ALtext{\tt h:L v:B}
+ \lvec (-1.2 -0.6) \bdot \ALtext{\tt h:L v:T}
+ \lvec (+0.6 +1.2) \bdot \ARtext{\tt h:R v:T}
+ \lvec (+1.2 +0.6) \bdot \ARtext{\tt h:R v:B}
+ \lvec (-0.6 -1.2)
+ \esegment
+}
+@end tex
+
+The font used to render the text is determined as for any other @TeX{}
+text. Normally the font used outside of @TeX{}draw is in effect. If
+desired, other fonts can be specified as part of the text. Any font
+changes within a @TeX{}draw text command remain local to that command.
+
+Only the coordinate of the text reference point in a @code{\htext},
+@code{\vtext} or @code{\rtext} command is used in calculating the size
+of the drawing. This means that text itself can spill outside of the
+drawing area determined by @TeX{}draw. The area of the drawing can be
+increased to include the text by issuing additional @code{\move}
+commands.
+
+@example
+@group
+\centertexdraw@{
+ \avec(-0.75 -0.25) \textref h:R v:C \htext@{H-text@}
+ \move(0 0) \avec(-0.75 +0.25) \textref h:R v:B \htext@{H-text@}
+ \move(0 0) \avec(0 +0.5) \textref h:L v:T \vtext@{V-text@}
+ \move(0 0) \avec(+0.75 +0.25) \textref h:L v:B \htext@{H-text@}
+ \move(0 0) \avec(+0.75 -0.25) \textref h:L v:C \htext@{H-text@}
+@}
+@end group
+@end example
+@iftex
+Superimposed on this example is a shaded region showing the limits of
+the @TeX{}draw box as determined by the coordinates specified.
+@tex
+\bigskip
+\centertexdraw{
+ \move(-0.75 -0.25) \lvec (-0.75 +0.5) \lvec (+0.75 +0.5)
+ \lvec(+0.75 -0.25) \ifill f:0.9 % fill the region
+ \move(0 0)
+ \avec(-0.75 -0.25) \textref h:R v:C \htext{H-text}
+ \move(0 0) \avec(-0.75 +0.25) \textref h:R v:B \htext{H-text}
+ \move(0 0) \avec(0 +0.5) \textref h:L v:T \vtext{V-text}
+ \move(0 0) \avec(+0.75 +0.25) \textref h:L v:B \htext{H-text}
+ \move(0 0) \avec(+0.75 -0.25) \textref h:L v:C \htext{H-text}
+ \move (-1.15 -0.3) \move (+1.15 +0.92) % increase the size of the drawing
+}
+@end tex
+@end iftex
+
+@node Circles and arcs, Bezier curves, TeX text, TeXdraw Commands
+@section Circles, ellipses and arcs
+@cindex circles
+@cindex filled circles
+@cindex ellipses
+@cindex arcs
+
+@TeX{}draw supplies commands to generate circles, ellipses and arcs.
+There are two forms of the circle command. The @code{\lcir} command
+draws a circle of given radius. The @code{\fcir} command draws a filled
+circle. In the latter case, the circle is filled by a specified gray
+level. For the filled circle, the line defining the circumference of
+the circle is not drawn. Note that the gray level area filled in by the
+@code{\fcir} command is opaque, even if the fill is chosen to be white.
+For either form of the circle command, the drawing size is increased if
+necessary to contain the circle.
+
+The @code{\lellip} command generates an ellipse specified by the radius
+of the ellipse in the @var{x} direction and the radius of the ellipse in
+the @var{y} direction. The ellipse is symmetrical about horizontal and
+vertical lines drawn through the current point. The @code{\fellip}
+command draws a filled ellipse. In the latter case, the ellipse is
+filled by a specified gray level. For the filled ellipse, the line
+defining the boundary of the ellipse is not drawn. For either form of
+the ellipse command, the drawing size is increased if necessary to
+contain the ellipse.
+
+
+The @code{\larc} command generates a counterclockwise arc specified by a
+start angle in degrees and an end angle in degrees. The center of the
+arc is the current position. Only the arc is drawn, not the line
+joining the center to the beginning of the arc. Note that the
+@code{\larc} command does not affect the size of the drawing.
+
+@table @code
+@findex \lcir
+@item \lcir r:@var{radius}
+Draw a circle with center at the current position. The radius is
+specified by @var{radius}. This command draws a line along the
+circumference of the circle. The drawing size is increased if necessary
+to contain the circle.
+@findex \fcir
+@item \fcir f:@var{level} r:@var{radius}
+Draw a filled circle with center at the current position. The radius is
+specified by @var{radius}. The circle is painted with the gray level
+specified by @var{level}. A gray level of 1 corresponds to white, with
+decreasing values getting darker. The level 0 is full black. This
+command does not draw a line along the circumference. The drawing size
+is increased if necessary to contain the circle.
+@findex \lellip
+@item \lellip rx:@var{x-radius} ry:@var{y-radius}
+Draw an ellipse with center at the current position. The radius in the
+@var{x} direction is specified by @var{x-radius}. The radius in the
+@var{y} direction is specified by @var{y-radius}. The drawing size is
+increased if necessary to contain the ellipse.
+@findex \fellip
+@item \fellip f:@var{level} rx:@var{x-radius} ry:@var{y-radius}
+Draw a filled ellipse with center at the current position. The radius
+in the @var{x} direction is specified by @var{x-radius}. The radius in
+the @var{y} direction is specified by @var{y-radius}. The ellipse is
+painted with the gray level specified by @var{level}. A gray level of 1
+corresponds to white, with decreasing values getting darker. The level
+0 is full black. This command does not draw a line along the boundary
+of the ellipse. The drawing size is increased if necessary to contain
+the ellipse.
+@findex \arc
+@item \larc r:@var{radius} sd:@var{start-angle} ed:@var{end-angle}
+Draw a counterclockwise arc. The center of the arc is at the current
+position. The radius is specified by @var{radius}. The start and end
+angles (in degrees) are specified by @var{start-angle} and
+@var{end-angle}. This command does not affect the limits (size) of the
+drawing.
+@end table
+
+As an example, the following commands draw a filled circle, and
+superimpose an arc.
+@example
+@group
+\centertexdraw@{
+ \linewd 0.02
+ \fcir f:0.7 r:1
+ \larc r:1 sd:45 ed:135
+ \lvec (+0.707 +0.707) \move (0 0) \lvec (-0.707 +0.707)
+@}
+@end group
+@end example
+@tex
+\bigskip
+\centertexdraw{
+ \linewd 0.02
+ \fcir f:0.7 r:1
+ \larc r:1 sd:45 ed:135
+ \lvec ( 0.707 0.707) \move (0 0) \lvec (-0.707 +0.707)
+}
+@end tex
+
+Note that for the arc command, the resulting figure can spill outside of
+the @TeX{}draw box as determined by the maximum excursions of the
+coordinates. Extra moves can be used to compensate for the size of the
+arc.
+
+@node Bezier curves, Fill commands, Circles and arcs, TeXdraw Commands
+@section Bezier curves
+@cindex Bezier curves
+@cindex curves
+
+Bezier curves in @TeX{}draw use 4 reference coordinates, two as the end
+points and two others to control the shape of the curve. Let the 4
+points be @code{(@var{x0} @var{y0})}, @code{(@var{x1} @var{y1})},
+@code{(@var{x2} @var{y2})} and @code{(@var{x3} @var{y3})}. The curve
+starts out tangent to the line joining the first two points and ends up
+tangent to the line joining the second two points. The control points
+``pull'' at the curve to control the curvature. The amount of pull
+increases with the distance of the control point from the endpoint.
+
+@tex
+As the parameter $\mu$ varies from 0 to 1, the coordinates of the Bezier
+curve are given by a pair of parametric cubic equations,
+$$
+\def\x #1{\hbox{\sl x#1}}
+\def\y #1{\hbox{\sl y#1}}
+\eqalign{
+ \x{}(\mu) &= (1-\mu)^3 \x0 + 3\mu(1-\mu)^2 \x1 + 3\mu^2(1-\mu) \x2 + \mu^3 \x3 \cr
+ \y{}(\mu) &= (1-\mu)^3 \y0 + 3\mu(1-\mu)^2 \y1 + 3\mu^2(1-\mu) \y2 + \mu^3 \y3\ . \cr}
+$$
+@end tex
+@ifinfo
+As the parameter u varies from 0 to 1, the coordinates of the Bezier
+curve are given by a pair of parametric cubic equations,
+
+@noindent
+x(u) = (1-u)^3 x0 + 3u (1-u)^2 x1 + 3u^2 (1-u) x2 + u^3 x3
+@noindent
+y(u) = (1-u)^3 y0 + 3u (1-u)^2 y1 + 3u^2 (1-u) y2 + u^3 y3 .
+
+@end ifinfo
+
+
+@table @code
+@findex \clvec
+@item \clvec (@var{x1} @var{y1})(@var{x2} @var{y2})(@var{x3} @var{y3})
+Draw a Bezier curve from the current position to the coordinate
+@code{(@var{x3} @var{y3})} which becomes the new current position. The
+coordinates @code{(@var{x1} @var{y1})} and @code{(@var{x2} @var{y2})}
+serve as control points for the curve. Only the last coordinate given
+is used to update the size of the drawing.
+@end table
+@noindent
+Note that only 3 coordinate pairs are specified. The other point is the
+current position before the @code{\clvec} command is executed. Only the
+last coordinate specified in the @code{\clvec} command is used to
+determine the extent of the drawing. While the Bezier curve passes
+through the old current position and the new current position, in
+general the curve will not reach the intermediate control points. The
+curve is always entirely enclosed by the convex quadrilateral defined by
+the two end points and the two control points. Note that the curve may
+pass outside the limits of the drawing as determined by the end point of
+the curve.
+
+A simple Bezier curve is produced by the following example.
+@example
+@group
+\btexdraw
+ \move (0 0)
+ \clvec (0 1)(1 0)(1 1)
+\etexdraw
+@end group
+@end example
+
+@iftex
+This example is the rightmost of the following Bezier curves. The
+drawings also show the end points and the control points for each curve.
+@tex
+\bigskip
+\centertexdraw{
+ \def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.08 0){#1}
+ \esegment}
+ \def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.08 0){#1}
+ \esegment}
+ \def\bdot {\fcir f:0 r:0.02 }
+ \def\Ldot #1{\bdot \Ltext{#1}}
+ \def\Rdot #1{\bdot \Rtext{#1}}
+ \move (-2 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1}
+ \lvec (1 1) \Rdot{2} \lvec (1 0) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0 1)(1 1)(1 0)
+ \esegment
+ \move (0 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0.5 0.8) \Ldot{1}
+ \lvec (1.5 0.8) \Rdot{2} \lvec (1 0) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0.5 1)(1.5 1)(1 0)
+ \esegment
+ \move ( 2 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1}
+ \lvec (1 0) \Rdot{2} \lvec (1 1) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0 1)(1 0)(1 1)
+ \esegment
+}
+@end tex
+@end iftex
+
+@node Fill commands, , Bezier curves, TeXdraw Commands
+@section Fill commands
+@cindex filling regions
+@cindex painting regions
+@cindex paths
+
+PostScript deals with paths consisting of line segments. The paths can
+be closed and the interior of the closed region filled. From
+@TeX{}draw, paths start with a @code{\move} or @code{\rmove} command and
+continue with @code{\lvec}, @code{\rlvec} or @code{\clvec} commands.
+The @TeX{}draw fill commands close the path and fill the interior of the
+closed region. Closing the path means that effectively another
+@code{\lvec} line is drawn from the last point specified to the initial
+point. @TeX{}draw provides two forms of the fill command. The
+@code{\ifill} fills the interior of the region with the given gray
+level. The lines defining the path are not drawn. The @code{\lfill}
+command fills the region defined by the closed path and draws a line
+along the enclosing path. Note for both forms of the fill command, the
+gray level used for filling is opaque, even if the gray level is chosen
+to be white.
+
+@table @code
+@findex \lfill
+@item \lfill f:@var{level}
+Close the current path, draw the line around the path using the current
+grey level for lines and paint the interior of the region with specified
+gray level @var{level}. Gray levels are real values from 0 (black)
+through intermediate values (grays) to 1 (white).
+@findex \ifill
+@item \ifill f:@var{level}
+Close the current path and paint the interior of the region with gray
+level @var{level}. The line around the path is not drawn. Gray levels
+are real values from 0 (black) through intermediate values (grays) to 1
+(white).
+@end table
+
+The following example draws a ``flag'' with the interior filled in. The
+path around the boundary is given in a clockwise order to define a
+closed path. We could take advantage of the fact that the fill command
+will close an open path to eliminate one of the @code{\lvec} commands.
+@example
+@group
+\centertexdraw@{
+\move (0.5 0)
+\lvec (0 0.5) \clvec (0.5 0.85)(1 0.65)(1.5 1)
+\lvec (2 0.5) \clvec (1.5 0.15)(1 0.35)(0.5 0)
+\lfill f:0.8
+@}
+@end group
+@end example
+@tex
+\bigskip
+\centertexdraw{
+\move (0.5 0)
+\lvec (0 0.5) \clvec (0.5 0.85)(1 0.65)(1.5 1)
+\lvec (2 0.5) \clvec (1.5 0.15)(1 0.35)(0.5 0)
+\lfill f:0.8
+}
+@end tex
+
+In @TeX{}draw, the @code{\move} command always terminates any previous
+paths and starts a new path. Commands that change line parameters
+(e.g@. @code{\setgray} or @code{\lpatt}) also terminate paths and start
+new paths. The circle, ellipse and arc commands do not affect the
+definition of the current path. The @code{\avec} command is not
+appropriate for defining a path to be filled. It ends a subpath at its
+tail and begins a new subpath at its tip. Filling a region defined by a
+path with subpaths is more complicated in that each subpath is closed
+before filling.
+
+
+@node Drawing Segments and Scaling, Using TeXdraw with LaTeX, TeXdraw Commands, Top
+@chapter Drawing Segments and Scaling
+
+@TeX{}draw provides individually scaled segments which can be used to
+create relocatable drawing modules.
+
+@menu
+* Drawing segments::
+* Drawing paths::
+* Saving positions::
+* Scaling coordinates::
+* Drawing size::
+* Initial current position::
+@end menu
+
+@node Drawing segments, Drawing paths, , Drawing Segments and Scaling
+@section Drawing segments
+@cindex segments
+@cindex drawing segments
+
+A @TeX{}draw drawing segment allows for local modifications of
+parameters and relative positioning. A @TeX{}draw segment is delimited
+by a @code{\bsegment} command and an @code{\esegment} command. Inside
+the segment, the initial current position is @code{(0 0)}. Any changes
+to parameters such as the gray level and the line width, remain local to
+the segment. Segments are implemented in @TeX{} using a
+@code{\begingroup} and @code{\endgroup}. Segments can be nested.
+
+@table @code
+@findex \bsegment
+@item \bsegment
+Start a drawing segment. The coordinate system is shifted such that the
+current position corresponds to the coordinate @code{(0 0)}. Changes to
+scaling, position and line parameters stay local to the drawing segment.
+@findex \esegment
+@item \esegment
+End a drawing segment. The current position in effect before the
+corresponding @code{\bsegment} command is restored. The scaling and
+line parameter values revert to those in effect before the corresponding
+@code{\bsegment} command was invoked.
+@end table
+
+@node Drawing paths, Saving positions, Drawing segments, Drawing Segments and Scaling
+@section Drawing paths
+@cindex fill operations, interaction with drawing segments
+@cindex paths
+@cindex stroking lines
+Certain subtle interactions occur between drawing segments and fill
+operations. In PostScript, lines are drawn by first defining a path,
+then later stroking the path to draw the line. In @TeX{}draw, this
+stroking occurs when the line is terminated, say by a @code{\move}
+command. PostScript paths are interrupted by, but continue after a
+drawing segment. This means that a path started before a segment may
+not be stroked (drawn) until after the segment ends. Consider the
+following example.
+@example
+@group
+\move (0 0)
+\lvec (1 1)
+\bsegment
+ \move (-0.25 -0.25)
+ \fcir f:0.8 r:0.5
+\esegment
+\move (0 0)
+@end group
+@end example
+A PostScript path is started at @code{(0 0)} and continues with a line
+to @code{(1 1)}. This path is interrupted by the segment. The filled
+circle is drawn next. After the segment, the path continues and is not
+stroked until the @code{\move (0 0)} command after the end of the
+segment. This means that the line appears on top of the filled region.
+
+If the fill operation is to cover the line, the path must be stroked
+before the fill operation. From @TeX{}draw, the move commands
+@code{\move} and @code{\rmove}, and the end @TeX{}draw command
+@code{\etexdraw} terminate a path and cause it to be stroked. Within a
+segment, the end segment command @code{\esegment} also terminates and
+strokes a path. In the example above, the line can be stroked by
+inserting a move command (such as a @code{\rmove (0 0)} which does not
+affect the position), before the start of the segment.
+
+@node Saving positions, Scaling coordinates, Drawing paths, Drawing Segments and Scaling
+@section Saving positions
+@cindex saving positions
+@cindex positions, saving
+@cindex coordinate, symbolic
+@cindex symbolic coordinate
+
+The @code{\savecurrpos} command saves the current position. The saved
+position is an absolute position, not one relative to a segment. The
+position saving mechanism is global; the position can be saved within a
+nested segment and then used outside of the segment. The @var{x} and
+@var{y} coordinates of the position are saved separately as named
+coordinates. The names are of the form @code{*@var{name}}, with the
+leading @code{*} being obligatory. A companion command,
+@code{\savepos}, saves a given coordinate (relative to the current
+segment) as an absolute symbolic position.
+
+@table @code
+@findex \savecurrpos
+@item \savecurrpos (*@var{px} *@var{py})
+Save the current position as the absolute position referenced by
+@code{(*@var{px} *@var{py})}.
+@findex \savepos
+@item \savepos (@var{x} @var{y})(*@var{px} *@var{py})
+Save the coordinate position @code{(@var{x} @var{y})} as the absolute
+position referenced by @code{(*@var{px} *@var{py})}. The coordinate
+@code{(@var{x} @var{y})} is interpreted in the normal fashion as a
+coordinate relative to the current segment, using the current scaling
+factors and drawing unit.
+@end table
+
+The symbolic names used to specify a saved position can consist of any
+characters that are not special to @TeX{}, but must start with a
+@code{*} character. The symbolic names can be used as the @var{x}
+and/or @var{y} coordinate in any command that needs a coordinate.
+Symbolic coordinates are not normally used with relative motion commands
+such as @code{\rlvec} or @code{\rmove}. If used with relative motion,
+the corresponding displacement is equal to the symbolic coordinate
+value.
+
+On exit from a segment, the position and graphics state on entry is
+restored. Any changes to line types, scaling and position are
+discarded. However, it is sometimes useful alter the position on exit
+from a segment. The @code{\savepos} command allows for the saving of a
+position within the segment. This position can be restored after the
+@code{\esegment} with a @code{\move} command using the saved symbolic
+position. This approach can be used to build modules which operate in a
+manner analogous to the basic relative motion line vector commands.
+
+The following example defines a macro which draws a box 0.75 inches wide
+by 0.5 inches high containing centered text. On leaving the macro the
+position will be set at a point on the righthand side of the box.
+@example
+@group
+\def\tbox #1@{\bsegment
+ \lvec (0 +0.25) \lvec (0.75 +0.25)
+ \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
+ \textref h:C v:C \htext (0.375 0)@{#1@}
+ \savepos (0.75 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)@}
+@end group
+@end example
+With this definition, we can treat @code{\tbox} in the same way as the
+basic vector commands, stringing them together to form a block diagram
+as in this example.
+@example
+@group
+\centertexdraw@{
+ \ravec (1 0) \tbox@{$H(z)$@} \ravec (1 0)
+@}
+@end group
+@end example
+@tex
+\def\tbox #1{\bsegment
+ \lvec (0 +0.25) \lvec (0.75 +0.25)
+ \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
+ \textref h:C v:C \htext (0.375 0){#1}
+ \savepos (0.75 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\bigskip
+\centertexdraw{
+ \ravec (1 0) \tbox{$H(z)$} \ravec (1 0)
+}
+@end tex
+
+@node Scaling coordinates, Drawing size, Saving positions, Drawing Segments and Scaling
+@section Scaling coordinates
+@cindex scaling coordinates
+@cindex relative scaling
+@cindex segment scale
+@cindex unit scale
+
+There are two scale factors available, the unit scale factor and the
+segment scale factor. The overall scale factor is the product of these
+two. There are absolute and relative versions of commands to change
+these scale factors.
+
+The unit scale factor is normally used to affect global scale changes.
+Changes to the unit scale factor remains local to a segment, but
+propagate to inferior segments. The default value is unity.
+
+The segment scale factor is used for local scale changes. It remains
+local to a segment. The segment scale factor is reset to unity on entry
+into each segment. This means that changes to the segment scale factor
+do not propagate to inferior segments.
+
+@table @code
+@findex \setunitscale
+@item \setunitscale @var{scale}
+Set the unit scaling to @var{scale}. The argument @var{scale} is a real
+number which is used to scale coordinate values. The overall scaling
+factor is the product of the unit scale factor and the segment scale
+factor.
+@findex \relunitscale
+@item \relunitscale @var{value}
+Adjust the unit scale factor by multiplying by @var{value}. This has
+the effect of multiplying the overall scale factor by the same factor.
+The overall scaling factor is the product of the unit scale factor and
+the segment scale factor.
+@findex \setsegscale
+@item \setsegscale @var{scale}
+Set the segment scale factor. The argument @var{scale} is a real number
+which is used to scale coordinate values. The overall scale factor is
+the product of the unit scale factor and the segment scale factor.
+@findex \relsegscale
+@item \relsegscale @var{value}
+Adjust the segment scale factor by multiplying by @var{value}. This has
+the effect of multiplying the current overall scale factor by the same
+factor. The overall scaling factor is the product of the unit scale
+factor and the segment scale factor.
+@end table
+
+In addition to the unit scale factor and the segment scale factor, the
+scaling can be controlled by the choice of drawing units with the
+command @code{\drawdim} (@pxref{Coordinate specification}).
+
+@table @code
+@item \drawdim cm \setunitscale 2.54
+Set the units to centimetres scaled by 2.54. Together these commands
+are effectively the same as @code{\drawdim in}.
+@end table
+
+The segment scale can be used to allow scale changes in segments so that
+values are in more convenient units. For example suppose dimensions in
+a segment are multiples of one third of an inch. The segment scale can
+be set once to make 1 drawing unit equal 0.3333 inches. From that point
+on, coordinates can be specified with integer values.
+
+The following example defines a macro to draw a rectangular box which is
+twice as wide as it is high. The width is specified as an argument.
+@example
+@group
+\def\mybox #1@{\bsegment
+ \setsegscale #1
+ \lvec (0 +0.25) \lvec (1 +0.25) \lvec (1 -0.25)
+ \lvec (0 -0.25) \lvec (0 0)
+ \esegment@}
+@end group
+@end example
+
+@node Drawing size, Initial current position, Scaling coordinates, Drawing Segments and Scaling
+@section Drawing size
+@cindex size of the drawing
+
+The effective size of the drawing is determined by the maximum
+excursions of the coordinates supplied to @TeX{}draw commands. The
+minimum and maximum scaled @var{x} and @var{y} coordinates are tallied.
+Note that @code{\move} commands contribute to the determination of the
+calculated size of the drawing, even though they do not generate visible
+lines. The circle and ellipse commands add a compensation for the radii
+of circles and ellipses. The final @TeX{}draw drawing is placed in a
+@TeX{} box with lower lefthand corner corresponding to
+@code{(}@var{x}-min @var{y}-min@code{)} and upper righthand corner at
+@code{(}@var{x}-max @var{y}-max@code{)}.
+
+Text generated by @code{\htext}, @code{\vtext} or @code{\rtext} can
+spill outside the box as determined above. Only the text reference
+point is guaranteed to be in the drawing box. Arcs can also spill
+outside the drawing box. Note also that the widths of lines, and the
+sizes of arrowheads do not affect the size of the drawing. The
+calculated size of the drawing will never be larger than the actual size
+of the drawing. In extreme cases in which text or lines extend far
+outside the drawing, extra @code{\move} commands should be used to
+establish the size of the drawing so that the @TeX{}draw box includes
+all of the drawing.
+
+@TeX{}draw provides the @code{\drawbb} command to draw a box which
+indicates the effective size of the drawing. Whenever @code{\drawbb} is
+invoked, a ruled box is drawn around the drawing as it has been sized up
+to that point. Normally @code{\drawbb} is invoked just before the end
+of a drawing to indicate the effective size of the final drawing.
+
+@table @code
+@findex \drawbb
+@item \drawbb
+Draw a ruled box around the effective size of a drawing produced by
+@TeX{}draw commands.
+@end table
+
+@node Initial current position, , Drawing size, Drawing Segments and Scaling
+@section Initial current position
+@cindex current position
+@cindex initial current position
+
+The first operation in a drawing should be a move to establish the
+current position. The current position can be established explicitly
+through a @code{\move} command or a text positioning command such as
+@code{\htext} with a coordinate. However, if an attempt is made to use
+a drawing command which needs a current position and none has been
+established, @TeX{}draw implicitly sets the initial current position to
+@code{(0 0)}. The size of the @TeX{}draw figure is normally determined
+from the sequence of coordinates specified, but will include the
+implicit initial position in case another initial position has not been
+explicitly specified.
+
+@node Using TeXdraw with LaTeX, More Details, Drawing Segments and Scaling, Top
+@chapter Using @TeX{}draw with La@TeX{}
+@cindex accessing @TeX{}draw
+@cindex invoking @TeX{}draw
+@cindex La@TeX{}
+@cindex @code{texdraw} package
+
+The La@TeX{} typesetting system uses a structured approach to declaring
+typesetting environments. For La@TeX{}2e, the @code{texdraw} package
+defines the @code{texdraw} environment. The @TeX{}draw environment is
+started with a @code{\begin@{texdraw@}} command and terminated with an
+@code{\end@{texdraw@}} command. All of the basic @TeX{}draw commands
+can be used within the @code{texdraw} environment.
+
+As an example, a La@TeX{}2e variant of an earlier example can be
+constructed as follows.
+@example
+@group
+\documentclass@{article@}
+\usepackage@{texdraw@}
+ ...
+\begin@{document@}
+ ...
+\newcommand@{\tbox@}[1]@{%
+ \bsegment
+ \lvec (0 +0.25) \lvec (0.75 +0.25)
+ \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
+ \textref h:C v:C \htext (0.375 0)@{#1@}
+ \savepos (0.75 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)@}
+\begin@{center@}
+\begin@{texdraw@}
+ \ravec (1 0) \tbox@{$H(z)$@} \ravec (1 0)
+\end@{texdraw@}
+\end@{center@}
+ ...
+\end@{document@}
+@end group
+@end example
+
+This example illustrates the use of the La@TeX{} command
+@code{\newcommand} as an alternative to the plain @TeX{} command
+@code{\def}. Instead of the basic @TeX{}draw command
+@code{\centertexdraw}, a nested combination of the La@TeX{} centering
+environment and the @TeX{}draw environment is used.
+
+@menu
+* PostScript printer drivers::
+@end menu
+
+@node PostScript printer drivers, , , Using TeXdraw with LaTeX
+@section PostScript printer drivers
+@cindex printer drivers
+@cindex PostScript printer drivers
+
+@cindex @code{graphics} package
+The @code{texdraw} package uses the printer driver interface provided by
+the standard La@TeX{}2e @code{graphics} package. Any options to the
+@code{texdraw} package are passed to the @code{graphics} package.
+Specifically, the name of the PostScript driver to be used can be
+specified as an option to the @code{texdraw} package. With no explicit
+printer driver option, the default printer driver associated with the
+@code{graphics} package is used.
+
+@cindex @code{dvips} printer driver
+@cindex @code{xdvi} driver
+@cindex @code{dvi2ps} printer driver
+@cindex @code{dvialw} printer driver
+@cindex @code{dvilaser} printer driver
+@cindex @code{dvipsone} printer driver
+@cindex @code{dviwindo} printer driver
+@cindex @code{dvitops} printer driver
+@cindex @code{oztex} printer driver
+@cindex @code{psprint} driver
+@cindex @code{textures} printer driver
+@cindex @code{pctexps} printer driver
+@cindex @code{pctexwin} printer driver
+@cindex rotated text
+@cindex text rotation
+The @code{texdraw} package can be used with any of the printer drivers
+supported by the @code{graphics} package that allow for the importation
+of PostScript graphics files, viz., @code{dvips}, @code{xdvi},
+@code{dvi2ps}, @code{dvialw}, @code{dvilaser}, @code{dvipsone},
+@code{dviwindo}, @code{dvitops}, @code{oztex}, @code{psprint},
+@code{textures}, @code{pctexps}, and @code{pctexwin}. Not all of these
+drivers support the text rotation needed for the @TeX{}draw commands
+@code{\vtext} and @code{\rtext}. Of the drivers listed above, only the
+following support support text rotation: @code{dvips}, @code{xdvi},
+@code{dvi2ps}, @code{dvitops}, @code{textures}, and @code{pctexps}.
+
+
+@node More Details, PostScript Commands, Using TeXdraw with LaTeX, Top
+@chapter More Details
+
+The first part of this chapter offers some suggestions for strategies to
+isolate errors in @TeX{} and @TeX{}draw input. The second part of this
+chapter discusses implementational issues. An awareness of these issues
+is useful if @TeX{}draw is to be extended.
+
+@menu
+* Errors while using TeXdraw::
+* Extending TeXdraw::
+* How TeXdraw merges graphics and text::
+@end menu
+
+@node Errors while using TeXdraw, Extending TeXdraw, , More Details
+@section Errors while using @TeX{}draw
+@cindex problems while using @TeX{}draw
+@cindex errors while using @TeX{}draw
+
+@TeX{} input is notoriously difficult to debug. If @TeX{} reports
+errors, so much the better. If the cause is not immediately obvious,
+consider using a binary search strategy, removing sections of code with
+the premature insertion of the @code{\bye} (or @code{\end@{document@}}
+for La@TeX{}) command (with the appropriate closing of any open groups
+and the like). Other strategies include the insertion of
+@code{\message@{I am here@}} at appropriate places. Try using
+@code{\tracingmacros=1}. Many problems turn out to be due to an
+incorrect number of macro arguments or incorrectly delimited macro
+arguments. The @code{\tracingmacros=1} option writes the macro
+arguments and macro expansions to the @TeX{} log file.
+
+Certain errors may not manifest themselves until well after the
+offending command. For instance, if a closing parenthesis is missing
+from a @TeX{}draw coordinate, @TeX{} continues searching for the
+parenthesis. If one is found, perhaps many lines later, the @TeX{}draw
+error message @code{invalid coordinate} will be printed at this later
+point.
+
+All input in the @TeX{}draw environment should be intended for
+interpretation by @TeX{}draw commands. @TeX{}draw places text inside a
+zero size box (the text itself extends outside the box). Extraneous
+input manifests itself as a non-zero size @TeX{}draw text box. This
+causes the @TeX{}draw text and the PostScript graphics to be displaced
+from one another. An error message is issued if a non-zero width
+@TeX{}draw text box is detected. If this error message appears, look
+for unintended character sequences amongst the commands to @TeX{}draw.
+
+Several @TeX{}draw commands pass their arguments ``raw'' to the
+PostScript file. That means that invalid arguments can generate
+PostScript errors when the document is printed. For instance the
+argument of the @code{\setgray} command is passed straight through to
+the PostScript file. If this argument is non-numeric, a PostScript
+error results. Not all PostScript printers report errors back to the
+user. The print may just stop prematurely. One approach to debugging
+is to use a PostScript previewer on a workstation. That way, one can
+determine at which point in the drawing the PostScript error occurs.
+
+@node Extending TeXdraw, How TeXdraw merges graphics and text, Errors while using TeXdraw, More Details
+@section Extending @TeX{}draw
+@cindex implementation
+
+@TeX{}draw is implemented using a combination of @TeX{} commands and
+PostScript code. This section discusses some of the implementational
+issues as they relate to extending @TeX{}draw.
+
+@TeX{}draw as implemented, offers a basic set of drawing features.
+These are adequate for certain tasks such as producing block diagrams.
+There are different approaches to extending @TeX{}draw to include other
+functions. In some cases, the desired functionality can be achieved by
+writing a @TeX{} macro which builds on top of the existing @TeX{}draw
+commands. As these extensions become more complex, the limitations of
+@TeX{} for computations become increasingly evident. In other cases,
+access to different features of PostScript is desired. The appropriate
+approach would be to write new PostScript procedures which can be
+accessed by @TeX{} macros.
+
+Included with @TeX{}draw is a set of macros for directly accessing
+PostScript functions. These are described in an appendix
+(@pxref{PostScript Commands}).
+
+@TeX{}draw also comes with a toolbox of routines for handling much of
+the user interface, converting between different coordinate
+representations and the like. The macros for coordinate decoding and
+for computations involving coordinates are described in an appendix
+(@pxref{TeXdraw Toolbox, , @TeX{}draw Toolbox}).
+
+@menu
+* Scaling::
+* Resolution::
+* Text placement::
+* Intermediate PostScript file::
+@end menu
+
+@node Scaling, Resolution, , Extending TeXdraw
+@subsection Scaling
+@cindex scaling
+
+The scaling commands provided in @TeX{}draw are designed to affect only
+the coordinate values specified in commands. For instance, changing the
+@code{\setunitscale} value changes the interpretation of the coordinate
+in an @code{\avec (@var{x} @var{y})} command, but does not change the
+line width or arrowhead sizes in effect. None of the @TeX{}draw scaling
+commands affect the size of @TeX{} text produced by, for instance, the
+@code{\htext} command. Scale changes will however affect the
+positioning of text for subsequent commands.
+
+The line parameters are changed only if the corresponding commands to
+change them are issued. If the @code{\linewd} command is given, the
+current coordinate scaling is used to determine the line width. To
+achieve a behaviour more like a global scaling, whenever the scale
+factor is changed, the line parameters should be set again.
+
+@node Resolution, Text placement, Scaling, Extending TeXdraw
+@subsection Resolution
+@cindex resolution
+
+@TeX{}draw scales coordinates before passing them to PostScript.
+Keeping track of the coordinate scaling is necessary, in any event, to
+allow @TeX{}draw to compute the maximum excursions of the coordinates.
+@TeX{}draw uses pixel units in its PostScript code. One pixel unit is
+equal to 1/300 of an inch. @TeX{}draw issues PostScript commands with
+integer valued pixel coordinates. This sets the positioning resolution
+for @TeX{}draw. The passing of integer valued coordinates which
+correspond to the device resolution keeps lines aligned with the device
+grid; parallel lines of the same width will be rendered with the same
+width.
+
+The position saving mechanism in @TeX{}draw (@pxref{Saving positions})
+associates the pixel coordinates of a position with the specified name.
+
+@TeX{}draw uses the limited real number representation provided by
+@TeX{}. These operations are based on the representation of dimensions
+as real-valued numbers of points. Internally in @TeX{}, dimensions are
+stored 32-bit values, normalized so that 1 pt corresponds to the scaled
+point (sp) value of 65536. Dimensions with magnitudes between 0.000015
+pt and 32767 pt can be represented. This is also the dynamic range of
+the @TeX{}draw pixel coordinates passed to PostScript. @TeX{}draw must
+convert from user supplied coordinates using the scaling factor (which
+itself consists of two components, the unit scale and the segment scale)
+and a pixel conversion factor. The use of limited precision real
+numbers in these computations can cause accumulation of error when
+relative scaling is used repeatedly.
+
+@node Text placement, Intermediate PostScript file, Resolution, Extending TeXdraw
+@subsection Text placement
+
+While in the @TeX{}draw environment, @TeX{} text is placed in a @TeX{}
+box while PostScript code is written to the intermediate file. At the
+end of the @TeX{}draw environment, the size of the drawing is
+determined. A @TeX{} box of this size is created. The @TeX{}
+@code{\special} mechanism is used to instruct the PostScript driver
+program to position the PostScript drawing from the intermediate file in
+this area. Next, the text generated by @TeX{}draw is positioned and
+placed in the box. Note that when the document is printed, the
+PostScript drawing is placed on the page before the @TeX{} text; @TeX{}
+text will appear on top of graphics.
+
+@cindex rotated text
+@cindex text rotation
+The rotation of text is carried out with in-line PostScript code which
+does not appear in the intermediate PostScript file. This code is sent
+to the PostScript driver with a @code{\special} command. This
+PostScript code is embedded in the dvi (device independent) file that
+@TeX{} produces.
+
+@node Intermediate PostScript file, , Text placement, Extending TeXdraw
+@subsection The intermediate PostScript file
+@cindex Encapsulated PostScript File
+
+The intermediate PostScript file consists of a header, a body and a
+trailer following Encapsulated PostScript File (EPSF) standards. The
+header sets up PostScript definitions and default parameter values. The
+trailer includes the @code{BoundingBox} information which gives the
+coordinates in default PostScript units (72 per inch) for the lower
+lefthand corner and the upper righthand corner of the drawing. The body
+of the intermediate PostScript file contains the PostScript commands
+generated by @TeX{}draw.
+
+Many moves in @TeX{}draw serve only to position text or to reset saved
+positions. @TeX{}draw buffers move commands in order to be able to
+collapse runs of moves. Only the last move of a run of moves is
+actually written to the PostScript file. However the intermediate moves
+still affect the size of the drawing. The expunging of moves means that
+the PostScript file @code{BoundingBox} information may indicate a drawing size
+larger than the PostScript commands themselves would warrant.
+
+Drawing segments in @TeX{}draw show up in the PostScript file as saves
+and restores of the PostScript graphics state. Segment starts are
+buffered and only written out if necessary. This way ``empty'' segments
+do not generate output to the PostScript file. These empty segments
+arise if a segment contains only moves and text commands. The moves
+inside the segment are not needed since they are local to the segment,
+and the text commands do not generate output to the PostScript file.
+
+If @TeX{}draw is used only for moves and text, no intermediate
+PostScript file will be created.
+
+@node How TeXdraw merges graphics and text, , Extending TeXdraw, More Details
+@section How @TeX{}draw merges graphics and text
+@cindex graphics placement
+@cindex text placement
+@cindex placement of graphics and text
+
+@TeX{}draw creates a box which is the same size as the graphic. The
+printer driver will place the PostScript graphic into this space. Any
+@TeX{} text generated by the @TeX{}draw commands will be superimposed on
+this graphic.
+
+@cindex @code{texdraw} package
+@cindex @code{graphics} package
+The La@TeX{}2e front-end for @TeX{}draw is enabled by including the
+@code{texdraw} package. The @code{texdraw} package automatically
+invokes the standard @code{graphics} package distributed with
+La@TeX{}2e. The @code{graphics} package has support for a number of
+different printer drivers, including a number for PostScript printers.
+Any options to the @code{texdraw} package are passed on to the
+@code{graphics} package. Such an option can be used to select a driver
+other than the default one.
+
+@cindex PostScript printer drivers
+@cindex printer drivers
+@cindex @code{dvips} printer driver
+@cindex rotated text
+@cindex text rotation
+Within the @code{graphics} package, the driver option is used to select
+definitions for the low-level macros which generate the @code{\special}
+commands needed to request insertion of a graphics file and to rotate
+text.@footnote{Not all PostScript drivers support text rotation.}
+@TeX{}draw uses the user-level macros defined by the @code{graphics}
+package (@pxref{PostScript printer drivers}). When not used with the
+La@TeX{}2e front-end, @TeX{}draw defines versions of these macros that
+are suitable for use with the @code{dvips} printer driver.
+
+@node PostScript Commands, TeXdraw Toolbox, More Details, Top
+@appendix PostScript Commands
+@cindex PostScript commands
+
+This appendix describes a set of macros for accessing some of the
+PostScript builtin functions. Each of these macros issues a single
+PostScript command. The extra services provided by @TeX{}draw are the
+interpretation of coordinates in user units relative to the current
+drawing segment and the writing of a pending @TeX{}draw move to the
+PostScript file. This last operation establishes the current point in
+PostScript. The user of these commands should be familiar with the
+concepts of path construction and filling in PostScript. Further
+details on the PostScript functions used can found in the
+@cite{PostScript Language Reference Manual, Second Edition}, Adobe
+Systems, Addison-Wesley, 1990.
+
+These macros are distributed in file @file{txdps.tex}.
+
+The @code{\PSsetlinecap} and @code{\PSsetlinejoin} commands control the
+way line ends and line joins are rendered. The default values set by
+@TeX{}draw (round caps and round join) are appropriate for most
+drawings. Changes to these parameters apply to the current and
+subsequent paths.
+
+@cindex line cap
+@cindex line join
+@table @code
+@findex setlinecap
+@findex \PSsetlinecap
+@item \PSsetlinecap @var{type}
+Set the line cap parameter. The value @code{0} gives a butt cap;
+@code{1} gives a round cap; and @code{2} gives a projecting square cap.
+The initial value is corresponds to a round cap.
+@findex setlinejoin
+@findex \PSsetlinejoin
+@item \PSsetlinejoin @var{type}
+Set the line join parameter. The value @code{0} gives a miter join;
+@code{1} gives a round join; and @code{2} gives a bevel join. The
+initial value corresponds to a round join.
+@end table
+
+@cindex stroking lines
+@cindex filling regions
+@cindex paths
+@cindex current position in PostScript
+PostScript paths and fill operations can be controlled by a number of
+functions. By design, @TeX{}draw always maintains a defined PostScript
+current point. Some of the following macros cause the PostScript
+current point to become undefined. The PostScript current point must be
+set again (say with a @code{\PSmoveto} command) before invoking basic
+@TeX{}draw commands.
+@table @code
+@findex stroke
+@findex \PSstroke
+@item \PSstroke
+Stroke a PostScript path. The current path is stroked with the current
+gray level (set with @code{\setgray}) and the current line pattern (set
+with @code{\lpatt}). The PostScript current point becomes undefined.
+@findex newpath
+@findex \PSnewpath
+@item \PSnewpath
+Establish a new path. The PostScript current point becomes undefined.
+@findex closepath
+@findex \PSclosepath
+@item \PSclosepath
+Close a subpath. A new subpath is started.
+@findex fill
+@findex \PSfill
+@item \PSfill
+Fill a region defined by a path. Each subpath is closed and the
+enclosed regions painted with the current gray level. The PostScript
+current point becomes undefined. The gray level can be set with the
+@TeX{}draw command @code{\setgray}.
+@end table
+
+The following line commands interpret coordinates relative to the
+current @TeX{}draw scaling and drawing segment. The specified
+coordinate affects the drawing size as determined by @TeX{}draw.
+@cindex lines
+@cindex moves
+@table @code
+@findex lineto
+@findex \PSlineto
+@item \PSlineto (@var{x} @var{y})
+Add a line segment to the current path. This command is identical to
+the @TeX{}draw command @code{\lvec}. The PostScript current point must
+be defined before this command is issued.
+@findex moveto
+@findex \PSmoveto
+@item \PSmoveto (@var{x} @var{y})
+Move to the coordinate specified by @code{(@var{x} @var{y})}. The
+PostScript current point becomes defined.
+@end table
+
+The following macros provide access to the general arc commands in
+PostScript. The coordinates are interpreted relative to the current
+@TeX{}draw scaling and drawing segment. The specified coordinate
+affects the drawing size as determined by @TeX{}draw.
+@cindex arcs
+@table @code
+@findex arc
+@findex \PSarc
+@item \PSarc r:@var{radius} sd:@var{start-angle} ed:@var{end-angle} (@var{x} @var{y})
+Draw a counterclockwise arc. The center of the arc is at the given
+position. The radius is specified by @var{radius}. The start and end
+angles (in degrees) are specified by @var{start-angle} and
+@var{end-angle}. If the PostScript current point is defined, this
+command also draws the line from the current point to the beginning of
+the arc. The line and arc become part of the current path. The current
+point becomes defined.
+@findex arcn
+@findex \PSarcn
+@item \PSarcn r:@var{radius} sd:@var{start-angle} ed:@var{end-angle} (@var{x} @var{y})
+Draw a clockwise arc. The center of the arc is at the given position.
+The radius is specified by @var{radius}. The start and end angles (in
+degrees) are specified by @var{start-angle} and @var{end-angle}. If the
+PostScript current point is defined, this command also draws the line
+from the current point to the beginning of the arc. The line and arc
+become part of the current path. The current point becomes defined.
+@end table
+
+The macro @code{\writeps} provides the general facility to write
+arbitrary PostScript commands to the PostScript file. This macro is
+used by the preceding commands and by the @TeX{}draw commands
+themselves. This facility has to be used with care since changes in
+position or scaling resulting from the PostScript commands are not known
+to @TeX{}draw.
+@table @code
+@findex \writeps
+@item \writeps @{@var{<ps-commands>}@}
+Write PostScript commands to the intermediate PostScript file. Before
+the commands are inserted, any pending @TeX{}draw move is written to the
+PostScript file. The PostScript scaling gives 300 units/inch.
+@end table
+
+
+@node TeXdraw Toolbox, Examples, PostScript Commands, Top
+@appendix @TeX{}draw Toolbox
+
+This appendix describes some of the macros supplied with @TeX{}draw
+which can be used to define additional commands for creating drawings.
+The macros described here work in the user specified coordinate system.
+Some of these toolbox macros are used by the @TeX{}draw commands
+themselves, others are supplied in an auxiliary file
+@file{txdtools.tex}.
+
+@menu
+* Coordinate parsing::
+* Real arithmetic::
+* Arrow curve::
+@end menu
+
+@node Coordinate parsing, Real arithmetic, , TeXdraw Toolbox
+@appendixsec Coordinate parsing
+
+The coordinate parsing macro @code{\getpos} is useful for creating new
+commands. This macro takes care of stripping leading and trailing
+blanks from coordinates specified between parentheses. In addition,
+symbolic coordinates are translated to the corresponding relative
+coordinate using the segment offset and scaling in effect.
+
+The macro @code{\currentpos} returns the relative coordinates of the
+current position. The returned values are relative to the current
+segment and the current scaling. The macro @code{\cossin} returns the
+real-valued cosine and sine of the direction of the line joining two
+points. The macro @code{\vectlen} returns the length of a vector. The
+results appear as the value of user supplied macro names.
+
+@cindex coordinate parsing
+@cindex current position
+@cindex angle of a vector
+@cindex direction of a line
+@cindex cosine of a vector direction
+@cindex sine of a vector direction
+@cindex length of a vector
+@table @code
+@findex \getpos
+@item \getpos (@var{x} @var{y})\@var{mx}\@var{my}
+Decode coordinate values. The coordinates specified by @code{(@var{x}
+@var{y})} are decoded. Symbolic coordinates are translated to the
+corresponding relative coordinate using the current segment offset and
+scaling. The resulting character strings representing the real-valued
+coordinates are assigned to the macros specified by @code{\@var{mx}} and
+@code{\@var{my}}.
+@findex \currentpos
+@item \currentpos \@var{mx}\@var{my}
+Return the coordinates of the current position. The coordinates are
+relative to the current segment offset and scaling. The resulting
+character strings representing the real-valued coordinates are assigned
+to the macros specified by @code{\@var{mx}} and @code{\@var{my}}.
+@findex \cossin
+@item \cossin (@var{x1} @var{y1})(@var{x2} @var{y2})\@var{cosa}\@var{sina}
+Return the cosine and sine of the direction of a vector joining two
+points. The cosine and sine of the angle of the vector which goes from
+@code{(@var{x1} @var{y1})} to @code{(@var{x2} @var{y2})}. The character
+strings representing these real-valued quantities are assigned to the
+macros specified by @code{\@var{cosa}} and @code{\@var{sina}}.
+@findex \vectlen
+@item \vectlen (@var{x1} @var{y1})(@var{x2} @var{y2})\@var{len}
+Return the length of a vector joining two points. The length of the
+vector is relative to the current scaling. The character string
+representing the real-valued length is assigned to the macro specified
+by @code{\@var{len}}.
+@end table
+
+@node Real arithmetic, Arrow curve, Coordinate parsing, TeXdraw Toolbox
+@appendixsec Real arithmetic
+
+The @TeX{}draw toolbox supplies macros to perform real arithmetic on
+coordinate values. The result appears as the value of a user supplied
+macro name.
+@table @code
+@findex \realadd
+@item \realadd @{@var{value1}@} @{@var{value2}@} \@var{sum}
+Add two real quantities, assigning the resultant character string
+representing the sum to the macro @code{\@var{sum}}.
+@findex \realmult
+@item \realmult @{@var{value1}@} @{@var{value2}@} \@var{prod}
+Multiply two real quantities, assigning the resultant character string
+representing the product to the macro @code{\@var{prod}}.
+@findex \realdiv
+@item \realdiv @{@var{value1}@} @{@var{value2}@} \@var{result}
+Divide two real quantities, assigning the resultant character string
+representing the result of @var{value1}/@var{value2} to the macro
+@code{\@var{result}}.
+@end table
+
+@node Arrow curve, , Real arithmetic, TeXdraw Toolbox
+@appendixsec Arrow curve
+@cindex example, arrow curve
+
+This example illustrates the use of the @TeX{}draw toolbox routines to
+do computations with the coordinates. The problem will be tackled in
+two parts. First, we will produce a macro to place an arrowhead on a
+Bezier curve. Then given this macro, we will produce a macro which can
+draw a ``wiggly'' line from the current position to a given coordinate.
+
+@tex
+\bigskip
+\def\cavec (#1 #2)(#3 #4)(#5 #6){
+ \clvec (#1 #2)(#3 #4)(#5 #6)
+ \cossin (#3 #4)(#5 #6)\cosa\sina
+ \rmove (0 0) % stroke the Bezier curve
+ \bsegment
+ \drawdim in \setsegscale 0.05
+ \move ({-\cosa} -\sina) \avec (0 0)
+ \esegment}
+
+\def\caw (#1 #2){
+ \currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+
+% The nominal wiggly curve is (0 0) (1+dx dy) (-dx -dy) (1 0)
+% Find the rotated offset (dx dy) -> (du dv)
+ \rotatecoord (0.4 0.1)\cosa\sina \du\dv
+
+% calculate the length of the vector
+ \vectlen ({\xa} \ya)(#1 #2)\len
+
+% draw the curve in normalized units
+ \bsegment
+ \setsegscale {\len}
+ \realadd \cosa \du \tmpa \realadd \sina \dv \tmpb
+ \cavec ({\tmpa} \tmpb)({-\du} -\dv)({\cosa} \sina)
+ \esegment
+
+ \move (#1 #2)}
+
+% rotate a coordinate (x y)
+% arguments: (x y) cosa sina x' y'
+% x' = cosa * x - sina * y; y' = sina * x + cosa * y
+\def\rotatecoord (#1 #2)#3#4#5#6{
+ \getpos (#1 #2)\xarg\yarg
+ \realmult \xarg {#3} \tmpa \realmult \yarg {#4} \tmpb
+ \realadd \tmpa {-\tmpb} #5
+ \realmult \xarg {#4} \tmpa \realmult \yarg {#3} \tmpb
+ \realadd \tmpa \tmpb #6}
+
+\centertexdraw{
+ \arrowheadtype t:W
+ \move (0 0)
+ \cavec (1.4 0.1)(-0.4 -0.1)(1 0)
+ \move (1 0) \caw (1 1) \htext{tip at \tt (1 1)}
+ \move (1 0) \caw (2 1) \htext{tip at \tt (2 1)}
+ \move (1 0) \caw (2 0) \htext{tip at \tt (2 0)}
+ \move (0 1.13) \move (0 -0.04)
+}
+@end tex
+
+The first macro, @code{\cavec}, uses the @code{\cossin} command to
+determine the the cosine and sine of the angle of the line joining the
+second control point to the end point of the Bezier curve. Recall that
+the Bezier curve is tangent to this line at the end point. After
+drawing the Bezier curve, the scaling is set locally to absolute units
+of 0.05 inches. We go back down the line from the end point by 0.05
+inches and draw an arrow vector to the end point from there. This arrow
+vector is mostly arrowhead, with little or no tail.
+
+@example
+@group
+\def\cavec (#1 #2)(#3 #4)(#5 #6)@{
+ \clvec (#1 #2)(#3 #4)(#5 #6)
+ \cossin (#3 #4)(#5 #6)\cosa\sina
+ \rmove (0 0)
+ \bsegment
+ \drawdim in \setsegscale 0.05
+ \move (@{-\cosa@} -\sina) \avec (0 0)
+ \esegment@}
+@end group
+@end example
+
+Note the use of macros as arguments to a @code{\move} command. Minus
+signs are put in front of the macros. However, the value of the macro
+@code{\cosa} or @code{\sina} could be negative. Fortunately, @TeX{}
+accepts two minus signs in a row and interprets the result as positive.
+Note that the @code{\rmove (0 0)} command before the beginning of the
+segment ensures that the Bezier curve is stroked before the arrowhead is
+drawn.
+
+The second macro @code{\caw} builds on @code{\cavec}. The goal is to
+produce a wiggly vector that can be used as a pointer in a drawing.
+Consider the following symmetrical normalized Bezier curve.
+@example
+\centertexdraw@{ \move (0 0) \cavec (1.4 0.1)(-0.4 -0.1)(1 0) @}
+@end example
+
+This curve has the appropriate wiggle. Now we want to be able to draw
+this curve, appropriately scaled and rotated. The macro @code{\caw}
+needs to do computations on the coordinates. First, @code{\caw} uses
+the macros @code{\getpos} and @code{\currentpos} to get the positions of
+the end and start of the curve. Next, the length of the vector is
+calculated using the macro @code{\vectlen}. A local macro
+@code{\rotatecoord} is used to rotate a coordinate pair about the
+origin, using the cosine and sine of the rotation angle. The vector
+length is used to scale the normalized curve. The remaining code draws
+the rotated, normalized curve.
+
+@example
+\def\caw (#1 #2)@{
+ \currentpos \xa\ya
+ \cossin (@{\xa@} \ya)(#1 #2)\cosa\sina
+
+% The nominal wiggly curve is (0 0) (1+dx dy) (-dx -dy) (1 0)
+% Find the rotated offset (dx dy) -> (du dv)
+ \rotatecoord (0.4 0.1)\cosa\sina \du\dv
+
+% calculate the length of the vector
+ \vectlen (@{\xa@} \ya)(#1 #2)\len
+
+% draw the curve in normalized units
+ \bsegment
+ \setsegscale @{\len@}
+ \realadd \cosa \du \tmpa \realadd \sina \dv \tmpb
+ \cavec (@{\tmpa@} \tmpb)(@{-\du@} -\dv)(@{\cosa@} \sina)
+ \esegment
+ \move (#1 #2)@}
+
+% rotate a coordinate (x y)
+% arguments: (x y) cosa sina x' y'
+% x' = cosa * x - sina * y; y' = sina * x + cosa * y
+\def\rotatecoord (#1 #2)#3#4#5#6@{
+ \getpos (#1 #2)\xarg\yarg
+ \realmult \xarg @{#3@} \tmpa \realmult \yarg @{#4@} \tmpb
+ \realadd \tmpa @{-\tmpb@} #5
+ \realmult \xarg @{#4@} \tmpa \realmult \yarg @{#3@} \tmpb
+ \realadd \tmpa \tmpb #6@}
+@end example
+
+Finally, the new macro can be used as follows.
+@example
+\centertexdraw@{
+ \arrowheadtype t:W
+ \move (0 0)
+ \cavec (1.4 0.1)(-0.4 -0.1)(1 0)
+ \move (1 0) \caw (1 1) \htext@{tip at \tt (1 1)@}
+ \move (1 0) \caw (2 1) \htext@{tip at \tt (2 1)@}
+ \move (1 0) \caw (2 0) \htext@{tip at \tt (2 0)@}
+
+@}
+@end example
+
+Note that the Bezier curve in the macro @code{\cavec} lies below the
+arrowhead. The example then draws an arrowhead of type @code{W} to
+erase the part of the line below the arrowhead.
+
+@node Examples, Command Listing, TeXdraw Toolbox, Top
+@appendix Examples
+@cindex example, block diagram
+
+This appendix shows examples of the use of @TeX{}draw.
+
+@menu
+* Block diagram::
+* Filter response graph::
+* Geometric construction::
+@end menu
+
+@node Block diagram, Filter response graph, , Examples
+@appendixsec Block diagram of a lattice filter
+
+The block diagram of a lattice filter uses a library of extended
+commands built from the basic @TeX{}draw commands.
+
+@tex
+\bigskip
+\bigskip
+\def\delay {\bsegment
+ \setsegscale 0.3
+ \lvec (0 +0.5) \lvec (1 +0.5) \lvec (1 -0.5)
+ \lvec (0 -0.5) \lvec (0 0)
+ \textref h:C v:C \htext (0.5 0){$z^{-1}$}
+ \savepos (1 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\def\bdot {\fcir f:0 r:0.02 }
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 +0.06){#1}
+ \esegment}
+\def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.06){#1}
+ \esegment}
+\def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.06 0){#1}
+ \esegment}
+\def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.06 0){#1}
+ \esegment}
+\def\cradius {0.08}
+\def\pluss {\bsegment
+ \setsegscale {\cradius}
+ \move (-0.5 0) \lvec (+0.5 0)
+ \move (0 -0.5) \lvec (0 +0.5)
+ \esegment}
+\def\pcir {\lcir r:{\cradius} \pluss}
+\def\puttext (#1 #2)#3{\bsegment
+ \setsegscale {\cradius}
+ \textref h:C v:C \htext (#1 #2){#3}
+ \esegment}
+\def\putwnw #1{\puttext (-1.7 +1.2){#1}}
+\def\putwsw #1{\puttext (-1.7 -1.2){#1}}
+\def\putn #1{\puttext ( 0 +2 ){#1}}
+\def\puts #1{\puttext ( 0 -2 ){#1}}
+\def\avectoc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \savepos (#1 #2)(*tx *ty)
+ \bsegment
+ \move (*tx *ty)
+ \setsegscale {\cradius}
+ \rmove ({-\cosa} -\sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \avec (*ex *ey)
+ \move (#1 #2)}
+\def\avecfrc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \bsegment
+ \setsegscale {\cradius}
+ \move ({\cosa} \sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \move (*ex *ey)
+ \avec (#1 #2)}
+
+\centertexdraw{
+\drawdim in
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$}
+
+\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for the text size
+
+% Input to the first stage
+\bsegment
+ \Ltext{$x(n)$}
+ \lvec (0.3 0) \bdot \lvec (0.3 +0.4)
+ \move (0.3 0) \lvec (0.3 -0.4)
+ \savepos (0.3 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% first lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.1 +0.4)
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_0(n)$}
+ \move (2.0 +0.42) \Ttext {$f_1(n)$}
+ \move (0.1 -0.4) \Btext {$b_0(n)$}
+ \move (2.0 -0.4) \Btext {$b_1(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_1$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_1$}
+ \savepos (2.1 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% center section
+\bsegment
+ \textref h:C v:C
+ \htext (0.3 +0.4){$\cdots$}
+ \htext (0.3 -0.4){$\cdots$}
+ \savepos (0.6 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% last lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.3 +0.4) \Rtext{$e(n)$}
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_{P-1}(n)$}
+ \move (2.0 +0.42) \Ttext {$f_P(n)$}
+ \move (0.1 -0.4) \Btext {$b_{P-1}(n)$}
+ \move (2.0 -0.4) \Btext {$b_P(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_P$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_P$}
+\esegment
+}
+\bigskip
+@end tex
+
+The block diagram uses a ``delay'' block. This is defined as a segment
+which leaves the current position at the end of this block. A second
+macro, @code{\bdot}, draws a ``big'' dot which is used to mark junctions
+of lines. The @code{\Ttext} command centers text above a given point.
+The offset to position the text is local to a segment, resulting in no
+change to the current point. Similar macros to position text below a
+point (@code{\Btext}), to the left of a point (@code{\Ltext}) and to the
+right of a point (@code{\Rtext}) are used in the final drawing.
+@example
+\def\delay @{\bsegment
+ \setsegscale 0.3
+ \lvec (0 +0.5) \lvec (1 +0.5) \lvec (1 -0.5)
+ \lvec (0 -0.5) \lvec (0 0)
+ \textref h:C v:C \htext (0.5 0)@{$z^@{-1@}$@}
+ \savepos (1 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)@}
+\def\bdot @{\fcir f:0 r:0.02 @}
+\def\Ttext #1@{\bsegment
+ \textref h:C v:B \htext (0 +0.06)@{#1@}
+ \esegment@}
+@end example
+
+Several of the block diagram elements scale with the size of the summing
+nodes. The radius of the circles for the summing nodes is defined as
+the macro @code{\cradius}. The summing nodes will have enclosed plus
+signs, appropriately scaled. The plus sign is drawn by the macro
+@code{\pluss}. The macro @code{\pcir} draws both the circle and the
+plus sign. The incoming lines to a summing node will be labelled with
+plus or minus signs (characters this time), placed at the appropriate
+position with respect to the center of the summing node. These
+positions are given in terms of compass directions. The macro
+@code{\putwnw} places text west by north-west relative to the center of
+the summing node.
+@example
+\def\cradius @{0.08@}
+\def\pluss @{\bsegment
+ \setsegscale @{\cradius@}
+ \move (-0.5 0) \lvec (+0.5 0)
+ \move (0 -0.5) \lvec (0 +0.5)
+ \esegment@}
+\def\pcir @{\lcir r:@{\cradius@} \pluss@}
+\def\puttext (#1 #2)#3@{\bsegment
+ \setsegscale @{\cradius@}
+ \textref h:C v:C \htext (#1 #2)@{#3@}
+ \esegment@}
+\def\putwnw #1@{\puttext (-1.7 +1.2)@{#1@}@}
+@end example
+
+The block diagram has vectors arriving and departing from the summing
+nodes (circles). One could calculate the points of intersection of the
+lines with the circles, and then enter the values into the @TeX{}draw
+code. However, in this example, we implement an automated procedure.
+Two macros are needed, an arrow vector to a circle (@code{\avectoc}) and
+an arrow vector leaving from a circle (@code{\avecfrc}). The macros
+will calculate the point of intersection with the circle and start or
+end the vector at the intersection point.
+
+The arrow macros use scaling and relative positioning inside of a
+drawing segment. In the case of the macro @code{\avectoc}, a move is
+made to the final point (center of the circle), then within a drawing
+segment, a scaled move is made back towards the initial point to
+determine the intersection point with the circle.
+
+@example
+\def\avectoc (#1 #2)@{\currentpos \xa\ya
+ \cossin (@{\xa@} \ya)(#1 #2)\cosa\sina
+ \savepos (#1 #2)(*tx *ty)
+ \bsegment
+ \move (*tx *ty)
+ \setsegscale @{\cradius@}
+ \rmove (@{-\cosa@} -\sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \avec (*ex *ey)
+ \move (#1 #2)@}
+\def\avecfrc (#1 #2)@{\currentpos \xa\ya
+ \cossin (@{\xa@} \ya)(#1 #2)\cosa\sina
+ \bsegment
+ \setsegscale @{\cradius@}
+ \move (@{\cosa@} \sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \move (*ex *ey)
+ \avec (#1 #2)@}
+@end example
+
+Having defined these macros, we are ready to draw the block diagram.
+The first and last sections of the lattice filter are very similar,
+differing mainly in the text labels. With more effort, code could be
+shared between the commands used to draw these blocks.
+@example
+\centertexdraw@{
+\drawdim in
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\pl @{$\scriptscriptstyle +$@} \def\mn @{$\scriptscriptstyle -$@}
+
+\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for the text size
+
+% Input to the first stage
+\bsegment
+ \Ltext@{$x(n)$@}
+ \lvec (0.3 0) \bdot \lvec (0.3 +0.4) \move (0.3 0) \lvec (0.3 -0.4)
+ \savepos (0.3 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% first lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw@{\pl@} \puts@{\mn@}
+ \avecfrc (2.1 +0.4)
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw@{\pl@} \putn@{\mn@}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext @{$f_0(n)$@}
+ \move (2.0 +0.42) \Ttext @{$f_1(n)$@}
+ \move (0.1 -0.4) \Btext @{$b_0(n)$@}
+ \move (2.0 -0.4) \Btext @{$b_1(n)$@}
+ \textref h:L v:B \htext (1.15 +0.2)@{$K_1$@}
+ \textref h:L v:T \htext (1.15 -0.2)@{$K_1$@}
+ \savepos (2.1 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% center section
+\bsegment
+ \textref h:C v:C \htext (0.3 +0.4)@{$\cdots$@}
+ \htext (0.3 -0.4)@{$\cdots$@}
+ \savepos (0.6 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% last lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw@{\pl@} \puts@{\mn@}
+ \avecfrc (2.3 +0.4) \Rtext@{$e(n)$@}
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw@{\pl@} \putn@{\mn@}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext @{$f_@{P-1@}(n)$@}
+ \move (2.0 +0.42) \Ttext @{$f_P(n)$@}
+ \move (0.1 -0.4) \Btext @{$b_@{P-1@}(n)$@}
+ \move (2.0 -0.4) \Btext @{$b_P(n)$@}
+ \textref h:L v:B \htext (1.15 +0.2)@{$K_P$@}
+ \textref h:L v:T \htext (1.15 -0.2)@{$K_P$@}
+\esegment
+@}
+@end example
+
+The macros used in this example are similar to the block diagram macros
+defined in the file @file{blockdiagram.tex}.
+
+@node Filter response graph, Geometric construction, Block diagram, Examples
+@appendixsec Filter response graph
+@cindex example, graph
+
+This example shows the response of a canonical filter. @TeX{}draw is
+not well suited for general purpose graphing --- it has no coordinate
+translation facility nor does it have separate @var{x} and @var{y}
+scaling. Nonetheless, for certain simple graphs, @TeX{}draw is
+adequate.
+
+@tex
+\bigskip
+\centertexdraw{
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\ds {\displaystyle}
+\def\ticklab (#1 #2)#3{\move(#1 #2)
+ \bsegment
+ \lvec (0 0.05)
+ \textref h:C v:T \htext (0 -0.05){#3}
+ \esegment}
+\def\Rtext #1{\bsegment
+ \textref h:L v:C \htext ( 0.08 0){#1}
+ \esegment}
+
+\move (2.4 -0.32) % move to set the size
+
+\move (0 0)
+% Axes
+\avec (0 1.4)
+\move (0 0) \avec (2.2 0) \Rtext{$\omega$}
+\ticklab (0 0) {0}
+\ticklab (0.8 0) {$\ds {\pi \over 2N} $}
+\ticklab (1.2 0) {$\omega_s$}
+\ticklab (1.6 0) {$\ds {\pi \over N} $}
+
+\linewd 0.025
+\move (0 1)
+\lvec (0.4 1)
+\lvec (0.44 0.998)
+\lvec (0.48 0.988)
+\lvec (0.52 0.973)
+\lvec (0.56 0.951)
+\lvec (0.60 0.923)
+\lvec (0.64 0.891)
+\lvec (0.68 0.852)
+\lvec (0.72 0.809)
+\lvec (0.76 0.760)
+\lvec (0.80 0.707)
+\lvec (0.84 0.649)
+\lvec (0.88 0.587)
+\lvec (0.92 0.522)
+\lvec (0.96 0.454)
+\lvec (1.00 0.382)
+\lvec (1.04 0.309)
+\lvec (1.08 0.233)
+\lvec (1.12 0.156)
+\lvec (1.16 0.078)
+\lvec (1.20 0)
+\lvec (1.9 0)
+}
+\bigskip
+@end tex
+
+In this example, macro @code{\ticklab} places a labelled axis tick at a
+given position. The data is specified in a straightforward manner,
+having been scaled beforehand to give the desired aspect ratio for the
+graph.
+
+@example
+\centertexdraw@{
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\ds @{\displaystyle@}
+\def\ticklab (#1 #2)#3@{\move(#1 #2)
+ \bsegment
+ \lvec (0 0.05)
+ \textref h:C v:T \htext (0 -0.05)@{#3@}
+ \esegment@}
+\def\Rtext #1@{\bsegment
+ \textref h:L v:C \htext (+0.08 0)@{#1@}
+ \esegment@}
+
+\move (2.4 -0.3) % move to set the size
+
+\move (0 0)
+% Axes
+\avec (0 +1.4)
+\move (0 0) \avec (2.2 0) \Rtext@{$\omega$@}
+\ticklab (0 0) @{0@}
+\ticklab (0.8 0) @{$\ds @{\pi \over 2N@} $@}
+\ticklab (1.2 0) @{$\omega_s$@}
+\ticklab (1.6 0) @{$\ds @{\pi \over N@} $@}
+
+\linewd 0.025
+\move (0 1)
+\lvec (0.4 1)
+\lvec (0.44 0.998)
+\lvec (0.48 0.988)
+\lvec (0.52 0.973)
+\lvec (0.56 0.951)
+ ...
+\lvec (1.08 0.233)
+\lvec (1.12 0.156)
+\lvec (1.16 0.078)
+\lvec (1.20 0)
+\lvec (1.9 0)
+@}
+@end example
+
+@node Geometric construction, , Filter response graph, Examples
+@appendixsec Geometric construction
+@cindex example, circle and ellipse
+
+This example shows a geometric construction which places an ellipse
+tangent to an enclosing circle. The size of the ellipse is determined
+from geometric considerations. Macros are used to modularize the code.
+The example alters the unit scale factor. This allows the drawing to be
+carried out in units normalized to the radius of the circle.
+
+@tex
+\bigskip
+\centertexdraw{
+\arrowheadtype t:V \arrowheadsize l:0.08 w:0.04
+\linewd 0.01
+\setunitscale 1.5 % circle will have radius 1.5 inches
+
+\def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.04){#1}
+ \esegment}
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 0.04){#1}
+ \esegment}
+\def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.04 0){#1}
+ \esegment}
+\def\bdot {\fcir f:0 r:0.0133 }
+\def\vtick {\bsegment
+ \move (0 -0.05) \lvec (0 0.05)
+ \esegment}
+\def\htick {\bsegment
+ \move (-0.05 0) \lvec ( 0.05 0)
+ \esegment}
+\def\Hlen #1#2{\bsegment
+ \vtick \avec ({#1} 0) \vtick \avec (0 0)
+ \relsegscale 0.5
+ \move ({#1} 0) \Ttext {#2}
+ \esegment}
+\def\Vlen #1#2{\bsegment
+ \htick \avec (0 {#1}) \htick \avec (0 0)
+ \relsegscale 0.5
+ \move (0 {#1}) \Ltext {#2}
+ \esegment}
+
+\lcir r:1 % circle
+\move (-1.05 0) \lvec ( 1.05 0) % axes
+\move (0 -1.05) \lvec (0 1.05)
+
+\move (0 0) \lvec (0.707 0.707) \bdot
+\rmove (0.02 0.02) \textref h:L v:B \htext {X}
+\move (0.707 -0.707) \bdot
+\textref h:R v:T \htext(-0.02 -0.02){O}
+
+\move (0.5 0) % center of ellipse
+\bsegment
+ \lellip rx:0.435 ry:0.804
+ \bdot \Btext {$\beta_2$}
+ \move (0 0.15) \Hlen {0.435}{$|\beta_1{+}\beta_3|$}
+ \move (-0.7 0) \Vlen {0.804}{$|\beta_1{-}\beta_3|$}
+\esegment
+}
+\bigskip
+@end tex
+@example
+\centertexdraw@{
+\arrowheadtype t:V \arrowheadsize l:0.08 w:0.04
+\linewd 0.01
+\setunitscale 1.5 % circle will have radius 1.5 inches
+
+\def\Btext #1@{\bsegment
+ \textref h:C v:T \htext (0 -0.04)@{#1@}
+ \esegment@}
+\def\Ttext #1@{\bsegment
+ \textref h:C v:B \htext (0 +0.04)@{#1@}
+ \esegment@}
+\def\Ltext #1@{\bsegment
+ \textref h:R v:C \htext (-0.04 0)@{#1@}
+ \esegment@}
+\def\bdot @{\fcir f:0 r:0.0133 @}
+\def\vtick @{\bsegment
+ \move (0 -0.05) \lvec (0 +0.05)
+ \esegment@}
+\def\htick @{\bsegment
+ \move (-0.05 0) \lvec (+0.05 0)
+ \esegment@}
+\def\Hlen #1#2@{\bsegment
+ \vtick \avec (@{#1@} 0) \vtick \avec (0 0)
+ \relsegscale 0.5
+ \move (@{#1@} 0) \Ttext @{#2@}
+ \esegment@}
+\def\Vlen #1#2@{\bsegment
+ \htick \avec (0 @{#1@}) \htick \avec (0 0)
+ \relsegscale 0.5
+ \move (0 @{#1@}) \Ltext @{#2@}
+ \esegment@}
+
+\lcir r:1 % circle
+\move (-1.05 0) \lvec ( 1.05 0) % axes
+\move (0 -1.05) \lvec (0 1.05)
+
+\move (0 0) \lvec (0.707 0.707) \bdot
+\rmove (0.02 0.02) \textref h:L v:B \htext @{X@}
+\move (0.707 -0.707) \bdot
+\textref h:R v:T \htext(-0.02 -0.02)@{O@}
+
+\move (0.5 0) % center of ellipse
+\bsegment
+ \lellip rx:0.435 ry:0.804
+ \bdot \Btext @{$\beta_2$@}
+ \move (0 0.15) \Hlen @{0.435@}@{$|\beta_1@{+@}\beta_3|$@}
+ \move (-0.7 0) \Vlen @{0.804@}@{$|\beta_1@{-@}\beta_3|$@}
+\esegment
+@}
+@end example
+
+
+@node Command Listing, Command Index, Examples, Top
+@appendix Alphabetic listing of commands
+@cindex listing of commands
+
+@table @code
+
+@item \arrowheadsize l:@var{length} w:@var{width}
+Set the arrowhead size to be @var{length} units long and @var{width}
+units wide. The width is measured across the ``base'' of the arrowhead.
+The initial arrowhead size has a @var{length} of 0.16 inches and a
+@var{width} of 0.08 inches.
+
+@item \arrowheadtype t:@var{type}
+Set the arrowhead type to @var{type}, where @var{type} is one of
+@code{F}, @code{T}, @code{W}, @code{V}, or @code{H}. There are two
+kinds of arrowheads. The first kind is a triangle. There are 3
+variants: type @code{T} is an empty triangle, type @code{F} is a filled
+triangle (using the current gray level for lines), type @code{W} is a
+triangle filled with white. The second kind of arrowhead is an open
+ended Vee. There are 2 variants: type @code{V} has the stem continue to
+the tip, type @code{H} has the stem stop at the base of the arrowhead.
+The initial arrowhead type is @code{T}.
+
+@item \avec (@var{x} @var{y})
+Draw a line with an arrowhead from the current position to
+@code{(@var{x} @var{y})}. The new current position is @code{(@var{x}
+@var{y})}. The arrowhead is aligned with the line, with the tip at
+@code{(@var{x} @var{y})}.
+
+@item \begin@{texdraw@}
+Start a @TeX{}draw drawing. The drawing is terminated with an
+@code{\end@{texdraw@}} command. This command is for use with La@TeX{}.
+
+@item \bsegment
+Start a drawing segment. The coordinate system is shifted such that the
+current position corresponds to the coordinate @code{(0 0)}. Changes to
+scaling, position and line parameters stay local to the drawing segment.
+
+@item \btexdraw
+Start a @TeX{}draw drawing. The drawing is terminated with an
+@code{\etexdraw} command.
+
+@item \centertexdraw @{ ... @}
+Center a @TeX{}draw box. The argument contains @TeX{}draw commands.
+The resulting box has the horizontal size @code{\hsize} and height equal
+to the height of the drawing.
+
+@item \clvec (@var{x1} @var{y1})(@var{x2} @var{y2})(@var{x3} @var{y3})
+Draw a Bezier curve from the current position to the coordinate
+@code{(@var{x3} @var{y3})} which becomes the new current position. The
+coordinates @code{(@var{x1} @var{y1})} and @code{(@var{x2} @var{y2})}
+serve as control points for the curve. Only the last coordinate given
+is used to update the size of the drawing.
+
+@item \drawbb
+Draw a ruled box around the effective size of a drawing produced by
+@TeX{}draw commands.
+
+@item \drawdim @var{dim}
+Set the units to @var{dim}. The argument @var{dim} can be any valid
+@TeX{} dimension unit. The units are used to interpret coordinate
+values. Examples of valid units: @code{cm}, @code{mm}, @code{in},
+@code{pt}, and @code{bp}.
+
+@item \end@{texdraw@}
+End a @TeX{}draw drawing started with a @code{\begin@{texdraw@}}
+command. The resulting @TeX{}draw drawing is placed in a box with
+height equal to the height of the drawing and width equal to the width
+of the drawing. The depth of the box is zero. This command is for use
+with La@TeX{}.
+
+@item \esegment
+End a drawing segment. The current position in effect before the
+corresponding @code{\bsegment} command is restored. The scaling and
+line parameter values revert to those in effect before the corresponding
+@code{\bsegment} was invoked.
+
+@item \etexdraw
+End a @TeX{}draw drawing started with a @code{\btexdraw} command. The
+resulting @TeX{}draw drawing is placed in a box with height equal to the
+height of the drawing and width equal to the width of the drawing. The
+depth of the box is zero.
+
+@item \everytexdraw @{ ... @}
+Specify @TeX{}draw commands to be executed at the beginning of every
+@TeX{}draw drawing.
+
+@item \fcir f:@var{level} r:@var{radius}
+Draw a filled circle with center at the current position. The radius is
+specified by @var{radius}. The circle is painted with the gray level
+specified by @var{level}. A gray level of 1 corresponds to white, with
+decreasing values getting darker. The level 0 is full black. This
+command does not draw a line along the circumference. The drawing size
+is increased if necessary to contain the circle.
+
+@item \fellip f:@var{level} rx:@var{x-radius} ry:@var{y-radius}
+Draw a filled ellipse with center at the current position. The radius
+in the @var{x} direction is specified by @var{x-radius}. The radius in
+the @var{y} direction is specified by @var{y-radius}. The ellipse is
+painted with the gray level specified by @var{level}. A gray level of 1
+corresponds to white, with decreasing values getting darker. The level
+0 is full black. This command does not draw a line along the boundary
+of the ellipse. The drawing size is increased if necessary to contain
+the ellipse.
+
+@item \htext (@var{x} @var{y})@{@var{text}@}
+@itemx \htext @{@var{text}@}
+The first form of this command places the @TeX{} text @var{text}
+horizontally with the text reference point at the coordinate
+@code{(@var{x} @var{y})}. The new current position is @code{(@var{x}
+@var{y})}. The second form of this command places the @TeX{} text
+@var{text} horizontally with the text reference point at the current
+position. The text reference point is set with the @code{\textref}
+command.
+
+@item \ifill f:@var{level}
+Close the current path and paint the interior of the region with gray
+level @var{level}. The line around the path is not drawn. Gray levels
+are real values from 0 (black) through intermediate values (grays) to 1
+(white).
+
+@item \larc r:@var{radius} sd:@var{start-angle} ed:@var{end-angle}
+Draw a counterclockwise arc. The center of the arc is at the current
+position. The radius is specified by @var{radius}. The start and end
+angles (in degrees) are specified by @var{start-angle} and
+@var{end-angle}. This command does not affect the limits (size) of the
+drawing.
+
+@item \lcir r:@var{radius}
+Draw a circle with center at the current position. The radius is
+specified by @var{radius}. This command draws a line along the
+circumference of the circle. The drawing size is increased if necessary
+to contain the circle.
+
+@item \lellip rx:@var{x-radius} ry:@var{y-radius}
+Draw an ellipse with center at the current position. The radius in the
+@var{x} direction is specified by @var{x-radius}. The radius in the
+@var{y} direction is specified by @var{y-radius}. The drawing size is
+increased if necessary to contain the ellipse.
+
+@item \lfill f:@var{level}
+
+Close the current path, draw the line around the path using the current
+grey level for lines and paint the interior of the region with specified
+gray level @var{level}. Gray levels are real values from 0 (black)
+through intermediate values (grays) to 1 (white).
+
+@item \linewd @var{width}
+Set the line width to @var{width} units. Initially @var{width} is 0.01
+inches (corresponding to 3 pixels at 300 pixels to the inch).
+
+@item \lpatt (@var{pattern})
+Set lines to have the pattern @code{(@var{pattern})}. A pattern is a
+sequence of on/off lengths separated by blanks and enclosed in parentheses.
+The lengths alternately specify the length of a dash and the length of a
+gap between dashes. Each length is interpreted using the current
+scaling and drawing units. The pattern is used cyclically. The empty
+pattern signifies a solid line. The initial line pattern is a solid
+line, corresponding to the empty pattern @code{\lpatt ()}.
+
+@item \lvec (@var{x} @var{y})
+Draw a line from the current position to coordinate @code{(@var{x}
+@var{y})}. The new current position is @code{(@var{x} @var{y})}.
+
+@item \move (@var{x} @var{y})
+Move to coordinate @code{(@var{x} @var{y})}. The new current position
+is @code{(@var{x} @var{y})}.
+
+@item \ravec (@var{dx} @var{dy})
+Draw a line with an arrowhead from the current position, @var{dx} units
+in the @var{x} direction and @var{y} units in the @var{y} direction.
+The final position becomes the new current position. The arrowhead is
+aligned with the line, with the tip at the new current position.
+
+@item \relsegscale @var{value}
+Adjust the segment scale factor by multiplying by @var{value}. This has
+the effect of multiplying the current overall scale factor by the same
+factor. The overall scaling factor is the product of the unit scale
+factor and the segment scale factor.
+
+@item \relunitscale @var{value}
+Adjust the unit scale factor by multiplying by @var{value}. This has
+the effect of multiplying the overall scale factor by the same factor.
+The overall scaling factor is the product of the unit scale factor and
+the segment scale factor.
+
+@item \rlvec (@var{dx} @var{dy})
+Draw a line from the current position, @var{dx} units in the @var{x}
+direction and @var{dy} units in the @var{y} direction. The final
+position becomes the new current position.
+
+@item \rmove (@var{dx} @var{dy})
+Move from the current position, @var{dx} units in the @var{x} direction
+and @var{dy} units in the @var{y} direction. The final position becomes
+the new current position.
+
+@item \rtext td:@var{angle} (x y)@{@var{text}@}
+@itemx \rtext td:@var{angle} @{@var{text}@}
+The first form of this command places the @TeX{} text @var{text} at an
+angle with the text reference point at the coordinate @code{(@var{x}
+@var{y})}. The new current position is @code{(@var{x} @var{y})}. The
+second form of this command places the @TeX{} text @var{text} at an
+angle with the text reference point at the current position. In both
+cases, the @TeX{} text is placed in a box and the box is rotated
+counterclockwise by @var{angle} degrees about the text reference point.
+The text reference point is set with the @code{\textref} command.
+
+@item \savecurrpos (*@var{px} *@var{py})
+Save the current position as the absolute position referenced by
+@code{(*@var{px} *@var{py})}.
+
+@item \savepos (@var{x} @var{y})(*@var{px} *@var{py})
+Save the coordinate position @code{(@var{x} @var{y})} as the absolute
+position referenced by @code{(*@var{px} *@var{py})}. The coordinate
+@code{(@var{x} @var{y})} is interpreted in the normal fashion as a
+coordinate relative to the current segment, using the current scaling
+factors and drawing unit.
+
+@item \setgray @var{level}
+Set the gray level of lines. Gray levels are real values from 0 (black)
+through intermediate values (gray) to 1 (white). The initial gray level
+is 0 corresponding to black.
+
+@item \setsegscale @var{scale}
+Set the segment scale factor. The argument @var{scale} is a real number
+which is used to scale coordinate values. The overall scale factor is
+the product of the unit scale factor and the segment scale factor.
+
+@item \setunitscale @var{scale}
+Set the unit scaling to @var{scale}. The argument @var{scale} is a real
+number which is used to scale coordinate values. The overall scaling
+factor is the product of the unit scale factor and the segment scale
+factor.
+
+@item \texdrawbox @{ ... @}
+Create a @TeX{}draw box. The argument contains @TeX{}draw commands.
+This macro returns a @TeX{} box with height equal to the height of the
+drawing and width equal to the width of the drawing. The depth of the
+box is zero.
+
+@item \textref h:@var{h-ref} v:@var{v-ref}
+Set the text reference point for subsequent text commands. The
+horizontal reference point @var{h-ref} is one of @code{L}, @code{C} or
+@code{R} (left, center or right). The vertical reference point
+@var{v-ref} is one of @code{T}, @code{C} or @code{B} (top, center or
+bottom). For rotated text, the reference point is determined before
+rotation. The initial text reference point corresponds to
+@code{\textref h:L v:B}.
+
+@item \vtext (x y)@{@var{text}@}
+@itemx \vtext @{@var{text}@}
+The first form of this command places the @TeX{} text @var{text}
+vertically with the text reference point at the coordinate
+@code{(@var{x} @var{y})}. The new current position is @code{(@var{x}
+@var{y})}. The second form of this command places the @TeX{} text
+@var{text} vertically with the text reference point at the current
+position. In both cases, the @TeX{} text is placed in a box and the box
+is rotated counterclockwise by 90 degrees about the text reference
+point. The text reference point is set with the @code{\textref}
+command.
+
+@end table
+
+@node Command Index, Concept Index, Command Listing, Top
+@unnumbered Command Index
+@printindex fn
+
+@node Concept Index, , Command Index, Top
+@unnumbered Concept Index
+@printindex cp
+
+@page
+@contents
+@bye
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_1.html b/Master/texmf-dist/doc/texdraw/texdraw_1.html
new file mode 100644
index 00000000000..0865cde28b5
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_1.html
@@ -0,0 +1,82 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - 1. Introduction</TITLE>
+</HEAD>
+<BODY>
+Go to the first, previous, <A HREF="texdraw_2.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC1" HREF="texdraw_toc.html#TOC1">1. Introduction</A></H1>
+
+<P>
+TeX is a powerful typesetting program which allows for complex text
+layouts but by itself lacks a general graphics capability. However,
+when coupled with an appropriate printer driver program, external
+graphics files can be inserted into the printed document. In this mode,
+TeX is instructed to leave space for a drawing. The drawing is
+inserted by the printer driver program. The TeXdraw macros described
+here generate the external graphics file from within TeX and generate
+the instructions to the the print driver program to position the
+graphics at the appropriate position on the page.
+
+
+<P>
+TeXdraw consists of a set of TeX macros that create line drawings
+and other figures. The drawing primitives include solid lines,
+patterned lines, Bezier curves, circles and arrows. Other commands
+allow for the filling of a region with a gray level. The drawing
+commands generate PostScript code. This limits TeXdraw to systems
+which use PostScript printers. TeXdraw also provides commands to
+position TeX text, including mathematics, on the drawing. The final
+drawing, with text and graphics, can be positioned on the page like any
+other TeX box.
+
+
+<P>
+<A NAME="IDX1"></A>
+<A NAME="IDX2"></A>
+<A NAME="IDX3"></A>
+The basic TeXdraw macros for TeX use the <CODE>\special</CODE> syntax
+recognized by the printer driver program <CODE>dvips</CODE>. However, when
+invoked as a LaTeX2e package, the TeXdraw macros can be used with
+any of the PostScript printer driver programs supported by the standard
+<CODE>graphics</CODE> package for LaTeX2e.
+
+
+<P>
+The basic TeXdraw macros provide only simple drawing commands.
+However, TeXdraw provides a drawing segment environment which allows
+parameter changes and coordinate scaling changes to be kept local to the
+drawing segment. This facility, together with TeX's macro
+capabilities allows one to modularize drawing units and extend
+TeXdraw by building more complex graphics entities from simpler
+elements.
+
+
+
+<UL>
+<LI><A HREF="texdraw_1.html#SEC2">Distribution</A>
+</UL>
+
+
+
+<H2><A NAME="SEC2" HREF="texdraw_toc.html#TOC2">1.1 Distribution information</A></H2>
+<P>
+<A NAME="IDX4"></A>
+
+
+<P>
+The TeXdraw routines are provided free of charge without warranty of
+any kind. Note that the TeXdraw routines are copyrighted. They may
+be distributed freely provided that the recipients also acquire the
+right to distribute them freely. The notices to this effect must be
+preserved when the source files are distributed.
+
+
+<P><HR><P>
+Go to the first, previous, <A HREF="texdraw_2.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_10.html b/Master/texmf-dist/doc/texdraw/texdraw_10.html
new file mode 100644
index 00000000000..faa705634dd
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_10.html
@@ -0,0 +1,126 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - Command Index</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_9.html">previous</A>, <A HREF="texdraw_11.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC40" HREF="texdraw_toc.html#TOC40">Command Index</A></H1>
+<P>
+Jump to:
+<A HREF="#findex_\">\</A>
+-
+<A HREF="#findex_a">a</A>
+-
+<A HREF="#findex_c">c</A>
+-
+<A HREF="#findex_f">f</A>
+-
+<A HREF="#findex_l">l</A>
+-
+<A HREF="#findex_m">m</A>
+-
+<A HREF="#findex_n">n</A>
+-
+<A HREF="#findex_s">s</A>
+<P>
+<H2><A NAME="findex_\">\</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX63">\arc</A>
+<LI><A HREF="texdraw_2.html#IDX44">\arrowheadsize</A>
+<LI><A HREF="texdraw_2.html#IDX43">\arrowheadtype</A>
+<LI><A HREF="texdraw_2.html#IDX30">\avec</A>
+<LI><A HREF="texdraw_2.html#IDX13">\begin{texdraw}</A>
+<LI><A HREF="texdraw_3.html#IDX74">\bsegment</A>
+<LI><A HREF="texdraw_2.html#IDX11">\btexdraw</A>
+<LI><A HREF="texdraw_2.html#IDX15">\centertexdraw</A>
+<LI><A HREF="texdraw_2.html#IDX66">\clvec</A>
+<LI><A HREF="texdraw_7.html#IDX177">\cossin</A>
+<LI><A HREF="texdraw_7.html#IDX176">\currentpos</A>
+<LI><A HREF="texdraw_3.html#IDX94">\drawbb</A>
+<LI><A HREF="texdraw_2.html#IDX22">\drawdim</A>
+<LI><A HREF="texdraw_2.html#IDX14">\end{texdraw}</A>
+<LI><A HREF="texdraw_3.html#IDX75">\esegment</A>
+<LI><A HREF="texdraw_2.html#IDX12">\etexdraw</A>
+<LI><A HREF="texdraw_2.html#IDX16">\everytexdraw</A>
+<LI><A HREF="texdraw_2.html#IDX60">\fcir</A>
+<LI><A HREF="texdraw_2.html#IDX62">\fellip</A>
+<LI><A HREF="texdraw_7.html#IDX175">\getpos</A>
+<LI><A HREF="texdraw_2.html#IDX46">\htext</A>
+<LI><A HREF="texdraw_2.html#IDX71">\ifill</A>
+<LI><A HREF="texdraw_2.html#IDX59">\lcir</A>
+<LI><A HREF="texdraw_2.html#IDX61">\lellip</A>
+<LI><A HREF="texdraw_2.html#IDX70">\lfill</A>
+<LI><A HREF="texdraw_2.html#IDX41">\linewd</A>
+<LI><A HREF="texdraw_2.html#IDX29">\lvec</A>
+<LI><A HREF="texdraw_2.html#IDX28">\move</A>
+<LI><A HREF="texdraw_6.html#IDX164">\PSarc</A>
+<LI><A HREF="texdraw_6.html#IDX166">\PSarcn</A>
+<LI><A HREF="texdraw_6.html#IDX153">\PSclosepath</A>
+<LI><A HREF="texdraw_6.html#IDX155">\PSfill</A>
+<LI><A HREF="texdraw_6.html#IDX159">\PSlineto</A>
+<LI><A HREF="texdraw_6.html#IDX161">\PSmoveto</A>
+<LI><A HREF="texdraw_6.html#IDX151">\PSnewpath</A>
+<LI><A HREF="texdraw_6.html#IDX141">\PSsetlinecap</A>
+<LI><A HREF="texdraw_6.html#IDX143">\PSsetlinejoin</A>
+<LI><A HREF="texdraw_6.html#IDX149">\PSstroke</A>
+<LI><A HREF="texdraw_2.html#IDX34">\ravec</A>
+<LI><A HREF="texdraw_7.html#IDX179">\realadd</A>
+<LI><A HREF="texdraw_7.html#IDX181">\realdiv</A>
+<LI><A HREF="texdraw_7.html#IDX180">\realmult</A>
+<LI><A HREF="texdraw_3.html#IDX92">\relsegscale</A>
+<LI><A HREF="texdraw_3.html#IDX90">\relunitscale</A>
+<LI><A HREF="texdraw_2.html#IDX33">\rlvec</A>
+<LI><A HREF="texdraw_2.html#IDX32">\rmove</A>
+<LI><A HREF="texdraw_2.html#IDX53">\rtext</A>
+<LI><A HREF="texdraw_3.html#IDX83">\savecurrpos</A>
+<LI><A HREF="texdraw_3.html#IDX84">\savepos</A>
+<LI><A HREF="texdraw_2.html#IDX42">\setgray</A>
+<LI><A HREF="texdraw_3.html#IDX91">\setsegscale</A>
+<LI><A HREF="texdraw_3.html#IDX89">\setunitscale</A>
+<LI><A HREF="texdraw_2.html#IDX54">\textref</A>
+<LI><A HREF="texdraw_7.html#IDX178">\vectlen</A>
+<LI><A HREF="texdraw_2.html#IDX50">\vtext</A>
+<LI><A HREF="texdraw_6.html#IDX167">\writeps</A>
+</DIR>
+<H2><A NAME="findex_a">a</A></H2>
+<DIR>
+<LI><A HREF="texdraw_6.html#IDX163">arc</A>
+<LI><A HREF="texdraw_6.html#IDX165">arcn</A>
+</DIR>
+<H2><A NAME="findex_c">c</A></H2>
+<DIR>
+<LI><A HREF="texdraw_6.html#IDX152">closepath</A>
+</DIR>
+<H2><A NAME="findex_f">f</A></H2>
+<DIR>
+<LI><A HREF="texdraw_6.html#IDX154">fill</A>
+</DIR>
+<H2><A NAME="findex_l">l</A></H2>
+<DIR>
+<LI><A HREF="texdraw_6.html#IDX158">lineto</A>
+</DIR>
+<H2><A NAME="findex_m">m</A></H2>
+<DIR>
+<LI><A HREF="texdraw_6.html#IDX160">moveto</A>
+</DIR>
+<H2><A NAME="findex_n">n</A></H2>
+<DIR>
+<LI><A HREF="texdraw_6.html#IDX150">newpath</A>
+</DIR>
+<H2><A NAME="findex_s">s</A></H2>
+<DIR>
+<LI><A HREF="texdraw_6.html#IDX140">setlinecap</A>
+<LI><A HREF="texdraw_6.html#IDX142">setlinejoin</A>
+<LI><A HREF="texdraw_6.html#IDX148">stroke</A>
+</DIR>
+
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_9.html">previous</A>, <A HREF="texdraw_11.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_11.html b/Master/texmf-dist/doc/texdraw/texdraw_11.html
new file mode 100644
index 00000000000..cafff98a536
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_11.html
@@ -0,0 +1,205 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - Concept Index</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_10.html">previous</A>, next, last section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC41" HREF="texdraw_toc.html#TOC41">Concept Index</A></H1>
+<P>
+Jump to:
+<A HREF="#cindex_a">a</A>
+-
+<A HREF="#cindex_b">b</A>
+-
+<A HREF="#cindex_c">c</A>
+-
+<A HREF="#cindex_d">d</A>
+-
+<A HREF="#cindex_e">e</A>
+-
+<A HREF="#cindex_f">f</A>
+-
+<A HREF="#cindex_g">g</A>
+-
+<A HREF="#cindex_i">i</A>
+-
+<A HREF="#cindex_l">l</A>
+-
+<A HREF="#cindex_m">m</A>
+-
+<A HREF="#cindex_o">o</A>
+-
+<A HREF="#cindex_p">p</A>
+-
+<A HREF="#cindex_r">r</A>
+-
+<A HREF="#cindex_s">s</A>
+-
+<A HREF="#cindex_t">t</A>
+-
+<A HREF="#cindex_u">u</A>
+-
+<A HREF="#cindex_v">v</A>
+-
+<A HREF="#cindex_w">w</A>
+-
+<A HREF="#cindex_x">x</A>
+<P>
+<H2><A NAME="cindex_a">a</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX5">accessing TeXdraw</A>, <A HREF="texdraw_4.html#IDX97">accessing TeXdraw</A>
+<LI><A HREF="texdraw_7.html#IDX170">angle of a vector</A>
+<LI><A HREF="texdraw_2.html#IDX58">arcs</A>, <A HREF="texdraw_6.html#IDX162">arcs</A>
+<LI><A HREF="texdraw_2.html#IDX40">arrowhead parameters</A>
+<LI><A HREF="texdraw_2.html#IDX25">arrows</A>
+</DIR>
+<H2><A NAME="cindex_b">b</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX64">Bezier curves</A>
+</DIR>
+<H2><A NAME="cindex_c">c</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX55">circles</A>
+<LI><A HREF="texdraw_2.html#IDX17">command syntax</A>
+<LI><A HREF="texdraw_7.html#IDX168">coordinate parsing</A>
+<LI><A HREF="texdraw_2.html#IDX20">coordinate specification</A>
+<LI><A HREF="texdraw_3.html#IDX81">coordinate, symbolic</A>
+<LI><A HREF="texdraw_2.html#IDX19">coordinates</A>
+<LI><A HREF="texdraw_7.html#IDX172">cosine of a vector direction</A>
+<LI><A HREF="texdraw_2.html#IDX27">current position</A>, <A HREF="texdraw_3.html#IDX95">current position</A>, <A HREF="texdraw_7.html#IDX169">current position</A>
+<LI><A HREF="texdraw_6.html#IDX147">current position in PostScript</A>
+<LI><A HREF="texdraw_2.html#IDX65">curves</A>
+</DIR>
+<H2><A NAME="cindex_d">d</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX37">dashed lines</A>
+<LI><A HREF="texdraw_7.html#IDX171">direction of a line</A>
+<LI><A HREF="texdraw_1.html#IDX4">distribution</A>
+<LI><A HREF="texdraw_2.html#IDX38">dotted lines</A>
+<LI><A HREF="texdraw_3.html#IDX73">drawing segments</A>
+<LI><A HREF="texdraw_4.html#IDX106"><CODE>dvi2ps</CODE> printer driver</A>
+<LI><A HREF="texdraw_4.html#IDX107"><CODE>dvialw</CODE> printer driver</A>
+<LI><A HREF="texdraw_4.html#IDX108"><CODE>dvilaser</CODE> printer driver</A>
+<LI><A HREF="texdraw_1.html#IDX1"><CODE>dvips</CODE> printer driver</A>, <A HREF="texdraw_4.html#IDX104"><CODE>dvips</CODE> printer driver</A>, <A HREF="texdraw_5.html#IDX134"><CODE>dvips</CODE> printer driver</A>
+<LI><A HREF="texdraw_4.html#IDX109"><CODE>dvipsone</CODE> printer driver</A>
+<LI><A HREF="texdraw_4.html#IDX111"><CODE>dvitops</CODE> printer driver</A>
+<LI><A HREF="texdraw_4.html#IDX110"><CODE>dviwindo</CODE> printer driver</A>
+</DIR>
+<H2><A NAME="cindex_e">e</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX57">ellipses</A>
+<LI><A HREF="texdraw_5.html#IDX126">Encapsulated PostScript File</A>
+<LI><A HREF="texdraw_5.html#IDX120">errors while using TeXdraw</A>
+<LI><A HREF="texdraw_7.html#IDX182">example, arrow curve</A>
+<LI><A HREF="texdraw_8.html#IDX183">example, block diagram</A>
+<LI><A HREF="texdraw_8.html#IDX185">example, circle and ellipse</A>
+<LI><A HREF="texdraw_8.html#IDX184">example, graph</A>
+</DIR>
+<H2><A NAME="cindex_f">f</A></H2>
+<DIR>
+<LI><A HREF="texdraw_3.html#IDX76">fill operations, interaction with drawing segments</A>
+<LI><A HREF="texdraw_2.html#IDX56">filled circles</A>
+<LI><A HREF="texdraw_2.html#IDX67">filling regions</A>, <A HREF="texdraw_6.html#IDX145">filling regions</A>
+</DIR>
+<H2><A NAME="cindex_g">g</A></H2>
+<DIR>
+<LI><A HREF="texdraw_1.html#IDX3"><CODE>graphics</CODE> package</A>, <A HREF="texdraw_2.html#IDX10"><CODE>graphics</CODE> package</A>, <A HREF="texdraw_4.html#IDX103"><CODE>graphics</CODE> package</A>, <A HREF="texdraw_5.html#IDX131"><CODE>graphics</CODE> package</A>
+<LI><A HREF="texdraw_5.html#IDX127">graphics placement</A>
+<LI><A HREF="texdraw_2.html#IDX39">gray levels for lines</A>
+</DIR>
+<H2><A NAME="cindex_i">i</A></H2>
+<DIR>
+<LI><A HREF="texdraw_5.html#IDX121">implementation</A>
+<LI><A HREF="texdraw_3.html#IDX96">initial current position</A>
+<LI><A HREF="texdraw_2.html#IDX6">invoking TeXdraw</A>, <A HREF="texdraw_4.html#IDX98">invoking TeXdraw</A>
+</DIR>
+<H2><A NAME="cindex_l">l</A></H2>
+<DIR>
+<LI><A HREF="texdraw_1.html#IDX2">LaTeX</A>, <A HREF="texdraw_2.html#IDX8">LaTeX</A>, <A HREF="texdraw_4.html#IDX99">LaTeX</A>
+<LI><A HREF="texdraw_7.html#IDX174">length of a vector</A>
+<LI><A HREF="texdraw_6.html#IDX138">line cap</A>
+<LI><A HREF="texdraw_6.html#IDX139">line join</A>
+<LI><A HREF="texdraw_2.html#IDX35">line width</A>
+<LI><A HREF="texdraw_2.html#IDX23">lines</A>, <A HREF="texdraw_6.html#IDX156">lines</A>
+<LI><A HREF="texdraw_9.html#IDX186">listing of commands</A>
+</DIR>
+<H2><A NAME="cindex_m">m</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX26">moves</A>, <A HREF="texdraw_6.html#IDX157">moves</A>
+</DIR>
+<H2><A NAME="cindex_o">o</A></H2>
+<DIR>
+<LI><A HREF="texdraw_4.html#IDX112"><CODE>oztex</CODE> printer driver</A>
+</DIR>
+<H2><A NAME="cindex_p">p</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX68">painting regions</A>
+<LI><A HREF="texdraw_2.html#IDX69">paths</A>, <A HREF="texdraw_3.html#IDX77">paths</A>, <A HREF="texdraw_6.html#IDX146">paths</A>
+<LI><A HREF="texdraw_4.html#IDX115"><CODE>pctexps</CODE> printer driver</A>
+<LI><A HREF="texdraw_4.html#IDX116"><CODE>pctexwin</CODE> printer driver</A>
+<LI><A HREF="texdraw_5.html#IDX129">placement of graphics and text</A>
+<LI><A HREF="texdraw_2.html#IDX7">plain TeX</A>
+<LI><A HREF="texdraw_2.html#IDX21">position specification</A>
+<LI><A HREF="texdraw_3.html#IDX80">positions, saving</A>
+<LI><A HREF="texdraw_6.html#IDX137">PostScript commands</A>
+<LI><A HREF="texdraw_4.html#IDX102">PostScript printer drivers</A>, <A HREF="texdraw_5.html#IDX132">PostScript printer drivers</A>
+<LI><A HREF="texdraw_4.html#IDX101">printer drivers</A>, <A HREF="texdraw_5.html#IDX133">printer drivers</A>
+<LI><A HREF="texdraw_5.html#IDX119">problems while using TeXdraw</A>
+<LI><A HREF="texdraw_4.html#IDX113"><CODE>psprint</CODE> driver</A>
+</DIR>
+<H2><A NAME="cindex_r">r</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX31">relative positioning</A>
+<LI><A HREF="texdraw_3.html#IDX86">relative scaling</A>
+<LI><A HREF="texdraw_5.html#IDX123">resolution</A>
+<LI><A HREF="texdraw_2.html#IDX48">rotated text</A>, <A HREF="texdraw_2.html#IDX51">rotated text</A>, <A HREF="texdraw_4.html#IDX117">rotated text</A>, <A HREF="texdraw_5.html#IDX124">rotated text</A>, <A HREF="texdraw_5.html#IDX135">rotated text</A>
+</DIR>
+<H2><A NAME="cindex_s">s</A></H2>
+<DIR>
+<LI><A HREF="texdraw_3.html#IDX79">saving positions</A>
+<LI><A HREF="texdraw_5.html#IDX122">scaling</A>
+<LI><A HREF="texdraw_3.html#IDX85">scaling coordinates</A>
+<LI><A HREF="texdraw_3.html#IDX87">segment scale</A>
+<LI><A HREF="texdraw_3.html#IDX72">segments</A>
+<LI><A HREF="texdraw_7.html#IDX173">sine of a vector direction</A>
+<LI><A HREF="texdraw_3.html#IDX93">size of the drawing</A>
+<LI><A HREF="texdraw_3.html#IDX78">stroking lines</A>, <A HREF="texdraw_6.html#IDX144">stroking lines</A>
+<LI><A HREF="texdraw_3.html#IDX82">symbolic coordinate</A>
+<LI><A HREF="texdraw_2.html#IDX18">syntax of commands</A>
+</DIR>
+<H2><A NAME="cindex_t">t</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX9"><CODE>texdraw</CODE> package</A>, <A HREF="texdraw_4.html#IDX100"><CODE>texdraw</CODE> package</A>, <A HREF="texdraw_5.html#IDX130"><CODE>texdraw</CODE> package</A>
+<LI><A HREF="texdraw_2.html#IDX45">text commands</A>
+<LI><A HREF="texdraw_5.html#IDX128">text placement</A>
+<LI><A HREF="texdraw_2.html#IDX49">text rotation</A>, <A HREF="texdraw_2.html#IDX52">text rotation</A>, <A HREF="texdraw_4.html#IDX118">text rotation</A>, <A HREF="texdraw_5.html#IDX125">text rotation</A>, <A HREF="texdraw_5.html#IDX136">text rotation</A>
+<LI><A HREF="texdraw_4.html#IDX114"><CODE>textures</CODE> printer driver</A>
+</DIR>
+<H2><A NAME="cindex_u">u</A></H2>
+<DIR>
+<LI><A HREF="texdraw_3.html#IDX88">unit scale</A>
+</DIR>
+<H2><A NAME="cindex_v">v</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX24">vectors</A>
+<LI><A HREF="texdraw_2.html#IDX47">vertical text</A>
+</DIR>
+<H2><A NAME="cindex_w">w</A></H2>
+<DIR>
+<LI><A HREF="texdraw_2.html#IDX36">width of lines</A>
+</DIR>
+<H2><A NAME="cindex_x">x</A></H2>
+<DIR>
+<LI><A HREF="texdraw_4.html#IDX105"><CODE>xdvi</CODE> driver</A>
+</DIR>
+
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_10.html">previous</A>, next, last section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_2.html b/Master/texmf-dist/doc/texdraw/texdraw_2.html
new file mode 100644
index 00000000000..25abbb1af0e
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_2.html
@@ -0,0 +1,882 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - 2. Using the TeXdraw Commands</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_1.html">previous</A>, <A HREF="texdraw_3.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC3" HREF="texdraw_toc.html#TOC3">2. Using the TeXdraw Commands</A></H1>
+
+<P>
+The main TeXdraw macros (commands) are defined in the file
+<TT>`texdraw.tex'</TT>. These macros may be used directly in TeX. The
+file <TT>`texdraw.sty'</TT> provides an interface for use with LaTeX2e.
+The following sections describe the basic commands for TeXdraw.
+
+
+
+<UL>
+<LI><A HREF="texdraw_2.html#SEC4">Accessing TeXdraw</A>
+<LI><A HREF="texdraw_2.html#SEC5">Command syntax</A>
+<LI><A HREF="texdraw_2.html#SEC6">TeXdraw coordinates</A>
+<LI><A HREF="texdraw_2.html#SEC7">Coordinate specification</A>
+<LI><A HREF="texdraw_2.html#SEC8">Line vectors</A>
+<LI><A HREF="texdraw_2.html#SEC9">TeX text</A>
+<LI><A HREF="texdraw_2.html#SEC10">Circles and arcs</A>
+<LI><A HREF="texdraw_2.html#SEC11">Bezier curves</A>
+<LI><A HREF="texdraw_2.html#SEC12">Fill commands</A>
+</UL>
+
+
+
+<H2><A NAME="SEC4" HREF="texdraw_toc.html#TOC4">2.1 Accessing TeXdraw</A></H2>
+<P>
+<A NAME="IDX5"></A>
+<A NAME="IDX6"></A>
+
+
+<P>
+<A NAME="IDX7"></A>
+<A NAME="IDX8"></A>
+The form of the user command to run the TeX program depends on which
+version of TeX is being used, and which other macro packages are
+preloaded as format files. Typically, installations have at least two
+versions of TeX -- plain TeX which includes basic typesetting
+macros (usually invoked as <TT>`tex'</TT>) and LaTeX2e which includes the
+LaTeX2e typesetting macros (usually invoked as <TT>`latex'</TT>). An
+older version of LaTeX, version 2.09, may also be available. The
+TeXdraw macros can be used with plain TeX and with either version
+of LaTeX.
+
+
+<P>
+For use with plain TeX, the user must read in the TeXdraw macros
+from the file <TT>`texdraw.tex'</TT>.
+
+<PRE>
+\input texdraw % Read in the TeXdraw macros
+ ...
+\btexdraw
+ ... % TeXdraw commands to generate a drawing
+\etexdraw
+</PRE>
+
+<P>
+For use with LaTeX version 2.09, the user reads in the TeXdraw
+macros from the file <TT>`texdraw.tex'</TT> and optionally defines the
+<CODE>\begin{texdraw}</CODE> / <CODE>\end{texdraw}</CODE> environment.
+
+<PRE>
+\documentstyle[11pt]{article} % Article style with the 11pt size options
+...
+\input texdraw % Read in the TeXdraw macros
+\newenvironment{texdraw}{\leavevmode\btexdraw}{\etexdraw}
+ ...
+\begin{texdraw}
+ ... % TeXdraw commands to generate a drawing
+\end{texdraw}
+...
+\end{document}
+</PRE>
+
+<P>
+<A NAME="IDX9"></A>
+<A NAME="IDX10"></A>
+For use with LaTeX2e, the user must load the <CODE>texdraw</CODE> package
+(file <TT>`texdraw.sty'</TT>). This package file defines the
+<CODE>\begin{texdraw}</CODE> / <CODE>\end{texdraw}</CODE> environment, brings in
+the standard <CODE>graphics</CODE> package and reads in the file
+<TT>`texdraw.tex'</TT> containing the definitions of the TeXdraw macros.
+
+<PRE>
+\documentclass[11pt]{article} % Article class with the 11pt size option
+\usepackage{texdraw} % TeXdraw commands
+
+\begin{document}
+ ...
+\begin{texdraw}
+ ... % TeXdraw commands to generate a drawing
+\end{texdraw}
+ ...
+\end{document}
+</PRE>
+
+<P>
+As the TeXdraw commands are processed by TeX, an intermediate
+PostScript file is generated. The intermediate PostScript has a name of
+the form <TT>`<VAR>name</VAR>.ps1'</TT>. The name part is derived from the name
+of the main TeX file being processed. If more than one drawing is
+produced, the digit in the file name extension is
+incremented.<A NAME="DOCF1" HREF="texdraw_foot.html#FOOT1">(1)</A>
+
+
+<P>
+The TeXdraw commands to produce a drawing are inserted between
+<CODE>\btexdraw</CODE> and <CODE>\etexdraw</CODE> commands, or for LaTeX, between
+<CODE>\begin{texdraw}</CODE> and <CODE>\end{texdraw}</CODE> commands. This
+results in a TeX box of appropriate size containing the drawing
+generated by the TeXdraw commands. The TeXdraw box can be
+positioned in a document like any other TeX box.
+
+
+<P>
+The <CODE>\centertexdraw{...}</CODE> macro centers the box generated by
+TeXdraw. The vertical space taken up is equal to the vertical size
+of the drawing. The <CODE>\centertexdraw</CODE> macro is normally used in
+vertical mode (between paragraphs). A <CODE>\par</CODE> command (a blank line
+will do also) before a <CODE>\centertexdraw</CODE> command will terminate
+horizontal mode and return to vertical mode. For LaTeX, a structured
+equivalent to the <CODE>\centertexdraw{...}</CODE> command is shown below.
+
+<PRE>
+\begin{center}
+\begin{texdraw}
+ ...
+\end{texdraw}
+\end{center}
+</PRE>
+
+<P>
+The <CODE>\everytexdraw</CODE> command can be used to define a set of
+TeXdraw commands that will be executed at the beginning of every
+TeXdraw drawing. It is invoked as <CODE>\everytexdraw{ ...}</CODE>,
+with the desired TeXdraw commands as arguments.
+
+
+<DL COMPACT>
+
+<DT><CODE>\btexdraw</CODE>
+<DD>
+<A NAME="IDX11"></A>
+
+Start a TeXdraw drawing. The drawing is terminated with an
+<CODE>\etexdraw</CODE> command.
+<A NAME="IDX12"></A>
+<DT><CODE>\etexdraw</CODE>
+<DD>
+End a TeXdraw drawing started with a <CODE>\btexdraw</CODE> command. The
+resulting TeXdraw drawing is placed in a box with height equal to the
+height of the drawing and width equal to the width of the drawing. The
+depth of the box is zero.
+<A NAME="IDX13"></A>
+<DT><CODE>\begin{texdraw}</CODE>
+<DD>
+Start a TeXdraw drawing. The drawing is terminated with an
+<CODE>\end{texdraw}</CODE> command. This command is for use with LaTeX.
+<A NAME="IDX14"></A>
+<DT><CODE>\end{texdraw}</CODE>
+<DD>
+End a TeXdraw drawing started with a <CODE>\begin{texdraw}</CODE>
+command. The resulting TeXdraw drawing is placed in a box with
+height equal to the height of the drawing and width equal to the width
+of the drawing. The depth of the box is zero. This command is for use
+with LaTeX.
+<A NAME="IDX15"></A>
+<DT><CODE>\centertexdraw{ ... }</CODE>
+<DD>
+Center a TeXdraw box horizontally. The argument contains TeXdraw
+commands. The resulting box has the horizontal size <CODE>\hsize</CODE> and
+height equal to the height of the drawing.
+<A NAME="IDX16"></A>
+<DT><CODE>\everytexdraw{ ... }</CODE>
+<DD>
+Specify TeXdraw commands to be executed at the beginning of every
+TeXdraw drawing.
+</DL>
+
+
+
+<H2><A NAME="SEC5" HREF="texdraw_toc.html#TOC5">2.2 Command syntax</A></H2>
+<P>
+<A NAME="IDX17"></A>
+<A NAME="IDX18"></A>
+
+
+<P>
+Generally TeXdraw commands that take a single argument need a
+terminating blank or newline after the argument. Arguments that are
+self-delimiting, such as coordinates within parentheses and text within
+braces, do not need the terminating blank. However, even when not
+needed by the defining syntax of the command, blanks following command
+arguments are allowed and ignored within the TeXdraw environment.
+
+
+<P>
+On entering the TeXdraw environment, TeX is in internal vertical
+mode (vertical mode inside a <CODE>\vbox</CODE>). In this mode, spaces can be
+placed freely between commands. However, any other extraneous input
+that generates output that is not part of the TeXdraw environment is
+disallowed.
+
+
+<P>
+Blank lines are interpreted as paragraph breaks, equivalent to a
+<CODE>\par</CODE> command. The TeXdraw macro <CODE>\centertexdraw</CODE> is
+defined with the <CODE>\long</CODE> attribute to allow <CODE>\par</CODE> commands
+and blank lines to be interspersed between TeXdraw commands. The
+<CODE>\btexdraw</CODE> and <CODE>\etexdraw</CODE> commands also allow <CODE>\par</CODE>
+command and blank lines to be included.
+
+
+
+
+<H2><A NAME="SEC6" HREF="texdraw_toc.html#TOC6">2.3 TeXdraw coordinates</A></H2>
+<P>
+<A NAME="IDX19"></A>
+
+
+<P>
+The TeXdraw coordinate system has increasing <VAR>x</VAR> to the right and
+increasing <VAR>y</VAR> upward. The coordinates (without the unit) are
+floating point numbers. Integer values can be written without a decimal
+point. The size of the drawing is determined by the maximum excursions
+of the coordinates specified in TeXdraw commands.
+
+
+<P>
+Consider the following example of TeXdraw commands to draw a simple
+figure.
+
+<PRE>
+\centertexdraw{
+ \drawdim cm \linewd 0.02
+ \move(2 2) \lvec(3 3) \lvec(2 4) \lvec(1 3) \lvec(2 2)
+ \textref h:C v:C \htext(2 3){$\sum \rho_n$}
+}
+</PRE>
+
+<P>
+This drawing uses units of centimetres, with a line width of 0.02 cm.
+The <VAR>x</VAR> coordinate ranges between 1 and 3 while the <VAR>y</VAR>
+coordinate ranges between 2 and 4. When included into a document, the
+size of the drawing is 2 cm by 2 cm. The drawing is placed in a TeX
+box, with the lower lefthand corner of the box corresponding to
+TeXdraw coordinate <CODE>(1 2)</CODE> and the upper righthand corner at
+<CODE>(3 4)</CODE>. The <CODE>\centertexdraw</CODE> command centers the drawing
+horizontally. The <CODE>\textref</CODE> command controls the centering of the
+text. The text in this drawing is centered (both horizontally and
+vertically) at the coordinate <CODE>(2 3)</CODE>.
+
+
+
+
+<H2><A NAME="SEC7" HREF="texdraw_toc.html#TOC7">2.4 Coordinate specification</A></H2>
+<P>
+<A NAME="IDX20"></A>
+<A NAME="IDX21"></A>
+
+
+<P>
+Coordinates are specified within parentheses, with blanks (but no comma)
+between the values. Leading blanks and trailing blanks are permitted
+within the parentheses. The coordinates refer to units, which are
+specified by the <CODE>\drawdim</CODE> command. The default is inches, but
+any valid TeX dimension unit can be specified. Symbolic
+specification of saved coordinate values will be discused later
+(see section <A HREF="texdraw_3.html#SEC16">3.3 Saving positions</A>).
+
+
+<DL COMPACT>
+
+<DT><CODE>\drawdim <VAR>dim</VAR></CODE>
+<DD>
+<A NAME="IDX22"></A>
+
+Set the units to <VAR>dim</VAR>. The argument <VAR>dim</VAR> can be any valid
+TeX dimension unit. The units are used to interpret coordinate
+values. Examples of valid units: <CODE>cm</CODE>, <CODE>mm</CODE>, <CODE>in</CODE>,
+<CODE>pt</CODE>, and <CODE>bp</CODE>.
+</DL>
+
+<P>
+Examples of coordinate and scaling specifications:
+<DL COMPACT>
+
+<DT><CODE>\drawdim {cm} \move(2 2)</CODE>
+<DD>
+Set the units to centimetres, move to a position 2 cm to the right and 2
+cm up from the origin of the drawing coordinate system.
+<DT><CODE>\drawdim bp</CODE>
+<DD>
+Set the units to big points.
+<DT><CODE>\lvec ( 2.2 +5.5) \lvec(2.3 -2) \lvec(2.2 5.4 )</CODE>
+<DD>
+Examples of acceptable coordinate specifications.
+</DL>
+
+
+
+<H2><A NAME="SEC8" HREF="texdraw_toc.html#TOC8">2.5 Line vectors</A></H2>
+<P>
+<A NAME="IDX23"></A>
+<A NAME="IDX24"></A>
+<A NAME="IDX25"></A>
+<A NAME="IDX26"></A>
+<A NAME="IDX27"></A>
+
+
+<P>
+TeXdraw implements moves, line vectors and arrow vectors. There are
+both absolute and relative motion versions of these vector commands.
+TeXdraw maintains a current position. Lines are drawn from the
+current position to a new coordinate, with the new coordinate becoming
+the new current position. An explicit move can be used to establish a
+new current position. The position <CODE>(0 0)</CODE> is used if there is no
+move to an initial current position.
+
+
+<P>
+The <CODE>\move</CODE> and <CODE>\rmove</CODE> commands establish a new current
+position without drawing a line. The <CODE>\lvec</CODE> and <CODE>\rlvec</CODE>
+commands draw a line from the current position to a new position, which
+then becomes the new current position. The <CODE>\avec</CODE> and
+<CODE>\ravec</CODE> commands draw a line with an arrowhead from the current
+position to a new coordinate, which then becomes the new current
+position. The tip of the arrow is at the new current position. The
+direction of the arrow follows the direction of the line. Since this
+direction is undefined for zero length vectors, these are not allowed
+for <CODE>\avec</CODE> or <CODE>\ravec</CODE>. Zero length arrow vectors will
+generate a PostScript print error: <CODE>undefinedresult</CODE>. For any
+non-zero length vector, the full size arrowhead is drawn, even if that
+arrowhead is longer than the line length.
+
+
+<P>
+The absolute motion versions of these commands specify the coordinate of
+the final position.
+
+
+<DL COMPACT>
+
+<DT><CODE>\move (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+<A NAME="IDX28"></A>
+
+Move to coordinate <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position
+is <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>.
+<A NAME="IDX29"></A>
+<DT><CODE>\lvec (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+Draw a line from the current position to coordinate <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>.
+<A NAME="IDX30"></A>
+<DT><CODE>\avec (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+Draw a line with an arrowhead from the current position to
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The arrowhead is aligned with the line, with the tip at
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>.
+</DL>
+
+<P>
+<A NAME="IDX31"></A>
+The relative motion versions of these commands interpret the coordinates
+as displacements relative to the current position. Given the
+displacements <CODE>(<VAR>dx</VAR> <VAR>dy</VAR>)</CODE> as a parameter, each of the
+relative motion commands moves <VAR>dx</VAR> units in the <VAR>x</VAR> direction
+and <VAR>dy</VAR> units in the <VAR>y</VAR> direction.
+
+
+<DL COMPACT>
+
+<DT><CODE>\rmove (<VAR>dx</VAR> <VAR>dy</VAR>)</CODE>
+<DD>
+<A NAME="IDX32"></A>
+
+Move from the current position, <VAR>dx</VAR> units in the <VAR>x</VAR> direction
+and <VAR>dy</VAR> units in the <VAR>y</VAR> direction. The final position becomes
+the new current position.
+<A NAME="IDX33"></A>
+<DT><CODE>\rlvec (<VAR>dx</VAR> <VAR>dy</VAR>)</CODE>
+<DD>
+Draw a line from the current position, <VAR>dx</VAR> units in the <VAR>x</VAR>
+direction and <VAR>dy</VAR> units in the <VAR>y</VAR> direction. The final
+position becomes the new current position.
+<A NAME="IDX34"></A>
+<DT><CODE>\ravec (<VAR>dx</VAR> <VAR>dy</VAR>)</CODE>
+<DD>
+Draw a line with an arrowhead from the current position, <VAR>dx</VAR> units
+in the <VAR>x</VAR> direction and <VAR>y</VAR> units in the <VAR>y</VAR> direction.
+The final position becomes the new current position. The arrowhead is
+aligned with the line, with the tip at the new current position.
+</DL>
+
+<P>
+Lines can be customized with commands to change the line width, line
+pattern and line gray level rendition. In addition, commands for
+changing the type and size of the arrowhead are available.
+
+
+<P>
+<A NAME="IDX35"></A>
+<A NAME="IDX36"></A>
+<A NAME="IDX37"></A>
+<A NAME="IDX38"></A>
+<A NAME="IDX39"></A>
+<A NAME="IDX40"></A>
+<DL COMPACT>
+
+<DT><CODE>\linewd <VAR>width</VAR></CODE>
+<DD>
+<A NAME="IDX41"></A>
+
+Set the line width to <VAR>width</VAR> units. Initially <VAR>width</VAR> is 0.01
+inches (corresponding to 3 pixels at 300 pixels to the inch).
+<DT><CODE>\lpatt (<VAR>pattern</VAR>)</CODE>
+<DD>
+Set lines to have the pattern <CODE>(<VAR>pattern</VAR>)</CODE>. A pattern is a
+sequence of on/off lengths separated by blanks and enclosed in parentheses.
+The lengths alternately specify the length of a dash and the length of a
+gap between dashes. Each length is interpreted using the current
+scaling and drawing units. The pattern is used cyclically. The empty
+pattern signifies a solid line. The initial line pattern is a solid
+line, corresponding to the empty pattern <CODE>\lpatt ()</CODE>.
+<A NAME="IDX42"></A>
+<DT><CODE>\setgray <VAR>level</VAR></CODE>
+<DD>
+Set the gray level of lines. Gray levels are real values from 0 (black)
+through intermediate values (gray) to 1 (white). The initial gray level
+is 0 corresponding to black.
+<A NAME="IDX43"></A>
+<DT><CODE>\arrowheadtype t:<VAR>type</VAR></CODE>
+<DD>
+Set the arrowhead type to <VAR>type</VAR>, where <VAR>type</VAR> is one of
+<CODE>F</CODE>, <CODE>T</CODE>, <CODE>W</CODE>, <CODE>V</CODE>, or <CODE>H</CODE>. There are two
+kinds of arrowheads. The first kind is a triangle. There are 3
+variants: type <CODE>T</CODE> is an empty triangle, type <CODE>F</CODE> is a filled
+triangle (using the current gray level for lines), type <CODE>W</CODE> is a
+triangle filled with white. The second kind of arrowhead is an open
+ended Vee. There are 2 variants: type <CODE>V</CODE> has the stem continue to
+the tip, type <CODE>H</CODE> has the stem stop at the base of the arrowhead.
+The initial arrowhead type is <CODE>T</CODE>.
+<A NAME="IDX44"></A>
+<DT><CODE>\arrowheadsize l:<VAR>length</VAR> w:<VAR>width</VAR></CODE>
+<DD>
+Set the arrowhead size to be <VAR>length</VAR> units long and <VAR>width</VAR>
+units wide. The width is measured across the "base" of the arrowhead.
+The initial arrowhead size has a <VAR>length</VAR> of 0.16 inches and a
+<VAR>width</VAR> of 0.08 inches.
+</DL>
+
+<P>
+Note that the lines which outline the arrowhead will be drawn with the
+same line pattern used for the stem. Normally, arrow vectors are drawn
+with the line pattern set for a solid line. Note that the fill level
+used for the <CODE>F</CODE> variant of the arrowhead uses the same gray level
+as used for lines. The difference between the <CODE>T</CODE> variant and the
+<CODE>W</CODE> variant only shows up if the arrowhead is placed over non-white
+areas of the drawing. The <CODE>W</CODE> variant obliterates the area under
+the arrowhead.
+
+
+<P>
+Examples of line parameter and arrowhead settings are shown in the
+following code.
+
+<PRE>
+\centertexdraw{
+ \drawdim in
+ \linewd 0.03 \setgray 0.6 \arrowheadtype t:F \avec(0 0.5)
+ \linewd 0.01 \setgray 0 \arrowheadtype t:V \avec(0.5 0.5)
+ \linewd 0.015 \lpatt(0.067 0.1) \lvec (1 0)
+ \linewd 0.02 \lpatt() \arrowheadtype t:T \avec(1.5 0.5)
+ \arrowheadtype t:H \avec(2.0 0.5)
+ \setgray 0.4 \arrowheadtype t:W \avec(3.0 0)
+}
+</PRE>
+
+
+
+<H2><A NAME="SEC9" HREF="texdraw_toc.html#TOC9">2.6 TeX text</A></H2>
+<P>
+<A NAME="IDX45"></A>
+
+
+<P>
+Text may be superimposed on the drawing. The text argument of the
+<CODE>\htext</CODE> command is in horizontal mode. This text can be ordinary
+text, math mode expressions, or even more complicated boxes consisting
+of tables and the like. The resulting TeX text is placed in a box.
+The reference point of the box can be chosen to be one of nine
+locations: horizontally left, center or right; vertically top, center or
+bottom. The <CODE>\htext</CODE> command takes one of two forms.
+
+
+<DL COMPACT>
+
+<DT><CODE>\htext (<VAR>x</VAR> <VAR>y</VAR>){<VAR>text</VAR>}</CODE>
+<DD>
+<A NAME="IDX46"></A>
+
+<DT><CODE>\htext {<VAR>text</VAR>}</CODE>
+<DD>
+The first form of this command places the TeX text <VAR>text</VAR>
+horizontally with the text reference point at the coordinate
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The second form of this command places the TeX text
+<VAR>text</VAR> horizontally with the text reference point at the current
+position. The text reference point is set with the <CODE>\textref</CODE>
+command.
+</DL>
+
+<P>
+<A NAME="IDX47"></A>
+<A NAME="IDX48"></A>
+<A NAME="IDX49"></A>
+Text can be placed vertically using the <CODE>\vtext</CODE> command. The text
+argument is in horizontal mode. The TeX text is placed in a box and
+then rotated counterclockwise. The reference point is the point in the
+box, <EM>before</EM> rotation of the text. Not all PostScript printer
+drivers support vertical text.
+
+
+<DL COMPACT>
+
+<DT><CODE>\vtext (x y){<VAR>text</VAR>}</CODE>
+<DD>
+<A NAME="IDX50"></A>
+
+<DT><CODE>\vtext {<VAR>text</VAR>}</CODE>
+<DD>
+The first form of this command places the TeX text <VAR>text</VAR>
+vertically with the text reference point at the coordinate
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The second form of this command places the TeX text
+<VAR>text</VAR> vertically with the text reference point at the current
+position. In both cases, the TeX text is placed in a box and the box
+is rotated counterclockwise by 90 degrees about the text reference
+point. The text reference point is set with the <CODE>\textref</CODE>
+command.
+</DL>
+
+<P>
+<A NAME="IDX51"></A>
+<A NAME="IDX52"></A>
+Text can be placed at an arbitrary angle using the <CODE>\rtext</CODE>
+command. The text argument is in horizontal mode. The TeX text is
+placed in a box and then rotated counterclockwise. The reference point
+is the point in the box, <EM>before</EM> rotation of the text. Not all
+PostScript printer drivers support rotated text.
+
+
+<DL COMPACT>
+
+<DT><CODE>\rtext td:<VAR>angle</VAR> (x y){<VAR>text</VAR>}</CODE>
+<DD>
+<A NAME="IDX53"></A>
+
+<DT><CODE>\rtext td:<VAR>angle</VAR> {<VAR>text</VAR>}</CODE>
+<DD>
+The first form of this command places the TeX text <VAR>text</VAR> at an
+angle with the text reference point at the coordinate <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The
+second form of this command places the TeX text <VAR>text</VAR> at an
+angle with the text reference point at the current position. In both
+cases, the TeX text is placed in a box and the box is rotated
+counterclockwise by <VAR>angle</VAR> degrees about the text reference point.
+The text reference point is set with the <CODE>\textref</CODE> command.
+</DL>
+
+<P>
+The reference point for subsequent TeX text in a <CODE>\htext</CODE>,
+<CODE>\vtext</CODE> or <CODE>\rtext</CODE> command is set with the <CODE>\textref</CODE>
+command.
+
+
+<DL COMPACT>
+
+<DT><CODE>\textref h:<VAR>h-ref</VAR> v:<VAR>v-ref</VAR></CODE>
+<DD>
+<A NAME="IDX54"></A>
+
+Set the text reference point for subsequent text commands. The
+horizontal reference point <VAR>h-ref</VAR> is one of <CODE>L</CODE>, <CODE>C</CODE> or
+<CODE>R</CODE> (left, center or right). The vertical reference point
+<VAR>v-ref</VAR> is one of <CODE>T</CODE>, <CODE>C</CODE> or <CODE>B</CODE> (top, center or
+bottom). For rotated text, the reference point is determined before
+rotation. The initial text reference point corresponds to
+<CODE>\textref h:L v:B</CODE>.
+</DL>
+<P>
+
+
+<P>
+The font used to render the text is determined as for any other TeX
+text. Normally the font used outside of TeXdraw is in effect. If
+desired, other fonts can be specified as part of the text. Any font
+changes within a TeXdraw text command remain local to that command.
+
+
+<P>
+Only the coordinate of the text reference point in a <CODE>\htext</CODE>,
+<CODE>\vtext</CODE> or <CODE>\rtext</CODE> command is used in calculating the size
+of the drawing. This means that text itself can spill outside of the
+drawing area determined by TeXdraw. The area of the drawing can be
+increased to include the text by issuing additional <CODE>\move</CODE>
+commands.
+
+
+
+<PRE>
+\centertexdraw{
+ \avec(-0.75 -0.25) \textref h:R v:C \htext{H-text}
+ \move(0 0) \avec(-0.75 +0.25) \textref h:R v:B \htext{H-text}
+ \move(0 0) \avec(0 +0.5) \textref h:L v:T \vtext{V-text}
+ \move(0 0) \avec(+0.75 +0.25) \textref h:L v:B \htext{H-text}
+ \move(0 0) \avec(+0.75 -0.25) \textref h:L v:C \htext{H-text}
+}
+</PRE>
+
+
+
+<H2><A NAME="SEC10" HREF="texdraw_toc.html#TOC10">2.7 Circles, ellipses and arcs</A></H2>
+<P>
+<A NAME="IDX55"></A>
+<A NAME="IDX56"></A>
+<A NAME="IDX57"></A>
+<A NAME="IDX58"></A>
+
+
+<P>
+TeXdraw supplies commands to generate circles, ellipses and arcs.
+There are two forms of the circle command. The <CODE>\lcir</CODE> command
+draws a circle of given radius. The <CODE>\fcir</CODE> command draws a filled
+circle. In the latter case, the circle is filled by a specified gray
+level. For the filled circle, the line defining the circumference of
+the circle is not drawn. Note that the gray level area filled in by the
+<CODE>\fcir</CODE> command is opaque, even if the fill is chosen to be white.
+For either form of the circle command, the drawing size is increased if
+necessary to contain the circle.
+
+
+<P>
+The <CODE>\lellip</CODE> command generates an ellipse specified by the radius
+of the ellipse in the <VAR>x</VAR> direction and the radius of the ellipse in
+the <VAR>y</VAR> direction. The ellipse is symmetrical about horizontal and
+vertical lines drawn through the current point. The <CODE>\fellip</CODE>
+command draws a filled ellipse. In the latter case, the ellipse is
+filled by a specified gray level. For the filled ellipse, the line
+defining the boundary of the ellipse is not drawn. For either form of
+the ellipse command, the drawing size is increased if necessary to
+contain the ellipse.
+
+
+<P>
+The <CODE>\larc</CODE> command generates a counterclockwise arc specified by a
+start angle in degrees and an end angle in degrees. The center of the
+arc is the current position. Only the arc is drawn, not the line
+joining the center to the beginning of the arc. Note that the
+<CODE>\larc</CODE> command does not affect the size of the drawing.
+
+
+<DL COMPACT>
+
+<DT><CODE>\lcir r:<VAR>radius</VAR></CODE>
+<DD>
+<A NAME="IDX59"></A>
+
+Draw a circle with center at the current position. The radius is
+specified by <VAR>radius</VAR>. This command draws a line along the
+circumference of the circle. The drawing size is increased if necessary
+to contain the circle.
+<A NAME="IDX60"></A>
+<DT><CODE>\fcir f:<VAR>level</VAR> r:<VAR>radius</VAR></CODE>
+<DD>
+Draw a filled circle with center at the current position. The radius is
+specified by <VAR>radius</VAR>. The circle is painted with the gray level
+specified by <VAR>level</VAR>. A gray level of 1 corresponds to white, with
+decreasing values getting darker. The level 0 is full black. This
+command does not draw a line along the circumference. The drawing size
+is increased if necessary to contain the circle.
+<A NAME="IDX61"></A>
+<DT><CODE>\lellip rx:<VAR>x-radius</VAR> ry:<VAR>y-radius</VAR></CODE>
+<DD>
+Draw an ellipse with center at the current position. The radius in the
+<VAR>x</VAR> direction is specified by <VAR>x-radius</VAR>. The radius in the
+<VAR>y</VAR> direction is specified by <VAR>y-radius</VAR>. The drawing size is
+increased if necessary to contain the ellipse.
+<A NAME="IDX62"></A>
+<DT><CODE>\fellip f:<VAR>level</VAR> rx:<VAR>x-radius</VAR> ry:<VAR>y-radius</VAR></CODE>
+<DD>
+Draw a filled ellipse with center at the current position. The radius
+in the <VAR>x</VAR> direction is specified by <VAR>x-radius</VAR>. The radius in
+the <VAR>y</VAR> direction is specified by <VAR>y-radius</VAR>. The ellipse is
+painted with the gray level specified by <VAR>level</VAR>. A gray level of 1
+corresponds to white, with decreasing values getting darker. The level
+0 is full black. This command does not draw a line along the boundary
+of the ellipse. The drawing size is increased if necessary to contain
+the ellipse.
+<A NAME="IDX63"></A>
+<DT><CODE>\larc r:<VAR>radius</VAR> sd:<VAR>start-angle</VAR> ed:<VAR>end-angle</VAR></CODE>
+<DD>
+Draw a counterclockwise arc. The center of the arc is at the current
+position. The radius is specified by <VAR>radius</VAR>. The start and end
+angles (in degrees) are specified by <VAR>start-angle</VAR> and
+<VAR>end-angle</VAR>. This command does not affect the limits (size) of the
+drawing.
+</DL>
+
+<P>
+As an example, the following commands draw a filled circle, and
+superimpose an arc.
+
+<PRE>
+\centertexdraw{
+ \linewd 0.02
+ \fcir f:0.7 r:1
+ \larc r:1 sd:45 ed:135
+ \lvec (+0.707 +0.707) \move (0 0) \lvec (-0.707 +0.707)
+}
+</PRE>
+
+<P>
+Note that for the arc command, the resulting figure can spill outside of
+the TeXdraw box as determined by the maximum excursions of the
+coordinates. Extra moves can be used to compensate for the size of the
+arc.
+
+
+
+
+<H2><A NAME="SEC11" HREF="texdraw_toc.html#TOC11">2.8 Bezier curves</A></H2>
+<P>
+<A NAME="IDX64"></A>
+<A NAME="IDX65"></A>
+
+
+<P>
+Bezier curves in TeXdraw use 4 reference coordinates, two as the end
+points and two others to control the shape of the curve. Let the 4
+points be <CODE>(<VAR>x0</VAR> <VAR>y0</VAR>)</CODE>, <CODE>(<VAR>x1</VAR> <VAR>y1</VAR>)</CODE>,
+<CODE>(<VAR>x2</VAR> <VAR>y2</VAR>)</CODE> and <CODE>(<VAR>x3</VAR> <VAR>y3</VAR>)</CODE>. The curve
+starts out tangent to the line joining the first two points and ends up
+tangent to the line joining the second two points. The control points
+"pull" at the curve to control the curvature. The amount of pull
+increases with the distance of the control point from the endpoint.
+
+
+<P>
+As the parameter u varies from 0 to 1, the coordinates of the Bezier
+curve are given by a pair of parametric cubic equations,
+
+
+<P>
+x(u) = (1-u)^3 x0 + 3u (1-u)^2 x1 + 3u^2 (1-u) x2 + u^3 x3
+y(u) = (1-u)^3 y0 + 3u (1-u)^2 y1 + 3u^2 (1-u) y2 + u^3 y3 .
+
+
+<DL COMPACT>
+
+<DT><CODE>\clvec (<VAR>x1</VAR> <VAR>y1</VAR>)(<VAR>x2</VAR> <VAR>y2</VAR>)(<VAR>x3</VAR> <VAR>y3</VAR>)</CODE>
+<DD>
+<A NAME="IDX66"></A>
+
+Draw a Bezier curve from the current position to the coordinate
+<CODE>(<VAR>x3</VAR> <VAR>y3</VAR>)</CODE> which becomes the new current position. The
+coordinates <CODE>(<VAR>x1</VAR> <VAR>y1</VAR>)</CODE> and <CODE>(<VAR>x2</VAR> <VAR>y2</VAR>)</CODE>
+serve as control points for the curve. Only the last coordinate given
+is used to update the size of the drawing.
+</DL>
+<P>
+Note that only 3 coordinate pairs are specified. The other point is the
+current position before the <CODE>\clvec</CODE> command is executed. Only the
+last coordinate specified in the <CODE>\clvec</CODE> command is used to
+determine the extent of the drawing. While the Bezier curve passes
+through the old current position and the new current position, in
+general the curve will not reach the intermediate control points. The
+curve is always entirely enclosed by the convex quadrilateral defined by
+the two end points and the two control points. Note that the curve may
+pass outside the limits of the drawing as determined by the end point of
+the curve.
+
+
+<P>
+A simple Bezier curve is produced by the following example.
+
+<PRE>
+\btexdraw
+ \move (0 0)
+ \clvec (0 1)(1 0)(1 1)
+\etexdraw
+</PRE>
+
+
+
+<H2><A NAME="SEC12" HREF="texdraw_toc.html#TOC12">2.9 Fill commands</A></H2>
+<P>
+<A NAME="IDX67"></A>
+<A NAME="IDX68"></A>
+<A NAME="IDX69"></A>
+
+
+<P>
+PostScript deals with paths consisting of line segments. The paths can
+be closed and the interior of the closed region filled. From
+TeXdraw, paths start with a <CODE>\move</CODE> or <CODE>\rmove</CODE> command and
+continue with <CODE>\lvec</CODE>, <CODE>\rlvec</CODE> or <CODE>\clvec</CODE> commands.
+The TeXdraw fill commands close the path and fill the interior of the
+closed region. Closing the path means that effectively another
+<CODE>\lvec</CODE> line is drawn from the last point specified to the initial
+point. TeXdraw provides two forms of the fill command. The
+<CODE>\ifill</CODE> fills the interior of the region with the given gray
+level. The lines defining the path are not drawn. The <CODE>\lfill</CODE>
+command fills the region defined by the closed path and draws a line
+along the enclosing path. Note for both forms of the fill command, the
+gray level used for filling is opaque, even if the gray level is chosen
+to be white.
+
+
+<DL COMPACT>
+
+<DT><CODE>\lfill f:<VAR>level</VAR></CODE>
+<DD>
+<A NAME="IDX70"></A>
+
+Close the current path, draw the line around the path using the current
+grey level for lines and paint the interior of the region with specified
+gray level <VAR>level</VAR>. Gray levels are real values from 0 (black)
+through intermediate values (grays) to 1 (white).
+<A NAME="IDX71"></A>
+<DT><CODE>\ifill f:<VAR>level</VAR></CODE>
+<DD>
+Close the current path and paint the interior of the region with gray
+level <VAR>level</VAR>. The line around the path is not drawn. Gray levels
+are real values from 0 (black) through intermediate values (grays) to 1
+(white).
+</DL>
+
+<P>
+The following example draws a "flag" with the interior filled in. The
+path around the boundary is given in a clockwise order to define a
+closed path. We could take advantage of the fact that the fill command
+will close an open path to eliminate one of the <CODE>\lvec</CODE> commands.
+
+<PRE>
+\centertexdraw{
+\move (0.5 0)
+\lvec (0 0.5) \clvec (0.5 0.85)(1 0.65)(1.5 1)
+\lvec (2 0.5) \clvec (1.5 0.15)(1 0.35)(0.5 0)
+\lfill f:0.8
+}
+</PRE>
+
+<P>
+In TeXdraw, the <CODE>\move</CODE> command always terminates any previous
+paths and starts a new path. Commands that change line parameters
+(e.g. <CODE>\setgray</CODE> or <CODE>\lpatt</CODE>) also terminate paths and start
+new paths. The circle, ellipse and arc commands do not affect the
+definition of the current path. The <CODE>\avec</CODE> command is not
+appropriate for defining a path to be filled. It ends a subpath at its
+tail and begins a new subpath at its tip. Filling a region defined by a
+path with subpaths is more complicated in that each subpath is closed
+before filling.
+
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_1.html">previous</A>, <A HREF="texdraw_3.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_3.html b/Master/texmf-dist/doc/texdraw/texdraw_3.html
new file mode 100644
index 00000000000..52193c720b2
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_3.html
@@ -0,0 +1,369 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - 3. Drawing Segments and Scaling</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_2.html">previous</A>, <A HREF="texdraw_4.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC13" HREF="texdraw_toc.html#TOC13">3. Drawing Segments and Scaling</A></H1>
+
+<P>
+TeXdraw provides individually scaled segments which can be used to
+create relocatable drawing modules.
+
+
+
+<UL>
+<LI><A HREF="texdraw_3.html#SEC14">Drawing segments</A>
+<LI><A HREF="texdraw_3.html#SEC15">Drawing paths</A>
+<LI><A HREF="texdraw_3.html#SEC16">Saving positions</A>
+<LI><A HREF="texdraw_3.html#SEC17">Scaling coordinates</A>
+<LI><A HREF="texdraw_3.html#SEC18">Drawing size</A>
+<LI><A HREF="texdraw_3.html#SEC19">Initial current position</A>
+</UL>
+
+
+
+<H2><A NAME="SEC14" HREF="texdraw_toc.html#TOC14">3.1 Drawing segments</A></H2>
+<P>
+<A NAME="IDX72"></A>
+<A NAME="IDX73"></A>
+
+
+<P>
+A TeXdraw drawing segment allows for local modifications of
+parameters and relative positioning. A TeXdraw segment is delimited
+by a <CODE>\bsegment</CODE> command and an <CODE>\esegment</CODE> command. Inside
+the segment, the initial current position is <CODE>(0 0)</CODE>. Any changes
+to parameters such as the gray level and the line width, remain local to
+the segment. Segments are implemented in TeX using a
+<CODE>\begingroup</CODE> and <CODE>\endgroup</CODE>. Segments can be nested.
+
+
+<DL COMPACT>
+
+<DT><CODE>\bsegment</CODE>
+<DD>
+<A NAME="IDX74"></A>
+
+Start a drawing segment. The coordinate system is shifted such that the
+current position corresponds to the coordinate <CODE>(0 0)</CODE>. Changes to
+scaling, position and line parameters stay local to the drawing segment.
+<A NAME="IDX75"></A>
+<DT><CODE>\esegment</CODE>
+<DD>
+End a drawing segment. The current position in effect before the
+corresponding <CODE>\bsegment</CODE> command is restored. The scaling and
+line parameter values revert to those in effect before the corresponding
+<CODE>\bsegment</CODE> command was invoked.
+</DL>
+
+
+
+<H2><A NAME="SEC15" HREF="texdraw_toc.html#TOC15">3.2 Drawing paths</A></H2>
+<P>
+<A NAME="IDX76"></A>
+<A NAME="IDX77"></A>
+<A NAME="IDX78"></A>
+Certain subtle interactions occur between drawing segments and fill
+operations. In PostScript, lines are drawn by first defining a path,
+then later stroking the path to draw the line. In TeXdraw, this
+stroking occurs when the line is terminated, say by a <CODE>\move</CODE>
+command. PostScript paths are interrupted by, but continue after a
+drawing segment. This means that a path started before a segment may
+not be stroked (drawn) until after the segment ends. Consider the
+following example.
+
+<PRE>
+\move (0 0)
+\lvec (1 1)
+\bsegment
+ \move (-0.25 -0.25)
+ \fcir f:0.8 r:0.5
+\esegment
+\move (0 0)
+</PRE>
+
+<P>
+A PostScript path is started at <CODE>(0 0)</CODE> and continues with a line
+to <CODE>(1 1)</CODE>. This path is interrupted by the segment. The filled
+circle is drawn next. After the segment, the path continues and is not
+stroked until the <CODE>\move (0 0)</CODE> command after the end of the
+segment. This means that the line appears on top of the filled region.
+
+
+<P>
+If the fill operation is to cover the line, the path must be stroked
+before the fill operation. From TeXdraw, the move commands
+<CODE>\move</CODE> and <CODE>\rmove</CODE>, and the end TeXdraw command
+<CODE>\etexdraw</CODE> terminate a path and cause it to be stroked. Within a
+segment, the end segment command <CODE>\esegment</CODE> also terminates and
+strokes a path. In the example above, the line can be stroked by
+inserting a move command (such as a <CODE>\rmove (0 0)</CODE> which does not
+affect the position), before the start of the segment.
+
+
+
+
+<H2><A NAME="SEC16" HREF="texdraw_toc.html#TOC16">3.3 Saving positions</A></H2>
+<P>
+<A NAME="IDX79"></A>
+<A NAME="IDX80"></A>
+<A NAME="IDX81"></A>
+<A NAME="IDX82"></A>
+
+
+<P>
+The <CODE>\savecurrpos</CODE> command saves the current position. The saved
+position is an absolute position, not one relative to a segment. The
+position saving mechanism is global; the position can be saved within a
+nested segment and then used outside of the segment. The <VAR>x</VAR> and
+<VAR>y</VAR> coordinates of the position are saved separately as named
+coordinates. The names are of the form <CODE>*<VAR>name</VAR></CODE>, with the
+leading <CODE>*</CODE> being obligatory. A companion command,
+<CODE>\savepos</CODE>, saves a given coordinate (relative to the current
+segment) as an absolute symbolic position.
+
+
+<DL COMPACT>
+
+<DT><CODE>\savecurrpos (*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>
+<DD>
+<A NAME="IDX83"></A>
+
+Save the current position as the absolute position referenced by
+<CODE>(*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>.
+<A NAME="IDX84"></A>
+<DT><CODE>\savepos (<VAR>x</VAR> <VAR>y</VAR>)(*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>
+<DD>
+Save the coordinate position <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE> as the absolute
+position referenced by <CODE>(*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>. The coordinate
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE> is interpreted in the normal fashion as a
+coordinate relative to the current segment, using the current scaling
+factors and drawing unit.
+</DL>
+
+<P>
+The symbolic names used to specify a saved position can consist of any
+characters that are not special to TeX, but must start with a
+<CODE>*</CODE> character. The symbolic names can be used as the <VAR>x</VAR>
+and/or <VAR>y</VAR> coordinate in any command that needs a coordinate.
+Symbolic coordinates are not normally used with relative motion commands
+such as <CODE>\rlvec</CODE> or <CODE>\rmove</CODE>. If used with relative motion,
+the corresponding displacement is equal to the symbolic coordinate
+value.
+
+
+<P>
+On exit from a segment, the position and graphics state on entry is
+restored. Any changes to line types, scaling and position are
+discarded. However, it is sometimes useful alter the position on exit
+from a segment. The <CODE>\savepos</CODE> command allows for the saving of a
+position within the segment. This position can be restored after the
+<CODE>\esegment</CODE> with a <CODE>\move</CODE> command using the saved symbolic
+position. This approach can be used to build modules which operate in a
+manner analogous to the basic relative motion line vector commands.
+
+
+<P>
+The following example defines a macro which draws a box 0.75 inches wide
+by 0.5 inches high containing centered text. On leaving the macro the
+position will be set at a point on the righthand side of the box.
+
+<PRE>
+\def\tbox #1{\bsegment
+ \lvec (0 +0.25) \lvec (0.75 +0.25)
+ \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
+ \textref h:C v:C \htext (0.375 0){#1}
+ \savepos (0.75 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+</PRE>
+
+<P>
+With this definition, we can treat <CODE>\tbox</CODE> in the same way as the
+basic vector commands, stringing them together to form a block diagram
+as in this example.
+
+<PRE>
+\centertexdraw{
+ \ravec (1 0) \tbox{$H(z)$} \ravec (1 0)
+}
+</PRE>
+
+
+
+<H2><A NAME="SEC17" HREF="texdraw_toc.html#TOC17">3.4 Scaling coordinates</A></H2>
+<P>
+<A NAME="IDX85"></A>
+<A NAME="IDX86"></A>
+<A NAME="IDX87"></A>
+<A NAME="IDX88"></A>
+
+
+<P>
+There are two scale factors available, the unit scale factor and the
+segment scale factor. The overall scale factor is the product of these
+two. There are absolute and relative versions of commands to change
+these scale factors.
+
+
+<P>
+The unit scale factor is normally used to affect global scale changes.
+Changes to the unit scale factor remains local to a segment, but
+propagate to inferior segments. The default value is unity.
+
+
+<P>
+The segment scale factor is used for local scale changes. It remains
+local to a segment. The segment scale factor is reset to unity on entry
+into each segment. This means that changes to the segment scale factor
+do not propagate to inferior segments.
+
+
+<DL COMPACT>
+
+<DT><CODE>\setunitscale <VAR>scale</VAR></CODE>
+<DD>
+<A NAME="IDX89"></A>
+
+Set the unit scaling to <VAR>scale</VAR>. The argument <VAR>scale</VAR> is a real
+number which is used to scale coordinate values. The overall scaling
+factor is the product of the unit scale factor and the segment scale
+factor.
+<A NAME="IDX90"></A>
+<DT><CODE>\relunitscale <VAR>value</VAR></CODE>
+<DD>
+Adjust the unit scale factor by multiplying by <VAR>value</VAR>. This has
+the effect of multiplying the overall scale factor by the same factor.
+The overall scaling factor is the product of the unit scale factor and
+the segment scale factor.
+<A NAME="IDX91"></A>
+<DT><CODE>\setsegscale <VAR>scale</VAR></CODE>
+<DD>
+Set the segment scale factor. The argument <VAR>scale</VAR> is a real number
+which is used to scale coordinate values. The overall scale factor is
+the product of the unit scale factor and the segment scale factor.
+<A NAME="IDX92"></A>
+<DT><CODE>\relsegscale <VAR>value</VAR></CODE>
+<DD>
+Adjust the segment scale factor by multiplying by <VAR>value</VAR>. This has
+the effect of multiplying the current overall scale factor by the same
+factor. The overall scaling factor is the product of the unit scale
+factor and the segment scale factor.
+</DL>
+
+<P>
+In addition to the unit scale factor and the segment scale factor, the
+scaling can be controlled by the choice of drawing units with the
+command <CODE>\drawdim</CODE> (see section <A HREF="texdraw_2.html#SEC7">2.4 Coordinate specification</A>).
+
+
+<DL COMPACT>
+
+<DT><CODE>\drawdim cm \setunitscale 2.54</CODE>
+<DD>
+Set the units to centimetres scaled by 2.54. Together these commands
+are effectively the same as <CODE>\drawdim in</CODE>.
+</DL>
+
+<P>
+The segment scale can be used to allow scale changes in segments so that
+values are in more convenient units. For example suppose dimensions in
+a segment are multiples of one third of an inch. The segment scale can
+be set once to make 1 drawing unit equal 0.3333 inches. From that point
+on, coordinates can be specified with integer values.
+
+
+<P>
+The following example defines a macro to draw a rectangular box which is
+twice as wide as it is high. The width is specified as an argument.
+
+<PRE>
+\def\mybox #1{\bsegment
+ \setsegscale #1
+ \lvec (0 +0.25) \lvec (1 +0.25) \lvec (1 -0.25)
+ \lvec (0 -0.25) \lvec (0 0)
+ \esegment}
+</PRE>
+
+
+
+<H2><A NAME="SEC18" HREF="texdraw_toc.html#TOC18">3.5 Drawing size</A></H2>
+<P>
+<A NAME="IDX93"></A>
+
+
+<P>
+The effective size of the drawing is determined by the maximum
+excursions of the coordinates supplied to TeXdraw commands. The
+minimum and maximum scaled <VAR>x</VAR> and <VAR>y</VAR> coordinates are tallied.
+Note that <CODE>\move</CODE> commands contribute to the determination of the
+calculated size of the drawing, even though they do not generate visible
+lines. The circle and ellipse commands add a compensation for the radii
+of circles and ellipses. The final TeXdraw drawing is placed in a
+TeX box with lower lefthand corner corresponding to
+<CODE>(</CODE><VAR>x</VAR>-min <VAR>y</VAR>-min<CODE>)</CODE> and upper righthand corner at
+<CODE>(</CODE><VAR>x</VAR>-max <VAR>y</VAR>-max<CODE>)</CODE>.
+
+
+<P>
+Text generated by <CODE>\htext</CODE>, <CODE>\vtext</CODE> or <CODE>\rtext</CODE> can
+spill outside the box as determined above. Only the text reference
+point is guaranteed to be in the drawing box. Arcs can also spill
+outside the drawing box. Note also that the widths of lines, and the
+sizes of arrowheads do not affect the size of the drawing. The
+calculated size of the drawing will never be larger than the actual size
+of the drawing. In extreme cases in which text or lines extend far
+outside the drawing, extra <CODE>\move</CODE> commands should be used to
+establish the size of the drawing so that the TeXdraw box includes
+all of the drawing.
+
+
+<P>
+TeXdraw provides the <CODE>\drawbb</CODE> command to draw a box which
+indicates the effective size of the drawing. Whenever <CODE>\drawbb</CODE> is
+invoked, a ruled box is drawn around the drawing as it has been sized up
+to that point. Normally <CODE>\drawbb</CODE> is invoked just before the end
+of a drawing to indicate the effective size of the final drawing.
+
+
+<DL COMPACT>
+
+<DT><CODE>\drawbb</CODE>
+<DD>
+<A NAME="IDX94"></A>
+
+Draw a ruled box around the effective size of a drawing produced by
+TeXdraw commands.
+</DL>
+
+
+
+<H2><A NAME="SEC19" HREF="texdraw_toc.html#TOC19">3.6 Initial current position</A></H2>
+<P>
+<A NAME="IDX95"></A>
+<A NAME="IDX96"></A>
+
+
+<P>
+The first operation in a drawing should be a move to establish the
+current position. The current position can be established explicitly
+through a <CODE>\move</CODE> command or a text positioning command such as
+<CODE>\htext</CODE> with a coordinate. However, if an attempt is made to use
+a drawing command which needs a current position and none has been
+established, TeXdraw implicitly sets the initial current position to
+<CODE>(0 0)</CODE>. The size of the TeXdraw figure is normally determined
+from the sequence of coordinates specified, but will include the
+implicit initial position in case another initial position has not been
+explicitly specified.
+
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_2.html">previous</A>, <A HREF="texdraw_4.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_4.html b/Master/texmf-dist/doc/texdraw/texdraw_4.html
new file mode 100644
index 00000000000..d766d721409
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_4.html
@@ -0,0 +1,119 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - 4. Using TeXdraw with LaTeX</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_3.html">previous</A>, <A HREF="texdraw_5.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC20" HREF="texdraw_toc.html#TOC20">4. Using TeXdraw with LaTeX</A></H1>
+<P>
+<A NAME="IDX97"></A>
+<A NAME="IDX98"></A>
+<A NAME="IDX99"></A>
+<A NAME="IDX100"></A>
+
+
+<P>
+The LaTeX typesetting system uses a structured approach to declaring
+typesetting environments. For LaTeX2e, the <CODE>texdraw</CODE> package
+defines the <CODE>texdraw</CODE> environment. The TeXdraw environment is
+started with a <CODE>\begin{texdraw}</CODE> command and terminated with an
+<CODE>\end{texdraw}</CODE> command. All of the basic TeXdraw commands
+can be used within the <CODE>texdraw</CODE> environment.
+
+
+<P>
+As an example, a LaTeX2e variant of an earlier example can be
+constructed as follows.
+
+<PRE>
+\documentclass{article}
+\usepackage{texdraw}
+ ...
+\begin{document}
+ ...
+\newcommand{\tbox}[1]{%
+ \bsegment
+ \lvec (0 +0.25) \lvec (0.75 +0.25)
+ \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
+ \textref h:C v:C \htext (0.375 0){#1}
+ \savepos (0.75 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\begin{center}
+\begin{texdraw}
+ \ravec (1 0) \tbox{$H(z)$} \ravec (1 0)
+\end{texdraw}
+\end{center}
+ ...
+\end{document}
+</PRE>
+
+<P>
+This example illustrates the use of the LaTeX command
+<CODE>\newcommand</CODE> as an alternative to the plain TeX command
+<CODE>\def</CODE>. Instead of the basic TeXdraw command
+<CODE>\centertexdraw</CODE>, a nested combination of the LaTeX centering
+environment and the TeXdraw environment is used.
+
+
+
+<UL>
+<LI><A HREF="texdraw_4.html#SEC21">PostScript printer drivers</A>
+</UL>
+
+
+
+<H2><A NAME="SEC21" HREF="texdraw_toc.html#TOC21">4.1 PostScript printer drivers</A></H2>
+<P>
+<A NAME="IDX101"></A>
+<A NAME="IDX102"></A>
+
+
+<P>
+<A NAME="IDX103"></A>
+The <CODE>texdraw</CODE> package uses the printer driver interface provided by
+the standard LaTeX2e <CODE>graphics</CODE> package. Any options to the
+<CODE>texdraw</CODE> package are passed to the <CODE>graphics</CODE> package.
+Specifically, the name of the PostScript driver to be used can be
+specified as an option to the <CODE>texdraw</CODE> package. With no explicit
+printer driver option, the default printer driver associated with the
+<CODE>graphics</CODE> package is used.
+
+
+<P>
+<A NAME="IDX104"></A>
+<A NAME="IDX105"></A>
+<A NAME="IDX106"></A>
+<A NAME="IDX107"></A>
+<A NAME="IDX108"></A>
+<A NAME="IDX109"></A>
+<A NAME="IDX110"></A>
+<A NAME="IDX111"></A>
+<A NAME="IDX112"></A>
+<A NAME="IDX113"></A>
+<A NAME="IDX114"></A>
+<A NAME="IDX115"></A>
+<A NAME="IDX116"></A>
+<A NAME="IDX117"></A>
+<A NAME="IDX118"></A>
+The <CODE>texdraw</CODE> package can be used with any of the printer drivers
+supported by the <CODE>graphics</CODE> package that allow for the importation
+of PostScript graphics files, viz., <CODE>dvips</CODE>, <CODE>xdvi</CODE>,
+<CODE>dvi2ps</CODE>, <CODE>dvialw</CODE>, <CODE>dvilaser</CODE>, <CODE>dvipsone</CODE>,
+<CODE>dviwindo</CODE>, <CODE>dvitops</CODE>, <CODE>oztex</CODE>, <CODE>psprint</CODE>,
+<CODE>textures</CODE>, <CODE>pctexps</CODE>, and <CODE>pctexwin</CODE>. Not all of these
+drivers support the text rotation needed for the TeXdraw commands
+<CODE>\vtext</CODE> and <CODE>\rtext</CODE>. Of the drivers listed above, only the
+following support support text rotation: <CODE>dvips</CODE>, <CODE>xdvi</CODE>,
+<CODE>dvi2ps</CODE>, <CODE>dvitops</CODE>, <CODE>textures</CODE>, and <CODE>pctexps</CODE>.
+
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_3.html">previous</A>, <A HREF="texdraw_5.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_5.html b/Master/texmf-dist/doc/texdraw/texdraw_5.html
new file mode 100644
index 00000000000..c880d21341d
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_5.html
@@ -0,0 +1,314 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - 5. More Details</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_4.html">previous</A>, <A HREF="texdraw_6.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC22" HREF="texdraw_toc.html#TOC22">5. More Details</A></H1>
+
+<P>
+The first part of this chapter offers some suggestions for strategies to
+isolate errors in TeX and TeXdraw input. The second part of this
+chapter discusses implementational issues. An awareness of these issues
+is useful if TeXdraw is to be extended.
+
+
+
+<UL>
+<LI><A HREF="texdraw_5.html#SEC23">Errors while using TeXdraw</A>
+<LI><A HREF="texdraw_5.html#SEC24">Extending TeXdraw</A>
+<LI><A HREF="texdraw_5.html#SEC29">How TeXdraw merges graphics and text</A>
+</UL>
+
+
+
+<H2><A NAME="SEC23" HREF="texdraw_toc.html#TOC23">5.1 Errors while using TeXdraw</A></H2>
+<P>
+<A NAME="IDX119"></A>
+<A NAME="IDX120"></A>
+
+
+<P>
+TeX input is notoriously difficult to debug. If TeX reports
+errors, so much the better. If the cause is not immediately obvious,
+consider using a binary search strategy, removing sections of code with
+the premature insertion of the <CODE>\bye</CODE> (or <CODE>\end{document}</CODE>
+for LaTeX) command (with the appropriate closing of any open groups
+and the like). Other strategies include the insertion of
+<CODE>\message{I am here}</CODE> at appropriate places. Try using
+<CODE>\tracingmacros=1</CODE>. Many problems turn out to be due to an
+incorrect number of macro arguments or incorrectly delimited macro
+arguments. The <CODE>\tracingmacros=1</CODE> option writes the macro
+arguments and macro expansions to the TeX log file.
+
+
+<P>
+Certain errors may not manifest themselves until well after the
+offending command. For instance, if a closing parenthesis is missing
+from a TeXdraw coordinate, TeX continues searching for the
+parenthesis. If one is found, perhaps many lines later, the TeXdraw
+error message <CODE>invalid coordinate</CODE> will be printed at this later
+point.
+
+
+<P>
+All input in the TeXdraw environment should be intended for
+interpretation by TeXdraw commands. TeXdraw places text inside a
+zero size box (the text itself extends outside the box). Extraneous
+input manifests itself as a non-zero size TeXdraw text box. This
+causes the TeXdraw text and the PostScript graphics to be displaced
+from one another. An error message is issued if a non-zero width
+TeXdraw text box is detected. If this error message appears, look
+for unintended character sequences amongst the commands to TeXdraw.
+
+
+<P>
+Several TeXdraw commands pass their arguments "raw" to the
+PostScript file. That means that invalid arguments can generate
+PostScript errors when the document is printed. For instance the
+argument of the <CODE>\setgray</CODE> command is passed straight through to
+the PostScript file. If this argument is non-numeric, a PostScript
+error results. Not all PostScript printers report errors back to the
+user. The print may just stop prematurely. One approach to debugging
+is to use a PostScript previewer on a workstation. That way, one can
+determine at which point in the drawing the PostScript error occurs.
+
+
+
+
+<H2><A NAME="SEC24" HREF="texdraw_toc.html#TOC24">5.2 Extending TeXdraw</A></H2>
+<P>
+<A NAME="IDX121"></A>
+
+
+<P>
+TeXdraw is implemented using a combination of TeX commands and
+PostScript code. This section discusses some of the implementational
+issues as they relate to extending TeXdraw.
+
+
+<P>
+TeXdraw as implemented, offers a basic set of drawing features.
+These are adequate for certain tasks such as producing block diagrams.
+There are different approaches to extending TeXdraw to include other
+functions. In some cases, the desired functionality can be achieved by
+writing a TeX macro which builds on top of the existing TeXdraw
+commands. As these extensions become more complex, the limitations of
+TeX for computations become increasingly evident. In other cases,
+access to different features of PostScript is desired. The appropriate
+approach would be to write new PostScript procedures which can be
+accessed by TeX macros.
+
+
+<P>
+Included with TeXdraw is a set of macros for directly accessing
+PostScript functions. These are described in an appendix
+(see section <A HREF="texdraw_6.html#SEC30">A. PostScript Commands</A>).
+
+
+<P>
+TeXdraw also comes with a toolbox of routines for handling much of
+the user interface, converting between different coordinate
+representations and the like. The macros for coordinate decoding and
+for computations involving coordinates are described in an appendix
+(see section <A HREF="texdraw_7.html#SEC31">B. TeXdraw Toolbox</A>).
+
+
+
+<UL>
+<LI><A HREF="texdraw_5.html#SEC25">Scaling</A>
+<LI><A HREF="texdraw_5.html#SEC26">Resolution</A>
+<LI><A HREF="texdraw_5.html#SEC27">Text placement</A>
+<LI><A HREF="texdraw_5.html#SEC28">Intermediate PostScript file</A>
+</UL>
+
+
+
+<H3><A NAME="SEC25" HREF="texdraw_toc.html#TOC25">5.2.1 Scaling</A></H3>
+<P>
+<A NAME="IDX122"></A>
+
+
+<P>
+The scaling commands provided in TeXdraw are designed to affect only
+the coordinate values specified in commands. For instance, changing the
+<CODE>\setunitscale</CODE> value changes the interpretation of the coordinate
+in an <CODE>\avec (<VAR>x</VAR> <VAR>y</VAR>)</CODE> command, but does not change the
+line width or arrowhead sizes in effect. None of the TeXdraw scaling
+commands affect the size of TeX text produced by, for instance, the
+<CODE>\htext</CODE> command. Scale changes will however affect the
+positioning of text for subsequent commands.
+
+
+<P>
+The line parameters are changed only if the corresponding commands to
+change them are issued. If the <CODE>\linewd</CODE> command is given, the
+current coordinate scaling is used to determine the line width. To
+achieve a behaviour more like a global scaling, whenever the scale
+factor is changed, the line parameters should be set again.
+
+
+
+
+<H3><A NAME="SEC26" HREF="texdraw_toc.html#TOC26">5.2.2 Resolution</A></H3>
+<P>
+<A NAME="IDX123"></A>
+
+
+<P>
+TeXdraw scales coordinates before passing them to PostScript.
+Keeping track of the coordinate scaling is necessary, in any event, to
+allow TeXdraw to compute the maximum excursions of the coordinates.
+TeXdraw uses pixel units in its PostScript code. One pixel unit is
+equal to 1/300 of an inch. TeXdraw issues PostScript commands with
+integer valued pixel coordinates. This sets the positioning resolution
+for TeXdraw. The passing of integer valued coordinates which
+correspond to the device resolution keeps lines aligned with the device
+grid; parallel lines of the same width will be rendered with the same
+width.
+
+
+<P>
+The position saving mechanism in TeXdraw (see section <A HREF="texdraw_3.html#SEC16">3.3 Saving positions</A>)
+associates the pixel coordinates of a position with the specified name.
+
+
+<P>
+TeXdraw uses the limited real number representation provided by
+TeX. These operations are based on the representation of dimensions
+as real-valued numbers of points. Internally in TeX, dimensions are
+stored 32-bit values, normalized so that 1 pt corresponds to the scaled
+point (sp) value of 65536. Dimensions with magnitudes between 0.000015
+pt and 32767 pt can be represented. This is also the dynamic range of
+the TeXdraw pixel coordinates passed to PostScript. TeXdraw must
+convert from user supplied coordinates using the scaling factor (which
+itself consists of two components, the unit scale and the segment scale)
+and a pixel conversion factor. The use of limited precision real
+numbers in these computations can cause accumulation of error when
+relative scaling is used repeatedly.
+
+
+
+
+<H3><A NAME="SEC27" HREF="texdraw_toc.html#TOC27">5.2.3 Text placement</A></H3>
+
+<P>
+While in the TeXdraw environment, TeX text is placed in a TeX
+box while PostScript code is written to the intermediate file. At the
+end of the TeXdraw environment, the size of the drawing is
+determined. A TeX box of this size is created. The TeX
+<CODE>\special</CODE> mechanism is used to instruct the PostScript driver
+program to position the PostScript drawing from the intermediate file in
+this area. Next, the text generated by TeXdraw is positioned and
+placed in the box. Note that when the document is printed, the
+PostScript drawing is placed on the page before the TeX text; TeX
+text will appear on top of graphics.
+
+
+<P>
+<A NAME="IDX124"></A>
+<A NAME="IDX125"></A>
+The rotation of text is carried out with in-line PostScript code which
+does not appear in the intermediate PostScript file. This code is sent
+to the PostScript driver with a <CODE>\special</CODE> command. This
+PostScript code is embedded in the dvi (device independent) file that
+TeX produces.
+
+
+
+
+<H3><A NAME="SEC28" HREF="texdraw_toc.html#TOC28">5.2.4 The intermediate PostScript file</A></H3>
+<P>
+<A NAME="IDX126"></A>
+
+
+<P>
+The intermediate PostScript file consists of a header, a body and a
+trailer following Encapsulated PostScript File (EPSF) standards. The
+header sets up PostScript definitions and default parameter values. The
+trailer includes the <CODE>BoundingBox</CODE> information which gives the
+coordinates in default PostScript units (72 per inch) for the lower
+lefthand corner and the upper righthand corner of the drawing. The body
+of the intermediate PostScript file contains the PostScript commands
+generated by TeXdraw.
+
+
+<P>
+Many moves in TeXdraw serve only to position text or to reset saved
+positions. TeXdraw buffers move commands in order to be able to
+collapse runs of moves. Only the last move of a run of moves is
+actually written to the PostScript file. However the intermediate moves
+still affect the size of the drawing. The expunging of moves means that
+the PostScript file <CODE>BoundingBox</CODE> information may indicate a drawing size
+larger than the PostScript commands themselves would warrant.
+
+
+<P>
+Drawing segments in TeXdraw show up in the PostScript file as saves
+and restores of the PostScript graphics state. Segment starts are
+buffered and only written out if necessary. This way "empty" segments
+do not generate output to the PostScript file. These empty segments
+arise if a segment contains only moves and text commands. The moves
+inside the segment are not needed since they are local to the segment,
+and the text commands do not generate output to the PostScript file.
+
+
+<P>
+If TeXdraw is used only for moves and text, no intermediate
+PostScript file will be created.
+
+
+
+
+<H2><A NAME="SEC29" HREF="texdraw_toc.html#TOC29">5.3 How TeXdraw merges graphics and text</A></H2>
+<P>
+<A NAME="IDX127"></A>
+<A NAME="IDX128"></A>
+<A NAME="IDX129"></A>
+
+
+<P>
+TeXdraw creates a box which is the same size as the graphic. The
+printer driver will place the PostScript graphic into this space. Any
+TeX text generated by the TeXdraw commands will be superimposed on
+this graphic.
+
+
+<P>
+<A NAME="IDX130"></A>
+<A NAME="IDX131"></A>
+The LaTeX2e front-end for TeXdraw is enabled by including the
+<CODE>texdraw</CODE> package. The <CODE>texdraw</CODE> package automatically
+invokes the standard <CODE>graphics</CODE> package distributed with
+LaTeX2e. The <CODE>graphics</CODE> package has support for a number of
+different printer drivers, including a number for PostScript printers.
+Any options to the <CODE>texdraw</CODE> package are passed on to the
+<CODE>graphics</CODE> package. Such an option can be used to select a driver
+other than the default one.
+
+
+<P>
+<A NAME="IDX132"></A>
+<A NAME="IDX133"></A>
+<A NAME="IDX134"></A>
+<A NAME="IDX135"></A>
+<A NAME="IDX136"></A>
+Within the <CODE>graphics</CODE> package, the driver option is used to select
+definitions for the low-level macros which generate the <CODE>\special</CODE>
+commands needed to request insertion of a graphics file and to rotate
+text.<A NAME="DOCF2" HREF="texdraw_foot.html#FOOT2">(2)</A>
+TeXdraw uses the user-level macros defined by the <CODE>graphics</CODE>
+package (see section <A HREF="texdraw_4.html#SEC21">4.1 PostScript printer drivers</A>). When not used with the
+LaTeX2e front-end, TeXdraw defines versions of these macros that
+are suitable for use with the <CODE>dvips</CODE> printer driver.
+
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_4.html">previous</A>, <A HREF="texdraw_6.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_6.html b/Master/texmf-dist/doc/texdraw/texdraw_6.html
new file mode 100644
index 00000000000..9686e350ae8
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_6.html
@@ -0,0 +1,183 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - A. PostScript Commands</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_5.html">previous</A>, <A HREF="texdraw_7.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC30" HREF="texdraw_toc.html#TOC30">A. PostScript Commands</A></H1>
+<P>
+<A NAME="IDX137"></A>
+
+
+<P>
+This appendix describes a set of macros for accessing some of the
+PostScript builtin functions. Each of these macros issues a single
+PostScript command. The extra services provided by TeXdraw are the
+interpretation of coordinates in user units relative to the current
+drawing segment and the writing of a pending TeXdraw move to the
+PostScript file. This last operation establishes the current point in
+PostScript. The user of these commands should be familiar with the
+concepts of path construction and filling in PostScript. Further
+details on the PostScript functions used can found in the
+<CITE>PostScript Language Reference Manual, Second Edition</CITE>, Adobe
+Systems, Addison-Wesley, 1990.
+
+
+<P>
+These macros are distributed in file <TT>`txdps.tex'</TT>.
+
+
+<P>
+The <CODE>\PSsetlinecap</CODE> and <CODE>\PSsetlinejoin</CODE> commands control the
+way line ends and line joins are rendered. The default values set by
+TeXdraw (round caps and round join) are appropriate for most
+drawings. Changes to these parameters apply to the current and
+subsequent paths.
+
+
+<P>
+<A NAME="IDX138"></A>
+<A NAME="IDX139"></A>
+<DL COMPACT>
+
+<DT><CODE>\PSsetlinecap <VAR>type</VAR></CODE>
+<DD>
+<A NAME="IDX140"></A>
+ <A NAME="IDX141"></A>
+
+Set the line cap parameter. The value <CODE>0</CODE> gives a butt cap;
+<CODE>1</CODE> gives a round cap; and <CODE>2</CODE> gives a projecting square cap.
+The initial value is corresponds to a round cap.
+<A NAME="IDX142"></A>
+<A NAME="IDX143"></A>
+<DT><CODE>\PSsetlinejoin <VAR>type</VAR></CODE>
+<DD>
+Set the line join parameter. The value <CODE>0</CODE> gives a miter join;
+<CODE>1</CODE> gives a round join; and <CODE>2</CODE> gives a bevel join. The
+initial value corresponds to a round join.
+</DL>
+
+<P>
+<A NAME="IDX144"></A>
+<A NAME="IDX145"></A>
+<A NAME="IDX146"></A>
+<A NAME="IDX147"></A>
+PostScript paths and fill operations can be controlled by a number of
+functions. By design, TeXdraw always maintains a defined PostScript
+current point. Some of the following macros cause the PostScript
+current point to become undefined. The PostScript current point must be
+set again (say with a <CODE>\PSmoveto</CODE> command) before invoking basic
+TeXdraw commands.
+<DL COMPACT>
+
+<DT><CODE>\PSstroke</CODE>
+<DD>
+<A NAME="IDX148"></A>
+ <A NAME="IDX149"></A>
+
+Stroke a PostScript path. The current path is stroked with the current
+gray level (set with <CODE>\setgray</CODE>) and the current line pattern (set
+with <CODE>\lpatt</CODE>). The PostScript current point becomes undefined.
+<A NAME="IDX150"></A>
+<A NAME="IDX151"></A>
+<DT><CODE>\PSnewpath</CODE>
+<DD>
+Establish a new path. The PostScript current point becomes undefined.
+<A NAME="IDX152"></A>
+<A NAME="IDX153"></A>
+<DT><CODE>\PSclosepath</CODE>
+<DD>
+Close a subpath. A new subpath is started.
+<A NAME="IDX154"></A>
+<A NAME="IDX155"></A>
+<DT><CODE>\PSfill</CODE>
+<DD>
+Fill a region defined by a path. Each subpath is closed and the
+enclosed regions painted with the current gray level. The PostScript
+current point becomes undefined. The gray level can be set with the
+TeXdraw command <CODE>\setgray</CODE>.
+</DL>
+
+<P>
+The following line commands interpret coordinates relative to the
+current TeXdraw scaling and drawing segment. The specified
+coordinate affects the drawing size as determined by TeXdraw.
+<A NAME="IDX156"></A>
+<A NAME="IDX157"></A>
+<DL COMPACT>
+
+<DT><CODE>\PSlineto (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+<A NAME="IDX158"></A>
+ <A NAME="IDX159"></A>
+
+Add a line segment to the current path. This command is identical to
+the TeXdraw command <CODE>\lvec</CODE>. The PostScript current point must
+be defined before this command is issued.
+<A NAME="IDX160"></A>
+<A NAME="IDX161"></A>
+<DT><CODE>\PSmoveto (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+Move to the coordinate specified by <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The
+PostScript current point becomes defined.
+</DL>
+
+<P>
+The following macros provide access to the general arc commands in
+PostScript. The coordinates are interpreted relative to the current
+TeXdraw scaling and drawing segment. The specified coordinate
+affects the drawing size as determined by TeXdraw.
+<A NAME="IDX162"></A>
+<DL COMPACT>
+
+<DT><CODE>\PSarc r:<VAR>radius</VAR> sd:<VAR>start-angle</VAR> ed:<VAR>end-angle</VAR> (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+<A NAME="IDX163"></A>
+ <A NAME="IDX164"></A>
+
+Draw a counterclockwise arc. The center of the arc is at the given
+position. The radius is specified by <VAR>radius</VAR>. The start and end
+angles (in degrees) are specified by <VAR>start-angle</VAR> and
+<VAR>end-angle</VAR>. If the PostScript current point is defined, this
+command also draws the line from the current point to the beginning of
+the arc. The line and arc become part of the current path. The current
+point becomes defined.
+<A NAME="IDX165"></A>
+<A NAME="IDX166"></A>
+<DT><CODE>\PSarcn r:<VAR>radius</VAR> sd:<VAR>start-angle</VAR> ed:<VAR>end-angle</VAR> (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+Draw a clockwise arc. The center of the arc is at the given position.
+The radius is specified by <VAR>radius</VAR>. The start and end angles (in
+degrees) are specified by <VAR>start-angle</VAR> and <VAR>end-angle</VAR>. If the
+PostScript current point is defined, this command also draws the line
+from the current point to the beginning of the arc. The line and arc
+become part of the current path. The current point becomes defined.
+</DL>
+
+<P>
+The macro <CODE>\writeps</CODE> provides the general facility to write
+arbitrary PostScript commands to the PostScript file. This macro is
+used by the preceding commands and by the TeXdraw commands
+themselves. This facility has to be used with care since changes in
+position or scaling resulting from the PostScript commands are not known
+to TeXdraw.
+<DL COMPACT>
+
+<DT><CODE>\writeps {<VAR>&#60;ps-commands&#62;</VAR>}</CODE>
+<DD>
+<A NAME="IDX167"></A>
+
+Write PostScript commands to the intermediate PostScript file. Before
+the commands are inserted, any pending TeXdraw move is written to the
+PostScript file. The PostScript scaling gives 300 units/inch.
+</DL>
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_5.html">previous</A>, <A HREF="texdraw_7.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_7.html b/Master/texmf-dist/doc/texdraw/texdraw_7.html
new file mode 100644
index 00000000000..1905d68c0fe
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_7.html
@@ -0,0 +1,250 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - B. TeXdraw Toolbox</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_6.html">previous</A>, <A HREF="texdraw_8.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC31" HREF="texdraw_toc.html#TOC31">B. TeXdraw Toolbox</A></H1>
+
+<P>
+This appendix describes some of the macros supplied with TeXdraw
+which can be used to define additional commands for creating drawings.
+The macros described here work in the user specified coordinate system.
+Some of these toolbox macros are used by the TeXdraw commands
+themselves, others are supplied in an auxiliary file
+<TT>`txdtools.tex'</TT>.
+
+
+
+<UL>
+<LI><A HREF="texdraw_7.html#SEC32">Coordinate parsing</A>
+<LI><A HREF="texdraw_7.html#SEC33">Real arithmetic</A>
+<LI><A HREF="texdraw_7.html#SEC34">Arrow curve</A>
+</UL>
+
+
+
+<H2><A NAME="SEC32" HREF="texdraw_toc.html#TOC32">B.1 Coordinate parsing</A></H2>
+
+<P>
+The coordinate parsing macro <CODE>\getpos</CODE> is useful for creating new
+commands. This macro takes care of stripping leading and trailing
+blanks from coordinates specified between parentheses. In addition,
+symbolic coordinates are translated to the corresponding relative
+coordinate using the segment offset and scaling in effect.
+
+
+<P>
+The macro <CODE>\currentpos</CODE> returns the relative coordinates of the
+current position. The returned values are relative to the current
+segment and the current scaling. The macro <CODE>\cossin</CODE> returns the
+real-valued cosine and sine of the direction of the line joining two
+points. The macro <CODE>\vectlen</CODE> returns the length of a vector. The
+results appear as the value of user supplied macro names.
+
+
+<P>
+<A NAME="IDX168"></A>
+<A NAME="IDX169"></A>
+<A NAME="IDX170"></A>
+<A NAME="IDX171"></A>
+<A NAME="IDX172"></A>
+<A NAME="IDX173"></A>
+<A NAME="IDX174"></A>
+<DL COMPACT>
+
+<DT><CODE>\getpos (<VAR>x</VAR> <VAR>y</VAR>)\<VAR>mx</VAR>\<VAR>my</VAR></CODE>
+<DD>
+<A NAME="IDX175"></A>
+
+Decode coordinate values. The coordinates specified by <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE> are decoded. Symbolic coordinates are translated to the
+corresponding relative coordinate using the current segment offset and
+scaling. The resulting character strings representing the real-valued
+coordinates are assigned to the macros specified by <CODE>\<VAR>mx</VAR></CODE> and
+<CODE>\<VAR>my</VAR></CODE>.
+<A NAME="IDX176"></A>
+<DT><CODE>\currentpos \<VAR>mx</VAR>\<VAR>my</VAR></CODE>
+<DD>
+Return the coordinates of the current position. The coordinates are
+relative to the current segment offset and scaling. The resulting
+character strings representing the real-valued coordinates are assigned
+to the macros specified by <CODE>\<VAR>mx</VAR></CODE> and <CODE>\<VAR>my</VAR></CODE>.
+<A NAME="IDX177"></A>
+<DT><CODE>\cossin (<VAR>x1</VAR> <VAR>y1</VAR>)(<VAR>x2</VAR> <VAR>y2</VAR>)\<VAR>cosa</VAR>\<VAR>sina</VAR></CODE>
+<DD>
+Return the cosine and sine of the direction of a vector joining two
+points. The cosine and sine of the angle of the vector which goes from
+<CODE>(<VAR>x1</VAR> <VAR>y1</VAR>)</CODE> to <CODE>(<VAR>x2</VAR> <VAR>y2</VAR>)</CODE>. The character
+strings representing these real-valued quantities are assigned to the
+macros specified by <CODE>\<VAR>cosa</VAR></CODE> and <CODE>\<VAR>sina</VAR></CODE>.
+<A NAME="IDX178"></A>
+<DT><CODE>\vectlen (<VAR>x1</VAR> <VAR>y1</VAR>)(<VAR>x2</VAR> <VAR>y2</VAR>)\<VAR>len</VAR></CODE>
+<DD>
+Return the length of a vector joining two points. The length of the
+vector is relative to the current scaling. The character string
+representing the real-valued length is assigned to the macro specified
+by <CODE>\<VAR>len</VAR></CODE>.
+</DL>
+
+
+
+<H2><A NAME="SEC33" HREF="texdraw_toc.html#TOC33">B.2 Real arithmetic</A></H2>
+
+<P>
+The TeXdraw toolbox supplies macros to perform real arithmetic on
+coordinate values. The result appears as the value of a user supplied
+macro name.
+<DL COMPACT>
+
+<DT><CODE>\realadd {<VAR>value1</VAR>} {<VAR>value2</VAR>} \<VAR>sum</VAR></CODE>
+<DD>
+<A NAME="IDX179"></A>
+
+Add two real quantities, assigning the resultant character string
+representing the sum to the macro <CODE>\<VAR>sum</VAR></CODE>.
+<A NAME="IDX180"></A>
+<DT><CODE>\realmult {<VAR>value1</VAR>} {<VAR>value2</VAR>} \<VAR>prod</VAR></CODE>
+<DD>
+Multiply two real quantities, assigning the resultant character string
+representing the product to the macro <CODE>\<VAR>prod</VAR></CODE>.
+<A NAME="IDX181"></A>
+<DT><CODE>\realdiv {<VAR>value1</VAR>} {<VAR>value2</VAR>} \<VAR>result</VAR></CODE>
+<DD>
+Divide two real quantities, assigning the resultant character string
+representing the result of <VAR>value1</VAR>/<VAR>value2</VAR> to the macro
+<CODE>\<VAR>result</VAR></CODE>.
+</DL>
+
+
+
+<H2><A NAME="SEC34" HREF="texdraw_toc.html#TOC34">B.3 Arrow curve</A></H2>
+<P>
+<A NAME="IDX182"></A>
+
+
+<P>
+This example illustrates the use of the TeXdraw toolbox routines to
+do computations with the coordinates. The problem will be tackled in
+two parts. First, we will produce a macro to place an arrowhead on a
+Bezier curve. Then given this macro, we will produce a macro which can
+draw a "wiggly" line from the current position to a given coordinate.
+
+
+<P>
+The first macro, <CODE>\cavec</CODE>, uses the <CODE>\cossin</CODE> command to
+determine the the cosine and sine of the angle of the line joining the
+second control point to the end point of the Bezier curve. Recall that
+the Bezier curve is tangent to this line at the end point. After
+drawing the Bezier curve, the scaling is set locally to absolute units
+of 0.05 inches. We go back down the line from the end point by 0.05
+inches and draw an arrow vector to the end point from there. This arrow
+vector is mostly arrowhead, with little or no tail.
+
+
+
+<PRE>
+\def\cavec (#1 #2)(#3 #4)(#5 #6){
+ \clvec (#1 #2)(#3 #4)(#5 #6)
+ \cossin (#3 #4)(#5 #6)\cosa\sina
+ \rmove (0 0)
+ \bsegment
+ \drawdim in \setsegscale 0.05
+ \move ({-\cosa} -\sina) \avec (0 0)
+ \esegment}
+</PRE>
+
+<P>
+Note the use of macros as arguments to a <CODE>\move</CODE> command. Minus
+signs are put in front of the macros. However, the value of the macro
+<CODE>\cosa</CODE> or <CODE>\sina</CODE> could be negative. Fortunately, TeX
+accepts two minus signs in a row and interprets the result as positive.
+Note that the <CODE>\rmove (0 0)</CODE> command before the beginning of the
+segment ensures that the Bezier curve is stroked before the arrowhead is
+drawn.
+
+
+<P>
+The second macro <CODE>\caw</CODE> builds on <CODE>\cavec</CODE>. The goal is to
+produce a wiggly vector that can be used as a pointer in a drawing.
+Consider the following symmetrical normalized Bezier curve.
+
+<PRE>
+\centertexdraw{ \move (0 0) \cavec (1.4 0.1)(-0.4 -0.1)(1 0) }
+</PRE>
+
+<P>
+This curve has the appropriate wiggle. Now we want to be able to draw
+this curve, appropriately scaled and rotated. The macro <CODE>\caw</CODE>
+needs to do computations on the coordinates. First, <CODE>\caw</CODE> uses
+the macros <CODE>\getpos</CODE> and <CODE>\currentpos</CODE> to get the positions of
+the end and start of the curve. Next, the length of the vector is
+calculated using the macro <CODE>\vectlen</CODE>. A local macro
+<CODE>\rotatecoord</CODE> is used to rotate a coordinate pair about the
+origin, using the cosine and sine of the rotation angle. The vector
+length is used to scale the normalized curve. The remaining code draws
+the rotated, normalized curve.
+
+
+
+<PRE>
+\def\caw (#1 #2){
+ \currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+
+% The nominal wiggly curve is (0 0) (1+dx dy) (-dx -dy) (1 0)
+% Find the rotated offset (dx dy) -&#62; (du dv)
+ \rotatecoord (0.4 0.1)\cosa\sina \du\dv
+
+% calculate the length of the vector
+ \vectlen ({\xa} \ya)(#1 #2)\len
+
+% draw the curve in normalized units
+ \bsegment
+ \setsegscale {\len}
+ \realadd \cosa \du \tmpa \realadd \sina \dv \tmpb
+ \cavec ({\tmpa} \tmpb)({-\du} -\dv)({\cosa} \sina)
+ \esegment
+ \move (#1 #2)}
+
+% rotate a coordinate (x y)
+% arguments: (x y) cosa sina x' y'
+% x' = cosa * x - sina * y; y' = sina * x + cosa * y
+\def\rotatecoord (#1 #2)#3#4#5#6{
+ \getpos (#1 #2)\xarg\yarg
+ \realmult \xarg {#3} \tmpa \realmult \yarg {#4} \tmpb
+ \realadd \tmpa {-\tmpb} #5
+ \realmult \xarg {#4} \tmpa \realmult \yarg {#3} \tmpb
+ \realadd \tmpa \tmpb #6}
+</PRE>
+
+<P>
+Finally, the new macro can be used as follows.
+
+<PRE>
+\centertexdraw{
+ \arrowheadtype t:W
+ \move (0 0)
+ \cavec (1.4 0.1)(-0.4 -0.1)(1 0)
+ \move (1 0) \caw (1 1) \htext{tip at \tt (1 1)}
+ \move (1 0) \caw (2 1) \htext{tip at \tt (2 1)}
+ \move (1 0) \caw (2 0) \htext{tip at \tt (2 0)}
+
+}
+</PRE>
+
+<P>
+Note that the Bezier curve in the macro <CODE>\cavec</CODE> lies below the
+arrowhead. The example then draws an arrowhead of type <CODE>W</CODE> to
+erase the part of the line below the arrowhead.
+
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_6.html">previous</A>, <A HREF="texdraw_8.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_8.html b/Master/texmf-dist/doc/texdraw/texdraw_8.html
new file mode 100644
index 00000000000..09ee5d14520
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_8.html
@@ -0,0 +1,342 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - C. Examples</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_7.html">previous</A>, <A HREF="texdraw_9.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC35" HREF="texdraw_toc.html#TOC35">C. Examples</A></H1>
+<P>
+<A NAME="IDX183"></A>
+
+
+<P>
+This appendix shows examples of the use of TeXdraw.
+
+
+
+<UL>
+<LI><A HREF="texdraw_8.html#SEC36">Block diagram</A>
+<LI><A HREF="texdraw_8.html#SEC37">Filter response graph</A>
+<LI><A HREF="texdraw_8.html#SEC38">Geometric construction</A>
+</UL>
+
+
+
+<H2><A NAME="SEC36" HREF="texdraw_toc.html#TOC36">C.1 Block diagram of a lattice filter</A></H2>
+
+<P>
+The block diagram of a lattice filter uses a library of extended
+commands built from the basic TeXdraw commands.
+
+
+<P>
+The block diagram uses a "delay" block. This is defined as a segment
+which leaves the current position at the end of this block. A second
+macro, <CODE>\bdot</CODE>, draws a "big" dot which is used to mark junctions
+of lines. The <CODE>\Ttext</CODE> command centers text above a given point.
+The offset to position the text is local to a segment, resulting in no
+change to the current point. Similar macros to position text below a
+point (<CODE>\Btext</CODE>), to the left of a point (<CODE>\Ltext</CODE>) and to the
+right of a point (<CODE>\Rtext</CODE>) are used in the final drawing.
+
+<PRE>
+\def\delay {\bsegment
+ \setsegscale 0.3
+ \lvec (0 +0.5) \lvec (1 +0.5) \lvec (1 -0.5)
+ \lvec (0 -0.5) \lvec (0 0)
+ \textref h:C v:C \htext (0.5 0){$z^{-1}$}
+ \savepos (1 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\def\bdot {\fcir f:0 r:0.02 }
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 +0.06){#1}
+ \esegment}
+</PRE>
+
+<P>
+Several of the block diagram elements scale with the size of the summing
+nodes. The radius of the circles for the summing nodes is defined as
+the macro <CODE>\cradius</CODE>. The summing nodes will have enclosed plus
+signs, appropriately scaled. The plus sign is drawn by the macro
+<CODE>\pluss</CODE>. The macro <CODE>\pcir</CODE> draws both the circle and the
+plus sign. The incoming lines to a summing node will be labelled with
+plus or minus signs (characters this time), placed at the appropriate
+position with respect to the center of the summing node. These
+positions are given in terms of compass directions. The macro
+<CODE>\putwnw</CODE> places text west by north-west relative to the center of
+the summing node.
+
+<PRE>
+\def\cradius {0.08}
+\def\pluss {\bsegment
+ \setsegscale {\cradius}
+ \move (-0.5 0) \lvec (+0.5 0)
+ \move (0 -0.5) \lvec (0 +0.5)
+ \esegment}
+\def\pcir {\lcir r:{\cradius} \pluss}
+\def\puttext (#1 #2)#3{\bsegment
+ \setsegscale {\cradius}
+ \textref h:C v:C \htext (#1 #2){#3}
+ \esegment}
+\def\putwnw #1{\puttext (-1.7 +1.2){#1}}
+</PRE>
+
+<P>
+The block diagram has vectors arriving and departing from the summing
+nodes (circles). One could calculate the points of intersection of the
+lines with the circles, and then enter the values into the TeXdraw
+code. However, in this example, we implement an automated procedure.
+Two macros are needed, an arrow vector to a circle (<CODE>\avectoc</CODE>) and
+an arrow vector leaving from a circle (<CODE>\avecfrc</CODE>). The macros
+will calculate the point of intersection with the circle and start or
+end the vector at the intersection point.
+
+
+<P>
+The arrow macros use scaling and relative positioning inside of a
+drawing segment. In the case of the macro <CODE>\avectoc</CODE>, a move is
+made to the final point (center of the circle), then within a drawing
+segment, a scaled move is made back towards the initial point to
+determine the intersection point with the circle.
+
+
+
+<PRE>
+\def\avectoc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \savepos (#1 #2)(*tx *ty)
+ \bsegment
+ \move (*tx *ty)
+ \setsegscale {\cradius}
+ \rmove ({-\cosa} -\sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \avec (*ex *ey)
+ \move (#1 #2)}
+\def\avecfrc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \bsegment
+ \setsegscale {\cradius}
+ \move ({\cosa} \sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \move (*ex *ey)
+ \avec (#1 #2)}
+</PRE>
+
+<P>
+Having defined these macros, we are ready to draw the block diagram.
+The first and last sections of the lattice filter are very similar,
+differing mainly in the text labels. With more effort, code could be
+shared between the commands used to draw these blocks.
+
+<PRE>
+\centertexdraw{
+\drawdim in
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$}
+
+\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for the text size
+
+% Input to the first stage
+\bsegment
+ \Ltext{$x(n)$}
+ \lvec (0.3 0) \bdot \lvec (0.3 +0.4) \move (0.3 0) \lvec (0.3 -0.4)
+ \savepos (0.3 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% first lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.1 +0.4)
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_0(n)$}
+ \move (2.0 +0.42) \Ttext {$f_1(n)$}
+ \move (0.1 -0.4) \Btext {$b_0(n)$}
+ \move (2.0 -0.4) \Btext {$b_1(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_1$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_1$}
+ \savepos (2.1 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% center section
+\bsegment
+ \textref h:C v:C \htext (0.3 +0.4){$\cdots$}
+ \htext (0.3 -0.4){$\cdots$}
+ \savepos (0.6 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% last lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.3 +0.4) \Rtext{$e(n)$}
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_{P-1}(n)$}
+ \move (2.0 +0.42) \Ttext {$f_P(n)$}
+ \move (0.1 -0.4) \Btext {$b_{P-1}(n)$}
+ \move (2.0 -0.4) \Btext {$b_P(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_P$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_P$}
+\esegment
+}
+</PRE>
+
+<P>
+The macros used in this example are similar to the block diagram macros
+defined in the file <TT>`blockdiagram.tex'</TT>.
+
+
+
+
+<H2><A NAME="SEC37" HREF="texdraw_toc.html#TOC37">C.2 Filter response graph</A></H2>
+<P>
+<A NAME="IDX184"></A>
+
+
+<P>
+This example shows the response of a canonical filter. TeXdraw is
+not well suited for general purpose graphing -- it has no coordinate
+translation facility nor does it have separate <VAR>x</VAR> and <VAR>y</VAR>
+scaling. Nonetheless, for certain simple graphs, TeXdraw is
+adequate.
+
+
+<P>
+In this example, macro <CODE>\ticklab</CODE> places a labelled axis tick at a
+given position. The data is specified in a straightforward manner,
+having been scaled beforehand to give the desired aspect ratio for the
+graph.
+
+
+
+<PRE>
+\centertexdraw{
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\ds {\displaystyle}
+\def\ticklab (#1 #2)#3{\move(#1 #2)
+ \bsegment
+ \lvec (0 0.05)
+ \textref h:C v:T \htext (0 -0.05){#3}
+ \esegment}
+\def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.08 0){#1}
+ \esegment}
+
+\move (2.4 -0.3) % move to set the size
+
+\move (0 0)
+% Axes
+\avec (0 +1.4)
+\move (0 0) \avec (2.2 0) \Rtext{$\omega$}
+\ticklab (0 0) {0}
+\ticklab (0.8 0) {$\ds {\pi \over 2N} $}
+\ticklab (1.2 0) {$\omega_s$}
+\ticklab (1.6 0) {$\ds {\pi \over N} $}
+
+\linewd 0.025
+\move (0 1)
+\lvec (0.4 1)
+\lvec (0.44 0.998)
+\lvec (0.48 0.988)
+\lvec (0.52 0.973)
+\lvec (0.56 0.951)
+ ...
+\lvec (1.08 0.233)
+\lvec (1.12 0.156)
+\lvec (1.16 0.078)
+\lvec (1.20 0)
+\lvec (1.9 0)
+}
+</PRE>
+
+
+
+<H2><A NAME="SEC38" HREF="texdraw_toc.html#TOC38">C.3 Geometric construction</A></H2>
+<P>
+<A NAME="IDX185"></A>
+
+
+<P>
+This example shows a geometric construction which places an ellipse
+tangent to an enclosing circle. The size of the ellipse is determined
+from geometric considerations. Macros are used to modularize the code.
+The example alters the unit scale factor. This allows the drawing to be
+carried out in units normalized to the radius of the circle.
+
+
+
+<PRE>
+\centertexdraw{
+\arrowheadtype t:V \arrowheadsize l:0.08 w:0.04
+\linewd 0.01
+\setunitscale 1.5 % circle will have radius 1.5 inches
+
+\def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.04){#1}
+ \esegment}
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 +0.04){#1}
+ \esegment}
+\def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.04 0){#1}
+ \esegment}
+\def\bdot {\fcir f:0 r:0.0133 }
+\def\vtick {\bsegment
+ \move (0 -0.05) \lvec (0 +0.05)
+ \esegment}
+\def\htick {\bsegment
+ \move (-0.05 0) \lvec (+0.05 0)
+ \esegment}
+\def\Hlen #1#2{\bsegment
+ \vtick \avec ({#1} 0) \vtick \avec (0 0)
+ \relsegscale 0.5
+ \move ({#1} 0) \Ttext {#2}
+ \esegment}
+\def\Vlen #1#2{\bsegment
+ \htick \avec (0 {#1}) \htick \avec (0 0)
+ \relsegscale 0.5
+ \move (0 {#1}) \Ltext {#2}
+ \esegment}
+
+\lcir r:1 % circle
+\move (-1.05 0) \lvec ( 1.05 0) % axes
+\move (0 -1.05) \lvec (0 1.05)
+
+\move (0 0) \lvec (0.707 0.707) \bdot
+\rmove (0.02 0.02) \textref h:L v:B \htext {X}
+\move (0.707 -0.707) \bdot
+\textref h:R v:T \htext(-0.02 -0.02){O}
+
+\move (0.5 0) % center of ellipse
+\bsegment
+ \lellip rx:0.435 ry:0.804
+ \bdot \Btext {$\beta_2$}
+ \move (0 0.15) \Hlen {0.435}{$|\beta_1{+}\beta_3|$}
+ \move (-0.7 0) \Vlen {0.804}{$|\beta_1{-}\beta_3|$}
+\esegment
+}
+</PRE>
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_7.html">previous</A>, <A HREF="texdraw_9.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_9.html b/Master/texmf-dist/doc/texdraw/texdraw_9.html
new file mode 100644
index 00000000000..6a96d49c59d
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_9.html
@@ -0,0 +1,321 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - D. Alphabetic listing of commands</TITLE>
+</HEAD>
+<BODY>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_8.html">previous</A>, <A HREF="texdraw_10.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+<P><HR><P>
+
+
+<H1><A NAME="SEC39" HREF="texdraw_toc.html#TOC39">D. Alphabetic listing of commands</A></H1>
+<P>
+<A NAME="IDX186"></A>
+
+
+<DL COMPACT>
+
+<DT><CODE>\arrowheadsize l:<VAR>length</VAR> w:<VAR>width</VAR></CODE>
+<DD>
+Set the arrowhead size to be <VAR>length</VAR> units long and <VAR>width</VAR>
+units wide. The width is measured across the "base" of the arrowhead.
+The initial arrowhead size has a <VAR>length</VAR> of 0.16 inches and a
+<VAR>width</VAR> of 0.08 inches.
+
+<DT><CODE>\arrowheadtype t:<VAR>type</VAR></CODE>
+<DD>
+Set the arrowhead type to <VAR>type</VAR>, where <VAR>type</VAR> is one of
+<CODE>F</CODE>, <CODE>T</CODE>, <CODE>W</CODE>, <CODE>V</CODE>, or <CODE>H</CODE>. There are two
+kinds of arrowheads. The first kind is a triangle. There are 3
+variants: type <CODE>T</CODE> is an empty triangle, type <CODE>F</CODE> is a filled
+triangle (using the current gray level for lines), type <CODE>W</CODE> is a
+triangle filled with white. The second kind of arrowhead is an open
+ended Vee. There are 2 variants: type <CODE>V</CODE> has the stem continue to
+the tip, type <CODE>H</CODE> has the stem stop at the base of the arrowhead.
+The initial arrowhead type is <CODE>T</CODE>.
+
+<DT><CODE>\avec (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+Draw a line with an arrowhead from the current position to
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The arrowhead is aligned with the line, with the tip at
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>.
+
+<DT><CODE>\begin{texdraw}</CODE>
+<DD>
+Start a TeXdraw drawing. The drawing is terminated with an
+<CODE>\end{texdraw}</CODE> command. This command is for use with LaTeX.
+
+<DT><CODE>\bsegment</CODE>
+<DD>
+Start a drawing segment. The coordinate system is shifted such that the
+current position corresponds to the coordinate <CODE>(0 0)</CODE>. Changes to
+scaling, position and line parameters stay local to the drawing segment.
+
+<DT><CODE>\btexdraw</CODE>
+<DD>
+Start a TeXdraw drawing. The drawing is terminated with an
+<CODE>\etexdraw</CODE> command.
+
+<DT><CODE>\centertexdraw { ... }</CODE>
+<DD>
+Center a TeXdraw box. The argument contains TeXdraw commands.
+The resulting box has the horizontal size <CODE>\hsize</CODE> and height equal
+to the height of the drawing.
+
+<DT><CODE>\clvec (<VAR>x1</VAR> <VAR>y1</VAR>)(<VAR>x2</VAR> <VAR>y2</VAR>)(<VAR>x3</VAR> <VAR>y3</VAR>)</CODE>
+<DD>
+Draw a Bezier curve from the current position to the coordinate
+<CODE>(<VAR>x3</VAR> <VAR>y3</VAR>)</CODE> which becomes the new current position. The
+coordinates <CODE>(<VAR>x1</VAR> <VAR>y1</VAR>)</CODE> and <CODE>(<VAR>x2</VAR> <VAR>y2</VAR>)</CODE>
+serve as control points for the curve. Only the last coordinate given
+is used to update the size of the drawing.
+
+<DT><CODE>\drawbb</CODE>
+<DD>
+Draw a ruled box around the effective size of a drawing produced by
+TeXdraw commands.
+
+<DT><CODE>\drawdim <VAR>dim</VAR></CODE>
+<DD>
+Set the units to <VAR>dim</VAR>. The argument <VAR>dim</VAR> can be any valid
+TeX dimension unit. The units are used to interpret coordinate
+values. Examples of valid units: <CODE>cm</CODE>, <CODE>mm</CODE>, <CODE>in</CODE>,
+<CODE>pt</CODE>, and <CODE>bp</CODE>.
+
+<DT><CODE>\end{texdraw}</CODE>
+<DD>
+End a TeXdraw drawing started with a <CODE>\begin{texdraw}</CODE>
+command. The resulting TeXdraw drawing is placed in a box with
+height equal to the height of the drawing and width equal to the width
+of the drawing. The depth of the box is zero. This command is for use
+with LaTeX.
+
+<DT><CODE>\esegment</CODE>
+<DD>
+End a drawing segment. The current position in effect before the
+corresponding <CODE>\bsegment</CODE> command is restored. The scaling and
+line parameter values revert to those in effect before the corresponding
+<CODE>\bsegment</CODE> was invoked.
+
+<DT><CODE>\etexdraw</CODE>
+<DD>
+End a TeXdraw drawing started with a <CODE>\btexdraw</CODE> command. The
+resulting TeXdraw drawing is placed in a box with height equal to the
+height of the drawing and width equal to the width of the drawing. The
+depth of the box is zero.
+
+<DT><CODE>\everytexdraw { ... }</CODE>
+<DD>
+Specify TeXdraw commands to be executed at the beginning of every
+TeXdraw drawing.
+
+<DT><CODE>\fcir f:<VAR>level</VAR> r:<VAR>radius</VAR></CODE>
+<DD>
+Draw a filled circle with center at the current position. The radius is
+specified by <VAR>radius</VAR>. The circle is painted with the gray level
+specified by <VAR>level</VAR>. A gray level of 1 corresponds to white, with
+decreasing values getting darker. The level 0 is full black. This
+command does not draw a line along the circumference. The drawing size
+is increased if necessary to contain the circle.
+
+<DT><CODE>\fellip f:<VAR>level</VAR> rx:<VAR>x-radius</VAR> ry:<VAR>y-radius</VAR></CODE>
+<DD>
+Draw a filled ellipse with center at the current position. The radius
+in the <VAR>x</VAR> direction is specified by <VAR>x-radius</VAR>. The radius in
+the <VAR>y</VAR> direction is specified by <VAR>y-radius</VAR>. The ellipse is
+painted with the gray level specified by <VAR>level</VAR>. A gray level of 1
+corresponds to white, with decreasing values getting darker. The level
+0 is full black. This command does not draw a line along the boundary
+of the ellipse. The drawing size is increased if necessary to contain
+the ellipse.
+
+<DT><CODE>\htext (<VAR>x</VAR> <VAR>y</VAR>){<VAR>text</VAR>}</CODE>
+<DD>
+<DT><CODE>\htext {<VAR>text</VAR>}</CODE>
+<DD>
+The first form of this command places the TeX text <VAR>text</VAR>
+horizontally with the text reference point at the coordinate
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The second form of this command places the TeX text
+<VAR>text</VAR> horizontally with the text reference point at the current
+position. The text reference point is set with the <CODE>\textref</CODE>
+command.
+
+<DT><CODE>\ifill f:<VAR>level</VAR></CODE>
+<DD>
+Close the current path and paint the interior of the region with gray
+level <VAR>level</VAR>. The line around the path is not drawn. Gray levels
+are real values from 0 (black) through intermediate values (grays) to 1
+(white).
+
+<DT><CODE>\larc r:<VAR>radius</VAR> sd:<VAR>start-angle</VAR> ed:<VAR>end-angle</VAR></CODE>
+<DD>
+Draw a counterclockwise arc. The center of the arc is at the current
+position. The radius is specified by <VAR>radius</VAR>. The start and end
+angles (in degrees) are specified by <VAR>start-angle</VAR> and
+<VAR>end-angle</VAR>. This command does not affect the limits (size) of the
+drawing.
+
+<DT><CODE>\lcir r:<VAR>radius</VAR></CODE>
+<DD>
+Draw a circle with center at the current position. The radius is
+specified by <VAR>radius</VAR>. This command draws a line along the
+circumference of the circle. The drawing size is increased if necessary
+to contain the circle.
+
+<DT><CODE>\lellip rx:<VAR>x-radius</VAR> ry:<VAR>y-radius</VAR></CODE>
+<DD>
+Draw an ellipse with center at the current position. The radius in the
+<VAR>x</VAR> direction is specified by <VAR>x-radius</VAR>. The radius in the
+<VAR>y</VAR> direction is specified by <VAR>y-radius</VAR>. The drawing size is
+increased if necessary to contain the ellipse.
+
+<DT><CODE>\lfill f:<VAR>level</VAR></CODE>
+<DD>
+Close the current path, draw the line around the path using the current
+grey level for lines and paint the interior of the region with specified
+gray level <VAR>level</VAR>. Gray levels are real values from 0 (black)
+through intermediate values (grays) to 1 (white).
+
+<DT><CODE>\linewd <VAR>width</VAR></CODE>
+<DD>
+Set the line width to <VAR>width</VAR> units. Initially <VAR>width</VAR> is 0.01
+inches (corresponding to 3 pixels at 300 pixels to the inch).
+
+<DT><CODE>\lpatt (<VAR>pattern</VAR>)</CODE>
+<DD>
+Set lines to have the pattern <CODE>(<VAR>pattern</VAR>)</CODE>. A pattern is a
+sequence of on/off lengths separated by blanks and enclosed in parentheses.
+The lengths alternately specify the length of a dash and the length of a
+gap between dashes. Each length is interpreted using the current
+scaling and drawing units. The pattern is used cyclically. The empty
+pattern signifies a solid line. The initial line pattern is a solid
+line, corresponding to the empty pattern <CODE>\lpatt ()</CODE>.
+
+<DT><CODE>\lvec (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+Draw a line from the current position to coordinate <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>.
+
+<DT><CODE>\move (<VAR>x</VAR> <VAR>y</VAR>)</CODE>
+<DD>
+Move to coordinate <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position
+is <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>.
+
+<DT><CODE>\ravec (<VAR>dx</VAR> <VAR>dy</VAR>)</CODE>
+<DD>
+Draw a line with an arrowhead from the current position, <VAR>dx</VAR> units
+in the <VAR>x</VAR> direction and <VAR>y</VAR> units in the <VAR>y</VAR> direction.
+The final position becomes the new current position. The arrowhead is
+aligned with the line, with the tip at the new current position.
+
+<DT><CODE>\relsegscale <VAR>value</VAR></CODE>
+<DD>
+Adjust the segment scale factor by multiplying by <VAR>value</VAR>. This has
+the effect of multiplying the current overall scale factor by the same
+factor. The overall scaling factor is the product of the unit scale
+factor and the segment scale factor.
+
+<DT><CODE>\relunitscale <VAR>value</VAR></CODE>
+<DD>
+Adjust the unit scale factor by multiplying by <VAR>value</VAR>. This has
+the effect of multiplying the overall scale factor by the same factor.
+The overall scaling factor is the product of the unit scale factor and
+the segment scale factor.
+
+<DT><CODE>\rlvec (<VAR>dx</VAR> <VAR>dy</VAR>)</CODE>
+<DD>
+Draw a line from the current position, <VAR>dx</VAR> units in the <VAR>x</VAR>
+direction and <VAR>dy</VAR> units in the <VAR>y</VAR> direction. The final
+position becomes the new current position.
+
+<DT><CODE>\rmove (<VAR>dx</VAR> <VAR>dy</VAR>)</CODE>
+<DD>
+Move from the current position, <VAR>dx</VAR> units in the <VAR>x</VAR> direction
+and <VAR>dy</VAR> units in the <VAR>y</VAR> direction. The final position becomes
+the new current position.
+
+<DT><CODE>\rtext td:<VAR>angle</VAR> (x y){<VAR>text</VAR>}</CODE>
+<DD>
+<DT><CODE>\rtext td:<VAR>angle</VAR> {<VAR>text</VAR>}</CODE>
+<DD>
+The first form of this command places the TeX text <VAR>text</VAR> at an
+angle with the text reference point at the coordinate <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The
+second form of this command places the TeX text <VAR>text</VAR> at an
+angle with the text reference point at the current position. In both
+cases, the TeX text is placed in a box and the box is rotated
+counterclockwise by <VAR>angle</VAR> degrees about the text reference point.
+The text reference point is set with the <CODE>\textref</CODE> command.
+
+<DT><CODE>\savecurrpos (*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>
+<DD>
+Save the current position as the absolute position referenced by
+<CODE>(*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>.
+
+<DT><CODE>\savepos (<VAR>x</VAR> <VAR>y</VAR>)(*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>
+<DD>
+Save the coordinate position <CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE> as the absolute
+position referenced by <CODE>(*<VAR>px</VAR> *<VAR>py</VAR>)</CODE>. The coordinate
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE> is interpreted in the normal fashion as a
+coordinate relative to the current segment, using the current scaling
+factors and drawing unit.
+
+<DT><CODE>\setgray <VAR>level</VAR></CODE>
+<DD>
+Set the gray level of lines. Gray levels are real values from 0 (black)
+through intermediate values (gray) to 1 (white). The initial gray level
+is 0 corresponding to black.
+
+<DT><CODE>\setsegscale <VAR>scale</VAR></CODE>
+<DD>
+Set the segment scale factor. The argument <VAR>scale</VAR> is a real number
+which is used to scale coordinate values. The overall scale factor is
+the product of the unit scale factor and the segment scale factor.
+
+<DT><CODE>\setunitscale <VAR>scale</VAR></CODE>
+<DD>
+Set the unit scaling to <VAR>scale</VAR>. The argument <VAR>scale</VAR> is a real
+number which is used to scale coordinate values. The overall scaling
+factor is the product of the unit scale factor and the segment scale
+factor.
+
+<DT><CODE>\texdrawbox { ... }</CODE>
+<DD>
+Create a TeXdraw box. The argument contains TeXdraw commands.
+This macro returns a TeX box with height equal to the height of the
+drawing and width equal to the width of the drawing. The depth of the
+box is zero.
+
+<DT><CODE>\textref h:<VAR>h-ref</VAR> v:<VAR>v-ref</VAR></CODE>
+<DD>
+Set the text reference point for subsequent text commands. The
+horizontal reference point <VAR>h-ref</VAR> is one of <CODE>L</CODE>, <CODE>C</CODE> or
+<CODE>R</CODE> (left, center or right). The vertical reference point
+<VAR>v-ref</VAR> is one of <CODE>T</CODE>, <CODE>C</CODE> or <CODE>B</CODE> (top, center or
+bottom). For rotated text, the reference point is determined before
+rotation. The initial text reference point corresponds to
+<CODE>\textref h:L v:B</CODE>.
+
+<DT><CODE>\vtext (x y){<VAR>text</VAR>}</CODE>
+<DD>
+<DT><CODE>\vtext {<VAR>text</VAR>}</CODE>
+<DD>
+The first form of this command places the TeX text <VAR>text</VAR>
+vertically with the text reference point at the coordinate
+<CODE>(<VAR>x</VAR> <VAR>y</VAR>)</CODE>. The new current position is <CODE>(<VAR>x</VAR>
+<VAR>y</VAR>)</CODE>. The second form of this command places the TeX text
+<VAR>text</VAR> vertically with the text reference point at the current
+position. In both cases, the TeX text is placed in a box and the box
+is rotated counterclockwise by 90 degrees about the text reference
+point. The text reference point is set with the <CODE>\textref</CODE>
+command.
+
+</DL>
+
+<P><HR><P>
+Go to the <A HREF="texdraw_1.html">first</A>, <A HREF="texdraw_8.html">previous</A>, <A HREF="texdraw_10.html">next</A>, <A HREF="texdraw_11.html">last</A> section, <A HREF="texdraw_toc.html">table of contents</A>.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_foot.html b/Master/texmf-dist/doc/texdraw/texdraw_foot.html
new file mode 100644
index 00000000000..b45e6c36d32
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_foot.html
@@ -0,0 +1,25 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - Footnotes</TITLE>
+</HEAD>
+<BODY>
+<H1>TeXdraw</H1>
+<H2>PostScript Drawings from TeX</H2>
+<H2>Edition 2.0</H2>
+<H2>December 1995</H2>
+<ADDRESS>Peter Kabal</ADDRESS>
+<P>
+<P><HR><P>
+<H3><A NAME="FOOT1" HREF="texdraw_2.html#DOCF1">(1)</A></H3>
+<P>After the ninth PostScript file, the name of the
+intermediate PostScript file takes the form <TT>`<VAR>name</VAR>.p10'</TT>, with
+the number increasing from 10 with each file.
+<H3><A NAME="FOOT2" HREF="texdraw_5.html#DOCF2">(2)</A></H3>
+<P>Not all PostScript drivers support text rotation.
+<P><HR><P>
+This document was generated on 10 March 2004 using
+<A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A>&nbsp;1.56k.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texdraw_toc.html b/Master/texmf-dist/doc/texdraw/texdraw_toc.html
new file mode 100644
index 00000000000..fdf24359723
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texdraw_toc.html
@@ -0,0 +1,78 @@
+<HTML>
+<HEAD>
+<!-- Created by texi2html 1.56k from texdraw.texi on 10 March 2004 -->
+
+<TITLE>TeXdraw - Table of Contents</TITLE>
+</HEAD>
+<BODY>
+<H1>TeXdraw</H1>
+<H2>PostScript Drawings from TeX</H2>
+<H2>Edition 2.0</H2>
+<H2>December 1995</H2>
+<ADDRESS>Peter Kabal</ADDRESS>
+<P>
+<P><HR><P>
+<UL>
+<LI><A NAME="TOC1" HREF="texdraw_1.html#SEC1">1. Introduction</A>
+<UL>
+<LI><A NAME="TOC2" HREF="texdraw_1.html#SEC2">1.1 Distribution information</A>
+</UL>
+<LI><A NAME="TOC3" HREF="texdraw_2.html#SEC3">2. Using the TeXdraw Commands</A>
+<UL>
+<LI><A NAME="TOC4" HREF="texdraw_2.html#SEC4">2.1 Accessing TeXdraw</A>
+<LI><A NAME="TOC5" HREF="texdraw_2.html#SEC5">2.2 Command syntax</A>
+<LI><A NAME="TOC6" HREF="texdraw_2.html#SEC6">2.3 TeXdraw coordinates</A>
+<LI><A NAME="TOC7" HREF="texdraw_2.html#SEC7">2.4 Coordinate specification</A>
+<LI><A NAME="TOC8" HREF="texdraw_2.html#SEC8">2.5 Line vectors</A>
+<LI><A NAME="TOC9" HREF="texdraw_2.html#SEC9">2.6 TeX text</A>
+<LI><A NAME="TOC10" HREF="texdraw_2.html#SEC10">2.7 Circles, ellipses and arcs</A>
+<LI><A NAME="TOC11" HREF="texdraw_2.html#SEC11">2.8 Bezier curves</A>
+<LI><A NAME="TOC12" HREF="texdraw_2.html#SEC12">2.9 Fill commands</A>
+</UL>
+<LI><A NAME="TOC13" HREF="texdraw_3.html#SEC13">3. Drawing Segments and Scaling</A>
+<UL>
+<LI><A NAME="TOC14" HREF="texdraw_3.html#SEC14">3.1 Drawing segments</A>
+<LI><A NAME="TOC15" HREF="texdraw_3.html#SEC15">3.2 Drawing paths</A>
+<LI><A NAME="TOC16" HREF="texdraw_3.html#SEC16">3.3 Saving positions</A>
+<LI><A NAME="TOC17" HREF="texdraw_3.html#SEC17">3.4 Scaling coordinates</A>
+<LI><A NAME="TOC18" HREF="texdraw_3.html#SEC18">3.5 Drawing size</A>
+<LI><A NAME="TOC19" HREF="texdraw_3.html#SEC19">3.6 Initial current position</A>
+</UL>
+<LI><A NAME="TOC20" HREF="texdraw_4.html#SEC20">4. Using TeXdraw with LaTeX</A>
+<UL>
+<LI><A NAME="TOC21" HREF="texdraw_4.html#SEC21">4.1 PostScript printer drivers</A>
+</UL>
+<LI><A NAME="TOC22" HREF="texdraw_5.html#SEC22">5. More Details</A>
+<UL>
+<LI><A NAME="TOC23" HREF="texdraw_5.html#SEC23">5.1 Errors while using TeXdraw</A>
+<LI><A NAME="TOC24" HREF="texdraw_5.html#SEC24">5.2 Extending TeXdraw</A>
+<UL>
+<LI><A NAME="TOC25" HREF="texdraw_5.html#SEC25">5.2.1 Scaling</A>
+<LI><A NAME="TOC26" HREF="texdraw_5.html#SEC26">5.2.2 Resolution</A>
+<LI><A NAME="TOC27" HREF="texdraw_5.html#SEC27">5.2.3 Text placement</A>
+<LI><A NAME="TOC28" HREF="texdraw_5.html#SEC28">5.2.4 The intermediate PostScript file</A>
+</UL>
+<LI><A NAME="TOC29" HREF="texdraw_5.html#SEC29">5.3 How TeXdraw merges graphics and text</A>
+</UL>
+<LI><A NAME="TOC30" HREF="texdraw_6.html#SEC30">A. PostScript Commands</A>
+<LI><A NAME="TOC31" HREF="texdraw_7.html#SEC31">B. TeXdraw Toolbox</A>
+<UL>
+<LI><A NAME="TOC32" HREF="texdraw_7.html#SEC32">B.1 Coordinate parsing</A>
+<LI><A NAME="TOC33" HREF="texdraw_7.html#SEC33">B.2 Real arithmetic</A>
+<LI><A NAME="TOC34" HREF="texdraw_7.html#SEC34">B.3 Arrow curve</A>
+</UL>
+<LI><A NAME="TOC35" HREF="texdraw_8.html#SEC35">C. Examples</A>
+<UL>
+<LI><A NAME="TOC36" HREF="texdraw_8.html#SEC36">C.1 Block diagram of a lattice filter</A>
+<LI><A NAME="TOC37" HREF="texdraw_8.html#SEC37">C.2 Filter response graph</A>
+<LI><A NAME="TOC38" HREF="texdraw_8.html#SEC38">C.3 Geometric construction</A>
+</UL>
+<LI><A NAME="TOC39" HREF="texdraw_9.html#SEC39">D. Alphabetic listing of commands</A>
+<LI><A NAME="TOC40" HREF="texdraw_10.html#SEC40">Command Index</A>
+<LI><A NAME="TOC41" HREF="texdraw_11.html#SEC41">Concept Index</A>
+</UL>
+<P><HR><P>
+This document was generated on 10 March 2004 using
+<A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A>&nbsp;1.56k.
+</BODY>
+</HTML>
diff --git a/Master/texmf-dist/doc/texdraw/texi2dvi b/Master/texmf-dist/doc/texdraw/texi2dvi
new file mode 100644
index 00000000000..45e92ff8e7f
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texi2dvi
@@ -0,0 +1,275 @@
+#! /bin/sh
+# texi2dvi --- smartly produce DVI files from texinfo sources
+
+# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+
+# $Id: texi2dvi,v 1.7 1995/11/03 texdraw-V2R0 $
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, you can either send email to this
+# program's maintainer or write to: The Free Software Foundation,
+# Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
+
+# Commentary:
+
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+
+# Please send bug reports, etc. to bug-texinfo@prep.ai.mit.edu
+# If possible, please send a copy of the output of the script called with
+# the `--debug' option when making a bug report.
+
+# In the interest of general portability, some common bourne shell
+# constructs were avoided because they weren't guaranteed to be available
+# in some earlier implementations. I've tried to make this program as
+# portable as possible. Welcome to unix, where the lowest common
+# denominator is rapidly diminishing.
+#
+# Among the more interesting lossages I noticed with some bourne shells
+# are:
+# * No shell functions.
+# * No `unset' builtin.
+# * `shift' cannot take a numeric argument, and signals an error if
+# there are no arguments to shift.
+
+# Code:
+
+# Name by which this script was invoked.
+progname=`echo "$0" | sed -e 's/[^\/]*\///g'`
+
+# This string is expanded by rcs automatically when this file is checked out.
+rcs_revision='$Revision: 1.7 $'
+version=`set - $rcs_revision; echo $2`
+
+# To prevent hairy quoting and escaping later.
+bq='`'
+eq="'"
+
+usage="Usage: $progname {options} [file1] {file2 {...}}
+(version $version)
+
+Options are:
+-D, --debug Turn on shell debugging ($bq${bq}set -x$eq$eq).
+-h, --help You're looking at it.
+-v, --version Print version number.
+
+Arguments in brackets are required. Those in braces are optional.
+"
+
+# Initialize variables.
+# Don't use `unset' since old bourne shells don't have this command.
+# Instead, assign them an empty value.
+# Some of these, like TEX and TEXINDEX, may be inherited from the environment
+backup_extension=.bak
+debug=
+orig_pwd="`pwd`"
+verbose=
+texindex="${TEXINDEX-texindex}"
+tex="${TEX-tex}"
+
+# Save this so we can construct a new TEXINPUTS path for each file to be
+# processed.
+TEXINPUTS_orig="$TEXINPUTS"
+export TEXINPUTS
+
+# Parse command line arguments.
+# Make sure that all wildcarded options are long enough to be unambiguous.
+# It's a good idea to document the full long option name in each case.
+# Long options which take arguments will need a `*' appended to the
+# canonical name to match the value appended after the `=' character.
+while : ; do
+ case $# in 0) break ;; esac
+ case "$1" in
+ -D | --debug | --d* )
+ debug=t
+ shift
+ ;;
+ -h | --help | --h* )
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -v | --version | --v* )
+ echo "texi2dvi version $version" 1>&2
+ exit 0
+ ;;
+ -- ) # Stop option processing
+ shift
+ break
+ ;;
+ -* )
+ case "$1" in
+ --*=* ) arg=`echo "$1" | sed -e 's/=.*//'` ;;
+ * ) arg="$1" ;;
+ esac
+ exec 1>&2
+ echo "$progname: unknown or ambiguous option $bq$arg$eq"
+ echo "$progname: Use $bq--help$eq for a list of options."
+ exit 1
+ ;;
+ * )
+ break
+ ;;
+ esac
+done
+
+# See if there are any command line args left (which will be interpreted as
+# filename arguments)
+case $# in
+ 0 )
+ exec 1>&2
+ echo "$progname: at least one file name is required as an argument."
+ echo "$progname: Use $bq--help$eq for a description of command syntax."
+ exit 2
+ ;;
+esac
+
+case "$debug" in t ) set -x ;; esac
+
+# Texify files
+for command_line_filename in ${1+"$@"} ; do
+ # Roughly equivalent to `dirname ...`, but more portable
+ directory="`echo ${command_line_filename} | sed 's/\/[^\/]*$//'`"
+ filename_texi="`basename ${command_line_filename}`"
+ # Strip off the last extension part (probably .texinfo or .texi)
+ filename_noext="`echo ${filename_texi} | sed 's/\.[^.]*$//'`"
+
+ # If directory and file are the same, then it's probably because there's
+ # no pathname component. Set dirname to `.', the current directory.
+ if test "z${directory}" = "z${command_line_filename}" ; then
+ directory="."
+ fi
+
+ # Source file might @include additional texinfo sources. Put `.' and
+ # directory where source file(s) reside in TEXINPUTS before anything
+ # else. `.' goes first to ensure that any old .aux, .cps, etc. files in
+ # ${directory} don't get used in preference to fresher files in `.'.
+ TEXINPUTS=".:${directory}:${TEXINPUTS_orig}"
+
+ # "Unset" variables that might have values from previous iterations and
+ # which won't be completely reset later.
+ definite_index_files=""
+
+ # See if file exists here. If it doesn't we're in trouble since, even
+ # though the user may be able to reenter a valid filename at the tex
+ # prompt (assuming they're attending the terminal), this script won't be
+ # able to find the right index files and so forth.
+ if test ! -r "${command_line_filename}" ; then
+ echo "${progname}: ${command_line_filename}: No such file or permission denied." 1>&2
+ continue;
+ fi
+
+ # Find all files having root filename with a two-letter extension,
+ # determine whether they're really index files, and save them. Foo.aux
+ # is actually the cross-references file, but we need to keep track of
+ # that too.
+ possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
+ for this_file in ${possible_index_files} ; do
+ # If file is empty, forget it.
+ if test ! -s "${this_file}" ; then
+ continue;
+ fi
+
+ # Examine first character of file. If it's not a backslash or
+ # single quote, then it's definitely not an index or xref file.
+ first_character="`sed -n '1s/^\(.\).*$/\1/p;q' ${this_file}`"
+ if test "${first_character}" = "\\" -o "${first_character}" = "'" ; then
+ definite_index_files="${definite_index_files} ${this_file}"
+ fi
+ done
+ orig_index_files="${definite_index_files}"
+ orig_index_files_sans_aux="`echo ${definite_index_files} \
+ | sed 's/'${filename_noext}'\.aux//;
+ s/^[ ]*//;s/[ ]*$//;'`"
+
+ # Now save copies of original index files so we have some means of
+ # comparison later.
+ for index_file_to_save in ${orig_index_files} ; do
+ cp "${index_file_to_save}" "${index_file_to_save}${backup_extension}"
+ done
+
+ # Run texindex on current index files. If they already exist, and
+ # after running TeX a first time the index files don't change, then
+ # there's no reason to run TeX again. But we won't know that if the
+ # index files are out of date or nonexistent.
+ if test "${orig_index_files_sans_aux}" ; then
+ ${texindex} ${orig_index_files_sans_aux}
+ fi
+
+ if ${tex} ${command_line_filename} ; then # TeX run first time
+ definite_index_files=""
+ # Get list of new index files
+ possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
+ for this_file in ${possible_index_files} ; do
+ # If file is empty, forget it.
+ if test ! -s ${this_file} ; then
+ continue;
+ fi
+
+ # Examine first character of file. If it's not a backslash or
+ # single quote, then it's definitely not an index or xref file.
+ first_character="`sed -n '1s/^\(.\).*$/\1/p;q' ${this_file}`"
+ if test "${first_character}" = "\\" -o "${first_character}" = "'" ; then
+ definite_index_files="${definite_index_files} ${this_file}"
+ fi
+ done
+ new_index_files="${definite_index_files}"
+ new_index_files_sans_aux="`echo ${definite_index_files} \
+ | sed 's/'${filename_noext}'\.aux//;
+ s/^[ ]*//;s/[ ]*$//;'`"
+
+ # If old and new list don't at least have the same file list, then one
+ # file or another has definitely changed.
+ if test "${orig_index_files}" != "${new_index_files}" ; then
+ index_files_changed_p=t
+ else
+ # File list is the same. We must compare each file until we find a
+ # difference.
+ index_files_changed_p=""
+ for this_file in ${new_index_files} ; do
+ # cmp -s will return nonzero exit status if files differ.
+ cmp -s "${this_file}" "${this_file}${backup_extension}"
+ if test $? -ne 0 ; then
+ # We only need to keep comparing until we find *one* that
+ # differs, because we'll have to run texindex & tex no
+ # matter what.
+ index_files_changed_p=t
+ break
+ fi
+ done
+ fi
+
+ # If index files have changed since TeX has been run, or if the aux
+ # file wasn't present originally, run texindex and TeX again.
+ if test "${index_files_changed_p}" ; then
+ retval=0
+ if test "${new_index_files_sans_aux}" ; then
+ ${texindex} ${new_index_files_sans_aux}
+ retval=$?
+ fi
+ if test ${retval} -eq 0 ; then
+ ${tex} "${command_line_filename}"
+ fi
+ fi
+ fi
+
+ # Generate list of files to delete, then call rm once with the entire
+ # list. This is significantly faster than multiple executions of rm.
+ file_list=""
+ for file in ${orig_index_files} ; do
+ file_list="${file_list} ${file}${backup_extension}"
+ done
+ if test "${file_list}" ; then
+ rm -f ${file_list}
+ fi
+done
+
+# texi2dvi ends here
diff --git a/Master/texmf-dist/doc/texdraw/texindex.c b/Master/texmf-dist/doc/texdraw/texindex.c
new file mode 100644
index 00000000000..a88d5169691
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/texindex.c
@@ -0,0 +1,1700 @@
+/* Prepare TeX index dribble output into an actual index.
+
+ Version 1.45
+
+ Copyright (C) 1987, 1991, 1992 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include "getopt.h"
+
+#if defined (STDC_HEADERS)
+# include <string.h>
+# include <stdlib.h>
+# if !defined (bzero)
+# define bzero(p, n) memset((p), '\0', (n))
+# endif /* !bzero */
+#else /* !STDC_HEADERS */
+extern int errno;
+char *getenv (), *malloc (), *realloc ();
+void bzero ();
+#endif /* !STDC_HEADERS */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#else /* !HAVE_UNISTD_H */
+long lseek ();
+#endif /* !HAVE_UNISTD_H */
+
+char *mktemp ();
+
+#if defined (VMS)
+# if !defined (VAX11C)
+# define noshare
+# endif /* !VAX11C */
+# include <perror.h>
+extern noshare int sys_nerr;
+extern noshare char *sys_errlist[];
+
+# include <file.h>
+
+# define TI_NO_ERROR ((1 << 28) | 1)
+# define TI_FATAL_ERROR ((1 << 28) | 4)
+# define unlink delete
+
+#else /* !VMS */
+
+extern int sys_nerr;
+extern char *sys_errlist[];
+
+# if defined (HAVE_SYS_FCNTL_H)
+# include <sys/types.h>
+# include <sys/fcntl.h>
+# endif /* HAVE_SYS_FCNTL_H */
+
+# if defined (_AIX) || !defined (_POSIX_VERSION)
+# include <sys/file.h>
+# else /* !AIX && _POSIX_VERSION */
+# if !defined (HAVE_SYS_FCNTL_H)
+# include <fcntl.h>
+# endif /* !HAVE_FCNTL_H */
+# endif /* !_AIX && _POSIX_VERSION */
+# define TI_NO_ERROR 0
+# define TI_FATAL_ERROR 1
+#endif /* !VMS */
+
+#if !defined (SEEK_SET)
+# define SEEK_SET 0
+# define SEEK_CUR 1
+# define SEEK_END 2
+#endif /* !SEEK_SET */
+
+/* When sorting in core, this structure describes one line
+ and the position and length of its first keyfield. */
+struct lineinfo
+{
+ char *text; /* The actual text of the line. */
+ union {
+ char *text; /* The start of the key (for textual comparison). */
+ long number; /* The numeric value (for numeric comparison). */
+ } key;
+ long keylen; /* Length of KEY field. */
+};
+
+/* This structure describes a field to use as a sort key. */
+struct keyfield
+{
+ int startwords; /* Number of words to skip. */
+ int startchars; /* Number of additional chars to skip. */
+ int endwords; /* Number of words to ignore at end. */
+ int endchars; /* Ditto for characters of last word. */
+ char ignore_blanks; /* Non-zero means ignore spaces and tabs. */
+ char fold_case; /* Non-zero means case doesn't matter. */
+ char reverse; /* Non-zero means compare in reverse order. */
+ char numeric; /* Non-zeros means field is ASCII numeric. */
+ char positional; /* Sort according to file position. */
+ char braced; /* Count balanced-braced groupings as fields. */
+};
+
+/* Vector of keyfields to use. */
+struct keyfield keyfields[3];
+
+/* Number of keyfields stored in that vector. */
+int num_keyfields = 3;
+
+/* Vector of input file names, terminated with a null pointer. */
+char **infiles;
+
+/* Vector of corresponding output file names, or NULL, meaning default it
+ (add an `s' to the end). */
+char **outfiles;
+
+/* Length of `infiles'. */
+int num_infiles;
+
+/* Pointer to the array of pointers to lines being sorted. */
+char **linearray;
+
+/* The allocated length of `linearray'. */
+long nlines;
+
+/* Directory to use for temporary files. On Unix, it ends with a slash. */
+char *tempdir;
+
+/* Start of filename to use for temporary files. */
+char *tempbase;
+
+/* Number of last temporary file. */
+int tempcount;
+
+/* Number of last temporary file already deleted.
+ Temporary files are deleted by `flush_tempfiles' in order of creation. */
+int last_deleted_tempcount;
+
+/* During in-core sort, this points to the base of the data block
+ which contains all the lines of data. */
+char *text_base;
+
+/* Additional command switches .*/
+
+/* Nonzero means do not delete tempfiles -- for debugging. */
+int keep_tempfiles;
+
+/* The name this program was run with. */
+char *program_name;
+
+/* Forward declarations of functions in this file. */
+
+void decode_command ();
+void sort_in_core ();
+void sort_offline ();
+char **parsefile ();
+char *find_field ();
+char *find_pos ();
+long find_value ();
+char *find_braced_pos ();
+char *find_braced_end ();
+void writelines ();
+int compare_field ();
+int compare_full ();
+long readline ();
+int merge_files ();
+int merge_direct ();
+void pfatal_with_name ();
+void fatal ();
+void error ();
+void *xmalloc (), *xrealloc ();
+char *concat ();
+char *maketempname ();
+void flush_tempfiles ();
+char *tempcopy ();
+
+#define MAX_IN_CORE_SORT 500000
+
+void
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int i;
+
+ tempcount = 0;
+ last_deleted_tempcount = 0;
+ program_name = argv[0];
+
+ /* Describe the kind of sorting to do. */
+ /* The first keyfield uses the first braced field and folds case. */
+ keyfields[0].braced = 1;
+ keyfields[0].fold_case = 1;
+ keyfields[0].endwords = -1;
+ keyfields[0].endchars = -1;
+
+ /* The second keyfield uses the second braced field, numerically. */
+ keyfields[1].braced = 1;
+ keyfields[1].numeric = 1;
+ keyfields[1].startwords = 1;
+ keyfields[1].endwords = -1;
+ keyfields[1].endchars = -1;
+
+ /* The third keyfield (which is ignored while discarding duplicates)
+ compares the whole line. */
+ keyfields[2].endwords = -1;
+ keyfields[2].endchars = -1;
+
+ decode_command (argc, argv);
+
+ tempbase = mktemp (concat ("txiXXXXXX", "", ""));
+
+ /* Process input files completely, one by one. */
+
+ for (i = 0; i < num_infiles; i++)
+ {
+ int desc;
+ long ptr;
+ char *outfile;
+
+ desc = open (infiles[i], O_RDONLY, 0);
+ if (desc < 0)
+ pfatal_with_name (infiles[i]);
+ lseek (desc, 0L, SEEK_END);
+ ptr = lseek (desc, 0L, SEEK_CUR);
+
+ close (desc);
+
+ outfile = outfiles[i];
+ if (!outfile)
+ {
+ outfile = concat (infiles[i], "s", "");
+ }
+
+ if (ptr < MAX_IN_CORE_SORT)
+ /* Sort a small amount of data. */
+ sort_in_core (infiles[i], ptr, outfile);
+ else
+ sort_offline (infiles[i], ptr, outfile);
+ }
+
+ flush_tempfiles (tempcount);
+ exit (TI_NO_ERROR);
+}
+
+void
+usage ()
+{
+ fprintf (stderr, "\
+Usage: %s [-k] infile [-o outfile] ...\n", program_name);
+ exit (1);
+}
+
+/* Decode the command line arguments to set the parameter variables
+ and set up the vector of keyfields and the vector of input files. */
+
+void
+decode_command (argc, argv)
+ int argc;
+ char **argv;
+{
+ int optc;
+ char **ip;
+ char **op;
+
+ /* Store default values into parameter variables. */
+
+ tempdir = getenv ("TMPDIR");
+#ifdef VMS
+ if (tempdir == NULL)
+ tempdir = "sys$scratch:";
+#else
+ if (tempdir == NULL)
+ tempdir = "/tmp/";
+ else
+ tempdir = concat (tempdir, "/", "");
+#endif
+
+ keep_tempfiles = 0;
+
+ /* Allocate ARGC input files, which must be enough. */
+
+ infiles = (char **) xmalloc (argc * sizeof (char *));
+ outfiles = (char **) xmalloc (argc * sizeof (char *));
+ ip = infiles;
+ op = outfiles;
+
+ while ((optc = getopt (argc, argv, "-ko:")) != EOF)
+ {
+ switch (optc)
+ {
+ case 1: /* Non-option filename. */
+ *ip++ = optarg;
+ *op++ = NULL;
+ break;
+
+ case 'k':
+ keep_tempfiles = 1;
+ break;
+
+ case 'o':
+ if (op > outfiles)
+ *(op - 1) = optarg;
+ break;
+
+ default:
+ usage ();
+ }
+ }
+
+ /* Record number of keyfields and terminate list of filenames. */
+ num_infiles = ip - infiles;
+ *ip = 0;
+ if (num_infiles == 0)
+ usage ();
+}
+
+/* Return a name for a temporary file. */
+
+char *
+maketempname (count)
+ int count;
+{
+ char tempsuffix[10];
+ sprintf (tempsuffix, "%d", count);
+ return concat (tempdir, tempbase, tempsuffix);
+}
+
+/* Delete all temporary files up to TO_COUNT. */
+
+void
+flush_tempfiles (to_count)
+ int to_count;
+{
+ if (keep_tempfiles)
+ return;
+ while (last_deleted_tempcount < to_count)
+ unlink (maketempname (++last_deleted_tempcount));
+}
+
+/* Copy the input file open on IDESC into a temporary file
+ and return the temporary file name. */
+
+#define BUFSIZE 1024
+
+char *
+tempcopy (idesc)
+ int idesc;
+{
+ char *outfile = maketempname (++tempcount);
+ int odesc;
+ char buffer[BUFSIZE];
+
+ odesc = open (outfile, O_WRONLY | O_CREAT, 0666);
+
+ if (odesc < 0)
+ pfatal_with_name (outfile);
+
+ while (1)
+ {
+ int nread = read (idesc, buffer, BUFSIZE);
+ write (odesc, buffer, nread);
+ if (!nread)
+ break;
+ }
+
+ close (odesc);
+
+ return outfile;
+}
+
+/* Compare LINE1 and LINE2 according to the specified set of keyfields. */
+
+int
+compare_full (line1, line2)
+ char **line1, **line2;
+{
+ int i;
+
+ /* Compare using the first keyfield;
+ if that does not distinguish the lines, try the second keyfield;
+ and so on. */
+
+ for (i = 0; i < num_keyfields; i++)
+ {
+ long length1, length2;
+ char *start1 = find_field (&keyfields[i], *line1, &length1);
+ char *start2 = find_field (&keyfields[i], *line2, &length2);
+ int tem = compare_field (&keyfields[i], start1, length1, *line1 - text_base,
+ start2, length2, *line2 - text_base);
+ if (tem)
+ {
+ if (keyfields[i].reverse)
+ return -tem;
+ return tem;
+ }
+ }
+
+ return 0; /* Lines match exactly. */
+}
+
+/* Compare LINE1 and LINE2, described by structures
+ in which the first keyfield is identified in advance.
+ For positional sorting, assumes that the order of the lines in core
+ reflects their nominal order. */
+
+int
+compare_prepared (line1, line2)
+ struct lineinfo *line1, *line2;
+{
+ int i;
+ int tem;
+ char *text1, *text2;
+
+ /* Compare using the first keyfield, which has been found for us already. */
+ if (keyfields->positional)
+ {
+ if (line1->text - text_base > line2->text - text_base)
+ tem = 1;
+ else
+ tem = -1;
+ }
+ else if (keyfields->numeric)
+ tem = line1->key.number - line2->key.number;
+ else
+ tem = compare_field (keyfields, line1->key.text, line1->keylen, 0,
+ line2->key.text, line2->keylen, 0);
+ if (tem)
+ {
+ if (keyfields->reverse)
+ return -tem;
+ return tem;
+ }
+
+ text1 = line1->text;
+ text2 = line2->text;
+
+ /* Compare using the second keyfield;
+ if that does not distinguish the lines, try the third keyfield;
+ and so on. */
+
+ for (i = 1; i < num_keyfields; i++)
+ {
+ long length1, length2;
+ char *start1 = find_field (&keyfields[i], text1, &length1);
+ char *start2 = find_field (&keyfields[i], text2, &length2);
+ int tem = compare_field (&keyfields[i], start1, length1, text1 - text_base,
+ start2, length2, text2 - text_base);
+ if (tem)
+ {
+ if (keyfields[i].reverse)
+ return -tem;
+ return tem;
+ }
+ }
+
+ return 0; /* Lines match exactly. */
+}
+
+/* Like compare_full but more general.
+ You can pass any strings, and you can say how many keyfields to use.
+ POS1 and POS2 should indicate the nominal positional ordering of
+ the two lines in the input. */
+
+int
+compare_general (str1, str2, pos1, pos2, use_keyfields)
+ char *str1, *str2;
+ long pos1, pos2;
+ int use_keyfields;
+{
+ int i;
+
+ /* Compare using the first keyfield;
+ if that does not distinguish the lines, try the second keyfield;
+ and so on. */
+
+ for (i = 0; i < use_keyfields; i++)
+ {
+ long length1, length2;
+ char *start1 = find_field (&keyfields[i], str1, &length1);
+ char *start2 = find_field (&keyfields[i], str2, &length2);
+ int tem = compare_field (&keyfields[i], start1, length1, pos1,
+ start2, length2, pos2);
+ if (tem)
+ {
+ if (keyfields[i].reverse)
+ return -tem;
+ return tem;
+ }
+ }
+
+ return 0; /* Lines match exactly. */
+}
+
+/* Find the start and length of a field in STR according to KEYFIELD.
+ A pointer to the starting character is returned, and the length
+ is stored into the int that LENGTHPTR points to. */
+
+char *
+find_field (keyfield, str, lengthptr)
+ struct keyfield *keyfield;
+ char *str;
+ long *lengthptr;
+{
+ char *start;
+ char *end;
+ char *(*fun) ();
+
+ if (keyfield->braced)
+ fun = find_braced_pos;
+ else
+ fun = find_pos;
+
+ start = (*fun) (str, keyfield->startwords, keyfield->startchars,
+ keyfield->ignore_blanks);
+ if (keyfield->endwords < 0)
+ {
+ if (keyfield->braced)
+ end = find_braced_end (start);
+ else
+ {
+ end = start;
+ while (*end && *end != '\n')
+ end++;
+ }
+ }
+ else
+ {
+ end = (*fun) (str, keyfield->endwords, keyfield->endchars, 0);
+ if (end - str < start - str)
+ end = start;
+ }
+ *lengthptr = end - start;
+ return start;
+}
+
+/* Return a pointer to a specified place within STR,
+ skipping (from the beginning) WORDS words and then CHARS chars.
+ If IGNORE_BLANKS is nonzero, we skip all blanks
+ after finding the specified word. */
+
+char *
+find_pos (str, words, chars, ignore_blanks)
+ char *str;
+ int words, chars;
+ int ignore_blanks;
+{
+ int i;
+ char *p = str;
+
+ for (i = 0; i < words; i++)
+ {
+ char c;
+ /* Find next bunch of nonblanks and skip them. */
+ while ((c = *p) == ' ' || c == '\t')
+ p++;
+ while ((c = *p) && c != '\n' && !(c == ' ' || c == '\t'))
+ p++;
+ if (!*p || *p == '\n')
+ return p;
+ }
+
+ while (*p == ' ' || *p == '\t')
+ p++;
+
+ for (i = 0; i < chars; i++)
+ {
+ if (!*p || *p == '\n')
+ break;
+ p++;
+ }
+ return p;
+}
+
+/* Like find_pos but assumes that each field is surrounded by braces
+ and that braces within fields are balanced. */
+
+char *
+find_braced_pos (str, words, chars, ignore_blanks)
+ char *str;
+ int words, chars;
+ int ignore_blanks;
+{
+ int i;
+ int bracelevel;
+ char *p = str;
+ char c;
+
+ for (i = 0; i < words; i++)
+ {
+ bracelevel = 1;
+ while ((c = *p++) != '{' && c != '\n' && c)
+ /* Do nothing. */ ;
+ if (c != '{')
+ return p - 1;
+ while (bracelevel)
+ {
+ c = *p++;
+ if (c == '{')
+ bracelevel++;
+ if (c == '}')
+ bracelevel--;
+ if (c == 0 || c == '\n')
+ return p - 1;
+ }
+ }
+
+ while ((c = *p++) != '{' && c != '\n' && c)
+ /* Do nothing. */ ;
+
+ if (c != '{')
+ return p - 1;
+
+ if (ignore_blanks)
+ while ((c = *p) == ' ' || c == '\t')
+ p++;
+
+ for (i = 0; i < chars; i++)
+ {
+ if (!*p || *p == '\n')
+ break;
+ p++;
+ }
+ return p;
+}
+
+/* Find the end of the balanced-brace field which starts at STR.
+ The position returned is just before the closing brace. */
+
+char *
+find_braced_end (str)
+ char *str;
+{
+ int bracelevel;
+ char *p = str;
+ char c;
+
+ bracelevel = 1;
+ while (bracelevel)
+ {
+ c = *p++;
+ if (c == '{')
+ bracelevel++;
+ if (c == '}')
+ bracelevel--;
+ if (c == 0 || c == '\n')
+ return p - 1;
+ }
+ return p - 1;
+}
+
+long
+find_value (start, length)
+ char *start;
+ long length;
+{
+ while (length != 0L)
+ {
+ if (isdigit (*start))
+ return atol (start);
+ length--;
+ start++;
+ }
+ return 0l;
+}
+
+/* Vector used to translate characters for comparison.
+ This is how we make all alphanumerics follow all else,
+ and ignore case in the first sorting. */
+int char_order[256];
+
+void
+init_char_order ()
+{
+ int i;
+ for (i = 1; i < 256; i++)
+ char_order[i] = i;
+
+ for (i = '0'; i <= '9'; i++)
+ char_order[i] += 512;
+
+ for (i = 'a'; i <= 'z'; i++)
+ {
+ char_order[i] = 512 + i;
+ char_order[i + 'A' - 'a'] = 512 + i;
+ }
+}
+
+/* Compare two fields (each specified as a start pointer and a character count)
+ according to KEYFIELD.
+ The sign of the value reports the relation between the fields. */
+
+int
+compare_field (keyfield, start1, length1, pos1, start2, length2, pos2)
+ struct keyfield *keyfield;
+ char *start1;
+ long length1;
+ long pos1;
+ char *start2;
+ long length2;
+ long pos2;
+{
+ if (keyfields->positional)
+ {
+ if (pos1 > pos2)
+ return 1;
+ else
+ return -1;
+ }
+ if (keyfield->numeric)
+ {
+ long value = find_value (start1, length1) - find_value (start2, length2);
+ if (value > 0)
+ return 1;
+ if (value < 0)
+ return -1;
+ return 0;
+ }
+ else
+ {
+ char *p1 = start1;
+ char *p2 = start2;
+ char *e1 = start1 + length1;
+ char *e2 = start2 + length2;
+
+ while (1)
+ {
+ int c1, c2;
+
+ if (p1 == e1)
+ c1 = 0;
+ else
+ c1 = *p1++;
+ if (p2 == e2)
+ c2 = 0;
+ else
+ c2 = *p2++;
+
+ if (char_order[c1] != char_order[c2])
+ return char_order[c1] - char_order[c2];
+ if (!c1)
+ break;
+ }
+
+ /* Strings are equal except possibly for case. */
+ p1 = start1;
+ p2 = start2;
+ while (1)
+ {
+ int c1, c2;
+
+ if (p1 == e1)
+ c1 = 0;
+ else
+ c1 = *p1++;
+ if (p2 == e2)
+ c2 = 0;
+ else
+ c2 = *p2++;
+
+ if (c1 != c2)
+ /* Reverse sign here so upper case comes out last. */
+ return c2 - c1;
+ if (!c1)
+ break;
+ }
+
+ return 0;
+ }
+}
+
+/* A `struct linebuffer' is a structure which holds a line of text.
+ `readline' reads a line from a stream into a linebuffer
+ and works regardless of the length of the line. */
+
+struct linebuffer
+{
+ long size;
+ char *buffer;
+};
+
+/* Initialize LINEBUFFER for use. */
+
+void
+initbuffer (linebuffer)
+ struct linebuffer *linebuffer;
+{
+ linebuffer->size = 200;
+ linebuffer->buffer = (char *) xmalloc (200);
+}
+
+/* Read a line of text from STREAM into LINEBUFFER.
+ Return the length of the line. */
+
+long
+readline (linebuffer, stream)
+ struct linebuffer *linebuffer;
+ FILE *stream;
+{
+ char *buffer = linebuffer->buffer;
+ char *p = linebuffer->buffer;
+ char *end = p + linebuffer->size;
+
+ while (1)
+ {
+ int c = getc (stream);
+ if (p == end)
+ {
+ buffer = (char *) xrealloc (buffer, linebuffer->size *= 2);
+ p += buffer - linebuffer->buffer;
+ end += buffer - linebuffer->buffer;
+ linebuffer->buffer = buffer;
+ }
+ if (c < 0 || c == '\n')
+ {
+ *p = 0;
+ break;
+ }
+ *p++ = c;
+ }
+
+ return p - buffer;
+}
+
+/* Sort an input file too big to sort in core. */
+
+void
+sort_offline (infile, nfiles, total, outfile)
+ char *infile;
+ int nfiles;
+ long total;
+ char *outfile;
+{
+ /* More than enough. */
+ int ntemps = 2 * (total + MAX_IN_CORE_SORT - 1) / MAX_IN_CORE_SORT;
+ char **tempfiles = (char **) xmalloc (ntemps * sizeof (char *));
+ FILE *istream = fopen (infile, "r");
+ int i;
+ struct linebuffer lb;
+ long linelength;
+ int failure = 0;
+
+ initbuffer (&lb);
+
+ /* Read in one line of input data. */
+
+ linelength = readline (&lb, istream);
+
+ if (lb.buffer[0] != '\\' && lb.buffer[0] != '@')
+ {
+ error ("%s: not a texinfo index file", infile);
+ return;
+ }
+
+ /* Split up the input into `ntemps' temporary files, or maybe fewer,
+ and put the new files' names into `tempfiles' */
+
+ for (i = 0; i < ntemps; i++)
+ {
+ char *outname = maketempname (++tempcount);
+ FILE *ostream = fopen (outname, "w");
+ long tempsize = 0;
+
+ if (!ostream)
+ pfatal_with_name (outname);
+ tempfiles[i] = outname;
+
+ /* Copy lines into this temp file as long as it does not make file
+ "too big" or until there are no more lines. */
+
+ while (tempsize + linelength + 1 <= MAX_IN_CORE_SORT)
+ {
+ tempsize += linelength + 1;
+ fputs (lb.buffer, ostream);
+ putc ('\n', ostream);
+
+ /* Read another line of input data. */
+
+ linelength = readline (&lb, istream);
+ if (!linelength && feof (istream))
+ break;
+
+ if (lb.buffer[0] != '\\' && lb.buffer[0] != '@')
+ {
+ error ("%s: not a texinfo index file", infile);
+ failure = 1;
+ goto fail;
+ }
+ }
+ fclose (ostream);
+ if (feof (istream))
+ break;
+ }
+
+ free (lb.buffer);
+
+fail:
+ /* Record number of temp files we actually needed. */
+
+ ntemps = i;
+
+ /* Sort each tempfile into another tempfile.
+ Delete the first set of tempfiles and put the names of the second
+ into `tempfiles'. */
+
+ for (i = 0; i < ntemps; i++)
+ {
+ char *newtemp = maketempname (++tempcount);
+ sort_in_core (&tempfiles[i], MAX_IN_CORE_SORT, newtemp);
+ if (!keep_tempfiles)
+ unlink (tempfiles[i]);
+ tempfiles[i] = newtemp;
+ }
+
+ if (failure)
+ return;
+
+ /* Merge the tempfiles together and indexify. */
+
+ merge_files (tempfiles, ntemps, outfile);
+}
+
+/* Sort INFILE, whose size is TOTAL,
+ assuming that is small enough to be done in-core,
+ then indexify it and send the output to OUTFILE (or to stdout). */
+
+void
+sort_in_core (infile, total, outfile)
+ char *infile;
+ long total;
+ char *outfile;
+{
+ char **nextline;
+ char *data = (char *) xmalloc (total + 1);
+ char *file_data;
+ long file_size;
+ int i;
+ FILE *ostream = stdout;
+ struct lineinfo *lineinfo;
+
+ /* Read the contents of the file into the moby array `data'. */
+
+ int desc = open (infile, O_RDONLY, 0);
+
+ if (desc < 0)
+ fatal ("failure reopening %s", infile);
+ for (file_size = 0;;)
+ {
+ i = read (desc, data + file_size, total - file_size);
+ if (i <= 0)
+ break;
+ file_size += i;
+ }
+ file_data = data;
+ data[file_size] = 0;
+
+ close (desc);
+
+ if (file_size > 0 && data[0] != '\\' && data[0] != '@')
+ {
+ error ("%s: not a texinfo index file", infile);
+ return;
+ }
+
+ init_char_order ();
+
+ /* Sort routines want to know this address. */
+
+ text_base = data;
+
+ /* Create the array of pointers to lines, with a default size
+ frequently enough. */
+
+ nlines = total / 50;
+ if (!nlines)
+ nlines = 2;
+ linearray = (char **) xmalloc (nlines * sizeof (char *));
+
+ /* `nextline' points to the next free slot in this array.
+ `nlines' is the allocated size. */
+
+ nextline = linearray;
+
+ /* Parse the input file's data, and make entries for the lines. */
+
+ nextline = parsefile (infile, nextline, file_data, file_size);
+ if (nextline == 0)
+ {
+ error ("%s: not a texinfo index file", infile);
+ return;
+ }
+
+ /* Sort the lines. */
+
+ /* If we have enough space, find the first keyfield of each line in advance.
+ Make a `struct lineinfo' for each line, which records the keyfield
+ as well as the line, and sort them. */
+
+ lineinfo = (struct lineinfo *) malloc ((nextline - linearray) * sizeof (struct lineinfo));
+
+ if (lineinfo)
+ {
+ struct lineinfo *lp;
+ char **p;
+
+ for (lp = lineinfo, p = linearray; p != nextline; lp++, p++)
+ {
+ lp->text = *p;
+ lp->key.text = find_field (keyfields, *p, &lp->keylen);
+ if (keyfields->numeric)
+ lp->key.number = find_value (lp->key.text, lp->keylen);
+ }
+
+ qsort (lineinfo, nextline - linearray, sizeof (struct lineinfo), compare_prepared);
+
+ for (lp = lineinfo, p = linearray; p != nextline; lp++, p++)
+ *p = lp->text;
+
+ free (lineinfo);
+ }
+ else
+ qsort (linearray, nextline - linearray, sizeof (char *), compare_full);
+
+ /* Open the output file. */
+
+ if (outfile)
+ {
+ ostream = fopen (outfile, "w");
+ if (!ostream)
+ pfatal_with_name (outfile);
+ }
+
+ writelines (linearray, nextline - linearray, ostream);
+ if (outfile)
+ fclose (ostream);
+
+ free (linearray);
+ free (data);
+}
+
+/* Parse an input string in core into lines.
+ DATA is the input string, and SIZE is its length.
+ Data goes in LINEARRAY starting at NEXTLINE.
+ The value returned is the first entry in LINEARRAY still unused.
+ Value 0 means input file contents are invalid. */
+
+char **
+parsefile (filename, nextline, data, size)
+ char *filename;
+ char **nextline;
+ char *data;
+ long size;
+{
+ char *p, *end;
+ char **line = nextline;
+
+ p = data;
+ end = p + size;
+ *end = 0;
+
+ while (p != end)
+ {
+ if (p[0] != '\\' && p[0] != '@')
+ return 0;
+
+ *line = p;
+ while (*p && *p != '\n')
+ p++;
+ if (p != end)
+ p++;
+
+ line++;
+ if (line == linearray + nlines)
+ {
+ char **old = linearray;
+ linearray = (char **) xrealloc (linearray, sizeof (char *) * (nlines *= 4));
+ line += linearray - old;
+ }
+ }
+
+ return line;
+}
+
+/* Indexification is a filter applied to the sorted lines
+ as they are being written to the output file.
+ Multiple entries for the same name, with different page numbers,
+ get combined into a single entry with multiple page numbers.
+ The first braced field, which is used for sorting, is discarded.
+ However, its first character is examined, folded to lower case,
+ and if it is different from that in the previous line fed to us
+ a \initial line is written with one argument, the new initial.
+
+ If an entry has four braced fields, then the second and third
+ constitute primary and secondary names.
+ In this case, each change of primary name
+ generates a \primary line which contains only the primary name,
+ and in between these are \secondary lines which contain
+ just a secondary name and page numbers. */
+
+/* The last primary name we wrote a \primary entry for.
+ If only one level of indexing is being done, this is the last name seen. */
+char *lastprimary;
+/* Length of storage allocated for lastprimary. */
+int lastprimarylength;
+
+/* Similar, for the secondary name. */
+char *lastsecondary;
+int lastsecondarylength;
+
+/* Zero if we are not in the middle of writing an entry.
+ One if we have written the beginning of an entry but have not
+ yet written any page numbers into it.
+ Greater than one if we have written the beginning of an entry
+ plus at least one page number. */
+int pending;
+
+/* The initial (for sorting purposes) of the last primary entry written.
+ When this changes, a \initial {c} line is written */
+
+char *lastinitial;
+
+int lastinitiallength;
+
+/* When we need a string of length 1 for the value of lastinitial,
+ store it here. */
+
+char lastinitial1[2];
+
+/* Initialize static storage for writing an index. */
+
+void
+init_index ()
+{
+ pending = 0;
+ lastinitial = lastinitial1;
+ lastinitial1[0] = 0;
+ lastinitial1[1] = 0;
+ lastinitiallength = 0;
+ lastprimarylength = 100;
+ lastprimary = (char *) xmalloc (lastprimarylength + 1);
+ bzero (lastprimary, lastprimarylength + 1);
+ lastsecondarylength = 100;
+ lastsecondary = (char *) xmalloc (lastsecondarylength + 1);
+ bzero (lastsecondary, lastsecondarylength + 1);
+}
+
+/* Indexify. Merge entries for the same name,
+ insert headers for each initial character, etc. */
+
+void
+indexify (line, ostream)
+ char *line;
+ FILE *ostream;
+{
+ char *primary, *secondary, *pagenumber;
+ int primarylength, secondarylength = 0, pagelength;
+ int nosecondary;
+ int initiallength;
+ char *initial;
+ char initial1[2];
+ register char *p;
+
+ /* First, analyze the parts of the entry fed to us this time. */
+
+ p = find_braced_pos (line, 0, 0, 0);
+ if (*p == '{')
+ {
+ initial = p;
+ /* Get length of inner pair of braces starting at `p',
+ including that inner pair of braces. */
+ initiallength = find_braced_end (p + 1) + 1 - p;
+ }
+ else
+ {
+ initial = initial1;
+ initial1[0] = *p;
+ initial1[1] = 0;
+ initiallength = 1;
+
+ if (initial1[0] >= 'a' && initial1[0] <= 'z')
+ initial1[0] -= 040;
+ }
+
+ pagenumber = find_braced_pos (line, 1, 0, 0);
+ pagelength = find_braced_end (pagenumber) - pagenumber;
+ if (pagelength == 0)
+ abort ();
+
+ primary = find_braced_pos (line, 2, 0, 0);
+ primarylength = find_braced_end (primary) - primary;
+
+ secondary = find_braced_pos (line, 3, 0, 0);
+ nosecondary = !*secondary;
+ if (!nosecondary)
+ secondarylength = find_braced_end (secondary) - secondary;
+
+ /* If the primary is different from before, make a new primary entry. */
+ if (strncmp (primary, lastprimary, primarylength))
+ {
+ /* Close off current secondary entry first, if one is open. */
+ if (pending)
+ {
+ fputs ("}\n", ostream);
+ pending = 0;
+ }
+
+ /* If this primary has a different initial, include an entry for
+ the initial. */
+ if (initiallength != lastinitiallength ||
+ strncmp (initial, lastinitial, initiallength))
+ {
+ fprintf (ostream, "\\initial {");
+ fwrite (initial, 1, initiallength, ostream);
+ fprintf (ostream, "}\n", initial);
+ if (initial == initial1)
+ {
+ lastinitial = lastinitial1;
+ *lastinitial1 = *initial1;
+ }
+ else
+ {
+ lastinitial = initial;
+ }
+ lastinitiallength = initiallength;
+ }
+
+ /* Make the entry for the primary. */
+ if (nosecondary)
+ fputs ("\\entry {", ostream);
+ else
+ fputs ("\\primary {", ostream);
+ fwrite (primary, primarylength, 1, ostream);
+ if (nosecondary)
+ {
+ fputs ("}{", ostream);
+ pending = 1;
+ }
+ else
+ fputs ("}\n", ostream);
+
+ /* Record name of most recent primary. */
+ if (lastprimarylength < primarylength)
+ {
+ lastprimarylength = primarylength + 100;
+ lastprimary = (char *) xrealloc (lastprimary,
+ 1 + lastprimarylength);
+ }
+ strncpy (lastprimary, primary, primarylength);
+ lastprimary[primarylength] = 0;
+
+ /* There is no current secondary within this primary, now. */
+ lastsecondary[0] = 0;
+ }
+
+ /* Should not have an entry with no subtopic following one with a subtopic. */
+
+ if (nosecondary && *lastsecondary)
+ error ("entry %s follows an entry with a secondary name", line);
+
+ /* Start a new secondary entry if necessary. */
+ if (!nosecondary && strncmp (secondary, lastsecondary, secondarylength))
+ {
+ if (pending)
+ {
+ fputs ("}\n", ostream);
+ pending = 0;
+ }
+
+ /* Write the entry for the secondary. */
+ fputs ("\\secondary {", ostream);
+ fwrite (secondary, secondarylength, 1, ostream);
+ fputs ("}{", ostream);
+ pending = 1;
+
+ /* Record name of most recent secondary. */
+ if (lastsecondarylength < secondarylength)
+ {
+ lastsecondarylength = secondarylength + 100;
+ lastsecondary = (char *) xrealloc (lastsecondary,
+ 1 + lastsecondarylength);
+ }
+ strncpy (lastsecondary, secondary, secondarylength);
+ lastsecondary[secondarylength] = 0;
+ }
+
+ /* Here to add one more page number to the current entry. */
+ if (pending++ != 1)
+ fputs (", ", ostream); /* Punctuate first, if this is not the first. */
+ fwrite (pagenumber, pagelength, 1, ostream);
+}
+
+/* Close out any unfinished output entry. */
+
+void
+finish_index (ostream)
+ FILE *ostream;
+{
+ if (pending)
+ fputs ("}\n", ostream);
+ free (lastprimary);
+ free (lastsecondary);
+}
+
+/* Copy the lines in the sorted order.
+ Each line is copied out of the input file it was found in. */
+
+void
+writelines (linearray, nlines, ostream)
+ char **linearray;
+ int nlines;
+ FILE *ostream;
+{
+ char **stop_line = linearray + nlines;
+ char **next_line;
+
+ init_index ();
+
+ /* Output the text of the lines, and free the buffer space. */
+
+ for (next_line = linearray; next_line != stop_line; next_line++)
+ {
+ /* If -u was specified, output the line only if distinct from previous one. */
+ if (next_line == linearray
+ /* Compare previous line with this one, using only the
+ explicitly specd keyfields. */
+ || compare_general (*(next_line - 1), *next_line, 0L, 0L, num_keyfields - 1))
+ {
+ char *p = *next_line;
+ char c;
+
+ while ((c = *p++) && c != '\n')
+ /* Do nothing. */ ;
+ *(p - 1) = 0;
+ indexify (*next_line, ostream);
+ }
+ }
+
+ finish_index (ostream);
+}
+
+/* Assume (and optionally verify) that each input file is sorted;
+ merge them and output the result.
+ Returns nonzero if any input file fails to be sorted.
+
+ This is the high-level interface that can handle an unlimited
+ number of files. */
+
+#define MAX_DIRECT_MERGE 10
+
+int
+merge_files (infiles, nfiles, outfile)
+ char **infiles;
+ int nfiles;
+ char *outfile;
+{
+ char **tempfiles;
+ int ntemps;
+ int i;
+ int value = 0;
+ int start_tempcount = tempcount;
+
+ if (nfiles <= MAX_DIRECT_MERGE)
+ return merge_direct (infiles, nfiles, outfile);
+
+ /* Merge groups of MAX_DIRECT_MERGE input files at a time,
+ making a temporary file to hold each group's result. */
+
+ ntemps = (nfiles + MAX_DIRECT_MERGE - 1) / MAX_DIRECT_MERGE;
+ tempfiles = (char **) xmalloc (ntemps * sizeof (char *));
+ for (i = 0; i < ntemps; i++)
+ {
+ int nf = MAX_DIRECT_MERGE;
+ if (i + 1 == ntemps)
+ nf = nfiles - i * MAX_DIRECT_MERGE;
+ tempfiles[i] = maketempname (++tempcount);
+ value |= merge_direct (&infiles[i * MAX_DIRECT_MERGE], nf, tempfiles[i]);
+ }
+
+ /* All temporary files that existed before are no longer needed
+ since their contents have been merged into our new tempfiles.
+ So delete them. */
+ flush_tempfiles (start_tempcount);
+
+ /* Now merge the temporary files we created. */
+
+ merge_files (tempfiles, ntemps, outfile);
+
+ free (tempfiles);
+
+ return value;
+}
+
+/* Assume (and optionally verify) that each input file is sorted;
+ merge them and output the result.
+ Returns nonzero if any input file fails to be sorted.
+
+ This version of merging will not work if the number of
+ input files gets too high. Higher level functions
+ use it only with a bounded number of input files. */
+
+int
+merge_direct (infiles, nfiles, outfile)
+ char **infiles;
+ int nfiles;
+ char *outfile;
+{
+ struct linebuffer *lb1, *lb2;
+ struct linebuffer **thisline, **prevline;
+ FILE **streams;
+ int i;
+ int nleft;
+ int lossage = 0;
+ int *file_lossage;
+ struct linebuffer *prev_out = 0;
+ FILE *ostream = stdout;
+
+ if (outfile)
+ {
+ ostream = fopen (outfile, "w");
+ }
+ if (!ostream)
+ pfatal_with_name (outfile);
+
+ init_index ();
+
+ if (nfiles == 0)
+ {
+ if (outfile)
+ fclose (ostream);
+ return 0;
+ }
+
+ /* For each file, make two line buffers.
+ Also, for each file, there is an element of `thisline'
+ which points at any time to one of the file's two buffers,
+ and an element of `prevline' which points to the other buffer.
+ `thisline' is supposed to point to the next available line from the file,
+ while `prevline' holds the last file line used,
+ which is remembered so that we can verify that the file is properly sorted. */
+
+ /* lb1 and lb2 contain one buffer each per file. */
+ lb1 = (struct linebuffer *) xmalloc (nfiles * sizeof (struct linebuffer));
+ lb2 = (struct linebuffer *) xmalloc (nfiles * sizeof (struct linebuffer));
+
+ /* thisline[i] points to the linebuffer holding the next available line in file i,
+ or is zero if there are no lines left in that file. */
+ thisline = (struct linebuffer **)
+ xmalloc (nfiles * sizeof (struct linebuffer *));
+ /* prevline[i] points to the linebuffer holding the last used line
+ from file i. This is just for verifying that file i is properly
+ sorted. */
+ prevline = (struct linebuffer **)
+ xmalloc (nfiles * sizeof (struct linebuffer *));
+ /* streams[i] holds the input stream for file i. */
+ streams = (FILE **) xmalloc (nfiles * sizeof (FILE *));
+ /* file_lossage[i] is nonzero if we already know file i is not
+ properly sorted. */
+ file_lossage = (int *) xmalloc (nfiles * sizeof (int));
+
+ /* Allocate and initialize all that storage. */
+
+ for (i = 0; i < nfiles; i++)
+ {
+ initbuffer (&lb1[i]);
+ initbuffer (&lb2[i]);
+ thisline[i] = &lb1[i];
+ prevline[i] = &lb2[i];
+ file_lossage[i] = 0;
+ streams[i] = fopen (infiles[i], "r");
+ if (!streams[i])
+ pfatal_with_name (infiles[i]);
+
+ readline (thisline[i], streams[i]);
+ }
+
+ /* Keep count of number of files not at eof. */
+ nleft = nfiles;
+
+ while (nleft)
+ {
+ struct linebuffer *best = 0;
+ struct linebuffer *exch;
+ int bestfile = -1;
+ int i;
+
+ /* Look at the next avail line of each file; choose the least one. */
+
+ for (i = 0; i < nfiles; i++)
+ {
+ if (thisline[i] &&
+ (!best ||
+ 0 < compare_general (best->buffer, thisline[i]->buffer,
+ (long) bestfile, (long) i, num_keyfields)))
+ {
+ best = thisline[i];
+ bestfile = i;
+ }
+ }
+
+ /* Output that line, unless it matches the previous one and we
+ don't want duplicates. */
+
+ if (!(prev_out &&
+ !compare_general (prev_out->buffer,
+ best->buffer, 0L, 1L, num_keyfields - 1)))
+ indexify (best->buffer, ostream);
+ prev_out = best;
+
+ /* Now make the line the previous of its file, and fetch a new
+ line from that file. */
+
+ exch = prevline[bestfile];
+ prevline[bestfile] = thisline[bestfile];
+ thisline[bestfile] = exch;
+
+ while (1)
+ {
+ /* If the file has no more, mark it empty. */
+
+ if (feof (streams[bestfile]))
+ {
+ thisline[bestfile] = 0;
+ /* Update the number of files still not empty. */
+ nleft--;
+ break;
+ }
+ readline (thisline[bestfile], streams[bestfile]);
+ if (thisline[bestfile]->buffer[0] || !feof (streams[bestfile]))
+ break;
+ }
+ }
+
+ finish_index (ostream);
+
+ /* Free all storage and close all input streams. */
+
+ for (i = 0; i < nfiles; i++)
+ {
+ fclose (streams[i]);
+ free (lb1[i].buffer);
+ free (lb2[i].buffer);
+ }
+ free (file_lossage);
+ free (lb1);
+ free (lb2);
+ free (thisline);
+ free (prevline);
+ free (streams);
+
+ if (outfile)
+ fclose (ostream);
+
+ return lossage;
+}
+
+/* Print error message and exit. */
+
+void
+fatal (s1, s2)
+ char *s1, *s2;
+{
+ error (s1, s2);
+ exit (TI_FATAL_ERROR);
+}
+
+/* Print error message. S1 is printf control string, S2 is arg for it. */
+
+void
+error (s1, s2)
+ char *s1, *s2;
+{
+ printf ("%s: ", program_name);
+ printf (s1, s2);
+ printf ("\n");
+}
+
+void
+perror_with_name (name)
+ char *name;
+{
+ char *s;
+
+ if (errno < sys_nerr)
+ s = concat ("", sys_errlist[errno], " for %s");
+ else
+ s = "cannot open %s";
+ error (s, name);
+}
+
+void
+pfatal_with_name (name)
+ char *name;
+{
+ char *s;
+
+ if (errno < sys_nerr)
+ s = concat ("", sys_errlist[errno], " for %s");
+ else
+ s = "cannot open %s";
+ fatal (s, name);
+}
+
+/* Return a newly-allocated string whose contents concatenate those of
+ S1, S2, S3. */
+
+char *
+concat (s1, s2, s3)
+ char *s1, *s2, *s3;
+{
+ int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+ char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
+
+ strcpy (result, s1);
+ strcpy (result + len1, s2);
+ strcpy (result + len1 + len2, s3);
+ *(result + len1 + len2 + len3) = 0;
+
+ return result;
+}
+
+/* Just like malloc, but kills the program in case of fatal error. */
+void *
+xmalloc (nbytes)
+ int nbytes;
+{
+ void *temp = (void *) malloc (nbytes);
+
+ if (nbytes && temp == (void *)NULL)
+ memory_error ("xmalloc", nbytes);
+
+ return (temp);
+}
+
+/* Like realloc (), but barfs if there isn't enough memory. */
+void *
+xrealloc (pointer, nbytes)
+ void *pointer;
+ int nbytes;
+{
+ void *temp;
+
+ if (!pointer)
+ temp = (void *)xmalloc (nbytes);
+ else
+ temp = (void *)realloc (pointer, nbytes);
+
+ if (nbytes && !temp)
+ memory_error ("xrealloc", nbytes);
+
+ return (temp);
+}
+
+memory_error (callers_name, bytes_wanted)
+ char *callers_name;
+ int bytes_wanted;
+{
+ char printable_string[80];
+
+ sprintf (printable_string,
+ "Virtual memory exhausted in %s ()! Needed %d bytes.",
+ callers_name, bytes_wanted);
+
+ error (printable_string);
+ abort ();
+}
+
+#ifndef STDC_HEADERS
+void
+bzero (b, length)
+ register char *b;
+ register int length;
+{
+#ifdef VMS
+ short zero = 0;
+ long max_str = 65535;
+
+ while (length > max_str)
+ {
+ (void) LIB$MOVC5 (&zero, &zero, &zero, &max_str, b);
+ length -= max_str;
+ b += max_str;
+ }
+ (void) LIB$MOVC5 (&zero, &zero, &zero, &length, b);
+#else
+ while (length-- > 0)
+ *b++ = 0;
+#endif /* not VMS */
+}
+#endif /* not STDC_HEADERS */
diff --git a/Master/texmf-dist/doc/texdraw/txdexamp.latex b/Master/texmf-dist/doc/texdraw/txdexamp.latex
new file mode 100644
index 00000000000..c3ea8b4eee9
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/txdexamp.latex
@@ -0,0 +1,514 @@
+% TeXdraw examples for latex
+
+% $Id: txdexamp.latex,v 2.0 1995/12/18 texdraw-V2R0 $
+
+% These examples are taken from the TeXdraw manual.
+
+% Peter Kabal
+% Department of Electrical Engineering
+% McGill University
+% 3480 University
+% Montreal, Quebec
+% Canada H3A 2A7
+
+% kabal@TSP.EE.McGill.CA
+
+\documentclass [11pt]{article}
+\usepackage {texdraw}
+
+\input txdtools
+\let\et=\etexdraw
+\def\etexdraw{\drawbb\et}
+
+\begin{document}
+
+\noindent
+TeXdraw examples using LaTeX.
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+ \avec (0 0.8) \textref h:C v:B \htext (0 0.9){\sl y}
+ \move (0 0) \avec (0.8 0) \textref h:L v:C \htext(0.9 0){\sl x}
+ \move (0 1.0)
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+ \drawdim{cm} \linewd 0.02
+ \move(2 2) \lvec(3 3) \lvec(2 4) \lvec(1 3) \lvec(2 2)
+ \textref h:C v:C \htext(2 3){$\sum \rho_n$}
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+ \drawdim in
+ \linewd 0.03 \setgray 0.6 \arrowheadtype t:F \avec(0.5 0.5)
+ \linewd 0.01 \setgray 0 \arrowheadtype t:V \avec(1.0 0.5)
+ \linewd 0.015 \lpatt(0.067 0.1) \lvec (1.5 0)
+ \linewd 0.02 \lpatt() \arrowheadtype t:T \avec(2.0 0.5)
+ \arrowheadtype t:H \avec(2.5 0.5)
+ \setgray 0.4 \arrowheadtype t:W \avec(3.0 0)
+ \textref h:R v:T \htext (0.35 0.50){\tt t:F}
+ \textref h:R v:T \htext (1.0 0.43){\tt t:V}
+ \textref h:R v:T \htext (1.82 0.50){\tt t:T}
+ \textref h:R v:T \htext (2.5 0.43){\tt t:H}
+ \textref h:R v:B \htext (2.8 0){\tt t:W}
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+ \newcommand{\bdot}{\bsegment
+ \fcir f:0 r:0.02
+ \esegment}
+ \newcommand{\Ttext}[1]{\bsegment
+ \textref h:C v:B \htext (0 +0.06){#1}
+ \esegment}
+ \newcommand{\Btext}[1]{\bsegment
+ \textref h:C v:T \htext (0 -0.06){#1}
+ \esegment}
+ \newcommand{\Ltext}[1]{\bsegment
+ \textref h:R v:C \htext (-0.08 0){#1}
+ \esegment}
+ \newcommand{\Rtext}[1]{\bsegment
+ \textref h:L v:C \htext (+0.08 0){#1}
+ \esegment}
+ \move (-1.5 0)
+ \bsegment
+ \move (+1.55 +0.45) \move (-1.55 -0.45) \move (0 0)
+ \Ttext{Horizontal Text}
+ \bdot \Btext{\tt h:C v:C}
+ \move (-0.9 0) \bdot \Ltext{\tt h:L v:C}
+ \move (+0.9 0) \bdot \Rtext{\tt h:R v:C}
+ \move (0 +0.3) \bdot \Ttext{\tt h:C v:T}
+ \move (0 -0.3) \bdot \Btext{\tt h:C v:B}
+ \move (-0.9 -0.3) \bdot \Ltext{\tt h:L v:B}
+ \lvec (-0.9 +0.3) \bdot \Ltext{\tt h:L v:T}
+ \lvec (+0.9 +0.3) \bdot \Rtext{\tt h:R v:T}
+ \lvec (+0.9 -0.3) \bdot \Rtext{\tt h:R v:B}
+ \lvec (-0.9 -0.3)
+ \esegment
+ \newcommand{\atext}{\rtext td:45 }
+ \newcommand{\ATtext}[1]{\bsegment
+ \setsegscale 0.707
+ \textref h:C v:B \atext (-0.06 +0.06){#1}
+ \esegment}
+ \newcommand{\ABtext}[1]{\bsegment
+ \setsegscale 0.707
+ \textref h:C v:T \atext (+0.060 -0.06){#1}
+ \esegment}
+ \newcommand{\ALtext}[1]{\bsegment
+ \setsegscale 0.707
+ \textref h:R v:C \atext (-0.08 -0.08){#1}
+ \esegment}
+ \newcommand{\ARtext}[1]{\bsegment
+ \setsegscale 0.707
+ \textref h:L v:C \atext (+0.08 +0.08){#1}
+ \esegment}
+ \move (+1.5 0)
+ \bsegment
+ \move (+1.33 +1.33) \move (-1.33 -1.33) \move (0 0)
+ \setsegscale 0.707
+ \ATtext{Rotated Text}
+ \bdot \ABtext{\tt h:C v:C}
+ \move (-0.9 -0.9) \bdot \ALtext{\tt h:L v:C}
+ \move (+0.9 +0.9) \bdot \ARtext{\tt h:R v:C}
+ \move (-0.3 +0.3) \bdot \ATtext{\tt h:C v:T}
+ \move (+0.3 -0.3) \bdot \ABtext{\tt h:C v:B}
+ \move (-0.6 -1.2) \bdot \ALtext{\tt h:L v:B}
+ \lvec (-1.2 -0.6) \bdot \ALtext{\tt h:L v:T}
+ \lvec (+0.6 +1.2) \bdot \ARtext{\tt h:R v:T}
+ \lvec (+1.2 +0.6) \bdot \ARtext{\tt h:R v:B}
+ \lvec (-0.6 -1.2)
+ \esegment
+\end{texdraw}
+\end{center}
+
+\vfill
+\newpage
+
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+ \move(-0.75 -0.25) \lvec (-0.75 +0.5) \lvec (+0.75 +0.5)
+ \lvec(+0.75 -0.25) \ifill f:0.9 % fill the region
+ \move(0 0)
+ \avec(-0.75 -0.25) \textref h:R v:C \htext{H-text}
+ \move(0 0) \avec(-0.75 +0.25) \textref h:R v:B \htext{H-text}
+ \move(0 0) \avec(0 +0.5) \textref h:L v:T \vtext{V-text}
+ \move(0 0) \avec(+0.75 +0.25) \textref h:L v:B \htext{H-text}
+ \move(0 0) \avec(+0.75 -0.25) \textref h:L v:C \htext{H-text}
+ \move (-1.15 -0.3) \move (+1.15 +0.92) % increase the size of the drawing
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+ \linewd 0.02
+ \fcir f:0.7 r:1
+ \larc r:1 sd:45 ed:135
+ \lvec ( 0.707 0.707) \move (0 0) \lvec (-0.707 +0.707)
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+ \newcommand{\Ltext}[1]{\bsegment
+ \textref h:R v:C \htext (-0.08 0){#1}
+ \esegment}
+ \newcommand{\Rtext}[1]{\bsegment
+ \textref h:L v:C \htext (+0.08 0){#1}
+ \esegment}
+ \newcommand{\bdot}{\fcir f:0 r:0.02 }
+ \newcommand{\Ldot}[1]{\bdot \Ltext{#1}}
+ \newcommand{\Rdot}[1]{\bdot \Rtext{#1}}
+ \move (-2 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1}
+ \lvec (1 1) \Rdot{2} \lvec (1 0) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0 1)(1 1)(1 0)
+ \esegment
+ \move (0 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0.5 0.8) \Ldot{1}
+ \lvec (1.5 0.8) \Rdot{2} \lvec (1 0) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0.5 1)(1.5 1)(1 0)
+ \esegment
+ \move ( 2 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1}
+ \lvec (1 0) \Rdot{2} \lvec (1 1) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0 1)(1 0)(1 1)
+ \esegment
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+\move (0.5 0)
+\lvec (0 0.5) \clvec (0.5 0.85)(1 0.65)(1.5 1)
+\lvec (2 0.5) \clvec (1.5 0.15)(1 0.35)(0.5 0)
+\lfill f:0.8
+\end{texdraw}
+\end{center}
+
+\vfill
+\newpage
+
+
+\bigskip
+\newcommand{\tbox}[1]{\bsegment
+ \lvec (0 +0.25) \lvec (0.75 +0.25)
+ \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
+ \textref h:C v:C \htext (0.375 0){#1}
+ \savepos (0.75 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\begin{center}
+\begin{texdraw}
+ \ravec (1 0) \tbox{$H(z)$} \ravec (1 0)
+\end{texdraw}
+\end{center}
+
+\bigskip
+\def\cavec (#1 #2)(#3 #4)(#5 #6){
+ \clvec (#1 #2)(#3 #4)(#5 #6)
+ \cossin (#3 #4)(#5 #6)\cosa\sina
+ \rmove (0 0) % stroke the Bezier curve
+ \bsegment
+ \drawdim in \setsegscale 0.05
+ \move ({-\cosa} -\sina) \avec (0 0)
+ \esegment}
+
+\def\caw (#1 #2){
+ \currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+
+% The nominal wiggly curve is (0 0) (1+dx dy) (-dx -dy) (1 0)
+% Find the rotated offset (dx dy) -> (du dv)
+ \rotatecoord (0.4 0.1)\cosa\sina \du\dv
+
+% calculate the length of the vector
+ \vectlen ({\xa} \ya)(#1 #2)\len
+
+% draw the curve in normalized units
+ \bsegment
+ \setsegscale {\len}
+ \realadd \cosa \du \tmpa \realadd \sina \dv \tmpb
+ \cavec ({\tmpa} \tmpb)({-\du} -\dv)({\cosa} \sina)
+ \esegment
+
+ \move (#1 #2)}
+
+% rotate a coordinate (x y)
+% arguments: (x y) cosa sina x' y'
+% x' = cosa * x - sina * y; y' = sina * x + cosa * y
+\def\rotatecoord (#1 #2)#3#4#5#6{
+ \getpos (#1 #2)\xarg\yarg
+ \realmult \xarg {#3} \tmpa \realmult \yarg {#4} \tmpb
+ \realadd \tmpa {-\tmpb} #5
+ \realmult \xarg {#4} \tmpa \realmult \yarg {#3} \tmpb
+ \realadd \tmpa \tmpb #6}
+
+\begin{center}
+\begin{texdraw}
+ \arrowheadtype t:W
+ \move (0 0)
+ \cavec (1.4 0.1)(-0.4 -0.1)(1 0)
+ \move (1 0) \caw (1 1) \htext{tip at \tt (1 1)}
+ \move (1 0) \caw (2 1) \htext{tip at \tt (2 1)}
+ \move (1 0) \caw (2 0) \htext{tip at \tt (2 0)}
+ \move (0 1.13) \move (0 -0.04)
+\end{texdraw}
+\end{center}
+
+\vfill
+\newpage
+
+
+\bigskip
+\def\delay {\bsegment
+ \setsegscale 0.3
+ \lvec (0 +0.5) \lvec (1 +0.5) \lvec (1 -0.5)
+ \lvec (0 -0.5) \lvec (0 0)
+ \textref h:C v:C \htext (0.5 0){$z^{-1}$}
+ \savepos (1 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\def\bdot {\fcir f:0 r:0.02 }
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 +0.06){#1}
+ \esegment}
+\def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.06){#1}
+ \esegment}
+\def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.06 0){#1}
+ \esegment}
+\def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.06 0){#1}
+ \esegment}
+\def\cradius {0.08}
+\def\pluss {\bsegment
+ \setsegscale {\cradius}
+ \move (-0.5 0) \lvec (+0.5 0)
+ \move (0 -0.5) \lvec (0 +0.5)
+ \esegment}
+\def\pcir {\lcir r:{\cradius} \pluss}
+\def\puttext (#1 #2)#3{\bsegment
+ \setsegscale {\cradius}
+ \textref h:C v:C \htext (#1 #2){#3}
+ \esegment}
+\def\putwnw #1{\puttext (-1.7 +1.2){#1}}
+\def\putwsw #1{\puttext (-1.7 -1.2){#1}}
+\def\putn #1{\puttext ( 0 +2 ){#1}}
+\def\puts #1{\puttext ( 0 -2 ){#1}}
+\def\avectoc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \savepos (#1 #2)(*tx *ty)
+ \bsegment
+ \move (*tx *ty)
+ \setsegscale {\cradius}
+ \rmove ({-\cosa} -\sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \avec (*ex *ey)
+ \move (#1 #2)}
+\def\avecfrc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \bsegment
+ \setsegscale {\cradius}
+ \move ({\cosa} \sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \move (*ex *ey)
+ \avec (#1 #2)}
+
+\begin{center}
+\begin{texdraw}
+\drawdim in
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$}
+
+\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for the text size
+
+% Input to the first stage
+\bsegment
+ \Ltext{$x(n)$}
+ \lvec (0.3 0) \bdot \lvec (0.3 +0.4)
+ \move (0.3 0) \lvec (0.3 -0.4)
+ \savepos (0.3 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% first lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.1 +0.4)
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_0(n)$}
+ \move (2.0 +0.42) \Ttext {$f_1(n)$}
+ \move (0.1 -0.4) \Btext {$b_0(n)$}
+ \move (2.0 -0.4) \Btext {$b_1(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_1$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_1$}
+ \savepos (2.1 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% center section
+\bsegment
+ \textref h:C v:C
+ \htext (0.3 +0.4){$\cdots$}
+ \htext (0.3 -0.4){$\cdots$}
+ \savepos (0.6 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% last lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.3 +0.4) \Rtext{$e(n)$}
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_{P-1}(n)$}
+ \move (2.0 +0.42) \Ttext {$f_P(n)$}
+ \move (0.1 -0.4) \Btext {$b_{P-1}(n)$}
+ \move (2.0 -0.4) \Btext {$b_P(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_P$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_P$}
+\esegment
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\ds {\displaystyle}
+\def\ticklab (#1 #2)#3{\move(#1 #2)
+ \bsegment
+ \lvec (0 0.05)
+ \textref h:C v:T \htext (0 -0.05){#3}
+ \esegment}
+\def\Rtext #1{\bsegment
+ \textref h:L v:C \htext ( 0.08 0){#1}
+ \esegment}
+
+\move (2.4 -0.32) % move to set the size
+
+\move (0 0)
+% Axes
+\avec (0 1.4)
+\move (0 0) \avec (2.2 0) \Rtext{$\omega$}
+\ticklab (0 0) {0}
+\ticklab (0.8 0) {$\ds {\pi \over 2N} $}
+\ticklab (1.2 0) {$\omega_s$}
+\ticklab (1.6 0) {$\ds {\pi \over N} $}
+
+\linewd 0.025
+\move (0 1)
+\lvec (0.4 1)
+\lvec (0.44 0.998)
+\lvec (0.48 0.988)
+\lvec (0.52 0.973)
+\lvec (0.56 0.951)
+\lvec (0.60 0.923)
+\lvec (0.64 0.891)
+\lvec (0.68 0.852)
+\lvec (0.72 0.809)
+\lvec (0.76 0.760)
+\lvec (0.80 0.707)
+\lvec (0.84 0.649)
+\lvec (0.88 0.587)
+\lvec (0.92 0.522)
+\lvec (0.96 0.454)
+\lvec (1.00 0.382)
+\lvec (1.04 0.309)
+\lvec (1.08 0.233)
+\lvec (1.12 0.156)
+\lvec (1.16 0.078)
+\lvec (1.20 0)
+\lvec (1.9 0)
+\end{texdraw}
+\end{center}
+
+\bigskip
+\begin{center}
+\begin{texdraw}
+\arrowheadtype t:V \arrowheadsize l:0.08 w:0.04
+\linewd 0.01
+\setunitscale 1.5 % circle will have radius 1.5 inches
+
+\def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.04){#1}
+ \esegment}
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 0.04){#1}
+ \esegment}
+\def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.04 0){#1}
+ \esegment}
+\def\bdot {\fcir f:0 r:0.0133 }
+\def\vtick {\bsegment
+ \move (0 -0.05) \lvec (0 0.05)
+ \esegment}
+\def\htick {\bsegment
+ \move (-0.05 0) \lvec ( 0.05 0)
+ \esegment}
+\def\Hlen #1#2{\bsegment
+ \vtick \avec ({#1} 0) \vtick \avec (0 0)
+ \relsegscale 0.5
+ \move ({#1} 0) \Ttext {#2}
+ \esegment}
+\def\Vlen #1#2{\bsegment
+ \htick \avec (0 {#1}) \htick \avec (0 0)
+ \relsegscale 0.5
+ \move (0 {#1}) \Ltext {#2}
+ \esegment}
+
+\lcir r:1 % circle
+\move (-1.05 0) \lvec ( 1.05 0) % axes
+\move (0 -1.05) \lvec (0 1.05)
+
+\move (0 0) \lvec (0.707 0.707) \bdot
+\rmove (0.02 0.02) \textref h:L v:B \htext {X}
+\move (0.707 -0.707) \bdot
+\textref h:R v:T \htext(-0.02 -0.02){O}
+
+\move (0.5 0) % center of ellipse
+\bsegment
+ \lellip rx:0.435 ry:0.804
+ \bdot \Btext {$\beta_2$}
+ \move (0 0.15) \Hlen {0.435}{$|\beta_1{+}\beta_3|$}
+ \move (-0.7 0) \Vlen {0.804}{$|\beta_1{-}\beta_3|$}
+\esegment
+\end{texdraw}
+\end{center}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/texdraw/txdexamp.tex b/Master/texmf-dist/doc/texdraw/txdexamp.tex
new file mode 100644
index 00000000000..371b0e64969
--- /dev/null
+++ b/Master/texmf-dist/doc/texdraw/txdexamp.tex
@@ -0,0 +1,485 @@
+% TeXdraw examples
+
+% $Id: txdexamp.tex,v 2.0 1995/12/18 texdraw-V2R0 $
+
+% These examples are taken from the TeXdraw manual. Note that the fonts
+% for text will be different from those in the manual -- here we use the
+% plain TeX defaults.
+
+% Peter Kabal
+% Department of Electrical Engineering
+% McGill University
+% 3480 University
+% Montreal, Quebec
+% Canada H3A 2A7
+
+% kabal@TSP.EE.McGill.CA
+
+\input texdraw
+\input txdtools
+\let\et=\etexdraw
+\def\etexdraw{\drawbb\et}
+
+\noindent
+TeXdraw examples using plain TeX.
+
+\bigskip
+\centertexdraw{
+ \avec (0 0.8) \textref h:C v:B \htext (0 0.9){\sl y}
+ \move (0 0) \avec (0.8 0) \textref h:L v:C \htext(0.9 0){\sl x}
+ \move (0 1.0)}
+
+\bigskip
+\centertexdraw{
+ \drawdim{cm} \linewd 0.02
+ \move(2 2) \lvec(3 3) \lvec(2 4) \lvec(1 3) \lvec(2 2)
+ \textref h:C v:C \htext(2 3){$\sum \rho_n$}
+}
+
+\bigskip
+\centertexdraw{
+ \drawdim in
+ \linewd 0.03 \setgray 0.6 \arrowheadtype t:F \avec(0.5 0.5)
+ \linewd 0.01 \setgray 0 \arrowheadtype t:V \avec(1.0 0.5)
+ \linewd 0.015 \lpatt(0.067 0.1) \lvec (1.5 0)
+ \linewd 0.02 \lpatt() \arrowheadtype t:T \avec(2.0 0.5)
+ \arrowheadtype t:H \avec(2.5 0.5)
+ \setgray 0.4 \arrowheadtype t:W \avec(3.0 0)
+ \textref h:R v:T \htext (0.35 0.50){\tt t:F}
+ \textref h:R v:T \htext (1.0 0.43){\tt t:V}
+ \textref h:R v:T \htext (1.82 0.50){\tt t:T}
+ \textref h:R v:T \htext (2.5 0.43){\tt t:H}
+ \textref h:R v:B \htext (2.8 0){\tt t:W}
+}
+
+\bigskip
+\centertexdraw{
+ \def\bdot {\bsegment
+ \fcir f:0 r:0.02
+ \esegment}
+ \def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 +0.06){#1}
+ \esegment}
+ \def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.06){#1}
+ \esegment}
+ \def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.08 0){#1}
+ \esegment}
+ \def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.08 0){#1}
+ \esegment}
+ \move (-1.5 0)
+ \bsegment
+ \move (+1.55 +0.45) \move (-1.55 -0.45) \move (0 0)
+ \Ttext{Horizontal Text}
+ \bdot \Btext{\tt h:C v:C}
+ \move (-0.9 0) \bdot \Ltext{\tt h:L v:C}
+ \move (+0.9 0) \bdot \Rtext{\tt h:R v:C}
+ \move (0 +0.3) \bdot \Ttext{\tt h:C v:T}
+ \move (0 -0.3) \bdot \Btext{\tt h:C v:B}
+ \move (-0.9 -0.3) \bdot \Ltext{\tt h:L v:B}
+ \lvec (-0.9 +0.3) \bdot \Ltext{\tt h:L v:T}
+ \lvec (+0.9 +0.3) \bdot \Rtext{\tt h:R v:T}
+ \lvec (+0.9 -0.3) \bdot \Rtext{\tt h:R v:B}
+ \lvec (-0.9 -0.3)
+ \esegment
+ \def\atext {\rtext td:45 }
+ \def\ATtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:C v:B \atext (-0.06 +0.06){#1}
+ \esegment}
+ \def\ABtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:C v:T \atext (+0.060 -0.06){#1}
+ \esegment}
+ \def\ALtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:R v:C \atext (-0.08 -0.08){#1}
+ \esegment}
+ \def\ARtext #1{\bsegment
+ \setsegscale 0.707
+ \textref h:L v:C \atext (+0.08 +0.08){#1}
+ \esegment}
+ \move (+1.5 0)
+ \bsegment
+ \move (+1.33 +1.33) \move (-1.33 -1.33) \move (0 0)
+ \setsegscale 0.707
+ \ATtext{Rotated Text}
+ \bdot \ABtext{\tt h:C v:C}
+ \move (-0.9 -0.9) \bdot \ALtext{\tt h:L v:C}
+ \move (+0.9 +0.9) \bdot \ARtext{\tt h:R v:C}
+ \move (-0.3 +0.3) \bdot \ATtext{\tt h:C v:T}
+ \move (+0.3 -0.3) \bdot \ABtext{\tt h:C v:B}
+ \move (-0.6 -1.2) \bdot \ALtext{\tt h:L v:B}
+ \lvec (-1.2 -0.6) \bdot \ALtext{\tt h:L v:T}
+ \lvec (+0.6 +1.2) \bdot \ARtext{\tt h:R v:T}
+ \lvec (+1.2 +0.6) \bdot \ARtext{\tt h:R v:B}
+ \lvec (-0.6 -1.2)
+ \esegment
+}
+
+\vfill
+\eject
+
+
+\bigskip
+\centertexdraw{
+ \move(-0.75 -0.25) \lvec (-0.75 +0.5) \lvec (+0.75 +0.5)
+ \lvec(+0.75 -0.25) \ifill f:0.9 % fill the region
+ \move(0 0)
+ \avec(-0.75 -0.25) \textref h:R v:C \htext{H-text}
+ \move(0 0) \avec(-0.75 +0.25) \textref h:R v:B \htext{H-text}
+ \move(0 0) \avec(0 +0.5) \textref h:L v:T \vtext{V-text}
+ \move(0 0) \avec(+0.75 +0.25) \textref h:L v:B \htext{H-text}
+ \move(0 0) \avec(+0.75 -0.25) \textref h:L v:C \htext{H-text}
+ \move (-1.15 -0.3) \move (+1.15 +0.92) % increase the size of the drawing
+}
+
+\bigskip
+\centertexdraw{
+ \linewd 0.02
+ \fcir f:0.7 r:1
+ \larc r:1 sd:45 ed:135
+ \lvec ( 0.707 0.707) \move (0 0) \lvec (-0.707 +0.707)
+}
+
+\bigskip
+\centertexdraw{
+ \def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.08 0){#1}
+ \esegment}
+ \def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.08 0){#1}
+ \esegment}
+ \def\bdot {\fcir f:0 r:0.02 }
+ \def\Ldot #1{\bdot \Ltext{#1}}
+ \def\Rdot #1{\bdot \Rtext{#1}}
+ \move (-2 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1}
+ \lvec (1 1) \Rdot{2} \lvec (1 0) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0 1)(1 1)(1 0)
+ \esegment
+ \move (0 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0.5 0.8) \Ldot{1}
+ \lvec (1.5 0.8) \Rdot{2} \lvec (1 0) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0.5 1)(1.5 1)(1 0)
+ \esegment
+ \move ( 2 0)
+ \bsegment
+ \lpatt (0.033)
+ \move (0 0) \Ldot{0} \lvec (0 1) \Ldot{1}
+ \lvec (1 0) \Rdot{2} \lvec (1 1) \Rdot{3}
+ \lpatt ()
+ \move (0 0) \clvec (0 1)(1 0)(1 1)
+ \esegment
+}
+
+\bigskip
+\centertexdraw{
+\move (0.5 0)
+\lvec (0 0.5) \clvec (0.5 0.85)(1 0.65)(1.5 1)
+\lvec (2 0.5) \clvec (1.5 0.15)(1 0.35)(0.5 0)
+\lfill f:0.8
+}
+
+\vfill
+\eject
+
+
+\bigskip
+\def\tbox #1{\bsegment
+ \lvec (0 +0.25) \lvec (0.75 +0.25)
+ \lvec (0.75 -0.25) \lvec (0 -0.25) \lvec (0 0)
+ \textref h:C v:C \htext (0.375 0){#1}
+ \savepos (0.75 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\centertexdraw{
+ \ravec (1 0) \tbox{$H(z)$} \ravec (1 0)
+}
+
+\bigskip
+\def\cavec (#1 #2)(#3 #4)(#5 #6){
+ \clvec (#1 #2)(#3 #4)(#5 #6)
+ \cossin (#3 #4)(#5 #6)\cosa\sina
+ \rmove (0 0) % stroke the Bezier curve
+ \bsegment
+ \drawdim in \setsegscale 0.05
+ \move ({-\cosa} -\sina) \avec (0 0)
+ \esegment}
+
+\def\caw (#1 #2){
+ \currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+
+% The nominal wiggly curve is (0 0) (1+dx dy) (-dx -dy) (1 0)
+% Find the rotated offset (dx dy) -> (du dv)
+ \rotatecoord (0.4 0.1)\cosa\sina \du\dv
+
+% calculate the length of the vector
+ \vectlen ({\xa} \ya)(#1 #2)\len
+
+% draw the curve in normalized units
+ \bsegment
+ \setsegscale {\len}
+ \realadd \cosa \du \tmpa \realadd \sina \dv \tmpb
+ \cavec ({\tmpa} \tmpb)({-\du} -\dv)({\cosa} \sina)
+ \esegment
+
+ \move (#1 #2)}
+
+% rotate a coordinate (x y)
+% arguments: (x y) cosa sina x' y'
+% x' = cosa * x - sina * y; y' = sina * x + cosa * y
+\def\rotatecoord (#1 #2)#3#4#5#6{
+ \getpos (#1 #2)\xarg\yarg
+ \realmult \xarg {#3} \tmpa \realmult \yarg {#4} \tmpb
+ \realadd \tmpa {-\tmpb} #5
+ \realmult \xarg {#4} \tmpa \realmult \yarg {#3} \tmpb
+ \realadd \tmpa \tmpb #6}
+
+\centertexdraw{
+ \arrowheadtype t:W
+ \move (0 0)
+ \cavec (1.4 0.1)(-0.4 -0.1)(1 0)
+ \move (1 0) \caw (1 1) \htext{tip at \tt (1 1)}
+ \move (1 0) \caw (2 1) \htext{tip at \tt (2 1)}
+ \move (1 0) \caw (2 0) \htext{tip at \tt (2 0)}
+ \move (0 1.13) \move (0 -0.04)
+}
+
+\vfill
+\eject
+
+
+\bigskip
+\def\delay {\bsegment
+ \setsegscale 0.3
+ \lvec (0 +0.5) \lvec (1 +0.5) \lvec (1 -0.5)
+ \lvec (0 -0.5) \lvec (0 0)
+ \textref h:C v:C \htext (0.5 0){$z^{-1}$}
+ \savepos (1 0)(*ex *ey)
+ \esegment
+ \move (*ex *ey)}
+\def\bdot {\fcir f:0 r:0.02 }
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 +0.06){#1}
+ \esegment}
+\def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.06){#1}
+ \esegment}
+\def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.06 0){#1}
+ \esegment}
+\def\Rtext #1{\bsegment
+ \textref h:L v:C \htext (+0.06 0){#1}
+ \esegment}
+\def\cradius {0.08}
+\def\pluss {\bsegment
+ \setsegscale {\cradius}
+ \move (-0.5 0) \lvec (+0.5 0)
+ \move (0 -0.5) \lvec (0 +0.5)
+ \esegment}
+\def\pcir {\lcir r:{\cradius} \pluss}
+\def\puttext (#1 #2)#3{\bsegment
+ \setsegscale {\cradius}
+ \textref h:C v:C \htext (#1 #2){#3}
+ \esegment}
+\def\putwnw #1{\puttext (-1.7 +1.2){#1}}
+\def\putwsw #1{\puttext (-1.7 -1.2){#1}}
+\def\putn #1{\puttext ( 0 +2 ){#1}}
+\def\puts #1{\puttext ( 0 -2 ){#1}}
+\def\avectoc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \savepos (#1 #2)(*tx *ty)
+ \bsegment
+ \move (*tx *ty)
+ \setsegscale {\cradius}
+ \rmove ({-\cosa} -\sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \avec (*ex *ey)
+ \move (#1 #2)}
+\def\avecfrc (#1 #2){\currentpos \xa\ya
+ \cossin ({\xa} \ya)(#1 #2)\cosa\sina
+ \bsegment
+ \setsegscale {\cradius}
+ \move ({\cosa} \sina)
+ \savecurrpos (*ex *ey)
+ \esegment
+ \move (*ex *ey)
+ \avec (#1 #2)}
+
+\centertexdraw{
+\drawdim in
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\pl {$\scriptscriptstyle +$} \def\mn {$\scriptscriptstyle -$}
+
+\move (0 +0.63) \move (0 -0.60) \move (0 0) % compensate for the text size
+
+% Input to the first stage
+\bsegment
+ \Ltext{$x(n)$}
+ \lvec (0.3 0) \bdot \lvec (0.3 +0.4)
+ \move (0.3 0) \lvec (0.3 -0.4)
+ \savepos (0.3 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% first lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.1 +0.4)
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_0(n)$}
+ \move (2.0 +0.42) \Ttext {$f_1(n)$}
+ \move (0.1 -0.4) \Btext {$b_0(n)$}
+ \move (2.0 -0.4) \Btext {$b_1(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_1$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_1$}
+ \savepos (2.1 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% center section
+\bsegment
+ \textref h:C v:C
+ \htext (0.3 +0.4){$\cdots$}
+ \htext (0.3 -0.4){$\cdots$}
+ \savepos (0.6 0)(*ex *ey)
+\esegment
+\move (*ex *ey)
+
+% last lattice stage
+\bsegment
+ \move (0 +0.4) \avectoc (1.7 +0.4)
+ \pcir \putwnw{\pl} \puts{\mn}
+ \avecfrc (2.3 +0.4) \Rtext{$e(n)$}
+ \move (0 -0.4) \avec (0.4 -0.4) \delay \avectoc (1.7 -0.4)
+ \pcir \putwsw{\pl} \putn{\mn}
+ \avecfrc (2.1 -0.4)
+ \move (0.9 +0.4) \bdot \avectoc (1.7 -0.4)
+ \move (0.9 -0.4) \bdot \avectoc (1.7 +0.4)
+ \move (0.1 +0.42) \Ttext {$f_{P-1}(n)$}
+ \move (2.0 +0.42) \Ttext {$f_P(n)$}
+ \move (0.1 -0.4) \Btext {$b_{P-1}(n)$}
+ \move (2.0 -0.4) \Btext {$b_P(n)$}
+ \textref h:L v:B \htext (1.15 +0.2){$K_P$}
+ \textref h:L v:T \htext (1.15 -0.2){$K_P$}
+\esegment
+}
+
+\bigskip
+\centertexdraw{
+\arrowheadtype t:F \arrowheadsize l:0.08 w:0.04
+\def\ds {\displaystyle}
+\def\ticklab (#1 #2)#3{\move(#1 #2)
+ \bsegment
+ \lvec (0 0.05)
+ \textref h:C v:T \htext (0 -0.05){#3}
+ \esegment}
+\def\Rtext #1{\bsegment
+ \textref h:L v:C \htext ( 0.08 0){#1}
+ \esegment}
+
+\move (2.4 -0.32) % move to set the size
+
+\move (0 0)
+% Axes
+\avec (0 1.4)
+\move (0 0) \avec (2.2 0) \Rtext{$\omega$}
+\ticklab (0 0) {0}
+\ticklab (0.8 0) {$\ds {\pi \over 2N} $}
+\ticklab (1.2 0) {$\omega_s$}
+\ticklab (1.6 0) {$\ds {\pi \over N} $}
+
+\linewd 0.025
+\move (0 1)
+\lvec (0.4 1)
+\lvec (0.44 0.998)
+\lvec (0.48 0.988)
+\lvec (0.52 0.973)
+\lvec (0.56 0.951)
+\lvec (0.60 0.923)
+\lvec (0.64 0.891)
+\lvec (0.68 0.852)
+\lvec (0.72 0.809)
+\lvec (0.76 0.760)
+\lvec (0.80 0.707)
+\lvec (0.84 0.649)
+\lvec (0.88 0.587)
+\lvec (0.92 0.522)
+\lvec (0.96 0.454)
+\lvec (1.00 0.382)
+\lvec (1.04 0.309)
+\lvec (1.08 0.233)
+\lvec (1.12 0.156)
+\lvec (1.16 0.078)
+\lvec (1.20 0)
+\lvec (1.9 0)
+}
+
+\bigskip
+\centertexdraw{
+\arrowheadtype t:V \arrowheadsize l:0.08 w:0.04
+\linewd 0.01
+\setunitscale 1.5 % circle will have radius 1.5 inches
+
+\def\Btext #1{\bsegment
+ \textref h:C v:T \htext (0 -0.04){#1}
+ \esegment}
+\def\Ttext #1{\bsegment
+ \textref h:C v:B \htext (0 0.04){#1}
+ \esegment}
+\def\Ltext #1{\bsegment
+ \textref h:R v:C \htext (-0.04 0){#1}
+ \esegment}
+\def\bdot {\fcir f:0 r:0.0133 }
+\def\vtick {\bsegment
+ \move (0 -0.05) \lvec (0 0.05)
+ \esegment}
+\def\htick {\bsegment
+ \move (-0.05 0) \lvec ( 0.05 0)
+ \esegment}
+\def\Hlen #1#2{\bsegment
+ \vtick \avec ({#1} 0) \vtick \avec (0 0)
+ \relsegscale 0.5
+ \move ({#1} 0) \Ttext {#2}
+ \esegment}
+\def\Vlen #1#2{\bsegment
+ \htick \avec (0 {#1}) \htick \avec (0 0)
+ \relsegscale 0.5
+ \move (0 {#1}) \Ltext {#2}
+ \esegment}
+
+\lcir r:1 % circle
+\move (-1.05 0) \lvec ( 1.05 0) % axes
+\move (0 -1.05) \lvec (0 1.05)
+
+\move (0 0) \lvec (0.707 0.707) \bdot
+\rmove (0.02 0.02) \textref h:L v:B \htext {X}
+\move (0.707 -0.707) \bdot
+\textref h:R v:T \htext(-0.02 -0.02){O}
+
+\move (0.5 0) % center of ellipse
+\bsegment
+ \lellip rx:0.435 ry:0.804
+ \bdot \Btext {$\beta_2$}
+ \move (0 0.15) \Hlen {0.435}{$|\beta_1{+}\beta_3|$}
+ \move (-0.7 0) \Vlen {0.804}{$|\beta_1{-}\beta_3|$}
+\esegment
+}
+
+\bye
diff --git a/Master/texmf-dist/doc/texsis/base/COPYING b/Master/texmf-dist/doc/texsis/base/COPYING
new file mode 100644
index 00000000000..2d35a8a1456
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/COPYING
@@ -0,0 +1,287 @@
+ Texsis Copyright, Warranty (lack thereof),
+ and Distribution Restrictions
+
+
+License and Distribution
+========================
+
+TeXsis is free software which can be redistributed and/or modified
+under the terms of the LaTeX Project Public License (LPPL), as
+reproduced below. Any reference to "The Program" in the license
+refers to TeXsis and its associated files. A list of the files
+covered by the LPPL is provided in the file called MANIFEST.
+
+ Note that TeXsis is based on Plain TeX, not LaTeX, and so the rules
+for naming files with the extensions .ins, .fd, and .cfg do not apply.
+The only special extension used by TeXsis is .txs for style files, and
+these should be treated the same as the other TeXsis source files
+unless a statement in that file says otherwise.
+
+
+COPYRIGHT
+=========
+
+Unless specified otherwise in individual files, TeXsis is Copyright
+1987 1988 1989 1990 1993 1994 1995 1996 1997 1998 1999 2000, 2001 by
+Eric Myers and Frank E. Paige. Other copyrights exist and are noted
+in the individual files that are affected.
+
+
+HISTORY
+=======
+
+Prior to TeXsis version 2.18 the source code to TeXsis was covered by a
+simple copyright declaration and a statement that permission was granted
+to use the software by any member the academic community in conjunction
+with basic research, but that the software could not be used or
+distributed for profit without permission. This was sufficient in the
+1980's when TeXsis was being developed specifically for physics
+researchers, but by the end of the 1990's the issues surrounding software
+licensing had become more developed and we decided that we needed a more
+explicit licensing statement and something a bit more open than just
+"academic use only".
+
+ We originally considered the GNU Public License (GPL) and the
+"Lesser" or "Library" version of that license (the LGPL), as well as
+the BSD License, the "Artistic" License, and in fact we looked at most
+of the licences approved by the Open Source Initiative (see
+http://www.opensource.org/licenses/ ). We also considered writing our
+own custom licensing statement, but we eventually decided against
+this. We felt that it was important to choose a well-known license so
+that users would know the basic terms of the license without having to
+read all the details. In the end we found that the LaTeX Project
+Public Licence (LPPL) suited the needs and the spirit of TeXsis most
+closely, and so versions 2.18 of TeXsis and beyond are covered by the
+LPPL, which is reproduced below or can be obtained from the TeXsis
+website.
+
+ Please note that the LPPL only applies to the TeXsis source code and
+code derived from it, but it does not apply to TeXsis style files (or
+other files) which were written independently without using TeXsis
+source code. We hope that the authors of style files will choose to
+follow our lead and license their works under the LPPL, but they are
+free to choose whatever license they deem appropriate. Note also that
+under the terms of the LPPL it is possible to add further restrictions
+to a file, as long as they are consistent with the "Conditions on
+individual files" section of the LPPL (see below).
+
+ TeXsis has always been an "Open Source" project, and so we chose the
+LPPL as the best way to make TeXsis freely available to everyone but
+protect it from the possible corruption of propagating different
+versions of similar files.
+
+----------------------------------------------------------------------
+
+
+
+LaTeX Project Public License
+============================
+
+LPPL Version 1.0 1999-03-01
+
+Copyright 1999 LaTeX3 Project
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but modification is not allowed.
+
+
+Preamble
+========
+
+The LaTeX Project Public License (LPPL) is the license under which the
+base LaTeX distribution is distributed. As described below you may use
+this licence for any software that you wish to distribute.
+
+It may be particularly suitable if your software is TeX related (such
+as a LaTeX package file) but it may be used for any software, even if
+it is unrelated to TeX.
+
+To use this license, the files of your distribution should have an
+explicit copyright notice giving your name and the year, together
+with a reference to this license.
+
+A typical example would be
+
+ %% pig.sty
+ %% Copyright 2001 M. Y. Name
+
+ % This program can redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or (at your option) any later version.
+
+Given such a notice in the file, the conditions of this document would
+apply, with:
+
+`The Program' referring to the software `pig.sty' and
+`The Copyright Holder' referring to the person `M. Y. Name'.
+
+To see a real example, see the file legal.txt which carries the
+copyright notice for the base latex distribution.
+
+This license gives terms under which files of The Program may be
+distributed and modified. Individual files may have specific further
+constraints on modification, but no file should have restrictions on
+distribution other than those specified below.
+This is to ensure that a distributor wishing to distribute a complete
+unmodified copy of The Program need only check the conditions in this
+file, and does not need to check every file in The Program for extra
+restrictions. If you do need to modify the distribution terms of some
+files, do not refer to this license, instead distribute The Program
+under a different license. You may use the parts of the text of LPPL as
+a model for your own license, but your license should not directly refer
+to the LPPL or otherwise give the impression that The Program is
+distributed under the LPPL.
+
+
+
+The LaTeX Project Public License
+================================
+Terms And Conditions For Copying, Distribution And Modification
+===============================================================
+
+
+WARRANTY
+========
+
+There is no warranty for The Program, to the extent permitted by
+applicable law. Except when otherwise stated in writing, The
+Copyright Holder provides The Program `as is' without warranty of any
+kind, either expressed or implied, including, but not limited to, the
+implied warranties of merchantability and fitness for a particular
+purpose. The entire risk as to the quality and performance of the
+program is with you. Should The Program prove defective, you assume
+the cost of all necessary servicing, repair or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any of the individual authors named in
+the source for The Program, be liable to you for damages, including
+any general, special, incidental or consequential damages arising out
+of any use of The Program or out of inability to use The Program
+(including but not limited to loss of data or data being rendered
+inaccurate or losses sustained by you or by third parties as a result
+of a failure of The Program to operate with any other programs), even
+if such holder or other party has been advised of the possibility of
+such damages.
+
+
+DISTRIBUTION
+============
+
+Redistribution of unchanged files is allowed provided that all files
+that make up the distribution of The Program are distributed.
+In particular this means that The Program has to be distributed
+including its documentation if documentation was part of the original
+distribution.
+
+The distribution of The Program will contain a prominent file
+listing all the files covered by this license.
+
+If you receive only some of these files from someone, complain!
+
+The distribution of changed versions of certain files included in the
+The Program, and the reuse of code from The Program, are allowed
+under the following restrictions:
+
+ * It is allowed only if the legal notice in the file does not
+ expressly forbid it.
+ See note below, under "Conditions on individual files".
+
+ * You rename the file before you make any changes to it, unless the
+ file explicitly says that renaming is not required. Any such changed
+ files must be distributed under a license that forbids distribution
+ of those files, and any files derived from them, under the names used
+ by the original files in the distribution of The Program.
+
+ * You change any `identification string' in The Program to clearly
+ indicate that the file is not part of the standard system.
+
+ * If The Program includes an `error report address' so that errors
+ may be reported to The Copyright Holder, or other specified
+ addresses, this address must be changed in any modified versions of
+ The Program, so that reports for files not maintained by the
+ original program maintainers are directed to the maintainers of the
+ changed files.
+
+ * You acknowledge the source and authorship of the original version
+ in the modified file.
+
+ * You also distribute the unmodified version of the file or
+ alternatively provide sufficient information so that the
+ user of your modified file can be reasonably expected to be
+ able to obtain an original, unmodified copy of The Program.
+ For example, you may specify a URL to a site that you expect
+ will freely provide the user with a copy of The Program (either
+ the version on which your modification is based, or perhaps a
+ later version).
+
+ * If The Program is intended to be used with, or is based on, LaTeX,
+ then files with the following file extensions which have special
+ meaning in LaTeX Software, have special modification rules under the
+ license:
+
+ - Files with extension `.ins' (installation files): these files may
+ not be modified at all because they contain the legal notices
+ that are placed in the generated files.
+
+ - Files with extension `.fd' (LaTeX font definitions files): these
+ files are allowed to be modified without changing the name, but
+ only to enable use of all available fonts and to prevent attempts
+ to access unavailable fonts. However, modified files are not
+ allowed to be distributed in place of original files.
+
+ - Files with extension `.cfg' (configuration files): these files
+ can be created or modified to enable easy configuration of the
+ system. The documentation in cfgguide.tex in the base LaTeX
+ distribution describes when it makes sense to modify or generate
+ such files.
+
+
+The above restrictions are not intended to prohibit, and hence do
+not apply to, the updating, by any method, of a file so that it
+becomes identical to the latest version of that file in The Program.
+
+========================================================================
+
+NOTES
+=====
+
+We believe that these requirements give you the freedom you to make
+modifications that conform with whatever technical specifications you
+wish, whilst maintaining the availability, integrity and reliability of
+The Program. If you do not see how to achieve your goal whilst
+adhering to these requirements then read the document cfgguide.tex
+in the base LaTeX distribution for suggestions.
+
+Because of the portability and exchangeability aspects of systems
+like LaTeX, The LaTeX3 Project deprecates the distribution of
+non-standard versions of components of LaTeX or of generally available
+contributed code for them but such distributions are permitted under the
+above restrictions.
+
+The document modguide.tex in the base LaTeX distribution details
+the reasons for the legal requirements detailed above.
+Even if The Program is unrelated to LaTeX, the argument in
+modguide.tex may still apply, and should be read before
+a modified version of The Program is distributed.
+
+
+Conditions on individual files
+==============================
+
+The individual files may bear additional conditions which supersede
+the general conditions on distribution and modification contained in
+this file. If there are any such files, the distribution of The
+Program will contain a prominent file that lists all the exceptional
+files.
+
+Typical examples of files with more restrictive modification
+conditions would be files that contain the text of copyright notices.
+
+ * The conditions on individual files differ only in the
+ extent of *modification* that is allowed.
+
+ * The conditions on *distribution* are the same for all the files.
+ Thus a (re)distributor of a complete, unchanged copy of The Program
+ need meet only the conditions in this file; it is not necessary to
+ check the header of every file in the distribution to check that a
+ distribution meets these requirements.
diff --git a/Master/texmf-dist/doc/texsis/base/Example.tex b/Master/texmf-dist/doc/texsis/base/Example.tex
new file mode 100644
index 00000000000..9de019e32c3
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/Example.tex
@@ -0,0 +1,232 @@
+%% file: Example.tex (TeXsis version 2.17)
+% $Revision: 17.0 $ : $Date: 1994/11/30 21:53:40 $ : $Author: myers $
+%======================================================================*
+% This is a sample paper typeset with TeXsis, to give you a quick idea
+% of how it's done. Note: this is just hacked together from an old
+% conference proceedings, so it's not a real paper. -EAM
+
+
+% This lets your manuscript run under either mTeXsis (from
+% mtexsis.tex) or the full TeXsis distribution
+
+\ifx\texsis\undefined \input mtexsis.tex \fi
+
+\texsis % this turns on TeXsis
+
+
+% Saying \draft puts a time-stamp, page number, etc. on the page,
+% but you don't want it for the final version of the paper.
+%%\draft
+
+
+% Document Format: uncomment one of these lines to select the style
+% in which the paper is printed:
+%
+%\preprint % Preprint style
+%\nuclproc % Nuclear Physics Proceedings style
+%\PhysRev % Physical Review style
+
+
+% ---
+
+% some macros used in this paper:
+
+\def\Kb{{\bar K^2 \over \beta_R}}
+
+% ---
+% BEGIN:
+
+\titlepage % begin title page material
+\title
+Noncompact nonlinear sigma models
+and numerical quantum gravity
+\endtitle
+\author
+Eric Myers, Bryce DeWitt, Rob Harrington, and Arie Kapulkin
+Center for Relativity, Department of Physics\\
+University of Texas, Austin, Texas 78705 USA
+\endauthor
+\abstract
+Studying the $O(2,1)$ nonlinear sigma model is a useful step toward
+determining whether or not a consistent quantum theory of gravity (based
+on the Einstein-Hilbert action) exists. Like gravity, the sigma model
+is not perturbatively renormalizable, and corresponding Feynman graphs
+in the two theories have the same na\"{\i}ve degrees of divergence. Both
+theories also have a single overall dimensionful coupling constant, and
+both have a configuration space which is noncompact and curved. The
+sigma model allows one to study the renormalizability properties of such
+theories without the added complications of local symmetries.
+\endabstract
+\bigskip
+\endtitlepage % will start \doublecolumns for \nuclproc
+
+% ---
+% Now start in on the text of the paper...
+% ---
+
+Quantum Field Theory and the theory of General Relativity are,
+separately, probably the two most successful physical theories of this
+century. This notwithstanding, nobody has yet been able to bring the
+two together into one complete and consistent quantum theory of gravity.
+One major impediment to such a theory is that, unlike gauge field
+theories, gravity with the Einstein-Hilbert action
+$$
+S = {1 \over 16\pi G_N} \int d^4x\, \sqrt{g} R
+\EQN 1$$
+is not renormalizable, at least not by the usual methods of perturbation
+theory. This has lead a number of physicists to adopt the position that
+General Relativity is only the low energy limit of some other quantum
+theory, such as superstring theory. An alternative view which one
+can adopt, however, is that the failure of perturbation theory in the
+case of gravity is not an indication that the theory is inconsistent,
+but only that the mathematical tools one has used are inadequate. To
+pursue a quantum theory of gravity in this direction one needs a
+nonperturbative method of calculation: the methods of lattice field
+theory, which have already been applied to gauge theories, are
+immediately suggested. One also needs a simple model with which to test
+the ideas of nonperturbative renormalizability without the complicated
+structure of the full theory of General Relativity. This paper
+describes our work with such a model, the $O(2,1)$ noncompact nonlinear
+$\sigma$-model.\reference{DeWitt, 1989}
+B.S.~DeWitt, ``Nonlinear sigma models in 4 dimensions: a lattice definition,''
+lectures given at the International School of Cosmology and Gravitation,
+``Ettore Majorana'' Centre for Scientific Culture, Erice, Sicily, May 1989
+\endreference\relax
+
+The model we consider consists of three scalar fields $\varphi_a$
+described by the action
+$$
+S = \half \mu^2 \int d^4 x \, \eta^{ab}
+ \del_\mu \varphi_a \del^\mu \varphi_b \,,
+\EQN 2$$
+with $\eta_{ab}={\rm diag}(-1,+1,+1)$ and with the fields obeying
+the constraint
+$$
+-\varphi_0^2 + \varphi_1^2 + \varphi_2^2 = -1
+ \qquad (\varphi_0 > 0) \,.
+\EQN 3$$
+The manifold of constraint is the two dimensional surface of constant
+negative curvature represented schematically
+in \Fig{1}. It is the coset space
+$O(2,1)/O(2)\times Z_2$, but for simplicity we refer to \Eqs{2} and
+\Ep{3} as the $O(2,1)$ nonlinear $\sigma$-model. There are several
+reasons this model is of interest:
+
+\item{1)}
+For dimensionless fields $\varphi_a$ the coupling constant $\mu^2$ has
+units of $(length)^2$, the same as $1/G_N$ in the Einstein-Hilbert
+action. Thus $\mu$ plays the role of the Planck mass in the theory.
+Furthermore this means that Feynman graphs in the $\sigma$-model have
+the same na\"{\i}ve degree of divergence as similar graphs in gravity,
+so that the model has the same renormalizability structure (actually the
+same perturbative non-renormalizability structure) as the theory of
+gravity.
+
+\item{2)}
+As in gravity, the fields of the $\sigma$-model obey a constraint,
+and the configuration space defined by the constraint is both {\it
+curved} and {\it noncompact}.
+
+\item{3)}
+The surface of constraint is invariant under global $O(2,1)$
+transformations, but
+% unlike gravity
+there is no local symmetry in the
+model. This is a great simplification which lets us study just the
+renormalizability properties of the model without the added
+complications introduced by local symmetries.
+
+\item{4)}
+Unlike gravity, the Euclidean action of the $\sigma$-model is bounded
+from below. The unboundedness of the gravitational action is a serious
+problem which must be dealt with at some point, but one which we want to
+avoid entirely for now.
+
+\figure{1}
+\forceleft
+\vskip\colwidth % just leave some space to glue in figure
+%%\epsfbox{o21.ps} % or include with epsf
+\caption{The constraint surface of the $O(2,1)$ noncompact nonlinear
+$\sigma$-model.}
+\endfigure
+
+\medskip
+
+The transcription of the $\sigma$-model to the lattice is more or less
+standard with one exception, our definition of the lattice derivative.
+Rather than using the simple difference between field values at
+neighboring lattice sites we use the geodesic distance between two
+points on the constraint surface. The lattice action is thus
+$$
+S = \half \mu^2 \sum_x a^4 \sum_{\hat\mu}
+ [{ \Delta(\varphi(x+\hat\mu a), \varphi(x)) \over a}]^2 \,,
+\EQN 4$$
+where $\Delta(\varphi,\varphi^\prime)$ is the arc length between
+$\varphi$ and $\varphi^\prime$ on the manifold,
+$$
+\Delta(\varphi,\varphi^\prime) =
+ \cosh^{-1}(-\eta^{ab} \varphi_a\varphi^\prime_b) \,.
+\EQN 5$$
+Our reason for this choice is that it is consistent with the idea that
+the fields be restricted only to the constraint surface of the
+$\sigma$-model.
+In contrast, simply taking the na\"{\i}ve difference between fields, as
+is usually done for compact $\sigma$-models, produces a difference
+vector which does not lie in the manifold of constraint. While both
+methods lead to the same classical continuum limit there is nothing that
+guarantees that the quantum theories obtained from the two lattice
+definitions will be the same.
+
+ It is convenient to factor the dependence on the lattice spacing $a$
+out to the front of \Eq{4} and to define the dimensionless coupling
+constant $\beta = \mu^2 a^2$. If the theory is nonperturbatively
+renormalizable the Planck mass $\mu$ will be renormalized to $\mu_R$,
+which results in a renormalized dimensionless coupling constant
+$$
+\beta_R = \mu_R^2 a^2 \,.
+\EQN 6$$
+The renormalized Planck mass defines a characteristic length scale
+$1/\mu_R$ for the interactions of the theory. The lattice approximation
+to the continuum theory will be reliable when $a \ll 1/\mu_R \ll L=Na$.
+Considering each inequality separately, this requires
+$$
+\mu_R a = \sqrt{\beta_R} \ll 1
+\qquad \hbox{\rm and} \qquad
+ N \gg {1\over \sqrt{\beta_R}}
+\EQN 7$$
+In the continuum limit $a \to 0$, hence $\beta \to 0$, and for $\mu_R$
+to remain finite this requires $\beta_R \to 0$. If this condition is
+not fulfilled then it would appear to be impossible to define a
+consistent quantum field theory from the $\sigma$-model, even
+nonperturbatively.
+
+%----------------------------
+\figure{2}
+\forceright % force this to the righthand column
+\vskip\colwidth % leave this much space
+%%\epsfbox{beta.ps} % or include with EPSF
+\caption{The renormalized dimensionless coupling constant $\beta_R$
+plotted against the bare coupling constant $\beta$ for an $N=10$
+lattice.}
+\endfigure
+%----------------------------
+
+In \Fig{2} we show $\beta_R$ plotted as a function of $\beta$ as
+obtained from Monte Carlo simulations on an $N=10$ lattice. As can
+clearly be seen, $\beta_R$ vanishes nowhere. We therefore conclude that
+the $O(2,1)$ nonlinear sigma model does not have an interacting
+continuum limit. One may view $1/\mu_R$ as the renormalized coupling
+constant in the theory, in which case our result implies that the model
+is ``trivial'' (in the technical sense) in that the continuum limit is a
+free field theory.
+
+This work was supported by NSF grants PHY\-8617103 and PHY\-8919177.
+
+\smallskip
+%\nosechead{References} % header for references
+%\nobreak
+\ListReferences
+
+\bye
+
+%>>> EOF Example.tex <<<
diff --git a/Master/texmf-dist/doc/texsis/base/Fonts.tex b/Master/texmf-dist/doc/texsis/base/Fonts.tex
new file mode 100644
index 00000000000..70b6822f611
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/Fonts.tex
@@ -0,0 +1,112 @@
+%% File: Fonts.tex (TeXsis version 2.16)
+% $Revision: 16.2 $ : $Date: 1994/09/14 14:57:08 $ : $Author: myers $
+%=======================================================================*
+% TeXsis Manual -- TYPE SIZES AND STYLES : This file is a part of TeXsis
+% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
+%======================================================================*
+%
+\texsis\book
+\singlespaced
+\TeXquoteon % | is a TeX quote (printed tt)
+\input TXSdocM.doc % macros for manual
+
+\titlepage
+\line{\revdate \hfill \TeXsis\ \fmtversion} % a banner of sorts
+\vbox{\vskip.75in} % some whitespace
+\title
+\TeXsis
+\TeX\ Macros for Physicists
+\bigskip
+-- Font Tables --
+\endtitle
+%
+\author
+Eric Myers
+Department of Physics and Astronomy
+Vassar College
+Poughkeepsie, New York 12601~USA
+\endauthor
+\and
+\author
+Frank E. Paige
+Physics Department
+Brookhaven National Laboratory
+Upton, New York 11973~USA
+\endauthor
+%
+\abstract
+This supplement to the \TeXsis\ manual contains tables of the characters
+in all of the available fonts.
+\endabstract
+\endtitlepage
+
+\parskip=\medskipamount % some extra space between paragraphs
+
+\appendix{B}{Font Tables}
+
+\midtable{Fonts}
+\Caption
+Fonts used in \TeXsis, with the design size names and the required
+sizes in points.
+\endCaption
+\ruledtable
+ Base Name | Description | Sizes (pt) \crthick
+ cmr10 | Roman | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmti10 | Text italic | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmsl10 | Slanted | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmbx10 | Roman bold | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmmi10 | Math italic | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmsy10 | Math symbol | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmex10 | Math extended | ~~~~~~~~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmtt10 | Typewriter | ~~~~~~~~~10~~11~~12~~~~~~~~~~~~~~~~ \cr
+ cmss10 | Sans serif | ~~~~~~~~~10~~11~~12~~14~~~~~~~~~~~~ \crthick
+ cmmib10 | Math italic bold | ~~~~~~~~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmbsy10 | Bold symbol | ~~~~~~~~~10~~11~~12~~14~~16~~20~~24
+\endruledtable
+\endtable
+
+ The Computer Modern fonts that are used either by Plain \TeX\ or by
+\TeXsis\ and the required sizes for each are listed in \Tbl{Fonts}. The
+|cmmib10| and |cmbsy10| fonts may not exist in all installations, but
+they will not be loaded unless |\mib| is used, so they are not required.
+The command |\printfont{|\meta{font}|}| can be used to print a table of
+the characters in any \meta{font}, e.g.,
+\TeXexample
+\printfont{cmr10}
+|endTeXexample
+Such tables are given on the following pages.
+
+ Most versions of \TeX\ now use Computer Modern fonts, but some
+still use the older American Modern fonts. If you have problems with the
+fonts, try editing |TXSfonts.tex|, replacing all occurrences of |=cm|
+with |=am| and then recompiling \TeXsis. Mixing the two types of fonts
+will produce errors.
+
+\vfil\eject
+
+% \Printfont uses \printfont from printfont.txs, but puts the font
+% table in a nice table with a caption.
+
+\def\Printfont#1#2{% Print a nice font table, with caption
+ \table{#2}%
+ \printfont{#1}%
+ \caption{Font {\tt #1} -- #2}%
+ \endtable}
+
+
+\Printfont{cmr10}{Roman}
+\Printfont{cmti10}{Text Italic}
+\Printfont{cmsl10}{Slanted}
+\Printfont{cmbx10}{Roman bold}
+\Printfont{cmmi10}{Math italic}
+\Printfont{cmsy10}{Math symbol}
+\Printfont{cmex10}{Math extended}
+\Printfont{cmtt10}{Typewriter}
+\Printfont{cmss10}{Sans serif}
+\Printfont{cmmib10}{Math italic bold}
+\Printfont{cmbsy10}{Math bold symbol}
+
+\bye
+
+%>>> EOF Fonts.tex <<<
+
diff --git a/Master/texmf-dist/doc/texsis/base/INSTALL b/Master/texmf-dist/doc/texsis/base/INSTALL
new file mode 100644
index 00000000000..288b8ee4160
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/INSTALL
@@ -0,0 +1,17 @@
+texsis/INSTALL - How to get the installation instructions
+
+ A complete set of instructions for installing TeXsis on
+Unix, VMS, and DOS PC's is given in the appendix of the TeXsis
+manual. You can print this appendix using plain TeX with the
+file Install.tex. (You must also have the files TXSinstl.doc,
+TXSmacs.tex, TXSenvmt.tex and TXSdocM.doc in the current
+directory or input path.) A pre-processed version is in the file
+Install.ps.
+
+ If you are running TeX 3.0 or later on a Unix machine you can
+probably install TeXsis on your system by simply editing the
+parameters in the Makefile and the proto-site file TXSsite.000
+and saying `make install`. If you have any problems with this
+see the full instructions.
+
+Eric Myers <texsis@feynman.physics.lsa.umich.edu> 12 November 1994
diff --git a/Master/texmf-dist/doc/texsis/base/Install.tex b/Master/texmf-dist/doc/texsis/base/Install.tex
new file mode 100644
index 00000000000..afa76f3e66d
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/Install.tex
@@ -0,0 +1,66 @@
+%% file: Install.tex (TeXsis version 2.17)
+% $Revision: 17.2 $ : $Date: 1997/08/27 21:44:25 $ : $Author: myers $
+%======================================================================*
+% Installation Instructions for TeXsis E. Myers and F.E. Paige
+%
+% This file can be used with Plain TeX to print the installation
+% instructions for TeXsis (which is an appendix of the manual).
+%
+% For quick installation instructions see the Makefile.
+%
+% Dependencies: TXSmacs.tex, TXSenvmt.tex, TXSinstl.doc
+%======================================================================*
+% TeXsis -- Installation Instructions : This file is a part ot TeXsis
+% (C) Copyright 1989, 1992, 1997 by Eric Myers and Frank E. Paige
+%======================================================================*
+% first load just the parts of TeXsis we need to do the job
+%
+\input TXSmacs % main macros common to all components
+\input TXSenvmt % center and flush environments, etc..
+%
+% now some stand-in definitions for full TeXsis macros
+%
+\def\appendix#1#2{\centerline{\bf\uppercase{#2}}\bigskip}
+\def\revdate{17 September 1994}%
+\def\subsection#1{\bigskip\goodbreak
+ \noindent{\bf\uppercase{#1}}\bigskip}
+\def\subsubsection#1{\medskip\noindent{\bf{#1}}\medskip}
+\def\nosechead#1{\medskip\noindent{\bf #1}\medskip}
+\def\label#1{\relax}
+\def\ORGANIZATION{}
+\def\URL#1{{\tt #1}}
+\def\checktags{\relax}\def\pagecheck#1{\relax}
+\def\TeXsis{\TeX sis}
+\def\square{\hbox{{$\sqcup$}\llap{$\sqcap$}}} % box
+\def\ATunlock{\catcode`@=11}\ATunlock % @ is a letter
+\def\singlespaced{\relax}\def\twelvepoint{\relax}%
+\long\def\vfootnote#1#2{}
+\def\idx#1{#1}\def\index#1{}
+
+%
+\newskip\ttglue \ttglue=.5em plus.25em minus.15em
+\newskip\sectionminspace\sectionminspace=0pt
+\newskip\sectionskip \sectionskip=0pt
+\newskip\subsectionskip \subsectionskip=0pt
+%
+\newcount\refnum \refnum=\z@ % counter for reference numbers
+\newcount\@firstrefnum \@firstrefnum=1 % first of a series of refs
+\newcount\@lastrefnum \@lastrefnum=1 % last of a series of refs
+\newcount\tabnum \tabnum=\z@ % table number
+\newcount\fignum \fignum=\z@ % figure number
+\newcount\eqnum \eqnum=\z@ % equation number in section
+
+\def\@chaptID{}\def\@sectID{} % start with these null
+
+\newif\ifContents \newif\ifRunningHeads
+
+% Simpler versions of manual macros
+
+\def\meta#1{\leavevmode\hbox{$\langle$\rm #1\/$\rangle$}} % new \meta
+\def\cs#1{{\tt\string#1}} \def\CS#1{{\tt\string#1}}
+
+\TeXquoteon
+\parskip=0.75\baselineskip
+
+\input TXSinstl.doc % Installation instructions from manual
+\bye
diff --git a/Master/texmf-dist/doc/texsis/base/MANIFEST b/Master/texmf-dist/doc/texsis/base/MANIFEST
new file mode 100644
index 00000000000..c1a8e5d40a4
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/MANIFEST
@@ -0,0 +1,80 @@
+ File Name Description
+------------------------------------
+ AIP.txs American Institute of Physics style file
+ COPYING Copyright, Warranty, and Distribution Restrictions
+ CVformat.txs style file for Curriculum Vitae
+ Elsevier.txs style file for North Holland publications
+ Example.tex short example of a paper created with TeXsis
+ Fonts.tex Standalone fonttable printout
+ Formletr.txs macros for making form letters
+ IEEE.txs IEEE proceedings style file
+ INSTALL Info on how to get installation instructions
+ Install.tex TeXsis installation instructions, in Plain tex
+ LPPL LaTeX Project Public License
+ MANIFEST This shipping list
+ Makefile Unix makefile to build the format and Manual
+ Manual.aux label definitions for the TeXsis Manual
+ Manual.ind processed index for the TeXsis manual
+ Manual.tex TeXsis file to print manual
+ PhysRev.txs Physical Review style file
+ README General information about this distribution
+ TXSapxF.doc Appendix with font tables
+ TXSconts.tex table of contents
+ TXScover.doc Cover for the Manual
+ TXSdcol.doc double column documentation
+ TXSdcol.tex double column format
+ TXSdoc.doc documentation masterfile
+ TXSdoc0.doc documentation title page
+ TXSdocM.doc macros for manual
+ TXSend.doc end of Manual, acknowledgements and contents
+ TXSenvmt.doc documentation for center and list environments
+ TXSenvmt.tex special environments, \center, \Listing, etc
+ TXSeqns.doc Documentation for equation numbering
+ TXSeqns.tex equation numbering
+ TXSfigs.doc documentation for figures and tables
+ TXSfigs.tex figure and table macros
+ TXSfmts.doc documentation for layouts
+ TXSfmts.tex document layouts
+ TXSfonts.doc font documentation
+ TXSfonts.tex TeXsis font definitions
+ TXShead.tex running headlines and footlines
+ TXSinit.tex initialization stuff and some basic macros
+ TXSinstl.doc installation instructions, Manual appendix A
+ TXSintro.doc Manual introduction
+ TXSletr.doc documentation for letter and memo macros
+ TXSletr.tex LetterFormat for typing letters
+ TXSmacs.tex miscelaneous macros common to all components
+ TXSmemo.tex MemoFormat for typing memoranda
+ TXSmisc.doc Documentation for miscellaneous macros
+ TXSprns.doc documetation for paren sizing and balancing
+ TXSprns.tex automatic paren sizing and balancing
+ TXSrefs.doc documentation for reference numbering
+ TXSrefs.tex references and citations
+ TXSrevs.doc revision history, manual appendix C
+ TXSruled.doc documentation for ruled tables
+ TXSruled.tex TeX macros for ruled tables, vis. ruled.tex
+ TXSsects.doc chapter and section documentation
+ TXSsects.tex chapter and section divisions
+ TXSsite.000 proto (or example) site dependent info file
+ TXSsymb.doc documentation for extended math symbols
+ TXSsymb.tex extended math symbols for physics
+ TXStags.doc documentation for misc tags
+ TXStags.tex tags for ref and eqn numbers, labeling
+ TXStitle.tex title page macros for physics papers
+ Tablebod.txs old-style table making macros
+ WorldSci.txs World Scientific proceedins style file
+ color.txs macros to change colors for color PostScript
+ index.tex index making macros for Plain TeX & MakeIndex
+ nuclproc.txs style file for Nuclear Physics proceedings
+ penguin.eps sample encapsulated PostScript figure
+ penguin2.eps sample encapsulated PostScript figure
+ printfont.txs Macros for printing font tables
+ ruled.tex Plain TeX interface for ruled tables
+ spine.txs macro for making 3-Ring binder labels
+ texsis.1 man page for texsis, in troff -man format
+ texsis.bst BIBTeX reference style file for TeXsis
+ texsis.el emacs mode for TeXsis
+ texsis.tex master file to generate TeXsis format
+ thesis.txs style file for a thesis
+ twin.txs two pages side by side on one piece of paper
+ texsis.lsm Short description of the TeXsis package \ No newline at end of file
diff --git a/Master/texmf-dist/doc/texsis/base/Manual.fgl b/Master/texmf-dist/doc/texsis/base/Manual.fgl
new file mode 100644
index 00000000000..b05bdc70273
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/Manual.fgl
@@ -0,0 +1,11 @@
+% List of Figures for job Manual - created: 2004/6/5 23:{0}2
+% ====================================
+% > Figure 7.1:
+\FIGLitem{Figure} {7.1. }
+Sample figure showing how easy it is
+to insert numbered figures with captions in \TeXsis .\@endFIGLitem
+{46}
+% > Figure 1.17:
+\FIGLitem{Figure} {1.17. }
+A bizarrely placed figure for Section~\use {sect.intro}\@endFIGLitem
+{63}
diff --git a/Master/texmf-dist/doc/texsis/base/Manual.ref b/Master/texmf-dist/doc/texsis/base/Manual.ref
new file mode 100644
index 00000000000..30bbfa60885
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/Manual.ref
@@ -0,0 +1,174 @@
+% List of References for job Manual - created: 2004/6/5 23:{0}2
+% ====================================
+%
+% (1) Reference text for "Knuth" defined on page 1.
+\@refitem{1}{Knuth}
+D.E.~Knuth,
+\booktitle {The \TeX book} (Addison-Wesley, 1986)
+\@endrefitem
+\@refpunct .
+%
+% (2) Reference text for "LaTeX" defined on page 1.
+\@refitem{2}{LaTeX}
+L. Lamport,
+\booktitle {\LaTeX , A Document Preparation System},
+(Addison-Wesley, 1985)
+\@endrefitem
+\@refpunct .
+%
+% (3) Reference text for "Doob" defined on page 1.
+\@refitem{3}{Doob}
+M.~Doob,
+\booktitle {A Gentle Introduction to \TeX \ (A Manual for Self-Study)},
+(\TeX \ User's Group, Providence).
+Also available as a plain \TeX \ file from CTAN or at\n
+\URL {ftp://ftp.texsis.org/pub/tex/gentle.tex}
+\@endrefitem
+\@refpunct .
+%
+% (4) Reference text for "Spivak" defined on page 1.
+\@refitem{4}{Spivak}
+M.~Spivak,
+\booktitle {PC\TeX \ User's Guide.}
+(Documentation distributed with PC\TeX )
+\@endrefitem
+\@refpunct .
+%
+% (5) Reference text for "Feynman, 1949" defined on page 21.
+\@refitem{5}{Feynman, 1949}
+R.P.~Feynman, Phys.\ Rev.\ \vol {76}, 749 (1949)
+\@endrefitem
+\@refpunct .
+%
+% (6) Reference text for "Pauli and Villars, 1949" defined on page 23.
+\@refitem{6}{Pauli and Villars, 1949}
+W.~Pauli and F.~Villars, \journal Rev. Mod. Phys.;21,434(1949)
+\@endrefitem
+\@refpunct ;
+% ... Reference text for "*Schwinger, 1948" defined on page 23.
+\hfill \penalty -\@M
+J.~Schwinger, \journal Phys. Rev.;74,1439(1948)
+\@endrefitem
+\@refpunct .
+%
+% (7) Reference text for "BCS" defined on page 31.
+\@refitem{7}{BCS}
+J.~Bardeen, L.~N.~Cooper, and
+J.~R.~Schrieffer,
+\journal Phys. Rev.;108,1175(1957)
+\@endrefitem
+\@refpunct .
+%
+% (8) Reference text for "DIS" defined on page 35.
+\@refitem{8}{DIS}
+E.D. Bloom, et al.,
+Phys.\ Rev.\ Letters \vol {23}, 930 (1969) \@endrefitem
+\@refpunct .
+%
+% (9) Reference text for "makeindex" defined on page 44.
+\@refitem{9}{makeindex}
+Pehong Chen and
+Michael A. Harrison, ``Index Preparation and Processing'', in {\sl
+Software: Practice and Experience}, \vol {19}, 897-915 (1988)
+\@endrefitem
+\@refpunct .
+%
+% (10) Reference text for "Rokicki" defined on page 48.
+\@refitem{10}{Rokicki}
+Tomas Rokicki, \booktitle {{\tt dvips}
+User's Manual}.
+The source code for {\tt dvips} is available from CTAN
+in the directory {\tt dviware/dvips}
+\@endrefitem
+\@refpunct .
+%
+% (11) Reference text for "FeynDiagram" defined on page 50.
+\@refitem{11}{FeynDiagram}
+Dimm, Bill,
+\booktitle {FeynDiagram Tutorial},
+available at \URL {ftp://ftp.hepth.cornell.edu}
+\@endrefitem
+\@refpunct .
+%
+% (12) Reference text for "Masters" defined on page 52.
+\@refitem{12}{Masters}
+\relax
+D.E.~Knuth, {\sl The \TeX book} (Addison Wesley, 1986), page 245
+\@endrefitem
+\@refpunct .
+%
+% (13) Reference text for "Cowan" defined on page 52.
+\@refitem{13}{Cowan}
+Ray F.~Cowan, {\sl
+Making Tables with Macros} (unpublished)
+\@endrefitem
+\@refpunct .
+%
+% (14) Reference text for "Bozek, 1991" defined on page 54.
+\@refitem{14}{Bozek, 1991}
+J.D.~Bozek, Ph.D. thesis (unpublished), Department of Chemistry,
+University of Western Ontario, London, Ontario CANADA
+\@endrefitem
+\@refpunct .
+%
+% (15) Reference text for "Weinberg, 1972" defined on page 65.
+\@refitem{15}{Weinberg, 1972}
+S.~Weinberg,
+\booktitle {Gravitation and Cosmology: Principles and Applications of the
+General Theory of Relativity}
+(Wiley, New York, 1972) pg.~3
+\@endrefitem
+\@refpunct .
+%
+% (16) Reference text for "K&R" defined on page 67.
+\@refitem{16}{K&R}
+Brian W.~Kernighan and Dennis M.~Ritchie,
+\booktitle {The C Programming Language},
+(Prentice Hall, Englewood Clifs, NJ, 1978)
+\@endrefitem
+\@refpunct .
+%
+% (17) Reference text for "Banzai, 1984" defined on page 69.
+\@refitem{17}{Banzai, 1984}
+\booktitle {The Adventures of Buckaroo Banzai across the Eighth
+Dimension}, (Twentieth Century Fox, 1984)
+\@endrefitem
+\@refpunct .
+%
+% (18) Reference text for "colordvi" defined on page 79.
+\@refitem{18}{colordvi}
+Hafner, Jim, the {\tt COLORDVI.TEX} macros
+are included in the {\tt dvips} distribution. See \Ref {Rokicki}
+\@endrefitem
+\@refpunct .
+%
+% (19) Reference text for "CRC" defined on page 93.
+\@refitem{19}{CRC}
+\booktitle {Handbook of Chemistry and Physics}, 56th Edition,
+(CRC Press, Cleveland, Ohio, 1974), pg. B-9
+\@endrefitem
+\@refpunct .
+%
+% (20) Reference text for "TeXsis-1.00" defined on page 116.
+\@refitem{20}{TeXsis-1.00}
+E.~Myers,
+\booktitle {\TeX sis Version 1.00} (unpublished)
+\@endrefitem
+\@refpunct .
+%
+% (21) Reference text for "Myers, 1984" defined on page 116.
+\@refitem{21}{Myers, 1984}
+E.~Myers,
+\booktitle {Calculation of the Gravitational Casimir Energy and Gauge Field
+Couplings in Non-Abelian Kaluza-Klein Theories},
+Ph.D.\ thesis (unpublished), Yale University, 1984
+\@endrefitem
+\@refpunct .
+%
+% (22) Reference text for "Groppe" defined on page 116.
+\@refitem{22}{Groppe}
+W.~Groppe,
+\booktitle {TechRpt} (unpublished)
+\@endrefitem
+\@refpunct .
+% >>> EOF Manual.ref <<<
diff --git a/Master/texmf-dist/doc/texsis/base/Manual.tbl b/Master/texmf-dist/doc/texsis/base/Manual.tbl
new file mode 100644
index 00000000000..0e67908e451
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/Manual.tbl
@@ -0,0 +1,24 @@
+% List of Tables for job Manual - created: 2004/6/5 23:{0}2
+% ====================================
+% > Table 7.1:
+\FIGLitem{Table} {7.1. }
+Charged leptons.\@endFIGLitem
+{51}
+% > Table 7.2:
+\FIGLitem{Table} {7.2. }
+Example of a ruled table --- AT\&T Common Stock.\@endFIGLitem
+{54}
+% > Table 7.3:
+\FIGLitem{Table} {7.3. }
+Example of a ruled table --- Parameters used in the
+MS-X$\alpha $ calculations for the chlorosilane molecules,
+H$_{\rm x}$SiCl$_{\rm 4-x}$; x=0--4.\@endFIGLitem
+{55}
+% > Table 7.4:
+\FIGLitem{Table} {7.4. }
+Basic macros for {\tt \bs ruledtable}\@endFIGLitem
+{58}
+% > Table 7.4:
+\FIGLitem{Table} {7.4. }
+Additional macros for {\tt \bs ruledtable}\@endFIGLitem
+{59}
diff --git a/Master/texmf-dist/doc/texsis/base/Manual.tex b/Master/texmf-dist/doc/texsis/base/Manual.tex
new file mode 100644
index 00000000000..0b9f8fc9693
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/Manual.tex
@@ -0,0 +1,22 @@
+%% file: Manual.tex (TeXsis version 2.17)
+% $Revision: 17.1 $ : $Date: 1997/07/08 22:09:47 $ : $Author: myers $
+%======================================================================*
+% TeXsis Manual -- This file prints the TeXsis manual.
+%
+% First we look to see if this is being run under TeXsis, or
+% Plain TeX. If \TeXsis is undefined then it must be Plain
+
+\ifx \TeXsis\undefined\relax
+ \input texsis \relax % read in TeXsis macros
+ \the\everyjob % start it up
+\fi
+
+% Now go read in the manual Master file. The manual files are TXS*.doc
+
+\input TXSdoc.doc % read the manual
+\bye
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/texsis/base/NEWS b/Master/texmf-dist/doc/texsis/base/NEWS
new file mode 100644
index 00000000000..03bc808bb10
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/NEWS
@@ -0,0 +1,61 @@
+ LATEST NEWS ABOUT TeXsis
+ ========================
+
+The latest distribution version of TeXsis is in a file of the name
+TeXsis-2.xx.tar.tz where 2.xx is the latest version number.
+
+The latest experimental version of TeXsis is in the beta subdirectory
+ftp://feynman.physics.lsa.umich.edu/pub/texsis/beta/ but is not
+mirrored by CTAN.
+
+ ========================
+
+13 May 2000:
+ The TeXsis ftp site has been moved to
+ ftp://feynman.physics.lsa.umich.edu/pub/texsis/
+ There is now a TeXsis home page, which is at
+ http://feynman.physics.lsa.umich.edu/~myers/texsis/
+
+
+18 December 1997:
+
+ Here is what is new in TeXsis 2.17:
+
+ * Support for using BibTeX to extract references from bibliographic
+ databases. (Easier to use than in LaTeX!)
+
+ * The ability to change the colors in PostScript output, which is
+ useful for making overhead transparancies. (The style file
+ color.txs is a functional superset of colordvi.sty, but also lets
+ you push/pop the PostScript color stack.)
+
+ * Improvements in the organization of the manual, and slightly updated
+ installation instructions. Updated Makefile.
+
+ * Change in the format of the .aux file. You shouldn't notice
+ this, but it will allow the use of tools and packages that use
+ this file (such as BibTeX) that were formerly only available in
+ LaTeX.
+
+ * Form letter macros moved to a style file, Formletr.txs.
+
+ Here is what is NOT in TeXsis, but expected in a later release:
+
+ * Babel support for other languages. We had this working with Babel
+ 3.4, but then the author of Babel made a big revision (probably to
+ update to LaTeX/2e) and now it doesn't quite work. You can try to
+ find the older version of Babel if you really want this.
+
+ * Hypertext: I had hyperTeX html links working, but have not
+ documented it. It seems that work on hyperTeX has either frozen
+ or changed direction with the anticipated arrival of tex2pdf.
+ Once I get a chance to read through the proper documentation and
+ figure out where things are going I will update TeXsis to put in
+ the proper pdf marks.
+
+ * Alternate citation styles: numbered footnotes (rather than
+ endnotes) or citation by the label ("citation key"). It's almost
+ ready, but not quite.
+
+$Id: NEWS,v 1.1 2000/05/17 01:06:42 myers Exp $
+
diff --git a/Master/texmf-dist/doc/texsis/base/README b/Master/texmf-dist/doc/texsis/base/README
new file mode 100644
index 00000000000..08751ec580d
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/README
@@ -0,0 +1,151 @@
+ TeXsis version 2.18
+ 6 April 2001
+
+
+ GENERAL INFORMATION
+
+ TeXsis is a Plain TeX macro package for typesetting physics
+documents, including papers and preprints, conference proceedings,
+books, theses, referee reports, letters, and memos. Texsis macros
+provide the following features:
+
+ * Automatic numbering of and symbolic reference to equations,
+ figures, tables, and references;
+
+ * Simpified control of type sizes, line spacing, footnotes, running
+ headlines and footlines;
+
+ * Specialized document formats for research papers, preprints and
+ "e-prints," conference proceedings, theses, books, referee
+ reports, letters, and memoranda;
+
+ * Table(s) of contents and lists of figures and tables, as well as
+ list of figure and table captions;
+
+ * Specialized environments for lists, theorems and proofs, centered
+ or non-justified text, and listing computer code;
+
+ * Specialized macros for easily constructing ruled tables;
+
+ * Simplified means of constructing an index for a book or thesis;
+
+ * Easy to use double column formatting.
+
+TeXsis was originally designed for use by physicists, but others may
+also find it useful. It is completely compatible with Plain TeX.
+
+ You can find out more about TeXsis from the TeXsis Home Page, at
+http://www.texsis.org
+
+
+ SOURCE CODE
+
+ Source code and documentation for TeXsis can be obtained from
+ftp://ftp.texsis.org/texsis and is also mirrored by CTAN, the
+Common TeX Archive Network, in CTAN:/tex-archive/macros/texsis/ .
+Finger ctan@ftp.tex.ac.uk to find the nearest CTAN server.
+
+ Small improvements and corrections to TeXsis are distributed as
+patches in the patch file TXSpatch.tex. If there is such a file in the
+texsis directory you should copy it as well.
+
+
+ INDEPENDENT MACRO PACKAGES
+
+ Several components of TeXsis can be used independently under Plain
+TeX:
+
+ * index: index.tex contains Plain TeX macros for constructing an
+ index for a document, in conjunction with the MakeIndex program.
+
+ * tables: ruled.tex (with TXSruled.tex) contain Plain TeX macros
+ for making nice ruled tables.
+
+ * dcol: TXSdcol.tex contains Plain TeX macros for double column
+ formatting.
+
+For details on how to use these see the documentation files that
+accompany them on the TeXsis ftp site (each has a separate directory).
+The comments in the files are also very complete.
+
+
+ INSTALLATION
+
+ TeX runs on many different platforms, not just Unix, and TeXsis
+will run on any installation of TeX. It is best to perform a system-
+wide installation of TeXsis so that everybody may use it, but it is
+also possible to install it in a private directory for personal use.
+Since TeXsis is a "format" the steps required to install it are the
+same as the steps required to install any TeX "format", probably using
+the `initex` program. It would be best if you would review the
+documentation on how to do this for your own TeX installation.
+
+ Very complete installation instructions for Unix, VMS, and PC-TeX
+are given in an appendix to the TeXsis manual. You can print these
+without having to have TeXsis installed by running the file
+Install.tex through Plain TeX.
+
+ That said, installation on Unix computers is rather simple. Unless
+you have an unusual installation of TeX (in which case please read the
+output from Install.tex) the steps are:
+
+ 1. Edit the Makefile and change parameters and paths as
+ appropriate, following the directions given in the comments.
+ The defaults are set to work with teTeX, a common distribution
+ of TeX for Unix. You will probably only have to set the paths
+ to your top-level "texmf" directory and your local "bin" directory.
+
+ 2. (Optional) Copy the file TXSsite.000 to TXSsite.tex and edit
+ this file to contain appropriate site dependent information,
+ such as definitions for the name of your \ORGANIZATION, or your
+ \letterhead, or change \LandscapeSpecial, etc... If you already
+ have a TXSsite.tex file then copy it to the current directory so
+ that it will be included when building the format file.
+
+ 3. Give the command `make` to build the format file and the manual.
+
+ 4. Give the command `make install' to install the files in the
+ appropriate directories.
+
+
+ MTEXSIS
+
+ To make it easier for the casual reader of electronic preprints
+("e-prints") to print a TeXsis document we have collected the core
+TeXsis macros into one source file (called mtexsis.tex), with all the
+comments and blank lines removed. A reader who does not have TeXsis
+on her/his system can then simply get this file, add
+
+ \input mtexsis
+
+to the manuscript file, and print the paper with Plain TeX. You can
+make your e-print manuscript files automatically load mtexsis.tex, if
+it is needed, by adding the following line at the begining of your
+manuscript file:
+
+ \ifx\TeXsis\undefined\input mtexsis.tex\fi
+
+It is suggested that you try running such a manuscript through Plain TeX
+with mtexsis.tex first to make sure that it works.
+
+
+ MAILING LIST
+
+ If you find TeXsis useful you may want to send a short e-mail
+message to texsis@texsis.org to be put on the mailing list for any
+notices of updates or changes. We will only use this list to inform
+you of updates or changes, and we won't give the list out to anybody
+else (we hate spam too).
+
+
+ AUTHORS
+
+ Eric Myers <myers@umich.edu> Frank E. Paige <paige@bnl.gov>
+ Department of Physics and Physics Department
+ University of Michigan Brookhaven National Laboratory
+ Ann Arbor, Michigan, 48109 USA Upton, New York 11973 USA
+
+
+ --- ---- ---
+
+@(#) $Id: README,v 18.3 2001/04/06 23:12:48 myers Exp $
diff --git a/Master/texmf-dist/doc/texsis/base/TXSapxF.doc b/Master/texmf-dist/doc/texsis/base/TXSapxF.doc
new file mode 100644
index 00000000000..37b8be0e5b5
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSapxF.doc
@@ -0,0 +1,55 @@
+%% file: TXSapxF.doc - Font Table Appendix - TeXsis version 2.18
+%% @(#) $Id: TXSapxF.doc,v 18.1 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta\texsis\input TXSdocM.doc\draft\fi
+
+
+\appendix{C}{Font Tables}
+
+ The Computer Modern fonts that are used either by Plain \TeX\ or by
+\TeXsis\ and the required sizes for each are listed in \Tbl{Fonts}. The
+|cmmib10| and |cmbsy10| fonts may not exist in all installations, but
+they will not be loaded unless \cs{mib} is used, so they are not required.
+The command \CS{printfont}\arg{font} can be used to print a table of
+the characters in any \meta{font}, e.g.,
+\TeXexample
+\printfont{cmr10}
+|endTeXexample
+A separate file called |Fonts.tex| is included with the standard
+distribution of \TeXsis. Running |Fonts.tex| through \TeXsis\ will
+produce tables of all of the fonts used by your installation of \TeXsis.
+
+ Most versions of \TeX\ now use ``CM'' (Computer Modern) fonts, but
+some still use the older ``AM'' (Almost Modern) fonts. If you have
+problems with the fonts, try editing |TXSfonts.tex|, replacing all
+occurrences of |=cm| with |=am| and then recompiling \TeXsis. Mixing the
+two types of fonts will produce errors.
+
+\midtable{Fonts}
+\Caption
+Fonts used in \TeXsis, with the design size names and the required
+sizes in points.
+\endCaption
+\ruledtable
+ Base Name | Description | Sizes (pt) \crthick
+ cmr10 | Roman | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmti10 | Text italic | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmsl10 | Slanted | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmbx10 | Roman bold | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmmi10 | Math italic | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmsy10 | Math symbol | 5~~7~~9~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmex10 | Math extended | ~~~~~~~~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmtt10 | Typewriter | ~~~~~~~~~10~~11~~12~~~~~~~~~~~~~~~~ \cr
+ cmss10 | Sans serif | ~~~~~~~~~10~~11~~12~~14~~~~~~~~~~~~ \crthick
+ cmmib10 | Math italic bold | ~~~~~~~~~10~~11~~12~~14~~16~~20~~24 \cr
+ cmbsy10 | Bold symbol | ~~~~~~~~~10~~11~~12~~14~~16~~20~~24
+\endruledtable
+\endtable
+
+% >>> EOF TSXapxF.doc <<<
+
diff --git a/Master/texmf-dist/doc/texsis/base/TXScover.doc b/Master/texmf-dist/doc/texsis/base/TXScover.doc
new file mode 100644
index 00000000000..34d8b6ebee8
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXScover.doc
@@ -0,0 +1,28 @@
+%% file: TXScover.tex - Binder Cover - TeXsis version 2.18
+%% @(#) $Id: TXScover.doc,v 18.1 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1993 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+% SPINE LABEL: don't use any \special's here
+
+\parskip=12pt
+
+\noindent
+(This file should be printed in Landscape mode.)
+\emsg{This file should be printed in Landscape mode.}
+\vskip 1in
+
+\hoffset=-1.0cm
+
+\spine{\vbox to 1in{\vfill
+ \hbox to 18cm {\hfil\twentyfourbf \TeXsis : %%
+ \TeX\ Macros for Physicists \hfil}%
+ \vfill}
+}
+
+\end
+
+%>>> EOF TXScover.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSdcol.doc b/Master/texmf-dist/doc/texsis/base/TXSdcol.doc
new file mode 100644
index 00000000000..88c224e5ff3
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSdcol.doc
@@ -0,0 +1,300 @@
+%% file: TXSdcol.doc - Double Columns - TeXsis version 2.18
+%% @(#) $Id: TXSdcol.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1993 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\bs \texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+
+\section{Double Column Output \label{sect.dcol}}
+
+ Typesetting text in more than one column on a single page is more
+involved than typesetting text in a single page-wide column, but this
+extra effort can be rewarded with a document which looks much more
+professional and which can be easier to read (provided that the
+resolution of your printer is up to it). Many publishers of
+``\idx{camera-ready}'' conference proceedings require double
+column\index{double columns} \index{multiple columns|see{double
+columns}} typesetting, and the {\sl \idx{Physical Review}} and other APS
+and AIP journals are typeset in double columns. In order to make it
+easy for authors to prepare manuscripts either for such camera-ready
+conference proceedings or for submission to {\sl Physical Review}, we
+have included some powerful double column typesetting macros in \TeXsis.
+These macros can automatically balance columns which do not fill an
+entire page, and there are also provisions for equations which must be
+extended across both columns because they are too wide for a single
+column. Figures and tables (or other such ``floating'' insertions) can
+be put either in a single column or across both columns. The same is
+true for footnotes. By changing a single instruction in the manuscript
+file it is also possible to take a document which has been prepared for
+double columns and to print it in single column mode. The converse is
+not true --- typesetting text in double columns with automatic column
+balancing is a nontrivial task. While the macros generally behave as
+intended, more attention to the layout of the document is required, and
+even then the macros will sometimes fail without some extra guidance.
+It is not possible to divide three lines into two balanced columns! In
+such cases you must rearrange text or the placement of figures and
+tables, or explicitly select column or page breaks elsewhere in the
+document, in order to give \TeXsis\ some extra guidance on how best to
+format the page.
+
+%\bigbreak
+
+ In order to use the double column formatting macros you must first
+specify the size of the columns with the command
+\CS{SetDoubleColumns}\arg{c-width}. The width and height of the full
+page are taken from the current settings of \cs{hsize} and \cs{vsize},
+while the width of each column is \meta{c-width}. This re-defines
+\TeX's \cs{output} routine, so it should be called shortly after you say
+\cs{texsis}, before any output is actually produced, and it should only
+be called if double column output is to be produced.
+
+ \CS{SetDoubleColumns} only sets the column dimensions and
+prepares the \cs{output} routine for double column output at some point
+in the future --- it does not actually put you in double column mode.
+Text will still be set in a single page-wide column until you say
+\CS{doublecolumns}. After you say \CS{doublecolumns} text will be set
+in double columns until you say \CS{enddoublecolumns}. This will cause
+the text collected so far to be put into two ``balanced'' columns of the
+same height. You can, if you desire, return to double column mode at
+any later time by saying \CS{doublecolumns} again, and you can switch
+back and forth as much as you like. However, keep in mind that
+frequently switching between single and double columns will make it very
+difficult for \TeXsis\ to choose good points to break columns and pages,
+and you may get an error message warning you that a column cannot be
+balanced.
+
+%\bigbreak
+%\pagecheck{3cm}
+
+A simple example of the use of these double column commands is the
+following:
+\TeXexample
+\SetDoubleColumns{0.47\hsize}
+\doublecolumns\tenpoint
+{\bf BISMUTH} (Ger.\ {\it Weisse Masse}, white mass; later
+{\it Wismuth} and {\it Bisemutum}, Bi; at.~wt. 308.981;
+at.~no. 83; m.p. 271.3$^\circ$C; b.p. 1560 $\pm$ 5$^\circ$C;
+sp.~gr. 9.747 (20$^\circ$); valence 3 or~5. In early times
+bismuth was confused with tin and lead. Claude Geoffroy the
+Younger showed it to be distinct from lead . . .
+ . . . . . . .
+. . . High purity bismuth metal costs about \$4/lb.
+\enddoublecolumns
+|endTeXexample
+\noindent
+Here the column size is chosen to be slightly less than half of the
+\cs{hsize} (0.47 times the \cs{hsize}) to allow some space (called the
+``gutter'') between the two columns. The result is the
+following:\reference{CRC}
+\booktitle{Handbook of Chemistry and Physics}, 56th Edition,
+(CRC Press, Cleveland, Ohio, 1974), pg. B-9
+\endreference
+\medbreak
+
+% set up double column mode:
+\SetDoubleColumns{0.47\hsize}
+
+\doublecolumns\tenpoint\baselineskip=12pt plus 1pt \relax
+{\bf BISMUTH} (Ger.\ {\it Weisse Masse}, white mass; later {\it Wismuth}
+and {\it Bisemutum}, Bi; at.~wt. 308.981; at.~no. 83; m.p.
+271.3$^\circ$C; b.p. 1560 $\pm$ 5$^\circ$C; sp.~gr. 9.747 (20$^\circ$);
+valence 3 or~5. In early times bismuth was confused with tin and lead.
+Claude Geoffroy\index{Geoffroy, Claude} the Younger showed it to be
+distinct from lead in 1753. It is a white, crystalline, brittle metal
+with a pinkish tinge. It occurs native. The most important ores are
+{\it bismuthinite} or {\it bismuth glance} (Bi$_2$S$_3$) and {\it
+bismite} (Bi$_2$O$_3$). Peru, Japan, Mexico, Bolivia, and Canada are
+major \idx{bismuth} producers. Much of the bismuth produced in the U.S. is
+obtained as a by-product in refining lead, copper, tin, silver, and
+gold ores. Bismuth is the most diamagnetic of all metals, and the
+thermal conductivity is lower than any metal, except mercury. It has a
+high electrical resistance, and has the highest \idx{Hall effect} of any
+metal (i.e., greatest increase in electrical resistance when placed in
+a magnetic field). ``Bismanol'' is a permanent magnet of high coercive
+force, made of MnBi, by the U.S. Naval Ordnance Laboratory. Bismuth
+expands 3.32\% on solidification. This property makes bismuth alloys
+particularly suited to the making of sharp castings of objects subject
+to damage by high temperatures. With other metals, such as tin,
+\idx{cadmium}, etc., bismuth forms low-melting alloys which are extensively
+used for safety devices used in \idx{fire detection} and extinguishing
+systems. Bismuth is used in producing malleable irons and is finding use
+as a catalyst for making acrylic fibers. When bismuth is heated in air
+it burns with a blue flame forming yellow fumes of the oxide. The metal
+is also used as a \idx{thermocouple} material (has highest negativity
+known), and has found application as a carrier for U$^{235}$ or
+U$^{238}$ fuel in \idx{atomic reactors}. Its soluble salts are
+characterized by forming insoluble basic salts on the addition of water,
+a property sometimes used in detection work. Bismuth oxychloride is
+used extensively in cosmetics. Bismuth subnitrate and subcarbonate are
+used in medicine. High purity bismuth metal costs about \$4/lb.
+\enddoublecolumns
+
+\nobreak
+\medskip
+
+ The \cs{IEEE}, \cs{PhysRev}, and \cs{NorthHollandTwo} document formats
+described in \Sect{fmts} also use these double column macros.
+
+\bigbreak
+
+ Any document prepared for double column output using the macros just
+described can also be printed in the simpler single column mode very
+easily, simply by leaving out the \CS{SetDoubleColumns}. Without the
+initialization provided by \CS{SetDoubleColumns} the \cs{doublecolumns}
+and \cs{enddoublecolumns} commands do nothing (they are, in fact, the
+same as saying \cs{relax}). However, if you restore the
+\CS{SetDoubleColumns} command, or invoke one of the specialized document
+styles which use double column output (like \cs{PhysRev}) they will come
+back to life and perform as required.
+
+\bigbreak
+
+ In double column mode displayed equations that fit within a
+single column are typed within the usual |$$|\ttdots|$$|. If an equation
+is too long then it may have to be printed across both columns. This is
+easily done by saying \CS{longequation} before the |$$| which begins the
+equation and \CS{endlongequation} after the |$$| which ends the
+equation, like so:\index{double columns!long equations}%
+\TeXexample
+|smalltt\longequation
+$$
+\psi_{nlm}(r,\theta,\phi)
+ = [({2Z \over n a_0})^3 {(n-l-1)! \over 2n(n+l)!} ]^{1 \over 2}
+ \, (\rho)^l \, e^{-\rho / 2} \, \,
+ L_{n-l-1}^{2l+1} (\rho) \,\, Y_l^m(\theta,\phi)
+$$
+\endlongequation
+|endTeXexample
+\noindent
+The command \CS{longequation} invokes \cs{enddoublecolumns} to end
+double column mode and balance the partial double columns, and it will
+also draw a ruled line across the bottom of the left column. After the
+equation has been completed \CS{endlongequation} invokes
+\cs{doublecolumns} to go back to double column mode, and it also draws a
+rule across the top of the right column.
+
+ The purpose of these ruled lines is to guide the reader's eye from the
+incomplete left column to the right column above the equation, and to
+the top of the incomplete right column from the left column below the
+long equation. The default style of these rules is the same as is used
+by {\sl Physical Review}. The rules are drawn by macros called
+\CS{leftcolrule} and \CS{rightcolrule}, and these can be changed either
+by you or by a style file. For
+example, if you don't want these rules you can turn them off simply
+by redefining these macros to be \cs{relax}:
+\TeXexample
+ \def\leftcolrule{\relax}
+ \def\rightcolrule{\relax}
+|endTeXexample
+\noindent
+As with the other double column macros, \CS{longequation} and
+\CS{endlongequation} do nothing if they are invoked when double column
+mode has not been initialized with \CS{SetDoubleColumns}, to make it
+easy to print the document in single column mode.
+
+ Keep in mind that when dealing with long equations which span both
+columns, switching frequently between single and double columns will
+almost certainly cause trouble in balancing the double columns. Also
+note that each separate piece of double-column material forms its own
+group, so any definitions made inside that group will be forgotten
+outside it. To avoid this problem put all definitions at the beginning of the
+paper, before double column mode is begun. Alternatively, make your
+definitions global by using \cs{gdef} rather than \cs{def}.
+
+\bigbreak
+
+ Figures, tables, or other floating insertions can be inserted
+within a single column using the usual insertion commands of \TeX\ and
+\TeXsis:\index{double columns!insertions} \cs{topinsert}, \cs{midinsert},
+\cs{pageinsert}, \cs{bottominsert}, or \cs{heavyinsert}, all of which
+are terminated as usual by \cs{endinsert}. A \cs{midinsert} or
+\cs{heavyinsert} will appear in the column where it is called for,
+unless it won't fit, in which case it migrates to the next {\sl
+column} (rather than all the way to the next page). You can force an
+insertion into a particular column by placing {\sl within} the
+insertion either \CS{forceleft} or \CS{forceright}. Since insertions
+which have been forced into the left or right columns are handled
+separately, an insertion which fails to fit on a page is moved to the
+same column of the next page and not just to the next column. This means
+that if there are several figures per page, then the figures can
+easily appear in the wrong order. Also, a \cs{topinsert} which follows
+a wide equation on a page will be placed after the equation, not at
+the top of the page. Such problems can easily be corrected by moving
+the insertion to a better place in the manuscript file.
+
+
+Besides putting insertions in one column or the other, it is also
+sometimes desirable to be able to put an insertion across the full width
+of the page. These ``wide'' insertions can be made with ``wide''
+versions of some of the the insertions already mentioned:
+\CS{widetopinsert}, \CS{widepageinsert} and \CS{widebottominsert}
+(there is no such thing as |\widemidinsert| or |\wideheavyinsert|). These
+wide insertions behave just like their more conventional counterparts
+when in single column mode.
+
+ The standard \TeXsis\ macros for table and figure insertions
+described in \Sect{tbls} use \cs{topinsert} and cousins, and so make
+insertions within a single column in double column format.
+There are also macros to make two-column wide tables and figures:
+\index{double columns!figures and tables}%
+\description{Xwidetable}\clump
+%
+\itm{\CS{widetable}\arg{label\/}}
+Insert a two-column wide table, with the tag \meta{label\/}, at the top of the
+current page.
+%
+\itm{\CS{widefigure}\arg{label\/}}
+Insert a two-column wide figure, with the tag \meta{label\/}, at the top of the
+current page.
+%
+\itm{\CS{widetopfigure}\arg{label\/}}
+A synonym for |\widefigure|.
+%
+\itm{\CS{widefulltable}\arg{label\/}}
+Insert a two-column wide, full-page table, with the tag \meta{label\/}.
+%
+\itm{\CS{widefullfigure}\arg{label\/}}
+Insert a two-column wide, full-page figure, with the tag \meta{label\/}.
+%
+\enddescription
+\noindent
+These also behave correctly in single column document formats.
+
+\bigbreak
+%================
+
+Here is a summary of the commands which can be used to set-up and
+control double column mode:
+\description{Xdoublecolumns\quad}\clump
+%
+\itm{\CS{SetDoubleColumns}\arg{c-width}}
+Set up the double column format, using the current \cs{hsize} and
+\cs{vsize} for the total size of the page and \meta{c-width} for the
+column width.
+%
+\itm{\CS{doublecolumns}}
+Begin double column mode.
+%
+\itm{\CS{newcolumn}}
+Force a \idx{column break}, much like \cs{newpage} forces a page break.
+%
+\itm{\CS{enddoublecolumns}}
+End double column mode, making balanced double columns,
+%
+\itm{\CS{longequation}}
+Begins a ``long'' equation which cannot fit within one column
+and therefore must stretch across both columns. This balances the
+columns, putting a \CS{leftcolrule} below the left column, and then
+enters single column mode.
+%
+\itm{\CS{endlongequation}}
+Ends a long equation, returning to double column mode and
+putting a \CS{rightcolrule} above the right column of the text following.
+%
+\enddescription
+
+%>>> EOF TXSdcol.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSdoc.doc b/Master/texmf-dist/doc/texsis/base/TXSdoc.doc
new file mode 100644
index 00000000000..521fca0e85e
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSdoc.doc
@@ -0,0 +1,55 @@
+%% file: TXSdoc.doc - Manual Master File - TeXsis version 2.18
+%% @(#) $Id: TXSdoc.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1997 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+
+\book % ``book'' document style (mostly)
+
+\input TXSdocM.doc % special macros for this manual
+\markindexfalse % proof marks for index entries OFF!
+\ContentsSwitchtrue % be sure contents pages are made
+
+
+%% Save trees and print this double sided if you can. Otherwise,
+%% Uncomment this to get the page numbers correct for single sided.
+% \bookpagenumbersfalse
+
+
+% Uncomment the following line to make a HyperTeXt linked
+% version of the Manual: (Experimental)
+%\htmltrue % HyperText links ON
+
+
+\input TXSdoc0.doc % Title page
+\pageno = 1
+\input TXSintro.doc % introduction
+\input TXSfonts.doc % typestyles and line spacing
+\input TXSeqns.doc % equation numbering, easyparens
+\input TXSsymb.doc % special symbols
+\input TXSprns.doc % easy parentheses
+\input TXSrefs.doc % references
+\input TXStags.doc % labeling things
+\input TXSsects.doc % chapters and sections and titles
+\input TXSfigs.doc % figures and tables
+\TOCwrite{\string\pagecheck{2cm}}% skip to next page between major divisions
+\input TXSenvmt.doc % special text environments
+\input TXSfmts.doc % special document formats
+\input TXSletr.doc % letter and memo formats
+\input TXSdcol.doc % double column format
+\input TXSmisc.doc % miscellaneous macros
+
+\TOCwrite{\string\bigskip\string\nosechead{Appendices:}}% title in TOC
+\input TXSinstl.doc % appendix on installation
+\input TXSrevs.doc % appendix on revision records
+\input TXSapxF.doc % appendix on font tables
+\input TXSend.doc % end material, references, etc...
+
+\tracingstats=1 % how much memory did that use?
+
+\bye
+
+%>>> EOF TXSdoc.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSdoc0.doc b/Master/texmf-dist/doc/texsis/base/TXSdoc0.doc
new file mode 100644
index 00000000000..254c56eaa70
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSdoc0.doc
@@ -0,0 +1,293 @@
+%% file: TXSdoc0.doc - Manual Title Pages - TeXsis version 2.18
+%% @(#) $Id: TXSdoc0.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%=======================================================================*
+% (C) Copyright 1989, 1992, 1994, 1996 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta\texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+% First print the outside cover page and back
+
+\begingroup
+\pageno=0
+\nopagenumbers
+
+% Just define needed large fonts; otherwise some systems may run out
+% of font space!
+
+\font\fourteenbf=cmbx10 scaled \magstep2
+\font\sixteenbf=cmbx10 scaled \magstep3
+\font\twentybf=cmbx10 scaled \magstep4
+\font\twentyfourbf=cmbx10 scaled \magstep5
+
+\titlepage
+\pageno=0
+\null
+\begingroup
+ \singlespaced
+ \line{\hfill \TeXsis~\fmtversion}
+ \line{\hfill \revdate}
+\endgroup
+
+\vskip 1.0in plus 1fil
+
+\title
+\endcenter \flushleft \Tbf\singlespaced
+\twentyfourbf \TeXsis
+\vskip .25 cm
+\hrule height .2cm
+\vskip .1cm
+\hrule height .07cm
+\vskip .25cm
+\sixteenbf \TeX\ Macros for Physicists
+\endflushleft\center
+\endtitle
+
+\vskip 1.5in plus 1fil
+
+\flushleft
+\singlespaced\parskip=0pt
+{\fourteenbf Eric Myers}
+\vskip 3pt \hrule \vskip 3pt
+Department of Physics
+University of Michigan
+Ann Arbor, Michigan
+
+\vskip 2cm
+
+{\fourteenbf Frank E. Paige}
+\vskip 3pt \hrule \vskip 3pt
+Physics Department
+Brookhaven National Laboratory
+Upton, New York
+\endflushleft
+\endtitlepage
+
+% A blank page for the back of the cover page
+
+\null
+\pageno=0
+\newpage
+\endgroup
+
+%==================================================*
+% Now the inside title page
+
+\titlepage % begin title page
+\pageno=-1
+\nopagenumbers
+\line{\revdate \hfill \TeXsis\ \fmtversion} % a banner of sorts
+\vbox{\vskip.75in} % some whitespace
+\title % the title
+\TeXsis
+\TeX\ Macros for Physicists
+\endtitle
+\author
+Eric Myers
+Department of Physics
+University of Michgian
+Ann Arbor, Michigan 48109-1120~USA
+\endauthor
+\and
+\author
+Frank E. Paige
+Physics Department
+Brookhaven National Laboratory
+Upton, New York 11973~USA
+\endauthor
+%
+\abstract
+\TeXsis\ is a collection of \TeX\ macros for typesetting many kinds of
+physics documents, including research papers, preprints
+and ``e-prints,''
+conference proceedings, theses, books,
+referee reports,
+letters, and memoranda.
+%
+\TeXsis\ macros provide automatic numbering of equations, automatic
+numbering and formatting of references, double column formatting, macros
+for making tables and figures, with or without captions, and including
+tables with horizontal and vertical rules.
+%
+\TeXsis\ supports a wide variety of type sizes and a number of
+specialized document formats, and it even includes macros for making
+form letters for job applications or letters of recommendation.
+%
+This document describes version \fmtversion\ of \TeXsis, and also serves
+as an example of its use.
+%
+\endabstract
+\endtitlepage
+%======================================================================*
+% back page of title
+
+\pageno=-2 % page ``ii''
+\begingroup
+\tenpoint
+\TeXquoteon
+
+\centerline{\TeXsis: \TeX\ Macros for Physicists}
+\bigskip
+
+
+\noindent
+For the latest information about \TeXsis\ consult the \TeXsis\ home
+page, at
+\example
+\URL{http://www.texsis.org}
+\endexample
+
+
+\noindent
+Source code and documentation for \TeXsis\ are available via
+the Internet at
+\example
+\URL{ftp://ftp.texsis.org}.
+\endexample
+[You can also use ``anonymous ftp'' instead of a Web brower.
+In that case, run ftp on your computer and connect to
+ftp.texsis.org,
+give the login name "anonymous" and your e-mail address as the
+password. Issue the command ``{\tt cd texsis}'' to change to the {\tt
+texsis} subdirectory. ]
+
+The files for Unix machines are in a gzip compressed tar file
+with a name like {\tt TeXsis-X.XX.tar.gz}, where {\tt X.XX} is the
+version number.
+There are also subdirectories for \TeXsis\ packaged for Macintosh,
+PC's (DOS or Windows), VMS (Vax computers), Linux, and Amiga.
+The code is the same in any case, it's just packed differently for
+different machines.
+See the {\tt README} file on the TeXsis ftp server for more details.
+If you have problems with this server, please send e-mail to {\tt
+texsis@umich.edu}.
+
+The \TeXsis\ distribution on the TeXsis ftp server is also mirrored by
+CTAN (the Common TeX Archive Network).
+You may find it easier to get \TeXsis\ from a nearby CTAN site.
+To find the CTAN site nearest you finger
+\linkto{/cgi-bin/finger?ctan@ftp.tex.ac.uk}{\tt ctan@ftp.tex.ac.uk}.
+The files can be found in the directory {\tt macros/texsis/}.
+
+ Small improvements and bug corrections for \TeXsis\ are distributed
+as patches in the patch file |TXSpatch.tex|.
+If there is such a file in the |/texsis| directory you should copy it
+as well.
+
+
+\vfill
+
+ We would be grateful to hear of any errors found in this
+documentation or in the software, and we also invite suggestions for
+improvements to both.
+We try to correct errors as quickly as possible, and we try to improve
+\TeXsis\ as our time allows.
+When reporting an error in the code it would help a great deal if you
+would send us a copy of the relevant sections of the manuscript file,
+the log file, and if possible a sample of any output generated.
+It would be even better if you could break your example down into a
+short file that demonstrates the error on a single page or two.
+
+\vskip 0.5cm plus 1 fill
+
+\noindent
+To contact us send e-mail to {\tt texsis@umich.edu} or:
+\bigskip
+\settabs\+Internet Electronic Mail:\quad
+ & Boston Massachusetts 02215 USA\quad
+ & Brookhaven National Laboratory \cr % sample line
+\+Electronic Mail:
+& myers@umich.edu & paige@bnl.gov \cr
+\bigskip
+\+Surface Mail:
+ & Eric Myers & Frank E. Paige \cr
+\+& Department of Physics & Physics Department \cr
+\+& 2477 Randall Laboratory & Box 510A \cr
+\+& University of Michigan & Brookhaven National Laboratory \cr
+\+& Ann Arbor, MI 48109-1120 USA & Upton, NY 11973 USA \cr
+\bigskip
+
+
+% ----- DISCLAIMERS
+
+\vskip 0.25cm plus 1 fill
+
+\bigskip
+\noindent
+\TeX\ is a trademark of the American Mathematical Society.
+
+\noindent
+UNIX is a trademark of Unix System Laboratories, Inc.
+
+\noindent
+Copyright \copyright\ 1990, 1991, 1992, 1994, 1997, 1999
+by Eric A. Myers and Frank E. Paige.
+\hfill\break\noindent
+Distribution and/or modification of the \TeXsis\ source code and
+documentation is allowed under the terms of the
+\linkto{ftp://ftp.texsis.org/texsis/LPPL}{LaTeX Project Public
+License (LPPL)}.
+\TeXsis\ is distributed WITHOUT ANY WARRANTY; without even the
+implied warranty of merchantability or fitness for a particular purpose.
+
+
+\vskip 0.5cm plus 1fill
+\line{\fmtname\ \fmtversion \hfil Printed \today}
+
+\endgroup % end \tenpoint
+\eject
+
+% -- TABLE OF CONTENTS, page iii
+
+\vfill\eject % new page
+\pageno=-3 % contents on iii, iv, ...
+\nosechead{\fourteenbf \linkname{sect.TOC}{Contents}} % no section number
+\bigskip % needs some space
+\setHeadline{Table of Contents}%
+\def\ContentsFormat{\parskip=0pt\singlespaced %
+ \advance\baselineskip by 0.5pt plus 1pt minus 1pt}
+\tag{page.TOC}{\folio} % tag page for TOC
+\Contents % make table of contents
+
+
+% -- LIST OF TABLES AND FIGURES
+
+\vfill\eject
+
+\begingroup % keep changes local
+\parskip=0pt\singlespaced % like contents
+\advance\baselineskip by 1pt plus 1pt minus 1pt % like contents
+
+\vbox to 0.4\vsize{%
+ \nosechead{\fourteenbf List of Tables}% % no section number
+ \medskip % needs some space
+ \ListTables
+ \vfill} % list tables
+
+\bigskip
+\bigskip
+\nosechead{\fourteenbf List of Figures} % no section number
+\medskip % needs some space
+\ListFigures % list tables
+
+\endgroup
+
+% -- If the manual is to be printed double sided then we may need
+% an extra blank page in the head material to get it right.
+% if so, use this....
+
+\vfill\eject %
+
+\ifbookpagenumbers % only if page numbers for double sided
+ \ifodd\pageno\else % only if even
+ \global\def\HeadText{{\hss}}% clear heading
+ \vbox to \vsize{\vss
+ \centerline{This page was intentionally left blank}%
+ \centerline{(for double sided printing)}%
+ \vss}%
+ \fi
+\fi % end ifodd
+
+%>>> EOF TXSdoc0.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSdocM.doc b/Master/texmf-dist/doc/texsis/base/TXSdocM.doc
new file mode 100644
index 00000000000..5d0811e38c1
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSdocM.doc
@@ -0,0 +1,142 @@
+%% file: TXSdocM.doc - Macros for the Manual - TeXsis 2.18
+%% @(#) $Id: TXSdocM.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1997 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+% Document Format for the TeXsis manual:
+
+\ATunlock % allow @ macros here
+\twelvepoint
+\singlespaced % single spaced
+\singlelinetrue % for \description
+\Contentsfalse % don't bother with table of contents (DRAFT)
+
+\parskip=\medskipamount % some extra space between paragraphs
+\EnvRightskip=0pt % allow environments all the way right
+\RunningHeadstrue % do show running headlines
+
+\input epsf % epsf figures
+
+% We begin a new \section on a new page. This does it automatically:
+
+\def\everysection{\vfill\eject}
+
+\sectionminspace=0.25\vsize % subsections too
+\subsectionskip=2\baselineskip
+
+
+% -- Font selections:
+
+\def\Tbf{\sixteenpoint\bf}
+\def\tbf{\sixteenpoint\bf}
+\def\HeadFont{\tenpoint\sl} % print running headlines in slanted type
+\def\smalltt{\tenpoint\tt} % for long \TeXexample's
+\def\em{\sl} % \em for emphasis
+
+% -- some useful symbols and such
+
+\def\bs{\char92} % '\' for macro names
+\def\VT{\char'174} % vertical bar
+\def\offtt{\TeXquoteoff\tt} % \tt with | allowed
+\def\ttdots{{\tt\phantom{0}...\phantom{0}}}% '...' with correct spacing
+\def\lb{{\tt\char'173}} % { in \tt
+\def\rb{{\tt\char'175}} % } in \tt
+\let\rqbrack=\} % save right curly bracket
+\let\lqbrack=\{ % save left curly bracket
+
+
+% \meta{stuff} was our way of doing <stuff> in text. Knuth used
+% \<stuff> in the TeXbook, so I use that too. The only change
+% I made was to force \rm -EAM
+
+\def\<#1>{\leavevmode\hbox{$\langle$\rm #1\/$\rangle$}} % syntactic quantity
+\def\meta#1{\leavevmode\hbox{$\langle$\rm #1\/$\rangle$}} % new \meta
+
+% \arg is like \meta but it put's the <thing> in braces too.
+
+\def\arg#1{\lb\<#1>\rb}
+
+\def\Sect#1{Sect\-ion~\use{sect.#1}} % section number
+\obsolete\SEC\Sect % old synonym
+
+% \clump will ``clump'' closer together the material in a \definition
+% or \itemize
+
+\def\clump{% % "clump" \definitions and \itemize
+ \parskip=\baselineskip % \parskip is what \baselineskip was
+ \advance \parskip by 0pt plus 2pt % add some stretch
+ \singlespaced % singlespaced
+ \singlelinetrue} % long guys on own line
+
+% -- the ``competition''
+
+\def\TeXbook{{\sl The \TeX book}\index{TeXbook@{\TeXbook}}} % The TeXbook
+\def\LaTeX{% the LaTeX symbol
+ {\rm L\kern -.36em\raise .3ex\hbox {A}\kern -.15em\TeX}}
+\def\AmSTeX{% the AMSTeX symbol
+ $\cal A\kern-.1667em\lower.5ex\hbox{$\cal M$}\kern-.075em S$-\TeX}
+
+\def\BibTeX{{\rm B\kern-.05em\hbox{$\scriptstyle\rm IB$}\kern-.08em\TeX}}
+
+% modify \emsg to recognize thes
+
+\def\emsg#1{\relax% write an error/information message to the screen
+ \begingroup % disable special characters
+ \def\@quote{"}% % to output "
+ \def\TeX{TeX}\def\label##1{}\def\use{\string\use}%
+ \def\BibTeX{BibTeX}\def\LaTeX{LaTeX}%
+ \def\ { }\def~{ }% spaces are spaces
+ \def\tt{}\def\bf{}\def\Tbf{}\def\tbf{}%
+ \def\break{}\def\n{}\def\singlespaced{}\def\doublespaced{}%
+ \immediate\write16{#1}%
+ \endgroup}
+
+
+% -- some goodies from manmac.tex
+
+\def\bull{\vrule height .9ex width .8ex depth -.1ex } % square bullet
+\def\SS{{\it SS}} % scriptscript style
+\def\|{\leavevmode\hbox{\tt\char`\|}} % vertical line
+\def\dn{\leavevmode\hbox{\tt\char'14}} % downward arrow
+\def\up{\leavevmode\hbox{\tt\char'13}} % upward arrow
+
+\def\pt{\,{\rm pt}} % units of points, in math formulas
+
+\def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
+\def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
+\def\cstok#1{\leavevmode\thinspace\hbox{\vrule\vtop{\vbox{\hrule\kern1pt
+ \hbox{\vphantom{\tt/}\thinspace{\tt#1}\thinspace}}
+ \kern1pt\hrule}\vrule}\thinspace} % control sequence token
+
+% -- The index is constructed with index.tex and MakeIndex
+
+\input index
+\ATunlock % make sure @ is still a letter after index.tex
+%%\markindextrue % proof marks for index entries (DRAFT ONLY)
+
+% Use \cs{foo} to get \foo in \tt type and make an entry in the
+% index. Use \CS{foo} to get \foo in \tt type and make an BOLD
+% (defining) entry in the index.
+
+\TeXquoteoff % be sure | in \index is not active
+
+\def\cs#1{%
+ {\tt\bs #1}\index{#1@{\tt\bs #1}|pg}% % put it in text and index it.
+ \ifmarkindex % mark index entries in right margin?
+ \llap{\lower\jot\vbox to 0pt{\vss % box it
+ \tightboxit{\loosebox{\phantom{\tt\bs #1}}}}\hskip-\jot}%
+ \fi}
+
+\def\CS#1{%
+ {\tt\bs #1}\index{#1@{\tt\bs #1}|bold}% % put it in text and index it.
+ \ifmarkindex % mark index entries in right margin?
+ \llap{\lower\jot\vbox to 0pt{\vss % box it
+ \tightboxit{\loosebox{\phantom{\tt\bs #1}}}}\hskip-\jot}%
+ \fi}
+
+\TeXquoteon
+
+%>>> EOF TXSdocM.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSend.doc b/Master/texmf-dist/doc/texsis/base/TXSend.doc
new file mode 100644
index 00000000000..2939ab55900
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSend.doc
@@ -0,0 +1,137 @@
+%% TXSend.doc - End Material for the Manual - TeXsis version 2.18
+%% @(#) $Id: TXSend.doc,v 18.3 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989-1999 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta\texsis\input TXSdocM.doc\draft\fi
+
+\fourteenfonts
+
+\vfill\eject % start new page
+\nosechead{\fourteenbf Acknowledgments}% % no section number
+\addTOC{1}{Acknowledgments}{\folio}% % add to contents
+\global\def\HeadText{{\tenit Acknowledgments}}
+
+\noindent
+\TeXsis\ began as a collection of macros used by
+E.~Myers\reference{TeXsis-1.00}
+E.~Myers,
+\booktitle{\TeX sis Version 1.00} (unpublished)
+\endreference
+to typeset his Ph.D. thesis.\reference{Myers, 1984}
+E.~Myers,
+\booktitle{Calculation of the Gravitational Casimir Energy and Gauge Field
+Couplings in Non-Abelian Kaluza-Klein Theories},
+Ph.D.\ thesis (unpublished), Yale University, 1984
+\endreference
+These were in turn developed from a collection of macros
+for creating technical reports known as \idx{TechRpt}.
+We don't know for sure who wrote TechRpt, but the manual we used was
+written by W.~Groppe\reference{Groppe}
+W.~Groppe,
+\booktitle{TechRpt} (unpublished)
+\endreference
+so he may be the author of the macros as well.
+%
+The original \BibTeX\ support, including {\tt texsis.bst}, was written
+by Bernd Dammann.
+
+
+\bigskip
+
+
+We wish to thank Isabel Harrity\index{Harrity, Isabel} for her patience
+in trying this code while it was originally being developed.
+Various other people have also given us suggestions, criticisms, and
+comments regarding the code and documentation for \TeXsis; among them we
+would like to thank:
+ Vladimir Alexiev,
+ Betty Armstrong,
+ Akif Baysal,
+ Richard Brown,
+ Bernd Dammann,
+ Vickie Darnell,
+ Leo Eskin,
+ Mira Franke,
+ Ralf Gaertner,
+ Romano Giannetti,
+ Don Groom,
+ Donavan Hall,
+ Scott Hannahs,
+ Diab Jerius,
+ Arik Kapulkin,
+ Kate Logan,
+ Bob Love,
+ Michael Morrison,
+ T.C. Pierce,
+ Jeroen Rommers,
+ Norbert Roth,
+ Kurt Stump,
+ David Su\'arez de Lis,
+ Anil Trivedi,
+ and
+ Samir Varma.
+Additional suggestions are welcome and will be incorporated in future
+versions of \TeXsis\ when possible.
+
+This work was supported in part by the United States Department
+of Energy under contracts DE-AC02-76CH00016 and DE-AC02-89ER40509,
+and in part by the National Science Foundation under grant number
+PHY8919177.
+
+% -- LIST OF REFERENCES
+
+\nosechead{\fourteenbf References}% % no section number
+\addTOC{1}{References}{\folio}% % add to contents
+\setHeadline{References}% % running head text
+\ListReferences % print references
+
+% -- THE INDEX
+
+\vfill\supereject
+\SetDoubleColumns{0.47\hsize}
+\nosechead{\fourteenbf Index}
+\addTOC{1}{Index}{\folio}% % add to contents
+\tag{pg.index}{\folio}
+\setHeadline{{Index}}% % running head text
+\bigskip\bigskip
+\def\bold#1{\linkto{page.#1}{\bf #1}}% % boldface for |bold
+\def\italic#1{\linkto{page.#1}{\it #1}}% % italics for |italic
+\def\slanted#1{\linkto{page.#1}{\sl #1}}% % slanted for |slanted
+\def\pg#1{{\rm #1}}% % roman for |reg
+\index{recursion|see{recursion}} % I couldn't resist this -EAM
+%
+\immediate\openin\patchfile=Manual.ind % try to open the index file
+\ifeof\patchfile % EOF? Then it's not there
+ \closein\patchfile % so just close it.
+ \emsg{> Cannot find the processed index file Manual.ind.}%% tell them.
+ \meta{There is no index. I cannot find the file Manual.ind\/}
+\else
+ \immediate\closein\patchfile % close it to read with \input
+ \footline={{\hfil\tenpoint (Boldface page numbers are the defining
+ entries) \hfil}}% % helpful footline
+ \doublecolumns % index in double columns
+ \singlespaced
+ \baselineskip=14pt plus 1pt\relax % allow stretch
+ \input Manual.ind
+ \vfill
+ \enddoublecolumns
+\fi
+%
+\vfill\eject % next...
+\footline={\relax} % footline back to nothing
+
+% if the last page is even then print ``nothing'', for duplex printers
+
+\ifbookpagenumbers
+ \ifodd\pageno\else
+ \global\def\HeadText{{\hss}}% clear heading
+ \vbox to \vsize{\vss
+ \centerline{This page was unintentionally left blank.}% :-)
+ \vss}
+ \fi % end ifodd
+\fi
+% >>> EOF TSXend.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSenvmt.doc b/Master/texmf-dist/doc/texsis/base/TXSenvmt.doc
new file mode 100644
index 00000000000..34de0ac5927
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSenvmt.doc
@@ -0,0 +1,610 @@
+%% file: TXSenvmt.doc - Environments - TeXsis version 2.18
+%% @(#) $Id: TXSenvmt.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) copyright 1988, 1991, 1994 by Eric Myers and Frank E. Paige.
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\bs \texsis\input TXSdocM.doc\draft\input Manual.aux\fi
+
+
+\section{Environments \label{sect.envmt}}
+
+ \TeX\ ordinarily provides a layout appropriate for straight text
+and equations. The \TeXsis\ macros described below create environments
+which bypass the normal layout to format text in special ways, to create
+different types of lists, to display theorems and proofs, to display
+computer code, and even to print \TeX\ examples. With the exception of
+some of the specialized \TeX\ example macros, the syntax for all of
+these is generally of the form ``|\thing|...'' to begin the environment
+and ``|\endthing|'' to end it.
+
+%==================================================*
+\subsection{Flush or Centered Text}
+
+ There are three environments in \TeXsis\ which center lines, set
+them flush left, or set them flush right, respectively:
+\description{~endflushright~\qquad}\clump
+
+\itm{\CS{center}}
+Centers all lines which follow, up to |\endcenter|.
+
+\itm{\CS{flushleft}}
+The lines which follow, up to |\endflushleft|,
+are made to line up flush to the left margin.
+
+\itm{\CS{flushright}}
+The lines which follow, up to |\endflushright|,
+are made to line up flush to the right margin.
+\enddescription
+In all of these environments line endings
+in the input file {\sl are} obeyed, as with \cs{obeylines}.
+\index{lines!centering}\index{lines!flush left}\index{lines!flush right}%
+For example,
+\TeXexample
+\center
+A Centered Line
+and Another
+\endcenter
+|endTeXexample
+produces
+
+\center\singlespaced\parskip=0pt
+A Centered Line
+and Another
+\endcenter
+\noindent
+There is also a \CS{raggedcenter} environment which does not respect line
+breaks but instead produces centered lines each of which is made as long
+as possible:
+\description{~raggedcenter~\qquad}\clump
+\itm{\CS{raggedcenter}}
+Center lines without respecting line endings.
+Terminate with |\endraggedcenter|.
+\enddescription
+\goodbreak\noindent
+For example
+\def\|{\ifmmode\Vert\else \char`\|\fi}
+\TeXexample
+\raggedcenter
+In the ragged centering environment each line
+is made as long as possible, and
+the successive lines are centered.
+\endraggedcenter
+|endTeXexample
+produces
+\raggedcenter\baselineskip=\normalbaselineskip
+In the ragged centering environment each line
+is made as long as possible, and
+the successive lines are centered.
+\endraggedcenter
+\noindent
+Note that \cs{raggedcenter} does not hyphenate words.
+
+
+%==================================================*
+\subsection{Simple Examples and Quoted Text}
+
+ The \CS{example} environment can be used to display an example of
+something in a way that sets it off from the main text. The indentation
+of an example is the same as in the list environments (see
+\Sect{env-indent}). The text in an example will be single
+spaced, even if the rest of the document is double spaced. End this
+environment with \cs{endexample}. An example of the use of \CS{example}
+is
+\TeXexample
+|tentt\example
+Physics is not a finished logical system. Rather, at any
+moment it spans a great confusion of ideas, some that
+survive like folk epics from the heroic periods of the past,
+and other that arise like utopian novels from our dim
+premonitions of a future grand synthesis.
+\endexample
+|endTeXexample
+which produces\reference{Weinberg, 1972}
+S.~Weinberg,
+\booktitle{Gravitation and Cosmology: Principles and Applications of the
+General Theory of Relativity}
+(Wiley, New York, 1972) pg.~3
+\endreference\relax\index{Weinberg, Steven}
+\begingroup\tenpoint
+\EnvRightskip=\parindent % need this to show off defaults!
+\blockquote
+Physics is not a finished logical system. Rather, at any
+moment it spans a great confusion of ideas, some that
+survive like folk epics from the heroic periods of the past,
+and other that arise like utopian novels from our dim
+premonitions of a future grand synthesis.
+\endexample
+\endgroup
+Another example of \CS{example} is given in the next subsection as an
+example of the |\theorem| environment.
+
+Since one of the uses of \CS{example} is to display block quotes, as
+we've just done above, a synonym for \CS{example} is \CS{blockquote},
+which should be ended with \CS{endblockquote}.
+
+
+%==================================================*
+\subsection{Theorems and Proofs}
+
+ Theorems,\index{theorems} \idx{lemmas}, and \idx{corollaries} are
+typeset in a quasi-SIAM format, with the number in boldface and the text
+in slanted type.
+They are automatically numbered, including the chapter and
+section numbers if \cs{showchaptIDtrue} and \cs{showsectIDtrue} are
+being used. The syntax for a theorem is
+\example
+\CS{theorem}\arg{label} \n
+\meta{text} \n
+\cs{endtheorem} \n
+\CS{proof} \n
+\meta{text} \n
+\cs{endproof}
+\endexample
+\noindent
+and similarly for \CS{lemma}, \CS{corollary} and \CS{definition}.
+Definitions are printed in Roman type, not slanted. The
+\cs{endproof} macro inserts a black box to mark the end of the
+proof. Subsequent references to theorems, lemmas, corollaries
+and definitions can be made in the text automatically using
+\CS{Theorem}\arg{label}, \CS{Lemma}\arg{label},
+\CS{Corollary}\arg{label}, and \CS{Definition}\arg{label},
+which give the appropriate name and number. An example of a
+Theorem is:
+\TeXexample
+|tentt\example
+\theorem{Cauchy}
+If $f(z)$ is a function of $z$ which is analytic on and inside of
+a contour $C$, then
+$$
+\int_C f(z)\,dz = 0
+$$
+\endtheorem
+\proof
+Left as an exercise to the reader.
+\endproof
+\endexample
+|endTeXexample
+which produces
+\begingroup
+\EnvRightskip=\parindent % need this to show off defaults!
+\tenpoint
+\example
+\theorem{Cauchy}
+If $f(z)$ is a function of $z$ which is analytic on and inside of
+a contour $C$, then
+$$
+\int_C f(z)\,dz = 0
+$$
+\endtheorem
+\proof
+Left as an exercise to the reader.
+\endproof
+\endexample
+\endgroup
+\noindent
+Note the use of \cs{example} to indent the theorem and proof and print
+them single spaced. Had the \cs{example} been omitted the theorem and
+proof would have had the same margins and spacing as the rest of the text.
+This theorem would be referred to in the text with |\Theorem{Cauchy}|,
+which gives ``\Theorem{Cauchy}.'' This should be sufficient in most
+cases, but if necessary one can refer to theorem or lemma numbers with
+the primitive \cs{use}|{|\meta{type}.\meta{label}|}|, where \meta{type} is
+either |Thm|, |Lem|, respectively. See Section~\use{sect.labels} for
+more on the use of \cs{use}.
+
+
+%==================================================*
+\subsection{Listing Computer Code}
+
+ The \CS{Listing} environment can be used to display computer code
+or fragments of computer code. \index{listing computer code}%
+The text is printed in |\tt| type with line endings respected and every
+space counted. You can still use \TeX\ control sequences in this
+environment, but many of the special characters like |%|, |&|, and |#|
+are simply printable characters, since they are used in languages like
+C. (|$|, |_| and |^| also lose any special meaning in this
+environment.) Since the curly brackets used by \TeX\ are also used in C
+(and other languages) they are also simply characters in the |\Listing|
+environment. To perform grouping you should use \cs{bgroup} and
+\cs{egroup}. The backslash is also used in C as an escape character, so
+there has to be some way to print it --- you simply use |\\|; thus \cs{n}
+should be typed as |\\n|. You end the listing environment with
+\cs{endListing}. As an example here is a very famous little
+program,\reference{K&R}
+Brian W.~Kernighan and Dennis M.~Ritchie,
+\booktitle{The C Programming Language},
+(Prentice Hall, Englewood Clifs, NJ, 1978)
+\endreference
+\index{hello@``hello, world''}%
+%
+\Listing
+#include <stdio.h>
+main()
+{
+ printf("hello, world\\n");
+}
+\endListing
+\noindent
+which was created by simply typing,
+\TeXexample
+|tentt\Listing
+#include <stdio.h>
+main()
+{
+ printf("hello, world\\n");
+}
+\endListing
+|endTeXexample
+
+
+The indentation and spacing of the of the \CS{Listing} environment are
+controlled by the same parameters that control the indentation of the
+list environments, as described in Sect.~\use{sect.env-indent}. In
+addition, at the begining of the \CS{Listing} environment the macro
+\CS{everyListing} is executed, if it exists. You can define
+\CS{everyListing} to change the typestyle, type size, or spacing in the
+\CS{Listing} environment.
+
+An alternative way to list computer code is
+\CS{ListCodeFile}\arg{filename}, which will list the contents of a
+source code file exactly as it appears in the file (with no need to make
+|\n| into |\\n| and such). The call to this macro should {\sl not\/} be
+enclosed in a |\Listing| environment. If the example program above were
+contained in the source file |hello.c| it could be listed simply by
+typing
+\TeXexample
+\ListCodeFile{hello.c}
+|endTeXexample
+\noindent
+Long lines can bump up against the right margin.
+Some extra glue has been added to help allow for this, but another way
+to make such lines fit is to make the type size smaller before you
+invoke
+\CS{ListCodeFile} (you can do this using \CS{everyListing}).
+% MAYBE THE FOLLOWING GOES AWAY SOMEDAY SOON:
+Note also that tab characters in the code file may not be treated
+exactly correctly. In the present implementation of \TeXsis\ they will
+simply be replaced with eight spaces. We hope to be able to improve how
+this macro deals with tabs in in a future release of \TeXsis, but it is
+difficult to do it exactly right in all cases, so for now it may be best
+to change tabs to spaces in the source file if proper tab stops are
+needed. Most good editors (like emacs) already do this for you, so this
+should not pose much of a problem.
+
+
+%==================================================*
+\subsection{List Environments}
+
+ When you want to make a list of things there are several ways
+to do it. The items in the list can be marked by a simple marker
+(like a bullet: $\bullet$), by a number or numbers and letters (as in
+an outline), or by some sort of descriptive text in the margin.
+In Plain \TeX\ you
+would make all of these kinds of lists using the |\item| macro. The
+``list environments'' described below are generalizations of |\item| for
+making these various kinds of lists:\index{lists!different kinds}
+\description{~description~\qquad}\clump
+\itm{\CS{itemize}}
+List of paragraphs marked by a bullet ($\bullet$) or other symbol.
+\index{lists!itemized}%
+
+\itm{\CS{enumerate}}
+List of paragraphs labeled by numbers or by combinations of
+numbers and letters, as for an outline.
+\index{lists!enumerated}%
+
+\itm{\CS{description}}
+List of items and paragraphs describing them.\index{lists!text labels}
+\enddescription
+In each list environment \cs{itm} is used to introduce each individual
+item. The environments are terminated with \cs{enditemize},
+\cs{endenumerate} and \cs{enddescription}, respectively. The three
+different kinds of environments can be nested to produce a list with
+several levels. The indentation of and spacing above and below the list
+environments can be easily controlled. This is described in
+Section~\use{sect.env-indent}.
+
+
+% ----------
+\subsubsection{Itemized lists}\relax
+\CS{itemize} produces paragraphs marked by \idx{bullets}~($\bullet$)
+or some other appropriate symbol; {} % a little extra space in this line
+this is usually used for a short list with only a single level of
+nesting where the order \hbox{either} does not matter or is already
+contained in the items of the list.
+\index{lists!itemized}\index{itemizing}%
+%% WE NEED A BETTER SHORT EXAMPLE THAN THIS -- SOMETHING SIMPLER?
+For example, |\itemize| was used to produce the list of
+sections of this manual which begins
+on \linkto{page.itemize}{page~\use{page.itemize}}. The first few items in
+this list were produced by saying:
+\TeXexample
+|tentt\itemize
+\itm Sect.~\use{sect.intro}:
+An introduction to \TeXsis\ and the philosophy behind the macros, and
+instructions on how to begin using \TeXsis.
+\itm Sect.~\use{sect.fonts}:
+Selecting sizes and fonts of type, choosing single,
+double, or triple spacing, and automatically handling
+quotation marks.
+\itm Sect.~\use{sect.eqns}:
+Automatic numbering of equations, automatic sizing of
+parentheses and brackets, and special symbols for
+physics equations....
+|endTeXexample
+\goodbreak\noindent
+A paragraph begun by |\itm| is not indented beyond the new left margin,
+but paragraphs that follow {\sl are} indented unless |\noindent| is
+specified (or if they also begin with |\itm|).
+
+You can change the symbol used to mark each item in the list to be
+anything you want by creating your own definition of \CS{itemmark}.
+For example, if you want the symbol to be a \cs{square} you
+would define \CS{itemmark} to be
+\TeXexample
+\def\itemmark{$\square$}
+|endTeXexample
+\noindent
+before invoking \CS{itemize}, or at least before the first |\itm|.
+An example is the following important checklist:\reference{Banzai, 1984}
+\booktitle{The Adventures of Buckaroo Banzai across the Eighth
+Dimension}, (Twentieth Century Fox, 1984)
+\endreference
+\itemize
+\def\itemmark{$\square$}
+\itm Event timer started (display: SINED)
+\itm Antenna Aligned (display: SEELED)
+\itm Oscillation overthruster armed (display: DELIVERED)
+\enditemize
+This was produced by saying:
+\TeXexample
+\itemize
+\def\itemmark{$\square$}
+\itm Event timer started (display: SINED)
+\itm Antenna Aligned (display: SEELED)
+\itm Oscillation overthruster armed (display: DELIVERED)
+\enditemize
+|endTeXexample
+\noindent
+\CS{itemize} starts a new group, which is ended by the \cs{enditemize},
+so in this example \CS{itemmark} reverts back to its
+previous definition when the list is finished.
+You can get a ``check-mark'' symbol instead of a square by
+replacing \cs{square} with \cs{surd}, or you can use any other symbol
+that suits you. Note though that in this example
+the \cs{square} is enclosed in math
+quotes --- you will have to remember this for any symbol which is defined
+in math mode.
+
+% ----------
+\subsubsection{Enumerated lists}
+
+ \cs{enumerate} produces numbered paragraphs, either with a single level
+or nested several levels deep, like so:
+\index{lists!enumerated}%
+\TeXexample
+|tentt\tenpoint\parskip=0pt % this just makes our examples smaller
+\enumerate
+\itm Paragraph 1.
+\enumerate
+\itm sub-paragraph 1a.
+\enumerate
+\itm sub-sub-paragraph 1a(i).
+\itm sub-sub-paragraph 1a(ii).
+\endenumerate
+\itm sub-paragraph 1b.
+\itm and so on...
+\endenumerate
+\itm Paragraph 2.
+\itm and so on...
+\endenumerate
+|endTeXexample
+\noindent
+This produces the enumerated list:
+\def\ListExample{% Define once, use several times...
+ \tenpoint\parskip=0pt\medskip
+ \itm Paragraph 1.
+ \enumerate
+ \itm sub-paragraph 1a.
+ \enumerate
+ \itm sub-sub-paragraph 1a(i).
+ \itm sub-sub-paragraph 1a(ii).
+ \endenumerate
+ \itm sub-paragraph 1b.
+ \itm and so on...
+ \endenumerate
+ \itm Paragraph 2.
+ \itm and so on...}
+\enumerate
+\ListExample
+\endenumerate
+The default form for the paragraph numbering is called \CS{enumPoints},
+which produces numbers of the form $ii.jj.kk$. You can also have the
+list printed in a standard outline format with a mixture of Roman
+numerals, letters, and Arabic numerals by saying \CS{enumOutline}.
+\index{lists!enumerated!styles}%
+Doing so to the example above produces:
+\enumOutline\enumerate
+\ListExample
+\endenumerate
+Unless enclosed within a group,
+the \CS{enumPoints} or \CS{enumOutline} style selected remains in effect
+until it is changed. The punctuation following the item number is
+\CS{enummark}, which by default is a period (\hbox{.}) but which can be
+redefined by the user [for example, you can change it to |\rparen| to
+obtain numbering of the form ``\hbox{2\rparen}'']. \CS{enummark} can
+also be used to change the spacing between the numbers and the text that
+follows.
+
+A third enumeration style, called \CS{enumNumOutline}, is also available.
+Top level items are labeled by arabic numbers, the level below by
+lower case roman letters, and the level below that by lower case
+roman numerals. With \CS{enumNumOutline} the example above becomes:
+\enumNumOutline\enumerate
+\ListExample
+\endenumerate
+
+If you prefer a different style of enumeration you can create your
+own |\enumWhatever| to use in place of \CS{enumPoint} or
+\CS{enumNumOutline}. To do so, copy the definition of \CS{enumPoints} or
+one of its brothers, along with the comments that go with them, from the
+file |TXSenvmt.tex| into a file called |TXSmods.tex| (see
+Appendix~\use{install}) and then make the appropriate changes as
+described in those comments.
+\index{lists!enumerated!styles}%
+
+% ----------
+\subsubsection{Lists Labeled by Text}\relax
+\CS{description} is used to create a list of words or other
+items labeled by some text.
+The syntax is\index{lists!text labels}
+\example\tenrm
+\CS{description}\arg{sample text} \n
+\cs{itm}\arg{label 1} |Paragraph 1...| \n
+\cs{itm}\arg{label 2} |Paragraph 2...| \n
+\cs{itm}|{...}| \n
+|\enddescription|
+\endexample
+The argument \meta{sample text} is not printed, but its length is used
+to determine the indentation for the labels on the items, so it
+should be the longest item, followed by some extra space. For example, the
+descriptions of the flush and centered environments at the beginning of
+this section of the manual were typeset with
+\TeXexample
+|tentt\description{~flushright~\qquad}
+\itm{\CS{center}}
+Center each line.
+\itm{\CS{flushleft}}
+Set each line flush left.
+\itm{\CS{flushright}}
+Set each line flush right.
+\enddescription
+|endTeXexample
+since |\flushright| is the longest of the three items. (|\CS| is a
+special macro defined for this manual for printing control sequence
+names.) Each item in the list is separated by a \cs{parskip},
+just as in itemized or enumerated lists.
+
+If the label text for an item comes out wider than the space
+allowed, the text will usually be broken into several lines
+so that it will fit in the indented margin (if this is possible!).
+Saying \CS{singlelinetrue} will instead put the label text on a
+line by itself, above the item. \CS{singlelinefalse} is the default,
+but this manual has been printed with \CS{singlelinetrue}.
+
+
+%==================================================*
+\subsubsection{Spacing of List Environments \label{sect.env-indent}}
+
+Each of the list environments described above is surrounded by the
+following skips:
+\index{lists!indentation}%
+\TeXexample
+\EnvTopskip = \medskipamount % space above the list
+\EnvBottomskip = \medskipamount % space below the list
+\EnvLeftskip = 2\parindent % left indent for the list
+\EnvRightskip = \parindent % right margin moves in too
+|endTeXexample
+\noindent
+You can change these as you please to any legal \TeX\ dimension. The
+space between
+items which are begun by \cs{itm} is taken from the \cs{parskip}. Since the
+list environment begins a group you can change the |\parskip| inside
+this group to control the spacing between |\itm|'s. For example, if you
+wanted no extra space between the items in the list you could say
+set the |\parskip| to zero, as in,
+\TeXexample
+\itemize
+\parskip=0pt \def\itemmark{$\triangleright$}
+\itm Event timer started (display: SINED)
+\itm Antenna Aligned (display: SEELED)
+\itm Oscillation overthruster armed (display: DELIVERED)
+\enditemize
+|endTeXexample
+\noindent
+which would produce:
+
+\itemize
+\parskip=0pt \def\itemmark{$\triangleright$}
+\itm Event timer started (display: SINED)
+\itm Antenna Aligned (display: SEELED)
+\itm Oscillation overthruster armed (display: DELIVERED)
+\enditemize
+
+
+%==================================================*
+\subsection{\TeX\ example macros}
+
+ Typing \TeX\ examples can't be done in either the \cs{example}
+environment nor the |\Listing| environment, because the backslash must
+be turned into a simple printing character. There are several ways \TeXsis\
+allows you to show examples of \TeX\ code. First, to display \TeX\
+instructions separately, use
+\index{TeX@\TeX, typing examples}%
+\description{~TeXexample~\qquad}\clump
+%
+\itm{\CS{TeXexample}}
+Prints like an \cs{example}, but verbatim in \cs{tt} type, with
+``{\offtt |}'' made the escape character. Note that you must therefore
+say {\offtt |endTeXexample} to end the example, since "{\tt\bs}" is no
+longer the escape character!
+\enddescription
+To display \TeX\ instructions in running text use
+\description{~TeXexample~\qquad}\clump
+%
+\itm{\CS{TeXquoteon}}
+Make ``{\offtt |}'' a "\TeX\ quote" so that everything between
+{\offtt |}'s is printed verbatim in |\tt| type.
+%
+\itm{\CS{TeXquoteoff}}
+Turns off "\TeX\ quotes."
+%
+\enddescription
+
+All of the displayed examples in this document have been typed using
+\CS{TeXexample}, and many of the inline examples have been typed by
+putting \CS{TeXquoteon} at the beginning of the document and then typing
+{\offtt |\bs whatever\ttdots|}. For both \CS{TeXexample} and
+\CS{TeXquoteon} the only special character is the escape character
+``{\offtt |}''. In particular one must type
+\example\obeylines\tt
+\bs TeXexample
+\meta{TeX stuff}
+\char124endTeXexample
+\endexample
+with {\offtt |endTeXexample} instead of |\endTeXexample|. All other
+characters are set in |\tt| type without any interpretation. The input
+line breaks and spacing are respected, including any leading spaces on
+the lines. \TeX\ commands can be used within a |\TeXexample| environment
+by typing {\offtt |macro} in place of |\macro|, {\offtt |bgroup} and
+{\offtt |egroup} in place of |{| and |}|, etc. In particular, a {\offtt
+|} can be obtained by typing {\offtt |char124}. If you want to display
+the results of a complicated macro inside the |\TeXexample| environment
+you should probably define a different macro to display these results
+and then invoke that macro inside the environment. For example, in this
+manual we have sometimes inserted ``meta'' constructions showing where
+to insert a particular piece of text by using a |\meta| macro which
+encloses its argument in angle brackets (see the example immediately
+above). But in a |\TeXexample| you cannot say ``{\tt \VT meta\lb TeX
+stuff\rb},'' because the ``|{|'' and ``|}|'' are no longer grouping
+characters. Instead you could define the temporary macro |\tmp| as
+\TeXexample
+\def\tmp{\meta{TeX stuff}}
+|endTeXexample
+\noindent
+and then inside the |\TeXexample| environment simply type {\tt \VT tmp}
+to insert the phrase ``\meta{TeX stuff}''.
+
+The indentation and
+spacing of the |\TeXexample| environment are controlled by the same
+parameters that control the indentation of the list environments, as
+described in Sect.~\use{sect.env-indent}.
+The general method used by all of these macros to turn off \TeX's usual
+mechanism for interpreting special characters is discussed in \TeXbook,
+p.~421ff. The \cs{begintt} and \cs{beginlines} macros described there are
+included in \TeXsis\ for completeness.
+
+%>>> EOF TXSenvmt.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSeqns.doc b/Master/texmf-dist/doc/texsis/base/TXSeqns.doc
new file mode 100644
index 00000000000..d7c0e43aa90
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSeqns.doc
@@ -0,0 +1,370 @@
+%% file: TXSeqns.doc - Equations - TeXsis version 2.18
+%% @(#) $Id: TXSeqns.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta\texsis\input TXSdocM.doc\draft\fi
+
+\section{Equations \label{sect.eqns}}
+
+Plain \TeX\ was designed to make it easy to typeset equations
+and mathematical formulae. \TeXsis\ provides additional features
+that make the job even easier. Among these are the automatic
+numbering of equations (with the ability to refer to numbered equations
+by symbolic labels), automatic sizing of parentheses, and a
+collection of special symbols which are often used by physicists.
+
+\subsection{Equation Numbering \label{sect.eqno}}%
+In Plain \TeX\ equation numbers are added to displayed
+equations with the \cs{eqno} command, as described in Chapter~19 of
+\TeXbook. For example, typing
+\index{equations!numbering}
+\TeXexample
+$$ E=mc^2. \eqno (47) $$
+|endTeXexample
+will produce
+\offparens
+$$
+E = mc^2 \eqno (47)
+$$
+With \TeXsis\ the procedure for getting
+automatically numbered equations is similar, except that you use
+\CS{EQN} instead of \cs{eqno}, and what follows this (up to the
+``|$$|'') is not used as the number of the equation, but as an
+internal {\it label}\, for the equation. For example, if you had
+already used |\EQN| to create three numbered equations, then
+typing
+\eqnum=3
+\TeXexample
+$$ \vec F = -{G_N Mm \over r^2} \, \hat r
+ \EQN Newton $$
+|endTeXexample
+would produce
+$$
+\vec F = -{G_N Mm \over r^2} \, \hat r
+ \EQN Newton
+$$
+\TeXsis\ automatically assigns the next available equation number to
+the equation and prints this number on the right, in parentheses.
+The equations that follow the one above would be numbered 4.5,
+4.6, and so on.
+
+ The purpose of the "label" after the |\EQN| is to let you
+refer to the equation in the text without knowing the equation
+number that has been assigned to it. For example, to refer to
+\Eq{Newton} above, which has the label ``Newton'', you might type
+\index{equations!labeling}
+\TeXexample
+The dependence of the force on the inverse square of the distance
+can be seen in \Eq{Newton}.
+|endTeXexample
+This would be printed as:
+\example
+The dependence of the force on the inverse square of the distance
+can be seen in \Eq{Newton}.
+\endexample
+The control sequence \CS{Eq}\arg{label} gives the same result
+as typing "|Eq.~(|$nn$|)|", where $nn$ is the appropriate
+equation number for the given label. Two similar control
+words allow you to refer to a range of equations, or to refer to
+an equation simply by number, without the preceding "|Eq.~|."
+Typing \CS{Eqs}\arg{label} produces "Eqs.~($nn$)", while
+\CS{Ep}\arg{label} gives just the equation number associated
+with the label, enclosed in parentheses. Thus typing
+\TeXexample
+The class of metrics defined by \Eqs{cond-1} through
+\Ep{cond-5} can all be shown to satisfy inequality
+\Ep{triangle}, as well as the condition in \Eq{Killing}.
+|endTeXexample
+would produce output something like
+\example
+The class of metrics defined by Eqs.~(14) through
+(19) can all be shown to satisfy inequality
+(23), as well as the condition in Eq.~(7).
+\endexample
+
+ Almost any sequence of characters can be used as a "label" for
+an equation. This includes letters, numbers, and punctuation
+marks, but it is best to avoid \TeX's special characters, such as
+|\|, |&|, |}|, |{|, |$|, |_|, and |^|. Spaces may be included
+but will be ignored, and there {\sl is} a difference between
+uppercase and lowercase letters. Also, the semicolon (|;|) is
+reserved for a special purpose, which is described below.
+
+ You may want to give equations "names," as in the example
+called "Newton" above, or you can give the equations labels that
+are numbers. This is the best thing to do if the equations in
+the original manuscript already have numbers, but if you do this
+then you should be sure to remember that the internal label and
+the number which is printed (the ``external'' number) are not
+necessarily the same. If the equation {\it labeled} ``15'' is
+the fifteenth equation in the document then it will also be
+equation number 15, but if you move the equation around in the
+file so that it is the sixth equation in the document it will be
+printed as equation 6, even though it has the label ``15''.
+
+ If you have a heavily edited document and the arrangement of
+the numbers and labels gets confusing there is a useful aid to
+help straighten things out. If you say
+\example
+\CS{eqnotracetrue}
+\endexample
+then the equation numbers will be printed as usual, but with the label
+appearing next to it in the right margin in square brackets.
+For example, the equation
+\TeXexample
+$$
+(i\gamma^\mu \partial_\mu - m)\psi (x) = 0
+ \EQN Dirac $$
+|endTeXexample
+when printed with |\eqnotracetrue| would appear as:
+\begingroup\eqnotracetrue
+$$
+(i\gamma^\mu \partial_\mu - m)\psi (x) = 0
+\EQN Dirac$$
+\endgroup
+Since the label appears in the margin the spacing of your document
+remains exactly the same.
+Obviously you would not print the final copy of the document this way,
+but it can be very useful for editing. You can turn off this
+equation tracing feature anytime by saying \cs{eqnotracefalse}. If you
+say \cs{draft} at the beginning of your document then the equation
+tracing will be turned on automatically (along with some other useful
+features).
+\index{equations!labeling}
+
+\bigskip
+
+ Sometimes when several equations are closely related you will
+want to give the whole set the same equation number. To distinguish
+separate formulae in such a group you then generally add a letter to
+the number. You might, for example, have the equation
+\index{equations!multiple}
+$$
+J^2\ket{j,m} = j(j+1) \ket{j,m} \EQN eigen;a
+$$
+and then a short while later you might have the related equation
+$$
+J_z\ket{j,m} = m \ket{j,m} \EQN eigen;b
+$$
+These may be referred to together as \Eqs{eigen} or may be
+referred to separately as \Eqs{eigen;a} and \Ep{eigen;b}. To get
+an equation number with a letter in it you still use \CS{EQN}, but
+you add the appropriate letter to the end of the label, separated
+{from} the label by a semicolon. The equations above were created
+by typing:
+\TeXexample
+$$
+J^2\ket{j,m} = j(j+1) \ket{j,m} \EQN eigen;a
+$$
+|endTeXexample
+and
+\TeXexample
+$$
+J_z\ket{j,m} = m \ket{j,m} \EQN eigen;b
+$$
+|endTeXexample
+The semicolon is not printed --- it is just used to separate the
+letter from the label. If the letter is ``a'' then the next
+available equation number is used, as usual, but if the letter is
+anything else then the equation number is not incremented and
+instead the number from the previous equation is used. You can
+use any sequence of letters you like, although it is usually best
+to use ``a,b,c$\ldots$'' for consecutive equations.
+
+ To refer to equations that have both numbers and letters you
+can either use the letter to pick out a specific equation, or
+simply leave out the letter and use the label to refer to the
+whole set together. You can use either \CS{Eq} or \CS{Eqs} to do
+this. For example, the sentence after \Eq{eigen;b} above was
+created by typing
+\TeXexample
+These may be referred to together as \Eqs{eigen}
+or may be referred to separately as
+\Eqs{eigen;a} and \Ep{eigen;b}.
+|endTeXexample
+\index{equations!multiple}
+
+\bigskip
+
+ You will eventually encounter an equation that is so long that
+it has to be broken up into several lines, or you will want to
+print several equations together, lined up by their "$=$" signs.
+In plain \TeX\ you would use |\eqalign| to display these kinds of
+equations, or |\eqalignno| to display them with equation numbers.
+With \TeXsis\ you should use \CS{EQNalign} in place of
+\cs{eqalign} or \cs{eqalignno}
+to get automatically assigned equation numbers in aligned
+equations. As in plain \TeX, the alignment of the
+equations is controlled by |&| and |\cr|. An equation number is
+assigned to a particular line by putting |\EQN| followed by a
+label on that line, before the |\cr|. The label is everything
+{from} the |\EQN| up to the |\cr|. For example,
+\index{equations!alignment}
+\TeXexample
+|smalltt$$
+\EQNalign{
+{dp \over dt} &= - {\partial H \over \partial q}
+\EQN Hamilton-1 \cr
+{dq \over dt} &= {\partial H \over \partial p}
+\EQN Hamilton-2 \cr}
+$$
+|endTeXexample
+produces the two aligned and numbered equations
+$$
+\EQNalign{
+{dp \over dt} &= - {\partial H \over \partial q} \EQN Hamilton-1 \cr
+{dq \over dt} &= {\partial H \over \partial p} \EQN Hamilton-2 \cr}
+$$
+
+ \cs{EQNalign} can be used both for typing multi-part equations or for
+splitting an equation which is too long to fit on a single line.
+However, when splitting a single long equation into several lines it may
+actually be better to use |$$\eqalign{|\meta{formula}|}| followed by
+|\EQN| \meta{label}|$$|. For example, in
+$$
+\eqalign{
+{\cal L}_{NC} &= {-g \over 2\cos\theta_W} \sum_i
+ \bar\psi_i [ (t_{3,i}-2Q_i\sin^2\theta_W) \gamma_\mu
+ - t_{3,i}\gamma_\mu\gamma_5 ]\psi_i Z^\mu \cr
+&\quad - e \sum_i Q_i \bar\psi_i \gamma_\mu \psi_i A^\mu \cr}
+\EQN{NC}
+$$
+the equation number is centered between the two lines of the equation,
+which looks better.
+This equation was produced using \cs{eqalign} by typing:
+\TeXexample
+|smalltt$$
+\eqalign{
+{\cal L}_{NC} &= {-g \over 2\cos\theta_W} \sum_i
+ \bar\psi_i [ (t_{3,i}-2Q_i\sin^2\theta_W) \gamma_\mu
+ - t_{3,i}\gamma_\mu\gamma_5 ]\psi_i Z^\mu \cr
+&\quad - e \sum_i Q_i \bar\psi_i \gamma_\mu \psi_i A^\mu \cr}
+\EQN{NC}
+$$
+|endTeXexample
+
+ Closely related equations can be displayed together with the
+same equation number by following the label with a semicolon and
+a letter, as already described above. For example, the set of
+equations,
+$$
+\EQNalign{
+\nabla \cdot \vec D &= 4 \pi \rho \EQN EM;a \cr
+\nabla \times \vec E &=
+ - {1 \over c} {\partial \vec B \over \partial t}
+ \EQN EM;b \cr
+\nabla \cdot \vec B &= 0 \EQN EM;c \cr
+\nabla \times \vec H &= {4 \pi \over c} \vec J
+ + {1 \over c} {\partial \vec D \over \partial t}
+ \EQN EM;d \cr}
+$$
+is produced by typing:
+\TeXexample
+|smalltt$$
+\EQNalign{
+\nabla \cdot \vec D &= 4 \pi \rho \EQN EM;a \cr
+\nabla \times \vec E &=
+ - {1 \over c} {\partial \vec B \over \partial t}
+ \EQN EM;b \cr
+\nabla \cdot \vec B &= 0 \EQN EM;c \cr
+\nabla \times \vec H &= {4 \pi \over c} \vec J
+ + {1 \over c} {\partial \vec D \over \partial t}
+ \EQN EM;d \cr}
+$$
+|endTeXexample
+Note that the alignment of the equations is controlled by |&| and
+|\cr|, not by the arrangement used when the equation was typed
+into the manuscript file. Still, it is recommended that you
+arrange long sets of equations like these in some sort of clear
+pattern when you type them. This will both reduce errors when
+the equation is typed and make it easier for you to read the file
+when you are looking at it later. Remember, \TeX\ ignores all
+spaces and tabs when it reads material for equations or displayed
+equations.
+\index{equations!alignment}
+
+ \CS{EQNdoublealign} is similar to \cs{EQNalign} but makes
+equations with two alignment tabs. For example,
+\TeXexample
+|smalltt$$
+\EQNdoublealign{
+\sigma_i^2 &= 1 & \EQN Pauli;a \cr
+\sigma_i\sigma_j + \sigma_j\sigma_i &= 0 \qquad & (i \ne j)
+ \EQN Pauli;b \cr
+\sigma_i\sigma_j &= i\sigma_k \qquad & (i,j,k\ {\rm cyclic})
+ \EQN Pauli;c \cr}
+$$
+|endTeXexample
+produces
+$$
+\EQNdoublealign{
+\sigma_i^2 &= 1 & \EQN Pauli;a \cr
+\sigma_i\sigma_j + \sigma_j\sigma_i &= 0 \qquad & (i \ne j)
+ \EQN Pauli;b \cr
+\sigma_i\sigma_j &= i\sigma_k \qquad & (i,j,k\ {\rm cyclic})
+ \EQN Pauli;c \cr}
+$$
+with both the equal signs and the parentheses aligned. The second
+|&| is required in the first line, because without it the |\EQN| would
+have aligned the equation number with the parentheses enclosing $i\ne j$.
+
+ Plain \TeX\ also lets you display formulae on several lines
+without any alignment by using \cs{displaylines}. With \TeXsis\ you
+can use the similar control sequence \CS{EQNdisplaylines} to get an
+automatically assigned equation number for any line in such a
+display. The pattern is the same as in |\displaylines|, but you
+simply insert \cs{EQN}\meta{label} in front of the \cs{cr} on the
+line you want numbered. \CS{EQNdisplaylines} produces less space
+between the equations than would result from typing them
+separately, and generally looks better for closely related equations.
+
+ All of the equation alignment macros are special cases of the plain
+\TeX\ macro \cs{halign}. Therefore, if necessary, the vertical spacing can
+be adjusted by inserting
+\example
+\cs{noalign}\cs{vskip}\meta{dimen}
+\endexample
+where \meta{dimen} can be either a positive or a negative dimension.
+\bigskip
+
+ In a long document there are several different ways to number
+the equations. You could just start at ``1'' and count up for
+each new equation, but sometimes it is better to number the
+equations consecutively within each chapter or section of a
+document. In \TeXsis\ the default form for an equation number is
+$cc.ss.nn$ where $cc$ stands for the chapter number, $ss$ is the
+section number, and $nn$ is the equation number within that
+section. Whenever you move to a new section or chapter (using
+\cs{section} or \cs{chapter}, as described in
+Section~\use{sect.sects}) the number $ss$ or $cc$ is incremented
+by one and the number $nn$ is reset to one. If you are not using
+chapter divisions in your document then the chapter number $cc$
+is not made a part of the equation number, and the number $nn$ is
+reset only at the beginning of a section. If you are not using
+section divisions in your document then the section number $ss$
+is not made a part of the equation number, and the number $nn$ is
+reset to one only at the beginning of a chapter. If you use
+neither chapter nor section divisions in your document then
+neither the chapter number $cc$ nor the section number $ss$ will
+be made a part of the equation number, and the equations will
+simply be numbered consecutively, 1, 2, 3\dots.
+\index{equations!numbering}
+
+ Although the system just described for forming equation
+numbers gives a result that is usually what you will want for
+your equation numbering, you can change the method by setting
+either of two switches. If you say |\showchaptIDfalse| then the
+chapter number $cc$ will not be made a part of the equation
+number even though you may be using chapter level divisions in
+your document. Similarly, saying |\showsectIDfalse| prevents the
+section number $ss$ from being used in the equation number. The
+opposites of these two switches are \cs{showchaptIDtrue} and
+\cs{showsectIDtrue}. The equation number $nn$ is reset to one only
+when a section or chapter number that is supposed to be visible
+is incremented, as you might expect.
+
+%>>> EOF TXSeqns.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSfigs.doc b/Master/texmf-dist/doc/texsis/base/TXSfigs.doc
new file mode 100644
index 00000000000..06d77bc35d9
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSfigs.doc
@@ -0,0 +1,703 @@
+%% file: TXSfigs.doc - Figures and Tables - TeXsis version 2.18
+%% @(#) $Id: TXSfigs.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992,1993,1994, 1997 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta \texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+% Select the Penguin shown at the end of the section
+% (the one in the middle is always the Feynman diagram).
+
+%\def\penguin{penguin2} % to use Larry Ewing's Linux Penguin
+\def\penguin{penguin} % to use the Feynman diagram.
+
+
+
+\section{Figures and Tables \label{sect.figures}}
+
+Technical papers often include tables and/or figures. Regardless of how
+the contents of the figures or tables are created, these have a lot in
+common in the way they are generally treated. \TeXsis\ makes use of
+\TeX's \idx{floating insertion} capabilities (see Chapter~15 of
+\TeXbook) to insert figures and tables on the current page or on a
+following page. It is also possible to have figures or tables saved and
+printed at the end of the document. Captions are easily added either
+above or below the figure or table. Both kinds of objects are
+automatically assigned numbers, which are associated with internal
+labels so that they may be referred to in the text without having to
+know their order. It is possible to create a list of the figures and
+tables which appear in a document, much like creating a table of
+contents. Figures themselves
+are generally created outside of \TeX, either by hand
+or by computer graphics programs, while tables can be created using
+\TeX\ commands. The most complicated tables have vertical and
+horizontal lines (called ``rules'') to guide the reader's eye and to
+make the table more readable. \TeXsis\ has some very easy to use
+commands for making ruled tables.
+
+Before discussing \TeXsis's figure and table making macros in detail we
+should mention that \TeXsis\ also adds a new insertion class to those of
+Plain \TeX. In Plain \TeX\ saying \cs{topinsert}, \cs{midinsert} or
+\cs{pageinsert} begins a \idx{floating insertion} (ended by
+\cs{endinsert}) which will appear somewhere on the current page or a
+following page. Material entered with a \cs{topinsert} appears at the
+top of the current page, if there is room for it, or at the top of the
+next page where there is room. A \cs{midinsert} attempts to insert the
+text into the current page right where it is invoked, but if the
+insertion won't fit it becomes a \cs{topinsert}. Saying \cs{pageinsert}
+creates an insertion which takes up a whole page by itself.
+%
+In \TeXsis\ you can also say \cs{bottominsert} to make a \idx{floating
+insertion} that will appear at the bottom of the current page, if it
+will fit, or at the bottom of the next page where it will fit.
+There is also \cs{heavyinsert}, which like \cs{midinsert} tries first to
+insert the material into the current page right where it is called, but
+in this case becomes a \cs{bottominsert} if the material wont' fit.
+
+
+%==================================================*
+\subsection{Figures \label{sect.figs}}
+
+\TeX\ is designed for technical typesetting, but does not include a
+graphics standard, so to include a figure or drawing in a document
+it is necessary to
+leave blank space and to either glue the drawing in later or to arrange
+for the figure material to be inserted by some mechanism outside of
+\TeX\ when the page is actually printed (e.g., using the \cs{special}
+command or the \cs{epsfbox} command described later).
+
+ Imagine that you wish to insert into the text a drawing of a
+``\idx{penguin} diagram,'' which is about 6~cm tall. You could create
+the space for this figure at the top of a page, along with a caption,
+with the following commands:\index{figures}%
+\TeXexample
+|smalltt\figure{Penguin}
+\hrule
+\vskip 2cm
+\line{\hss (glue your penguin here) \hfil}
+\vskip 2cm
+\hrule
+\Caption
+Sample figure showing how easy it is to insert
+numbered figures with captions in \TeXsis.
+\endCaption
+\endfigure
+|endTeXexample
+\noindent
+This produces \Fig{Penguin} (we put the \cs{hrule}'s in just to show
+off the empty space). ``Penguin'' is the
+label for the figure, so to refer to the figure in the text we typed
+\CS{Fig}|{Penguin}|, which produced ``\Fig{Penguin}.'' The caption can be
+placed either before or after the figure: if it is to be at the top then
+\CS{Caption} must be the first token after |\figure|. As shown, the
+caption text must be terminated with \CS{endCaption}. When the caption is
+printed it will automatically start with the figure number in bold type,
+followed by the caption text. The caption is indented on both sides if
+it is more than one line long and centered otherwise.
+
+ \CS{caption}\arg{text} is equivalent to \CS{Caption}\meta{text}
+\CS{endCaption} and may be more convenient for short captions.
+It should be avoided for very long captions to keep from overflowing \TeX's
+internal memory.
+
+\figure{Penguin}
+\hrule
+\vskip 2cm
+\line{\hss (glue your \idx{penguin} here) \hfil}
+\vskip 2cm
+\hrule
+\Caption
+Sample figure showing how easy it is to insert
+numbered figures with captions in \TeXsis.
+\endCaption
+\infiglist{Sample figure showing how easy it is
+to insert numbered figures with captions in \TeXsis.}
+\endfigure
+
+ There are commands to create figures for each of the \idx{insertion
+classes} of Plain \TeX (that is, \cs{midinsert}, \cs{topinsert} and
+\cs{pageinsert}) along with the new insertion class
+added by \TeXsis\ (\cs{bottominsert}) .
+In addition, there are special commands for creating wide or full page
+figures while in double column mode (which is described later in
+Section~\use{sect.dcol}):
+\index{figures!placement}%
+\singlelinetrue
+\description{XfullFigureXXXXXX}\clump
+%
+\itm{\CS{figure}\arg{label\/}}
+Inserts a figure at the top of the current page, if there is enough room for
+it, or at the top of the next available page.
+%
+\itm{\CS{midfigure}\arg{label\/}}
+Inserts a figure at the current position, if there is enough room for it, or at
+the top of the next page if there is not.
+%
+\itm{\CS{fullfigure}\arg{label\/}}
+Inserts a figure on a separate page. The body of the figure should
+normally contain a \cs{vfill} to allow the figure to stretch to fill the
+whole page.
+%
+\itm{\CS{bottomfigure}\arg{label\/}}
+Inserts the figure at the bottom of the current page, if there is room
+for it, or on the bottom of the next page where there is room.
+%
+\itm{\CS{heavyfigure}\arg{label\/}}
+Inserts a figure at the current position, if there is room for it on the
+page, or at the bottom of the page following if there is not. This is
+therefore like \CS{midfigure}, except that if the figure can't be fit on
+the page it ends up on the bottom of a following page, not the top.
+%
+\itm{\cs{widetopfigure}\arg{label\/}}
+Inserts a figure at the top of a page across both columns in
+double column format. Equivalent to \CS{figure} in single column
+format. \cs{widefigure} is a synonym.
+%
+\itm{\cs{widefullfigure}\arg{label\/}}
+Inserts a full page figure across both columns in double column
+format. Equivalent to \CS{fullfigure} in single column format.
+%
+\itm{\CS{endfigure}}
+Ends any of the figure insertions described above.
+%
+\enddescription
+\noindent
+In all cases \meta{label\/} is an internal label which is assigned to
+the figure number. The figure number will include the chapter and
+section numbers in the format ``$cc.ss.nn$'' if \cs{showchaptIDtrue} and
+\cs{showsectIDtrue} have been selected.
+\index{figures!placement}%
+
+ The body of the figure can include any vertical mode
+commands, as in the example above. When you are simply leaving
+space for a figure to be glued in later a convenient way to specify the
+amount of space to leave is to \cs{vskip} by some amount proportional to
+the width of the current column or page. The dimension \cs{colwidth} is
+the width of the page (the \cs{hsize}) in single column mode and the width
+of the current column in double column mode. So for example, if you
+have a figure which was half again as tall as it is wide you could say
+\index{figures!size}%
+\example
+\cs{vskip} |1.5|\cs{colwidth}
+\endexample
+Another way to standardize the space reserved for figures is to define
+your own dimension, such as |\myfigsize|, to use in the \cs{vskip}
+above. For example,
+\TeXexample
+\newdim\myfigsize
+\myfigsize= 1.5\colwidth
+|endTeXexample
+\noindent
+and then |\vskip\myfigsize|. This has the same effect as the previous
+example, but |\myfigsize| can be changed to any valid dimension.
+\index{figures!size}%
+
+
+%==================================================*
+\subsection{Encapsulated PostScript Graphics}
+
+Instead of simply gluing figures into a paper by hand it is possible to
+have computer generated graphs and drawings automatically inserted into
+a document. Unfortunately, the method can vary from
+computer to computer and printer to printer. Recall that \TeX\
+produces as output a \idx{DVI file}, which contains device independent
+instructions for typesetting the document. To actually print the
+document the \idx{DVI file} must be translated into instructions for
+the specific printer being used by a suitable device driver. It is at
+this stage, when the device driver is converting the \idx{DVI file} to
+printer instructions, that graphs and drawings may be inserted.
+However, since different printers may require different kinds of
+instructions, there are many different device drivers, each having its
+own way of including drawings in the document.
+
+In recent years some standardization has become possible, because many
+printer manufacturers have chosen \idx{PostScript} as the ``language''
+for giving instructions to their printers. PostScript contains
+commands both for drawing and for typesetting text. Still, there are
+some problems, because there are many different device drivers for
+converting \idx{DVI file}s to \idx{PostScript}, and they all treat the
+inclusion of figures slightly differently. Also, while all of these filters
+require that the drawings to be included are themselves already in
+PostScript, there are several variations of \idx{PostScript}, leading to
+further problems of incompatibility.
+
+Until there is some standardization for inserting drawings into \TeX\
+documents (and perhaps to encourage it) we recommend using the scheme
+which (a) seems to be the easiest to use and the most well thought
+out, and (b) is potentially available to the widest group of users.
+Our choice is, first, to use a specific variation of PostScript known
+as ``Encapsulated'' \idx{PostScript} (EPS).
+\index{Encapsulated PostScript|see{PostScript}} Most newer computer
+programs which produce graphics output, including Mathematica, |xfig|,
+and |paw|, can produce EPS output files. To include these in the text
+we have chosen to rely on the program |dvips| \index{dvips} by Tomas
+Rokicki,\reference{Rokicki} Tomas Rokicki, \booktitle{{\tt dvips}
+User's Manual}.
+The source code for {\tt dvips} is available from CTAN
+in the directory {\tt dviware/dvips}
+\endreference
+\index{Rokicki, Tomas} along with his \TeX\ macros for including EPS
+graphics, called |epsf.tex|. Be warned that there are other programs
+called ``dvips,'' but as far as we know only Rokicki's version will
+work with |epsf.tex|. We expect that when including drawings in \TeX\
+is standardized, it will be based on Rokicki's scheme or something
+close to it.
+
+\bigskip
+
+To include EPS graphics in a document using the |epsf.tex| macros you
+must first input the macros. Somewhere early in your manuscript file you
+should put:
+\TeXexample
+\input epsf.tex
+|endTeXexample
+You can have the macros report the size of a figure when it is
+included by saying:
+\TeXexample
+\epsfverbosetrue
+|endTeXexample
+At the point where you want a graph or drawing included
+you simply say:
+\example
+\CS{epsfbox}|{foo.ps}|
+\endexample
+This will include the drawing from the file called `|foo.ps|,' which must
+already exist in the current directory. \TeX\ will leave enough room
+for the figure (by creating a box of the correct size) and will use a
+\cs{special} command to insert instructions into the DVI file telling
+the DVI to PS translator to read in the \idx{EPS file} |foo.ps|.
+
+Once the document has been processed by \TeXsis\ and the DVI file has
+been produced you will convert it to a PS file with the ``\idx{dvips}''
+program. If your DVI file is called |myfile.dvi| then the command is
+simply:
+\TeXexample
+dvips myfile
+|endTeXexample
+This will convert |myfile.dvi| to PostScript,
+and depending on how dvips is set up at your installation it will either
+put the output in the file |myfile.ps| or it will send it directly to
+the default printer (see the man pages for dvips on how to change this
+behavior, or try a short example to see how it is set up on your computer).
+Note that the EPS files to be included must be in the same directory as
+|myfile.dvi| when you run dvips, so that they can be merged into the final
+output file (or you can specify the full path filename in the
+\CS{epsfbox} command).
+
+On Unix systems you may not be able to use the |lpr -d|
+command if you have included EPS files in the document. This command
+runs the DVI file through dvips (or some other DVI to PS filter) in a
+different directory, and the EPS files will therefore not be included
+unless you have used a full path name for the file.
+
+
+If you use the latest version of
+the |xdvi| program to preview DVI files on your workstation
+you will find that it automatically includes EPS graphics in the
+display, but some other previewing programs (such as |texsun|, or older
+versions of |xdvi|) will not. Even if the previewer does not know how
+to deal with the \cs{special} commands in the DVI file, you will
+see that \TeX\ has left room for the figure. Once you have converted
+your DVI and \idx{EPS file}s into a PS file you can preview that file
+if you have a PostScript previewer, such as GhostScript. Then your
+graphs and drawings will appear just as they would if you had printed
+the PS file.
+
+\bigskip
+
+Sometimes you will find that more room has been left for the figure than
+is really needed. The way \CS{epsfbox} decides how much room to leave is
+by reading the first part of the \idx{EPS file} to find a line
+which looks like:
+\TeXexample
+%%BoundingBox: 67 176 544 616
+|endTeXexample
+\noindent
+The two pairs of numbers are the coordinates of the lower left and upper
+right corners of the figure, respectively. They are measured in
+printer's points (1/72${}{\hbox{nd}}$ of an inch). If you don't like
+the positioning of the figure given by the original bounding box in the
+PostScript file you can override it by specifying a new bounding box
+like so:
+\TeXexample
+\epsfbox[0 180 540 700]{file.ps}
+|endTeXexample
+\noindent
+You may have to experiment with positioning the BoundingBox for the best
+effect, and it may help to look at the \idx{PostScript} file to see what the
+default BoundingBox is and adjust things using that coordinate system.
+
+\bigskip
+
+You can also control the size of the included graphic using
+\CS{epsfxsize} or \CS{epsfysize} before you call \CS{epsfbox}. The
+figure will be enlarged or reduced to fit the dimension you specify.
+Saying
+\example
+\CS{epsfxsize}|=|\meta{dimen} \CS{epsfbox}|{figure.ps}|
+\endexample
+will scale the drawing in the file |figure.ps| so that its {\sl width\/}
+is \meta{dimen}, with the height scaled accordingly, while saying
+\example
+\CS{epsfysize}|=|\meta{dimen} \CS{epsfbox}|{graph.ps}|
+\endexample
+will scale the drawing in the file |graph.ps| so that its {\sl height\/} is
+\meta{dimen}, with the width scaled accordingly. You can only specify
+the width or height, but not both at the same time. Whatever change of
+size you specify will only be applied to the \CS{epsfbox} command which
+immediately follows. After that, subsequent included graphics will
+revert to their natural sizes unless you also specify a particular size
+for them.
+
+The \CS{epsfbox} command creates a box of the proper size, into which
+the figure is later drawn.
+That is all.
+If you want the figure to be centered across the page then you will
+have to do so yourself, using \cs{centerline} or something similar.
+The advantage of this is that since figures are simply treated as
+boxes, you can stack them or arrange them in a row, or do whatever
+else you would with boxes.
+This gives you much more flexibility to construct complicated figures
+from several EPS files.
+
+\figure{Penguin2}
+\centerline{\epsfysize=4cm\epsfbox{penguin.eps}}
+\Caption
+Example of including EPS graphics in a figure.
+\endCaption
+\endfigure
+
+So now consider the earlier example of including a 4~cm tall
+\idx{penguin} diagram in a figure, but now assuming that the drawing
+exists as an EPS graphic in the file |penguin.eps|.
+Assume also that we need to override the default bounding box in that
+file.
+The commands to do this are:
+\TeXexample
+\figure{Penguin2}
+\centerline{\epsfysize=4cm \epsfbox{penguin.eps}}
+\Caption
+Example of including EPS graphics in a figure.
+\endCaption
+\endfigure
+|endTeXexample
+\relax
+The results are shown in \Fig{Penguin2}.
+The drawing was created with Bill Dimm's {\sl FeynDiagram}
+package,\reference{FeynDiagram}
+Dimm, Bill,
+\booktitle{FeynDiagram Tutorial},
+available at \URL{ftp://ftp.hepth.cornell.edu}
+\endreference
+which is a set of C++ objects which make it fairly easy to create EPS
+\idx{Feynman Diagrams} by writing short C++ programs. It was converted
+from a |.ps| to a |.eps| file using |ps2epsi|.
+
+%==================================================*
+\subsection{Simple Tables \label{sect.tbls}}
+
+ Simple tables\index{tables!simple} (without ruled lines) are constructed
+in \TeX\ with \idx{alignment tabs} or with \cs{halign}. The reader who
+is not familiar with these should look at Chapter~22 in \TeXbook. In
+\TeXsis\ simple tables with table numbers and captions are
+treated much the same as figures. For example, saying
+\TeXexample
+|smalltt\midtable{table example}
+\caption{Charged leptons.}
+\centerline{\vbox{\halign{#\ \hfil & #\ \hfil & #\hfil \cr
+Name & Mass & Lifetime \cr
+$e^-$ & .511 MeV & $>2 \times 10^{22}$ yr. \cr
+$\mu^-$ & 105 MeV & $2.197 \times 10^{-6}$ sec. \cr
+$\tau^-$ & 1784 MeV & $3.3 \times 10^{-13}$ sec. \cr}}}
+\endtable
+|endTeXexample
+\noindent
+produces the following table, in the middle of the page:
+\vskip 0pt
+\midtable{table example}
+\caption{Charged leptons.}
+\centerline{\vbox{\halign{#\ \hfil & #\ \hfil & #\hfil \cr
+Name & Mass & Lifetime \cr
+$e^-$ & .511 MeV & $>2 \times 10^{22}$ yr. \cr
+$\mu^-$ & 105 MeV & $2.197 \times 10^{-6}$ sec. \cr
+$\tau^-$ & 1784 MeV & $3.3 \times 10^{-13}$ sec. \cr}}}
+\intablelist{Charged leptons.}
+\endtable
+\noindent
+Note the use of \cs{centerline} and a \cs{vbox} to center the table. The
+reference to this table in the text was produced by typing ``|\Tbl{table
+example}|.'' Note also that we used \cs{caption} followed by the text in
+brackets as an alternative method of defining the caption;
+However \cs{caption}
+should only be used when the caption is short. Table captions are
+traditionally placed above the table, so \cs{Caption} or \cs{caption} should
+be the first token after \CS{table}\arg{label\/} and its siblings.
+
+There are a number of different kinds of table insertions, and they
+match closely the different kinds of insertions used for figures:
+\description{xwidefullTablexx\qquad}\clump
+%
+\itm{\CS{table}\arg{label\/}}
+Inserts a table at the top of next available page.
+%
+\itm{\CS{midtable}\arg{label\/}}
+Inserts a table at the current position if there is room or at
+the top of a page if necessary.
+%
+\itm{\CS{fulltable}\arg{label\/}}
+Inserts a table on a separate page. The body of the table
+should normally contain a \cs{vfill}.
+%
+\itm{\CS{bottomtable}\arg{label\/}}
+Inserts the table at the bottom of the current page, if there is room
+for it, or on the bottom of the next page where there is room.
+%
+\itm{\CS{heavytable}\arg{label\/}}
+Inserts a table at the current position, if there is room for it on the
+page, or at the bottom of the page following if there is not. This is
+therefore like \CS{midtable}, except that if the table can't be fit on
+the page it ends up on the bottom of a following page, not the top.
+%
+\itm{\cs{widetoptable}\arg{label\/}}
+Inserts a table at the top of a page across both columns in
+double column format. Equivalent to \CS{table} in single column
+format.
+%
+\itm{\cs{widefulltable}\arg{label\/}}
+Inserts a full page table in double column format. Equivalent to
+\CS{fulltable} in single column format.
+%
+\itm{\CS{endtable}}
+Ends any of the tables above.
+%
+\enddescription
+Again, in these macros \meta{label\/} is an internal label which is assigned to
+the table number. The table number will include the chapter and section
+numbers in the format ``$cc.ss.nn$'' if |\showchaptIDtrue| and
+|\showsectIDtrue| have been selected. The table can then be referred to
+in the text by saying \cs{Tbl}\arg{label\/}.
+
+%==================================================*
+% RULED TABLES:
+
+\subsection{Ruled Tables \label{sect.ruled}}
+\input TXSruled.doc
+
+%==================================================*
+\subsection{Lists of Figures and Tables}
+
+In large technical documents it is often desirable to have a list of the
+figures and/or tables which appear in the document, along with a brief
+caption and the number of the page on which the figure or table appears.
+This is similar to
+a table of contents, but is separate from it. In \TeXsis\ you can add a
+figure or table to a list of figures or tables by using \CS{infiglist}
+after \cs{figure} or \CS{intablelist} after \cs{table}, similar to the
+way you would use \cs{caption}. The syntax is \CS{infiglist}\arg{text}.
+The text is the text of the (possibly abbreviated) caption which is to
+appear in the list of figures. Remember though, if a table has a
+caption it should
+appear above the table body, so the \cs{caption} must still be the first
+thing after \cs{table}; the \CS{infiglist} can come later.
+\index{lists!of figures}\index{lists!of tables}%
+
+As an example, consider the ``penguin diagram'' already discussed.
+To add an entry for this figure in the list of figures it
+would be entered as follows:
+\TeXexample
+\figure{Penguin}
+\centerline{\epsfbox{/home/fermi/qcd/penguin.eps}}
+\caption{Example of including EPS graphics in a figure.}
+\infiglist{Example of including a figure in the list of figures.}
+\endfigure
+|endTeXexample
+\relax
+The \cs{caption} text is what is put under the figure in the body of the
+paper, while the \CS{infiglist} text is what shows up in the list of
+figures, and these do not have to be the same.
+
+ To produce the list of figures at the end of the document you say
+\CS{ListFigures}, and similarly to produce the list of tables say
+\CS{ListTables}. Even if the list is to appear at the front of the
+document, along with the table of contents, you should print it at the
+end and move the list to the front afterwards. This is because until
+the document is actually processed \TeX\ does not know on which page the
+figure or table appears.
+
+ One word of caution: figures and tables are produced by putting them
+in ``floating inserts'', which \TeX\ saves up and prints when there is
+room. The entry into the list of figures or tables is not made until
+the item actually makes its way into the output DVI file. If you ask
+for the list of figures or tables before one of these items is output it
+will not be in the list, and in fact that entry for the figure or table
+list will later end up spewing out on your terminal. To be sure that
+all floating insertions have been output you should say \cs{supereject}
+before you print the list of figures or tables.
+
+%==================================================*
+\subsection{Listing Figure and Table Captions}
+
+When a manuscript is submitted to some journals, like the Physical
+Review, one is supposed to include a separate list of the captions of all
+figures and tables. This is similar to the lists created by
+\CS{ListFigures} and \CS{ListTables}, but the page numbers are not
+supposed to be included. It is very easy to use the caption information
+stored by \CS{infiglist} and \CS{intablelist} to make just a list of
+captions, without including the page numbers. The command to make a
+list of all the figure captions is \CS{ListFigureCaptions}, and
+similarly all the table captions can be listed with
+\CS{ListTableCaptions}. Just as with \CS{ListFigures} and
+\CS{ListTables} these should appear at the end of the job, so that all
+of the caption information will have already been stored.
+
+It should be said that this method of making a list of captions assumes
+that you have put the same captions under the figures, with \cs{Caption}
+or \cs{caption}, as the caption in the list of figures entered with
+\CS{infiglist}.
+
+ It may help to know a little bit more about how the macros
+\CS{ListFigures} and \CS{ListFigureCaptions} work. The \CS{infiglist}
+command writes the figure caption information you provide to a file
+which has the same name as your manuscript file but with the extension
+|.fgl|, meaning ``figure list'' (for tables the file name extension is
+|.tbl|). The page number on which the figure appears is also recorded
+in this file. When the whole document has been processed all of the
+figure captions will have been saved in this file, and \CS{ListFigures}
+and \CS{ListFigureCaptions} simply read this file back in. One of them
+uses the page numbers to construct a table of contents for the figures,
+while the other just prints out the figure captions by themselves. In
+either case, it is important that all the caption information be in the
+file when the list is to be made, which is why a \cs{supereject} may be
+necessary to flush all floating insertions to the output.
+
+%==================================================*
+\subsection{Printing Figures and Tables at the End of a Document}
+
+When working on a paper to be sent for publication it is sometimes
+necessary to print all of the figures at the end of the document. To cause
+this to be done you simply have to say
+\example
+\cs{FiguresLast}
+\endexample
+at some point before you call \cs{figure} and its relatives, and then put
+\example
+\cs{PrintFigures}
+\endexample
+\index{figures!at end of document}%
+\index{tables!at end of document}%
+\noindent
+at the end of the document. \cs{FiguresLast} causes \cs{figure} to save the
+definition of your figure in an auxiliary file instead of immediately
+creating the figure, and \cs{PrintFigures} reads the material back in from
+that file. If you say \cs{PrintFigures} without first saying
+\cs{FiguresLast} nothing will happen. You can return to having the
+figures printed where they are defined by saying \cs{FiguresNow}.
+In that case \cs{PrintFigures} does nothing; you have to have said
+\cs{FiguresLast} for \cs{PrintFigures} to read any stored figures back in.
+
+Tables can also be saved until the end of the document by saying
+\cs{TablesLast} and then \cs{PrintTables}. \cs{TablesNow} is the
+opposite of \cs{TablesLast}.
+
+\pagecheck{4cm}
+
+One important note: Since the figure or table material is copied to the
+file in which it is held one line at a time it is important to use
+\cs{Caption} and \CS{endCaption} for long captions instead of \cs{caption}.
+If you use \cs{caption} \TeX\ will try to read the whole caption at once,
+which may result in the error message
+``{\tt TeX capacity exceeded, sorry.}''\index{TeX capacity
+exceeded@{\tt TeX capacity exceeded, sorry}}
+
+
+%==================================================*
+\subsection{Nonstandard Figure and Table Placement}
+
+On rare occasions you may need to have a figure or table from one
+section of your document appear in another section of the document. For
+example, if the introductory section is very short but has a figure,
+that figure might end up at the top of the first page when you really
+want it to appear at the top of the second page. You can cause the
+figure to come out later by moving it farther back in the manuscript
+file, but if it is moved into the next section it will then have the
+wrong figure number.
+\index{figures!nonstandard placement}%
+\index{tables!nonstandard placement}%
+
+The solution to this problem is to have a way to override or modify the
+way figure and table numbers are assigned. Since the first part of the
+figure or table number is the chapter or section number you need to change
+this by saying
+\example
+\cs{setSectionID}\arg{something-else}
+\endexample
+This changes the section number part of the figure and table numbers to
+whatever you put as \meta{something-else}. It will also effect equation
+numbers, so it is best to have this inside of a group, so that the
+change goes away at the end of the group. Next you have to change the
+figure or table number. \TeXsis\ keeps count of tables and figures in
+global variables, and increments these counters globally when a new
+figure or table is created. Thus just changing the counter inside a
+group won't work, because the counter outside of the group would still
+be modified. To temporarily change the value of such a counter you use
+\example
+\cs{setcnt}\arg{counter}\arg{value}
+\endexample
+where \meta{value} is the temporary value to assign to the counter
+\meta{counter}. This should be done inside of a group, and when the
+group ends the counter will go back to its previous global value. You
+should only use \cs{setcnt} once within a given group!
+
+An example will make this procedure clear.
+Suppose that Figure~\use{Fg.intro.17} is a part of
+Section~\use{sect.intro}, but we wanted to show it much later in this
+Manual (such as right about now).
+It can be created in this section by saying:
+\TeXexample
+\begingroup % changes are temporary
+\setSectionID{1} % changes the section ID
+\setcnt\fignum{16}% figure counter is 1 less than we want
+\midfigure{intro.17}
+\centerline{\epsfysize=4cm\epsfbox{|penguin.eps}}
+\caption{A bizarrely placed figure for Section~\use{sect.intro}}
+\infiglist{A bizarrely placed figure for Section~\use{sect.intro}}
+\endfigure
+\endgroup % everything goes back the way it was
+|endTeXexample
+
+\begingroup % changes are temporary
+\setSectionID{1} % changes the section ID
+\setcnt\fignum{16} % figure number is 1 less than we want
+\midfigure{intro.17}
+\centerline{\epsfysize=4cm\epsfbox{\penguin.eps}}
+\caption{A bizarrely placed figure for Section~\use{sect.intro}}
+\infiglist{A bizarrely placed figure for Section~\use{sect.intro}}
+\endfigure
+\endgroup % everything goes back the way it was
+
+In this case the figure number in the counter \cs{fignum} is set to one
+less than the value we want, so that it comes out correctly when
+\cs{bottomfigure} increments the count. You can use \cs{setcnt} to
+modify any of \TeXsis's global counters. The complete list is given in
+Section~\use{sect.labels} (where the use of \cs{use} is also described).
+
+% If we are using Larry Ewing's penguin2.eps then we need to
+% acknowlege it:
+
+\def\tmp{penguin2}
+\ifx\penguin\tmp
+ The drawing in \Fig{intro.17}, which is the official \idx{Linux}
+ Penguin, was created by \idx{Larry Ewing} of Texas A\&M University
+ and turned into a scalable vector based postcript file by \idx{Neal
+ Tucker}.
+\fi
+
+
+By the way, you should never move a figure out of a {\sl Chapter},
+unless you move it to the end of the document, and the appropriate way
+to do that is with \cs{FiguresLast}.
+
+%>>> EOF TXSfigs.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSfmts.doc b/Master/texmf-dist/doc/texsis/base/TXSfmts.doc
new file mode 100644
index 00000000000..7923cea3982
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSfmts.doc
@@ -0,0 +1,604 @@
+%% file: TXSfmts.doc - Formats and Style Files - TeXsis version 2.18
+%% @(#) $Id: TXSfmts.doc,v 18.3 2001/04/06 21:52:07 myers Exp $
+%======================================================================*
+% (C) copyright 1994-2000 by Eric Myers and Frank E. Paige.
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\bs \texsis\input TXSdocM.doc\input Manual.aux\fi
+
+\section{Style Files and Specialized Formats \label{sect.fmts}}
+
+Section~\use{sect.papers} described the basic layout of a \TeXsis\
+document and the |\paper|, |\preprint|, |\Manuscript| and |\book| macros
+for typesetting simple documents. It is often necessary to modify the
+details of the layouts for such documents, particularly when submitting
+camera ready manuscripts for conference proceedings. Since \TeXsis\ is
+built on plain \TeX, you can of course use the full power of \TeX\ to
+format a document as you please. However, \TeXsis\ contains macros to
+produce documents in several of the common formats used in the physics
+community. These and other specialized formats are described in this
+section.
+
+It would be very inefficient for \TeXsis\ to load the definitions of all
+of the possible document styles listed below when at most only one of
+them will be used. \TeXsis\ therefore puts these specialized
+definitions in files known as ``style'' files (which generally have
+filename extensions of ``|.txs|'') and only loads the particular style
+file when it is needed. Besides saving space this also allows for quite
+a bit of flexibility, because it is easy to modify style files or to
+create new ones. For example, if the proceedings of a conference must
+be typeset in a particular way (as is often the case) then the commands
+to set-up a document in exactly the right way can be put in a style file
+and e-mailed to all conference participants. Another use of specialized
+style files is to define a \cs{thesis} format which conforms to the
+rules and regulations of a particular university.
+
+
+%=========================*
+\subsection{Specialized Document Styles \label{sect.styles}}
+
+The following styles for various conference proceeding formats,
+journals, and thesis formats are distributed with \TeXsis~\fmtversion.
+Use these in place of |\paper| or |\preprint|. The name of the style
+file from which the definitions are loaded is shown in brackets.
+%
+\description{XNorthHollandTwo\quad}\clump
+%
+\itm{\CS{AIPproceedings}}
+Similar to |\paper|, but specialized to the American Institute of
+\hbox{Physics} (AIP) format. [AIP.txs]
+%
+\itm{\CS{IEEEproceedings}}
+An IEEE format using oversized double column paper. See \Sect{dcol}.
+[IEEE.txs]
+%
+\itm{\CS{IEEEreduced}}
+An IEEE format reduced to 75\% of full size and printed with 9~pt.\
+type for $8\frac{1}{2}\,{\rm in} \times 11\,{\rm in}$ paper. [IEEE.txs]
+%
+\itm{\CS{NorthHolland} }
+Format for producing camera-ready copy for proceedings published by
+North-Holland/Elsevier. This is a single column format with titles
+and authors left justified and in eleven point type. [Elsevier.txs]
+%
+\itm{\CS{NorthHollandTwo}}
+The North-Holland double column format for oversized paper.
+[Elsevier.txs]
+%
+\itm{\CS{nuclproc}}
+The ``NUCLPROC'' style for Nuclear Physics Proceedings. [nuclproc.txs]
+%
+\itm{\CS{WorldScientific}}
+Similar to |\paper|, but specialized to the World Scientific
+proceedings format. [WorldSci.txs]
+%
+\itm{\CS{PhysRev}}
+Emulates the page layout and appearance of the {\sl Physical Review}.
+[PhysRev.txs]
+%
+\itm{\CS{PhysRevManuscript}}
+Similar to |\Manuscript| but customized for papers submitted to the
+{\sl Physical Review}. [PhysRev.txs]
+%
+\itm{\CS{thesis}}
+Similar to \cs{book}, but for printing a thesis. The default
+|\thesis| format conforms to the requirements of the Yale
+Graduate School, but it can (and probably should) be modified for
+your own installation. [thesis.txs]
+%
+\enddescription
+Other even more specialized styles are available, and some of them
+can be found on the \TeXsis\ anonymous ftp server, in the directory
+|/pub/texsis/styles|.
+
+\bigskip
+
+The IEEE and North Holland double column formats in the list above use
+the double column macros described in Sect.~\use{sect.dcol}. For
+example, \cs{NorthHollandTwo} sets up a document with an overall width
+of 21.3~cm, a page length of 27.1~cm and a column width of 10.0~cm.
+(Note that this is just about as wide or a little wider than most
+small laser printers can print, so provisions have been made for
+shifting the printed page horizontally to print one column at a time
+if necessary.) A document printed with this format might have the
+following basic structure:
+\TeXexample
+|smalltt\texsis
+\NorthHollandTwo % set up double columns
+\titlepage % but still single column mode
+
+ |<title page material>
+
+\endtitlepage % ends the title material
+\doublecolumns % now start double column mode
+
+ |<text of paper>
+
+\enddoublecolumns % balance the final columns
+\bye
+|endTeXexample
+\noindent
+Saying \cs{NorthHollandTwo} only defines the double column layout; it
+does not turn on double column mode. The title material is printed in
+single column format across the full page width, then the main body is
+printed in double column format once \cs{doublecolumns} appears. It is
+important to say \cs{enddoublecolumns} at the end of the document to
+balance the columns on the last page. Formatting text in balanced
+double columns can be quite tricky, so you should read \Sect{dcol}
+carefully before trying to use any of the double column macros.
+
+%==============================*
+\subsubsection{Physical Review Formats}
+
+The \CS{PhysRevManuscript} style is similar to \cs{Manuscript} but is
+customized to satisfy the requirements for manuscripts submitted to
+the {\sl Physical Review}. It uses true double
+spacing, and it places the tables and figure captions at the end of
+the document. By simply switching from this to \cs{preprint} you should
+be able to produce a version suitable for distribution as a preprint
+from the same manuscript file.
+
+The \CS{PhysRev} and \CS{PhysRevLett} styles are not intended for
+submission but rather emulate the page layouts in the {\sl Physical
+Review} and {\sl Physical Review Letters} respectively. We have
+attempted to reproduce accurately the double column layout, headlines,
+footlines, reference style, etc., used in the actual journals. This
+is still work in progress, but it may be useful both to see how a
+paper would look in print and as an example for constructing other
+styles. Setting up the headlines and page numbering requires calling
+a few extra macros:
+%
+\example
+|\texsis| \n
+|\PhysRev| \n
+|\TitleBanner{|\meta{Running Title Headline}|}| \n
+|\AuthorBanner{|\meta{Running Author Headline}|}| \n
+|\VolumeBanner{|\meta{series}|}{|\meta{vol}|}{|\meta{issue}%
+|}{|\meta{page}|}| \n
+|\titlepage| \n
+...
+\endexample
+%
+In |\VolumeBanner| the \meta{series} should be one of A, B, C, D, E,
+for the {\sl Physical Review} or L for {\sl Physical Review Letters};
+the volume, issue, and starting page arguments are self-explanatory.
+Both \CS{PhysRev} and \CS{PhysRevLett} typeset the document in double
+columns, so to make full use of these layouts you will need to read
+about the double column macros described in \Sect{dcol}.
+In particular, you should be aware of the following: in both the
+\CS{PhysRev} and \CS{PhysRevLett} styles, double column mode is begun
+automatically at the end of the title material (\cs{endtitlepage}).
+Since any double column material is inside a group, any definitions made
+at that point will only be defined inside that group. If you want to
+define macros for use in the rest of your paper, you should do so before
+the title material (or use \cs{gdef}).
+
+
+%=========================*
+\subsubsection{Thesis or Dissertation Format}
+
+The style file {\tt \idx{thesis.txs}} contains two alternative
+definitions of \CS{thesis}, one for Yale University (called
+|\YaleThesis|) and the other for the University of Texas at Austin
+(called |\UTthesis|). The default is that saying \CS{thesis} gives you
+|\YaleThesis|, but this is easily changed by saying |\let\thesis=\UTthesis|.
+
+If you are not at Yale or UT you will need to change the
+macros in |thesis.txs| to create your own version of the \CS{thesis}
+macro. Every university has different requirements for how a thesis is
+typed or typeset, and these requirements often conflict. Perhaps the
+first thing you should do if you want to write a thesis using \TeXsis\
+is find out if someone else at your university has already done so, and
+then copy their definition of \CS{thesis}. If you end up creating a
+new style file for your university then we hope that you will make it
+available for other students to use. We would also be willing to help,
+by putting such style files on the \TeXsis\ anonymous ftp server.
+If you have such a file (or other macros) you would like to contribute,
+send us e-mail at {\tt texsis@texsis.org}.
+
+
+%=========================*
+\subsection{Creating New Styles}
+
+It is very easy to create a new document style and style file.
+By convention, \TeXsis\ style files end with the filename extension
+``|.txs|,'' so all you need to do is put the definitions and macros
+defining this new document style into such a file, and then read that
+file in when beginning the document. For example, suppose you create a
+style file called |mine.txs| which contains a document style called
+|\mystyle|, which is a slightly altered version of \cs{paper}:
+\TeXexample
+\def\mystyle{\paper
+ \hsize=|<dimen>
+ \vsize=|<dimen>
+ \showsectIDfalse
+ ...
+ }
+|endTeXexample
+\noindent
+You could then simply read in this file at the beginning of the document,
+with \cs{input}, and then invoke |\mystyle|, like so,
+\TeXexample
+\input mine.txs
+\mystyle
+|endTeXexample
+
+However, you may have noticed that none of the special document styles
+mentioned in \Sect{styles} were actually loaded with \cs{input},
+although they are in fact read from a style file. This was done using
+the \CS{autoload} command. Saying
+\TeXexample
+\autoload\AIPproceeings{AIP.txs}
+|endTeXexample
+defines |\AIPproceeings| to be a simpler instruction which, if invoked,
+automatically loads the style file |AIP.txs|, which contains the real
+definition of |\AIPproceedings|. After the style file has been loaded
+this real |\AIPproceedings| is automatically called. It then appears as
+if the definition of the macro was in \TeXsis's memory all the time,
+though it really was only loaded from the file when called for.
+
+As a practical example of using \CS{autoload}, suppose that you are a
+student at Excited State University and you want to create a customized
+\cs{thesis} macro which will load automatically from a style file called
+|ESUthesis.txs|. You could copy the macros in the file |thesis.txs|
+to this new file, and then edit them as needed. Then, to make the
+new definition load automatically you would say
+\TeXexample
+\autoload\thesis{ESUthesis.txs}
+|endTeXexample
+\noindent
+To make this new definition of \cs{thesis} available to
+anyone using \TeXsis\ on your machine you would want to put this
+\CS{autoload} command in the file |TXSsite.tex| before building the
+\TeXsis\ format. This is described in more detail in Appendix~\use{install}.
+To make the new definition automatically available just to you in your
+thesis directory you could put the command in a file called
+|TXSmods.tex| in that directory.
+
+Important note: many \TeXsis\ style files and source files use the ``|@|''
+character in the names of macros which are to be ``hidden'' from the
+casual user. Since ``|@|'' is not a letter these macros can't normally
+be used. If you are writing a style file which needs to use these
+hidden macros you should say \CS{ATunlock} first, to make ``|@|'' a
+letter, and then \CS{ATlock} when you are done to turn ``|@|'' back
+into a non-letter.
+
+
+
+
+\Ignore % The stuff below is maybe way too technical?
+
+You may also need to make changes in some of more complicated macros.
+This is most easily made by copying the original definition from one
+of the |TXSxxxx.tex| files into |mine.txs| and editing it. For
+example, if you want the abstract to be in 9~pt.\ type, copy the
+definition of |\abstract| from |TXStitle.tex| and add |\ninepoint| to
+it:
+%
+\TeXexample
+|smalltt\def\abstract{% begin abstract of a paper or treatise
+ \endmode % end any previous field
+ \bigskip\bigskip % some space above
+ \centerline{ABSTRACT}% % ``ABSTRACT''
+ \medskip % space below that
+ \bgroup % begin \abstract group
+ \let\endmode=\endabstract % \endmode ends \abstract
+ \narrower\narrower % bring in margins
+ \ninepoint % NEW FOR \mystyle STYLE
+ \singlespaced} % single spaced
+|endTeXexample
+
+While some of the macros you need to change may be complicated, the
+changes \hbox{you} will actually need to make will probably still be fairly
+simple. For example, in the definition of |\section| in |TXSsects.tex|
+you probably want to change only the part that actually prints the
+section heading. This is a small part of the whole and is reasonably
+well commented. The default is to print the section head left
+justified, ragged right, with a hanging indentation whose width is set
+by the section number:
+%
+\TeXexample
+|smalltt%
+% Print the Section title:
+%
+ \ifx\tbf\undefined\def\tbf{\bf}\fi % default \tbf is \bf
+ \vbox{% % keep heading in \vbox
+ {\raggedright %
+ \pretolerance=2000\hyphenpenalty=2000 % no hyphenation
+ \setbox0=\hbox{\noindent\tbf\@fullID}%% find width of ID
+ \hangindent=\wd0 \hangafter=1 % for hanging indent
+ \noindent\unhbox0{\tbf{#1}}\relax % number and title
+ \medskip}}% %
+ \nobreak %
+|endTeXexample
+%
+If instead you want the section headings to be centered with two
+spaces (|\ \ |) after the number, you can replace this part of the
+|\section| macro
+%
+\TeXexample
+|smalltt%
+% Print the Section title:
+%
+ \ifx\tbf\undefined\def\tbf{\bf}\fi % default \tbf is \bf
+ \vbox{% % keep heading in \vbox
+ {\raggedcenter % USE RAGGED CENTER
+ \tbf\@fullID\ \ #1 % ID AND TITLE
+ \endraggedcenter % END RAGGED CENTER
+ \medskip}}% %
+ \nobreak %
+|endTeXexample
+%
+\noindent
+You can leave the rest of the \cs{section} macro alone and it will work
+as before.
+
+\endIgnore
+
+
+
+%==================================================*
+\subsection{Overhead Transparencies (Slides)}
+
+\TeXsis\ contains a simple \CS{slides} format for making overhead
+transparencies or similar material.
+While \TeX\ is not a convenient language for graphical page layout, it
+is sometimes useful to be able to convert a paper to transparencies or
+visa versa.\Footnote*{However, until recently one of the
+authors of \TeXsis\ preferred to make neatly lettered transparencies by
+hand, using colored pens, rather than using a printer that could only
+print in black and white.
+He's changed his mind now that it is possible to produce text
+in color.}
+If you want to use |\slides|, simply begin your manuscript file with
+%
+\TeXexample
+\slides
+|endTeXexample
+instead of (or in addition to) |\texsis|.
+%
+This will produce
+%% NOT ANYMORE $8\frac{1}{2}\,{\rm in} \times 10\frac{1}{2}\,{\rm in}$
+pages with $1\,{\rm in}$ margins in
+the ``portrait'' orientation with 24~pt.\ type, with a ragged right
+margin and lots of incentive to suppress hyphenation.
+%% NOT ANYMORE and bottom margins.
+\CS{slides} also defines \CS{bl} to insert a blank line and
+\CS{np} to create a new page, since these are often useful for slides.
+Since the \CS{slides} format is very simple, it is not loaded from a
+style file.
+
+%==================================================*
+\subsection{Color PostScript Output \label{sect.color}}
+
+Now that color printers are fairly common, it is useful to have some
+way to produce text that is printed in different colors.
+The simplest use of this is for producing overhead transparencies, as
+with the \CS{slides} format.
+\TeXsis\ has a simple set of macros, in the style file {\tt
+color.txs}, which lets you change the colors of text printed using
+PostScript.
+This only works for PostScript output produced by\index{Rokicki,
+Tomas} Tom Rokicki's {\tt dvips} program,\cite{Rokicki} using the
+profile file {\tt color.pro} that is usually included with {\tt
+dvips}.
+
+To use these macros, you must first input the definitions,
+\TeXexample
+\input color.txs
+|endTeXexample
+To change the color of all text which follows, use the command \CS{SetColor},
+as in
+\TeXexample
+\SetColor{Green}
+|endTeXexample
+Keep in mind that this will change \undertext{all}
+text, including page numbers and headlines and footlines. To print a
+small portion of text in some other color, use
+\CS{colorit},
+as in
+\TeXexample
+\colorit{Red}{The text inside these brackets is colored Red}
+|endTeXexample
+You can change the color of the background using \CS{background},
+as in
+\TeXexample
+\background{Yellow}
+|endTeXexample
+
+\bigskip
+\pagecheck{2in}
+
+The 12 basic colors available are
+\example
+\settabs 4\columns
+\+& Black & White & Gray \cr
+\+& Red & Green & Blue \cr
+\+& Cyan & Magenta & Yellow \cr
+\+& Purple & Orange & Brown \cr
+\endexample
+Note that the case is important---the names must begin with an initial
+capital letter.
+
+For the basic colors listed above some shortcuts are also defined.
+Specifically, you can simply use the color name as a command, with the
+text to be colored as a single argument, as in
+\TeXexample
+\Red{This text is colored Red}
+|endTeXexample
+or you can say |\text|\meta{Color} to change the text color,
+as in
+\TeXexample
+\textGreen
+|endTeXexample
+You can add shortcuts for other colors besides the basics
+with the \CS{addColor} command. Saying
+\TeXexample
+\addColor{Salmon}
+|endTeXexample
+will define |\Salmon| and |\textSalmon| as shortcuts
+for |\colorit{Salmon}{|\meta{text}|}| and |\setColor{Salmon}|.
+
+Although the basic colors listed above should be enough for most
+simple applications, there are actually a whole host of other colors
+available. In fact, all of the colors found in a box of 64 Crayola
+Crayons are defined in {\tt color.pro} for |dvips|. You can define
+short-cuts for all of these simply by saying \CS{Crayolas}.
+You can produce a list of all of the colors, with each printed in its
+own color, by saying \CS{ListColors}.
+
+The commands so far have just about the same syntax as those in the
+macro package called {\tt COLORDVI.TEX}, by Jim
+Hafner\reference{colordvi} Hafner, Jim, the {\tt COLORDVI.TEX} macros
+are included in the {\tt dvips} distribution. See \Ref{Rokicki}
+\endreference\space
+(although the internal workings are slightly different).
+Any plain \TeX\ file which uses {\tt COLORDVI.TEX} should also work
+using {\tt color.txs}.
+But the {\tt color.txs} macros also include commands to specifically
+manipulate the PostScript color stack.
+To change the color temporarily by pushing it onto the stack, and then
+revert to the previous color by popping the stack, use \CS{PushColor}
+and \CS{PopColor}, as in
+\TeXexample
+This text is in some color, probably black.
+\PushColor{Purple}
+This text will be purple.
+\PopColor
+This text will be back in the previous color.
+|endTeXexample
+
+Be aware that the color changes have nothing to do with TeX's grouping
+mechanism (\ie\ curly brackets), but are based only on the PostScript
+color stack.
+If you really want the color to change back when a \TeX\ group ends
+(whenever that might happen), you can use
+\cs{aftergroup}, as in
+\TeXexample
+\begingroup\PushColor{Red}\aftergroup\PopColor
+|endTeXexample
+Then later when the group is ended, the \CS{PopColor} is automatically
+executed and the color reverts to its previous value.
+One nice way this can be used is to color all displayed equations,
+by putting this all in \cs{everydisplay}, like so
+\TeXexample
+\everydisplay={\PushColor{BurntOrange}\aftergroup\PopColor}
+|endTeXexample
+A displayed equation is always constructed within a new group, and
+when it ends the \CS{PopColor} on the \cs{aftergroup} stack is invoked
+automatically and the text reverts to the previous color.
+
+\bigskip
+
+
+If the 64 colors listed by \CS{ListColors} are not enough for your
+purposes, you can also define your own, using \CS{SetCmykColor} or
+\CS{PushCmykColor}.
+Colors are specified as a quadruple of intensity values between 0.0 and 1.0
+(CMYK means Cyan, Magenta, Yellow, and blacK). For example:
+\TeXexample
+\SetCmykColor{.2 .3 .4 .1}
+|endTeXexample
+will give you a nice tan, while
+\TeXexample
+\PushCmykColor{.5 .5 .1 .2} Old Blue Eyes \PopColor
+|endTeXexample
+will print the text in the shade of blue specified by that particular
+CMYK quadruple.
+
+
+%==================================================*
+\subsection{Twin Page Output}
+
+It is sometimes desirable to produce preprints or other documents in a
+compact format with two pages on each physical page in landscape
+orientation. While this can be done with \cs{SetDoubleColumns}, a much
+simpler approach is sufficient. \TeXsis\ contains a macro called
+\CS{twinout} which redefines the output routine to produce two pages
+per page, without attempting to balance columns or allowing spanned
+equations, tables, etc. (thus avoiding many of the possible problems
+with the more powerful double column macros). \CS{twinout} can be used
+with any of the standard formats described in \Sect{papers} or
+\Sect{fmts} or even with Plain \TeX. Since \CS{twinout} does not
+select fonts, the user must do so:\index{twin page output}
+%
+\TeXexample
+\texsis
+\tenpoint
+\def\Tbf{\twelvebf}
+\def\tbf{\tenbf}
+\twinout
+ |<text>
+|endTeXexample
+Alternatively, the \CS{twinformat} command can be used to produce any
+\TeXsis\ format in \CS{twinout} layout with 10~pt fonts. Thus the above
+commands can be replaced by
+\TeXexample
+\texsis
+\twinformat
+ |<text>
+|endTeXexample
+Here \CS{twinformat} automatically sets up 10~pt fonts and appropriate
+values for the title bold face fonts, just as in the previous example.
+\CS{twinout} use the following dimensions:
+%
+\description{Xnormhsize\qquad}\clump
+%
+\itm{\CS{twinhsize}}
+Total width for twin column output.
+%
+\itm{\CS{twinvsize}}
+Column height for twin column output.
+%
+\itm{\CS{twincsize}}
+Column width for twin column output.
+%
+\itm{\CS{normhsize}}
+Normal value of \cs{hsize} in portrait mode.
+%
+\itm{\CS{normvsize}}
+Normal value of \cs{vsize} in portrait mode.
+%
+\enddescription
+All of these have sensible default values for $8.5\,{\rm in} \times
+11\,{\rm in}$ paper but can be reset before \CS{twinout} is called. The
+"normal" sizes should print properly with the default device driver
+and printer. Appropriate default values for all these dimensions can
+be set in |TXSsite.tex|.
+
+ \CS{twinout} puts \cs{LandscapeSpecial} on each page. This is null by
+default but can be redefined to be an appropriate \cs{special} command
+to produce landscape output with your device driver and printer. For
+example, with |dvips|\cite{Rokicki}\index{dvips}\index{Rokicki, Tomas}
+and a PostScript printer, use
+\TeXexample
+\def\LandscapeSpecial{\special{papersize=11in,8.5in}}
+|endTeXexample
+A default value can be set in |TXSsite.tex|.
+
+ \CS{twinprint} is a substitute for \cs{preprint} which sets the
+title, author, and other titlepage material full size in landscape mode
+and then switches to \CS{twinout} twin column output with 10~pt type for
+the text of the paper. A typical preprint might read:
+\TeXexample
+\twinprint
+\titlepage
+\title
+ |<paper title>
+\endtitle
+\author
+ |<author's name and address>
+\endauthor
+\abstract
+ |<text of abstract>
+\endabstract
+\endtitlepage
+ |<text of paper>
+\bye
+|endTeXexample
+\nobreak\noindent
+This produces a nice, compact format for preprints.
+
+%>>> EOF TXSfmts.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSfonts.doc b/Master/texmf-dist/doc/texsis/base/TXSfonts.doc
new file mode 100644
index 00000000000..dd722d2a74b
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSfonts.doc
@@ -0,0 +1,279 @@
+%% file: TXSfonts.doc - Type Sizes and Styles - TeXsis version 2.18
+%% @(#) $Id: TXSfonts.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta\texsis\input TXSdocM.doc\draft\fi
+
+
+\section{Type Sizes, Type Styles, and Line Spacing \label{sect.fonts}}
+
+This section describes the \TeXsis\ commands for changing font sizes,
+typestyles and the spacing between lines. It also describes how you
+can make footnotes, and a special feature for balancing quotation
+marks.
+
+\subsection{Type Sizes and Styles}
+
+Plain \TeX\ is set up to use 10\pt\ type, with smaller sizes for
+superscripts and subscripts.
+\TeXsis\ expands the available type sizes to include 11, 12, 14, and
+16\pt\ type, and \TeXsis\ makes it easy to change from one size of
+type to another.
+Type sizes are selected with the following commands:
+\index{type sizes}%
+\description{Xtwentyfourpointpoint\qquad}
+\itm{\CS{ninepoint}}
+Gives 9 \pt\ type (not illustrated).
+\itm{\CS{tenpoint} }
+Gives {\tenpoint 10 \pt\ type, like this.}
+\itm{\CS{elevenpoint} }
+Gives 11 \pt\ type. (not illustrated).
+\itm{\CS{twelvepoint} }
+Gives {\twelvepoint 12 \pt\ type, like this.}
+\itm{\CS{fourteenpoint} }
+Gives {\fourteenpoint 14 \pt\ type, like this.}
+\itm{\CS{sixteenpoint} }
+Gives {\sixteenpoint 16 \pt\ type, like this.}
+\itm{\CS{twentypoint}}
+Gives 20 \pt\ type (not illustrated).
+\itm{\CS{twentyfourpoint}}
+Gives 24 \pt\ type (not illustrated).
+\enddescription
+In some implementations of \TeX\ there is insufficient room to load
+all of these fonts, so \idx{fonts} are loaded only when they are first
+used, and not all of them can be illustrated here.
+\TeXsis\ starts out with \CS{tenpoint}, just like Plain \TeX, but
+switches to \CS{twelvepoint} once you say \cs{texsis}.
+
+In Plain \TeX\ you can switch between Roman, Bold, or Italic
+typestyles with the commands \cs{rm}, \cs{bf}, and \cs{it}.
+The same is true with \TeXsis.
+These commands change the style of the type, but not the size.
+The complete set of commands to change typestyles is:
+\index{typestyles}%
+\description{~rm~\qquad}
+\itm{\cs{rm} }
+Gives Roman type. Available in all sizes.
+\itm{\cs{it} }
+Gives {\it italic type} for emphasis. Available in all sizes.
+\itm{\cs{sl} }
+Gives {\sl slanted type} for book titles, etc. Available in all sizes.
+\itm{\cs{bf} }
+Gives {\bf bold face type} for emphasis. Available in all sizes.
+\itm{\cs{tt} }
+Gives {\tt typewriter type} for listing computer programs, \TeX\
+examples, etc. Available in 10, 11, and 12~pt.
+\itm{\CS{mib}}
+Gives math italic bold in math mode (|$...$|) for titles. Available in
+10, 11, 12, 14, 16, 20, and 24~pt base sizes, but the minimum size for
+subscripts and superscripts is 10\pt.
+\itm{\CS{scr}}
+Gives script capital letters (using Ralph Smith's Formal Script fonts,
+the |rsfs| fonts, if they are available on your computer).
+Use |\scr| as you would use |\cal|.
+\enddescription
+
+ \TeXsis\ includes the mathematics fonts in all sizes; these are
+used automatically when you type equations between the math quotes,
+|$...$|. Limited \idx{sans-serif fonts} are also available using the commands
+\cs{tenss} and \cs{twelvess}.
+
+ Two special symbols, \CS{Tbf} and \CS{tbf}, are used to produce
+``\idx{Title bold face}'' and ``\idx{small title bold face}.'' The first is
+used to print the title of a paper and titles of the chapters of a
+paper, and the second is used to print the titles of sections of a
+paper. You are free to change the definitions of these control words,
+but if you do not they default to 14\pt\ boldface for \CS{Tbf} and 12\pt\
+boldface for \CS{tbf}.
+
+ Math italic bold (\CS{mib}) is listed with the other fonts but
+is actually slightly different: it substitutes boldfaced versions of
+the math italic and math symbol fonts for the normal ones {\sl
+everywhere\/} in math mode (|$...$|). These fonts are available only
+with with Computer Modern fonts and only in 10\pt\ and larger sizes;
+the standard math fonts are used for smaller superscripts. Since
+\CS{mib} effectively redefines |$..$|, it must be placed before the
+math material (i.e., outside the math quotes) and the whole formula
+will be bold. For example,
+\TeXexample
+{\tbf\mib Observation of $Z^0 \to \mu^+\mu^-$}
+|endTeXexample
+will produce the indicated text in \CS{tbf} size with a bold formula,
+provided you have the right fonts. The easiest way to find out is to try
+it. Since the \CS{mib} fonts are not available everywhere, they are never
+loaded or used unless you explicitly ask for them.
+
+ Plain \TeX\ includes a \idx{calligraphic script} font known as
+\cs{cal}, but the letters in this font are not quite what most
+physicists are accustomed to using for things like \idx{Lagrangian}
+densities or \idx{functional measure}s.
+Ralph Smith\index{Smith, Ralph} of U.C. San Diego has created a new
+``\idx{formal script}'' font with much better letters for such
+purposes, and \TeXsis\ supports this font provided that it is
+available on your computer.
+To get this new font you simply use \CS{scr} in place of \cs{cal}.
+An example is:
+\TeXexample
+$$
+ {\scr L} = - \del^\mu \phi^\ast \del_\mu \phi + m^2 \phi^2
+$$
+|endTeXexample
+\noindent
+Unfortunately, we don't know if your computer has the |rsfs|
+fonts\index{rsfs font} so we won't try to show you the output from
+this example.
+The quickest way to determine whether the fonts are available on your
+system is to try this example and verify that \TeX\ does not complain
+about the font.
+If your system does not have the font then you can obtain it from
+CTAN, or from the \TeXsis\ ftp server. (See the front cover of this
+manual for instructions.)
+
+\bigskip
+\pagecheck{0.65\vsize}
+
+\subsection{Interline Spacing}
+
+ When you use the macros \cs{tenpoint}, \cs{twelvepoint}, etc., the
+style of the type is reset to Roman, as if you'd also typed \cs{rm}. The
+\idx{baseline skip} (the \idx{distance between lines}) is also set to be
+suitable for the type size.
+Several commands are provided that vary the interline spacing, both in
+the text and in auxiliary material such as tables.
+These are:
+\description{~doublespaced~\qquad}\singlespaced\parskip=12pt
+%
+\itm{\CS{doublespaced}}
+Makes the baseline skip 1.5 times its normal value.
+True double spacing looks too wide with typesetting.
+%
+\itm{\CS{singlespaced} }
+Resets the baseline skip to its normal value.
+%
+\itm{\CS{TrueDoubleSpacing}}
+Makes the baselineskip twice its normal value.
+This usually looks too wide for a final document, but it is desirable
+in a manuscript being submitted to journals such as Physical Review.
+%
+\itm{\CS{triplespaced}}
+Makes the baseline skip 3~times its normal value.
+This should only be used for drafts of papers to leave room for notes
+or corrections.
+%
+\itm{\CS{widenspacing}}
+Increases the current spacing by a factor of 1.25.
+With single spacing this is the analog of $1 {1\over2}$ spacing on a
+typewriter.
+Repeating |\widenspacing| increases the spacing by 1.25~times whatever
+it already was; it does not reset the spacing to singlespaced first.
+\enddescription
+When \TeXsis\ is first started the default is |\singlespaced|, but once
+it is initialized with the |\texsis| command (or |\preprint| or
+|\paper|, etc...) the spacing is set to |\doublespaced|.
+
+
+\bigskip
+\pagecheck{0.65\vsize}
+
+\subsection{Footnotes}
+
+ Even when a paper is double spaced, you may want to have the
+footnotes single spaced. Also, if the text is in 12~point type you may
+nevertheless want to have the footnotes in 10~point type.
+In \TeXsis\ you can do this easily using \CS{Footnote} in place of
+\cs{footnote}, as in this example:\Footnote\dag{This is an example of
+the use of {\tt\bs Footnote} in \TeXsis.}\index{footnotes}%
+\TeXexample
+... as in this example:\Footnote\dag{This is an example of
+the use of {\tt\bs Footnote} in \TeXsis.}
+|endTeXexample
+\noindent
+|\Footnote| also automatically puts the reference mark (in this case the
+dagger symbol |\dag|) in a superscript.\Footnote{*}{The footnote
+character is typeset in math mode, as if it were between two {\tt
+\$}'s.}\ \
+%
+The typestyle used for the text of the footnote is
+controlled by \CS{FootFont}, which defaults to:
+\TeXexample
+\def\FootFont{\tenpoint}
+|endTeXexample
+\noindent
+If you want to change this you can do so somewhere near the beginning of
+your document. The spacing between multiple paragraphs in a |\Footnote|
+(if you are prone to being so verbose) is set to zero, regardless of the
+\cs{parskip} in the main part of the document, but you can also change
+this by adding \cs{parskip}|=|\meta{amount} to your new definition of
+|\FootFont|. If you want a singlespaced footnote in the |\FootFont|
+typestyle but without putting a reference
+mark in the text you can use
+\CS{Vfootnote} just as you would use \cs{vfootnote} in Plain \TeX. And
+of course if |\Footnote| or |\Vfootnote| cannot do what you need even
+after changing |\FootFont| then you can always use \cs{footnote} or
+\cs{vfootnote} from Plain \TeX.%%
+%
+\Footnote{\ddag}{A technical footnote: With
+|\footnote| from plain \TeX\ the group is closed before the footnote is
+typeset, so any line spacing you set inside the footnote is lost. You
+can solve this by putting a |\par| or |\vskip 0pt| at the end of your
+footnote, but then the final strut is put on a separate line. Getting
+footnotes to work just right is tricky business, which is why we wrote
+\CS{Footnote}.}
+
+\bigskip
+
+Sometimes it is desirable to have footnotes numbered consecutively.
+This is easily done with \CS{NFootnote}, which keeps a count of the
+footnotes it has created and uses the numbers for the reference marks.
+Just as with \CS{Footnote}, the text is single spaced and printed in
+the \CS{FootFont} typestyle.\NFootnote{This is an example of a
+numbered footnote, which was created by saying ``|...printed in the
+{\tt\bs FootFont} typestyle.\NFootnote{This is an example ... }|''}
+The footnote counter is called \CS{footnum}, so if you want to start
+over numbering footnotes (at the begining of a new chapter, for
+example), then simply set this back to zero, by saying
+\TeXexample
+\footnum=0
+|endTeXexample
+
+
+%==================================================*
+\pagecheck{0.65\vsize}
+
+\subsection{Automatic Quote Balancing}
+
+One of the differences between typing and typesetting is the way in
+which quote marks are handled.
+On a typewriter you would simply use the non-oriented double-quote
+mark (|"|) both to begin and end the quoted material.
+In typesetting, however, quoted text begins with a left-quote mark
+(``) and ends with a right-quote mark ('').
+To produce these in \TeX\ you have to type two single-quote marks,
+either |``| or |''|.
+This is not very difficult to do, but unless you have an editing
+program which does it for you, it is easy to forget and use the
+double-quote marks instead.
+With \TeXsis\ that's okay.
+If you say\index{quote balancing}%
+\example
+\CS{quoteon}
+\endexample
+then the next time a double-quote mark comes along it will be
+translated into a left-quote mark.
+The double-quote mark after that will become a right-quote mark, and
+so on, so that material enclosed in double-quote marks will be typeset
+correctly.
+All you have to do is remember to use the double-quote marks in pairs.
+
+ In some special cases you may not want \TeXsis\ to be so smart
+about double-quotes. You can turn this feature off by saying
+\example
+\CS{quoteoff}
+\endexample
+The default though, once you have said |\texsis|, is |\quoteon|.
+
+%>>> EOF TXSfonts.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSinstl.doc b/Master/texmf-dist/doc/texsis/base/TXSinstl.doc
new file mode 100644
index 00000000000..e6a112c75b4
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSinstl.doc
@@ -0,0 +1,358 @@
+% file: TXSinstl.doc - Installation Instructions - TeXsis version 2.18
+%% @(#) $Id: TXSinstl.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% Copyright (c) 1990, 1992, 1995, 1997 by Eric Myers and Frank Paige.
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta \texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+
+\appendix{A}{Customization and Installation of \TeXsis \label{install}}
+
+\centerline{(\TeX sis version \fmtversion, as of \revdate)}
+
+\noindent
+This appendix contains information about how to install \TeXsis\ on
+several types of computer systems, and how to customize \TeXsis\ for a
+particular installation. The discussion below on ``Local
+Modifications'' may be of interest to any user, but the rest of this
+Appendix is probably only of interest to someone who is responsible for
+installing or maintaining \TeXsis.
+
+
+\subsection{Customization}
+
+ There are three different mechanisms for making modifications to
+the basic \TeXsis\ macro package. It is better to use one of these
+mechanisms rather than modifying the original code.
+
+\subsubsection{Local Modifications}
+
+ \TeXsis\ will read the file {\tt TXSmods.tex}, if it exists, from
+the current directory or search path every time you run \TeXsis. This
+lets you make your own \idx{custom modifications} or additions to
+\TeXsis. For example, say you have a directory specifically for a
+particular project you are working on and you are writing several
+different papers or other documents related to this project. You could
+add a file called {\tt TXSmods.tex} to this directory to contain extra
+macro definitions that are used in all of these documents, and these
+will be loaded automatically whenever you run \TeXsis\ in this
+directory. If you run \TeXsis\ from another directory these macros will
+not be loaded.
+
+\subsubsection{Site Modifications}
+
+ If a file called {\tt TXSsite.tex} exits in the current directory
+at the time the \TeXsis\ format file is created (see below) then it is
+automatically read in at this time. The purpose of this file is to
+allow you to add definitions and macros that are local to your computer
+installation. For example, in this file you would define the control
+word \cs{ORGANIZATION} to give the name of your organization or
+institution. \cs{ORGANIZATION} is used at the top of memos and at the
+top of the title page of a \cs{preprint}. You might also put a
+customized \cs{letterhead} macro in this file, and you may well want to
+change the definition of \CS{LandscapeSpecial}, which controls how your
+laser printer is put into landscape mode. Note that the file {\tt
+TXSsite.tex} is only read {\sl once}, when the \TeXsis\ format file is
+created, not every time \TeXsis\ is run.
+A prototype site file, called |TXSsite.000|, is included in the standard
+distribution of \TeXsis.
+
+
+\subsubsection{Patches}
+
+ \TeXsis\ will also automatically read in a file called
+{\tt TXSpatch.tex} from the standard input path, if it exists,
+every time \TeXsis\ is run.
+This file should contain additions or corrections (``patches'') to
+\TeXsis. This patch file lets you correct minor problems or make minor
+changes to \TeXsis\ without having to rebuild the format file.
+
+Whenever we find a problem with \TeXsis\ we try to correct it as soon
+as possible.
+To make the correction available to users before the next version of
+\TeXsis\ is released we issue patch files containing the corrections.
+The most current patch file should always be available at
+\URL{ftp://ftp.texsis.org/texsis}, or in {\tt
+macros/texsis} on any CTAN server.
+
+
+
+%==================================================*
+
+\subsection{Installation of \TeXsis}
+
+To use \TeXsis\ or any large macro package effectively you should run
+the |initex| program to create a pre-compiled format. The general method
+of doing this is machine independent, but the specific commands depend
+on the operating system on your computer. This appendix gives the
+appropriate commands for running |initex| and installing \TeXsis\ on a
+computer running UNIX, a VAX or Alpha running VMS, and for an IBM PC running
+PC\TeX\ under \idx{MS-DOS}. We assume that you are familiar with the
+operating system and that \TeX\ and the Plain format have already been
+installed.
+Notes on how to install \TeXsis\ on other kinds of machines (such as
+Atari or Apple computers, or on Linux) are available on the \TeXsis\
+ftp server (\URL{ftp://ftp.texsis.org/texsis}).
+
+VMS users should note that \TeXsis\ is also available with the latest
+release of DECUS \TeX, and much of the installation work has already
+been done or can be done almost automatically. You may want to get this
+version from CTAN rather than the ``raw'' distribution from the TeXsis
+ftp site.
+If you are installing from the DECUS distribution you should read the
+file |INSTALL.VMS| with that distribution.
+
+
+\subsubsection{Quick Install for Unix and \TeX~3.x}
+
+The current version for \TeX\ as of 1997 is 3.14159. If you have
+anything earlier than version 3.x then it is strongly recommended that
+you first upgrade your \TeX\ installation. Assuming that you have a
+current \TeX\ installation on a Unix computer, you can build and
+install \TeXsis\ by simply doing the following:
+
+
+\EnvRightskip=\parindent
+\enumerate\enumpoints
+\itm\llap{\square\qquad}%
+Edit the file |Makefile| and change parameters and paths as
+appropriate, following the directions given in the comments.
+The TEXDIR variable should point to the top-level \TeX\ directory
+on your system. The default directories under TEXDIR are those
+recommended by the TeX Directory Structure (TDS) working group of the
+\TeX\ Users Group.
+
+\itm\llap{\square\qquad}%
+(Optional) Copy the file |TXSsite.000| to |TXSsite.tex| and edit
+this file to contain appropriate site dependent information, such as
+definitions for the name of your |\ORGANIZATION|, or your
+\cs{letterhead}, or change \cs{LandscapeSpecial}.
+If you already have a |TXSsite.tex| file then copy it to the current
+directory so that it will be included when building the format file.
+
+\itm\llap{\square\qquad}%
+Give the command `|make|' to build the format file and the manual.
+
+\itm\llap{\square\qquad}%
+Give the command `|make install|' to install the files on the system.
+\endenumerate
+
+
+\pagecheck{0.20\vsize}
+\subsubsection{Detailed Installation}
+
+To install \TeXsis\ follow the steps below or their equivalents for
+your computer and operating system. If you are installing a system-wide
+version of \TeXsis\ then you may want to review the appropriate
+documentation on how \TeX\ itself is installed on your system.
+\enumpoints
+\enumerate
+\itm\llap{\square\qquad}%
+Create a separate directory to hold the \TeXsis\ files. This is not
+strictly necessary, but it is strongly recommended, since there are
+more than 70~files for the source code and
+documentation. On a Unix machine we recommend using
+|/usr/local/share/texmf/tex/texsis| or |/usr/local/lib/tex/texsis|, depending on
+where your other \TeX\ files are kept. For a VMS system,
+you should use a subdirectory of the main \TeX\ directory, whatever that
+happens to be. On an IBM PC
+it is best to use a top-level directory |C:\TEXSIS| on your hard disk,
+rather than a subdirectory of |C:\PCTEX|, to simplify backing up your
+files.
+
+\itm\llap{\square\qquad}%
+Copy all of the \TeXsis\ files into this directory. The \TeXsis\ source
+files all have names of the form |TXS|$xxx$|.tex|, and
+most of the documentation
+files have names |TXS|$xxx$|.doc|. \TeXsis\ style files end with
+the extension |.txs|. There will also be several other files in your
+distribution of \TeXsis, such as |texsis.tex| and |Manual.tex|.
+A complete list of the files can be found in a file called |MANIFEST|.
+
+
+\itm\llap{\square\qquad}%
+Make any necessary changes in the source code. You will probably want to
+copy the file |TXSsite.000| to |TXSsite.tex| and edit this file,
+changing the definition of \cs{ORGANIZATION}, \cs{LandscapeSpecial},
+and the letterhead macros.
+
+On VMS systems you may (or may not) want to define |\TeXsisLib| to be
+the \TeXsis\ directory and |\TXSpatches| to be the patch file in that
+directory.
+
+If you have problems with missing fonts, look at the documentation
+in the file |TXSfonts.tex|.
+
+
+\itm\llap{\square\qquad}%
+Create the format file |texsis.fmt| by running |initex|. \index{initex}
+On a Unix machine the command is:
+\example
+|% initex \&plain texsis '\dump'|
+\endexample
+You must remember the ``|\|'' to escape the ``|&|.''
+
+On a VMS system replace the |initex| command with |TEX/INIT|. You must
+also tell \TeX\ where to find the input files for both \TeXsis\ and
+Plain \TeX. The commands are:
+\example\obeylines\advance\rightskip by -1cm
+|$ DEFINE/USER TEXIN | \meta{texsis} \meta{plain}
+|$ TEX/INIT/NOFORMAT/TEXINPUTS=TEXIN: "&plain texsis \dump"|
+\endexample
+where \meta{texsis} is the specification for the device, directory, and
+subdirectories of \TeXsis, and \meta{plain} is the specifiation for
+the standard files like |PLAIN.TEX|.
+
+For an IBM PC with PC\TeX\ give the command,
+\example
+|TEX TEXSIS /I|
+\endexample
+and reply to the |*| prompt with ``\cs{dump}.'' (In some versions of
+PC\TeX\ the |TEX| command is replaced with |TEX386| or |TEX386b|. Check
+your manual to be sure.) \TeXsis\ will also work with |emtex| or any
+other version of ``big'' \TeX\ for the PC, but you will have to check
+the documentation for that particular implementation of \TeX\ for
+specific instructions for creating a preloaded format.
+
+In any case |initex| will load the Plain \TeX\ format and then the
+various pieces of \TeXsis, displaying a message for each piece.
+Finally it will spew out a list of fonts used and other information.
+This should contain near the end the statement ``No pages of output
+produced.'' (If it does not, something may be wrong with your distribution,
+although it is probably a minor problem. Check your editing of the
+|TXSsite.tex| file.) The preloaded format will be
+written to the file |texsis.fmt|.
+
+\itm\llap{\square\qquad}%
+Copy or move various files to where they need to be:
+\enumerate
+\itm
+Copy the format file to the place where your version of \TeX\ looks for
+pre-loaded formats. On Unix systems this is usually
+\example
+|/usr/local/share/texmf/tex/formats|.
+\endexample
+or some variation of this.
+For VMS machines make sure the file is in the directory named by
+|$TEX_FORMATS|.
+With PC-\TeX\ the file goes into |\PCTEX\TEXFMTS|.
+
+\itm
+Copy the \TeXsis\ style files (which end with the extension |.txs|) to
+the place your version of \TeX\ usually looks for input. Under Unix
+this should be
+\example\obeylines
+|/usr/local/lib/tex/inputs|
+(or sometimes |/usr/local/lib/tex/macros|).
+\endexample
+For VMS machines make sure these files are in the directory included
+in the path defined by the |TEX_INPUTS| logical. For PC-\TeX\ the
+proper place is |\PCTEX\TEXINPUT|.
+
+\itm
+If you have any run-time patches to add to \TeXsis\ copy the
+file |TXSpatch.tex| to the same \TeX\ inputs directory.
+If there is a |TXSpatch.tex| from a previous release of \TeXsis\ you
+should be sure to remove the old file if it is not being replaced.
+
+\endenumerate
+
+\itm\llap{\square\qquad}%
+Having created the format file, you need to make a command |texsis| to
+run \TeX\ using it. The way to do this is very dependent on the
+operating system.
+
+\enumerate
+
+\itm
+On a Unix system running \TeX~3.0 or higher you need only to make a link
+to the executable |virtex|\index{virtex} with the same name as the
+format you want to load. |Virtex| probably lives in |/usr/local/bin| or
+some similar place. The command to make the link is something like:
+\example
+|ln /usr/local/bin/virtex /usr/local/bin/texsis|
+\endexample
+
+For \TeX\ versions 2.9x you can build an ``undumped'' version of
+\TeXsis. You will have to see the \TeX\ distribution notes for a
+description of |undump|. \index{undump} However, this is now a very old
+version of \TeX\ (as of this writing \TeX\ is up to version~3.1415), so
+you should seriously consider upgrading to a newer version of \TeX.
+
+
+If you are going to create a ``private'' version of \TeXsis\ rather than
+installing it for the whole system then you need to add your \TeXsis\
+directory to the environment variables |TEXFORMATS| and |TEXINPUTS| and
+define the command |texsis| as follows. For the C-shell, put in your
+|.cshrc| file:
+\example\obeylines
+|alias texsis virtex \\\&texsis|
+|setenv TEXSIS_LIB $HOME/texsis/|
+|setenv TEXFORMATS ".:$TEXSIS_LIB:$TEXFORMATS"|
+|setenv TEXINPUTS ".:$TEXSIS_LIB:$TEXINPUTS"|
+\endexample
+(This assumes that |TEXFORMATS| and |TEXINPUTS| are already properly
+defined. If not, insert the proper directories.)
+
+\itm
+Under VMS, place in your |login.com| file the commands
+\example\obeylines
+|$ DEFINE TEXSIS_LIB| \meta{disk}|:[|\meta{directory}|]|
+|$ TEXSIS :== $TEX$:TEX.EXE &TEXSIS_LIB:TEXSIS|
+\endexample
+where |TEX$| is the logical name for the main \TeX\ directory. You can
+also put these commands in a \TeX\ initialization |.COM| file.
+
+
+
+\itm
+For PC\TeX\index{PCTeX@{PC\TeX}} you should find in the distribution a file
+|TEXSIS.BAT|. If you don't, you can create it. The file should contain:
+\example\obeylines
+|ECHO OFF|
+|\PCTEX\TEX &TEXSIS %1 /F 25000|
+\endexample
+(Replace the |TEX| command with |TEX386| or |TEX386b| if appropriate for
+your machine. For PC-\TeX\ versions 3.14 and greater the |/F 25000| is
+no longer needed.)
+Either put this file
+in a directory in your command path or add the directory it is in
+to your |PATH| statement.
+If you want to be able to load a patch file then you should also
+include a line such as
+\example
+|\def\TXSpatches{C:/TEXSIS/TXSpatch}|
+\endexample
+in the |TXSsite.tex| file. Because \TeX\ and MS-DOS both use
+backslashes for their own purposes the path is specified with {\sl
+forward} slashes;
+DOS understands them to be the same as a backslash.
+
+\endenumerate
+\endenumerate
+
+\bigskip\goodbreak
+
+ After these steps have been carried out, \TeXsis\ should be
+installed and available to you, and to other users if installed
+system-wide. The command
+\example
+|texsis| {\sl name}
+\endexample
+should run \TeXsis\ on the file {\sl name}|.tex| and produce the file
+{\sl name}|.dvi|, which can be printed like any |.dvi| file.
+A good test is to go to the \TeXsis\ source directory (or the
+documentation directory, if the documentation files |TXS|$xxx$|.doc|
+have been put in a separate directory) and say
+\example
+|texsis Manual|
+\endexample
+On the first try this will produce several warning messages coming from
+undefined tags for forward references. These will be defined later in
+the document and saved in the file |Manual.aux|; Running \TeXsis\ a
+second time should produce the \TeXsis\ manual with no errors.
+
+%>>> EOF TXSinstl.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSintro.doc b/Master/texmf-dist/doc/texsis/base/TXSintro.doc
new file mode 100644
index 00000000000..6c8e1d60256
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSintro.doc
@@ -0,0 +1,353 @@
+%% file: TXSintro.doc - Manual Intructions - TeXsis version 2.18
+%% @(#) $Id: TXSintro.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1997 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta \texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+
+\section{Introduction \label{sect.intro}}
+
+ \TeX\ is a computer typesetting system created by Donald
+Knuth\index{Knuth, Donald} of Stanford University.
+It is described succinctly in his book, \TeXbook.\reference{Knuth}
+D.E.~Knuth,
+\booktitle{The \TeX book} (Addison-Wesley, 1986)
+\endreference
+\TeX\ is especially well suited for typesetting technical material
+containing mathematical symbols and equations.
+As a result, \TeX\ in one form or another is now used by almost all
+mathematicians and most physicists for writing scientific papers and
+related documents.
+The journals of the American Mathematical Society are typeset with
+\TeX, and the journals of the American Physical Society now accept
+manuscripts written in \TeX.
+A large number of physicists also distribute preprint
+(pre-publication) versions of their papers, known as ``e-prints,'' via
+an archive server based at the Los Alamos National Laboratory.
+\TeX\ in some form is the {\it de facto} standard for such papers.
+
+There are actually several different ``flavors'' of \TeX.
+One of the reasons that \TeX\ is so useful is that it has a powerful
+macro capability --- to the point that \TeX\ can actually be
+considered to be a computer ``language.''
+As a result, there now exist a number of macro packages, or
+``formats,'' which either extend or replace the basic \TeX\ language
+of \TeXbook\ (which is commonly known as ``plain'' \index{plain TeX@{plain
+\TeX}}\TeX) by adding more advanced features or commands appropriate
+to more specialized types of documents.
+\TeXsis\ is one such macro package, designed specifically (but not
+exclusively) for physicists.
+\TeXsis\ provides the author with many useful commands with are either
+not available or not easily implemented by the casual user of plain
+\TeX.
+Among these are the ability to automatically number equations,
+references, figures and tables, and to refer to these ``numbered''
+objects easily by symbolic names which are independent of the values
+assigned to them when the document is processed.
+\TeXsis\ makes it easy to change the type style or size, and to
+control other aspects of the formatting.
+\TeXsis\ also includes special macros for printing in double columns
+and for constructing ruled tables.
+It is easy with \TeXsis\ to produce more specialized documents, such
+as letters, referee reports, and memoranda, or even a thesis or a book.
+
+Many physicists are now familiar, at least by name, with another
+\TeX-based format, the REVTEX package from the American Physical
+Society.
+REVTEX is in turn based on a more general format, known as
+\LaTeX.\reference{LaTeX}
+L. Lamport,
+\booktitle{\LaTeX, A Document Preparation System},
+(Addison-Wesley, 1985)
+\endreference
+\index{latex@{\LaTeX}}
+Unfortunately, \LaTeX\ differs from plain \TeX\ in several subtle but
+important ways, so that documents created using plain \TeX\ cannot be
+used with \LaTeX.
+In contrast, \TeXsis\ is functionally a superset of plain TeX, so that
+everything described in \TeXbook\ will also work in \TeXsis\ (even
+though the internal workings of some of the plain \TeX\ macros have
+actually been modified).
+This means that \TeXsis\ documents can also make use of just about any
+of the many smaller macro packages designed for use with plain \TeX,
+or an author can make use of the methods and tricks described in
+\TeXbook.
+Unfortunately, it also means that REVTEX and \TeXsis\ are mutually
+incompatible.
+
+\bigskip
+
+This manual explains how to use \TeXsis.
+Since it is a user's guide, it makes no attempt to describe how the
+various macros work; for that one should consult the source code,
+which is extensively commented.
+However, we do assume that the reader is already familiar with
+\idx{plain} \TeX.
+If you don't already know plain \TeX, a good way to learn is to read
+and work through the exercises in
+\booktitle{A Gentle Introduction to \TeX} by Michael~Doob.\reference{Doob}
+M.~Doob,
+\booktitle{A Gentle Introduction to \TeX\ (A Manual for Self-Study)},
+(\TeX\ User's Group, Providence).
+Also available as a plain \TeX\ file from CTAN or at\n
+\URL{ftp://ftp.texsis.org/pub/tex/gentle.tex}
+\endreference
+The source file for this (called {\tt gentle.tex}) is available on the
+\TeXsis\ ftp server, or on CTAN.
+You can also start by reading the \TeXbook, paying special attention
+to chapters~1-10 and 16-19.
+The manual by Spivak\reference{Spivak}
+M.~Spivak,
+\booktitle{PC\TeX\ User's Guide.}
+(Documentation distributed with PC\TeX)
+\endreference
+which accompanies PC\TeX\ (which is an implementation of \TeX\ for the
+IBM~PC) is also recommended.
+
+
+%==================================================*
+\subsection{Overview of this Manual}
+
+The main topics covered in the several sections of this manual
+\linkname{page.itemize}{are}:\tag{page.itemize}{\folio}
+\itemize \clump
+\itm \Sect{intro} --
+An introduction to \TeXsis\ and the philosophy behind the macros, and
+instructions on how to begin using \TeXsis.
+
+\itm \Sect{fonts} --
+Selecting sizes and fonts of type, choosing single, double, or triple
+spacing, and automatically handling quotation marks.
+
+\itm \Sect{eqns} --
+Automatic numbering of equations, automatic sizing of parentheses and
+brackets, and special symbols for physics equations.
+
+\itm \Sect{refs} --
+Defining new references, for which numbers are assigned automatically,
+citing references already so defined, and making a list of references.
+
+\itm \Sect{labels} --
+Labeling things like section numbers, figures, items in an outline, or
+page numbers, and referring to them in other parts of the document.
+
+\itm \Sect{papers} --
+Producing a complete paper, including the title page, chapters,
+sections, subsections, and appendices, a table of contents, running
+headlines, and an index.
+How to use the "master file" concept to split a long document into
+several files.
+
+\itm \Sect{figures} --
+Producing automatically numbered tables and figures and producing
+ruled tables.
+
+\itm \Sect{envmt} --
+Displaying text in special ways using "environments," including those
+for centered lines, lists of things, listings of computer programs, and
+\TeX\ examples.
+
+\itm \Sect{fmts} --
+Using specialized layouts for journals and conference proceedings, and
+creating new ones.
+
+\itm \Sect{letr} --
+Typing letters, form letters, memos and referee reports.
+
+\itm \Sect{dcol} --
+Producing double column output.
+
+\itm \Sect{misc} --
+Miscellaneous macros for ignoring text and doing various other useful
+things, and a checkpoint/restart feature for printing very long documents.
+
+\enditemize
+
+Several appendices are also included to deal with more technical
+matters.
+%
+Appendix~A explains how to install \TeXsis\ on Unix computers, on a
+VAX/VMS system, and on an IBM~PC. It also explains how to customize
+\TeXsis\ for your own installation. Appendix~B lists changes that have
+been made to \TeXsis\ in recent revisions. Appendix~C lists the fonts
+usually available with \TeXsis.
+
+Two examples of \TeXsis\ documents are included in the standard
+distribution. The first, in the file |Example.tex|, is a short
+(3~pages) example of a physics paper typeset with \TeXsis. The second
+is this manual itself, which was also created with \TeXsis. If you
+would like to look at the files used to create the Manual, the master
+file is called |TXSdoc.doc|, and the various sections of the document
+are in files with names of the form |TXS|$xxxx$|.doc|. For those who
+are comfortable programming in \TeX\ it is possible to extract specific
+macros from the \TeXsis\ source code or to modify or even rewrite these
+macros. The source code is contained in files with names of the form
+|TXS|$xxxx$|.tex|. We have tried wherever possible to include
+at least somewhat
+illuminating comments in the source code.
+
+%======================================================================*
+
+\subsection{Getting Started \label{sect.start}}
+
+ Assuming that \TeXsis\ has been properly installed on your computer,
+using \TeXsis\ is as simple as using \TeX\ or \LaTeX.
+To run \TeX\ with the \TeXsis\ format to process a manuscript file
+called |myfile.tex| you simply give the command:
+\index{running@{running \TeXsis}}
+\def\HeadText{Getting Started}
+\TeXexample
+texsis myfile
+|endTeXexample
+As with any version of \TeX, the output from \TeX\ is put in the file
+|myfile.dvi|, which you may view on your computer terminal or print on
+a laser printer or other output device.
+
+ Since \TeXsis\ is a superset of plain \TeX, any file that you
+process with plain \TeX\ can be processed with \TeXsis, and you will
+get the same results.
+In particular, plain \TeX\ defaults to 10~pt.\ type and single spacing
+between lines, and so does \TeXsis\ unless you initialize its special
+features.
+But since you are probably using
+\TeXsis\ because of these special features, you should begin your
+manuscript file with the initialization command
+\TeXexample
+\texsis
+|endTeXexample
+\noindent
+One of the things this command does is switch the output to 12~pt.\
+type, double spaced, which generally looks better on a small laser
+printer. Commands that allow you to change the type size or line
+spacing yourself are described in \Sect{fonts}. More
+specialized initialization commands may be used in place of (or
+in addition to) the |\texsis| command when you are using a
+pre-defined document layout. These are described in
+\Sect{fmts}.
+
+ Note also that just as in plain \TeX\ there is a difference
+between uppercase and lowercase letters in control word names.
+Thus if you say \cs{TeXsis} instead of \cs{texsis} you won't
+initialize any special features but you will print out
+``\TeXsis.''
+
+
+%==================================================*
+\newpage
+\subsection{Some Philosophy \label{sect.philosophy}}
+
+In designing the \TeXsis\ macros we have tried to follow some basic
+guidelines which we feel make \TeXsis\ a more useful tool.
+It may help you while learning about \TeXsis\ to know what these
+guidelines are, especially if you are already familiar with other
+\TeX\ macro packages.
+However, you can skip this section without missing anything important
+to a first time user.
+
+The guidelines we have followed are: \index{philosophy}
+
+\itemize
+\itm
+\TeXsis\ is a superset of plain \TeX, so that anything
+you can't do in \TeXsis\ (and even those that you can) can be done
+with plain \TeX\ instead. \index{compatibility!with@{with plain \TeX}}
+This also means that \TeXsis\ is compatible with most plain
+\TeX\ macro packages, such as |epsf.tex| and |index.tex|, or other
+specialized macro sets.\Footnote\dag{We cannot completely guarantee this
+because other macro packages might define macros with the same names as
+used by \TeXsis, although we have taken several steps to prevent this
+kind of conflict.} Even if some of the plain macros are actually
+redefined in \TeXsis, they are required to still behave as described in
+\TeXbook.
+
+\itm
+When a \TeXsis\ macro is similar to a plain \TeX\ macro it should, when
+possible, have a similar name and syntax. \index{macros!syntax} Thus
+\cs{Footnote} in \TeXsis\ is used exactly like \cs{footnote} in plain
+\TeX, and in ruled tables ``|&|'' and ``|\cr|'' can be used exactly as
+they are in an |\halign|.
+
+\itm
+Macro names\index{macros!names} will be short and simple, but
+descriptive.
+Almost all plain \TeX\ macro names are in lower case for ease of
+typing, so macros with names containing uppercase letters can
+immediately be recognized as being a part of
+\TeXsis\ (instead of plain \TeX). As a general rule though we try
+to use lowercase for frequently used macro names for ease of typing.
+
+\itm
+There are two different ways in which arguments may be passed to
+macros, depending on the length of the argument.
+Short arguments are simply enclosed in curly brackets, the way \TeX\
+usually handles macro arguments.
+For example, the title of a section is created by the
+\cs{section}\index{macros!arguments} command with,
+\TeXexample
+\section{The nonlinear $\sigma$-model}
+|endTeXexample
+Longer amounts of text (many lines), and text which is considered to be
+in a special environment, is enclosed between commands of the
+form ``|\thing|'' and ``|\endthing|.'' An abstract, for example, is
+typed as,
+\TeXexample
+|smalltt\abstract
+A mechanism for total confinement of quarks, similar to that
+of Schwinger, is defined which requires the existence of
+Abelian or non-Abelian gauge fields. It is shown how ...
+\endabstract
+|endTeXexample
+This is similar to the |\begin{thing}| {\ttdots} |\end{thing}|
+construction in \LaTeX\ \index{latex@{\LaTeX}} but is slightly easier
+to type.\Footnote*{And, more importantly, is compatible with plain
+\TeX---|\end| signals the end of a document in plain \TeX,
+and shouldn't be used for anything else. However, if you really want
+to type |\begin{thing}| and |\end{thing}| you can do so, and \TeXsis\
+will understand it to mean |\thing| and |\endthing|.}
+The reason for preferring this way of delimiting text or arguments is
+that for very long pieces of material it is much easier to look for
+something like |\thing| and |\endthing| than it is to count curly brackets.
+
+\itm
+The fundamental purpose of \TeXsis\ is to typeset printed words and
+\hbox{equations} on a physical piece of paper.
+In other ``document mark-up'' languages, including SMGL, HTML, and
+\LaTeX, the primary goal is to create in the computer an abstract
+representation of a document which is independent of the way the
+document is printed.
+It can be useful to treat a document this way, and so we sometimes use
+similar ideas in \TeXsis, but this approach can also conflict with the
+goal of typesetting the document the way an author or editor would
+choose.
+Whenever there is such a conflict we will err on the side of
+``typesetting'' rather than on the ``abstract representation'' of the
+document.
+
+\itm
+The source code defining the macros should be available to the users,
+so that those who want to see how something is done can do so, and
+those who want to make their own modifications can do so.
+The macro definitions should include sufficient comments that
+(usually) someone with only a little bit of experience with \TeX\ can
+understand what is going on.
+Also, macros which perform similar functions and work together should
+be kept in a single file, but separate parts of the whole package
+should be kept in separate files.
+When possible these individual files should be usable on their own
+with plain \TeX.
+For example, it is possible to use just the double column macros of
+\TeXsis\ by saying |\input TXSdcol.tex|, and the ruled table macros
+can be used in plain
+\TeX\ by saying |\input TXSruled.tex|.
+
+\enditemize
+
+
+
+\newpage
+
+% >>> EOF TXSintro.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSletr.doc b/Master/texmf-dist/doc/texsis/base/TXSletr.doc
new file mode 100644
index 00000000000..4451a3c304b
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSletr.doc
@@ -0,0 +1,588 @@
+%% file: TXSletr.doc - Letters and Memos - TeXsis 2.18
+%% @(#) $Id: TXSletr.doc,v 18.3 2000/06/01 21:54:30 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1994, 1997 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\bs \texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+
+\section{Letters, Memos and Referee Reports \label{sect.letr}}
+
+ The commands \CS{letter}, \cs{memo}, \cs{referee} and
+\cs{formLetters} invoke special styles for producing letters or
+memos.
+The letter formats follow closely the letter format given in
+Appendix~E of \TeXbook, although there are some differences and some
+additions.
+\index{letters}
+
+
+\subsection{Letters}
+
+ \CS{letter} is designed for typing basic business-style letters
+on letterhead stationary. It uses the following commands:
+\description{~closing\qquad}\clump
+
+\itm{\CS{letter}}
+Initialize the letter format.
+
+\itm{\CS{dated}\arg{date}}
+Sets the current date to be \meta{date} rather than today's date.
+This redefines \cs{today} to be the date you give. If omitted,
+\cs{today} just gives the current date.
+
+\itm{\CS{withEnvelope}}
+Signals that an envelope should also be printed.
+See Section~\use{sect.env} to find out how this works.
+
+\itm{\CS{letterhead}\arg{phone-ext}}
+Puts the date and phone number \<phone-ext> at the top of the page, so
+that it will appear near the letterhead when the letter is printed on
+your institutional stationary.
+
+\itm{\CS{address}}
+The name and address of the recipient should follow, in \cs{obeylines}
+format. The first line is used as the name of the addressee in a running
+headline for pages after the first.
+
+\itm{\CS{body}}
+Begins the body of the letter. The line immediately below this should
+be the opening salutation, (e.g. ``Dear Ann Landers,'').
+
+\itm{\CS{closing}}
+Begins the closing material, in \cs{obeylines} format. The first line
+following is the closing salutation (e.g. "Sincerely Yours,") and the
+second is the sender's name. When the letter is printed, room is left
+for a signature. Optional additional lines can be added after the name
+for the sender's title, or similar information.
+
+\itm{\CS{annotations}}
+Optional annotations follow, in \cs{obeylines} format.
+
+\itm{\CS{cc}}
+Carbon copy. A "cc:" and the names following are printed,
+properly aligned.
+
+\itm{\CS{Encl}}
+Enclosure. This is like \CS{cc} but "Encl:" is printed
+for a list of enclosures.
+
+\itm{\CS{ps}}
+Optional postscript follows. This is not in \cs{obeylines} format.
+
+\itm{\CS{endletter}\qquad}
+Ends the letter. You can say \cs{bye} instead.
+\enddescription
+
+The \CS{letter} document format automatically sets up a running headline
+for all pages after the first, containing the addressee's name (taken
+from the first line following \cs{address}), the date, and the page
+number. If you wish, you can turn off these running headlines by saying
+\cs{nopagenumbers}. If you want to change the name of the addressee you
+can simply redefine the macro called \CS{addressee} anytime after
+\cs{address} has been used (using \cs{gdef}, so that the re-definition
+exists outside of the group used to enclose the address). Or, if you
+don't want the person's name used at all, simply redefine \CS{addressee}
+to be empty, like so: |\gdef\addressee{}|.
+
+\bigskip
+
+ The use of some of these macros is illustrated by the following
+example:
+\TeXexample
+\texsis
+\letter
+\dated{1 April 1999}
+\letterhead{7734}
+\address
+Prof.~D. Knuth
+Stanford University
+Stanford, CA~94305
+\gdef\addressee{Knuth, the \TeX\ God}
+\body
+Dear Prof.~Knuth:
+
+ We enclose the documentation and source code for a \TeX\
+macro package which we have developed for physics papers.
+
+\closing
+Sincerely yours,
+Eric Myers
+Frank E.~Paige
+\ps This stuff is also available by anonymous ftp.
+\endletter
+|endTeXexample
+
+By default the closing material is indented about 3.5 inches.
+The actual amount is set by \CS{longindent}, which you can change.
+You should put the change on the same line as the \CS{closing},
+like so:\index{letters!adjusting size}
+\TeXexample
+\closing\longindent=0pt
+Sincerely yours,
+Joe User
+|endTeXexample
+\noindent
+This example puts the closing material flush with the left margin. You
+should not put \CS{longindent}|=0pt| on the line following, because
+\CS{closing} uses that line as the closing salutation (like
+``Sincerely,'').
+
+The default ``letterhead'' created by \CS{letterhead} is pretty plain --
+it just puts the date and phone number at the top of the page. The
+idea is that you can put your own office letterhead stationary in the
+printer and when you print the letter on this paper the date and phone
+number will be in an appropriate position.\Footnote*{If you can't put
+stationary in your printer you can copy it onto stationary with a
+copying machine.}
+Alternatively, you can create a different letterhead macro to actually
+print a letterhead at the top of the page. The physics department at
+Excited State University could have a custom |\ESUletterhead| macro
+which prints their logo and letterhead (it should still take a phone
+number as an argument, to make it easier to switch between
+|\ESUletterhead| and |\letterhead|.) These kind of custom macro
+definitions should be put in a local site file, as described in
+Appendix~\use{install}.
+
+ If a letter is somewhat too short or too long to fit on a page,
+its length can be adjusted indirectly by changing the width of the text.
+To do this insert \CS{letterwidth}\arg{width} immediately after
+\cs{letter} to set the width of the text.
+Not only does this change the \cs{hsize} to the size you specify, but it
+also adjusts the margins and centers the text appropriately (so it is
+preferable to simply changing the \cs{hsize}).
+
+\bigskip
+
+A simple Unix shell script called \idx{{\tt letr}} is included with
+the current \TeXsis\ distribution to make it easier to compose
+letters.
+Saying
+\TeXexample
+letr -m Hutu |endTeXexample will create a template file |Hutu.tex|, if
+there is not already a file by that name, and then start you editing
+the file.
+It then automatically runs your file through \TeXsis, and the envelope
+file too if it exists (see the next section).
+The |-m| flag, which is optional, should tell your printer to go into
+``manual feed'' mode to wait for you to feed in your own stationary.
+(Manual feed mode is always selected for an envelope printed by |letr|.)
+
+ Keep in mind that this only works on Unix and the script
+has to be executable and exist in your ``path''. Ask a local wizard
+for help if you don't know what this means.
+
+
+%======================================================================*
+
+\subsection{Envelopes \label{sect.env}}
+
+Many laser printers can print on envelopes, as long as you arrange to
+put the address and return address in the right place, and print the
+material in ``landscape'' mode (turned 90\degree\ on the page).
+The simplest way to do this is to simply say \CS{withEnvelope} at the
+beginning of your file, after the \cs{letter}.
+When you run your letter through \TeXsis, it will then create a file
+with the same name but an extension of |.env|, which contains the
+commands to print the envelope.
+Run {\sl that} file through \TeXsis\ and print the output in landscape
+mode and you will get your envelope.
+If you are using |dvips| the appropriate command is
+\example
+|dvips -m -t landscape myfile.dvi|
+\endexample
+The ``|-t landscape|'' rotates the output, while the ``|-m|'' puts the
+printer in manual feed mode so that you can feed in the envelope.
+
+You will have to figure out how your printer wants the envelopes to be
+fed to it.
+Some take the envelope down the middle, while others want it over to
+one side or another.
+You can adjust for different envelope sizes, or shift the position of
+the printing over a bit to make it easier to feed in the envelope, by
+changing the parameters \CS{EnvlWidth}, \CS{EnvlHeight}, and
+\CS{ENvlVoffset}. The default values are
+\TeXexample
+\newdimen\EnvlWidth \EnvlWidth=24cm
+\newdimen\EnvlHeight \EnvlHeight=10.5cm
+\newdimen\EnvlVoffset \EnvlVoffset=1.25in
+|endTeXexample
+
+The actual printing of the envelope is done by the macro
+\CS{MakeEnvelope}, which takes two arguments.
+The first is the address, while the second is the return address.
+Line endings in either are respected, or you can use \cs{n} to cause a
+line break.
+
+Saying \CS{withEnvelope} simply causes a \CS{MakeEnvelope} command to
+be written to the |.env| file when you say \cs{endletter} or \cs{bye}.
+You can edit that file before your run it through \TeXsis\ if you
+don't like the form of the address or return address.
+Alternatively, \CS{withEnvelope} will use the two macros
+\CS{theSignature} and \CS{ReturnAddress} to construct the return
+address.
+The default value for \CS{theSignature} is taken to be the name
+appearing after the closing salutation, below \cs{closing}.
+If you want to change it to something else you should include a new
+definition {\em after} the \cs{closing}, using |\gdef|.
+For example,
+\TeXexample
+\closing
+Sincerely yours,
+Joe User
+\gdef\theSignature{Joe's Mamma}
+|endTeXexample
+This would use ``Joe's Mamma'' as the name on the return address,
+even though ``Joe User'' would appear in the closing of the letter.
+
+
+
+%======================================================================*
+\pagecheck{0.5\vsize}
+
+\subsection{Memos \label{sect.memo}}
+
+ Saying \CS{memo} sets up a special format for memoranda,
+including a header at the top of the page with the name of your
+organization and the word "MEMORANDUM". The organization name defaults
+to \cs{ORGANIZATION}, which you can change if you like simply by
+saying \index{memos}
+\example
+|\def|\cs{ORGANIZATION}\arg{name}
+\endexample
+(This can be done once in the file |TXSsite.tex| before compiling
+\TeXsis, as described in
+Appendix~\use{install},\index{memos!customization} or you can explicitly
+put the name of your organization in your file.) The commands for the
+memo format are:
+\description{Xendmemo\quad}\clump
+%
+\itm{\CS{memo}}
+Initialize \TeXsis\ for memo format.
+%
+\itm{\CS{faxmemo}}
+A document format similar to \CS{memo}, but for faxes.
+Included in the header is a space to enter the number of pages sent.
+A return fax number is also included if it is defined in
+\CS{FaxNumber}.
+%
+\itm{\CS{Date}}
+Prints the word "{\twelvess Date:}" and the date, which must be on the
+same line. If no date is given, then the current date is used, as given
+by \cs{today}. If you would rather have the date in the upper right hand
+corner, as in a letter, use |\letterdate| instead of \CS{Date}.
+%
+\itm{\CS{To}}
+Prints the word "{\twelvess To:}" and the name(s) which follow.
+%
+\itm{\CS{From}}
+Prints the word "{\twelvess From:}" and the name(s) which follow
+%.
+\itm{\CS{Subj}}
+Prints the word "{\twelvess Subject:}" and the subject which
+follows. The subject may be several lines long. The first line
+of the subject field is used in a running headline at the top of
+all pages following the first.
+%
+\itm{\CS{FAX}}
+Prints ``{\twelvess FAX \#:},'' for entering a fax telephone number.
+%
+\itm{\cs{n}}
+New line for |\To|, |\From|, or |\Subj|.
+%
+\itm{\CS{nopagenumbers}}
+Turns off the running subject headlines and the page numbers.
+This must be typed after |\memo| since it is redefined by the
+memo format.
+%
+\itm{\CS{Text}}
+Begins the text of the memo. You can also say \cs{body}.
+%
+\itm{\CS{annotations}\qquad}
+Optional annotations follow, in \cs{obeylines} format.
+%
+\itm{\CS{cc}}
+Carbon copy. A "cc:" and the names following it are printed,
+properly aligned in \cs{obeylines} format.
+%
+\itm{\CS{Distribution}\qquad}
+This is like \CS{cc} but prints "Distribution:" instead.
+%
+\itm{\CS{Encl}}
+This is like \CS{cc} but prints "Encl:" instead, as for letters.
+%
+\itm{\CS{ps}}
+Optional postscript follows. This is not in \cs{obeylines} format.
+%
+\itm{\CS{endmemo}}
+Ends the memo. You can say \cs{bye} instead.
+\enddescription
+
+ All of these commands with mixed case names have synonyms which are
+the same name but in all lower case letters. The use of the \cs{memo}
+format is illustrated by the following example:
+\TeXexample
+|smalltt\memo
+\To \TeXsis\ Users
+\From E. Myers and F.E. Paige
+\Date
+\Subj \TeXsis\ 2.18
+\text
+ \TeXsis\ 2.18 is now available. The new version adds
+several features and corrects various bugs.
+\Distribution
+A. Blake
+I. Harrity
+B. Nichols
+\endmemo
+|endTeXexample
+
+If the memo is longer than one page a headline containing the subject
+and page number is put across the top of all pages after the first. If
+the subject is longer than one line only the first line of the subject
+is used in this headline. You can easily change what is used as this
+subject line by changing the definition of the macro \CS{subjectline}
+anywhere in the body of the memo. For example, although the subject of
+your memo might be simply ``Annual Report,'' you might make the headline
+more specific by defining:
+\TeXexample
+\def\subjectline{Annual Activity Report for Buckaroo Banzai}
+|endTeXexample
+\nobreak\noindent
+Then this longer title will appear with the page number on all pages
+after
+the first.
+
+
+%======================================================================*
+\subsection{Referee Reports}
+
+ The \CS{referee} format creates a document very much like a
+\cs{memo}, although there are some important differences.
+\index{referee reports}
+Referee reports are supposed to be confidential, so instead of
+printing the name of your organization at the top of the first
+page it puts the words ``Referee Report.'' In the
+\CS{referee} format you can use the same commands that are used in
+the \cs{memo} format, such as |\To| and |\Date|, but if you use
+\cs{From} a warning message will be printed on your screen. (This
+is only a warning, it still does what it has been asked to do!)
+
+\bottomfigure{Referee}
+\begingroup
+\def\resetcounters{\relax} % don't globally change the section number
+\line{\hfil
+\tightboxit{\hbox{\vbox to 11cm{\leftskip=1cm
+\referee\ninepoint\hsize=8.5cm\rightskip=1cm
+\centerline{{\twelvepoint\bf Referee Report}}
+\bigskip
+\memoitem{DATE:} 1 April 2001
+\memoitem{TITLE:} \TeXsis\ -- \TeX\ Macros for Physicists
+\memoitem{AUTHORS:} E.~Myers and F.E.~Paige
+\memoitem{MANUSCRIPT:} LP-3105
+\text
+This is pretty good, but it's too long
+for Physical Review Letters.
+\vfill}}}
+\hfil}
+\endgroup
+\caption{Sample Referee Report}
+\endfigure
+
+
+ There are also some additional commands for the referee
+report format:
+\description{~authors\qquad}\clump
+%
+\itm{\cs{title}}
+The title of the paper being reviewed should follow this on the
+same line. This is similar to |\Subj| in the memo format.
+%
+\itm{\cs{author}}
+Prints ``{\twelvess AUTHOR:}'' and the name that follows on the
+same line.
+%
+\itm{\cs{authors}}
+Same as \cs{author} for a paper with more than one author.
+%
+\itm{\CS{MSref}}
+Prints ``{\twelvess MANUSCRIPT:}'' and the manuscript reference number
+which follows.
+\enddescription
+
+ The text of the report should begin with \cs{text} or
+\cs{body}, just as for a memo, and the whole document should end
+with |\endmemo| or \cs{bye}. An example of the referee report
+format is given by the following:
+\TeXexample
+\referee
+\date 1 April 1999
+\title \TeXsis\ -- \TeX\ Macros for Physicists
+\authors E.~Myers and F.E.~Paige
+\MSref LP-3105
+\text
+This is pretty good, but it's too long
+for Physical Review Letters.
+\bye
+|endTeXexample
+This produces a report which looks something like \Fig{Referee}
+
+
+
+%======================================================================*
+\subsection{Form Letters \label{sect.form}}
+
+ The \CS{formLetters} layout makes it simple to send
+identical or similar letters to a list of people.
+\index{form letters}\index{letters|see{form letters}}
+\index{mail merge|see{form letters}}
+The body of the form letter is stored in one file using the standard
+\TeXsis\ letter format, while the control commands and a list of
+addresses are put in a second file. The body of the letter should begin
+with \cs{body} and end with \cs{endletter}, and it can contain an
+arbitrary number of control sequences defined for each recipient. It
+can make use of all the features of the letter format. For example,
+the letter body might contain the following
+
+\TeXexample
+|smalltt\body
+Dear \Whoever:
+
+\if P\Job
+ I wish to apply for a postdoctoral position
+\else\if F\Job
+ I wish to apply for a faculty position
+\else
+ I wish to apply for a postdoctoral or faculty position
+\fi\fi
+at your institution. Enclosed you will find my curriculum vitae,
+a list of publications, and ...
+
+\closing
+Sincerely yours,
+Joe Postdoc
+\Encl
+Publication list
+Curriculum vita
+\endletter % don't say \bye here!
+|endTeXexample
+This example addresses the letter to |\Whoever|, and it uses the
+first text if |\Job| is |P|, the second if |\Job| is |F|, and the
+third otherwise. Thus form letters are very flexible.
+
+ The mailing list file initializes the form letter macros and
+contains the list of addresses. \TeXsis\ should be run on this file, not
+on the file containing the body of the letter! For the example above it
+would have the form:
+\TeXexample|smalltt
+\texsis
+\formLetters{\letterhead{7734}}{letterbody.tex}
+
+\BL Prof.\ John Doe
+ Department of Physics
+ University of Nowhere
+ Nowhere, OK 73019 USA
+ \V\Whoever{Professor Doe}
+ \V\Job{F}\EL
+
+\BL Dr.\ Buckaroo Banzai
+ Physics Department
+ The Banzai Institute
+ Grovers Mill, NJ 08544
+ \V\Whoever{Dr.\ Banzai}
+ \V\Job{P}\EL
+...
+\endform
+\bye
+|endTeXexample
+\noindent
+
+ The first argument of \cs{formLetters} is something like the usual
+\cs{letterhead} macro, with your phone number. Depending on your
+letterhead this might have multiple parameters or might even be several
+control sequences (all enclosed in a set of curly braces, of course).
+The second argument to \cs{formLetters} is the name of the file
+containing the body of the letter. The idea is that the stuff in the
+first argument gets put into the letter {\it before} the address, while
+the body of the letter (read from the file) is what goes after the
+address. Each letter begins with \CS{BL} ("Begin Letter") and has the
+name of the addressee on the same line and the address on the following
+lines. Any ``variables'' used in the letter can be defined using
+\cs{V}, which is just an abbreviation for \cs{gdef}. Because \cs{V} is
+simply \cs{gdef}, if you omit \cs{V} from an address entry, the value
+defined in a previous entry will be used. If necessary, variables can
+also be defined before the \CS{BL}. Each address in the mailing list is
+ended by \CS{EL} ("End Letter"). When the \CS{EL} is executed it reads
+in the file containing the text for the letter and actually produces the
+letter.
+
+ Any address in the list can be ignored simply by replacing the
+\CS{BL} with \CS{IL} ("Ignore Letter"). In particular, this can be done
+by a simple global edit after each batch of letters is made, and the
+same file can then be used to send a second mailing by changing \CS{IL}
+back to \CS{BL} for a select subset of addresses.
+
+In earlier versions of \TeXsis\ the
+\cs{formLetters} command was called \cs{formletters}.
+The first is now prefered, though the second will also be accepted.
+Also, as of \TeXsis\ version 2.17 the form letter macros have actually
+been moved to the style file {\tt Formletr.txs}.
+This style file is \cs{autoload}'ed, so as long as you have that file
+on your system you should not notice a difference.
+
+
+\bigskip
+\nosechead{Mailing Labels}
+
+ The same address file can be used to produce mailing labels
+instead of letters simply by replacing |\formLetters{...}{...}| with
+\CS{formLabels}. It is assumed that there are three columns of names and
+addresses to fit on standard photocopy machine mailing labels. With the
+default parameters nine labels each 1~in.\ high are printed per column
+with the top and bottom rows left blank. This can be changed, and the
+alignment of the labels can be adjusted, by setting appropriate values
+for the following dimensions:
+\TeXexample
+|smalltt
+\fullHsize=8.500in % hsize for label page
+\fullVsize=9.999in % vsize for label page
+\lblHsize=2.833in % width of standard label
+\lblVsize=1.000in % height of standard label
+\lblVoffset=0.100in % vertical starting position
+\lblHoffset=-0.500in % horizontal starting position
+|endTeXexample
+Choosing appropriate values may require some experimentation with your
+printer and labels. When the correct values are found, they can be
+set in the file |TXSsite.tex| before compiling the format (see Appendix~A).
+
+ Please note that earlier versions of \TeXsis\ used
+\cs{formlabels} rather than \CS{formLabels}, but the latter is now
+prefered.
+
+\bigskip
+\nosechead{Printing Envelopes}
+
+ Instead of printing mailing labels and then peeling these off to
+put them on envelopes, it is possible to print addresses from your
+mailing list directly onto envelopes, if your printer is capable of
+feeding envelopes. To do this, simply use \CS{formEnvelopes} in place
+of \CS{formLabels}. Then each address is simply fed into a
+\cs{MakeEnvelope} command.
+To set the return name and address you can define \cs{theSigature}
+and \CS{ReturnAddress}, as in this example:
+\TeXexample
+\texsis
+\def\theSignature{Joe Rockhead}
+\def\ReturnAddress{Department of Physics\n
+ University of Delphi\n
+ Oracle, UT 65432}
+\formEnvelopes
+|endTeXexample
+You will probably have to print the output in ``landscape'' mode,
+and you may want to adjust the size or placement of the envelopes,
+as described in Section~\use{sect.env}.
+
+%>>> EOF TXSletr.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSmisc.doc b/Master/texmf-dist/doc/texsis/base/TXSmisc.doc
new file mode 100644
index 00000000000..399be609773
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSmisc.doc
@@ -0,0 +1,298 @@
+%% file: TXSmisc.doc - Miscellaneious Macros - TeXsis version 2.18
+%% @(#) $Id: TXSmisc.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1992 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\bs \texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+\section{Miscellaneous Macros \label{sect.misc}}
+
+There are a number of useful macros in \TeXsis\ which don't fit into any
+of the topics covered in previous sections but which still deserve some
+discussion. We will simply lump them all together in this final
+section.
+
+\subsection{{\tt\string\draft} mode}
+
+Saying \CS{draft} turns on a number of features which are useful for
+making a draft copy of a document. The disclaimer ``{\tt Preliminary
+Draft}'' is added to the bottom of each page of the document, along with
+the page number and a time and date stamp. The page number will let you
+keep track of the page order even when using a document format which
+does not print page numbers (such as the \cs{nuclproc} or
+\cs{NorthHollandTwo} camera-ready formats). The date/time stamp
+can help you tell later drafts from earlier versions of the same
+document. \CS{draft} sets \cs{eqnotracetrue} so that equations
+are marked with their internal labels in the right margin next to
+the equation number (as described in Section~\use{sect.eqns}).
+Other kinds of errors, such as trying to use undefined labels for citations
+equations, are also marked in the right-hand margin. \CS{draft} also
+sets \cs{overfullrule}|=1em| so that over full \cs{hbox}es are marked
+with a black box.
+Without \CS{draft}, initializing \TeXsis\ with \cs{texsis} sets
+\cs{overfullrule}|=0pt| so that over-full hboxes don't
+get these kinds of marks (while with plain \TeX\ you do get these
+marks).
+
+\bigskip
+%======================================================================*
+\subsection{Ignoring blocks of text}
+
+Sometimes you'd really like to take out a whole paragraph or an even
+larger section of a document, but only temporarily, and you don't want
+to actually delete it from the manuscript file. Recalling that in
+\TeX\ everything on a line following the comment character ``{\tt\%}'' is
+discarded, you could put a {\tt\%} on each line to be ignored,
+but that could be a lot of work. Instead, you can use \CS{comment}.
+The syntax is:
+\TeXexample
+\comment/* anything in here is ignored */
+|endTeXexample
+\noindent
+Everything between the |/*| and the |*/| is completely ignored. By
+removing the |\comment/*| and the |*/| the text can easily be restored
+to its previous state. You can include several paragraphs of text in
+the material to be ignored, or even several pages, but with one
+important restriction: All the curly brackets |{| and |}| must match in
+the text to be ignored. If there is a |{| with no closing |}| in the
+commented text then \TeX\ will skip the |*/| while searching for the
+closing |}|!
+
+Along the same lines is \CS{Ignore}, which will ignore everything
+following it up to \cs{endIgnore} (with the same restrictions above
+about matching grouping brackets). The useful thing about these is that
+if an \cs{endIgnore} is encountered before an \CS{Ignore} then the
+\cs{endIgnore} is simply ignored. Is that too confusing? What this means
+is that if you have a document with a large block of conditional text
+that you may or may not want included you can choose to include the text
+by simply removing (or commenting out) the \CS{Ignore}. If the block of
+conditional text looks like
+\smallskip\goodbreak
+\def\1{\meta{unconditional text}}\def\2{\meta{more unconditional text}}
+\TeXexample
+|1
+\Ignore
+Having obtained these eigenvalues we would like to
+know their degeneracies. For a given $l$ the ...
+...
+It is relatively easy to show that the number of
+independent components of such a tensor is ${N+l \choose l}$.
+\endIgnore
+|2
+|endTeXexample
+\noindent
+then even if the block of text to be ignored spans many pages it can be
+restored simply by changing the ``|\Ignore|'' to ``|%\Ignore|.'' Then
+the |\Ignore| is itself ignored, and when \TeX\ reaches the |\endIgnore|
+this also does nothing. The effect is the same as if these two commands
+were completely removed from the manuscript file, but it is easily
+reversed.
+
+Why are there two ways to ignore blocks of text? \cs{comment} was
+created first, and some programmer-types may prefer it because of the
+similarity it bears to comments in the C programming language.
+\cs{Ignore} is newer and probably a little more useful, but \cs{comment}
+will remain for those who want to use it.
+
+%======================================================================*
+\subsection{Checkpoint/Restart \label{sect.chkpt}}
+
+ The checkpoint/restart feature allows long documents to be printed in
+pieces. You can, for example, process and print the first chapter of a
+thesis (or a book) and then later do the same for following chapters.
+Saying \CS{checkpoint}|{NAME}| saves the settings of important counters
+like the current page number and the last equation number in a file
+called |NAME.chk|. Saying \CS{restart}|{NAME}| reads in this file and
+resets the counters to their previous values.
+\index{checkpoint}\index{restart}\index{restore|see{restart}}
+
+ As an example consider a document with two major chapters.
+Using a Master File you would first process the first chapters
+with the following:
+\TeXexample
+\thesis
+\input chap1
+\checkpoint{chap1}
+\bye
+|endTeXexample
+With this printed you could resume at the next page number with
+the correct subsequent numbers for equations, figures and tables
+by saying:
+\TeXexample
+\thesis
+\restart{chap1}
+\input chap2
+\bye
+|endTeXexample
+\noindent
+Normally |\checkpoint| and |\restart| are silent,
+but you can say \CS{endstat} to see the values of the counters
+saved by |\checkpoint|. The output looks like this:
+\TeXexample
+% Last PAGE number IS 63.
+% Last CHAPTER number IS 0.
+% Last EQUATION number IS 47.
+% Last FIGURE number IS 1.
+% Last REFERENCE number IS 9.
+% Last SECTION number IS 13.
+% Last TABLE number IS 0.
+|endTeXexample
+
+Modern laser printer drivers or filter programs like |dvips|, |dvi2ps|,
+or QTeX have
+options that let you select which pages of a document are printed,
+or there is a useful program called |dviselect|, which can select
+certain pages out of a dvi file into a smaller dvi file. These offer
+other ways to selectively print only part of a document
+and still get the page and equation numbers correct.
+
+%======================================================================*
+\subsection{Other Goodies...}
+
+These macros do various useful things:
+\singlelinetrue % make label overhang
+\description{unobeyspaces}\clump %
+
+
+\itm{\CS{jtem}\arg{label}\arg{dimen}}
+Similar to plain \TeX's |\item|, but sets the label \arg{label} with a
+variable hanging indentation \arg{dimen}.
+
+\itm{\CS{leftpar}\arg{text}}
+Turns the \meta{text} into a paragraph with a ragged {\sl left} margin.
+
+\itm{\CS{pagecheck}\arg{dimen}}
+Checks the amount of space remaining on the current page, and if this is
+less then \meta{dimen} then skips to a new page.
+
+\itm{\CS{topspace}}
+Use this like \cs{vskip} to create a blank space to the top of a page
+(because any space inserted with \cs{vskip} is thrown out if it appears
+at the top of a page). Example: |\topspace 2.54cm|.
+
+\itm{\CS{unobeylines}}
+The opposite of \cs{obeylines}, so line endings are no longer respected.
+
+\itm{\CS{unobeyspaces}}
+The opposite of \cs{obeyspaces}, so that spaces in the manuscript file
+are not counted exactly.
+
+\enddescription
+
+%----------------------------------------%
+\pagecheck{3cm}
+
+\subsubsection{Underlines}
+
+These macros let you underline words or create a ``blank'' line:
+\index{underlines}
+
+\description{unobeyspaces}\clump %
+
+\itm{\CS{undertext}\arg{text}}
+Underlines the \meta{text}, as in this \undertext{example}. This is
+generally okay for words but not phrases or sentences.
+
+\itm{\CS{theBlank}\arg{length}}
+Creates an underline of the specified length where one can ``fill in the
+blank.'' For example, saying `` |Name: \theBlank{6cm}| produces:
+``\hbox{Name:~\theBlank{6cm}}''.
+
+\enddescription
+
+%----------------------------------------%
+\subsubsection{Boxes}
+
+These macros let you put boxes around text or equations, or
+something similar:
+\index{boxes}
+
+\description{unobeyspaces}\clump %
+
+\itm{\CS{tightbox}\arg{box}}
+Puts a ruled box around the argument (which must be a box), with no
+intervening space.
+Example: |\tightbox{\hbox{Boo}}| produces ``\tightbox{\hbox{Boo}}'',
+
+
+\itm{\CS{loosebox}\arg{box}}
+Puts a ``loose'' box around the \meta{box}, with about one \cs{jot} of
+space between the edge of the \meta{box} and the enclosing box. What you
+do with this resulting box is up to you. Rules are {\sl not\/} put
+around this outer box, but you can enclose it in a \CS{tightbox} to do
+so, as in |\tightbox{\loosebox{Boo}}|, which gives
+``\tightbox{\loosebox{Boo}}.'' If you want the contents of this box to
+match the baseline of the current line, lower it by a \cs{jot}, as in
+|\lower\jot\tightbox{\loosebox{Boo}}|, which gives
+``\lower\jot\tightbox{\loosebox{Boo}}''.
+
+
+\itm{\CS{spine}\arg{text}}
+Creates a label enclosed in a ruled box, suitable for the spine of a
+3-ring binder. The box will be at least 15~cm long, but will extend if
+the text requires more space. The default type size is 24~pt, but can
+be changed in the \meta{text}. If the label is longer than the width of
+a page then it should be printed in landscape mode. Instructions for
+installing the label in the spine of a binder are printed (but only once).
+
+\pagecheck{5\baselineskip}
+
+\itm{\CS{eqnbox}\arg{math-expr}}
+Puts a box around the mathematical expression \meta{math-expr}.
+This can be useful for highlighting an important result.
+You can use this in any kind of math
+mode, but usually you will want to use it in a displayed equation,
+like so:
+\TeXexample
+$$
+\eqnbox{E=mc^2}
+\EQN 47$$
+|endTeXexample
+which produces:
+$$
+\eqnbox{E=mc^2}
+\EQN 47$$
+In an in-line math expression it appears like so: \eqnbox{E=mc^2}.\n
+Be careful not to over-use this, or its utility is lost!
+
+\itm{\CS{eqnmark}}
+Putting a box around an equation can be to distracting, but it is nice
+to have a way to mark ``important'' results. This is an alternative
+to \CS{eqnbox}. Simply put \CS{eqnmark} at the beginning of the
+displayed equation, immediately after the |$$|, and it will put a marker
+defined by \CS{eqnmarker} at the left edge of the equation (the default
+is ``$\eqnmarker$'').
+For example, typing
+\TeXexample
+$$\eqnmark
+E=mc^2
+\EQN 47$$
+|endTeXexample
+\noindent
+produces
+$$\eqnmark
+E=mc^2
+\EQN 47$$
+Note that \CS{eqnmark} does not work with \cs{eqalignno} or \cs{EQNalign}
+(which is just as well, so that you can't overuse it).
+
+\enddescription
+
+%==================================================*
+
+\subsubsection{Read the Code}
+
+There are a number of other macros in \TeXsis\ which are not
+described in this manual, either because (a) we didn't have time
+to describe everything, or (b) they are works in progress.
+In either case, if you are familiar enough with \TeX\ to write
+some simple macros for yourself, then you are familar enough to
+read through the code and find other useful goodies, or learn some new
+tricks. Just keep in mind that anything not described in the manual
+may be subject to change in a future release. And let us know if you
+find any mistakes.
+
+%>>> EOF TXSmisc.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSprns.doc b/Master/texmf-dist/doc/texsis/base/TXSprns.doc
new file mode 100644
index 00000000000..03f734edea7
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSprns.doc
@@ -0,0 +1,95 @@
+%% file: TXSprns.doc - Parentheses Sizing - TeXsis version 2.18
+%% @(#) $Id: TXSprns.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta \texsis\input TXSdocM.doc\draft\fi
+
+
+\subsection{Automatic Parentheses Sizing \label{sect.paren}}%
+Plain \TeX\ provides automatic adjustment of the sizes of parentheses
+and other delimiters when you use \cs{left} and \cs{right}, as in
+\index{parentheses!sizes}
+\example
+|$$|
+\cs{left}|(| \meta{math material } \cs{right}|)|
+|$$|
+\endexample
+\TeXsis\ provides similar automatic sizing of parentheses and square
+brackets in displayed equations without the need of typing \cs{left} and
+\cs{right}. You must still use \cs{left} and \cs{right} for all other
+delimiters, and they can be used for parentheses and square brackets if
+desired. This feature is turned on and off with \CS{autoparens} and
+\cs{offparens} respectively; the default, once you say \cs{texsis}, is
+\CS{autoparens}. Thus, for example,
+\TeXexample
+|smalltt\autoparens
+ $$
+( a \over b )
+ $$
+|endTeXexample
+produces
+\autoparens
+ $$
+( a \over b )
+ $$
+whereas
+\TeXexample
+|smalltt\offparens
+ $$
+( a \over b )
+ $$
+|endTeXexample
+\goodbreak\noindent
+produces
+\offparens
+ $$
+( a \over b )
+ $$
+\autoparens
+which is not what one normally desires.
+
+ The automatic sizing of parentheses works by making |)|, |(|, |]|,
+and |[| active characters in displayed equations and defining them to be
+macros which use \cs{left} and \cs{right} to size the parentheses. While
+this normally works properly and simplifies the typing of equations, it
+will fail if the \cs{left} and \cs{right} operators are not properly
+balanced, such as when a long equation is split between two or more
+lines with \cs{eqalign} or \cs{EQNalign}. Almost all such problems can be
+solved by using the control sequences \cs{lparen}, \cs{rparen}, \cs{lbrack},
+and \cs{rbrack}, which are taken from Plain \TeX\ and which give just the
+standard parenthesis and bracket characters. For example,
+$$
+\EQNalign{
+F &= \Biggl\lbrack (a \over b) + (c \over d) \cr
+&\qquad + (e \over f) + (g \over h) \Biggr\rbrack \cr}
+$$
+can be produced with
+\TeXexample
+$$
+\EQNalign{
+F &= \Biggl\lbrack (a \over b) + (c \over d) \cr
+&\quad + (e \over f) + (g \over h) \Biggr\rbrack \cr}
+$$
+|endTeXexample
+\noindent
+Note that in this example the parentheses are balanced on one line and
+so can be sized automatically, while the brackets span two lines and so
+must be sized ``by hand.'' The \cs{vbig} macro described in the next section
+provides additional flexibility for sizing.
+
+ If all else fails, you can use \cs{offparens} to turn off the
+automatic sizing of parentheses and put in \cs{left} and \cs{right} or
+explicit sizes yourself. In any case, you must put \cs{left} and
+\cs{right}, if needed, in in-line equations (math expressions which are
+not displayed equations), because. \CS{autoparens} only applies to
+displayed equations, not in-line math text.\Footnote\dag{Previous
+versions of \TeXsis\ used the control sequence \cs{onparens} to provide
+automatic parentheses sizing in {\it all} math-mode expressions. While
+you can still use this, we do not encourage it since it may cause
+problems with other uses of these characters.}
+
+%>>> EOF TXSprns.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSrefs.doc b/Master/texmf-dist/doc/texsis/base/TXSrefs.doc
new file mode 100644
index 00000000000..5d3f5c46449
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSrefs.doc
@@ -0,0 +1,474 @@
+%% file: TXSrefs.doc - References and Citations - TeXsis version 2.18
+%% @(#) $Id: TXSrefs.doc,v 18.5 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1999 by Eric Myers and Frank E. Paige.
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta\texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+
+\section{References and Citations \label{sect.refs}}
+
+ \TeXsis\ includes instructions for making citations to the
+literature in the text of a document.
+References are processed in the standard format used by many American
+physics journals: they are automatically assigned consecutive numbers
+as they appear in the text and are listed in numerical order at the
+end of the document.
+In the text a citation appears as a superscript number corresponding
+to the reference cited, though other methods of citation are possible
+(see Section~\use{sect.cite}).
+When each reference is defined it is given a \idx{label}, which is
+associated with the number assigned to the reference.
+Subsequent citations to the same reference are made using this label,
+so there is no need to know the particular number assigned to the
+reference. Indeed, the number may change as the document goes through
+editing and revision, \index{references}\index{citations|see{references}}
+but the references will still automatically be in the correct order.
+
+
+\subsection{Entering References}
+
+ \TeXsis\ is flexible enough that the text of the references may be
+entered in two different ways, either all references at once at the
+beginning of the document or each one individually at the point in the
+text where the work is first cited.
+In either case, \TeXsis\ stores the text of all of the references in
+numerical order until it is asked to print the list at the end of the
+document, by saying \cs{ListReferences}.
+
+ To make a citation to a new reference and to enter the text of the
+reference, use the command \CS{reference}\arg{label}, where
+\meta{label} is the label to be used to refer to this reference.
+This is followed by the text of the reference, which is terminated by
+\cs{endreference}. An example is:
+\TeXexample
+To this end we will follow Feynman\reference{Feynman, 1949}
+R.P.~Feynman, Phys.\ Rev.\ \vol{76}, 749 (1949)
+\endreference
+in developing the propagator approach.
+|endTeXexample
+\noindent
+This would appear in the text of the document as,
+\example
+To this end we will follow Feynman\reference{Feynman, 1949}
+R.P.~Feynman, Phys.\ Rev.\ \vol{76}, 749 (1949)
+\endreference
+in developing the propagator approach.
+\endexample
+and the text of the reference would be saved until the list of
+references is printed at the end of the document.
+If you look at the end of this manual you will see it.
+
+ There are several things to take note of in the example above. Most
+importantly, there is no space between the word in the text where the
+citation is made ("Feynman")\index{Feynman, Richard P.}
+and the \CS{reference}. This is so the
+superscript reference number will appear in the text right after the
+word to which the citation is attached, with no intervening space. Note
+also in the reference text the tie (|~|) between the initials and the
+name, the control spaces (\hbox{\tt\bs\ }) after the abbreviations, and
+the use of the \CS{vol} macro for the volume number;
+\CS{vol}\arg{number} prints the volume \meta{number} with an underscore
+below it.
+(This is easier to read than boldfaced volume numbers on small laser
+printers, but if you prefer something else you can simply redefine the
+\CS{vol} macro).
+Similarly, \CS{booktitle}\arg{title} will print the title of a book,
+in slanted type.
+Finally, note that there is no punctuation at the end of the reference
+text.
+This is because \TeXsis\ automatically supplies the appropriate
+punctuation when it prints the list of references.
+Normally this will simply be a period (.), but it is possible to have
+multiple references assigned to the same reference number, in which
+case the references are separated by semi-colons, with the last
+reference terminated by a period.
+How to do this is described below.
+
+ Since typing the text of a journal citation is somewhat complicated,
+the \CS{journal} macro was created to make things a little easier.
+The format is
+\example
+|\journal| \meta{journal name}|;|\meta{volume}|,|\meta{page number}%
+|(|\meta{year}|)|
+\endexample
+This constructs the journal citation for you, with periods automatically
+replaced by ``\hbox{\tt .\bs\char`\ }'' in abbreviations and the volume
+number underlined for you by |\vol|. It is important that the field
+separators (the semi-colon, the comma and the parentheses), all be
+present and in the right order or \TeX\ will look as far forward as it
+takes to find the next one it wants. There should be no extra spaces
+between the arguments.
+
+Besides making it a little easier to type a citation to a journal
+article, using \CS{journal} lets you switch from the American form of
+citation to the European form very easily. In the American form the
+page number follows the volume, followed by the year in parentheses. In
+the European form the year follows the volume number and the the page
+number comes after that. Normally \TeXsis\ uses the American form, but
+you can change to the European form simply by saying
+\example
+\CS{Eurostyletrue}
+\endexample
+The arguments to \CS{journal} are always in the American order,
+no matter how they are eventually printed.
+
+A number of abreviations which are commonly used in references
+and which are usually set in italics are defined as simple control
+words.
+Thus saying \CS{cf} produces ``\cf'', saying \CS{etal}
+produces ``\etal'', saying \CS{ie} produces ``\ie'', and
+saying \CS{ibid} produces ``\ibid''
+
+
+Sometimes you want to print the title of a journal article, and
+sometimes you don't. An easy way to control this is to enter the
+title using \CS{ArticleTitle}, as in\index{Schwinger, Julian}
+\TeXexample
+\reference{Schwinger, 1951}
+J.~Schwinger,
+\ArticleTitle{On Gauge Invariance and Vacuum Polarization}
+\journal Phys. Rev.;82,664(1951)
+\endreference
+|endTeXexample Then if you say \CS{ShowArticleTitletrue}, the title
+will be printed (in slanted type, with a trailing comma), but with
+\CS{ShowArticleTitlefalse} (the default)
+it will not.
+
+
+\bigskip
+
+ To enter several references with the same reference number simply
+begin the next \CS{reference} immediately after the previous
+\cs{endreference}, and begin the labels of all but the first reference with
+an asterisk "|*|", as in the following example:
+\TeXexample
+The vacuum polarization term can be regularized
+by introducing a cut-off at high
+frequencies.\reference{Pauli and Villars, 1949}
+W.~Pauli and F.~Villars, \journal Rev. Mod. Phys.;21,434(1949)
+\endreference
+\reference{*Schwinger, 1948}
+J.~Schwinger, \journal Phys. Rev.;74,1439(1948)
+\endreference
+|endTeXexample
+This produces the single citation
+\index{Schwinger, Julian}\index{Villars, F.}\index{Pauli, W.}%
+\example
+The vacuum polarization term can be regularized
+by introducing a cut-off at high
+frequencies.\reference{Pauli and Villars, 1949}
+W.~Pauli and F.~Villars, \journal Rev. Mod. Phys.;21,434(1949)
+\endreference
+\reference{*Schwinger, 1948}
+J.~Schwinger, \journal Phys. Rev.;74,1439(1948)
+\endreference
+\endexample
+The "|*|"\index{*@{\tt *}'d citations}
+at the beginning of the second label tells \TeXsis\ not
+to assign a new reference number to this reference, but instead
+just to add it to the text of the previous one.
+Of course you
+could type the text of both references between one \cs{reference}
+and \cs{endreference}. An advantage to following the example
+above is that the second reference can be given a reference
+number of its own simply by deleting the "|*|" at the beginning of
+the label. Similarly, two references with different reference
+numbers can be lumped together into one citation by inserting a
+"|*|" in front of the label of the second reference. Another
+advantage to keeping the references separate is that it is easy
+to move references around, either within a document that is being
+revised or between documents. It is therefore recommended that
+each reference be entered separately, although this is obviously
+not required.
+
+ Instead of putting the \cs{reference} \dots \cs{endreference} in
+the text it may be more convenient to type them all together,
+especially if they already
+appear that way in the manuscript. This can be
+done without producing any unwanted printed numbers by using
+\index{references!entering a list}
+\example\obeylines
+\CS{referencelist}
+|\reference{1}| {\it text 1...} |\endreference |
+|\reference{2}| {\it text 2...} |\endreference |
+|...|
+|\reference{last}| {\it last text...} |\endreference|
+\cs{endreferencelist}
+\endexample
+The \CS{referencelist} must appear at the beginning of the
+document, so that the reference labels are defined before they
+are used. This is best put into a separate file which is \cs{input}
+by the master file. Of course the list of references is not
+printed until the end of the document, when \cs{ListReferences} is
+called.
+
+\subsection{Citations to Defined References}
+
+ All subsequent citations to a previously defined reference are made
+using its label.
+If a \CS{referencelist} is used, then \undertext{all} citations
+appearing in the text will be made in this way, since then the initial
+reference definitions print nothing.
+The construction \CS{cite}\arg{label} prints the reference number
+corresponding to the label as a superscript.
+For example,
+\TeXexample
+A good discussion of this is given by Doob\cite{Doob} in section~7.
+|endTeXexample produces
+\example
+A good discussion of this is given by Doob\cite{Doob}
+in section 7.
+\endexample
+since Michael Doob's\index{Doob, Michael} book \booktitle{A Gentle
+Introduction to \TeX} is in fact \Ref{Doob} of this document and has
+the label "|Doob|."
+If several \CS{cite}'s are given in succession then the corresponding
+numbers are printed separated by commas.
+Unlike \cs{reference}, which defines the reference numbers, \CS{cite}
+does not know if references are sequential, so it cannot replace a
+sequence of numbers by a range.
+To avoid a long sequence of reference numbers use instead
+\CS{citerange}\arg{first label}\arg{last label} to print the numbers
+corresponding to the first and last labels as a range.
+
+ The construction \CS{Ref}\arg{label} produces ``Ref.~$nn$'' in the
+text, with $nn$ the number of the reference corresponding to the
+label. For example, the ``\Ref{Doob}'' in the previous paragraph was
+typed into the manuscript file as |\Ref{Doob}|. \CS{Ref} is simply
+shorthand
+for |Ref.~\use{Ref.|\<label>|}|, and you can change what is printed
+simply by changing the definition of \CS{Ref}. For example, if you said
+\TeXexample
+\def\Ref#1{reference~\use{Ref.#1}}
+|endTeXexample
+\noindent
+then |\Ref{Doob}| would produce ``reference~\use{Ref.Doob}'' instead.
+See Section~\use{sect.labels} for more on how to use \cs{use}.
+
+%==================================================*
+
+\subsection{Listing the References}
+
+ After the text of the document is complete a printed list of the
+references can be obtained by saying
+\TeXexample
+\ListReferences
+|endTeXexample
+This prints the numbers at the left hand edge of the page with the
+text indented by \CS{refindent}, which is chosen so that the equation
+numbers line up, and it puts a \CS{refskip} (initially equal to a
+\cs{smallskip}) between references.
+The reference format can be changed by redefining the command
+\CS{refFormat}, which is executed just before the references are
+printed and which initially is simply \cs{relax}.
+For example, to have the reference list printed with a ragged right
+margin, with no vertical skip in between references, one could say
+\index{references!printing the list}
+\index{lists!of references}
+\TeXexample
+\def\refFormat{% formatting for the list of references
+ \raggedright % ragged right margin
+ \refindent=2cm % instead of ``natural'' value
+ \let\refskip=\bigskip % more space between entries
+ }
+\ListReferences % now do it
+|endTeXexample
+
+
+No heading is printed for the reference list --- you have to do this
+yourself in whatever format is appropriate.
+Often you will want to use \cs{nosechead} (or perhaps
+\cs{beginsection} from Plain \TeX), but sometime you may want
+to use \cs{chapter} or \cs{section} instead.
+The choice is up to you.
+
+When you have several references under the same number, the |*|'d
+references described earlier, they will each normally be printed
+begining on a new line.
+You can supress the extra line ends and run the reference text
+together by saying \CS{refbreaksfalse}.
+To go back to breaking lines between multiple citations you should say
+\CS{refbreakstrue}.
+
+Once the list of references has been printed, everything is reset so
+that you can start over collecting new references.
+This is useful if you want to print the references at the end of each
+chapter of a book, or at the end of each paper in a conference
+proceedings.
+
+
+
+%==================================================*
+\subsection{Citation Styles \label{sect.cite}}
+
+Superscript reference numbers are the simplest form of citation, and
+the default in \TeXsis, but there are also several other popular
+conventions for making citations.
+One common one is to display the reference number enclosed in squaqre
+brackets rather than as a subscript.
+Another is to display a ``citation key,'' such as the first author's
+last name and the year, either in brackets or parentheses.
+\TeXsis\ is flexible and allows you to use any of these citation
+styles.
+
+To cause the reference numbers to appear within brackets simply say
+\CS{CiteByNumber}.
+(To go back to superscript reference numbers say
+\CS{CiteBySuperscript}.)
+It would be nice if that is all you had to do to switch from one
+citation style to another, but there is one complication.
+When a citation appears at the end of a sentence it looks best if the
+punctuation comes before a superscript, but after a reference number
+in brackets.
+Getting this right is more than a mere macro can easily do, so if you
+switch from one style to the other you will have to make appropriate
+corrections to your document for citations that appear at the end of
+sentences.
+
+\Ignore % Duh?
+Both \CS{CiteBySuperscript} and \CS{CiteByNumber} list the references
+by number when you say \cs{ListReferences}.
+\endIgnore
+
+
+Another citation style which was more popular in journals many years
+ago is to cite the work in the text using a superscript number, but to
+put the text of the reference at the bottom of the page as a footnote
+rather than at the end of the paper or chapter as an ``endnote.''
+This is achieved by saying \CS{CiteByFootnote}.
+This can be useful for a draft of a paper even if you will eventually
+use a different citation style, because it makes it easier to check
+the reference text as you proofread the paper.
+By the same reasoning it's actually a nice citation style for
+scientific books and papers in general, because the reference text is
+right there.
+If the author thinks it is important enough to his/her argument to
+cite another work then it is probably imporant for the reader to see
+the reference text at that point.
+We hope that this citation style gets used more than it has of late,
+though with the increased use hypertext it probably won't. (Why
+bother to put the reference text on the same page as the citation when
+you can click on the reference number and jump right to the
+appropriate point in the list of references?\ifhtml\phantom{.}
+ See Section~\use{sect.hypertext} for details.\fi)
+
+As you might expect, if you use \CS{CiteByFootnote} then no list of
+references is produced should you also say \cs{ListReferences}.
+After all, the text of the references has already appeared so there
+are actually no references to list.
+
+It is probably not a good idea to mix \CS{CiteByFootnote} and numbered
+footnotes using \cs{Nfootnote}, since they are completely separate
+and keep track of their footnote numbers independently.
+%% BUT THIS COULD BE FIXED, EH?
+
+
+
+
+
+
+\bigskip
+
+Earlier versions of \TeXsis\ had only two citation styles, and for
+backward compatibility they are still supported.
+Saying \CS{superrefsfalse} is the same as saying \CS{CiteByNumber},
+while \CS{superrefstrue} is the same as \CS{CiteBySuperscript}.
+The older forms are supported so that you can print old documents that
+use them, but you should avoid including them in new documents since
+they might disappear some day.
+
+
+%==================================================*
+\subsection{Using \BibTeX}
+
+\BibTeX\ is a system for managing and using bibliographic databases.
+If you find you are always citing the same sources again and again in
+your papers, or if you have access to a bibliographic database someone
+else has already compiled (or which you yourself have compiled), then
+\BibTeX\ can make it much easier for you to make your list of references.
+All you need to do is specify the name of the database files to be
+searched (there can be several), and use the \cs{cite} command to
+refer to a paper listed in the database.
+Papers in the databases are indexed by a ``citation key,'' and all you
+have to do is use that key as the label in the \cs{cite} command.
+The first time you run your document through \TeXsis\ these references
+will be undefined, but if you then run the \BibTeX\ program it will
+extract the proper references from the databases, so that they
+will be properly defined (and formatted) the next time you
+process your document.
+
+Some extra work is needed to get started using \BibTeX.
+First, since \BibTeX\ is a separate program, you need to get that
+program---it isn't included with \TeXsis.
+You can get the standard distribution of \BibTeX\ from CTAN, in the
+directory {\tt bibliography/bibtex}.
+If you are not familiar with how to build and install \TeX\ and
+related programs then you will need to get your system adminstrator or
+\TeX\ guru to install it for you.
+You also need to have the ``reference style'' file for \TeXsis.
+This file, called {\tt texsis.bst}, tells \BibTeX\ how to write out
+references in the proper \TeXsis\ format.
+This file now comes with the standard \TeXsis\ distribution, but if
+you don't have it you can easily get it from the \TeXsis\ ftp site, or
+from CTAN, in the directory {\tt texsis/bibtex}.
+
+
+Once \BibTeX\ and {\tt texsis.bst} are installed it is fairly easy to
+use them.
+First you have to add to your manuscript files a couple of
+instructions that tell \BibTeX\ which bibliography database files to
+use and how to format the references.
+To specify the database files, use \CS{ReferenceFiles}, as in
+\TeXexample
+\ReferenceFiles{unix,internet,mylist}
+|endTeXexample
+In this case, \BibTeX\ will search for the references in the
+files {\tt unix.bib}, {\tt internet.bib}, and {\tt mylist.bib}.
+(Examples of these files are also included in the {\tt texsis/bibtex}
+directory on the ftp servers.)
+Next, you tell \BibTeX\ to use a ``style'' for creating references in a
+form that \TeXsis\ can understand, with
+\TeXexample
+\ReferenceStyle{texsis}
+|endTeXexample
+This tells \BibTeX\ to use the {\tt texsis.bst} style file,
+but you must leave off the {\tt .bst} extension.
+
+Once you have invoked \CS{ReferenceFiles} and \CS{ReferenceStyle} you
+can cite your references using \cs{cite}, as usual.
+The ``label'' you use for \cs{cite} should be the ``citation key''
+used in the bibliography database.
+You can also use \CS{nocite} to create a citation entry without
+putting a citation mark (superscript number or number in brackets) in
+the output.
+Finally, to print the list of references, simply say
+\cs{ListReferences}, as usual.
+This just lists the references---it's up to you to provide any heading
+or extra space before the list.
+
+Once you have set up your document this way, the only additional thing
+you have to do is run the \BibTeX\ program.
+Before you do, run your manuscript file through \TeXsis\ once.
+It will complain about undefined references, but it will also produce
+a list of the papers you cited, in order, in the {\tt .aux} file.
+Then run \BibTeX, like so:
+\TeXexample
+bibtex myjob
+|endTeXexample
+This uses the information in the {\tt .aux} file and
+extracts the references, in the proper order and with the proper
+\TeXsis\ \cs{reference} commands, into the file {\tt myjob.bbl} (the
+extension means ``bibliography list'').
+Finally, run \TeXsis\ again.
+This time, since the {\tt .bbl} file exists, it is read in as a
+\cs{referencelist} when the \CS{ReferenceFiles} command is executed.
+Now all of your citations will be properly defined, with no
+complaints.
+Just remember to run the \BibTeX\ program again if you add or delete
+citations or change their order.
+
+%>>> EOF TXSrefs.tex <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSrevs.doc b/Master/texmf-dist/doc/texsis/base/TXSrevs.doc
new file mode 100644
index 00000000000..a894b34948f
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSrevs.doc
@@ -0,0 +1,484 @@
+%% file: TXSrevs.doc - Revision List - TeXsis version 2.18
+%% @(#) $Id: TXSrevs.doc,v 18.4 2001/04/21 16:46:17 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1999 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta\texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+\def\Sect#1{{\sl Sect\-ion~\use{sect.#1}:\ }} % for revision sections
+
+\appendix{B}{Revisions}
+
+ This appendix lists the major changes in \TeXsis\ as new versions
+have come out. It is organized by sections of the manual and is
+intended as a guide for users familiar with the previous version. There
+are many smaller changes in addition to those listed here.
+
+\begingroup %------- normal indent on everything
+\let\aftersubsection=\relax
+
+%-----------------------------------------------------------------------*
+\subsection{Revisions for Version 2.18 \label{rev.2.18}}
+
+The most noticable change is that as of version 2.18 the distribution
+of \TeXsis\ is covered by the \LaTeX\ Project Public License (LPPL).
+\TeXsis\ has been an ``open source'' software project since it was
+started in 1988, but we finally found that we had to be more explicit
+about the licensing, to give proper assurances that it could indeed be
+distributed freely. After considering several options we found that
+the the LPPL suited the needs and the spirit of \TeXsis\ most closely.
+
+ Please note that the LPPL only applies to the \TeXsis\ source code and
+code derived from it, but it does not apply to \TeXsis\ style files
+(or other files) which were written independently
+without using \TeXsis\ source code. We hope that the authors of style
+files will choose to follow our lead and license their works under the
+LPPL, but they are free to choose whatever license they deem
+appropriate.
+
+Two patches were released for \TeXsis~2.17 to fix minor problems,
+and these have been incorporated into the current release.
+
+The default installation directory has been changed
+to |/usr/local/texmf| in the |Makefile| to conform to the recommendations of the \TeX\
+Directory Structure (TDS). You can, of course, easily change this by
+editing the |Makefile| before you install \TeXsis. This change has
+not yet been made in the installation instructions.
+
+\bigskip
+
+\Sect{start}
+Some common \LaTeX\ opening instructions are now detected and a
+warning message given. Thus if you try to run a \LaTeX\ file through
+\TeXsis\ you'll be given a little more help in figuring out your mistake.
+
+\Sect{refs}
+Different citation styles are now available by different names,
+and new ones (\cs{CiteByFootnote}, \cs{CiteByAuthor},
+\cs{CiteByTag}) have been added.
+
+This section of the manual has been broken into separated into
+subsections to make it easier to read.
+Documentation was added for \cs{ArticleTitle} and for BibTeX.
+
+A bug in \cs{ListReferences} was fixed, and the formatting
+adjusted for the new citation styles. \cs{CiteByFootnote} is now
+correctly syncronized to the same counter used by \cs{NFootnote}.
+
+
+\Sect{sects}
+Documentation was added for setting \cs{ChapterTitle},
+\cs{SectionTitle}, and \cs{SubsectionTitle}.
+
+A rare problem that appears when there are a large number of floating
+insertions was fixed.
+
+\Sect{headline}
+The \cs{bottompagenumbers} macro just puts the page number at the
+bottom of the page, but doesn't surround it by dashes.
+The number produced by \cs{PageNumber} will now always appear in
+|\rm| type.
+
+
+\Sect{color}
+The \cs{ListColors} macro was added.
+
+An example is now given in the manual showing how to automatically
+have every displayed equation printed in color, using |\PushColor| and
+|\aftergroup\PopColor|.
+
+\Sect{form}
+The file |TXSform.tex| has been renamed |Formletr.txs|, making this
+less-used feature a style file rather than a part of the core \TeXsis\
+macros.
+
+\Sect{dcol}
+The bottom insertions code has been moved to the file |TXSdcol.tex| so
+that it can be used with Plain \TeX\ by inputing that file by itself.
+
+
+%-----------------------------------------------------------------------*
+\subsection{Revisions for Version 2.17 \label{rev.2.17}}
+
+Most of the changes are internal, and won't be noticed by most users.
+But there are also a few major useful additions, such as \BibTeX\ support.
+
+\Sect{fonts}
+One can now use \cs{scr} in subscripts and superscripts.
+
+\Sect{symb}
+Added symbols \CS{sun} and \CS{earth} for astronomical symbols
+\sun\ and \earth.
+
+\Sect{refs}
+Added support for \BibTeX.
+Reference counters and files are reset so that you can go on to
+collect more references (as for separate chapters in a book).
+Many internal improvements to the referencing macros.
+
+\Sect{labels}
+The format of the |.aux| file has changed, and now matches more
+closely the format used by \LaTeX.
+This allows it to be used with packages like \BibTeX.
+If you have problems with an old |.aux| file, just delete it.
+A new one will be created when you process the document again.
+
+\Sect{sects}
+First paragraph of a chapter, section or subsection is not indented.
+
+\Sect{fmts}
+Added {\tt color.txs} macros to change the colors of PostScript output.
+These macros should be backward compatible with {\tt colordvi.sty}.
+
+\Sect{letr}
+The letter writing macros can now print envelopes.
+The form letter macros have moved to a style file, {\tt Formletr.txs}
+
+\Sect{memo}
+Added \cs{faxmemo} and \cs{FAX}.
+
+\Sect{misc}
+Fixed \cs{undertext}. \cs{spine} has moved to a style file, {\tt
+spine.txs}, but it auto-loaded from it, so the user shouldn't notice
+the difference.
+
+
+%-----------------------------------------------------------------------*
+\subsection{Revisions for Version 2.16 \label{rev.2.16}}
+We created a single file |mtexsis.tex| which can be used for
+processing \TeXsis\ e-prints and other documents if you have not
+installed \TeXsis.
+
+\Sect{fonts}
+Added \cs{NFootnotes} to produce automatically numbered footnotes.
+
+\Sect{eqns}
+Added a number of useful symbols. Removed the raised |\zeta| and
+|\chi|, which caused trouble in some contexts.
+
+\Sect{refs}
+Improved the treatment of spacing for reference numbers and for
+multiple citations.
+
+\Sect{papers}
+Reorganized the documentation so that document formats, the title
+page, chapters and sections, running headlines, the table of contents,
+and the index are all described together here.
+
+\Sect{sects}
+Fixed spacing and hyphenation for long section titles.
+
+\Sect{sects}
+Changed default value of \cs{sectionskip} and \cs{subsectionskip},
+so they are not quite so big.
+
+\Sect{conts}
+The page numbers for full-page tables and figures were wrong in the
+table of contents; this has been corrected.
+
+\Sect{conts}
+\cs{Contentstrue} and \cs{Contentsfalse} turn on and off the table of
+contents. The old |\ContentsSwitchtrue| is obsolete but still works.
+
+\Sect{figures}
+Figures and tables can now be inserted at the bottom of a page
+with \cs{bottominsert} or \cs{heavyinsert}.
+
+\Sect{figures}
+\cs{ListFigureCaptions} allow you to print the figure captions at the
+end of a document.
+
+\Sect{figures}
+In the previous version the obsolete \cs{Tablebody} was moved to a style
+file called |Tablebody.txs|. The name of this file has been changed to
+|Tablebod.txs| so that it can be used on a DOS PC.
+
+\Sect{fmts}
+Added \cs{PhysRevManuscript} style for manuscripts to be submitted to
+the {\sl Physical Review}, and \cs{PhysRev} and
+\cs{PhysRevLett} styles emulating the appearance of those journals.
+These are in the style files |PhysRev.txs|.
+Revised the |\IEEE| and |\WorldScientific| styles to follow those
+formats more closely. Moved twin page output to a style file.
+
+\Sect{fmts}
+Changed the method of loading site and style files so that they work
+even with OZ\TeX\ on a Macintosh.
+
+\Sect{dcol}
+Extensively revised the double column macros. They now support
+insertion of figures at the bottom of the page or of a column, allow
+figures to flow from one column to the next, and allow footnotes. The
+new version is backwards compatible except for the names of the
+headline and footline offsets, and can also be used by itself with Plain
+TeX.
+
+%-----------------------------------------------------------------------*
+\subsection{Revisions for Version 2.15 \label{rev.2.15}}%
+An index has been added to the manual, using the index making macros
+of |index.tex| and the MakeIndex program. We have included |index.tex|
+in the standard distribution of \TeXsis, but the only documentation at
+present is that contained in the source file.
+
+\Sect{intro}
+Added a separate file called |Example.tex| which contains a short
+example physics paper which uses the \TeXsis\ macros.
+
+\Sect{fonts}
+Support added for \cs{scr} using Ralph Smith's Formal Script fonts,
+assuming that they are available.
+
+\Sect{fonts}
+Added \cs{Footnote} to act like \cs{footnote} but with the text
+of the footnote singlespaced and in 10\pt\ type. (The font
+can be changed by changing \cs{FootFont}.)
+
+\Sect{refs}
+Modified \cs{reference}, \cs{cite}, etc., to insert extra space after
+a reference following the end of a sentence.
+
+\Sect{sects}
+Added \cs{pagecheck} to \cs{section} and \cs{subsection}, etc. These
+macros skip to to a new page if less than \cs{sectionminspace} space
+is left on the page. The initial setting for \cs{sectionminspace} is
+|0.25\vsize|. Also made the skips before the titles of sections and
+subsections variables \cs{sectionskip} and \cs{subsectionskip} in
+place of the previous fixed values.
+
+\Sect{fmts}
+The definition of \cs{thesis} has been moved to the style file
+|thesis.txs| so that it is easier to make local changes.
+The \cs{thesis} command automatically loads from this file.
+
+\Sect{fmts}
+Added the style file |PhysRev.txs| containing a definition of
+\cs{PhysRev} for a Physical Review format. A page proof layout
+should be available in the future.
+
+\Sect{figures}
+Added |epsf.tex| to the standard \TeXsis\ distribution and included
+documentation for \cs{epsfbox} and related macros.
+
+\Sect{figures}
+The macros for making lists of figures and tables have been improved
+(along the lines of the new table of contents macros).
+
+\Sect{letr}
+Modified \cs{formletters} to have a complete \cs{letterhead} macro or
+even more complicated things as one of the arguments, rather than just
+the phone number. This allows you to create more complicated
+letterheads. Note also that the order of arguments is now reversed from
+what it was previously! The first argument is the \cs{letterhead} stuff
+(it gets done {\sl before} the address) and the second argument is the
+name of the text file (it controls what is printed {\sl after} the
+address.
+
+\Sect{dcol}
+Introduced \cs{longequation} and \cs{endlongequation} for equations
+which span both columns. The definitions of these can vary from style
+to style, so they may or may not include a \cs{leftcolrule} and
+\cs{rightcolrule}.
+
+\Sect{misc}
+Added this section to the manual to explain miscellaneous useful macros
+which don't fit anywhere else.
+
+\Sect{misc}
+Added \cs{Ignore} and |\endIgnore| to ignore large blocks of text.
+This is slightly more clever than |\comment|, which remains available.
+
+
+
+%-----------------------------------------------------------------------*
+\subsection{Revisions for Version 2.14 \label{rev.2.14}}
+\smallskip
+\Sect{fonts}
+\cs{TrueDoubleSpacing} generates a document with 2 times the normal
+spacing, in contrast to \cs{doublespaced}, which gives 1.5 times the
+normal spacing.
+
+\Sect{eqns}
+Fixed a bug in \cs{bordermatrix}.
+
+\Sect{refs}
+An error which occurred if \cs{endreference} was followed by
+additional text on the same line has been fixed.
+
+\Sect{refs}
+Extra space is now inserted after a reference number which follows a
+period.
+
+\Sect{refs}
+\cs{refrange} can now be used with \cs{reference} or \cs{cite}; the
+correct numbers and ranges separated by commas are printed.
+
+\Sect{envmt}
+The internal spacing mechanism for environments has been modified to
+work with arbitrary \cs{baselineskip} and \cs{parskip} values. Some minor
+changes have been made to the center and flush environments.
+
+\Sect{envmt}
+The \cs{Listing} environment has been modified so that the characters
+|{} % & () $ #| and~{\tt \VT} are just ordinary printable characters and
+so that |\\| gives a printed |\|.
+
+\Sect{envmt}
+|\@startenv| and |\@endenv| to begin and end environments have been
+replaced with \cs{begEnv} and \cs{endEnv}, which are accessible to the
+user because the do not have |@| in their names.
+
+\Sect{ruled}
+The \cs{ruledtable} macros can now use \cs{tabskip} glue to produce a
+table of arbitrary width. Spacing of the tables has been improved and
+made more robust.
+
+\Sect{sects}
+|\addsectioncont| has been replaced with \cs{addTOC}, i.e., "add to
+Table Of Contents." The new macro is simpler and produces
+better-looking output.
+
+\Sect{sects}
+Spacing such as \cs{singlespaced} placed after the \cs{texsis}
+initialization now sets the spacing for the entire document; the
+explicit spacing commands in \cs{abstract}, etc., have been removed.
+
+\Sect{sects}
+A macro \cs{setSectionID} has been added to allow one to place a figure
+or table for one section in a different section if necessary and still
+get the correct number.
+
+\Sect{fmts}
+The \cs{NorthHolland} format now gives the more common single-column
+North-Holland/Elsevier format. \cs{NorthHollandTwo} produces the
+previous double-column oversized format. \cs{Manuscript} produces a
+preprint with true double spacing as requested by The Physical Review.
+
+\Sect{fmts}
+\cs{endtitle}, \cs{endauthor}, etc., can now be omitted from the titlepage
+material, since \cs{title}, \cs{author}, etc., now close the previous mode
+automatically.
+
+\Sect{letr}
+Letters and memos can now be ended with \cs{bye}.
+
+%----------------------------------------------------------------------*
+\pagecheck{0.2\vsize}
+\subsection{Revisions for Version 2.13 \label{rev.2.13}}%
+\smallskip
+
+\Sect{fonts}
+Italic fonts are now available in large sizes, e.g. for \cs{slides}. Math
+italic bold fonts have been added for titles.
+
+\Sect{eqns}
+By default parentheses and brackets are now ordinary characters except
+in math mode and so can be used, e.g., in file names. As a result,
+automatic sizing of parentheses works only in {\sl displayed\/} equations. You
+can restore the old behavior by saying |\onparens| at the beginning of
+the document.
+
+\Sect{refs}
+The text for references is now written with \cs{unexpandedwrite}. In
+practice this means that references can contain almost anything,
+including a \cs{Ref}.
+
+\Sect{refs}
+The \cs{journal} macro was added to make it easier to create standard
+citations to journal articles, and to be able to switch between the
+American and European styles.
+
+\Sect{refs}
+Superscript references are now in \cs{citestyle}, which is initially set
+to \cs{scriptstyle} but can be changed.
+
+\Sect{tbls}
+A way was created to save all figure and table insertions until the end
+of the document with \cs{FiguresLast}, and then print them with
+\cs{PrintFigures}, and similarly for tables.
+
+\Sect{fmts}
+The \cs{NorthHolland} document layout was added to produce camera-ready
+copy for Proceedings published by North-Holland/Elsevier. This is a
+double column format with titles left justified and eleven point type.
+
+Saying \cs{singlespaced} immediately after \cs{texsis} or its equivalent
+will now make the whole document single spaced.
+
+\Sect{dcol}
+The double column macros have been modified so that removing the
+\cs{setdoublecolumns} will produce a single column document.
+
+%----------------------------------------------------------------------*
+\subsection{Revisions for Version 2.12 \label{rev.2.12}}%
+\smallskip
+\Sect{start}
+A new command \cs{texsis} performs the initialization, and calling it more
+than once no longer causes an error. |\inittexsis| remains as a synonym.
+
+\Sect{fonts}
+\cs{ninepoint}, \cs{twentypoint}, and \cs{twentyfourpoint} commands have been
+added to select these sizes. The 9~pt.\ size is really too small for a
+standard laser printer, but it is useful if you must print IEEE format
+on $8.5\,{\rm in} \times 11\,{\rm in}$ paper. The large sizes are useful
+for slides and other special purposes.
+
+\Sect{tbls}
+The table and figure insertion macros has been extensively modified, and
+the syntax has been changed. |\topTable|, etc., have been replaced by
+|\table|, etc., which make the insertion and define the number for the
+tag. |\Tbl| and |\Fig| use the number. References to tables defined
+later in the paper are satisfied using the |.aux| file, so
+|\TOPTABLE|, etc., are no longer needed. The old names remain as
+synonyms but their use is discouraged.
+
+\Sect{tbls}
+\cs{ruledtable} and many associated macros have been added to make complex
+ruled tables, including those with entries spanning more than one
+column. |\Tablebody| is still available, but the new macros are much
+more flexible and should be used instead.
+
+\Sect{tbls}
+New macros have been added to list figures and tables.
+
+\Sect{fmts}
+New formats have been added. \cs{WorldScientific} and \cs{IEEEreduced} make
+conference proceedings in World Scientific format and in IEEE format at
+75\% of full size. \cs{referee} is based on the memo format and can be
+used for referee reports. \cs{slides} uses large type to make
+transparencies for overhead projectors and similar material.
+
+\Sect{fmts}
+An \cs{authors} macro for papers with multiple authors and facilities for
+putting footnotes on titles have been added.
+
+\Sect{fmts}
+\cs{bookpagenumbers} causes odd page numbers to be placed in the upper
+right corner and even ones in the upper left corner. Additional
+information on headlines is given.
+
+\Sect{letr}
+The form letter macros have been rewritten. The syntax is the same
+except that |\v| has been replaced by \cs{V} to avoid conflict with the
+Plain \TeX\ accent. Also, \cs{V} now also works with \cs{formlabels}.
+
+\Sect{letr}
+The new \cs{referee} format is described.
+
+\Sect{dcol}
+The double column format has been extended to handle floating
+insertions. \cs{topinsert} and \cs{pageinsert} produce insertions within a
+column, while \cs{widetopinsert} and \cs{widepageinsert} produce insertions
+across both columns.
+
+\Sect{labels}
+The tagging mechanism has been changed to add an |@| before and after
+the name. The practical effect is that using the name of a defined
+control sequence like |book| for a tag no longer produces an error.
+
+\endgroup % -- \everysubsection back to what it was
+
+
+%>>> EOF TXSrevs.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSruled.doc b/Master/texmf-dist/doc/texsis/base/TXSruled.doc
new file mode 100644
index 00000000000..826d042c07c
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSruled.doc
@@ -0,0 +1,604 @@
+%% file: TXSruled.doc - Ruled Tables - TeXsis version 2.18
+%% @(#) $Id: TXSruled.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) copyright 1994, 1999 by Eric Myers and Frank E. Paige.
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\bs \texsis\input TXSdocM.doc\draft\fi
+
+\noindent
+While \cs{halign} in Plain \TeX\ is convenient for making simple
+tables, it is still difficult to make tables with horizontal and
+vertical rules. Indeed, typesetting ruled tables in \TeX\ has often
+been likened to programming a computer in assembler language. Even
+\TeXbook\ acknowledges that ``people who know how to make ruled tables
+are generally known as \TeX\ Masters.''\reference{Masters}\relax
+D.E.~Knuth, {\sl The \TeX book} (Addison Wesley, 1986), page 245
+\endreference
+The macros described below take a great deal of the difficulty out of
+making ruled tables, so that anybody can become a
+\TeX\ Master, or at least a master of ruled tables.
+\index{ruled tables}\index{tables!ruled|see{ruled tables}}
+
+\def\VT{\char'174} % the vertical var character ``|'' is needed below
+
+ The basic idea behind making a ruled table is similar to
+\cs{halign}, and the syntax is the same as the Princeton table macros
+known as |TABLES.TEX| by Ray Cowan\reference{Cowan} Ray F.~Cowan, {\sl
+Making Tables with Macros} (unpublished)
+\endreference\index{Cowan, Ray F.}
+(although the \TeXsis\ macros are quite different internally and run
+about 5 times faster). You begin the table material with \cs{ruledtable}
+and end it with \cs{endruledtable}. The table material is a list of items
+to appear in the rows and columns of the tables. Just as with \cs{halign},
+you can separate items in different columns with |&|\index{&@{\tt \&}}
+and end a row with
+\cs{cr}. The |&| \idx{alignment character}\index{&@{\tt \&}}
+separates columns without putting a
+vertical rule between the columns, while \cs{cr} ends a line and puts a
+thin horizontal rule under it. To get a vertical rule between columns
+replace the |&|\index{&@{\tt \&}}
+ with a `{\tt\VT}' (the vertical line), and to end a line
+without a horizontal rule under it replace the \cs{cr} with \cs{crnorule}.
+One important thing to remember is to end the last line in the table
+with \cs{endruledtable} instead of \cs{cr}.
+
+\bigskip
+\pagecheck{2cm}
+
+ As a first example, here is a simple ruled table,
+{\singlespaced
+\bigskip\tenpoint
+\ruledtable
+Year | World Population \cr
+8000 B.C. | ~~~5000000 \crnorule
+~~50 B.C. | ~200000000 \crnorule
+1650 A.D. | ~500000000 \crnorule
+1850 A.D. | 1000000000 \crnorule
+1945 A.D. | 2300000000 \crnorule
+1980 A.D. | 4400000000
+\endruledtable
+\smallskip}
+\pagecheck{2cm}\noindent
+and here are the instructions that created it,
+\TeXexample
+|smalltt\ruledtable
+Year |VT World Population \cr
+8000 B.C. |VT ~~~5000000 \crnorule
+~~50 B.C. |VT ~200000000 \crnorule
+1650 A.D. |VT ~500000000 \crnorule
+1850 A.D. |VT 1000000000 \crnorule
+1945 A.D. |VT 2300000000 \crnorule
+1980 A.D. |VT 4400000000
+\endruledtable
+|endTeXexample
+This example also appears in \TeXbook, on page~246, where it is typeset using
+|\halign|. Compare how the two are constructed
+and see which way you think is easier.
+
+ By default each item in the table is centered in its column. Inside
+a table the tie character ``|~|''\index{~@{\tt\char'176}} takes up the space
+of exactly one digit (it is the same as saying
+|\phantom{0}|),\index{phantom@{\tt\bs phantom\lb 0\rb}} and this has been
+used to line up the digits of the entries in both columns. It is also
+possible to change the definition of the \cs{TableItem} macro so that each
+entry in each column is left or right justified. This is described a
+little bit later.
+
+ Something to note about this example table is that the outer
+rules are thicker than the others. You can also get a thick
+vertical rule between columns by using ``{\tt\bs\VT}'' in place of
+``{\tt\VT}'', and you can get a thick horizontal rule below a row by
+replacing the \cs{cr} with \cs{crthick}. The widths of thick and
+thin rules are controlled by the dimensions \cs{thicksize} and
+\cs{thinsize}. If you don't want thick rules at all simply say
+|\thicksize=\thinsize|, which makes the thick rules as thin
+as the thin rules.
+
+ Some synonyms: \cs{CR} is the same as \cs{crthick}, \cs{nr} is the
+same as \cs{crnorule}, and \cs{crrule} is the same as \cs{cr} (actually
+it's the other way around). \cs{tab} is the same as |&|\index{&@{\tt \&}}
+--- it separates columns without a vertical rule. \cs{vb} is the same as
+{\tt\VT}, it separates columns with a thin vertical bar, while
+\cs{Vb} is the same as {\tt\bs\VT} and separates the columns with a
+thick vertical bar. You can also use \cs{dbl} to separate columns
+with a double vertical rule.
+
+ As in Plain \TeX\ you can use \cs{span} in place of
+|&|\index{&@{\tt \&}} (or the other column separators) to join two
+columns together into one, and you can use \cs{omit} as the very first
+token in a column to tell it to omit the fancy column layout (the
+centering or other spacing).
+You can also use \cs{multispan} to \cs{span} and \cs{omit} several
+columns, just as in an \cs{halign}.
+The only difference is that the number of columns you tell it to
+\cs{multispan} is the number of columns of the table it spans --- in a
+ruled table constructed with \cs{halign} you would count the columns
+{\sl and} any vertical rules (because the rules are also columns of
+the \cs{halign}).
+
+
+
+\table{example-II}
+\caption{Another example of a ruled table.}
+\intablelist{Example of a ruled table --- AT\&T Common Stock.}
+\singlespaced
+\tenpoint
+\ruledtable
+\multispan3\hfil AT\&T Common Stock \hfil\CR
+ Year \dbl Price | Dividend \cr
+ 1971 \dbl 41-54 | \$2.60 \cr
+ ~~~2 \dbl 41-54 | \$2.70 \cr
+ ~~~3 \dbl 46-55 | \$2.87 \cr
+ ~~~4 \dbl 40-53 | \$3.24 \cr
+ ~~~5 \dbl 45-52 | \$3.40 \cr
+ ~~~6 \dbl 51-59 | ~~.95
+\endruledtable
+\endtable
+
+ \Tbl{example-II} is another sample table, again taken
+{from} \TeXbook. Something important to notice is that the last
+ruled table example didn't have a table number or a caption,
+while this one does. That's because the last example was created
+using just \cs{ruledtable}, while this example is inside of
+\cs{table}. The point is that \cs{table} and \cs{ruledtable} do
+separate things and can be used either separately or together;
+\cs{table} creates the space for the table and gives it a caption
+and a number, while \cs{ruledtable} actually constructs the body of
+the ruled table. The instructions that created \Tbl{example-II}
+are:
+\smallskip\goodbreak
+\TeXexample
+|smalltt\table{example-II}
+\caption{Another example of a ruled table.}
+\singlespaced
+\ruledtable
+\multispan3\hfil AT\&T Common Stock \hfil\CR
+Year \dbl Price |VT Dividend \cr
+1971 \dbl 41-54 |VT \$2.60 \cr
+~~~2 \dbl 41-54 |VT \$2.70 \cr
+~~~3 \dbl 46-55 |VT \$2.87 \cr
+~~~4 \dbl 40-53 |VT \$3.24 \cr
+~~~5 \dbl 45-52 |VT \$3.40 \cr
+~~~6 \dbl 51-59 |VT ~~.95
+\endruledtable
+\endtable
+|endTeXexample
+\bigskip\goodbreak
+
+\table{SiHCl}
+\caption{Parameters used in the MS-X$\alpha$ calculations for
+ the chlorosilane molecules, H$_{\rm x}$SiCl$_{\rm 4-x}$;
+ x=0--4.}
+\intablelist{Example of a ruled table --- Parameters used in the
+ MS-X$\alpha$ calculations for the chlorosilane molecules,
+ H$_{\rm x}$SiCl$_{\rm 4-x}$; x=0--4.}
+\singlespaced
+\tenpoint
+\ruledtable
+\vctr{Molecule} | \vctr{Region} | Radius |
+ \vctr{$\alpha _{\rm HF}$}|\multispan{2} $l_{\rm max}$ \crnorule
+\cskip | \cskip | \cskip |\cskip| \crule | \crule \crpart
+ | | (au) | | initial state | final state \CR
+
+SiCl$_4$ | outersphere | 6.21 | 0.7238 | 4 | 7\crnorule
+ | Si | 2.20 | 0.7275 | 2 | 3\crnorule
+ | Cl | 2.40 | 0.7233 | 2 | 3\cr
+
+SiHCl$_3$ | outersphere | 6.21 | 0.7260 | 4 | 7\crnorule
+ | Si | 2.16 | 0.7275 | 2 | 3\crnorule
+ | Cl | 2.40 | 0.7233 | 2 | 3\crnorule
+ | H | 1.20 | 0.7772 | 1 | 2\cr
+
+SiH$_2$Cl$_2$ | outersphere | 6.25 | 0.7295 | 4 | 7\crnorule
+ | Si | 2.20 | 0.7275 | 2 | 3\crnorule
+ | Cl | 2.40 | 0.7233 | 2 | 3\crnorule
+ | H | 1.20 | 0.7772 | 1 | 2\cr
+
+SiH$_3$Cl | outersphere | 6.30 | 0.7360 | 4 | 7\crnorule
+ | Si | 2.20 | 0.7275 | 2 | 3\crnorule
+ | Cl | 2.40 | 0.7233 | 2 | 3\cr
+
+SiH$_4$ | outersphere | 4.10 | 0.7524 | 4 | 7 \crnorule
+ | Si | 2.04 | 0.7275 | 2 | 3 \crnorule
+ | H | 1.20 | 0.7772 | 1 | 2
+\endruledtable
+\bigskip\bigskip
+\endtable
+
+Sometimes it is desirable to have rules across only some of the columns
+of a table. In this case put \cs{crule} in the columns that are to have
+rules, \cs{cskip} in the columns where no rules are desired, and
+end the line with \cs{crpart}, which signals that the line contains a
+partial rule. The column headings in \Tbl{SiHCl} are an example of
+partial rules in a table.
+That table was created with the commands,\reference{Bozek, 1991}
+J.D.~Bozek, Ph.D. thesis (unpublished), Department of Chemistry,
+University of Western Ontario, London, Ontario CANADA
+\endreference\relax
+\TeXexample
+|smalltt\table{SiHCl}
+\caption{...}
+\singlespaced\tenpoint
+\ruledtable
+\vctr{Molecule} |VT \vctr{Region} |VT Radius |VT
+ \vctr{$\alpha _{\rm HF}$}|VT\multispan{2} $l_{\rm max}$
+\crnorule
+\cskip |VT \cskip |VT \cskip |VT\cskip|VT \crule |VT \crule \crpart
+ |VT |VT (au) |VT |VT initial state |VT final state \CR
+SiCl$_4$ |VT outersphere |VT 6.21 |VT 0.7238 |VT 4 |VT 7 \crnorule
+ |VT Si |VT 2.20 |VT 0.7275 |VT 2 |VT 3 \crnorule
+ |VT Cl |VT 2.40 |VT 0.7233 |VT 2 |VT 3 ...
+...
+\endruledtable
+\endtable
+|endTeXexample
+\bigskip\goodbreak
+
+
+ Ruled tables are normally centered on the page, but you can turn
+off the centering with \cs{noncenteredtables}.
+Then the table becomes just another piece to add to a horizontal list.
+One thing this lets you do is have two tables side by side on the
+page, like so:
+\nobreak
+\noncenteredtables\index{ruled tables!centered}
+\bigskip
+\line{\tenpoint\ruledtable
+Item ABC | Item DEF \cr
+Item GHI | Item JKL \endruledtable
+\hfil
+\ruledtable
+Data 111 | Data 222 \cr
+Data 333 | Data 444 \cr
+Data 555 | Data 666 \endruledtable}
+\bigskip
+\pagecheck{5\baselineskip}
+\noindent
+This pair of tables was produced by saying:
+\TeXexample
+|smalltt\noncenteredtables
+\medskip
+\line{\ruledtable
+Item ABC |VT Item DEF \cr
+Item GHI |VT Item JKL \endruledtable
+\hfil
+\ruledtable
+Data 111 |VT Data 222 \cr
+Data 333 |VT Data 444 \cr
+Data 555 |VT Data 666 \endruledtable}
+\smallskip
+|endTeXexample
+\noindent Saying \cs{centeredtables} turns table centering back on.
+Tables are then centered across the page, and a table is then
+added to a {\sl vertical\/} list.
+\bigskip\goodbreak
+
+ Usually \cs{ruledtable} makes tables as wide as their natural
+width, but it is possible to make them wider by setting the dimension
+\cs{tablewidth} to the width desired before saying \cs{ruledtable}. We can
+make the same table in \Tbl{example-II} but with the width set to
+10cm: \index{ruled tables!size}
+\bigskip
+\noncenteredtables
+\tablewidth=10cm
+\line{\tenpoint\hfil\vbox{\singlespaced
+ \ruledtable
+ \multispan3\hfill AT\&T Common Stock \hfill\CR
+ Year \dbl Price | Dividend \cr
+ 1971 \dbl 41-54 | \$2.60 \cr
+ ~~~2 \dbl 41-54 | \$2.70 \cr
+ ~~~3 \dbl 46-55 | \$2.87 \cr
+ ~~~4 \dbl 40-53 | \$3.24 \cr
+ ~~~5 \dbl 45-52 | \$3.40 \cr
+ ~~~6 \dbl 51-59 | ~~.95\rlap*
+ \endruledtable
+ \hbox{* (first quarter only)}
+\vss}\hfil}
+\smallskip
+\noindent
+The careful reader will notice that the version of
+\Tbl{example-II} in \TeXbook\ had a footnote to the last entry,
+and we have added that here. To do so we had to put the footnote in an
+\cs{hbox} and stack it under the table, so we had to turn off table
+centering. The table is therefore a bit more complicated to make, but
+not much: \index{ruled tables!footnotes}
+\TeXexample
+|smalltt\noncenteredtables
+\tablewidth=10cm
+\line{\tenpoint\hfil\vbox{\singlespaced
+ \ruledtable
+ \multispan3\hfill AT\&T Common Stock \hfill\CR
+ Year \dbl Price |VT Dividend \cr
+ 1971 \dbl 41-54 |VT \$2.60 \cr
+ ~~~2 \dbl 41-54 |VT \$2.70 \cr
+ ~~~3 \dbl 46-55 |VT \$2.87 \cr
+ ~~~4 \dbl 40-53 |VT \$3.24 \cr
+ ~~~5 \dbl 45-52 |VT \$3.40 \cr
+ ~~~6 \dbl 51-59 |VT ~~.95\rlap*
+ \endruledtable
+ \hbox{* (first quarter only)}
+\vss}\hfil}
+|endTeXexample
+\centeredtables % turn back on!
+\noindent
+If we had not wanted to add the footnote, then the table would have
+been typed the same way as \Tbl{example-II} except for setting
+the \cs{tablewidth}.
+
+ Important note: \cs{tablewidth} is turned ``off'' after the
+table is made, so the next table will have its natural width unless
+you explicitly set \cs{tablewidth} again! \index{ruled tables!size}
+\bigskip\goodbreak
+
+ \cs{ruledtable} normally inserts a \cs{quad} of space around each
+item. If you have a very wide table, especially one with many columns,
+you may wish to reduce this. \cs{TightTables} make this spacing a single
+space, the minimum acceptable. \cs{LooseTables} restores the default
+spacing. You can define this space to be something else by
+re-defining \cs{tablespace}, for example as \index{ruled tables!spacing}
+\TeXexample
+\def\tablespace{\ \ }
+|endTeXexample
+\noindent
+If the table is still too wide with \cs{TightTables}, you will probably
+have to reformat it or print it in landscape mode (tilted 90\degrees on
+the page).
+\bigskip\goodbreak
+
+
+ The careful reader may also have noticed that in the
+examples in \Tbl{example-II} and \Tbl{SiHCl} we said
+\cs{singlespaced}. That's
+because the spacing of the rows of a table can be controlled just like
+the spacing of the text with \cs{singlespaced}, \cs{doublespaced},
+etc. \index{ruled tables!spacing}
+The space between the rows of a table is set by a strut called
+\cs{tstrut}, which holds the rows apart. Its default definition is
+\TeXexample
+\def\tstrut{\vrule height 3.1ex depth 1.2ex width 0pt}
+|endTeXexample
+\noindent
+You can change the spacing between rows by changing the definition of
+this strut. One of the things \cs{singlespaced} does is define the
+\cs{tstrut} to be 0.5ex higher and deeper than a parenthesis.
+\cs{doublespaced}, \cs{triplespaced}, and \cs{widenspacing} all increase the
+height and depth of the strut in proportion to the increase in the
+baseline spacing.
+
+ If you put something in a table which is larger than the strut,
+then it will touch the rules above or below. You can fix this by
+inserting your own strut into that row. More simply, you can say
+\cs{bigitem}\arg{stuff}, and the ``stuff'' will be positioned correctly
+with a nice amount of space above and below. \index{ruled tables!spacing}
+\medskip
+
+ You can also decide whether or not you want diagnostic messages
+printed when a table is created. Saying \cs{tableinfotrue} causes a
+message to be printed on your terminal every time a ruled table is
+created. The message tells you how many rows and columns were in the
+table. This is useful information, because it can tell you immediately
+if you made a mistake in the table or left out a row or column.
+\cs{tableinfotrue} is the default, but you can turn off these messages
+by saying
+\cs{tableinfofalse}. In any case, you will be warned if a row has a
+different number of columns from the previous one.
+\medskip
+
+ The tables we have demonstrated so far all contain numbers, but
+sometimes it is desirable to have an entry in a table which is a
+paragraph of text. \index{ruled tables!text} For that purpose, you can
+use \cs{para}\arg{text}. The width of the paragraph is determined by
+the dimension \cs{parasize}, which defaults to 4 inches.
+\medskip
+
+Tables \use{Tb.tablemac;a} and \use{Tb.tablemac;b} summarize the most
+important commands for making ruled tables.
+
+ Finally, we can discuss how you can change how each column of
+a table is constructed. The macros which build the table take
+each entry and pass it to a macro called \cs{TableItem}. The
+default definition of \cs{TableItem} is:
+\vskip 0pt\goodbreak
+\TeXexample
+|smalltt\def\TableItem#1{% % centers item in ruled table
+ \hfil\tablespace % left glue
+ #1\killspace % item, no space after
+ \tablespace\hfil % right glue
+ }%
+|endTeXexample
+
+
+%% TABLE A
+
+\bottomtable{tablemac;a}
+\caption{Basic table macros for use with {\tt\bs ruledtable}.}%
+\intablelist{Basic macros for {\tt\bs ruledtable}}%
+\tablewidth=\hsize
+\LeftJustifyTables
+\ruledtable
+\sl Macro name\relax
+ | \sl Description \relax \crthick
+\tt\bs ruledtable\relax
+ | \para{Starts a ruled table.}\cr
+\vtop{\noindent\hsize=1.6in\normalbaselines
+ \tt\char124\quad \rm (vertical bar)\hfil\break
+ or \tt\bs vb\hfil}\relax
+ | \para{Separates one column from the next, with a
+ a thin vertical rule between them.}\cr
+\tt\&\ \rm or\tt\ \bs tab \relax
+ | \para{Separates one column from the next, but with
+ no rule between them.}\cr
+\tt\bs cr\relax
+ | \para{Ends the current row, and starts the next
+ one. The completed row will be separated from
+ the next with a thin horizontal rule.}\cr
+\vtop{\noindent\hsize=1.6in\normalbaselines
+\tt\bs crthick \hfil\break \rm or \tt\bs CR\hfil }\relax
+ | \para{Similar to {\tt\bs cr}, but the rows will
+ be separated with a thick horizontal rule.}\cr
+\vtop{\noindent\hsize=1.6in\normalbaselines
+\tt\bs crnorule \hfil\break \rm or \tt\bs nr\hfil }\relax
+ | \para{Similar to {\tt\bs cr}, but the rows will
+ not be separated by a rule.}\cr
+\tt\bs\char124 \relax
+ | \para{Same as {\tt\char124}, but with a thick vertical rule.}\cr
+\tt\bs dbl
+ | \para{Same as {\tt\char124}, but with two thin vertical rules.}\cr
+\tt\bs endruledtable\relax
+ | \para{Ends the ruled table.}%
+\endruledtable
+\line{\hfil {\sl Continued...}}%
+\endtable
+
+%% TABLE B (FULL PAGE)
+
+\fulltable{tablemac;b}
+\caption{Additional macros for use with {\tt\bs ruledtable}.}
+\intablelist{Additional macros for {\tt\bs ruledtable}}
+\tablewidth=\hsize
+\LeftJustifyTables
+\line{{\sl Continued...}\hfil}
+\smallskip
+\ruledtable
+\sl Macro name\relax
+ | \sl Description \relax \crthick
+\tt\bs multispan\lb{\it n}\rb\relax
+ | \para{Makes the next entry span the next $n$
+ columns, where $n$ is an integer, $n>0$.
+ See {\tt\bs omit} below.} \cr
+\tt\bs omit \relax
+ | \para{This \TeX\ primitive causes the normal
+ template for its entry to be omitted, allowing
+ the user to do something else with this entry.} \cr
+\tt\bs para\arg{text}\relax
+ | \para{Formats {\sl text\/} into a neat little
+ paragraph like this one. The width of the
+ paragraph produced is determined by the dimension
+ {\tt\bs parasize}. The default is 4 inches. } \cr
+\tt\bs parasize=\meta{dimen} \relax
+ | \para{Sets the width of paragraphs for the {\tt\bs para}
+ macro.} \cr
+\tt\bs TableItem\arg{stuff}\relax
+ | \para{Used in the standard template, this
+ macro centers its argument in the column. The
+ user can redefine it for special effects.} \cr
+\tt\bs tablespace
+ | \para{The spacing around each item for {\tt\bs TableItem}.}\cr
+\vtop{\noindent\hsize=1.4in\normalbaselines
+\tt\bs LooseTables \hfil\break
+\tt\bs TightTables\hfil}\relax
+ | \para{Set {\tt\bs tablespace} to {\tt\bs quad} and {\tt\bs\ }
+ respectively.\hfill\break\ }\cr
+\vtop{\noindent\hsize=1.6in\normalbaselines
+\tt\bs TrailingSpaces \hfil\break
+\tt\bs NoTrailingSpaces \hfil}\relax
+ | \para{Use trailing spaces and glue items in table entries
+ (default) or ignore them. See text.}\cr
+\tt\bs bigitem\arg{stuff}\relax
+ | \para{Use this for something that would normally
+ not fit in one line of a table to make the spacing
+ between rows large enough for this item.} \cr
+\tt\bs vctr\arg{stuff}\relax
+ | \para{Centers the item {\sl vertically\/} so that
+ it can appear between two rows.}\cr
+\tt\bs centeredtables\relax
+ | \para{Turns table centering on. Each table
+ will be centered left-to-right on the page.
+ This is the default.} \cr
+\tt\bs noncenteredtables\relax
+ | \para{Turns table centering off. Each table
+ is returned as an {\tt\bs hbox}, and it is up
+ to the user to place it as desired.} \cr
+\vtop{\noindent\hsize=1.6in\normalbaselines
+\tt\bs tableinfotrue \hfil\break
+\tt\bs tableinfofalse\hfil}\relax
+ | \para{Turns on or off the diagnostic message telling
+ you how many rows and columns were found in the
+ table. }\cr
+\tt\bs thicksize=\meta{dimen} \relax
+ | \para{This dimension specifies the thickness
+ of the thick rules in the table. The default
+ size is 1.5 points.} \cr
+\tt\bs thinsize=\meta{dimen} \relax
+ | \para{This dimension specifies the thickness
+ of thin rules in the table. The default
+ size is 0.8 points.} \cr
+\tt\bs tablewidth=\meta{dimen} \relax
+ | \para{Specifies how wide to make the next
+ table. If not specified, the table is made to
+ its natural width. This value is reset
+ following the construction of each table.}
+\endruledtable
+\vfill
+\endtable
+
+
+The \cs{hfil} glue on both sides of the argument causes the item to be
+centered in the column, while \cs{tablespace} (which defaults to \cs{quad})
+insures that there will be at least some amount of space between the
+item and the vertical rules on each side. Because of the way that
+\TeX\ handles macro arguments, if you type a table with spaces between
+the text and the next column separator, an extra \cs{space} will be
+inserted into the table. If you first say \cs{NoTrailingSpaces}, then
+\cs{killspace} in the above macro is defined to remove any trailing glue
+items. \cs{hfill} is redefined by the table macros so that if it is the
+last token in an entry, then that entry is properly left justified,
+but to insert any other trailing glue, you must say
+\example
+\meta{text}\meta{glue}|\null|
+\endexample
+\noindent
+The default is \cs{TrailingSpaces}, which does incorporate any trailing
+spaces into the table but which also treats any trailing glue items
+normally.
+
+
+ You can change the definition of \cs{TableItem} to suit your own
+purpose. The simplest modification is to omit the \cs{hfil} on the left
+or right so that each entry is right or left justified. This is so
+commonly used that saying \cs{RightJustifyTables} or
+\cs{LeftJustifyTables} makes the appropriate change for you. Saying
+\cs{NoJustifyTables} restores \cs{TableItem} to its original centering
+function. \index{ruled tables!customization}
+
+ Since \cs{TableItem} is used to create every column of the table, you
+cannot use it to modify a single column. To justify just one column
+you can simply put \cs{hfill} to the left or right of each item in the
+column, since \cs{hfill} is infinitely more stretchy than \cs{hfil}. (The
+behavior of glue items other than \cs{hfill} depends on whether
+\cs{NoTrailingSpaces} has been set.) With a little more work it is
+possible to design special or unusual tables by redefining the
+``preamble'' of the table. This is possible because \cs{ruledtable}
+uses \cs{halign} with a preamble called \cs{TablePreamble}. The default
+definition of \cs{TablePreamble} is:
+\TeXexample
+\def\TablePreamble{% % \ruledtable preamble
+ \TableItem{####}% % the first item
+ \plaintab\plaintab % && means repeat this
+ \TableItem{####}% % the subsequent items
+ \plaincr}% % end of preamble
+|endTeXexample
+\noindent
+The syntax for \cs{TablePreamble} is like an \cs{halign} preamble in Plain
+\TeX\, but with |&| replaced by \cs{plaintab}, \cs{cr} replaced by
+\cs{plaincr}, and |#| replaced by |####|. If you have read this far and
+want to try changing \cs{TablePreable} then you should read the source
+code and the comments that go with it in the file |TXSruled.tex.|
+
+As a final note we point out that it is also possible for you to create
+your own column separators with the macro \cs{nextcolumn}. This macro
+takes a single argument which is used to separate one column of the
+table from another. Thus for example, the \cs{dbl} macro for creating a
+double vertical rule between columns is defined as:
+\TeXexample
+\def\dbl{%
+ \nextcolumn{\vrule width\thinsize
+ \hskip\thinsize\vrule width\thinsize}}
+|endTeXexample
+\relax
+\index{ruled tables!customization}
+
+%>>> EOF TXSruled.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSsects.doc b/Master/texmf-dist/doc/texsis/base/TXSsects.doc
new file mode 100644
index 00000000000..34263d458f4
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSsects.doc
@@ -0,0 +1,899 @@
+%% TXSsects.doc - Chapters and Sections - TeXsis version 2.18
+%% @(#) $Id: TXSsects.doc,v 18.3 2001/04/06 21:54:45 myers Exp $
+%======================================================================*
+% (C) Copyright 1989-1998 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\bs \texsis\input TXSdocM.doc\draft\input Manual.aux\fi
+
+\section{Typesetting Complete Papers\label{sect.papers}}
+
+The commands described so far are useful for creating the body of a
+simple physics paper, but they are not enough to typeset a complete
+paper. A physics paper generally has a title, one or more authors and
+their addresses or professional affiliations, and perhaps an abstract.
+Longer documents may be divided into sections, or even chapters, and
+there might even be a table of contents or an index. This section
+describes the commands for creating the basic structural elements of a
+complete paper: the title material and divisions into chapters,
+sections, and subsections. It also includes a discussion of more
+advanced topics, such as how to create a table of contents or an index,
+and how to control the running headlines at the top of the page. Later,
+\Sect{fmts} discusses more specialized document layouts for conference
+proceedings or for papers submitted to specific journals, while
+\Sect{letr} describes the commands for producing letters, memos, referee
+reports, and similar specialized documents.
+
+It is often convenient to be able to typeset the same document in more
+than one format. Therefore, all complete papers in \TeXsis\ use the
+same general structure, and one can select the particular document
+format to be used by changing only one or two commands at the beginning
+of the manuscript file. The commands to typeset the title page and
+to break the paper up into sections are still the same, even if they
+behave slightly differently
+according to the particular format selected. For example, if you give
+the \cs{paper} command then the title page material will appear at the
+top of the first page, and the text of the paper will also begin on that
+page. If you simply change \cs{paper} to \cs{preprint} the title page
+material will appear on a page by itself, with a banner (defined by
+\cs{banner}) across the top of the page, and the text will begin on the
+next page. Using any of the other document formats described in
+\Sect{fmts} will cause the title page material to be formatted
+slightly differently.
+
+At this point an example may be more instructive than more discussion.
+Here is how a famous paper\reference{BCS} J.~Bardeen, L.~N.~Cooper, and
+J.~R.~Schrieffer,
+\journal Phys. Rev.;108,1175(1957)
+\endreference
+would have begun had it been typeset with \TeXsis:
+\TeXexample
+|smalltt\texsis
+\preprint
+\pubdate{July 8, 1957}
+\pubcode{hep-cats/yymmnnn}
+\titlepage
+\title
+Theory of Superconductivity
+\endtitle
+\author
+J.~Bardeen
+Department of Physics
+University of Illinois
+Urbana, Illinois 61801
+\endauthor
+\and
+\author
+L.~N.~Cooper
+Department of Physics and Astronomy
+The Ohio State University
+Columbus, OH 43210
+\endauthor
+\and
+\author
+J.~R.~Schrieffer
+Department of Theoretical Physics
+University of Birmingham
+Birmingham, England B15 2TT
+\endauthor
+\abstract
+A theory of superconductivity is presented, based on
+the fact that...
+
+\endabstract
+\toappear{Physical Review}
+\endtitlepage
+
+\section{Introduction}
+The main facts which a theory of superconductivity
+must explain are...
+|endTeXexample
+\noindent
+A more complete example paper is given in the file |Example.tex|, which
+is included in the standard distribution of \TeXsis.
+In the rest of this section each of the elements in these examples and
+several others related to the overall structure of a complete paper will be
+explained.
+
+
+%==================================================*
+\subsection{Types of Documents \label{sect.types}}
+
+A complete \TeXsis\ paper should start with the \cs{texsis} macro
+described in \Sect{start}. (While this is not required if you also use
+one of the macros listed below, it does serve to indicate unambiguously
+that the document is
+to be typeset with \TeXsis.) The \cs{texsis} macro can be followed by a
+command to specify whether the document should be typeset as a simple
+paper or conference proceeding, a preprint, a book, etc. This macro
+will provide sensible defaults for the layout, although additional
+commands can be given to override them. The following basic document
+types are included in \TeXsis:
+
+\description{XManuscript\quad}\clump
+%
+\itm{\CS{paper}}
+Produces a paper with the title and abstract at the top of the first
+page, such as for submission to a conference proceeding.
+The text begins on the first page, below the title and abstract.
+%
+\itm{\CS{preprint}}
+Produces a paper in a preprint format, with the title material by
+itself on the first page. A \cs{banner} is put across the top of the
+title page, and the text begins on the page following.
+%
+\itm{\CS{eprint}}
+Produces a paper in a format suitable for submission to the Los Alamos
+preprint archives (the ``e-print bulletin boards,'' such as hep-ph,
+hep-th, hep-lat, or qc-gr).
+%
+\itm{\CS{Manuscript}}
+Similar to \CS{preprint}, but with true double spacing for manuscripts
+submitted for publication in journals such as the {\sl Physical
+Review}, which require this.
+%
+\itm{\CS{book}}
+A book or other long document with a separate title page, running
+headlines, a table of contents, etc. Page numbers are printed in
+opposite corners on left and right handed pages.
+%
+\itm{\CS{thesis}}
+Similar to \CS{book}, this format is for typesetting a doctoral
+dissertation or similar document.
+It may be customized for your own university.
+%
+\enddescription
+
+After the command defining the type of document you can add optional
+commands to modify the default layout. For example, you might want to
+use
+\example
+|\texsis| \n
+|\paper| \n
+|\hsize=|\meta{dimen} \n
+|\vsize=|\meta{dimen} \n
+|\singlespaced|
+\endexample
+to produce a single-spaced conference proceeding of a specified
+size. Macros to create more specialized documents in some of the common
+formats used by physics journals and conferences are described in
+\Sect{fmts}. Since \TeXsis\ obviously cannot include all
+the possible formats, that section also contains some hints about how
+to modify a format to fit your needs.
+
+%==================================================*
+\subsection{The Title ``Page'' \label{sect.title}}
+
+A complete paper almost always starts with a title. Most probably it
+will also include the names of the authors, and often it will include
+an abstract. Sometimes the title, author's name(s) and abstract
+appear on a separate page, while sometimes they simply appear at the
+top of the first page of the paper. In any case we will refer to all
+this material together as the ``title page'' material.
+
+\TeXsis\ has a standardized method for entering the title page
+material, whether it will actually appear on a page by itself or not.
+You begin the title page material with \CS{titlepage} and end it with
+\CS{endtitlepage}.
+Between these two control sequences you can use any of the commands
+listed below to enter the various parts of the title page material.
+(An example appears at the beginning of this section).
+
+\description{Xendauthor}\clump\tolerance=1700
+%
+\itm{\CS{title}}
+Begins the title of the paper. All lines up to a following
+\cs{endtitle} are centered and printed in \cs{Tbf} type.
+Line endings in the input file {\sl are} respected, just as with
+\cs{obeylines}.
+%
+\itm{\CS{author}}
+Begins an entry for an author's name and address, which should
+appear on the lines that follow. Line endings in the input file
+{\it are} respected. The first line to follow is the author's
+name, which is printed centered in |\bf| type. All subsequent
+lines are centered in normal type. End with |\endauthor|.
+%
+\itm{\CS{and}}
+Prints the word "and," centered and with appropriate vertical
+separation. It can be used either between sets of |\author|
+\dots\ |\endauthor| or between multiple addresses for the same
+author.
+%
+\itm{\CS{authors}}
+An alternative to |\author| for papers with many authors. Here
+line endings are not respected; instead, the list of authors is
+divided into lines as evenly as possible, and each line is
+centered and printed in Roman type. End with \cs{endauthors}.
+%
+\itm{\CS{institution}\arg{symbol}\arg{address}} Prints the symbol and
+the institution address centered on a line. A |\medskip| is placed
+before the first address to separate the names and addresses.
+|\institution| should be placed after the author list but before
+|\endauthors| to work correctly.
+%
+\itm{\CS{abstract}}
+Begins the abstract. The word "ABSTRACT" is centered above the
+abstract. The left and right margins are brought in relative to
+the text of the paper. End with |\endabstract|.
+%
+\itm{\CS{pacs}\arg{codes}}
+Prints the PACS (Physics and Astronomy Classification Scheme) codes
+on the title page.
+%
+\itm{\CS{submitted}\arg{Journal}}
+Prints the phrase ``Submitted to {\sl Journal}'' centered on the page,
+with the name of the journal printed in |\sl| type.
+%
+\itm{\CS{toappear}\arg{Journal}}
+Similar to |\submitted|, this prints the phrase
+``To appear in {\sl Journal}'' on the title page,
+with the name of the journal printed in |\sl| type.
+%
+\itm{\CS{disclaimer}\arg{contract}}
+Prints a standard DOE disclaimer for contract number
+\meta{contract}, printed in 10~pt.\ type, as a footnote.
+%
+\enddescription
+
+The advantage to entering the title page material this way is that if
+you change the overall document format, either from \cs{paper} to
+\CS{preprint} or to one of the more specialized formats described in
+\Sect{fmts}, then the title page material will automatically be changed
+to match the document format selected.
+
+\bigskip
+
+The \cs{banner} macro is called in the \CS{preprint} document format to
+put the date, a preprint code number, and the name of your institution
+or organization at the top of the title page. The name of the
+institution can be changed by saying
+\example
+|\def\ORGANIZATION{|\meta{name}|}|
+\endexample
+and this change can be made permanent by putting it into the file
+|TXSsite.tex| when \TeXsis\ is being installed.
+\def\tmp{}\ifx\ORGANIZATION\tmp
+(When this manual was printed, the \CS{ORGANIZATION} macro was
+empty.)
+\else
+When this manual was printed, the \CS{ORGANIZATION} macro was:
+\example
+\ORGANIZATION
+\endexample
+\fi
+The preprint date and document number can be specified by putting
+\example\obeylines
+\CS{pubdate}\arg{date}
+\CS{pubcode}\arg{code-number}
+\endexample
+before the \cs{titlepage}. If these are omitted, the date defaults to
+the current month and year and the document number defaults either to
+something set as the default when \TeXsis\ was installed or to the
+current \TeXsis\ version number. The default at this installation is
+\ATunlock "\@DOCcode".
+\ATlock
+If you really want to customize the look of your paper you can create
+your own \cs{banner} macro.
+
+\bigskip
+
+If you are submitting your paper to one of the \idx{preprint archives}
+at Los Alamos, such as |hep-lat|, |hep-ph|, or |hep-th|, you can have
+the archive server automatically insert the preprint number it assigns
+your document when it is submitted.
+To do this put
+% Important: putting \relax here and below inhibits any such substitutions
+% in this manual if it gets put out on such a server.
+\example
+\CS{pubcode}|{hep-lat|\relax|/yymmnnn}|
+\endexample
+near the top of the document (change ``\idx{hep-lat}'' as appropriate
+to the archive you are using).
+When you submit a paper to an archive with the ``put'' command the
+server will translate any occurrence in the input file of the sequence
+``|hep-lat|\relax|/yymmnnn|'' to ``|hep-lat/|'' followed by the 7
+digit paper number.
+You must use the exact string of characters ``|yymmnnn|'' for this to
+work.
+When someone else gets your paper from the server and prints a copy it
+will have the assigned document code in the banner at the top of the
+title page.
+
+\bigbreak
+
+The standard \cs{footnote} macro cannot be used to make footnotes to
+titles and authors's names, because these special fields
+use internal vertical mode, where footnotes are not allowed. You
+should instead use the \cs{vfootnote} macro of plain \TeX\ for such
+purposes. In this case you must put the reference mark in the title or
+author list yourself (for example, with |${}^*$|), and then say
+|\vfootnote*{The footnote}| somewhere else on the page, outside of the
+internal vertical mode material (the author or title blocks).
+
+``Footnotes'' identifying institutions in a long list of authors
+are often centered on lines immediately below the author list.
+\CS{authors} and \CS{institution} can be used for this. For example,
+the author list of one well known paper\reference{DIS} E.D. Bloom, et al.,
+Phys.\ Rev.\ Letters \vol{23}, 930 (1969) \endreference
+could be typed as follows:
+\TeXexample
+|smalltt\authors
+E.D.~Bloom,$^a$ M.~Breidenback,$^b$ D.H.~Coward,$^a$
+H.~DeStaebler,$^a$ J.~Drees,$^a$ J.I.~Friedman,$^b$
+G.C.~Hartmann,$^{b,c}$ H.W.~Kendall,$^b$ G.~Miller,$^a$
+L.W.~Mo,$^a$ R.E.~Taylor$^a$
+\institution{a}{Stanford Linear Accelerator Center,
+ Stanford, CA 94305}
+\institution{b}{Department of Physics and Laboratory for Nuclear
+Science, Massachusetts Institute of Technology,
+ Cambridge MA 02139}
+\institution{c}{Xerox Corporation, Rochester, NY}
+\endauthors
+|endTeXexample
+This produces
+\authors
+E.D.~Bloom,$^a$ M.~Breidenback,$^b$ D.H.~Coward,$^a$
+H.~DeStaebler,$^a$ J.~Drees,$^a$ J.I.~Friedman,$^b$
+G.C.~Hartmann,$^{b,c}$ H.W.~Kendall,$^b$ G.~Miller,$^a$
+L.W.~Mo,$^a$ R.E.~Taylor$^a$
+\institution{a}{Stanford Linear Accelerator Center,
+ Stanford, CA 94305}
+\institution{b}{Department of Physics and Laboratory for Nuclear
+Science, Massachusetts Institute of Technology,
+ Cambridge MA 02139}
+\institution{c}{Xerox Corporation, Rochester, NY}
+\endauthors
+\noindent Note that \cs{institution} must come {\sl before} the
+\cs{endauthors}.
+
+%==================================================*
+
+\subsection{Chapters and Sections \label{sect.sects}}
+
+The following commands can be used to create and automatically number
+the divisions of a document, including chapters, sections, and
+appendices:
+
+\singlelinetrue % make label overhang
+\description{\hskip 3cm}\clump
+
+\itm{\CS{chapter}\arg{title}\quad}
+Begins a chapter with \meta{title} printed in |\Tbf|
+type on a new page.
+
+\itm{\CS{section}\arg{title}\quad}
+Begins a section with the \meta{title} printed in |\tbf|
+type. This does {\it not} begin on a new page (although you
+certainly can start a section on a new page by saying
+|\vfill\supereject| first.)
+
+\itm{\CS{subsection}\arg{title}\quad}
+Begins a subsection with the \meta{title} printed in |\bf|
+type.
+
+\itm{\CS{subsubsection}\arg{title}\quad}
+Begins a sub-subsection entitled \meta{title}. This is a lower
+level than even a subsection and should only be used when truly appropriate.
+
+\itm{\CS{Appendix}\arg{label}\arg{title}}
+Begins a chapter-like appendix labeled by the letter \meta{label}
+(generally A, B, C, \dots or I, II, III, \dots). The \meta{title}
+is printed in |\Tbf| type at the top of a new page.
+
+\itm{\CS{appendix}\arg{label}\arg{title}}
+Begins a section-like appendix labeled by the letter \meta{label}
+(generally A, B, C, \dots or I, II, III, \dots). The \meta{title}
+is printed in |\tbf| type.
+
+\itm{\CS{nosechead}\arg{title}}
+The \meta{title} is typeset like a subsection headline, but without a
+subsection number. This is suitable for acknowledgments, lists of
+references and such.
+
+\enddescription
+The title appears at the top of the section or subsection, left
+justified in the appropriate typestyle for the document type and with
+an appropriate amount of vertical spacing below. These and other
+details of the layout vary with the document format.
+In general \CS{chapter} is appropriate mainly
+for books or theses; the manual you are reading now uses only
+\CS{section} and \CS{subsection} divisions.
+
+As you may have noticed from this manual, the first paragraph of a
+section or subsection is not indented.
+This is the usual practice for most well-designed books, though it may
+seem odd at first.
+It isn't that strange if you think of the indentation of a paragraph
+as a way to mark a {\sl separation between} paragraphs, rather than as
+a way to mark the beginning of a paragraph.
+But if you really want to indent that first paragraph, just begin it
+with \cs{par}.
+On the other hand, if you put any kind of commands or macro
+definitions between the \CS{section} or \CS{subsection} and the first
+paragraph then this will interfere with the suppression of the
+indentation.
+You can easily fix this by either moving your macro definitions
+elsewhere or putting in a \cs{noindent} by hand.
+
+
+
+ By default chapter, section, and subsection numbers are printed with
+the titles, and the chapter and section numbers are also attached to
+equation, figure and table numbers in the form ``$cc.ss.nn$'', where
+$cc$ is the chapter number, $ss$ the section number, and $nn$ the
+equation number. The inclusion of the chapter and section numbers can
+be turned on or off with the commands
+\description{~showchaptIDfalse\qquad}
+\itm{\CS{showchaptIDtrue}} Display chapter numbers.
+\itm{\CS{showchaptIDfalse}} Do not display chapter numbers.
+\itm{\CS{showsectIDtrue}} Display section numbers.
+\itm{\CS{showsectIDfalse}} Do not display section numbers.
+\enddescription
+
+\bigskip
+
+ \CS{Appendix} and \CS{appendix} give chapter-like and
+section-like appendices, respectively. The chapter or section number is
+replaced by a letter, which is given as the first argument, and the
+title, which is the second argument, is printed in the same format as a
+chapter or section title. For example,
+\TeXexample
+\appendix{A}{Review of Functional Integration}
+|endTeXexample
+\noindent
+The letter labeling the appendix is attached to the equation
+numbers if \CS{showchaptIDtrue} or \CS{showsectIDtrue} is used. You can
+omit the letter by using an empty first argument, as in
+\TeXexample
+\appendix{}{Leading logarithm approximation}
+|endTeXexample
+\noindent
+in which case the result is the same as setting
+\CS{showchaptIDfalse} or \CS{showsectIDfalse}.
+
+\bigskip
+
+ A skip called \CS{sectionskip} is used before the title of any
+section-like division (i.e., a |\section| or an |\appendix)|; a skip
+called \CS{subsectionskip} is used for any lower-level division, that is, a
+\CS{subsection}, \CS{subsubsection}, or a \CS{nosechead}. Of course these
+are all removed by \TeX\ if the section starts on a new page.
+Furthermore, any of these divisions will start on a new page if less
+than a minimum length given by \CS{sectionminspace} remains on the
+current page.
+The defaults for these parameters are
+\TeXexample
+\sectionskip=2cm plus 8pt minus 8pt % skip before \section
+\subsectionskip=1cm plus 4pt minus 4pt % skip before \subsection
+\sectionminspace=0.25\vsize % new page if less left
+|endTeXexample
+but they can be changed to any legal \TeX\ skip or dimension either
+throughout the document or in a local group. For example, you could
+use
+\TeXexample
+\begingroup
+\subsectionskip=\sectionskip
+\fourteenpoint
+\nosechead{Acknowledgments}
+\endgroup
+|endTeXexample
+to make a \CS{nosechead} which looks like a |\section|.
+
+\bigskip
+
+ Ordinarily the order of appearance of the sections of a document
+are not changed, so there is no automatic mechanism for labeling the
+sections. Any of the divisions described above can be labeled by
+inserting \cs{label}\arg{label} into the title text. The \meta{label}
+should have the form \meta{type.name}, where \meta{type} is |chap|,
+|sect|, etc., to avoid possible conflicts with other kinds of labels.
+The corresponding numbers can then be referred to with
+|\use{|\meta{type.name}|}|, as described in \Sect{labels}.
+
+ If the title of a chapter or section is too long, a break in
+the line can be inserted with the \cs{n} command. This will also
+break the line in the title when it appears in the table of contents.
+If running headlines are being used (see \Sect{headline}) then only the
+first part of the title, up to the \cs{n}, will be used for the running
+headline.
+You can always reset the headline by hand with |\setHeadline|
+(see \Sect{headline}).
+
+ You can customize the behavior of the section-making macros by
+adding your own definitions for the macros
+\index{customization!chapters and sections}%
+\example
+\CS{everychapter}, \CS{everysection}, \CS{everysubsection},
+\CS{everysubsubsection},
+\endexample
+which are called immediately before making the corresponding
+division of the document, or for the macros
+\example
+\CS{afterchapter}, \CS{aftersection}, \CS{aftersubsection},
+\CS{aftersubsubsection},
+\endexample
+which are called immediately afterwards. By default all of these macros
+do nothing. As an example, if you wanted every section to begin on a
+new page, and you wanted numbered footnotes created by \cs{NFootnote} to
+start over counting from one at the begining of each section, you
+could define:
+\TeXexample
+\def\everysection{\vfill\supereject \footnum=0}
+|endTeXexample
+
+The full text of the title of the current chapter, section, and
+subsection is saved in \CS{ChapterTitle}, \CS{SectionTitle}, and
+\CS{SubsectionTitle}, so that you may do whatever you want with these
+later in the chapter or section. An example of how these might be
+used with \CS{aftersubsection} to change the running headlines is
+given in \Sect{headline}.
+
+
+Another way you can control the results produced by \CS{chapter} and
+\CS{section} is to change the way the chapter or section number is
+printed, by changing the definitions of the macros \CS{ChapterStyle},
+\CS{SectionStyle}, or \CS{SubsectionStyle}. These macros take
+one argument, the chapter or section number, and by default they simply
+return that argument. By substituting your own definition you can do
+almost anything you like to the section number. For example, it is
+often desired that the section number printed as a Roman numeral
+rather than as an Arabic numeral. The following definition will convert
+the section number to an upper-case Roman numeral:
+\TeXexample
+\def\SectionStyle#1{\uppercase\expandafter{\romannumeral #1}}
+|endTeXexample
+
+Even more customized behavior of the section-making macros is possible.
+For example, \cs{Tbf} and \cs{tbf} can also be defined as macros which
+take a single argument, which is arranged to be the title of the
+section or chapter.
+To see how this works it may be best to look at the definitions of
+\CS{chapter} and \CS{section} and the like in the source file
+|TXSsects.tex|. For very specialized applications you could even copy
+the definitions in this file to the TXSmods.tex file or your own
+personal style file and then alter them however you like.
+
+
+%==================================================*
+
+\subsection{The Master File}
+
+ An useful concept for typesetting a long document is that of
+the\index{master file} {\em Master File}.
+The idea is to create one small file which initializes \TeXsis\ with
+\cs{texsis}, makes any special definitions or sets parameters, and
+then reads in the actual text of the document in sections using the
+|\input| command.
+As a simple example consider a manuscript called MUONS.
+The master file is called |MUONS.tex|, and contains the following:
+\TeXexample
+|smalltt\texsis % initialize TeXsis
+\input MyMacros % special macros for this paper
+\input MUONSr % references for the paper
+\input MUONS0 % title page for the paper
+\input MUONS1 % first section of manuscript
+\input MUONS2 % second section of manuscript
+\ListReferences % print the reference list
+\end
+|endTeXexample
+The file |MyMacros.tex| contains any special macro definitions used
+in this paper. (If there are none, leave this line out.) The
+file |MUONSr.tex| contains the references used in this paper,
+beginning with |\referencelist| and ending with
+|\endreferencelist|, as described in \Sect{refs}. The
+file |MUONS0.tex| contains the commands for producing the title
+page of the paper, as described in \Sect{fmts}. The
+actual text of the manuscript is divided into two parts, which
+are kept in the files |MUONS1.tex| and |MUONS2.tex|. To process the
+entire document one simply runs \TeXsis\ on the master file with
+the command
+\TeXexample
+texsis MUONS
+|endTeXexample
+\noindent
+If you are familiar with computer programming you may think of
+the master file as the main program and the other files as
+subroutines called by the main program.
+
+ One of the great advantages of using a master file, aside from
+keeping the manuscript organized, is that it lets you work on a single
+section of the paper at a time. For example, suppose you want to
+run off a draft of just the first section of the paper called MUONS
+above. You don't need to process the references, the title page,
+or the second section of the paper. Recall that the percent sign
+(|%|) is the comment character in \TeX\ --- anything appearing on
+a line after a |%| is ignored by \TeX. Thus we simply edit the
+master file and put a |%| in front of certain lines, like this:
+\TeXexample
+|smalltt\texsis % initialize TeXsis
+\draft % optional draft mode
+\input MyMacros % special macros for this paper
+% \input MUONSr % references for the paper
+% \input MUONS0 % title page for the paper
+\input MUONS1 % first section of manuscript
+% \input MUONS2 % section section of manuscript
+% \ListReferences % print the references
+\end
+|endTeXexample
+Now when you run \TeXsis\ on this file only the first section of
+the paper will be processed, but it will use the macros defined
+in |MyMacros.tex|, as well as any other definitions that you might
+add to the master file. Once the first section is error free you
+can repeat the process on the second section of the paper,
+without rerunning the first section. After both sections are
+correct you can reinstate all lines in the master file and
+process the whole document.
+
+%==================================================*
+
+\subsection{Table of Contents \label{sect.conts}}
+
+The section-making macros just described automatically make an entry in
+a \idx{table of contents} for the document being prepared. The title of
+the chapter or section and the page number are stored in a table of
+contents file (which ends with the extension ``|.toc|'') until needed,
+then the table of contents is created simply
+by saying \CS{Contents}.
+If your document is divided into chapters,
+like a book, the table of contents should appear on a page with a Roman
+numeral page number (which is obtained by setting \cs{pageno} to a
+negative value). For example:
+\TeXexample
+\book % document format for a book
+\input Chapt1 % input chapters...
+...
+\vfill\supereject % eject last page, including figures
+\pageno=-3 % print on pages iii, iv, ...
+\nosechead{Contents} % label TOC without section #
+\Contents % generate table of contents
+|endTeXexample
+
+The table of contents is usually printed at the {\sl end\/} of the
+document so that all the page numbers are correct. You then
+simply move these pages to the front of the document by hand.
+Alternately, you can say \CS{Contents} at the beginning of your document
+to read in the table of contents file produced by a previous run of
+\TeXsis, although then you must process the document twice to be sure
+that the page numbers are correct.
+
+It is important to note that nothing is written to the table of contents
+file unless \CS{Contentstrue} is set. The default for most documents
+is \CS{Contentsfalse}, since one usually does not want a table of
+contents for a short paper or a memo or a letter. The exceptions are
+\cs{book} and \cs{thesis}, which automatically set
+\CS{Contentstrue}. In any case, if you want a table of contents
+you can explicitly state \CS{Contentstrue}.
+
+ While an entry in the table of contents is created by
+\cs{chapter} or \cs{section}, no entry is made for \cs{nosechead}. In
+this case, or in any case, you can insert an entry into the table of
+contents ``by hand'' by saying
+\example
+\CS{addTOC}\arg{level}\arg{title}\arg{page}
+\endexample
+where \meta{level} is the level of division for the entry being made,
+with 0 for chapters, 1 for sections and 2 for subsections. This
+controls how much vertical space is put around the table of contents
+entry and how much the entry is indented in the list.
+%
+The \meta{title} is the text of the title as it should appear in the
+table of contents. Text which is too long for one line will be split
+over several lines, but you can force a line break where you want one
+with \cs{n}. The \meta{page} is the page number for the entry you are
+making. Generally you'll use \cs{folio} here to just use the current
+page number, whatever that may be. Thus to make a section level entry
+in the table of contents having the title ``Acknowledgments'' you would
+simply say
+\TeXexample
+\addTOC{1}{Acknowledgments}{\folio}
+|endTeXexample
+
+Entries made in the table of contents by \cs{chapter}, \cs{section},
+etc. will optionally begin with the chapter or section number, depending
+upon whether \cs{showchaptIDtrue} and \cs{showsectIDtrue} are selected.
+The decision whether or not to show the chapter or section number is
+made when the table of contents is printed by \CS{Contents}, not when
+the \cs{chapter} or \cs{section} is begun. Thus it is possible to have
+the section numbers showing at the beginning of the section, but to then
+have no section numbers in the table of contents by saying
+\cs{showsectIDfalse} immediately before saying \CS{Contents}.
+
+\bigbreak
+
+It is possible to write commands or other text to the table of contents
+file while it is being created, using the command
+\CS{TOCwrite}\arg{stuff}.
+For example, the heading separating the appendices from the rest of
+the entries in the table of contents of this Manual was created by
+saying
+\TeXexample
+\TOCwrite{\bigskip\noexpand\nosechead{Appendices:}}
+|endTeXexample
+\noindent
+before the appendices were created. The \cs{noexpand} prevents the
+|\nosechead| from being expanded until later, after the table of contents
+file is read back in by \CS{Contents}
+
+
+\bigbreak
+
+ What if you want the table of contents to appear in the table
+of contents itself!? Naturally it should appear first (even though it
+may be printed at the end of the document). You can use the tagging
+mechanism described in \Sect{labels} to make a ``forward reference''
+to the page number. At the beginning of the document you can create
+the table of contents entry by saying
+\TeXexample
+\addTOC{0}{Table of Contents}{\noexpand\use{page.TOC}}
+|endTeXexample
+\noindent
+The \cs{noexpand} prevents the \cs{use} from being expanded until later,
+after the table of contents file is read back in. Later, when you actually
+print the table of contents you would first tag the page number, then
+invoke \CS{Contents}, like so:
+\TeXexample
+\nosechead{Table of Contents}
+\tag{page.TOC}{\folio}
+\Contents
+|endTeXexample
+
+\Ignore % NO, WE DON'T DO IT
+\noindent
+As a demonstration of this we have done this for the table of contents
+for this manual. For more information about \cs{tag} and \cs{use} see
+\Sect{labels}.\relax
+\endIgnore
+
+%======================================================================*
+
+\subsection{Running Headlines and Footlines \label{sect.headline}}
+
+ In Plain \TeX, whenever a page is output an optional headline
+and footline are added at the top and bottom of the page. In \TeXsis\
+the footline is normally blank, while the headline contains the page
+number in the upper right corner. The \cs{book} and \cs{thesis} formats
+also display a running headline, centered in 10~pt.\ italic type,
+containing the chapter or section title.
+Running headlines and page numbers are {\bf not} printed on any
+page containing a \cs{title} or a new \cs{chapter}.
+For an example of running headlines look at the top of
+any page in this Manual.
+
+ \CS{nopagenumbers} turns off the running headlines and
+footlines, just as it does in Plain \TeX. In \TeXsis\ saying
+\CS{pagenumbers} restores the standard headlines and footlines.
+Saying \CS{bookpagenumbers} puts odd page numbers in the upper right
+corner and even page numbers in the upper left corner, the normal
+convention for books. This is the default for \cs{book}.
+
+ \CS{RunningHeadstrue}, the default for \cs{book} (and
+\cs{thesis}), displays the running headline text \cs{HeadText}, as well
+as the page number. |\RunningHeadsfalse| turns off the running
+headlines but leaves the page numbers. \cs{HeadText} is defined by
+\cs{chapter} to be the chapter title in 10~pt.\ italic type; if no
+chapters are used, then it is defined by \cs{section} to be the section
+title. You can change the running headline yourself with the command
+\CS{setHeadline}\arg{text}. For example, the headline at the top of
+this page could have been created by saying
+\example\tt
+\CS{setHeadline}|{|\HeadText|}|
+\endexample
+The headline text appears in typestyle \CS{HeadFont}, which
+you can change to suit your tastes. The default is
+|\tenit|,
+but for this manual we used |\def\HeadFont{\tensl}|.
+
+
+Running headlines are not normally affected by \cs{subsection}, but it
+is easy to have each subsection change the runing headlines by
+defining \cs{aftersubsection} to include a \CS{setHeadline} command.
+As a useful example, suppose that each subsection is to have a running
+headline composed of both the title of the section and the title of
+the subsection. You could have this done automatically by defining
+something like:
+\TeXexample
+\def\aftersubsection{\setHeadline{\SectionTitle: \SubsectionTitle}}
+|endTeXexample
+The rest of this section will have such running headlines as an
+example.
+\def\aftersubsection{\setHeadline{\SectionTitle: \SubsectionTitle}}
+\bigskip %<-- needed to force page break before next section!
+
+
+%======================================================================*
+
+\subsection{How to Make an Index \label{sect.index}}
+
+The traditional way to make an index for a book was to write key~words
+on 3$\times$5 ``index'' cards, and to then write on these card the
+numbers of the pages on which the key words occurred.
+The cards were then sorted by hand and then their contents also sorted
+and typed in order to make the index.
+This was a tedious and time consuming task.
+Fortunately this whole process has been modernized so that an index
+can be made almost automatically.
+Still, it takes a certain amount of care to create a useful, well
+constructed index.
+An important part of designing a good index is deciding which
+key~words will be useful in the index and which key~words will not.
+A computer cannot make these decisions for you.
+
+Making an index with \TeX\ still involves collecting the index entries,
+sorting them (and removing duplicate references), and then producing the
+final index. The first and last steps are accomplished with a set of
+plain \TeX\ macros known as |index.tex|, while the sorting and collating
+of the index entries is done by a separate computer program called
+|makeindex|.\index{makeindex}\ This is how we made the index for this
+Manual, which starts on page~\use{pg.index}.
+
+To create an entry in the index you can say \CS{index}\arg{key}, where
+\meta{key} is the key~word to be entered into the index, or more simply
+you can say \CS{idx}\arg{word}, which both includes the word in the
+text and makes an index entry for it; saying ``\CS{idx}|{Frisbee}|''
+is the same as saying ``|Frisbee|\CS{index}|{Frisbee}|''.
+Either of these indexing commands writes the index entry to a file
+with the name extension ``|.idx|''.
+Once your document has been processed by \TeX\ this file will contain
+all of the ``raw'' index entries.
+
+The entries in the raw index file are not sorted, and there may be many
+duplications. The |makeindex|\index{makeindex} program will sort the
+index entries and reformat them in a form appropriate for printing the
+index. The output from the |makeindex| program is a file with the
+extension ``|.ind|''. So if your
+manuscript file is called |myfile.tex| and you have run it through
+\TeXsis\ you should find a file called |myfile.idx| containing the raw
+index entries. You would run the |makeindex| program like so,
+\example
+|makeindex myfile.idx|
+\endexample
+to produce the processed index file |myfile.ind|.
+(You can leave off the |.idx| extension for the raw file and |makeindex|
+will assume it.)
+
+To print the index you can either include it in another pass of the full
+document, by saying
+\TeXexample
+\input \jobname.ind
+|endTeXexample
+\noindent
+in the manuscript file, or you can print it separately by adding
+``|\input index|'' to the begining of the |myfile.ind| file and running
+it through \TeX\ or \TeXsis.
+
+If you set \CS{markindextrue} then indexed words selected with \CS{idx}
+will appear in the printed output inside a ruled box
+like so:
+\begingroup
+\markindextrue \idx{Frisbee}.
+\endgroup
+The box does not interfere with or change the word or line spacing.
+These ``proof marks'' are useful for draft copies when you are putting
+together the index, but obviously you do not want them to appear in the
+final copy, so the default is |\markindexfalse|.
+
+The |index.tex| macros are distributed with \TeXsis, but |makeindex|
+is not.
+If you do not have the |makeindex| program you can get the C source
+code for it from the \TeXsis\ anonymous ftp site,
+|ftp.texsis.org|.
+It is a well-known program, and is also available from CTAN in the
+directory {\tt indexing/makeindex}.
+Note that the |index.tex| macros work with plain \TeX\ as well as
+\TeXsis, and they work with |makeindex| in its default mode, even
+though that default mode was originally intended for \LaTeX\ code.
+
+For more information about how to make full use of |makeindex| see the
+file |index.tex|, the Unix man page for makeindex(1), and the original
+paper by Chen and Harrison\reference{makeindex} Pehong Chen and
+Michael A. Harrison, ``Index Preparation and Processing'', in {\sl
+Software: Practice and Experience}, \vol{19}, 897-915 (1988)
+\endreference
+describing how they designed the |makeindex| program.
+
+\def\aftersubsection{\relax}
+
+%>>> EOF TXSsects.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXSsite.000 b/Master/texmf-dist/doc/texsis/base/TXSsite.000
new file mode 100644
index 00000000000..a9825ef9621
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSsite.000
@@ -0,0 +1,164 @@
+%% file: TXSsite.tex (TeXsis version 2.17)
+% $Revision: 18.0 $ : $Date: 2000/05/17 00:45:04 $ : $Author: myers $
+%======================================================================*
+% This is the site dependent info file for TeXsis. Edit the things
+% below to match your installation. Take out what you don't need or
+% want and add any local macros or other stuff you want. Anything
+% between \Ignore and \endIgnore is ignored, but will become active if
+% you remove the \Ignore. Remember, this file is only read in once when
+% texsis.fmt is made!
+
+% Change name to your own institution or site here:
+
+\message{Site dependent info.... Generic version.}
+
+\ATunlock % make @ a letter
+
+%===================================*
+% \ORGANIZATION is the name of the issuing organization, which
+% appears at the top of the title page, or on a \Memo.
+% You can also change it before you call \titlepage.
+
+\Ignore % an example using mixed caps
+ \def\ORGANIZATION{{\eightrm {\tenrm B}ANSAI {\tenrm I}NSTITUTE}}
+\endIgnore
+
+\def\ORGANIZATION{}
+
+%===================================*
+% \LandscapeSpecial turns on landscape mode on the laser printer.
+% How this is done is very site dependent. Uncomment the version
+% that works for you, or insert your own if these don't work.
+
+% 1) This is how dv2ips does it, and you need to have landscape.ps
+% accesable to the filter program
+
+\Ignore
+ \def\LandscapeSpecial{\special{psfile=landscape.ps}}
+\endIgnore
+
+% 2) This is how dvips (Rokicki's version 5.484 and later) does it:
+
+\def\LandscapeSpecial{\special{papersize=11in,8.5in}}
+
+
+%===================================*
+% \manualfeed tries to put the printer in Manual Feed mode, for
+% printing on letterhead stationary or envelopes.
+% How you do this is really installation specific.
+
+% If you use 'dvi2ps' then use \special to read the file manfeed.ps.
+% You can get it from ftp://feynman.physics.lsa.umich.edu/texsis/etc/manfeed.ps
+
+\Ignore
+ \def\manualfeed{\emsg{\@comment MANUAL FEED MODE SELECTED!}%
+ \special{psfile=manfeed.ps}}
+\endIgnore
+
+% Rokicki's dvips will do manual feed if you use 'dvips -m'
+% but this tries to do the same thing (and doesn't work! -EAM 98/03/06)
+
+\Ignore
+ \def\manualfeed{\emsg{\@comment MANUAL FEED MODE SELECTED!}%
+ \special{! @manualfeed}}
+\endIgnore
+
+
+%===================================*
+% \@DOCcode is the document code that appears in the upper right
+% part of the title page of a \preprint. It starts out at its default
+% value, and is changed by calling \pubcode{<code>} before you call
+% \titlepage. If you don't use anything you'll get \TeXsis.
+
+\Ignore
+ \def\@DOCcode{UTREL\hbox to 1.5cm{\hss}}
+\endIgnore
+
+%===================================*
+% \banner produces a banner across the top of the title page for
+% a \preprint. Customize this however you like.
+
+\def\banner{\vskip 0pt
+ \line{{\ninepoint\@PUBdate \hfil
+ \hbox{\vbox{\hrule\vskip 4pt \hbox{\ORGANIZATION}\vskip 4pt\hrule}}% %
+ \hfil \@DOCcode}}%
+ \vskip 1.0cm
+}
+
+\def\@PUBdate{\uppercase{\today}} % default is today
+
+
+%===================================*
+% \letterhead{phone} is for copying onto letterhead stationary.
+% It just puts on the date and a phone number (if given).
+
+% THIS IS JUST AN EXAMPLE - MODIFY FOR YOUR OWN INSTITUTION.
+
+\Ignore
+\def\letterhead#1{% letterhead for copying onto Univ. Michigan stationary
+ \def\PhoneNumber{#1}%
+ \emsg{Positioning date/phone for University of Michigan letterhead.}%
+ \begingroup % this header stuff is local
+ \parskip=0pt \parindent=0pt %
+ \null\vskip 0.6in % skip down to date line
+ \line{\hfill \hbox to 5in{\tensl \today\hfill}}% Today's Date
+ \line{\tenss \hfill (734)
+ \ifx\PhoneNumber\empty 764-4437\else \PhoneNumber\fi}%
+ \ifx\Email\undefined\else\line{\hfill \tt \Email}\fi
+ \vskip 10pt plus 1fil
+ \endgroup}
+\endIgnore
+
+%===================================*
+% \UMletterhead{phone} is a facsimile of the University of Michigan
+% stationary. If \Email is defined it is included under the phone number.
+
+% THIS IS JUST AN EXAMPLE - MODIFY FOR YOUR OWN INSTITUTION.
+% It uses a PostScript image of the Univ. Michigan seal, umseal.ps
+
+\Ignore
+\def\UMletterhead#1{% Facsimile of UM letterhead
+ \def\PhoneNumber{#1}%
+ \begingroup % make these these things local
+ \null\vskip -27pt % masthead up a bit to match real thing
+ \UMmasthead % UM seal and name
+ \line{\hfill \hbox to 5in{\tensl \today\hfill}}% Today's Date
+ \line{\tenss \hfill (734)
+ \ifx\PhoneNumber\empty 764-4437\else \PhoneNumber\fi}%
+ \ifx\Email\undefined\else\line{\hfill \tt \Email}\fi
+ \vskip 10pt plus 1fil
+ \endgroup}
+
+\def\UMseal{{\hbox{\epsfbox{umseal.eps}}}}%
+
+\def\UMmasthead{\line{\llap{\UMseal\hskip -35pt}\hfill
+ \hbox{\vbox{\hsize=13.99cm \def\LC##1{{\twentyfourpoint\bf ##1}}%
+ \line{\hfill \twentypoint\bf \LC{T}HE \LC{U}NIVERSITY OF \LC{M}ICHIGAN}%
+ \vskip 0.85cm
+ \line{\tenss DEPARTMENT OF PHYSICS \hfill 2071 Randall Laboratory}%
+ \line{\tenss \hfill Ann Arbor, MI 48109-1120}%
+ }}}}%
+\endIgnore
+
+%===================================*
+% Mailing Labels: you may have to change these depending on your
+% printer and the kind of labels you use.
+
+\Ignore
+
+% This is for the "standard" inch high, 3 across the page labels
+
+\lblHsize=7.32cm % width of standard label
+\lblVsize=2.54cm % height of standard label
+\fullHsize=8.5in % hsize for page
+\fullVsize=11.0in % vsize for page
+
+\lblVoffset=0pt % shift down this much
+\lblHoffset=-1.8cm % shift over this much
+
+\endIgnore
+
+%>>> EOF TXSsite.tex <<<
+
+
+
diff --git a/Master/texmf-dist/doc/texsis/base/TXSsymb.doc b/Master/texmf-dist/doc/texsis/base/TXSsymb.doc
new file mode 100644
index 00000000000..eef1dc39730
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXSsymb.doc
@@ -0,0 +1,199 @@
+%% file: TXSsymb.doc - Special Symbols - TeXsis version 2.18
+%% @(#) $Id: TXSsymb.doc,v 18.2 2000/05/17 00:19:46 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1995, 1997 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta \texsis\input TXSdocM.doc\input Manual.aux\draft\fi
+
+\subsection{Special Symbols \label{sect.symb}}
+
+\TeXsis\ defines some special symbols and other constructions which
+are not included in plain \TeX\ and which either are commonly used
+by physicists or are not trivial to construct. The following
+macros, which are listed here by related groups, provide these
+additional special symbols for use in equations:
+\index{symbols!physics}
+\bigskip
+\itemize
+ \itm \CS{bra}\arg{text} and \CS{ket}\arg{text} produce the
+notations $\bra{\hbox{\it text}}$ and $\ket{\hbox{\it text}}$
+respectively for quantum mechanical states. \CS{vev}\arg{text}
+produces $\vev{\hbox{\it text}}$ for a VEV (\idx{Vacuum Expectation Value}).
+
+ \itm \CS{del}, \CS{grad}, and \CS{square} produce the notations
+$\del$, $\grad$, and $\square$ for various derivatives. (The first two
+are just synonyms for \cs{partial} and \cs{nabla}.)
+
+ \itm \CS{degrees} is the degrees symbol. For example, |90\degrees|
+produces ``90\degrees''. You can use \CS{degree} as a synonym. These
+work equally well in math or text mode.
+
+ \itm \CS{frac}\arg{numerator}\arg{denominator} produces the fraction
+|{|\<numerator> |\over| \<de\-nomi\-nator>|}|, while
+\hskip 0pt plus 6pt\CS{smallfrac}\arg{numerator}\arg{denominator}
+\hskip 0pt plus 6pt
+produces the same fraction in the smaller
+subscript style type. \CS{half} produces a $\half$ in a size appropriate
+to its usage.
+
+ \itm \CS{simle} and \CS{simge} make the symbols $\simle$ and
+$\simge$ to indicate "less than about" and "greater than about,"
+respectively. Synonyms for these are \CS{ltsim} and \CS{gtsim}.
+
+ \itm \CS{parenbar} puts a bar in parentheses above a character;
+this is often used to indicate either a particle or its antiparticle.
+\CS{nunubar} and \CS{ppbar} are special cases. Thus
+\TeXexample
+$$ n \parenbar{n} \qquad \nu \nunubar \qquad p \ppbar $$
+|endTeXexample
+gives
+$$
+n \parenbar{n} \qquad \nu \nunubar \qquad p \ppbar
+$$
+
+\goodbreak
+
+ \itm \CS{subrightarrow}\arg{text} puts the text under a right
+arrow of the appropriate length. Thus
+\TeXexample
+$$ f(x) \subrightarrow{x \to 0} f(0) $$
+|endTeXexample
+gives
+$$
+f(x) \subrightarrow{x \to 0} f(0)
+$$
+
+ \itm \CS{buildchar}\arg{\#1}\arg{\#2}\arg{\#3} gives character |#1| with
+|#2| above it and |#3| below it, allowing the construction of a variety
+of special symbols. \CS{overcirc} is a special case of this which puts
+a small circle above a character, as in $\overcirc R$. This is often
+used in general relativity and related fields.
+
+ \itm \CS{vbigl}\arg{delim}\arg{size} and
+\CS{vbigr}\arg{delim}\arg{size} produce very (or variably) big
+delimiters, generalizing the Plain \TeX\ macros \cs{bigl}, \cs{Bigr},
+etc. They produce, respectively, the left and right delimiters
+\meta{delim} with height \meta{size}, which can be given in pt., cm.,
+in., or any other valid units. Any valid delimiter may be used, but you
+must be careful if you use parentheses and automatic parenthesis sizing
+is also in effect (\Sect{paren}), because these conflict. You must
+either turn off automatic parenthesis sizing (with \cs{offparens}) or
+use \cs{lparen} or \cs{rparen} in place of `|(|' and `|)|'.
+
+\itm \CS{Leftcases}\arg{size} and \CS{Rightcases}\arg{size} give left
+and right braces of size \meta{size} smashed to zero height; these can
+be used in place of the \cs{cases} of Plain \TeX\ when it is desired to
+put an equation number on each line. For example,
+\TeXexample
+|smalltt$$\EQNalign{
+m_e &= ~.511~\MeV \EQN lep;a \cr
+m_\mu &= ~105~\MeV
+ \quad \Rightcases{50pt} \quad {\rm Leptons}
+ \EQN lep;b \cr
+m_\tau &= 1784~\MeV \EQN lep;c \cr}
+$$
+|endTeXexample
+gives\index{equations!alignment}
+$$\EQNalign{
+m_e &= ~.511~\MeV \EQN lep;a \cr
+m_\mu &= ~105~\MeV
+ \quad \Rightcases{50pt} \quad {\rm Leptons}
+ \EQN lep;b \cr
+m_\tau &= 1784~\MeV \EQN lep;c \cr}
+$$
+Note that |\Leftcases| and |\Rightcases| do not provide automatic
+spacing, which must be adjusted by the user as in the previous example.
+There seems to be no simple way to obtain automatic spacing and to
+allow an equation number on each line.
+
+
+ \itm \CS{sterling} produces the British currency mark \sterling.
+
+ \itm The astronomical symbols for the sun and the earth are
+\CS{sun} and \CS{earth}. For example, |$M_\sun$| and |$M_\earth$| give
+$M_\sun$ and $M_\earth$. You can also use them outside of math mode.
+
+
+ \itm \CS{dimensions}\arg{units}\arg{power} is used for dimensional
+analysis. The units appear in square brackets, raised to the given
+power. For example to produce \dimensions{mass}{-3} you would type
+|\dimensions{mass}{-3}|.
+
+ \itm \CS{slashchar}\arg{letter} puts a slash through a character, the
+notation for the contraction of a vector with Dirac $\gamma$ matrices
+in Feynman graphs. For example
+\TeXexample
+$$ {\cal L} =
+ \bar\psi[i\slashchar{\partial} - e\slashchar{A}-m]\psi $$
+|endTeXexample
+gives
+$$
+{\cal L} =
+ \bar\psi[i\slashchar{\partial} - e\slashchar{A}-m]\psi
+\,.
+$$
+The results produced by |\slashchar| are not as good as one would
+like. You can do somewhat better by adjusting the kerning of the |/|
+by hand for each character. For example,
+\TeXexample
+\def\Aslash{A\kern -0.47em/}
+|endTeXexample
+\def\Aslash{A\kern -0.47em/}%
+produces ``$\Aslash$''. But note that the angle of the slash is still
+not quite what one would like for a slashed ``$A$.'' To really get good
+looking slashed characters someone will have to create a new slashed
+character math font using MetaFont. Meanwhile you can get by with
+|\slashchar| or define your own using kerning.
+
+\enditemize
+\bigskip\pagecheck{0.2\vsize}
+
+ Abbreviations for units are normally set in Roman type even when used
+in formulas. Special function (e.g., sine, cosine and logarithm) or
+operator names are also set in Roman type, and \TeXsis\ adds some new
+names to go with the old standards.
+
+\itemize
+ \itm \CS{Tr} and \CS{tr} give ``$\Tr$'' and ``$\tr$'' respectively for the
+trace of an operator or of a matrix. \CS{diag} is used to denote a
+diagonal matrix, as in $\eta_{\mu\nu}=\diag(-1,1,1,1)$.
+
+ \itm \CS{real} and \CS{imag} give the symbols $\real$ and $\imag$
+for the real and imaginary parts of an expression; the spacing is like
+that for any other function or operator.
+
+ \itm \CS{eV}, \CS{keV}, \CS{MeV}, \CS{GeV}, and \CS{TeV} give the
+abbreviations for energy units $\eV$, $\keV$, $\MeV$, $\GeV$, and
+$\TeV$ respectively.
+
+ \itm \CS{mb}, \CS{mub}, \CS{nb}, \CS{pb}, and \CS{fb} give the
+abbreviations for cross section units $\mb$, $\mub$, $\nb$, $\pb$, and
+$\fb$ respectively, while \CS{cmsec} gives $\cmsec$, the standard units
+for luminosity in colliding beam accelerators.
+
+ \itm \CS{units}\arg{name} is a generic macro to print in Roman type
+the name of any units not covered by the macros above. For example,
+you can say \CS{units}|{furlongs}| and \CS{units}|{fortnights}|
+if you are using that particular system of units.
+\enditemize
+
+
+
+ Note that all of the abbreviations for units above are defined
+without any spacing; to produce
+$$
+{\cal L} = 10^{33}\,\cmsec, \qquad p_\perp = 8.3\,\GeV
+$$
+you should type
+\TeXexample
+$$
+{\cal L} = 10^{33}\,\cmsec, \qquad p_\perp = 8.3\,\GeV
+$$
+|endTeXexample
+with a |\,| to make a thin space between the number and the units.
+
+
+%>>> EOF TXSsymb.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/TXStags.doc b/Master/texmf-dist/doc/texsis/base/TXStags.doc
new file mode 100644
index 00000000000..768e4f1692f
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/TXStags.doc
@@ -0,0 +1,212 @@
+%% file: TXStags.doc - Tags and Labels - TeXsis version 2.18
+%% @(#) $Id: TXStags.doc,v 18.1 1999/07/30 18:34:24 myers Exp $
+%======================================================================*
+% (C) Copyright 1989, 1992, 1997 by Eric Myers and Frank E. Paige
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\ifx\undefined\meta \texsis\input TXSdocM.doc\draft\input Manual.aux\fi
+
+
+\section{Labels and Tags \label{sect.labels}}
+
+One of the most useful features of \TeXsis\ is that it automatically
+numbers things like equations and references and lets you refer to
+these things by means of symbolic names or ``labels.''
+This section explains how to get the most use out of this labeling
+mechanism.
+
+\subsection{Tagging}
+
+ Here is a rough outline of how labeling or ``tagging'' works.
+\TeXsis\ keeps track of numbers for equations, figures, tables, and
+other useful things in counters. Whenever you create a new equation,
+figure, table or reference the appropriate counter is incremented. At
+the same time, a new macro instruction is defined, with the label
+incorporated into the name, and the definition of this macro is
+simply the (new) value of the counter. Thus if you create a displayed
+equation and label it ``Newton'' then a macro called ``|\Eq.Newton|'' is
+created and it is automatically defined to be whatever the next number
+is for the equation.
+
+ The actual mechanism is somewhat more subtle. Normally you can
+only use letters in macro names, but \TeXsis\ uses \cs{csname} |...|
+\cs{endcsname} to allow numbers and punctuation to be used in
+labels.
+Also, an extra |@| is added at the beginning and end of each macro
+name.
+If this were not done then, for example, using ``|end|'' as a label
+(using \CS{tag}) could redefine \cs{end}, and you would not be able to
+get out of \TeX!
+So the macro containing the equation number for the equation named
+``Newton'' actually ends up being named ``|\@Eq.Newton@|''.
+
+ Once a label macro is defined you can use it to refer to the
+thing it labels, and it will yield the proper number.
+In the case of the equation called ``Newton,'' saying |\Eq{Newton}| is
+really saying |Eq.~(\@Eq.Newton@)|.
+(Again, since punctuation is not allowed in names, \TeXsis\ actually
+uses \cs{csname} |...| \cs{endcsname} in the definition.)
+References, equations, figures, tables, etc., all produce their
+numbers in this way.
+
+ Each of the \TeXsis\ macros which uses labels attaches to
+the label a unique prefix identifying the kind of object labeled.
+These objects and the corresponding prefixes are shown in
+\Tbl{labels}.
+Because of these prefixes the same label can be used for different
+kinds of objects.
+For example, the name ``Witten'' can be used as a label for an
+equation and as a reference, since their internal labels are
+|Eq.Witten| and |Ref.Witten|, respectively (and in reality the names
+are bracketed by |@| characters).
+The prefixes are automatically inserted by \TeXsis\ macros like
+\cs{Eq} and \cs{cite}.
+
+ At the most primitive level you can always associate a label with
+some value by saying \CS{tag}\arg{label\/}\arg{value}. You can then
+reference the value, whatever it is, by its name using the command
+\CS{use}\arg{label\/}. In this case if there is to be a prefix in the
+label you must put it in explicitly. Thus to say just the number of the
+equation labeled ``Newton'' without any parentheses or anything you
+would say |\use{Eq.Newton}|. To get the number of the reference labeled
+``Knuth'' you would say |\use{Ref.Knuth}|, which produces
+``\use{Ref.Knuth}'' because ``Knuth'' is the label of the first document
+we referenced in this manual and ``Ref'' is the prefix used for
+references.
+
+\table{labels}
+\caption{Prefixes for labels and the corresponding counters for
+various objects.}
+\def\CS#1{{\tt\char92{#1}}}
+\def\\{\hfill}
+\ruledtable
+Entity \\| Tag Prefix | Counter \CR
+Corollary \\| {\tt Cor.} | \CS{corollarynum} \\\cr
+Definition \\| {\tt Df.} | \CS{definitionnum} \\\cr
+Equation \\| {\tt Eq.} | \CS{eqnum} \\\cr
+Figure \\| {\tt Fg.} | \CS{fignum} \\\cr
+Lemma \\| {\tt Lem.} | \CS{lemmanum} \\\cr
+Reference \\| {\tt Ref.} | \CS{refnum} \\\cr
+Table \\| {\tt Tb.} | \CS{tabnum} \\\cr
+Theorem \\| {\tt Thm.} | \CS{theoremnum} \\
+\endruledtable
+\endtable
+
+ One particularly useful way to use \CS{tag} and \CS{use} is to
+refer to a topic which is discussed on some other page in the
+document.
+On the page you want to reference you could define the tag
+``page.cool'' to be the page number by saying
+\CS{tag}|{page.cool}{|\cs{folio}|}|.
+Then somewhere else in the document if you want to refer to the
+information on that page you could do so with
+\CS{use}|{page.cool}|, as in ``This difficulty is discussed in
+more detail on page |\use{page.cool}|.''
+Then even if the document is rearranged so that the page numbers
+change, the page number you referred to will come out correct.
+
+Here is another useful example.
+Suppose you want to state the number of questions at the begining of
+an examination (or similarly, the number of chapters in a book).
+A count of the questions could be kept in |\Qcount|, but it won't be
+set correctly until the end of the job.
+Even so, when the count is known we can tag it with a name like ``NQ''
+and use it in the text with |\use{NQ}|.
+The first time this is encountered it will display as an undefined tag
+and an error message will appear in the log.
+But at the end of the document we say
+\TeXexample
+\tag{NQ}{\Qcount}
+|endTeXexample to assign the final value of |\Qcount| to the
+tag~``NQ''.
+The next time the job is run saying |\use{NQ}| will be defined as the
+value from the previous run.
+Unless you've recently changed things (by adding or removing a
+question) then this will be the correct count.
+
+
+ Knowing about \CS{use} and the prefixes in \Tbl{labels} also lets you
+change how the macros that refer to these objects work. For example, to
+refer to figure~\use{Fg.Penguin} in section~\use{sect.figs} you would
+normally say \cs{Fig}|{Penguin}|. This produces
+``Fig.~\use{Fg.Penguin},'' but suppose you want it to say the full word
+``figure'' instead of just ``Fig.'' You can make this change throughout
+the document simply by changing the definition of \cs{Fig} to:
+\TeXexample
+\def\Fig#1{figure~\use{Fg.#1}}
+|endTeXexample
+\noindent
+Then ``\cs{Fig}|{Penguin}|'' would produce ``figure~\use{Fg.Penguin}.''
+
+
+\bigskip
+
+ Whenever you create any of the objects listed in \Tbl{labels} a
+label is automatically created. However, chapters, sections, and
+subsections are not automatically labeled because their values are not
+ordinarily changed. If you want to remember the number of a chapter or
+section of your document to be able to refer to it somewhere else, put
+\CS{label}\arg{label\/} in the text of the title of the chapter or
+section. \CS{label}\arg{label\/} is the same as
+\CS{tag}\arg{label\/}\arg{counter}, where \meta{counter} is the current
+section or chapter number, as appropriate. For example you might have:
+\TeXexample
+\section{Supersymmetry and Supergravity \label{sect.SUSY}}
+|endTeXexample
+\noindent
+To refer to that section later on you would say |\use{sect.SUSY}|.
+Note that \CS{label} does not insert any prefix in front of the label,
+so you must include it explicitly if you want one.
+We suggest ``sect'' for sections, ``chapt'' for chapters, and so
+forth, but you are free to use whatever you want.
+
+
+%==================================================*
+\pagecheck{0.33\vsize}
+
+\subsection{Forward References}
+
+If you label an equation or a figure or a section you can refer to
+the number of that object later in the text, but what if you want to
+refer to the thing before it has been tagged? Then the label won't
+exist yet. This is called making a forward reference. To allow for
+this \TeXsis\ also writes the definition of every label to an auxiliary
+file, which has a name ending in |.aux|. The label will still be
+undefined the first time you make the forward reference, but the next
+time you run the document through \TeXsis\ it will automatically read in
+the auxiliary file at the beginning of the job and define the label.
+Thus on the second pass the label will already be defined when it is
+called for. Having to make a second pass may sound like extra work,
+but when you are editing a document and putting the finishing
+touches on it you will find you end up making the extra pass without
+thinking about it. Just don't delete the |.aux| file between runs.
+\index{forward references}
+
+ If you try to reference a label that does not exist you'll be
+told so at the end of the run (when you say \cs{bye}) and another pass
+will be suggested. Undefined references are also noted in the log file
+when they occur, and the label itself is inserted into the output text
+in boldface to make it easier for you to track down the problem. In
+\cs{draft} mode the mark ``{\tt UNDEF}'' is also put in the right
+margin to help you find the problem.
+
+% Describe \twopass here, if we ever decide to publicize it
+
+
+
+%==================================================*
+\pagecheck{0.33\vsize}
+
+\subsection{Hypertext \label{sect.hypertext}}
+
+(Documentation for Hypertext linking will go here)
+
+
+
+
+
+
+
+%>>> EOF TXStags.doc <<<
diff --git a/Master/texmf-dist/doc/texsis/base/index.tex b/Master/texmf-dist/doc/texsis/base/index.tex
new file mode 100644
index 00000000000..dbb9a09bf13
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/index.tex
@@ -0,0 +1,296 @@
+%% file: index.tex - creating an index - TeXsis 2.18
+% @(#) $Id: index.tex,v 18.0 2000/05/16 22:37:11 myers Exp $
+%======================================================================*
+% index.tex -- Macros for creating an index using MakeIndex
+%
+% Use \index{key} or \idx{word} to make an entry in the index file
+% [\idx{word} is more or less the same as ``word\index{word}''].
+% At the end of the job the file \jobname.idx is the raw index file,
+% ready to be fed into the MakeIndex program to create the index.
+% The MakeIndex output file \jobname.ind is then fed back through TeX with
+% the output formatting macros below to print the final formatted index.
+%
+% To process the index file with MakeIndex the command is simply
+%
+% makeindex jobname.idx
+%
+% You can leave off the .idx extension for the raw file and makeindex
+% will assume it. This will produce the processed index file, called
+% \jobname.ind. To print the index you can either include it in
+% another pass of the full document with ``\input \jobname.ind'' or
+% print it separately by adding ``\input index'' to the begining of the
+% \jobname.ind file and running it through TeX.
+%
+% If you set \markindextrue then indexed words selected with \idx
+% will appear in the printed output inside a ruled box. This is
+% useful for draft copies when you are putting together the index,
+% but obviously you do not want to use it in a final copy.
+% The box does not interfere with or change the line spacing.
+%
+% These macros are completely compatible with Plain TeX, although
+% they can also be used with TeXsis (some of the macros used below
+% are a part of TeXsis). Note however that these macros support output
+% from MakeIndex in it's default LaTeX mode. You don't need a separate
+% style file for MakeIndex!
+%
+% For more information about how to make full use of MakeIndex read
+% the man page for makeindex(1) and/or the paper ``Index Preparation
+% and Processing'' by Pehong Chen and Michale A. Harrison,
+% Software: Practice and Experience, Vol 19, No. 9, Sep. 1988, pp. 897-915
+% (a copy is available at ftp://ftp.texsis.org/texsis/index/index.tex )
+%
+% It is possible to make more than one index by creating a few extra
+% macros based on the ones below. See the documentation at the end
+% of this file for details.
+%
+%======================================================================*
+% (C) Copyright 1992, 1999, 2000 by Eric Myers and Frank Paige.
+% This file is a part of TeXsis. Distribution and/or modifications
+% are allowed under the terms of the LaTeX Project Public License (LPPL).
+% See the file COPYING or ftp://ftp.texsis.org/texsis/LPPL
+%======================================================================*
+\message{- indexing macros}
+\catcode`@=11 % @ is a letter here to hide workings
+
+\newif\ifmarkindex \markindexfalse % put proof marks in text?
+\newif\ifmakeindex \makeindextrue % set false to suppress .idx output
+
+%---------------------------*
+% Index Entries:
+%
+% \idx{word} is the quickest way to make an index entry.
+% The word is put in the text and an index entry is made at the
+% same time. It is the same as typing ``word\index{word}''.
+% If \markintdextrue is selected the word appears in the text with a
+% box around it so you know it has been included in the index.
+
+
+\def\idx#1{% include a word in the index output file
+ #1\index{#1}% % put word in text and \index it
+ \ifmarkindex % proof marks?
+ \llap{\lower\jot\vbox to 0pt{\vss % box it
+ \tightboxit{\loosebox{\phantom{#1}}}}\hskip-\jot}%
+ \fi} % put a ruled box around word
+
+
+% \index{key} makes an index entry for the given key.
+% Since MakeIndex can use special characters like @ | ! and " in the key
+% we must make sure that they are printed correctly to the raw index file.
+
+\def\index{% make an index entry for a given key
+ \begingroup % turn MakeIndex special characters to letters
+ \catcode`@=11 \catcode`"=11 \catcode`!=11 \catcode`|=11 \catcode`-=11
+ \@index}
+
+\def\@index#1{% get the index entry and write it to the file
+ \endgroup % special characters back to before
+ \ifmakeindex % .idx file output enabled?
+ \indexwrite\indexout{\indexentry{#1}}% write entry to file
+ \fi}
+
+
+% \loosebox put a loose box around a box.
+% \tightboxit draws a rule box around the box #1 without any added space
+
+\def\loosebox#1{%
+ \vbox{\vskip\jot
+ \hbox{\hskip\jot #1\hskip\jot}%
+ \vskip\jot}}
+
+\def\tightboxit#1{\vbox{\hrule\hbox{\vrule\vbox{#1}\vrule}\hrule}}
+
+%---------------------------*
+% Index Formatting (printing the processed index file)
+
+
+% The index is begun by \theindex or \begin{theindex} and ended
+% with \endtheindex or \end{theindex}
+
+
+\def\theindex{% begin a formatted index
+ \begingroup
+ \parskip = 0pt % no extra space between items
+ \def\item{\indexitem{0pt}}% % level 0 item separator
+ \def\subitem{\indexitem{20pt}}% % level 1 item separator
+ \def\subsubitem{\indexitem{30pt}}% % level 2 item separator
+ \def\indexspace{\medskip}% % intergroup vertical space
+ \def\setcounter##1##2{\global\csname ##1no\endcsname=##2}% to set page counter
+ \def\bold##1{{\bf ##1}}% % boldface for |bold
+ \def\italic##1{{\it ##1}}% % italics for |italic
+ \def\slanted##1{{\sl ##1}}% % slanted for |slanted
+ \def\see##1##2{{\it see} ##1}% % italics for |see
+ \def\seealso##1{{\it see also}##1}%% italics for |seealso
+ \def\also##1{{\it see also}##1}% % italics for |also
+ }
+
+\def\indexitem#1{% how to make an entry for an item in the index
+ \vskip 0pt % force vertical mode
+ \hangindent=30pt\hangafter=1 % hanging indent for extra lines
+ \noindent\hskip #1} % level N item separator
+
+\def\endtheindex{% end a formatted index
+ \endgroup}
+
+
+% If you don't have MakeIndex you can still make a sorted index.
+% (Even though it may not look as good. If you are really going to
+% do it right, do get MakeIndex). The Unix sort(1) command or a similar
+% program can be used to sort the \jobname.idx file. You can then
+% edit the file to collect all the page numbers for a key into
+% one \indexentry, like ``\indexentry{foo}{29,47-48}'' , and \indexentry
+% will format the items as best it can.
+
+
+\def\indexentry#1#2{% prints an index entry (from the raw file)
+ \indexitem{0pt}#1, #2} % keyword, page number
+
+
+%-------------------------*
+% Simple \begin .. \end support (like in LaTeX): There is a conspiracy
+% to preserve job security for typists by making sure one has to
+% type \begin{thing} and \end{thing} everywhere. In TeXsis it's just
+% \thing and \endthing, so here we just make \begin{thing} become \thing
+% and \end{thing} become \endthing. Then we can use MakeIndex in it's
+% default mode, even though that is for LaTeX.
+% Note: we don't check that you begin and end the same thing. After all,
+% you might want to say \begin{midfigure} followed by \end{figure}.
+
+
+\def\begin#1{% \begin{foo} just becomes \foo
+ \begingroup % changes to \end are temporary
+ \let\end=\endbegin % now \end will end the \begin
+ \expandafter\ifx\csname #1\endcsname\relax\relax % is \thing defined?
+ \def\next{\beginerror{#1}}% NO: flag an error
+ \else %
+ \def\next{\csname #1\endcsname}% YES: just invoke it
+ \fi\next}
+
+\def\endbegin#1{% \end{foo} just becomes \endfoo
+ \endgroup % now \end goes back to normal
+ \expandafter\ifx\csname end#1\endcsname\relax\relax % is \endthing defined?
+ \def\next{\begingroup\beginerror{end#1}}% % NO: flag an error
+ \else %
+ \def\next{\csname end#1\endcsname}% YES: just invoke it
+ \fi\next}
+
+
+\newhelp\beginhelp{begin:
+ The \string\begin\space or \string\end\space marked above is for a^^M%
+ non-existant environment. Check for spelling errors and such.}
+
+
+\def\beginerror#1{% \begin{foo} or \end{foo} fail if no \foo or \endfoo
+ \endgroup % make sure \end is back to normal
+ \errhelp=\beginhelp % longer help message
+ \newlinechar=`\^^M % ^^M is line break
+ \errmessage{Undefined environment for \string\begin\space or \string\end}}
+
+
+%---------------------------*
+% Index file output:
+%
+
+\newwrite\indexout % raw index output file
+
+
+% \indexinit will only get called once. It opens the output file,
+% write an identifying comment to it, and then undefines itself.
+
+\def\indexinit{% open and initialize raw index file
+ \immediate\openout\indexout=\jobname.idx % open file as \jobname.idx
+ \immediate\write\indexout{\@comment Raw index file ``\jobname.idx''}%
+ \immediate\write\indexout{\@comment ====================================}%
+ \gdef\indexinit{\relax}} % so we initialize only once
+
+% \@comment is for writing % to a file. It expands to '% '.
+
+{\catcode`\%=11 \gdef\@comment{% }}
+
+
+% \indexwrite writes an entry to the raw index file named by #1. Argument
+% #2 is the \indexentry{foo}, so it is not expanded (which is why this is so
+% complicated), while \@indexpage is the page number, which *is* expanded.
+
+\def\indexwrite#1#2{% % write entry to raw index file
+ \indexinit % open output file if not already
+ \def\@finwrite{\write#1}% % to write to index output file (#1)
+ \begingroup % begin collecting tokens on stack
+ \aftergroup\@finwrite % put \write\indexout on stack
+ \aftergroup{\relax % put { on stack
+ \@stackNX#2\@endstack % puts \noexpand\token... on stack
+ \aftergroup\@indexpage % expanded {enclosed} page number
+ \aftergroup}\relax % put } on stack
+ \endgroup} % now dump from stack to \write
+
+\def\@indexpage{{\folio}} % to get the {enclosed} page number
+
+% Saying \@stackNX <stuff>\@endstack will take all the tokens
+% in <stuff> and put them on the stack, with every control sequence
+% prefaced by \noexpand. \indexwrite uses this for unexpanded write.
+
+\def\@stackNX{\futurelet\next\@stackswitch}
+
+\def\@stackswitch{% decides what to do with various types of tokens
+ \ifx\next\@endstack\relax % if \@endstack then we'll quit
+ \else\ifcat\noexpand\next\@stoken % if token is a space,
+ \aftergroup\space\let\next=\@eatnext% write \space and eat token
+ \else\ifcat\noexpand\next\bgroup % if token is \bgroup
+ \aftergroup{\let\next=\@eatnext % write { and eat it
+ \else\ifcat\noexpand\next\egroup % if token is \egroup
+ \aftergroup}\let\next=\@eatnext % write a } and eat it
+ \else % otherwize
+ \let\next=\@stacktoken % just copy to the stack with \NX
+ \fi\fi\fi\fi % end all \if's
+ \next} % do it to the token
+
+\def\\{\global\let\@stoken= }\\
+
+% \@eatnext ignores the \next token and goes on to the
+% one following in the argument list
+
+\def\@eatnext{\afterassignment\@stackNX\let\next= }
+
+% \@stacktoken copies one token to the stack with \aftergroup,
+% then calls \@stackNX to get the one following.
+
+\long\def\@stacktoken#1{% write token to stack, unexpanded
+ \ifcat\noexpand#1\relax % if token is a control sequence
+ \aftergroup\noexpand % preface with \noexpand
+ \else\ifcat\noexpand#1\noexpand~\relax % if token is an active character
+ \aftergroup\noexpand % preface with \noexpand
+ \fi\fi %
+ \aftergroup#1\relax % put the next token on the list
+ \@stackNX} % do next token from argument...
+
+\def\@endstack\@endstack{} % just marks the end of token list
+
+\catcode`@=12 % @ goes back to \other, not a letter
+
+%---------------------------*
+% MULTIPLE INDICES:
+%
+% If you want more than one index I can't guess how you will want to
+% use them, so all I can do is tell you how to use the macros above to
+% create another (or several other) additional indices:
+%
+% 1) Create another output file and open it, with something like:
+%
+% \newwrite\otherindexout
+% \immediate\openout\otherindexout=other.idx
+%
+% 2) Define a macro to make the entry to the second index, following
+% the pattern of \index and \@index above, but using the other index
+% file (but don't use @ in a macro name). For example:
+%
+% \def\OtherIndex{\begingroup % special characters letters
+% \catcode`@=11 \catcode`"=11 \catcode`!=11 \catcode`|=11
+% \catcode`-=11
+% \Oindex}
+%
+% \def\Oindex#1{\endgroup % special characters return
+% \indexwrite\otherindexout{\indexentry{#1}}}
+%
+% Then saying \OtherIndex{word} will make an entry into the alternate
+% index for ``word''.
+%
+%>>> EOF index.tex <<<
diff --git a/Master/texmf-dist/doc/texsis/base/letr b/Master/texmf-dist/doc/texsis/base/letr
new file mode 100755
index 00000000000..ad4697fc80e
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/letr
@@ -0,0 +1,230 @@
+#!/bin/sh
+#
+# letr - a Unix shell script for printing a letter with an addressed
+# envelope, using TeXsis (the TeX macros for physicists). The syntax is:
+#
+# letr [ -q ][ -Pprinter ] [ dvips flags ] [ filename ]
+#
+# where "filename" is the name for your TeX job. The TeX instructions
+# for creating your letter will be put in the file filename.tex, while
+# the instructions for creating the printed envelope will be in the
+# file filename.env. If no name is given the default is "TeXletter".
+#
+# You first edit your letter with your default EDITOR, then it is run
+# through TeXsis. You can preview the letter, and then choose whether
+# or not to print it, and whether or not to print the addressed envelope.
+#
+# Use the -q flag to bypass the editor, and -P to specify an alternate
+# printer. All other flags are passed to dvips. So, for example, if
+# you give the -m flag it will go to dvips and the letter (not just the
+# envelope) will be printed in manual feed mode, so you can put your own
+# paper in the printer for it.
+#
+# To get the envelope to print in landscape mode and with manual feed
+# we call dvips explicitly. If you need to, change the DVIPS command
+# and ENVFLAGS below to match your local site configuration.
+#
+# Eric Myers <myers@umich.edu> - 27 January 1996
+# Department of Physics, University of Michigan, Ann Arbor
+# @(#) $Id: letr,v 1.7 2000/06/01 20:02:30 myers Exp $
+######################################################################
+# Local Customization:
+
+EDITOR=${EDITOR-"emacs"} # editor (default to emacs)
+DVIVIEW=${DVIVIEW-"xdvi"} # dvi file viewer (dviview is more general)
+DVIPS=${DVIPS-"dvips -q"} # general dvips command
+ENVLFLAGS="-m -t landscape" # dvips flags for the envelope
+
+#====================(end of customization)====================*
+
+## Parse command line arguments. Unrecognized ones are saved for dvips
+
+FNAME=${FNAME-"TeXletter"} # name of file to process
+FLAGS=" " # flags to pass on to dvips
+NOEDIT=""
+
+while [ $# != 0 ]
+do case "$1" in
+ -P*) PRINTER=`echo $1 | tail +3c` # strip off the -P
+ LPDEST=$PRINTER ;;
+ -q) NOEDIT="NOEDIT" ;;
+ -*) FLAGS="$FLAGS $1" ;;
+ *) FNAME="$1" ;;
+ esac
+ shift
+done
+
+PROG=`basename $0`
+
+###############
+# Determine which printer we shall use, and how. In NeXTStep the lpr
+# command ignores the $PRINTER variable, so we will correct for that
+# here by always using `lpr -P$PRINTER`, with "Local_Printer" as the
+# default. For other Unix change default printer to 'lp'. For SYSV
+# we need to use "lp -d$LPDEST" instead.
+
+if [ -x /usr/ucb/lpr ]; then
+ if [ -x /sdmach ]; then # NeXTStep
+ PRINTER=${PRINTER-"Local_Printer"}
+ else # other BSD
+ PRINTER=${PRINTER-"lp"}
+ fi
+ # The -h option suppresses the banner page
+ LPR="/usr/ucb/lpr -h -P$PRINTER"
+fi
+
+if [ -x /usr/bin/lpr ]; then # BSD (Linux, Solaris)
+ PRINTER=${PRINTER-"lp"}
+ # The -h option suppresses the banner page
+ LPR="/usr/bin/lpr -h -P$PRINTER"
+fi
+
+if [ -x /usr/bin/lp ]; then # SYSV (eg. HP-UX)
+ LPDEST=${LPDEST-"lp"}
+ # The -onb option suppresses the banner page on HP LaserJet3/4 (and 5?)
+ LPR="/usr/bin/lp -onb -d${LPDEST} "
+fi
+
+if [ ! $?LPR ]; then
+ echo "Cannot determine lpr/lp command."
+ exit 2
+fi
+
+## Figure out line end suppression for BSD or SYSV
+
+if [ "`echo 'EC\c'; echo HO`" = "ECHO" ]; then
+ SYSVNL="\c"; BSDNL="" # System V line control
+else
+ BSDNL="-n"; SYSVNL="" # BSD line control
+fi
+
+## the function `ask_def default text` asks a question and returns
+## the user's answer, using the default if just <cr> is pressed.
+
+ask_def () {
+ DEFAULT=$1 ; shift
+ echo ${BSDNL} "$* [${DEFAULT}] ${SYSVNL}"
+ read ANS
+ if [ -z "$ANS" ]; then ANS=$DEFAULT ; fi
+ export ANS; }
+
+
+## Strip off .tex from the filename, if it is included.
+## Any trailing . is also removed (helps for tcsh filename completion).
+
+FNAME=`basename $FNAME .tex` # get just the file name, strip .tex
+FNAME=`basename $FNAME .` # get just the file name, strip "."
+
+## If the named TeX file does not exist, create it with a simple
+## TeXsis \letter template
+
+if [ ! -f ${FNAME}.tex ]; then
+cat >${FNAME}.tex <<End-of-Text
+\\texsis
+\\letter
+\\withEnvelope % if you also want to print an envelope
+\\def\\Email{}% <-- set e-mail address if you want it in the letterhead
+\\letterhead{}% <-- phone number or extension goes here
+\\address
+NAME OF ADDRESSEE HERE
+ADDRESS GOES HERE
+AS MANY LINES AS YOU NEED
+
+\\body
+Dear WHOEVER,
+
+BODY OF LETTER GOES HERE.
+
+AS MANY PARAGRAPHS AS YOU WANT.
+
+\\closing
+Sincerely,
+YOUR NAME HERE
+
+\bye
+End-of-Text
+fi
+
+
+## Edit the file with EDITOR, unless -q flag was given
+
+if [ -z "$NOEDIT" ]; then
+ if $EDITOR ${FNAME}.tex
+ then echo " "
+ else
+ echo "${PROG}: ${EDITOR} editing error ($?). Bailing out..."
+ exit 1
+ fi
+fi
+
+if [ ! -f ${FNAME}.tex ]; then exit 0 ; fi
+
+## Process through TeXsis
+
+if [ -z "$NOEDIT" ]; then
+ ask_def yes "Process file ${FNAME}.tex through TeXsis? "
+else
+ ANS="yes"
+fi
+
+case $ANS in
+ yes|Y|y|YES|Yes)
+ if texsis ${FNAME}.tex
+ then
+ echo " "
+ else
+ echo "${PROG}: TeXsis error ($?). Bailing out..."
+ exit 1
+ fi ;;
+ *) exit 0
+esac
+
+
+## Preview the .dvi file, if desired
+
+if [ -f ${FNAME}.dvi ]; then
+
+ ask_def yes "Do you want to preview the letter? "
+ case $ANS in
+ yes|Y|y|YES|Yes) echo " "
+ $DVIVIEW ${FNAME} #>/dev/null 2>&1
+ sleep 1 ;;
+ esac
+
+ echo " "
+ echo "Default printer is '${PRINTER}'."
+ ask_def yes "Do you want to print this now? "
+ case $ANS in
+ yes|Y|y|YES|Yes)
+ ${DVIPS} ${FLAGS} ${FNAME}.dvi # >/dev/null 2>&1
+ echo "Printing the letter..."
+ ${LPR} ${FNAME}.ps ;;
+ *);;
+ esac
+
+fi
+
+
+## Process envelope, if desired and it exists
+
+if [ -f ${FNAME}.env ]; then
+
+ ask_def yes "Do you want to print the envelope? "
+ case $ANS in
+ yes|Y|y|YES|Yes)
+ /bin/rm -rf ${FNAME}.dvi ${FNAME}.ps
+ texsis ${FNAME}.env
+ $DVIPS ${FLAGS} ${ENVLFLAGS} ${FNAME}.dvi ## >/dev/null 2>&1
+ echo "Printing the envelope... Please feed the printer. "
+ ${LPR} ${FNAME}.ps
+ esac
+
+else
+ echo "No envelope file ${FNAME}.env was found."
+fi
+
+# Clean up: remove .dvi file, .ps file, and .log file (but keep .env file).
+
+/bin/rm -f ${FNAME}.dvi ${FNAME}.log ${FNAME}.ps
+
+exit 0
diff --git a/Master/texmf-dist/doc/texsis/base/penguin.eps b/Master/texmf-dist/doc/texsis/base/penguin.eps
new file mode 100644
index 00000000000..af54d9dfec9
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/penguin.eps
@@ -0,0 +1,507 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Title: penguin.ps
+%%Creator: FeynDiagram 2.4 by Bill Dimm
+%%CreationDate: Dec 15 10:44
+%%For:paige paige
+%%Pages: 1
+%%DocumentFonts:
+%%BoundingBox: 100 299 513 650
+save
+countdictstack
+mark
+newpath
+/showpage {} def
+%%EndProlog
+%%Page 1 1
+%!
+% @(#) abbrev.ps 1.10@(#)
+
+/CP /charpath load def
+/CF /currentflat load def
+/CPT /currentpoint load def
+/C2 /curveto load def
+/RC2 /rcurveto load def
+/FP /flattenpath load def
+/L2 /lineto load def
+/M2 /moveto load def
+/NP /newpath load def
+/PBX /pathbbox load def
+/RM2 /rmoveto load def
+/SD /setdash load def
+/SLC /setlinecap load def
+/SLW /setlinewidth load def
+/S /show load def
+/ST /stroke load def
+
+% @(#) max.ps 1.9@(#)
+
+/max { 2 copy lt {exch} if pop } bind def
+
+% @(#) arrow.ps 1.9@(#)
+
+/tan
+ {
+ dup
+ sin exch cos div
+ } bind def
+
+/arrow_dict 12 dict def
+arrow_dict /arrow_mtrxstor matrix put
+
+/arrow
+ {
+ arrow_dict
+ begin
+
+ /alpha exch def
+ /y2 exch def
+ /x2 exch def
+ /y1 exch def
+ /x1 exch def
+
+ /arrow_oldmtrx arrow_mtrxstor currentmatrix def
+
+ /dx x2 x1 sub def
+ /dy y2 y1 sub def
+
+ /len dx dx mul dy dy mul add sqrt def
+
+ /theta 1 alpha tan atan def
+ /rad len alpha tan mul
+ theta sin alpha tan theta cos -1 add mul add div def
+
+ x1 y1 translate
+ dy dx atan rotate
+
+ len 0 M2
+ rad neg 0 rad theta 360 theta sub arcn
+ closepath
+
+ arrow_oldmtrx setmatrix
+ end
+ } bind def
+
+% @(#) text.ps 1.9@(#)
+
+/text_dict 20 dict def
+text_dict /text_mtrxstor matrix put
+
+/SF* { exch findfont exch scalefont setfont } bind def
+
+systemdict /selectfont known
+ { /SF /selectfont load def }
+ { /SF /SF* load def }
+ ifelse
+
+/txtsta
+ {
+ text_dict begin
+
+ /angle exch def
+ /y exch def
+ /x exch def
+
+ /text_oldmtrx text_mtrxstor currentmatrix def
+
+ x y translate
+ angle rotate
+ } bind def
+
+
+/txtend
+ {
+ text_oldmtrx setmatrix
+ end
+ } bind def
+
+save
+
+NP
+1.638 SLW
+1 SLC
+306 314.1 M2
+118.8 314.1 L2
+ST
+1 SLW
+0 SLC
+217.805 314.1 206.995 314.1 22 arrow
+fill
+NP
+1.638 SLW
+1 SLC
+493.2 314.1 M2
+306 314.1 L2
+ST
+1 SLW
+0 SLC
+405.005 314.1 394.195 314.1 22 arrow
+fill
+NP
+1.638 SLW
+1 SLC
+120.028 590.132 112.239 269.373 338.007 arc
+ST
+1 SLW
+0 SLC
+177.719 493.855 186.711 499.849 22 arrow
+fill
+NP
+1.638 SLW
+1 SLC
+306 560.775 82.875 188.797 351.203 arc
+ST
+NP
+1.638 SLW
+1 SLC
+491.971 590.132 112.239 201.993 270.627 arc
+ST
+1 SLW
+0 SLC
+425.289 499.849 434.281 493.855 22 arrow
+fill
+NP
+1.638 SLW
+1 SLC
+488.676 396 65.676 86.0501 273.95 arc
+ST
+1 SLW
+0 SLC
+423.222 401.399 423.222 390.601 22 arrow
+fill
+NP
+1.638 SLW
+1 SLC
+306 314.1 M2
+299.762 314.724 294.862 319.696 294.862 326.817 C2
+294.862 333.939 299.762 338.911 306 339.535 C2
+314.131 340.348 317.138 338.436 317.138 335.465 C2
+317.138 332.494 314.131 330.583 306 331.396 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 331.396 M2
+299.762 332.019 294.862 336.991 294.862 344.113 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 331.396 M2
+299.762 332.019 294.862 336.991 294.862 344.113 C2
+294.862 351.235 299.762 356.207 306 356.83 C2
+314.131 357.644 317.138 355.732 317.138 352.761 C2
+317.138 349.79 314.131 347.878 306 348.691 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 348.691 M2
+299.762 349.315 294.862 354.287 294.862 361.409 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 348.691 M2
+299.762 349.315 294.862 354.287 294.862 361.409 C2
+294.862 368.53 299.762 373.502 306 374.126 C2
+314.131 374.939 317.138 373.027 317.138 370.057 C2
+317.138 367.086 314.131 365.174 306 365.987 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 365.987 M2
+299.762 366.611 294.862 371.583 294.862 378.704 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 365.987 M2
+299.762 366.611 294.862 371.583 294.862 378.704 C2
+294.862 385.826 299.762 390.798 306 391.422 C2
+314.131 392.235 317.138 390.323 317.138 387.352 C2
+317.138 384.381 314.131 382.47 306 383.283 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 383.283 M2
+299.762 383.906 294.862 388.878 294.862 396 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 383.283 M2
+299.762 383.906 294.862 388.878 294.862 396 C2
+294.862 403.122 299.762 408.094 306 408.717 C2
+314.131 409.53 317.138 407.619 317.138 404.648 C2
+317.138 401.677 314.131 399.765 306 400.578 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 400.578 M2
+299.762 401.202 294.862 406.174 294.862 413.296 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 400.578 M2
+299.762 401.202 294.862 406.174 294.862 413.296 C2
+294.862 420.417 299.762 425.389 306 426.013 C2
+314.131 426.826 317.138 424.914 317.138 421.943 C2
+317.138 418.973 314.131 417.061 306 417.874 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 417.874 M2
+299.762 418.498 294.862 423.47 294.862 430.591 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 417.874 M2
+299.762 418.498 294.862 423.47 294.862 430.591 C2
+294.862 437.713 299.762 442.685 306 443.309 C2
+314.131 444.122 317.138 442.21 317.138 439.239 C2
+317.138 436.268 314.131 434.356 306 435.17 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 435.17 M2
+299.762 435.793 294.862 440.765 294.862 447.887 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 435.17 M2
+299.762 435.793 294.862 440.765 294.862 447.887 C2
+294.862 455.009 299.762 459.981 306 460.604 C2
+314.131 461.417 317.138 459.506 317.138 456.535 C2
+317.138 453.564 314.131 451.652 306 452.465 C2
+ST
+1 setgray
+4.914 SLW
+0 SLC
+[] 0 SD
+306 452.465 M2
+299.762 453.089 294.862 458.061 294.862 465.183 C2
+ST
+0 setgray
+1.638 SLW
+1 SLC
+306 452.465 M2
+299.762 453.089 294.862 458.061 294.862 465.183 C2
+294.862 472.304 299.762 477.276 306 477.9 C2
+ST
+NP
+1.638 SLW
+1 SLC
+224.1 548.1 M2
+235.781 550.101 236.647 553.765 227.389 561.308 C2
+218.13 568.852 220.005 573.416 231.893 572.273 C2
+243.781 571.13 245.74 574.346 239.273 584.386 C2
+232.806 594.427 236.003 598.186 246.952 593.417 C2
+257.901 588.648 260.76 591.098 257.721 602.648 C2
+254.683 614.197 258.887 616.781 267.82 608.855 C2
+276.753 600.929 280.231 602.373 280.919 614.296 C2
+281.608 626.219 286.405 627.374 292.444 617.07 C2
+298.483 606.767 302.236 607.063 306.584 618.186 C2
+310.933 629.309 315.852 628.921 318.402 617.253 C2
+320.952 605.586 324.612 604.705 332.192 613.934 C2
+339.772 623.163 344.329 621.27 343.139 609.387 C2
+341.95 597.504 345.157 595.532 355.223 601.959 C2
+365.289 608.386 369.035 605.175 364.223 594.245 C2
+359.411 583.314 361.85 580.446 373.412 583.439 C2
+384.973 586.432 387.541 582.218 379.58 573.316 C2
+371.618 564.414 373.049 560.931 384.969 560.196 C2
+396.889 559.46 398.025 554.658 387.9 548.1 C2
+ST
+114.12 477.9 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(s) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+-1 mul 2 1 roll -0.5 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+(s) S
+txtend
+114.12 314.1 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(d) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+-1 mul 2 1 roll -0.5 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+() S
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(d) true CP
+FP PBX
+7 -1 roll setflat
+4.212 add
+3 -1 roll pop dup 3 1 roll
+NP M2 1.9656 SLW
+L2 ST
+M2
+/Times-Roman 28.08 SF
+(d) S
+txtend
+324.72 396 0 txtsta
+0 0 M2
+/Times-Roman 28.08 SF
+(g) S
+txtend
+306 489.6 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(u, c, t) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+-0.5 mul 2 1 roll 0 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+(u, c, t) S
+txtend
+306 630 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(W) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+-0.5 mul 2 1 roll 0 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+(W) S
+txtend
+497.88 477.9 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(d) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+0 mul 2 1 roll -0.2 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+(d) S
+txtend
+497.88 461.52 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(u) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+0 mul 2 1 roll -0.8 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+() S
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(u) true CP
+FP PBX
+7 -1 roll setflat
+4.212 add
+3 -1 roll pop dup 3 1 roll
+NP M2 1.9656 SLW
+L2 ST
+M2
+/Times-Roman 28.08 SF
+(u) S
+txtend
+497.88 330.48 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(u) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+0 mul 2 1 roll -0.2 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+(u) S
+txtend
+497.88 314.1 0 txtsta
+0 0 M2
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(d) true CP
+FP PBX
+3 -1 roll sub
+3 1 roll sub neg
+0 mul 2 1 roll -0.8 mul
+NP
+4 2 roll M2 RM2
+setflat
+/Times-Roman 28.08 SF
+() S
+CF dup 5 mul setflat
+CPT
+/Times-Roman 28.08 SF
+(d) true CP
+FP PBX
+7 -1 roll setflat
+4.212 add
+3 -1 roll pop dup 3 1 roll
+NP M2 1.9656 SLW
+L2 ST
+M2
+/Times-Roman 28.08 SF
+(d) S
+txtend
+restore
+showpage
+%%Trailer
+cleartomark
+countdictstack exch sub { end } repeat
+restore
+%%EOF
diff --git a/Master/texmf-dist/doc/texsis/base/penguin2.eps b/Master/texmf-dist/doc/texsis/base/penguin2.eps
new file mode 100644
index 00000000000..46819fc95ef
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/penguin2.eps
@@ -0,0 +1,1041 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: Adobe Illustrator(TM) 3.2
+%%For: (Neal Tucker) (ntucker@adobe.com)
+%%Title: (penguin.eps)
+%%CreationDate: (4/29/96) (8:20 AM)
+%%BoundingBox: 4 2 221 258
+%%DocumentProcessColors: Black
+%%DocumentSuppliedResources: procset Adobe_packedarray 2.0 0
+%%+ procset Adobe_cshow 1.1 0
+%%+ procset Adobe_customcolor 1.0 0
+%%+ procset Adobe_IllustratorA_AI3 1.0 1
+%AI3_ColorUsage: Black&White
+%AI3_TemplateBox: 306 396 306 396
+%AI3_TileBox: 31 31 583 761
+%AI3_DocumentPreview: Header
+%%EndComments
+%%BeginProlog
+%%BeginResource: procset Adobe_packedarray 2.0 0
+%%Title: (Packed Array Operators)
+%%Version: 2.0
+%%CreationDate: (8/2/90) ()
+%%Copyright: ((C) 1987-1990 Adobe Systems Incorporated All Rights Reserved)
+userdict /Adobe_packedarray 5 dict dup begin put
+/initialize
+{
+/packedarray where
+ {
+ pop
+ }
+ {
+ Adobe_packedarray begin
+ Adobe_packedarray
+ {
+ dup xcheck
+ {
+ bind
+ } if
+ userdict 3 1 roll put
+ } forall
+ end
+ } ifelse
+} def
+/terminate
+{
+} def
+/packedarray
+{
+array astore readonly
+} def
+/setpacking
+{
+pop
+} def
+/currentpacking
+{
+false
+} def
+currentdict readonly pop end
+%%EndResource
+Adobe_packedarray /initialize get exec
+%%BeginResource: procset Adobe_cshow 1.1 0
+%%Title: (cshow Operator)
+%%Version: 1.1
+%%CreationDate: (1/23/89) ()
+%%Copyright: ((C) 1987-1990 Adobe Systems Incorporated All Rights Reserved)
+currentpacking true setpacking
+userdict /Adobe_cshow 3 dict dup begin put
+/initialize
+{
+/cshow where
+ {
+ pop
+ }
+ {
+ userdict /Adobe_cshow_vars 1 dict dup begin put
+ /_cshow
+ {} def
+ Adobe_cshow begin
+ Adobe_cshow
+ {
+ dup xcheck
+ {
+ bind
+ } if
+ userdict 3 1 roll put
+ } forall
+ end
+ end
+ } ifelse
+} def
+/terminate
+{
+} def
+/cshow
+{
+exch
+Adobe_cshow_vars
+ exch /_cshow
+ exch put
+ {
+ 0 0 Adobe_cshow_vars /_cshow get exec
+ } forall
+} def
+currentdict readonly pop end
+setpacking
+%%EndResource
+%%BeginResource: procset Adobe_customcolor 1.0 0
+%%Title: (Custom Color Operators)
+%%Version: 1.0
+%%CreationDate: (5/9/88) ()
+%%Copyright: ((C) 1987-1990 Adobe Systems Incorporated All Rights Reserved)
+currentpacking true setpacking
+userdict /Adobe_customcolor 5 dict dup begin put
+/initialize
+{
+/setcustomcolor where
+ {
+ pop
+ }
+ {
+ Adobe_customcolor begin
+ Adobe_customcolor
+ {
+ dup xcheck
+ {
+ bind
+ } if
+ pop pop
+ } forall
+ end
+ Adobe_customcolor begin
+ } ifelse
+} def
+/terminate
+{
+currentdict Adobe_customcolor eq
+ {
+ end
+ } if
+} def
+/findcmykcustomcolor
+{
+5 packedarray
+} def
+/setcustomcolor
+{
+exch
+aload pop pop
+4
+ {
+ 4 index mul 4 1 roll
+ } repeat
+5 -1 roll pop
+setcmykcolor
+} def
+/setoverprint
+{
+pop
+} def
+currentdict readonly pop end
+setpacking
+%%EndResource
+%%BeginResource: procset Adobe_IllustratorA_AI3 1.1 3
+%%Title: (Adobe Illustrator (R) Version 3.0 Abbreviated Prolog)
+%%Version: 1.1
+%%CreationDate: (3/7/1994) ()
+%%Copyright: ((C) 1987-1994 Adobe Systems Incorporated All Rights Reserved)
+currentpacking true setpacking
+userdict /Adobe_IllustratorA_AI3 61 dict dup begin put
+/initialize
+{
+userdict /Adobe_IllustratorA_AI3_vars 58 dict dup begin put
+/_lp /none def
+/_pf {} def
+/_ps {} def
+/_psf {} def
+/_pss {} def
+/_pjsf {} def
+/_pjss {} def
+/_pola 0 def
+/_doClip 0 def
+/cf currentflat def
+/_tm matrix def
+/_renderStart [/e0 /r0 /a0 /o0 /e1 /r1 /a1 /i0] def
+/_renderEnd [null null null null /i1 /i1 /i1 /i1] def
+/_render -1 def
+/_rise 0 def
+/_ax 0 def
+/_ay 0 def
+/_cx 0 def
+/_cy 0 def
+/_leading [0 0] def
+/_ctm matrix def
+/_mtx matrix def
+/_sp 16#020 def
+/_hyphen (-) def
+/_fScl 0 def
+/_cnt 0 def
+/_hs 1 def
+/_nativeEncoding 0 def
+/_useNativeEncoding 0 def
+/_tempEncode 0 def
+/_pntr 0 def
+/_tDict 2 dict def
+/_wv 0 def
+/Tx {} def
+/Tj {} def
+/CRender {} def
+/_AI3_savepage {} def
+/_gf null def
+/_cf 4 array def
+/_if null def
+/_of false def
+/_fc {} def
+/_gs null def
+/_cs 4 array def
+/_is null def
+/_os false def
+/_sc {} def
+/_i null def
+Adobe_IllustratorA_AI3 begin
+Adobe_IllustratorA_AI3
+ {
+ dup xcheck
+ {
+ bind
+ } if
+ pop pop
+ } forall
+end
+end
+Adobe_IllustratorA_AI3 begin
+Adobe_IllustratorA_AI3_vars begin
+newpath
+} def
+/terminate
+{
+end
+end
+} def
+/_
+null def
+/ddef
+{
+Adobe_IllustratorA_AI3_vars 3 1 roll put
+} def
+/xput
+{
+dup load dup length exch maxlength eq
+ {
+ dup dup load dup
+ length 2 mul dict copy def
+ } if
+load begin def end
+} def
+/npop
+{
+ {
+ pop
+ } repeat
+} def
+/sw
+{
+dup length exch stringwidth
+exch 5 -1 roll 3 index mul add
+4 1 roll 3 1 roll mul add
+} def
+/swj
+{
+dup 4 1 roll
+dup length exch stringwidth
+exch 5 -1 roll 3 index mul add
+4 1 roll 3 1 roll mul add
+6 2 roll /_cnt 0 ddef
+{1 index eq {/_cnt _cnt 1 add ddef} if} forall pop
+exch _cnt mul exch _cnt mul 2 index add 4 1 roll 2 index add 4 1 roll pop pop
+} def
+/ss
+{
+4 1 roll
+ {
+ 2 npop
+ (0) exch 2 copy 0 exch put pop
+ gsave
+ false charpath currentpoint
+ 4 index setmatrix
+ stroke
+ grestore
+ moveto
+ 2 copy rmoveto
+ } exch cshow
+3 npop
+} def
+/jss
+{
+4 1 roll
+ {
+ 2 npop
+ (0) exch 2 copy 0 exch put
+ gsave
+ _sp eq
+ {
+ exch 6 index 6 index 6 index 5 -1 roll widthshow
+ currentpoint
+ }
+ {
+ false charpath currentpoint
+ 4 index setmatrix stroke
+ }ifelse
+ grestore
+ moveto
+ 2 copy rmoveto
+ } exch cshow
+6 npop
+} def
+/sp
+{
+ {
+ 2 npop (0) exch
+ 2 copy 0 exch put pop
+ false charpath
+ 2 copy rmoveto
+ } exch cshow
+2 npop
+} def
+/jsp
+{
+ {
+ 2 npop
+ (0) exch 2 copy 0 exch put
+ _sp eq
+ {
+ exch 5 index 5 index 5 index 5 -1 roll widthshow
+ }
+ {
+ false charpath
+ }ifelse
+ 2 copy rmoveto
+ } exch cshow
+5 npop
+} def
+/pl
+{
+transform
+0.25 sub round 0.25 add exch
+0.25 sub round 0.25 add exch
+itransform
+} def
+/setstrokeadjust where
+ {
+ pop true setstrokeadjust
+ /c
+ {
+ curveto
+ } def
+ /C
+ /c load def
+ /v
+ {
+ currentpoint 6 2 roll curveto
+ } def
+ /V
+ /v load def
+ /y
+ {
+ 2 copy curveto
+ } def
+ /Y
+ /y load def
+ /l
+ {
+ lineto
+ } def
+ /L
+ /l load def
+ /m
+ {
+ moveto
+ } def
+ }
+ {
+ /c
+ {
+ pl curveto
+ } def
+ /C
+ /c load def
+ /v
+ {
+ currentpoint 6 2 roll pl curveto
+ } def
+ /V
+ /v load def
+ /y
+ {
+ pl 2 copy curveto
+ } def
+ /Y
+ /y load def
+ /l
+ {
+ pl lineto
+ } def
+ /L
+ /l load def
+ /m
+ {
+ pl moveto
+ } def
+ }ifelse
+/d
+{
+setdash
+} def
+/cf {} def
+/i
+{
+dup 0 eq
+ {
+ pop cf
+ } if
+setflat
+} def
+/j
+{
+setlinejoin
+} def
+/J
+{
+setlinecap
+} def
+/M
+{
+setmiterlimit
+} def
+/w
+{
+setlinewidth
+} def
+/H
+{} def
+/h
+{
+closepath
+} def
+/N
+{
+_pola 0 eq
+ {
+ _doClip 1 eq {clip /_doClip 0 ddef} if
+ newpath
+ }
+ {
+ /CRender {N} ddef
+ }ifelse
+} def
+/n
+{N} def
+/F
+{
+_pola 0 eq
+ {
+ _doClip 1 eq
+ {
+ gsave _pf grestore clip newpath /_lp /none ddef _fc
+ /_doClip 0 ddef
+ }
+ {
+ _pf
+ }ifelse
+ }
+ {
+ /CRender {F} ddef
+ }ifelse
+} def
+/f
+{
+closepath
+F
+} def
+/S
+{
+_pola 0 eq
+ {
+ _doClip 1 eq
+ {
+ gsave _ps grestore clip newpath /_lp /none ddef _sc
+ /_doClip 0 ddef
+ }
+ {
+ _ps
+ }ifelse
+ }
+ {
+ /CRender {S} ddef
+ }ifelse
+} def
+/s
+{
+closepath
+S
+} def
+/B
+{
+_pola 0 eq
+ {
+ _doClip 1 eq
+ gsave F grestore
+ {
+ gsave S grestore clip newpath /_lp /none ddef _sc
+ /_doClip 0 ddef
+ }
+ {
+ S
+ }ifelse
+ }
+ {
+ /CRender {B} ddef
+ }ifelse
+} def
+/b
+{
+closepath
+B
+} def
+/W
+{
+/_doClip 1 ddef
+} def
+/*
+{
+count 0 ne
+ {
+ dup type (stringtype) eq {pop} if
+ } if
+_pola 0 eq {newpath} if
+} def
+/u
+{} def
+/U
+{} def
+/q
+{
+_pola 0 eq {gsave} if
+} def
+/Q
+{
+_pola 0 eq {grestore} if
+} def
+/*u
+{
+_pola 1 add /_pola exch ddef
+} def
+/*U
+{
+_pola 1 sub /_pola exch ddef
+_pola 0 eq {CRender} if
+} def
+/D
+{pop} def
+/*w
+{} def
+/*W
+{} def
+/`
+{
+/_i save ddef
+6 1 roll 4 npop
+concat pop
+userdict begin
+/showpage {} def
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[] 0 setdash
+/setstrokeadjust where {pop false setstrokeadjust} if
+newpath
+0 setgray
+false setoverprint
+} def
+/~
+{
+end
+_i restore
+} def
+/O
+{
+0 ne
+/_of exch ddef
+/_lp /none ddef
+} def
+/R
+{
+0 ne
+/_os exch ddef
+/_lp /none ddef
+} def
+/g
+{
+/_gf exch ddef
+/_fc
+{
+_lp /fill ne
+ {
+ _of setoverprint
+ _gf setgray
+ /_lp /fill ddef
+ } if
+} ddef
+/_pf
+{
+_fc
+fill
+} ddef
+/_psf
+{
+_fc
+ashow
+} ddef
+/_pjsf
+{
+_fc
+awidthshow
+} ddef
+/_lp /none ddef
+} def
+/G
+{
+/_gs exch ddef
+/_sc
+{
+_lp /stroke ne
+ {
+ _os setoverprint
+ _gs setgray
+ /_lp /stroke ddef
+ } if
+} ddef
+/_ps
+{
+_sc
+stroke
+} ddef
+/_pss
+{
+_sc
+ss
+} ddef
+/_pjss
+{
+_sc
+jss
+} ddef
+/_lp /none ddef
+} def
+/k
+{
+_cf astore pop
+/_fc
+{
+_lp /fill ne
+ {
+ _of setoverprint
+ _cf aload pop setcmykcolor
+ /_lp /fill ddef
+ } if
+} ddef
+/_pf
+{
+_fc
+fill
+} ddef
+/_psf
+{
+_fc
+ashow
+} ddef
+/_pjsf
+{
+_fc
+awidthshow
+} ddef
+/_lp /none ddef
+} def
+/K
+{
+_cs astore pop
+/_sc
+{
+_lp /stroke ne
+ {
+ _os setoverprint
+ _cs aload pop setcmykcolor
+ /_lp /stroke ddef
+ } if
+} ddef
+/_ps
+{
+_sc
+stroke
+} ddef
+/_pss
+{
+_sc
+ss
+} ddef
+/_pjss
+{
+_sc
+jss
+} ddef
+/_lp /none ddef
+} def
+/x
+{
+/_gf exch ddef
+findcmykcustomcolor
+/_if exch ddef
+/_fc
+{
+_lp /fill ne
+ {
+ _of setoverprint
+ _if _gf 1 exch sub setcustomcolor
+ /_lp /fill ddef
+ } if
+} ddef
+/_pf
+{
+_fc
+fill
+} ddef
+/_psf
+{
+_fc
+ashow
+} ddef
+/_pjsf
+{
+_fc
+awidthshow
+} ddef
+/_lp /none ddef
+} def
+/X
+{
+/_gs exch ddef
+findcmykcustomcolor
+/_is exch ddef
+/_sc
+{
+_lp /stroke ne
+ {
+ _os setoverprint
+ _is _gs 1 exch sub setcustomcolor
+ /_lp /stroke ddef
+ } if
+} ddef
+/_ps
+{
+_sc
+stroke
+} ddef
+/_pss
+{
+_sc
+ss
+} ddef
+/_pjss
+{
+_sc
+jss
+} ddef
+/_lp /none ddef
+} def
+/A
+{
+pop
+} def
+currentdict readonly pop end
+setpacking
+/annotatepage
+{
+} def
+%%EndResource
+%%EndProlog
+%%BeginSetup
+Adobe_cshow /initialize get exec
+Adobe_customcolor /initialize get exec
+Adobe_IllustratorA_AI3 /initialize get exec
+%%EndSetup
+0 A
+u
+*u
+0 O
+0 g
+0 i
+0 J 0 j 1 w 4 M []0 d
+%AI3_Note:
+0 D
+74.8907 215.0693 m
+74.041 243.9622 85.304 256.7226 108.6809 257.1476 c
+132.0577 257.5727 146.7214 245.2467 149.6966 229.0954 c
+152.6719 212.9441 150.9717 191.6925 156.9222 180.6416 c
+162.8727 169.5907 166.698 161.09 176.8988 148.339 c
+187.0996 135.588 193.4751 122.6245 196.4503 106.8983 c
+199.4255 91.172 201.1257 83.7339 193.4751 75.6583 c
+185.8245 67.5827 172.2234 54.4066 162.0226 69.2828 c
+156.9158 76.7302 156.362 85.9914 164.9978 87.9843 c
+170.5233 89.2594 174.4902 88.8343 178.5989 86.7092 c
+182.7076 84.584 183.6993 85.5757 178.7406 89.2594 c
+173.7819 92.943 172.7901 89.5427 174.4902 95.4932 c
+176.1904 101.4437 178.4436 112.1015 173.7682 123.8608 c
+171.6149 129.2767 164.3121 144.122 157.4349 147.7774 C
+156.799 148.1155 154.9871 148.8579 156.2138 147.3473 c
+158.0807 145.0483 167.9587 130.4785 170.7682 121.7774 c
+173.7716 112.4762 174.2069 103.5688 172.6484 97.9017 c
+171.09 92.2346 168.3981 89.9678 165.1395 89.9678 c
+161.8809 89.9678 158.9057 88.4093 158.9057 95.9182 c
+158.9057 103.4272 159.6849 114.7614 155.6471 124.3246 c
+151.6093 133.8879 146.7214 140.4759 145.6588 144.5137 c
+144.5962 148.5515 142.2585 159.3899 137.3706 165.5529 c
+132.4828 171.7159 130.3576 175.7537 132.9078 182.7667 c
+135.458 189.7798 133.5453 191.6925 128.4449 193.1801 c
+123.3445 194.6677 116.544 196.7929 114.8439 200.1931 c
+113.1437 203.5934 114.2063 210.3939 118.0316 212.0941 c
+121.8569 213.7942 128.2324 211.4565 128.4449 206.5686 c
+128.6575 201.6807 126.3198 199.1305 126.9573 198.068 c
+127.5949 197.0054 130.9951 195.3052 132.6953 197.2179 c
+134.3954 199.1305 134.8204 205.081 133.1203 210.6064 c
+131.4202 216.1319 130.5701 219.9572 124.4071 221.2323 c
+118.2441 222.5074 115.4814 222.0823 112.5062 218.257 c
+109.531 214.4317 108.2559 208.2688 109.1059 203.8059 c
+109.956 199.3431 108.2559 201.8933 105.2806 202.1058 c
+102.3054 202.3183 103.1555 202.5308 100.1802 202.3183 c
+97.205 202.1058 98.2676 204.0184 98.055 207.2062 c
+97.8425 210.3939 97.4175 216.9819 92.9546 219.5321 c
+88.4918 222.0823 80.8412 219.1071 81.0537 208.4813 c
+81.2662 197.8554 84.879 192.755 87.0042 196.5803 c
+89.1293 200.4056 88.0668 198.493 85.9416 200.1931 c
+83.8164 201.8933 82.3288 208.9063 84.6665 211.0315 c
+87.0042 213.1566 89.7669 213.1566 91.2545 211.8815 c
+92.7421 210.6064 95.0798 206.3561 94.6548 203.5934 c
+94.2297 200.8307 94.0172 200.6182 91.2545 198.7055 c
+88.4918 196.7929 87.4292 195.0927 84.2415 192.9676 c
+81.0537 190.8424 79.7786 185.9545 82.3288 184.6794 c
+84.879 183.4043 85.0915 183.6168 87.2167 180.4291 c
+89.3419 177.2413 92.9546 175.7537 101.8804 177.2413 c
+110.8061 178.7289 114.472 180.8449 121.2194 183.1918 c
+126.1073 184.8919 124.4071 184.6794 126.1073 186.5921 c
+127.8074 188.5047 130.5701 185.742 128.0199 184.0419 c
+125.4697 182.3417 119.7318 180.6416 115.4814 179.154 c
+111.2311 177.6663 106.3432 173.416 97.4175 173.841 c
+88.4918 174.2661 94.6548 174.0536 91.8921 174.2661 c
+89.1293 174.4786 87.8542 174.0536 90.8295 171.9284 c
+93.8047 169.8032 93.5922 169.1657 96.1424 168.3156 c
+98.6926 167.4655 102.0929 167.4655 106.1307 168.9532 c
+110.1685 170.4408 120.3693 174.9036 123.5571 177.0288 c
+126.7448 179.154 129.295 176.3912 126.1073 174.2661 c
+122.9195 172.1409 122.0694 172.7785 119.0942 170.8658 c
+116.119 168.9532 110.5935 165.7654 106.9808 162.3651 c
+103.368 158.9649 102.5179 158.7523 98.055 158.5398 c
+93.5922 158.3273 90.8295 163.0027 88.9168 165.1278 c
+87.0042 167.253 87.2167 168.5281 84.879 171.0783 c
+82.5413 173.6285 82.3288 172.991 81.9038 170.2283 c
+81.4787 167.4655 78.291 160.4525 75.5283 155.7771 c
+72.7655 151.1017 72.553 145.3638 72.9781 141.326 c
+73.4031 137.2882 72.3405 136.8631 69.1528 132.1878 c
+65.965 127.5124 60.6521 113.6988 59.802 109.2359 c
+58.952 104.7731 57.8894 95.6349 58.3144 90.3219 c
+58.7394 85.009 57.2518 83.9464 53.4265 87.5592 c
+49.6012 91.172 48.3261 95.2098 48.5386 100.5227 c
+48.7204 105.068 49.3516 108.2774 49.9349 109.9441 c
+50.5182 111.6108 49.9557 112.7983 48.7512 110.7236 c
+46.1324 106.2131 45.9884 98.3976 46.626 95.6349 c
+47.2635 92.8721 47.4761 87.9843 54.4891 81.3962 c
+61.5022 74.8082 71.703 65.67 80.2036 59.507 c
+88.7043 53.344 91.6795 45.6934 79.141 40.168 C
+87.0042 29.5421 91.2545 24.0167 87.8542 17.0037 C
+94.8673 21.0415 92.1685 30.5606 88.7682 33.1108 c
+85.368 35.661 87.4292 37.6178 90.4044 35.7051 c
+93.3797 33.7925 94.4423 29.9672 106.1307 30.1797 c
+117.8191 30.3922 130.4218 31.5766 137.4349 41.7774 c
+144.4479 51.9783 145.8017 43.3946 144.1016 37.4441 c
+142.4014 31.4936 138.2207 18.0662 144.8087 19.3413 C
+145.6588 27.2045 147.5715 34.005 147.5715 42.5057 c
+147.5715 51.0063 148.4349 55.1108 147.7682 67.4441 c
+147.1259 79.3277 152.2468 80.1211 157.5597 80.1211 c
+162.8727 80.1211 161.1725 76.7209 157.7723 76.9334 c
+154.372 77.1459 150.7592 75.8708 150.5467 67.1576 c
+150.3342 58.4444 150.5467 59.2945 152.0343 51.4314 c
+153.5219 43.5682 153.7344 41.2306 152.4593 32.5174 c
+151.1842 23.8042 150.1217 19.1288 155.8596 13.8159 c
+161.5976 8.503 170.3108 9.9906 174.7736 13.3909 c
+179.2365 16.7911 187.7371 24.6543 195.3877 27.2045 c
+203.0383 29.7547 211.114 31.6673 215.3643 35.9176 c
+219.6147 40.168 218.5521 43.1432 214.0892 45.4809 c
+209.6264 47.8186 205.376 46.756 201.9757 50.5813 c
+198.5755 54.4066 196.8753 62.9073 198.1504 67.3701 c
+199.4255 71.833 200.9132 69.9203 200.9132 66.7326 c
+200.9132 63.5448 201.1257 60.5696 204.3134 56.5318 c
+207.5012 52.494 210.4764 50.5813 215.5768 47.3936 c
+220.6772 44.2058 223.865 39.1054 217.4895 34.6425 c
+211.114 30.1797 207.5012 27.6295 202.1883 25.5043 c
+196.8753 23.3792 188.1622 18.2788 182.8492 12.9658 c
+177.5363 7.6529 174.5611 2.9776 164.1478 2.9776 c
+153.7344 2.9776 148.9787 5.4759 145.8713 11.6907 c
+143.7462 15.9411 142.6836 15.3035 137.7957 15.516 c
+132.9078 15.7286 116.544 15.9411 103.793 15.7286 c
+91.042 15.516 86.7917 13.3909 81.0537 8.7155 c
+75.3157 4.0401 73.1906 0.4273 62.3522 4.0401 c
+51.5139 7.6529 45.7759 11.6907 29.6246 14.8785 c
+13.4734 18.0662 22.1865 16.5786 12.4108 18.7038 c
+2.635 20.829 3.2726 25.5043 4.5477 29.3296 c
+5.8228 33.1549 9.0105 39.1054 6.2478 46.9685 c
+3.4851 54.8316 4.5477 62.9073 11.9857 62.9073 c
+19.4238 62.9073 26.4369 61.4197 29.4121 71.1954 c
+32.3874 80.9712 33.2374 73.3206 32.3874 70.7704 c
+31.5373 68.2202 31.1123 61.2071 24.5242 60.1446 c
+17.9362 59.082 16.4486 60.5696 12.4108 60.5696 c
+8.373 60.5696 6.6728 57.8069 8.798 53.1315 c
+10.9232 48.4561 13.2608 43.5682 12.8358 39.5304 c
+12.4108 35.4926 11.9857 34.005 9.0105 30.1797 c
+6.0353 26.3544 6.4603 24.4417 11.7732 23.1666 c
+17.0861 21.8915 26.6494 19.3413 35.5751 17.2162 c
+44.5008 15.091 45.1384 15.091 60.6521 11.0532 c
+76.1658 7.0154 80.4161 14.2409 81.6912 22.9541 c
+82.9664 31.6673 77.0159 39.9555 71.4904 48.2436 c
+65.965 56.5318 60.0145 66.095 52.789 74.8082 c
+45.5634 83.5214 41.3131 84.159 37.7003 82.2463 c
+34.0875 80.3337 33.4499 80.7587 33.2374 85.6466 c
+33.0249 90.5345 32.5999 93.7222 36.6377 100.9478 c
+40.6755 108.1734 44.2883 116.0365 48.5386 128.1499 c
+52.789 140.2634 56.6143 142.6011 63.8398 153.0144 c
+71.0654 163.4277 67.8777 159.3899 72.9781 166.4029 c
+78.0785 173.416 76.5908 172.1409 76.1658 183.1918 c
+75.7408 194.2427 75.3157 200.6182 74.8907 215.0693 c
+f
+1 D
+54.5971 128.6793 m
+55.6961 127.3382 57.2428 130.4814 58.871 131.6548 c
+60.3363 132.9959 60.9469 134.8818 60.6213 136.7258 c
+60.4584 137.7316 58.8303 137.3963 58.5046 137.0611 c
+57.5278 136.0552 57.7262 134.4523 57.0393 133.0378 c
+56.2252 131.3615 53.498 130.0204 54.5971 128.6793 c
+f
+145.951 173.0707 m
+148.2714 171.137 149.6701 169.4579 150.9452 172.3269 c
+152.2203 175.1958 152.2203 176.3647 149.1388 177.5335 c
+146.0573 178.7024 144.6759 179.9775 143.2946 181.5713 c
+141.9132 183.1652 141.4224 180.4368 142.5507 177.746 c
+143.9321 174.452 144.7375 174.0819 145.951 173.0707 c
+f
+98.0873 199.4234 m
+96.4935 199.7421 94.5808 199.6359 93.5182 198.3608 c
+93.0932 197.9357 93.3057 196.7669 94.0495 196.4481 c
+95.0058 196.0231 95.6434 196.9794 95.8559 197.7232 c
+95.9622 198.042 96.0684 198.467 96.3872 198.5733 c
+96.8122 198.7858 97.4336 198.6093 97.8748 198.7858 c
+98.4061 198.9983 98.1936 199.4234 98.0873 199.4234 c
+f
+105.5994 199.1305 m
+106.2369 198.1742 107.4058 198.1742 108.3621 197.7492 c
+108.8934 197.5367 109.956 197.2179 110.2748 197.9617 c
+111.0186 200.2994 107.8346 199.5556 106.3432 199.5556 c
+106.0244 199.5556 105.2806 199.6618 105.5994 199.1305 c
+f
+121.1016 209.4441 m
+122.5269 209.3691 124.5182 206.7774 124.7124 203.8036 c
+124.7431 203.3336 125.9489 203.3623 126.2015 203.838 c
+126.8964 205.0116 126.4187 206.3414 126.0992 207.7666 c
+125.8436 208.9067 124.4549 210.1084 123.2792 210.6309 c
+122.4954 211.0229 121.7116 211.1535 120.6665 211.0229 c
+120.4052 210.8922 119.5182 209.5274 121.1016 209.4441 c
+f
+89.4377 210.1679 m
+88.1053 210.0672 88.5823 209.0454 88.6441 208.2274 C
+90.4855 207.1912 90.6621 204.8539 91.0372 203.0018 c
+91.0901 202.3005 92.1243 202.6138 92.2235 202.8563 c
+93.0524 204.3294 92.0434 206.0161 91.6772 207.7514 c
+91.3728 208.6687 90.7674 209.6807 89.8964 210.3201 c
+89.7707 210.4281 89.5546 210.1767 89.4377 210.1679 c
+f
+130.0182 242.7358 m
+128.7024 243.8124 126.6432 244.2358 126.0182 242.4858 c
+125.3932 240.9858 125.6432 239.4858 125.2682 237.8608 c
+125.2682 237.3608 124.6432 237.2358 124.2682 236.7358 c
+123.7682 236.1108 123.8932 235.3608 124.1432 235.1108 c
+125.3932 233.8608 127.6432 236.3608 129.2682 237.2358 c
+130.5182 237.9858 132.2682 236.9858 133.6432 237.8608 c
+134.0182 238.1108 134.1432 238.7358 133.7682 239.2358 c
+132.8932 240.7358 131.3932 241.6108 130.0182 242.7358 c
+f
+*U
+0 D
+168.2848 73.7743 m
+168.5016 74.6532 168.9399 76.3409 169.7682 76.6108 c
+170.0768 76.7112 170.3298 76.5961 170.4302 76.2876 c
+170.6103 75.7354 170.0485 72.6062 170.2761 71.9079 c
+170.5247 71.1445 171.3895 71.2465 172.023 71.4529 c
+173.4685 71.9237 174.2959 73.6304 174.2429 73.7927 c
+174.2219 73.8576 174.1949 73.8848 174.1464 73.869 c
+173.9189 73.7949 173.7245 73.013 173.0585 72.7962 c
+172.6525 72.6638 172.3397 72.7417 172.2023 73.164 c
+172.0594 73.6024 172.6218 76.8395 172.3784 77.5868 c
+172.1352 78.3338 171.3801 78.5011 170.698 78.2789 c
+169.1062 77.7604 168.4145 75.3615 168.0211 73.922 C
+167.9833 73.9276 L
+168.1952 77.2482 L
+166.2463 76.6135 L
+166.145 69.7539 L
+167.9804 70.3516 L
+168.0209 71.5506 168.0627 72.9115 168.2848 73.7743 c
+f
+176.8278 73.0178 m
+178.4034 73.5309 179.1132 75.4328 179.0445 75.644 c
+179.0232 75.709 178.9751 75.7472 178.9263 75.7312 c
+178.7964 75.6889 178.4863 74.6 177.593 74.309 c
+177.2032 74.182 176.8475 74.2816 176.7627 74.5416 c
+176.6359 74.9313 176.7162 75.6223 176.7309 76.1839 C
+176.7792 79.2896 L
+178.9394 79.993 L
+178.9284 80.7439 L
+176.7519 80.0351 L
+176.8533 82.9783 L
+174.9009 81.8573 L
+174.8182 75.3274 L
+174.8024 74.6037 174.7658 73.9989 174.8716 73.6741 c
+175.1466 72.8296 176.0159 72.7535 176.8278 73.0178 c
+f
+U
+%%PageTrailer
+gsave annotatepage grestore showpage
+%%Trailer
+Adobe_IllustratorA_AI3 /terminate get exec
+Adobe_customcolor /terminate get exec
+Adobe_cshow /terminate get exec
+Adobe_packedarray /terminate get exec
+%%EOF
diff --git a/Master/texmf-dist/doc/texsis/base/texsis.1 b/Master/texmf-dist/doc/texsis/base/texsis.1
new file mode 100644
index 00000000000..241319867b8
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/texsis.1
@@ -0,0 +1,219 @@
+.\" Unix Manual Pages for TeXsis, the TeX macros for physicists
+.\"======================================================================
+.\" (C) Copyright 1991,1994,2000 by Eric Myers and Frank Paige.
+.\" This file is a part of TeXsis. Distribution and/or modifications
+.\" are allowed under the terms of the LaTeX Project Public License (LPPL).
+.\" See the file COPYING or ftp://feynman.physics.lsa.umich.edu/texsis/LPPL
+.\"======================================================================
+.\" To view this file without the man command type:
+.\" 'nroff -man texsis.1 | more'
+.\" or, on some versions of man, just man -l texsis.1
+.\"
+.\" @(#) $Id: texsis.1,v 18.0 2000/05/17 00:52:43 myers Exp $
+.TH TEXSIS 1 "16 May 2000" "TeXsis 2.18" "User Manuals"
+.SH NAME
+TeXsis \- TeX macros for Physicists
+
+.SH SYNOPSIS
+.B texsis
+[ filename ]
+
+.SH DESCRIPTION
+.B TeXsis
+is a collection of
+.B TeX
+macros for typesetting physics documents such as papers and preprints,
+conference proceedings, books, theses, referee reports, letters, and
+memos.
+.B TeXsis
+macros provide automatic numbering of equations, automatic
+numbering and formatting of references, double column formatting, macros
+for making tables and figures, with or without captions, including
+tables with horizontal and vertical rules.
+.B TeXsis
+supports a wide variety of type sizes and a number of
+specialized document formats, and it even includes macros for making
+form letters for job applications or letters of recommendation.
+.PP
+TeXsis is an extension of "plain" TeX, so anything you know how to do
+in plain TeX you can do in TeXsis.
+TeXsis macro instructions are simply abbreviations for often used
+combinations of control sequences used to typeset physics documents.
+For more information about plain TeX see the man pages for
+.BR tex (1),
+and/or
+.I The TeXbook,
+by D.E. Knuth.
+.PP
+TeXsis is stored as a pre-loaded format so that it loads quickly (see
+the man pages for
+.BR initex (1),
+and/or "preloaded formats" in
+.I The TeXbook
+).
+To run TeXsis simply give the command
+.B texsis
+in place of the
+.B tex
+command, i.e.
+.br
+.sp
+.in +2
+.B texsis
+[ filename ]
+.in -2
+.br
+.sp
+where
+.I filename.tex
+is the name of a file containing TeX and/or TeXsis
+\\controlsequences.
+.PP
+TeXsis is initally in plain TeX mode, i.e. 10pt type and singlespaced,
+but the control sequence \\texsis selects 12pt type, doublespacing,
+and enables other useful features.
+Alternatively, \\paper turns on these features and sets things up to
+typeset a paper, \\thesis does the same for typesetting a thesis,
+\\letter is used to produce a letter using macros similar to those
+listed in the back of
+.I The TeXbook,
+\\memo gives a setup for producing memoranda, and so on.
+.PP
+A manual which describes all of the TeXsis macro instructions is
+available.
+It is written in TeXsis, so it serves as its own example of how to
+write a document with TeXsis.
+The source code is also heavily commented, so it is possible to
+extract useful macros from the source code and modify them to suit
+your own purposes.
+Provisions are made for local customization of TeXsis.
+In particular, the file
+.I TXSmods.tex,
+if it exists, is read from the current directory or from the path
+.B TEXINPUTS
+whenever TeXsis is started.
+You can therefore put your own custom macros for a given project in a
+directory and they will automatically be loaded when TeXsis is run
+from that directory.
+
+.SH INSTALLATION
+There is an appendix to the printed manual containing detailed
+installation instructions, but they are also provided in a form which
+can be processed by plain TeX, in the file
+.I Install.tex.
+
+.SH DIAGNOSTICS
+TeXsis informational messages are written to the terminal and the log
+file begining with `% '.
+Warning and error messages begin with `> '.
+
+.SH FILES
+The source files for TeXsis and the TeXsis manual are usually installed
+in the same place the rest of TeX is kept.
+Although this may vary from intallation to installation, it will
+generally include a root directory named
+.I texmf.
+Common examples are
+.I /usr/share/texmf/,
+.I /usr/lib/teTeX/texmf,
+or
+.I /usr/local/lib/texmf.
+Filenames here are relative to this
+.I texmf
+root directory.
+.br
+.TP 2.5i
+.I web2c/texsis.fmt
+TeXsis pre-loaded format.
+.TP
+.I tex/texsis/TXS*.tex
+TeXsis source code.
+.TP
+.I tex/texsis/*.txs
+"Style" files which can be read in at run time for special document
+formats.
+.TP
+.I doc/texsis/TXS*.doc
+Source for the printed TeXsis manual (written in TeXsis).
+.TP
+.I tex/texsis/TXSsite.tex
+Local site customization instructions
+(this is read only once, when the format file is created).
+.TP
+.I tex/texsis/TXSpatch.tex
+Run time patch file (like a system TeXsis.rc file, it is read
+every time TeXsis is run).
+.TP
+.I TXSmods.tex
+Run time init file (this is read every time TeXsis is run from the
+current directory, or from the search path in
+.B TEXINPUTS
+).
+
+.SH RESTRICTIONS
+Please note that TeXsis is designed to be completely compatible with
+plain TeX.
+As a result it cannot be compatible with LaTeX.
+.PP
+Having the full manual written in TeXsis can cause a problem if you
+don't have a version of TeXsis already running.
+To get around this you can run
+.I Manual.tex
+through plain TeX and it will load the TeXsis files before processing
+the manual.
+This takes longer, but not by much.
+
+
+.SH BUGS
+Please report bugs (or suggestions for improvements) to
+texsis@feynman.physics.lsa.umich.edu.
+.PP
+Patchs to correct small problems or make small improvements
+are available at
+
+ ftp://feynman.physics.lsa.umich.edu/texsis/
+
+in the file
+.I TXSpatch.tex
+(If that file doesn't exist then there are no current patches.)
+
+.SH SEE ALSO
+.BR initex (1),
+.BR tex (1),
+.BR virtex (1)
+.br
+Donald E. Knuth,
+.I The TeXbook;
+.br
+Michael Doob,
+.I A Gentle Introduction to TeX.
+
+.SH AUTHORS
+Eric Myers <myers@umich.edu>
+.br
+Department of Physics
+.br
+University of Michigan
+.br
+Ann Arbor, Michigan USA
+.sp 1
+and
+.sp 1
+Frank E. Paige <paige@bnl.gov>
+.br
+Physics Department
+.br
+Brookhaven National Laboratory
+.br
+Upton, New York 11973 USA
+.fi
+
+.SH VERSION
+.de VL
+\\$2
+..
+Revision Number: 2.18/beta3
+.br
+Release Date: 16 May 2000
+
+.end
diff --git a/Master/texmf-dist/doc/texsis/base/texsis.el b/Master/texmf-dist/doc/texsis/base/texsis.el
new file mode 100644
index 00000000000..41e251e31b0
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/texsis.el
@@ -0,0 +1,46 @@
+;; file: texsis.el (TeXsis version 2.18)
+;; @(#) $Revision: 18.3 $ / $Date: 1998/09/26 23:57:01 $ / $Author: myers $
+;;======================================================================*
+; GNU emacs support for TeXsis (A TeX macro package for Physicists)
+;
+; The function texsis-mode makes TeXsis the version of TeX run by the
+; commands TeX-buffer and TeX-region. If the mode is not already
+; "TeX" then plain-tex-mode is invoked first.
+;
+; The function look-for-texsis looks for "\texsis" (or actually, just
+; the word "texsis") and sets texsis-mode if such is found. Put this
+; in your TeX-mode-hook to automatically set texsis-mode for TeXsis files.
+;
+; This file is a part of TeXsis.
+;
+; Eric Myers, University of Texas at Austin, 22 September 1990
+; (with help from lion@navier.stanford.edu -- thanks, leo.)
+;======================================================================*
+
+(defun look-for-texsis ()
+ "search for \"texsis\" within first 256 characters of the file.
+If found, turn on texsis-mode."
+ (goto-char (point-min))
+ (if (search-forward "texsis" (min (point-max) (+ (point-min) 255)) t)
+ (texsis-mode))
+)
+
+
+(defun texsis-mode () "TeX mode for processing TeXsis files."
+ (if (or (equal mode-name "TeX") (equal mode-name "TeXsis") )
+ (progn
+ (setq TeX-command "texsis") ;; emacs 18.xx
+ (setq tex-command "texsis") ;; emacs 19.xx
+ (setq mode-name "TeXsis") ;; mode name is TeXsis
+ (goto-char (point-min))
+ (message "TeXsis mode.")
+ )
+
+ ;; if not a TeX mode then first invoke plain-tex-mode
+
+ (progn
+ (plain-tex-mode)
+ (if (not (equal mode-name "TeXsis")) (texsis-mode) )
+ )
+ )
+) \ No newline at end of file
diff --git a/Master/texmf-dist/doc/texsis/base/texsis.lsm b/Master/texmf-dist/doc/texsis/base/texsis.lsm
new file mode 100644
index 00000000000..44dcd8d9f95
--- /dev/null
+++ b/Master/texmf-dist/doc/texsis/base/texsis.lsm
@@ -0,0 +1,46 @@
+Begin3
+Title: TeXsis - TeX Macros for Physicists
+
+Version: 2.18
+
+Description: A collection of TeX macros for typesetting many kinds
+ of documents used by physicists, including research
+ papers, preprints and ``e-prints,'' conference
+ proceedings, theses, books, referee reports, letters,
+ and memoranda. Provides for automatic numbering of
+ equations, automatic numbering and formatting of
+ references, double column formatting, macros for
+ making tables and figures, with or without captions,
+ and including tables with horizontal and vertical
+ rules. Supports a wide variety of type sizes and a
+ number of specialized document formats, and it even
+ includes macros for making form letters for job
+ applications or letters of recommendation.
+
+Keywords: plain tex, physics, macros
+
+Author: Eric Myers <myers@umich.edu> and
+ Frank E. Paige <paige@bnl.gov>
+
+Maintained-by: texsis@umich.edu
+
+Primary-site: http://www.texsis.org/
+
+Alternate-site: mirrored by CTAN (Common TeX Archive Network)
+
+Platform: Any implementation of Plain TeX
+
+Copying-policy: Versions previous to 2.18 were marked "academic use only",
+ but version 2.18 is covered by the LaTeX project
+ Public License (LPPL)
+
+End3
+
+
+
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/xmltex/base/englishutf16.xml b/Master/texmf-dist/doc/xmltex/base/englishutf16.xml
new file mode 100644
index 00000000000..c51d565faf7
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/base/englishutf16.xml
Binary files differ
diff --git a/Master/texmf-dist/doc/xmltex/base/russianutf8.xml b/Master/texmf-dist/doc/xmltex/base/russianutf8.xml
new file mode 100644
index 00000000000..735c9151641
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/base/russianutf8.xml
@@ -0,0 +1,7 @@
+<документ атт="руÑÑкий" >
+ <раздел>
+ <голова>ТеÑÑ‚</голова>
+ ЗдравÑтвуй Мир!
+ </раздел>
+</документ>
+
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/ChangeLog b/Master/texmf-dist/doc/xmltex/passivetex/ChangeLog
new file mode 100644
index 00000000000..c95d5048a58
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/ChangeLog
@@ -0,0 +1,24 @@
+2001-06-19 Sebastian Rahtz <sebastian.rahtz@computing-services.oxford.ac.uk>
+
+ * passivetex.xml: releasing current version with broken tables
+
+2000-09-24 Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
+
+ * fotex.xmt: preserve value of "extent" attribute on
+ page-master-name basis, and use in \@outputpage
+
+2000-07-27 Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
+
+ * added break-after to FOEndBlock
+ * added FOlabel to fo:inline and fo:list-item
+
+2000-03-21 Sebastian Rahtz <sebastian.rahtz@computing-services.oxford.ac.uk>
+
+ * unicode.sty: changed mmasym to "if loaded", instead of "if exists"
+
+2000-01-13 Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
+
+ * mlnames.sty (subsection{Languages}): add
+ \languageshorthands{none} to all \selectlanguage lines
+
+
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/Changes-2003-01 b/Master/texmf-dist/doc/xmltex/passivetex/Changes-2003-01
new file mode 100644
index 00000000000..a6491765fbe
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/Changes-2003-01
@@ -0,0 +1,150 @@
+1. Facilitating <fo:block span="all">
+FOTEX.XMT
+in \XMLelement{fo:block}: detect the span="all" attribute and if so, end
+multicol layout before (if present), and resume multicol layout (if there
+was one) after.
+FOTEX.STY
+new user-interface macros for loading nomulticols.sty if present, otherwise
+resorting to multicols, if present, otherwise defining a fake multicols
+environment. If nomulticols could not be loaded, care is taken that fo:block
+span="all" is disabled, otherwise the TeX run will fail.
+In \@outputpage, call refreshmulticols, which will possibly refresh the
+multicol layout.
+NOMULTICOL.STY
+new file, same functionality as MULTICOL.STY, but does not use an
+environment. With some extra macros to interrupt a multicolumnlayout. It is
+now possible to say
+
+begin multicol layout
+ start group
+ *1*
+ start group
+ end multicol layout *2*
+ start group
+ do something interesting
+ end group
+ begin multicol layout *4*
+ end group
+ *3*
+ end group
+end multicol layout
+
+CAVEAT 1: a lot of assignments of nomulticol have been made global, may be
+too much. For example, if something is set at point *1*, it should be
+restored at point *3*, but if this thing is also set by nomulticol, it will
+undergo a global change at point *2* and/or *4*, and hence will not be
+restored by TeX's grouping mechanism anymore.
+So may be it is needed to carefully discriminate between counts, dimens,
+boxes, and macros that are particular to multicol (the should be treated
+wholly globally), and the (La)TeX-quantities that are dependent on them, and
+they might be set locally.
+
+CAVEAT 2: care must be taken that nomulticol interacts well with an other
+change by me: every time a page is output, a fresh page setup will be
+computed, if necessary. After this page setup, the multicol environment must
+be refreshed (if it was in force). But refreshing should not occur twice in
+a row for the same page. Although it seems that I have succeeded in
+preventing this double refreshment, I still wonder why it can occur at the
+first place.
+2. Facilitating multiple special pages
+XSL-FO facilitates the specification of a sequence of special pages before
+an unbounded, repeating page sequence starts.
+PassiveTeX only allowed one special page, labelled First. I allow for the
+definition of a sequence of such pages, labelled Lead<counter>. In \@output
+page a counter keeps track of which Lead page should be set up. A page setup
+will be done if necessary.
+This change interacts with multicol, see previous item.
+Note also, that blank pages, caused by explicit page-breaks of number
+continuating properties, will be detected as blank pages, and hence react to
+the blank-or-not-blank attribute.
+3. Implementation of xsl-footnote-separator
+A rather crude implementation, by storing the static content of
+xsl-footnote-separator in the macro \footnoterule, and adjusting the
+\skip\footins too match the height+ depth of the new \footnoterule.
+4. Enabling footnotes in tables
+Footnotes in tables work. This is done by saving footnotes insides tables
+into a tokenlist \BoxedFootnotes, doing the corresponding \insert-s at the
+end of the table.
+
+CAVEAT: this is not reallly a nice implementation: if the table breaks
+across pages, the footnotetexts will not appear on the same page as the
+footnotemarks.
+5. Vertical align in tables
+If I work with an explicit line-height, the vertical space allocation for
+the first and last row of a table comes out wrong. Also, when there is a
+line-break inside a cell, the cell-height comes out too small. Something
+gets discarded. I have made some changes to the interlineskip (following the
+TeXBook definition of \offinterlineskip), in order to fix this, but I have
+not succeeded completely.
+6. Inheriting table-cell properties from table-column
+According to XSL-FO table-cells my inherit properties from corresponding
+table-columns by using
+att-x="from-column(att-x)"
+PassiveTeX only implements inheritance of column-width and column-number,
+without the need to use from-column("column-width").
+I have made only an adhoc improvement: text-align will be inherited from the
+column, and it happens automatically, without using from-column(text-align).
+I have done this with the Array implementation, used for column-width and
+column-number. More properties can added easily. It should not be too
+difficult to implement from-column(att-x) for a fixed set of attributes, but
+implementing this for all possible attributes is more difficult.
+7. vskip vs kern
+In the code for typesetting blocks, I have changed some vskips in kern,
+because I trust the kern better than te vskip (kerns will not be discarded,
+vskips might be, and I am not completely sure about the conditions).
+8. Bug in FOBoxedBlock
+There is some weird code at the start of \FOBoxedBlock (see comments in
+fotex.sty at that point).
+I have also added some \relax calls after assignments to be sure that the
+text after \fi etc is not gobbled up by the preceding assignment.
+9. Percenttests
+I have increased the use of percented attribute values. Also, \percenttest
+was not always able to see the % character, because it was still unexpanded
+when fed to it. I have changed that, so that any percent in the
+attributetext is surely expanded to a % with catcode 12 before being fed to
+percenttest.
+(Mostly % appears as an active char, and by means of a limitied-scope
+definition of % to be % with catcode 12, this case will be brought to meet
+the assumption).
+10. Overline
+I have added the overline formatting for inlines, but not nearly as nice as
+the underline of ulem.sty. I just needed it in simple cases, so I took the
+easy option.
+11. Pagenumber filtering
+The algorithm to filter page number sequences generated by indexes (a very
+nice feature of passivetex, by the way), had a few obvious mistakes. I have
+corrected them.
+12. Horizontal alignment
+There were still some problems with alignment, I made some corrections to
+\FOOutputblock in fotex.sty.
+See also mlnames.sty, definition of \Q@end
+13 Page breaks
+In \FONormalBlcok I found that a \penalty -\@M did not generate a page
+break, so I changed it to \newpage (a few times). (see also changes in
+\FOEndBlockTwo
+14 Sub- Superscript
+PassiveTeX adjusted the fontsize of sub/superscripts, but this should be
+governed by the fo-tree.
+So I adjusted \textsub/superscript in fotex.sty
+15 Dimensions of the page
+Page dimensions now work additive, more according to the XSL-FO spec.
+16 attribute="inherit"
+Now the inherit mechanism can also be triggered by the explicit value of
+"inherit". This was achieved by redefining a macro of xmltex: \XML@attrib@x
+(in fotex.xmt)
+17. fo:external-graphic
+scale-to-fit behaviour modified: scaled to the local container instead of
+the page (hsize, vsize instead of linewidth, textheight)
+18. fo:leader implemetation improved
+The code for fo:leader in xmt has been improved
+19. fo-retrieve-marker
+Some trivial improvements in the code of fo:retrieve-marker
+20. More unicode characters
+Added definitions for unicode &#x2000; and &#x2001 (em and n squares) in
+ucharacters.sty
+A. Nested fo:block in fo:table-cell
+Something goes wrong with <fo:table-cell><fo:block><fo:block>.
+The count \FOinTable records whether we are inside a table. But I think that
+it should also record wheter we are immediately below a <fo:table-cell> or
+deeper. But I have not found out what to do in the latter case ...
+
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/README.passivetex b/Master/texmf-dist/doc/xmltex/passivetex/README.passivetex
new file mode 100644
index 00000000000..23061d7e5c1
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/README.passivetex
@@ -0,0 +1,33 @@
+PassiveTeX
+
+Sebastian Rahtz, February 10th 2000
+
+The files in this directory provide an implementation of XSL
+formatting objects. If an XSLT processor is used to write out XSL
+objects in serialized XML format, the result can be formatted using
+xmltex. In addition, an extended xmltex control file for TEI
+documents is provided.
+
+This package consists of the following files:
+
+The core xmltex `style' files for XSL FO XML:
+
+ fotex.xmt
+ fotex.sty
+
+A test file, containing TEI + MathML markup:
+
+ latextei.xml (original)
+ latextei-fo.xml (transformed to XSL FO)
+
+Support for direct formatting of TEI XML with xmltex
+
+ tei.xmt
+ latextei.tex (wrapper for xmltex of sample file)
+
+Some support files, shared with Jadetex:
+
+ unicode.sty
+ ucharacters.sty
+ mlnames.sty
+ dummyels.sty
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/index.html b/Master/texmf-dist/doc/xmltex/passivetex/index.html
new file mode 100644
index 00000000000..367a991547d
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/index.html
@@ -0,0 +1,2771 @@
+
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <!--THIS FILE IS GENERATED FROM AN XML MASTER.
+ DO NOT EDIT-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+ <title>PassiveTeX</title>
+ <link rel="stylesheet" type="text/css" href="http://www.oucs.ox.ac.uk/stylesheets/tei-oucs.css">
+ </head>
+ <body><a name="TOP"></a><table class="header" width="100%">
+ <tr>
+ <td rowspan="3"><a target="_top" href="http://www.ox.ac.uk/"><img border="0" width="78" height="94" src="http://www.oucs.ox.ac.uk/icons/ncrest.gif" alt="Oxford University"></a></td>
+ <td align="left">
+ <h2 class="institution">Oxford University Computing Services</h2>
+ </td>
+ </tr>
+ <tr>
+ <td align="left">
+ <h1 class="maintitle">PassiveTeX</h1>
+ </td>
+ </tr>
+ </table>
+ <hr>
+
+
+
+
+
+
+ <h2>Contents</h2>
+ <ul class="toc">
+ <li class="toc">1. <a class="toc" href="#index-div-c16ab3b3b1">Summary</a></li>
+ <li class="toc">2. <a class="toc" href="#index-div-c16ab3b3b3">How does it work?</a></li>
+ <li class="toc">3. <a class="toc" href="#index-div-c16ab3b3b5">Installation</a></li>
+ <ul class="toc">
+ <li class="toc">3.1. <a class="toc" href="#index-div-c16ab3b3b5c11">LaTeX package dependencies</a></li>
+ </ul>
+ <li class="toc">4. <a class="toc" href="#index-div-c16ab3b3b7">Extensions</a></li>
+ <li class="toc">5. <a class="toc" href="#index-div-c16ab3b3b9">Notes on conformance to the XSL draft specification of November 2000</a></li>
+ <ul class="toc">
+ <li class="toc">5.1. <a class="toc" href="#index-div-c16ab3b3b9b9">Properties needed for basic conformance</a></li>
+ <li class="toc">5.2. <a class="toc" href="#index-div-c16ab3b3b9c11">Properties needed for full conformance</a></li>
+ <li class="toc">5.3. <a class="toc" href="#index-div-c16ab3b3b9c13">Properties needed for extended conformance</a></li>
+ </ul>
+ <li class="toc">6. <a class="toc" href="#index-div-c16ab3b3c11">Sample files</a></li>
+ <li class="toc">7. <a class="toc" href="#index-div-c16ab3b3c13">Concerns and problems</a></li>
+ <li class="toc">8. <a class="toc" href="#index-div-c16ab3b3c15">Things for LaTeX users to remember</a></li>
+ <li class="toc">9. <a class="toc" href="#index-div-c16ab3b3c17">Future directions</a></li>
+ </ul>
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3b1"></a>1. Summary
+ </h2>
+
+
+ <ul>
+ <li><a name="c16ab3b3b1b3b1"></a>
+ PassiveTeX is a library of TeX macros which can be used to process an XML
+ document which results from an XSL transformation to formatting objects.
+
+ </li>
+ <li><a name="c16ab3b3b1b3b3"></a>
+ PassiveTeX provides a rapid development environment for experimenting
+ with XSL FO, using a reliable pre-existing formatter
+
+ </li>
+ <li><a name="c16ab3b3b1b3b5"></a>
+ Running PassiveTeX with the pdfTeX variant of TeX generates high-quality
+ PDF files in a single operation.
+
+ </li>
+ <li><a name="c16ab3b3b1b3b7"></a>
+ PassiveTeX shows how TeX can remain the formatter of choice for XML, while
+ hiding the details of its operation from the user.
+
+ </li>
+ </ul>
+
+ <p><a name="c16ab3b3b1b5"></a>
+ Available from <tt><a href="http://users.ox.ac.uk/~rahtz/passivetex/" target="_top">http://users.ox.ac.uk/~rahtz/passivetex/</a></tt>.
+ The current version is 1.4, 2000/12/11.
+
+ </p>
+
+ </div>
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3b3"></a>2. How does it work?
+ </h2>
+
+ <p><a name="c16ab3b3b3b2"></a>
+ PassiveTeX relies heavily on work by David Carlisle
+ (his namespace-aware XML parser written in
+ TeX, <tt>xmltex</tt>), and was developed from my
+ <a href="http://www.tug.org/applications/jadetex/" target="_top">JadeTeX</a>
+ macros for processing DSSSL via Jade.
+
+ </p>
+
+ <p><a name="c16ab3b3b3b4"></a>
+ Taking the XML version of the TEI Lite guidelines
+ (<a href="test/teiu5.xml" target="_top">teiu5.xml</a>, with DTD
+ <a href="test/teixlite.dtd" target="_top">teixlite.dtd</a>), we apply an XSL stylesheet
+ (see my page of <a href="http://users.ox.ac.uk/~rahtz/tei" target="_top">TEI style sheets</a>),
+ and run it through James Clark's XT XSL processor:
+ <pre>
+ java com.jclark.xsl.sax.Driver teiu5.xml tei.xsl teiu5.fo
+</pre>
+ (assuming you have <tt>xt.jar</tt>, <tt>xp.jar</tt> and <tt>sax.jar</tt>
+ on your CLASSPATH ). This creates the new XML file
+ <a href="test/teiu5.fo" target="_top">teiu5.fo</a>. We now run XMLTeX on this
+ <pre>
+ pdfxmltex teiu5.fo
+</pre>
+ which creates <a href="test/teiu5.pdf" target="_top">teiu5.pdf</a>. Voila!
+ Actually, we need to do
+ <pre>
+ pdfxmltex teiu5.fo
+</pre>
+ again, to resolve page-number references in the table of contents. For a comparison
+ with an HTML rendering of the same document (using XSL again),
+ see <a href="http://users.ox.ac.uk/~rahtz/tei/teiu5.html" target="_top">teiu5.html</a>
+ on my TEI page.
+ </p>
+
+ </div>
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3b5"></a>3. Installation
+ </h2>
+
+
+ <p><a name="c16ab3b3b5b3"></a>
+ The PassiveTeX macros should be downloaded (as a ZIP file,
+ <tt><a href="passivetex.zip" target="_top">passivetex.zip</a></tt>), unpacked, and installed in a TeX system (eg in
+ <tt>texmf/tex/latex/passivetex</tt>) in the normal place where you put
+ macros. Consult your local documentation or local expert if you do not know
+ how to install a new package; on a web2c-based system, don't forget to
+ run <tt>mktexlsr</tt> when you have the files in place,
+ to update the file lookup table.
+
+ </p>
+
+ <p><a name="c16ab3b3b5b5"></a>
+ What about that <tt>pdfxmltex</tt> command we saw in the last section?
+ You don't have it on your system? You need to download
+ <a href="ftp://ftp.tex.ac.uk/tex-archive/macros/xmltex/base.zip" target="_top">xmltex</a>
+ (that link gives you a ZIP archive of the system) and install it in the your TeX system.
+ It too is just a set of TeX macro packages.
+ Then you can use it on a file called (eg) <tt>teiu5.fo</tt> in one of two ways:
+
+ <ol>
+ <li><a name="c16ab3b3b5b5b7b1"></a>Build an <tt>xmltex</tt> format file for pdfTeX with
+ <pre>
+pdftex -ini "&amp;pdflatex" pdfxmltex.ini
+</pre>
+ and process your file with
+ <pre>
+pdflatex "&amp;pdfxmltex" teiu5.fo
+</pre>
+ Or,
+ </li>
+ <li><a name="c16ab3b3b5b5b7b3"></a>
+ Make a wrapper file called (eg) <tt>teiu5.tex</tt> looking like this:
+ <pre>
+\def\xmlfile{teiu5.fo}
+\input xmltex
+</pre>
+ and run pdfTeX on it as normal with
+ <pre>
+pdflatex teiu5.tex
+</pre>
+ </li>
+ </ol>
+ Do not worry, <tt>xmltex</tt> knows how to find the PassiveTeX macros as
+ it needs them. You will likely need to increase TeX memory
+ values (in the file <tt>texmf.cnf</tt> if you use a Web2c-based TeX);
+ I use:
+ <pre>
+main_memory = 2500000
+param_size = 1500
+stack_size = 1500
+hash_extra = 50000
+string_vacancies = 45000
+pool_free = 47500
+nest_size = 500
+save_size = 10000
+pool_size = 500000
+max_strings = 55000
+</pre>
+ </p>
+
+ <p><a name="c16ab3b3b5b7"></a>
+ For reference, the PassiveTeX package consists of the following files:
+
+ <ul>
+ <li><a name="c16ab3b3b5b7b1b1"></a>The core xmltex `style' files for XSL FO XML:
+ <pre>
+ fotex.xmt
+ fotex.sty
+</pre>
+ </li>
+ <li><a name="c16ab3b3b5b7b1b3"></a>
+ Support for direct formatting of TEI XML with xmltex
+ <pre>
+ tei.xmt
+ teixml.sty
+</pre>
+ </li>
+ <li><a name="c16ab3b3b5b7b1b5"></a>
+ Some support files, shared with JadeTeX:
+ <pre>
+ unicode.sty
+ ucharacters.sty
+ mlnames.sty
+ dummyels.sty
+</pre>
+ </li>
+ </ul>
+
+ </p>
+
+ <p><a name="c16ab3b3b5b9"></a>
+ NOTE: TeX has a limit
+ on the length of line it can read,
+ and some .fo files you generate may cause
+ TeX to die with an message about increasing buf_size.
+ If you get that, edit your
+ <tt>texmf.cnf</tt> file, increase the size of <tt>buf_size</tt> (mine is
+ 200000), and remake any format files.
+
+ </p>
+
+ <div class="teidiv">
+ <h3><a name="index-div-c16ab3b3b5c11"></a>3.1. LaTeX package dependencies
+ </h3>
+
+ <p><a name="c16ab3b3b5c11b2"></a>This setup assumes you have a decent modern TeX setup. The TeX Live 5 CD-ROM
+ is what I use, and it is up to date
+ (see <tt><a href="http://www.tug.org/texlive/" target="_top">http://www.tug.org/texlive/</a></tt>).
+
+ </p>
+
+ <p><a name="c16ab3b3b5c11b4"></a> Here is a
+ list of the packages loaded in a typical run of
+ PassiveTeX, with their version numbers where known:
+
+ <div align="center">
+ <table rules="all" border="1">
+
+ <tr>
+ <td> amsbsy.sty </td>
+ <td> 1999/11/29 v1.2d</td>
+ </tr>
+
+ <tr>
+ <td>amsfonts.sty </td>
+ <td> 1997/09/17 v2.2e</td>
+ </tr>
+
+ <tr>
+ <td> amsgen.sty </td>
+ <td> 1999/11/30 v2.0</td>
+ </tr>
+
+ <tr>
+ <td> amsmath.sty </td>
+ <td> 2000/03/29 v2.08 AMS math features</td>
+ </tr>
+
+ <tr>
+ <td> amsopn.sty </td>
+ <td> 1999/12/14 v2.01 operator names</td>
+ </tr>
+
+ <tr>
+ <td> amssymb.sty </td>
+ <td> 1996/11/03 v2.2b</td>
+ </tr>
+
+ <tr>
+ <td> amstext.sty </td>
+ <td> 1999/11/15 v2.0</td>
+ </tr>
+
+ <tr>
+ <td> array.sty </td>
+ <td> 1998/05/13 v2.3m Tabular extension package (FMi)</td>
+ </tr>
+
+ <tr>
+ <td> article.cls </td>
+ <td> 1999/09/10 v1.4a Standard LaTeX document class</td>
+ </tr>
+
+ <tr>
+ <td> bm.sty </td>
+ <td> 1999/07/05 v1.0g Bold Symbol Support (DPC/FMi)</td>
+ </tr>
+
+ <tr>
+ <td> color.sty </td>
+ <td> 1999/02/16 v1.0i Standard LaTeX Color (DPC)</td>
+ </tr>
+
+ <tr>
+ <td> fontenc.sty </td>
+ <td> (version not available)</td>
+ </tr>
+
+ <tr>
+ <td>graphics.sty </td>
+ <td> 1999/02/16 v1.0l Standard LaTeX Graphics (DPC,SPQR)</td>
+ </tr>
+
+ <tr>
+ <td>graphicx.sty </td>
+ <td> 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)</td>
+ </tr>
+
+ <tr>
+ <td> hpdftex.def </td>
+ <td> 2000/05/08 v6.70f Hyperref driver for pdfTeX</td>
+ </tr>
+
+ <tr>
+ <td>hyperref.sty </td>
+ <td> 2000/05/08 v6.70f Hypertext links for LaTeX</td>
+ </tr>
+
+ <tr>
+ <td> ifthen.sty </td>
+ <td> 1999/09/10 v1.1b Standard LaTeX ifthen package (DPC)</td>
+ </tr>
+
+ <tr>
+ <td> keyval.sty </td>
+ <td> 1999/03/16 v1.13 key=value parser (DPC)</td>
+ </tr>
+
+ <tr>
+ <td>longtable.sty </td>
+ <td> 1998/05/13 v4.09 Multi-page Table package (DPC)</td>
+ </tr>
+
+ <tr>
+ <td>multicol.sty </td>
+ <td> 1999/10/21 v1.5w multicolumn formatting (FMi)</td>
+ </tr>
+
+ <tr>
+ <td> nameref.sty </td>
+ <td> 2000/05/08 v2.18 Cross-referencing by name of section</td>
+ </tr>
+
+ <tr>
+ <td> ot1phv.fd </td>
+ <td> 2000/01/12 PSNFSS-v8.1 scalable font definitions for OT1/phv.</td>
+ </tr>
+
+ <tr>
+ <td> pd1enc.def </td>
+ <td> 2000/05/08 v6.70f Hyperref: PDFDocEncoding definition (HO)</td>
+ </tr>
+
+ <tr>
+ <td> pifont.sty </td>
+ <td> 2000/01/12 PSNFSS-v8.1 Pi font support (SPQR) </td>
+ </tr>
+
+ <tr>
+ <td>rotating.sty </td>
+ <td> 1997/09/26, v2.13 Rotation package</td>
+ </tr>
+
+ <tr>
+ <td> size10.clo </td>
+ <td> 1999/09/10 v1.4a Standard LaTeX file (size option)</td>
+ </tr>
+
+ <tr>
+ <td>stmaryrd.sty </td>
+ <td> 1994/03/03 St Mary's Road symbol package</td>
+ </tr>
+
+ <tr>
+ <td> t1enc.def </td>
+ <td> 1999/12/08 v1.9x Standard LaTeX file</td>
+ </tr>
+
+ <tr>
+ <td> t1phv.fd </td>
+ <td> 2000/01/12 PSNFSS-v8.1 scalable font definitions for T1/phv.</td>
+ </tr>
+
+ <tr>
+ <td> t1ptm.fd </td>
+ <td> 2000/01/12 PSNFSS-v8.1 font definitions for T1/ptm.</td>
+ </tr>
+
+ <tr>
+ <td> t2acmr.fd </td>
+ <td> 1999/01/07 v1.0 Computer Modern Cyrillic font definitions</td>
+ </tr>
+
+ <tr>
+ <td> t2aenc.def </td>
+ <td> 1999/11/29 v1.0c Cyrillic encoding definition file</td>
+ </tr>
+
+ <tr>
+ <td> t3enc.def </td>
+ <td> (version not available)</td>
+ </tr>
+
+ <tr>
+ <td>textcomp.sty </td>
+ <td> 1999/12/08 v1.9x Standard LaTeX package</td>
+ </tr>
+
+ <tr>
+ <td> times.sty </td>
+ <td> 2000/01/12 PSNFSS-v8.1 Times font as default roman (SPQR) </td>
+ </tr>
+
+ <tr>
+ <td> tipa.sty </td>
+ <td> 1996/06/10 TIPA version 1.0</td>
+ </tr>
+
+ <tr>
+ <td> trig.sty </td>
+ <td> 1999/03/16 v1.09 sin cos tan (DPC)</td>
+ </tr>
+
+ <tr>
+ <td> ts1cmr.fd </td>
+ <td> 1999/05/25 v2.5h Standard LaTeX font definitions</td>
+ </tr>
+
+ <tr>
+ <td> ts1enc.def </td>
+ <td> 1998/06/12 v3.0d (jk/car/fm) Standard LaTeX file</td>
+ </tr>
+
+ <tr>
+ <td> ts1ptm.fd </td>
+ <td> 2000/01/12 PSNFSS-v8.1 font definitions for TS1/ptm.</td>
+ </tr>
+
+ <tr>
+ <td> ulem.sty </td>
+ <td> 1997/04/21</td>
+ </tr>
+
+ <tr>
+ <td> umsa.fd </td>
+ <td> 1995/01/05 v2.2e AMS font definitions</td>
+ </tr>
+
+ <tr>
+ <td> umsb.fd </td>
+ <td> 1995/01/05 v2.2e AMS font definitions</td>
+ </tr>
+
+ <tr>
+ <td> upsy.fd </td>
+ <td> 2000/01/12 PSNFSS-v8.1 font definitions for U/psy.</td>
+ </tr>
+
+ <tr>
+ <td> upzd.fd </td>
+ <td> 2000/01/12 PSNFSS-v8.1 font definitions for U/pzd.</td>
+ </tr>
+
+ <tr>
+ <td> url.sty </td>
+ <td> 1999/03/28 ver 1.5x Verb mode for urls, etc.</td>
+ </tr>
+
+ <tr>
+ <td> Ustmry.fd </td>
+ <td> (version not available)</td>
+ </tr>
+
+ <tr>
+ <td> uwasy.fd </td>
+ <td> 1999/05/13 v1.0iWasy-2 symbol font definitions</td>
+ </tr>
+
+ <tr>
+ <td> wasysym.sty </td>
+ <td> 1999/05/13 v1.0i Wasy-2 symbol support package</td>
+ </tr>
+
+ </table>
+ </div>
+
+ </p>
+
+ </div>
+
+ </div>
+
+
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3b7"></a>4. Extensions
+ </h2>
+
+
+ <p><a name="c16ab3b3b7b3"></a>
+ PassiveTeX interprets MathML natively (elements must use the MathML namespace).
+ I also support a <tt>bookmark</tt> element in the
+ <tt>fotex</tt> namespace, used to make PDF bookmarks. Usage is like this:
+ <pre>
+&lt;xsl:template match="div2"&gt;
+ &lt;xsl:apply-templates select="head"/&gt;
+ &lt;fotex:bookmark
+ xmlns:fotex="http://www.tug.org/fotex"
+ fotex-bookmark-level="2"
+ fotex-bookmark-label="{@id}"&gt;
+ &lt;xsl:value-of select="head"/&gt;
+ &lt;/fotex:bookmark&gt;
+ &lt;/fo:block&gt;
+&lt;/xsl:template&gt;
+</pre>
+ </p>
+
+ </div>
+
+
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3b9"></a>5. Notes on conformance to the XSL draft specification of November 2000
+ </h2>
+
+
+
+ <p><a name="c16ab3b3b9b5"></a>
+ The following general limitations apply to most of the PassiveTeX
+ implementation of XSL FO:
+
+ <ol>
+ <li><a name="c16ab3b3b9b5b1b1"></a>The `px' unit is not recognised
+ </li>
+ <li><a name="c16ab3b3b9b5b1b3"></a>Absolute dimensions always work, but proportional ones
+ are often not recognized
+ </li>
+ <li><a name="c16ab3b3b9b5b1b5"></a>The functions allowed in attribute values are usually not
+ recognized
+ </li>
+ <li><a name="c16ab3b3b9b5b1b7"></a>There is no error checking at all, and all properies are
+ recognized; do not assume that they do anything...
+ </li>
+ </ol>
+
+ </p>
+
+ <p><a name="c16ab3b3b9b7"></a>
+ Most of the formatting objects are implemented more or less; the
+ following are not implemented at all:
+
+ <ol>
+ <li><a name="c16ab3b3b9b7b1b1"></a><tt>fo:bidi-override</tt></li>
+ <li><a name="c16ab3b3b9b7b1b3"></a><tt>fo:color-profile</tt></li>
+ <li><a name="c16ab3b3b9b7b1b5"></a><tt>fo:declarations</tt></li>
+ <li><a name="c16ab3b3b9b7b1b7"></a><tt>fo:initial-property-set</tt></li>
+ <li><a name="c16ab3b3b9b7b1b9"></a><tt>fo:instream-foreign-object</tt></li>
+ <li><a name="c16ab3b3b9b7b1c11"></a><tt>fo:multi-case</tt></li>
+ <li><a name="c16ab3b3b9b7b1c13"></a><tt>fo:multi-properties</tt></li>
+ <li><a name="c16ab3b3b9b7b1c15"></a><tt>fo:multi-property-set</tt></li>
+ <li><a name="c16ab3b3b9b7b1c17"></a><tt>fo:multi-switch</tt></li>
+ <li><a name="c16ab3b3b9b7b1c19"></a><tt>fo:multi-toggle</tt></li>
+ <li><a name="c16ab3b3b9b7b1c21"></a><tt>fo:region-end</tt></li>
+ <li><a name="c16ab3b3b9b7b1c23"></a><tt>fo:region-start</tt></li>
+ <li><a name="c16ab3b3b9b7b1c25"></a><tt>fo:table-footer</tt></li>
+ </ol>
+
+ </p>
+
+ <div class="teidiv">
+ <h3><a name="index-div-c16ab3b3b9b9"></a>5.1. Properties needed for basic conformance
+ </h3>
+
+ <p><a name="c16ab3b3b9b9b2"></a>
+
+ <div align="center">
+ <table rules="all" border="1">
+
+ <tr>
+ <td>alignment-adjust</td>
+ <td>auto | percentage | length | inherit</td>
+ <td>Basic</td>
+
+ <td>2. should be possible </td>
+ </tr>
+
+
+ <tr>
+ <td>azimuth</td>
+ <td>angle | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side
+ ] || behind ] | leftwards | rightwards | inherit
+ </td>
+ <td>Basic</td>
+
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>background-color</td>
+ <td>color | transparent | inherit</td>
+ <td>Basic</td>
+ <td>3. does not really map in TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>baseline-identifier</td>
+ <td>baseline | before-edge | text-before-edge | middle | after-edge
+ | text-after-edge | ideographic | alphabetic | hanging | mathematical
+ | inherit
+ </td>
+ <td>Basic</td>
+
+ <td>3. not at all sure where to start </td>
+ </tr>
+
+
+ <tr>
+ <td>baseline-shift</td>
+ <td>baseline | sub | super | percentage | length | inherit</td>
+ <td>Basic</td>
+
+ <td>1. basically works </td>
+ </tr>
+
+
+ <tr>
+ <td>block-progression-dimension</td>
+ <td>auto | length | percentage | length-range | inherit</td>
+ <td>Basic</td>
+
+ <td>3. do not really understand it </td>
+ </tr>
+
+
+ <tr>
+ <td>border-after-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-after-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-after-width</td>
+ <td>border-width | length-conditional | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-before-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-before-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-before-width</td>
+ <td>border-width | length-conditional | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-bottom-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-bottom-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>1. used in places </td>
+ </tr>
+
+
+ <tr>
+ <td>border-bottom-width</td>
+ <td>border-width | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-end-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-end-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-end-width</td>
+ <td>border-width | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-left-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-left-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-left-width</td>
+ <td>border-width | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-right-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-right-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-right-width</td>
+ <td>border-width | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-start-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-start-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-start-width</td>
+ <td>border-width | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-top-color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>border-top-style</td>
+ <td>border-style | inherit</td>
+ <td>Basic</td>
+ <td>1. used in places </td>
+ </tr>
+
+
+ <tr>
+ <td>border-top-width</td>
+ <td>border-width | inherit</td>
+ <td>Basic</td>
+ <td>2. works for blocks (non-breaking) </td>
+ </tr>
+
+
+ <tr>
+ <td>break-after</td>
+ <td>auto | column | page | even-page | odd-page | inherit</td>
+ <td>Basic</td>
+ <td>0. should be working </td>
+ </tr>
+
+
+ <tr>
+ <td>break-before</td>
+ <td>auto | column | page | even-page | odd-page | inherit</td>
+ <td>Basic</td>
+ <td>0. should be working </td>
+ </tr>
+
+
+ <tr>
+ <td>character</td>
+ <td>character</td>
+ <td>Basic</td>
+ <td>0. should be working </td>
+ </tr>
+
+
+ <tr>
+ <td>clip</td>
+ <td>shape | auto | inherit</td>
+ <td>Basic</td>
+ <td>2. theoretically possible </td>
+ </tr>
+
+
+ <tr>
+ <td>color</td>
+ <td>color | inherit</td>
+ <td>Basic</td>
+ <td>1. more or less complete </td>
+ </tr>
+
+
+ <tr>
+ <td>column-number</td>
+ <td>number</td>
+ <td>Basic</td>
+ <td>0. OK </td>
+ </tr>
+
+
+ <tr>
+ <td>column-width</td>
+ <td>length</td>
+ <td>Basic</td>
+ <td>0. OK </td>
+ </tr>
+
+
+ <tr>
+ <td>content-type</td>
+ <td>string | auto</td>
+ <td>Basic</td>
+ <td>4. N/A, I think </td>
+ </tr>
+
+
+ <tr>
+ <td>cue-after</td>
+ <td>uri | none | inherit </td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>cue-before</td>
+ <td>uri | none | inherit </td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>direction</td>
+ <td>ltr | rtl | inherit</td>
+ <td>Basic</td>
+ <td>3. waiting for extended TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>display-align</td>
+ <td>auto | before | center | after | inherit</td>
+ <td>Basic</td>
+
+ <td>0. working </td>
+ </tr>
+
+
+ <tr>
+ <td>dominant-baseline</td>
+ <td>auto | autosense-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical
+ | inherit
+ </td>
+ <td>Basic</td>
+
+ <td>3. dont know where to begin </td>
+ </tr>
+
+
+ <tr>
+ <td>elevation</td>
+ <td>angle | below | level | above | higher | lower | inherit</td>
+ <td>Basic</td>
+
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>end-indent</td>
+ <td>length | inherit</td>
+ <td>Basic</td>
+ <td>0. working </td>
+ </tr>
+
+
+ <tr>
+ <td>flow-name</td>
+ <td>name</td>
+ <td>Basic</td>
+ <td>0. working </td>
+ </tr>
+
+
+ <tr>
+ <td>font-family</td>
+ <td>[[ family-name | generic-family ],]* [family-name | generic-family] | inherit</td>
+ <td>Basic</td>
+
+ <td>1. more or less OK </td>
+ </tr>
+
+
+ <tr>
+ <td>font-size</td>
+ <td>absolute-size | relative-size | length | percentage | inherit</td>
+ <td>Basic</td>
+
+ <td>1. more or less all implemented </td>
+ </tr>
+
+
+ <tr>
+ <td>font-style</td>
+ <td>normal | italic | oblique | backslant | inherit</td>
+ <td>Basic</td>
+ <td>1. no oblique or backslant </td>
+ </tr>
+
+
+ <tr>
+ <td>font-variant</td>
+ <td>normal | small-caps | inherit</td>
+ <td>Basic</td>
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>font-weight</td>
+ <td>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit</td>
+ <td>Basic</td>
+
+ <td>1. normal and bold only at present, others to follow</td>
+ </tr>
+
+
+ <tr>
+ <td>format</td>
+ <td>string</td>
+ <td>Basic</td>
+ <td>3. dont want to think about it </td>
+ </tr>
+
+
+ <tr>
+ <td>grouping-separator</td>
+ <td>character</td>
+ <td>Basic</td>
+ <td>3. dont want to think about it </td>
+ </tr>
+
+
+ <tr>
+ <td>grouping-size</td>
+ <td>number</td>
+ <td>Basic</td>
+ <td>3. dont want to think about it </td>
+ </tr>
+
+
+ <tr>
+ <td>height</td>
+ <td>length | percentage | auto | inherit</td>
+ <td>Basic</td>
+ <td>2. should be OK, waiting for a need </td>
+ </tr>
+
+
+ <tr>
+ <td>id</td>
+ <td> id</td>
+ <td>Basic</td>
+ <td>0. used </td>
+ </tr>
+
+
+ <tr>
+ <td>initial-page-number</td>
+ <td>auto | auto-odd | auto-even | number | inherit</td>
+ <td>Basic</td>
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>inline-progression-dimension</td>
+ <td>auto | length | percentage | length-range | inherit</td>
+ <td>Basic</td>
+
+ <td>3. have not considered at all </td>
+ </tr>
+
+
+ <tr>
+ <td>keep-with-next</td>
+ <td>keep | inherit</td>
+ <td>Basic</td>
+ <td>1. done in theory, not working 100%</td>
+ </tr>
+
+
+ <tr>
+ <td>keep-with-previous</td>
+ <td>keep | inherit</td>
+ <td>Basic</td>
+ <td>1. done in theory, not working 100% </td>
+ </tr>
+
+
+ <tr>
+ <td>leader-length</td>
+ <td>length-range | inherit</td>
+ <td>Basic</td>
+ <td>2. waiting to do soon </td>
+ </tr>
+
+
+ <tr>
+ <td>leader-pattern</td>
+ <td>space | rule | dots | use-content | inherit</td>
+ <td>Basic</td>
+ <td>2. waiting to do soon </td>
+ </tr>
+
+
+ <tr>
+ <td>letter-value</td>
+ <td>auto | alphabetic | traditional</td>
+ <td>Basic</td>
+ <td>3. dont want to think about it </td>
+ </tr>
+
+
+ <tr>
+ <td>line-height</td>
+ <td>normal | length | number | percentage | space | inherit</td>
+ <td>Basic</td>
+
+ <td>1. largely done </td>
+ </tr>
+
+
+ <tr>
+ <td>line-stacking-strategy</td>
+ <td>line-height | font-height | max-height | inherit</td>
+ <td>Basic</td>
+ <td>3. untouched </td>
+ </tr>
+
+
+ <tr>
+ <td>margin-bottom</td>
+ <td>margin-width | inherit</td>
+ <td>Basic</td>
+ <td>1. done in places </td>
+ </tr>
+
+
+ <tr>
+ <td>margin-left</td>
+ <td>margin-width | inherit</td>
+ <td>Basic</td>
+ <td>1. done in places </td>
+ </tr>
+
+
+ <tr>
+ <td>margin-right</td>
+ <td>margin-width | inherit</td>
+ <td>Basic</td>
+ <td>1. done in places </td>
+ </tr>
+
+
+ <tr>
+ <td>margin-top</td>
+ <td>margin-width | inherit</td>
+ <td>Basic</td>
+ <td>1. done in places </td>
+ </tr>
+
+
+ <tr>
+ <td>master-name</td>
+ <td>name</td>
+ <td>Basic</td>
+ <td>0. ok </td>
+ </tr>
+
+
+ <tr>
+ <td>max-height</td>
+ <td>length | percentage | none | inherit </td>
+ <td>Basic</td>
+ <td>2. should be doable </td>
+ </tr>
+
+
+ <tr>
+ <td>max-width</td>
+ <td>length | percentage | none | inherit</td>
+ <td>Basic</td>
+ <td>2. should be doable </td>
+ </tr>
+
+
+ <tr>
+ <td>min-height</td>
+ <td>length | percentage | inherit </td>
+ <td>Basic</td>
+ <td>2. should be doable </td>
+ </tr>
+
+
+ <tr>
+ <td>min-width</td>
+ <td>length | percentage | inherit</td>
+ <td>Basic</td>
+ <td>2. should be doable </td>
+ </tr>
+
+
+ <tr>
+ <td>number-columns-repeated</td>
+ <td>number</td>
+ <td>Basic</td>
+
+ <td>2. doable in theory </td>
+ </tr>
+
+
+ <tr>
+ <td>number-columns-spanned</td>
+ <td>number</td>
+ <td>Basic</td>
+ <td>2. doable in theory </td>
+ </tr>
+
+
+ <tr>
+ <td>number-rows-spanned</td>
+ <td>number</td>
+ <td>Basic</td>
+ <td>2. doable in theory </td>
+ </tr>
+
+
+ <tr>
+ <td>orphans</td>
+ <td>integer | inherit</td>
+ <td>Basic</td>
+ <td>2. should be doable </td>
+ </tr>
+
+
+ <tr>
+ <td>overflow</td>
+ <td>visible | hidden | scroll | auto | inherit</td>
+ <td>Basic</td>
+ <td>2. theoretically </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-after</td>
+ <td>padding-width | length-conditional | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-before</td>
+ <td>padding-width | length-conditional | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-bottom</td>
+ <td>padding-width | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-end</td>
+ <td>padding-width | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-left</td>
+ <td>padding-width | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-right</td>
+ <td>padding-width | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-start</td>
+ <td>padding-width | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>padding-top</td>
+ <td>padding-width | inherit</td>
+ <td>Basic</td>
+ <td>1. implemented crudely </td>
+ </tr>
+
+
+ <tr>
+ <td>page-break-after</td>
+ <td>auto | always | avoid | left | right | inherit</td>
+ <td>Basic</td>
+ <td>1. Mostly implemented </td>
+ </tr>
+
+
+ <tr>
+ <td>page-break-before</td>
+ <td>auto | always | avoid | left | right | inherit</td>
+ <td>Basic</td>
+ <td>1. Mostly implemented </td>
+ </tr>
+
+
+ <tr>
+ <td>page-height</td>
+ <td>auto | indefinite | length | inherit</td>
+ <td>Basic</td>
+ <td>1. not all possibilities</td>
+ </tr>
+
+
+ <tr>
+ <td>page-width</td>
+ <td>auto | indefinite | length | inherit</td>
+ <td>Basic</td>
+ <td>1. not all possibilities</td>
+ </tr>
+
+
+ <tr>
+ <td>pause-after</td>
+ <td>time | percentage | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>pause-before</td>
+ <td>time | percentage | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>pitch</td>
+ <td>frequency | x-low | low | medium | high | x-high | inherit</td>
+ <td>Basic</td>
+
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>pitch-range</td>
+ <td>number | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>play-during</td>
+ <td>uri mix? repeat? | auto | none | inherit </td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>precedence</td>
+ <td>true | false | inherit</td>
+ <td>Basic</td>
+ <td>3. do not know where to start </td>
+ </tr>
+
+
+ <tr>
+ <td>provisional-distance-between-starts</td>
+ <td>length | inherit</td>
+ <td>Basic</td>
+ <td>1. does something, probably wrong </td>
+ </tr>
+
+
+ <tr>
+ <td>provisional-label-separation</td>
+ <td>length | inherit</td>
+ <td>Basic</td>
+ <td>1. does something, probably wrong </td>
+ </tr>
+
+
+ <tr>
+ <td>ref-id</td>
+ <td>idref | inherit</td>
+ <td>Basic</td>
+ <td>0. used in pagenumber </td>
+ </tr>
+
+
+ <tr>
+ <td>reference-orientation</td>
+ <td> 0 | 90 | 180 | 270 | -90 | -180 | -270 | inherit</td>
+ <td>Basic</td>
+ <td>2. doable for most objects </td>
+ </tr>
+
+
+ <tr>
+ <td>region-name</td>
+ <td>xsl-region-body | xsl-region-start | xsl-region-end | xsl-region-before | xsl-region-after | xsl-before-float-separator
+ | xsl-footnote-separator | name
+ </td>
+ <td>Basic</td>
+
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>relative-align</td>
+ <td>before | baseline | inherit</td>
+ <td>Basic</td>
+
+ <td>3. have not got to grips with this </td>
+ </tr>
+
+
+ <tr>
+ <td>richness</td>
+ <td>number | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>role</td>
+ <td>string | none | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A what should I do with it?</td>
+ </tr>
+
+
+ <tr>
+ <td>rule-style</td>
+ <td>none | dotted | dashed | solid | double | groove | ridge | inherit</td>
+ <td>Basic</td>
+
+ <td>1. done as far as possible </td>
+ </tr>
+
+
+ <tr>
+ <td>rule-thickness</td>
+ <td>length</td>
+ <td>Basic</td>
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>source-document</td>
+ <td>uri+ | none | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A not sure what to do with it</td>
+ </tr>
+
+
+ <tr>
+ <td>space-after</td>
+ <td>space | inherit</td>
+ <td>Basic</td>
+ <td>1. working more or less </td>
+ </tr>
+
+
+ <tr>
+ <td>space-before</td>
+ <td>space | inherit</td>
+ <td>Basic</td>
+ <td>1. working more or less </td>
+ </tr>
+
+
+ <tr>
+ <td>space-end</td>
+ <td>space | inherit</td>
+ <td>Basic</td>
+ <td>1. working more or less </td>
+ </tr>
+
+
+ <tr>
+ <td>space-start</td>
+ <td>space | inherit</td>
+ <td>Basic</td>
+ <td>1. working more or less </td>
+ </tr>
+
+
+ <tr>
+ <td>speak</td>
+ <td>normal | none | spell-out | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>speak-header</td>
+ <td>once | always | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>speak-numeral</td>
+ <td>digits | continuous | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>speak-punctuation</td>
+ <td>code | none | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>speech-rate</td>
+ <td>number | x-slow | slow | medium | fast | x-fast | faster | slower | inherit</td>
+ <td>Basic</td>
+
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>src</td>
+ <td> uri | inherit</td>
+ <td>Basic</td>
+ <td>0. implemented </td>
+ </tr>
+
+
+ <tr>
+ <td>start-indent</td>
+ <td>length | inherit</td>
+ <td>Basic</td>
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>stress</td>
+ <td>number | inherit</td>
+ <td>Basic</td>
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>text-align</td>
+ <td>start | center | end | justify | inside | outside | left | right | string | inherit</td>
+ <td>Basic</td>
+
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>text-indent</td>
+ <td>length | percentage | inherit</td>
+ <td>Basic</td>
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>visibility</td>
+ <td>visible | hidden | collapse | inherit</td>
+ <td>Basic</td>
+ <td>2. I think can do this </td>
+ </tr>
+
+
+ <tr>
+ <td>voice-family</td>
+ <td>[[specific-voice | generic-voice ],]* [specific-voice | generic-voice ] | inherit</td>
+ <td>Basic</td>
+
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>volume</td>
+ <td>number | percentage | silent | x-soft | soft | medium | loud | x-loud | inherit</td>
+ <td>Basic</td>
+
+ <td>4. N/A </td>
+ </tr>
+
+
+ <tr>
+ <td>widows</td>
+ <td>integer | inherit</td>
+ <td>Basic</td>
+ <td>2. should be doable </td>
+ </tr>
+
+
+ <tr>
+ <td>width</td>
+ <td>length | percentage | auto | inherit</td>
+ <td>Basic</td>
+ <td>2. should be OK, waiting for a need </td>
+ </tr>
+
+
+ <tr>
+ <td>wrap-option</td>
+ <td>no-wrap | wrap | inherit</td>
+ <td>Basic</td>
+ <td>0. should be working </td>
+ </tr>
+
+
+ <tr>
+ <td>writing-mode</td>
+ <td>lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit</td>
+ <td>Basic</td>
+ <td>3. will need an extended TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>z-index</td>
+ <td>auto | integer | inherit</td>
+ <td>Basic</td>
+ <td>3. dont know where to start </td>
+ </tr>
+
+ </table>
+ </div>
+
+ </p>
+
+ </div>
+
+
+
+ <div class="teidiv">
+ <h3><a name="index-div-c16ab3b3b9c11"></a>5.2. Properties needed for full conformance
+ </h3>
+
+ <p><a name="c16ab3b3b9c11b2"></a>
+
+ <div align="center">
+ <table rules="all" border="1">
+
+ <tr>
+ <td>absolute-position</td>
+ <td>auto | absolute | fixed | inherit</td>
+ <td>Complete</td>
+ <td>2. should be doable </td>
+ </tr>
+
+
+ <tr>
+ <td>background</td>
+ <td>[background-color || background-image
+ || background-repeat || background-attachment || background-position
+ | ]]inherit
+ </td>
+ <td>Complete</td>
+
+ <td>1. implemented but very fragile </td>
+ </tr>
+
+
+ <tr>
+ <td>background-position</td>
+ <td>[ [percentage | length ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border</td>
+ <td>[ border-width || border-style || color ] | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-bottom</td>
+ <td>[ border-top-width || border-style || color ] | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-color</td>
+ <td>color{1,4} | transparent | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-left</td>
+ <td>[ border-top-width || border-style || color ] | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-right</td>
+ <td>[ border-top-width || border-style || color ] | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-spacing</td>
+ <td>length length? | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-style</td>
+ <td>border-style{1,4} | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-top</td>
+ <td>[ border-top-width || border-style || color ] | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-width</td>
+ <td>border-width{1,4} | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>caption-side</td>
+ <td>before | after | start | end | top | bottom | left | right | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>cue</td>
+ <td>cue-before || cue-after | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>font</td>
+ <td>[ [ font-style || font-variant || font-weight ]? font-size [ / line-height]? font-family
+ ] | caption | icon | menu | message-box | small-caption | status-bar
+ | inherit
+ </td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>margin</td>
+ <td>margin-width{1,4} | inherit </td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>padding</td>
+ <td>padding-width{1,4} | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>page-break-inside</td>
+ <td>avoid | auto | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>pause</td>
+ <td>[time | percentage]{1,2} | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>position</td>
+ <td>static | relative | absolute | fixed | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>size</td>
+ <td>length{1,2} | auto | landscape | portrait | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>vertical-align</td>
+ <td>baseline | middle | sub | super | text-top | text-bottom | percentage | length | top | bottom | inherit</td>
+ <td>Complete</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>white-space</td>
+ <td>normal | pre | nowrap | inherit</td>
+ <td>Complete</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>xml:lang</td>
+ <td>country-language | inherit</td>
+ <td>Complete</td>
+ <td>2. not done yet, but will be </td>
+ </tr>
+
+ </table>
+ </div>
+
+ </p>
+
+ </div>
+
+
+ <div class="teidiv">
+ <h3><a name="index-div-c16ab3b3b9c13"></a>5.3. Properties needed for extended conformance
+ </h3>
+
+ <p><a name="c16ab3b3b9c13b2"></a>
+
+ <div align="center">
+ <table rules="all" border="1">
+
+ <tr>
+ <td>table-layout</td>
+ <td>auto | fixed | inherit</td>
+ <td>Extended.Fallback: fixed</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>background-attachment</td>
+ <td>scroll | fixed | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>2. I can see where I might start </td>
+ </tr>
+
+
+ <tr>
+ <td>background-image</td>
+ <td>uri | none | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>2. I can see where I might start </td>
+ </tr>
+
+
+ <tr>
+ <td>background-position-horizontal</td>
+ <td>percentage | length | left | center | right | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+
+ <td>2. I can see where I might start </td>
+ </tr>
+
+
+ <tr>
+ <td>background-position-vertical</td>
+ <td>percentage | length | top | center | bottom | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+
+ <td>2. I can see where I might start </td>
+ </tr>
+
+
+ <tr>
+ <td>border-collapse</td>
+ <td>collapse | separate | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>border-separation</td>
+ <td>length-bp-ip-direction | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>column-count</td>
+ <td>number | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>0. implemented </td>
+ </tr>
+
+
+ <tr>
+ <td>content-height</td>
+ <td>auto | length | percentage | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>1. done for graphics </td>
+ </tr>
+
+
+ <tr>
+ <td>content-width</td>
+ <td>auto | length | percentage | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>1. done for graphics </td>
+ </tr>
+
+
+ <tr>
+ <td>country</td>
+ <td>none | country | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>2. waiting to find a use for it </td>
+ </tr>
+
+
+ <tr>
+ <td>empty-cells</td>
+ <td>show | hide | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>ends-row</td>
+ <td>yes | no</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>font-height-override-after</td>
+ <td>use-font-metrics | length | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>3. need extended TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>font-height-override-before</td>
+ <td>use-font-metrics | length | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>3. need extended TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>font-size-adjust</td>
+ <td>number | none | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>2. doable, I think </td>
+ </tr>
+
+
+ <tr>
+ <td>font-stretch</td>
+ <td>normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded |
+ expanded | extra-expanded | ultra-expanded |inherit
+ </td>
+ <td>Extended.Fallback: Initial value</td>
+
+ <td>0. should be OK </td>
+ </tr>
+
+
+ <tr>
+ <td>glyph-orientation-horizontal</td>
+ <td>angle | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>3. need extended TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>glyph-orientation-vertical</td>
+ <td>auto | angle | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>3. need extended TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>hyphenate</td>
+ <td>false | true | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>0. done </td>
+ </tr>
+
+
+ <tr>
+ <td>keep-together</td>
+ <td>keep | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>language</td>
+ <td>none | language | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>0. done, if underlying TeX system OK </td>
+ </tr>
+
+
+ <tr>
+ <td>last-line-end-indent</td>
+ <td>length | percentage | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>leader-alignment</td>
+ <td>none | reference-area | page | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>leader-pattern-width</td>
+ <td>use-font-metrics | length | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>letter-spacing</td>
+ <td>normal | length | space | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>2. doable in limited circumstances </td>
+ </tr>
+
+
+ <tr>
+ <td>line-height-shift-adjustment</td>
+ <td>consider-shifts | disregard-shifts | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>linefeed-treatment</td>
+ <td>ignore | preserve | treat-as-space | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>2. doable, if tiresome </td>
+ </tr>
+
+
+ <tr>
+ <td>relative-position</td>
+ <td>auto | static | relative | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>scaling</td>
+ <td>uniform | non-uniform | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>0. ok </td>
+ </tr>
+
+
+ <tr>
+ <td>scaling-method</td>
+ <td>auto | integer-pixels | resample-any-method | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>4. N/A, I think </td>
+ </tr>
+
+
+ <tr>
+ <td>score-spaces</td>
+ <td>true | false | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>3. dont think I can do this </td>
+ </tr>
+
+
+ <tr>
+ <td>space-treatment</td>
+ <td>ignore | preserve | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>0. seems to work </td>
+ </tr>
+
+
+ <tr>
+ <td>span</td>
+ <td>none | all | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>3. proving hard </td>
+ </tr>
+
+
+ <tr>
+ <td>starts-row</td>
+ <td>yes |
+ no
+ </td>
+ <td>Extended.Fallback: Initial value</td>
+
+ <td>0. works</td>
+ </tr>
+
+
+ <tr>
+ <td>suppress-at-line-break</td>
+ <td>auto | suppress | retain | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>table-omit-footer-at-break</td>
+ <td>yes | no</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>table-omit-header-at-break</td>
+ <td>yes | no</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>text-align-last</td>
+ <td>relative | start | center | end | justify | inside | outside | left | right | string | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+
+ <td>1. works, usually </td>
+ </tr>
+
+
+ <tr>
+ <td>text-decoration</td>
+ <td>none | [ [ underline | no-underline] || [ overline | no-overline ] || [ line-through | no-line-through ] || [ blink | no-blink
+ ] ]
+
+ | inherit
+ </td>
+ <td>Extended.Fallback: Initial value</td>
+
+ <td>1. done for some possibilities, not all </td>
+ </tr>
+
+
+ <tr>
+ <td>text-shadow</td>
+ <td>none | [color || length length length? ,]* [color || length length length?] | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>text-transform</td>
+ <td>capitalize | uppercase | lowercase | none | </td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>2. doable </td>
+ </tr>
+
+
+ <tr>
+ <td>treat-as-word-space</td>
+ <td>auto | yes | no | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>white-space-collapse</td>
+ <td>false | true | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td>0. Done </td>
+ </tr>
+
+
+ <tr>
+ <td>word-spacing</td>
+ <td>normal | length | space | inherit</td>
+ <td>Extended.Fallback: Initial value</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>bottom</td>
+ <td>length | percentage | auto | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</td>
+ <td>2. doable, I think </td>
+ </tr>
+
+
+ <tr>
+ <td>left</td>
+ <td>length | percentage | auto | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</td>
+ <td>2. doable, I think </td>
+ </tr>
+
+
+ <tr>
+ <td>right</td>
+ <td>length | percentage | auto | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</td>
+ <td>2. doable, I think </td>
+ </tr>
+
+
+ <tr>
+ <td>top</td>
+ <td>length | percentage | auto | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</td>
+ <td>2. doable, I think </td>
+ </tr>
+
+
+ <tr>
+ <td>column-gap</td>
+ <td>length | percentage | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for column-count</td>
+ <td>1. implemented (not for all value types) </td>
+ </tr>
+
+
+ <tr>
+ <td>hyphenation-character</td>
+ <td>character | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for hyphenate</td>
+ <td>3. need to think about how to do this </td>
+ </tr>
+
+
+ <tr>
+ <td>hyphenation-keep</td>
+ <td>auto | column | page | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for hyphenate</td>
+ <td>3. not sure how to do this </td>
+ </tr>
+
+
+ <tr>
+ <td>hyphenation-ladder-count</td>
+ <td>no-limit | number | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for hyphenate</td>
+ <td>3. I dont see how to do this </td>
+ </tr>
+
+
+ <tr>
+ <td>hyphenation-push-character-count</td>
+ <td>number | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for hyphenate</td>
+ <td>2. I think this maps in TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>hyphenation-remain-character-count</td>
+ <td>number | inherit</td>
+ <td>Extended.Fallback: N/A due to fallback for hyphenate</td>
+ <td>2. I think this maps in TeX </td>
+ </tr>
+
+
+ <tr>
+ <td>color-profile-name</td>
+ <td>name | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:color-profile</td>
+ <td>3. would need a lot of thought </td>
+ </tr>
+
+
+ <tr>
+ <td>rendering-intent</td>
+ <td>auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:color-profile</td>
+ <td>3. not sure how to do this </td>
+ </tr>
+
+
+ <tr>
+ <td>clear</td>
+ <td>start | end | left | right | both | none | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:float</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>float</td>
+ <td>before | start | end | left | right | none | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:float</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>marker-class-name</td>
+ <td>name</td>
+ <td>Extended.Fallback: N/A use fallback for fo:marker</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>active-state</td>
+ <td>link | visited | active | hover | focus</td>
+ <td>Extended.Fallback: N/A use fallback for fo:multi-properties</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>auto-restore</td>
+ <td>yes | no</td>
+ <td>Extended.Fallback: N/A use fallback for fo:multi-switch</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>case-name</td>
+ <td>name</td>
+ <td>Extended.Fallback: N/A use fallback for fo:multi-switch</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>case-title</td>
+ <td>string</td>
+ <td>Extended.Fallback: N/A use fallback for fo:multi-switch</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>starting-state</td>
+ <td>show | hide</td>
+ <td>Extended.Fallback: N/A use fallback for fo:multi-switch</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>switch-to</td>
+ <td>xsl-preceding | xsl-following | xsl-any | name[ name]*</td>
+ <td>Extended.Fallback: N/A use fallback for fo:multi-switch</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>extent</td>
+ <td>length | percentage | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:region-before, fo:region-after, fo:region-start, and fo:region-end</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>blank-or-not-blank</td>
+ <td>blank | not-blank | any | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives</td>
+ <td>3. dont want to think about it </td>
+ </tr>
+
+
+ <tr>
+ <td>odd-or-even</td>
+ <td>odd | even | any | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>page-position</td>
+ <td>first | last | rest | any | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>maximum-repeats</td>
+ <td>number | no-limit | inherit</td>
+ <td>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-reference and fo:repeatable-page-master-alternatives</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>retrieve-boundary</td>
+ <td>page | page-sequence | document</td>
+ <td>Extended.Fallback: N/A use fallback for fo:retrieve-marker</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>retrieve-class-name</td>
+ <td>name</td>
+ <td>Extended.Fallback:
+ N/A use fallback for fo:retrieve-marker
+ </td>
+ <td>1. works usually </td>
+ </tr>
+
+
+ <tr>
+ <td>retrieve-position</td>
+ <td>first-starting-within-page | first-including-carryover | last-starting-within-page | last-ending-within-page</td>
+ <td>Extended.Fallback: N/A use fallback for fo:retrieve-marker</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>destination-placement-offset</td>
+ <td>length</td>
+ <td>Extended.Fallback: N/A use fallback for fo:simple-link</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>external-destination</td>
+ <td>uri-reference</td>
+ <td>Extended.Fallback:
+ N/A use fallback for fo:simple-link
+ </td>
+ <td>0. works ok </td>
+ </tr>
+
+
+ <tr>
+ <td>indicate-destination</td>
+ <td>yes |
+ no
+ </td>
+ <td>Extended.Fallback: N/A use fallback for
+ fo:simple-link
+ </td>
+ <td>1. should work </td>
+ </tr>
+
+
+ <tr>
+ <td>internal-destination</td>
+ <td>null string |
+ idref
+ </td>
+ <td>Extended.Fallback: N/A use fallback for
+ fo:simple-link
+ </td>
+ <td>0. works </td>
+ </tr>
+
+
+ <tr>
+ <td>show-destination</td>
+ <td>replace | new</td>
+ <td>Extended.Fallback: N/A use fallback for fo:simple-link</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>force-page-count</td>
+ <td>auto | even | odd | end-on-even | end-on-odd | no-force | inherit</td>
+ <td>Extended.Fallback: no-force</td>
+
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>background-repeat</td>
+ <td>repeat | repeat-x | repeat-y | no-repeat | inherit</td>
+ <td>Extended.Fallback: no-repeat</td>
+ <td> </td>
+ </tr>
+
+
+ <tr>
+ <td>script</td>
+ <td>none | auto | script | inherit</td>
+ <td>Extended.Fallback: none</td>
+ <td>4. dont know what to do with it </td>
+ </tr>
+
+
+ <tr>
+ <td>unicode-bidi</td>
+ <td>normal | embed | bidi-override | inherit</td>
+ <td>Extended.Fallback: See prose</td>
+ <td> </td>
+
+ </tr>
+
+ </table>
+ </div>
+
+ </p>
+
+ </div>
+
+
+ </div>
+
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3c11"></a>6. Sample files
+ </h2>
+
+
+ <p><a name="c16ab3b3c11b3"></a>
+
+ <ul>
+ <li><a name="c16ab3b3c11b3b1b1"></a> The TEI Lite description (<a href="test/teiu5.xml" target="_top">teiu5.xml</a>) converted PDF as <a href="test/teiu5.pdf" target="_top">teiu5.pdf</a></li>
+ <li><a name="c16ab3b3c11b3b1b3"></a> A TEI test file (<a href="test/exercise.xml" target="_top">exercise.xml</a>)
+ converted to PDF as <a href="test/exercise.pdf" target="_top">exercise.pdf</a></li>
+ <li><a name="c16ab3b3c11b3b1b5"></a> A physics paper (<a href="test/latextei.xml" target="_top">latextei.xml</a>) containing a fair
+ amount of MathML markup, originally
+ translated from LaTeX into XML.
+ It is used extensively as an example in the
+ <a href="http://cseng.awl.com/bookpage.taf?ISBN=0-201-43311-7&amp;ptype=0&amp;catid=&amp;navmin=&amp;ctype=author&amp;catpage=&amp;seriesid=" target="_top">LaTeX Web Companion</a>.
+ Here we see it
+ converted to <a href="test/latextei.pdf" target="_top">latextei.pdf</a> using
+ <a href="test/latextei.xsl" target="_top">test/latextei.xsl</a></li>
+ <li><a name="c16ab3b3c11b3b1b7"></a> James Tauber prepared a simple XSL spec (<a href="test/darkness.xsl" target="_top">darkness.xsl</a>) for Joseph Conrad's
+ <a href="test/darkness.xml" target="_top"><em>Heart of
+ Darkness</em></a>, which I ran to PDF as <a href="test/darkness.pdf" target="_top">darkness.pdf</a></li>
+ </ul>
+
+ </p>
+
+ </div>
+
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3c13"></a>7. Concerns and problems
+ </h2>
+
+
+ <p><a name="c16ab3b3c13b3"></a>
+ Some points to bear in mind
+
+ <ol>
+ <li><a name="c16ab3b3c13b3b1b1"></a> Obviously, the XSL FO spec is still a draft.
+ And this system is not conforming
+ precisely to the current draft.
+ </li>
+ <li><a name="c16ab3b3c13b3b1b3"></a> This is an experiment system to check whether the
+ idea works. Expect something more polished eventually.
+ </li>
+ <li><a name="c16ab3b3c13b3b1b5"></a> You need a modern TeX setup (like
+ <a href="http://www.tug.org/teTeX/" target="_top">teTeX</a> or
+ <a href="http://www.tug.org/texlive/" target="_top">TeX Live</a>)
+ to get to grips with it.
+ </li>
+ <li><a name="c16ab3b3c13b3b1b7"></a> Quite a few flow objects and characteristics are not dealt with yet.
+ I will add support for more things as needed or requested.
+ </li>
+ <li><a name="c16ab3b3c13b3b1b9"></a> I do not have any objective check that what I think XSL FOs are
+ supposed to do is actually right :-}
+ </li>
+ <li><a name="c16ab3b3c13b3b1c11"></a> I have only worked so far with the TEI Lite (XML version) and
+ Docbook DTDs, and probably misinterpreted half of what they say.
+ </li>
+ </ol>
+
+ </p>
+
+ </div>
+
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3c15"></a>8. Things for LaTeX users to remember
+ </h2>
+
+
+ <p><a name="c16ab3b3c15b3"></a>
+
+ <ul>
+ <li><a name="c16ab3b3c15b3b1b1"></a> No use is made of LaTeX high-level constructs. No sections,
+ no lists, no cross-refs, no bibliographies; on the other hand,
+ some extensions in the <tt>fotex:</tt> namespace are supported
+ (eg to get Acrobat bookmarks)
+
+ </li>
+ <li><a name="c16ab3b3c15b3b1b3"></a> XSL FO's underlying character set is Unicode; by default,
+ entities are mapped to their Unicode position;
+
+ </li>
+ <li><a name="c16ab3b3c15b3b1b5"></a> All vertical and horizontal space is explicit in the
+ specification
+
+ </li>
+ <li><a name="c16ab3b3c15b3b1b7"></a> Page and line breaking is left to TeX: the rest is up to you.
+
+ </li>
+ </ul>
+
+ </p>
+
+ </div>
+
+
+ <div class="teidiv">
+ <h2><a name="index-div-c16ab3b3c17"></a>9. Future directions
+ </h2>
+
+
+ <p><a name="c16ab3b3c17b3"></a>
+
+ <ul>
+ <li><a name="c16ab3b3c17b3b1b1"></a>Complete the MathML handling
+ </li>
+ <li><a name="c16ab3b3c17b3b1b3"></a>Handle more variety in property values (eg colors, fonts)
+ </li>
+ <li><a name="c16ab3b3c17b3b1b5"></a>Deal with more complex tables
+ </li>
+ <li><a name="c16ab3b3c17b3b1b7"></a>Support SVG. How?
+
+ <ul>
+ <li><a name="c16ab3b3c17b3b1b7b1b1"></a>By direct intepretation and mapping to raw PDF
+ </li>
+ <li><a name="c16ab3b3c17b3b1b7b1b3"></a>By translation to MetaPost, and spawning a MetaPost process
+ </li>
+ <li><a name="c16ab3b3c17b3b1b7b1b5"></a>By pre-processing to existing TeX graphics languages
+ </li>
+ </ul>
+ In any case, SVG fragments need to be recognized directly to perform in-line
+ graphical functions (setting text at an angle?)
+
+ </li>
+ <li><a name="c16ab3b3c17b3b1b9"></a>Use Unicode-based TeX variant (Omega) to handle non-Latin material
+ more naturally
+ </li>
+ </ul>
+
+ </p>
+
+ <p><a name="c16ab3b3c17b5"></a>
+ I will be very glad to discuss details with anyone. Contact me (Sebastian Rahtz) as
+ <a href="mailto:sebastian.rahtz@oucs.ox.ac.uk" target="_top">sebastian.rahtz@oucs.ox.ac.uk</a>
+
+ </p>
+
+ </div>
+
+ <hr>
+ <div class="footer"><a target="_top" class="plain" href="http://www.ox.ac.uk/">Oxford University</a>
+ | <a target="_top" class="plain" href="http://www.oucs.ox.ac.uk/">OUCS</a>
+ | <a target="_top" class="plain" href="http://wwwsearch.ox.ac.uk/cgi-bin/oxunit?oucs">Search</a>
+ | <a target="_top" class="plain" href="mailto:feedback@oucs.ox.ac.uk">Feedback</a></div>
+ <hr>
+ <address>Date: November 2000
+ (revised 2000/12/11)
+ &nbsp;Author: .
+ <br><a href="/documentation/copyright.html">&copy;</a> Oxford
+ University Computing Services.
+ <!--Generated
+ using an XSLT version 1 stylesheet
+ based on http://www.oucs.ox.ac.uk/stylesheets/teihtml.xsl
+ processed using:
+ `SAXON 5.5.1 from Michael Kay of ICL'
+
+-->
+ </address>
+ </body>
+</html> \ No newline at end of file
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/latextei-fo.xml b/Master/texmf-dist/doc/xmltex/passivetex/latextei-fo.xml
new file mode 100644
index 00000000000..bfc33c1f6bb
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/latextei-fo.xml
@@ -0,0 +1,647 @@
+<?xml version="1.0" encoding="utf-8"?>
+<fo:root xmlns:fo="http://www.w3.org/XSL/Format/1.0" xmlns:fop="http://www.jtauber.com/fop" xmlns:fotex="http://www.tug.org/fotex"><fo:layout-master-set><fo:simple-page-master page-master-name="left" margin-top="75pt" margin-bottom="100pt" margin-left="80pt" margin-right="150pt"><fo:region-body margin-bottom="24pt" margin-top="24pt"/><fo:region-after extent="25pt"/><fo:region-before extent="25pt"/></fo:simple-page-master><fo:simple-page-master page-master-name="right" margin-top="75pt" margin-bottom="100pt" margin-left="80pt" margin-right="150pt"><fo:region-body margin-bottom="24pt" margin-top="24pt"/><fo:region-after extent="25pt"/><fo:region-before extent="25pt"/></fo:simple-page-master><fo:simple-page-master page-master-name="first" margin-top="75pt" margin-bottom="100pt" margin-left="80pt" margin-right="150pt"><fo:region-body margin-bottom="24pt" margin-top="24pt"/><fo:region-after extent="25pt"/><fo:region-before extent="25pt"/></fo:simple-page-master></fo:layout-master-set><fo:page-sequence><fo:static-content flow-name="xsl-after"/><fo:static-content flow-name="xsl-before"/><fo:sequence-specification><fo:sequence-specifier-single page-master="right"/></fo:sequence-specification><fo:flow>
+ <fo:block font-size="18pt" space-after="8pt" text-align-last="centered">
+ Simulation of Energy Loss Straggling
+ </fo:block>
+ <fo:block space-after="6pt" font-size="14pt" text-align-last="centered"><fo:inline-sequence font-style="italic">Maria Physicist</fo:inline-sequence></fo:block>
+ <fo:block space-after="6pt" font-size="16pt" text-align-last="centered">January 17, 1999</fo:block>
+ </fo:flow></fo:page-sequence><fo:page-sequence initial-page-number="1"><fo:sequence-specification><fo:sequence-specifier-alternating page-master-first="first" page-master-odd="right" page-master-even="left"/></fo:sequence-specification><fo:static-content flow-name="xsl-after" fop:master="right"><fo:block font-size="10pt"><fo:inline-rule rule-thickness="0pt"/><fo:page-number/></fo:block></fo:static-content><fo:static-content flow-name="xsl-after" fop:master="left"><fo:block font-size="10pt"><fo:page-number/><fo:inline-rule rule-thickness="0pt"/></fo:block></fo:static-content><fo:static-content flow-name="xsl-before" fop:master="right"><fo:block text-align-last="centered" font-size="10pt"><!--Running Head: title-->Simulation of Energy Loss Straggling</fo:block></fo:static-content><fo:static-content flow-name="xsl-before" fop:master="left"><fo:block text-align-last="centered" font-size="10pt"><!--Running Head: author-->Maria Physicist</fo:block></fo:static-content><fo:static-content flow-name="xsl-before" fop:master="first"/><fo:static-content flow-name="xsl-after" fop:master="first"><fo:block font-size="10pt"><fo:inline-rule rule-thickness="0pt"/><fo:page-number/><fo:inline-rule rule-thickness="0pt"/></fo:block></fo:static-content><fo:flow font-family="Times Roman" font-size="10pt"> <fo:block keep-with-next="true" id="intro" text-align="start" font-size="18pt" text-indent="-3em" font-weight="bold" space-after="6pt" space-before.optimum="12pt">1. Introduction<fotex:bookmark fotex-bookmark-level="0" fotex-bookmark-label="intro">1. Introduction</fotex:bookmark></fo:block> <fo:block font-size="10pt" text-align="justified">Due to
+the statistical nature of ionisation energy loss, large fluctuations
+can occur in the amount of energy deposited by a particle traversing
+an absorber element. Continuous processes such as multiple scattering
+and energy loss play a relevant role in the longitudinal and lateral
+development of electromagnetic and hadronic showers, and in the case
+of sampling calorimeters the measured resolution can be significantly
+affected by such fluctuations in their active layers. The description
+of ionisation fluctuations is characterised by the significance
+parameter <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi></fotex:inlinemath>, which is
+proportional to the ratio of mean energy loss to the maximum allowed
+energy transfer in a single collision with an atomic electron
+ <fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"> <mi>κ</mi><mo>=</mo>
+<mfrac>
+ <mrow><mi>ξ</mi></mrow>
+ <mrow>
+ <msub><mi>E</mi><mi>max</mi></msub>
+ </mrow>
+</mfrac>
+</mrow>
+</fotex:displaymath>
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mi>max</mi></msub></fotex:inlinemath> is the
+maximum transferable energy in a single collision with an atomic electron.
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML">
+ <msub><mi>E</mi><mi>max</mi></msub><mo>=</mo> <mfrac><mrow><mn>2</mn><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><msup><mi>γ</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>1</mn><mo>+</mo><mn>2</mn><mi>γ</mi><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub><mo>+</mo><msup><mfenced open="(" close=")"><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub> </mfenced><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo>,</mo>
+</mrow></fotex:displaymath> where
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">γ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>m</mi><mrow><mi>x</mi></mrow></msub></fotex:inlinemath>,
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi></fotex:inlinemath> is energy and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>m</mi><mrow><mi>x</mi></mrow></msub></fotex:inlinemath> the mass of the
+incident particle, <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>γ</mi><mrow><mn>2</mn></mrow></msup></fotex:inlinemath>
+and <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>m</mi><mrow><mi>e</mi></mrow></msub></fotex:inlinemath> is the
+electron mass. <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi></fotex:inlinemath>
+comes from the Rutherford scattering crosss section and is defined as:
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>2</mn><mi>Ï€</mi><msup><mi>z</mi><mrow><mn>2</mn></mrow></msup><msup><mi>e</mi><mrow><mn>4</mn></mrow></msup><msub><mi>N</mi><mrow><mi>A</mi><mi>v</mi></mrow></msub><mi>Z</mi><mi>Ï</mi><mi>δ</mi><mi>x</mi></mrow><mrow><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mi>A</mi></mrow></mfrac> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">5</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">3</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">4</mn> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msup><mi>z</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>Z</mi></mrow><mrow><mi>A</mi></mrow></mfrac><mi xmlns="http://www.w3.org/1998/Math/MathML">Ï</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi><mspace width="12pt" xmlns="http://www.w3.org/1998/Math/MathML"/><mi xmlns="http://www.w3.org/1998/Math/MathML">keV </mi><mo xmlns="http://www.w3.org/1998/Math/MathML">,</mo> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+where
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt"><fo:inline-included-container><fo:table id="N610"><fo:table-body><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">z</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>charge of the incident particle </fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>N</mi><mrow><mi>A</mi><mi>v</mi></mrow></msub></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>Avogadro's number </fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">Z</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>atomic number of the material</fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">A</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>atomic weight of the material </fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">Ï</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>density </fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>thickness of the material </fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence> </fo:inline-sequence></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:inline-included-container>
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt"><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi></fotex:inlinemath>
+measures the contribution of the collisions with energy transfer close to
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mi>max</mi></msub></fotex:inlinemath>. For a given absorber,
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi></fotex:inlinemath> tends towards large
+values if <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath> is large
+and/or if <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">β</mi></fotex:inlinemath> is small.
+Likewise, <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi></fotex:inlinemath> tends
+towards zero if <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath> is
+small and/or if <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">β</mi></fotex:inlinemath>
+approaches 1.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The value of <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi></fotex:inlinemath>
+distinguishes two regimes which occur in the description of ionisation fluctuations
+:
+</fo:block><fo:list-block font-size="10pt" margin-right="10pt" space-before.optimum="10pt" space-after.optimum="10pt" margin-left="15pt"><fo:list-item><fo:list-item-label><fo:block margin-right="2.5pt" text-align="centered">•</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal">
+<fo:block font-size="10pt" text-align="justified">A
+large
+number
+of
+collisions
+involving
+the
+loss
+of
+all
+or
+most
+of
+the
+incident
+particle
+energy
+during
+the
+traversal
+of
+an
+absorber.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">As
+the
+total
+energy
+transfer
+is
+composed
+of
+a
+multitude
+of
+small
+energy
+losses,
+we
+can
+apply
+the
+central
+limit
+theorem
+and
+describe
+the
+fluctuations
+by
+a
+Gaussian
+distribution.
+This
+case
+is
+applicable
+to
+non-relativistic
+particles
+and
+is
+described
+by
+the
+inequality
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">&gt;</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath>
+(i.e.
+when
+the
+mean
+energy
+loss
+in
+the
+absorber
+is
+greater
+than
+the
+maximum
+energy
+transfer
+in
+a
+single
+collision).
+</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item><fo:list-item-label><fo:block margin-right="2.5pt" text-align="centered">•</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal">
+<fo:block font-size="10pt" text-align="justified">Particles
+traversing
+thin
+counters
+and
+incident
+electrons
+under
+any
+conditions.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The
+relevant
+inequalities
+and
+distributions
+are
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">&lt;</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">&lt;</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath>,
+Vavilov
+distribution,
+and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">&lt;</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn></fotex:inlinemath>,
+Landau
+distribution.</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block>
+<fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">An additional regime is defined by the contribution of the collisions
+with low energy transfer which can be estimated with the relation
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>I</mi><mrow><mn>0</mn></mrow></msub></fotex:inlinemath>,
+where <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>I</mi><mrow><mn>0</mn></mrow></msub></fotex:inlinemath>
+is the mean ionisation potential of the atom. Landau theory assumes that
+the number of these collisions is high, and consequently, it has a restriction
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>I</mi><mrow><mn>0</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">≫</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn></fotex:inlinemath>. In <fo:inline-sequence font-family="Computer-Modern-Typewriter">GEANT</fo:inline-sequence> (see
+URL <fo:inline-sequence font-family="Computer-Modern-Typewriter" color="green"><fo:simple-link external-destination="http://wwwinfo.cern.ch/asdoc/geant/geantall.html">http://wwwinfo.cern.ch/asdoc/geant/geantall.html</fo:simple-link></fo:inline-sequence>), the limit of Landau theory has
+been set at <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>I</mi><mrow><mn>0</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">5</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath>.
+Below this limit special models taking into account the atomic structure of the material are
+used. This is important in thin layers and gaseous materials. Figure <fo:inline-sequence color="green"><fo:simple-link internal-destination="fg:phys332-1">1</fo:simple-link></fo:inline-sequence> shows the behaviour
+of <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>I</mi><mrow><mn>0</mn></mrow></msub></fotex:inlinemath> as
+a function of the layer thickness for an electron of 100 keV and 1 GeV of kinetic
+energy in Argon, Silicon and Uranium.
+</fo:block>
+<fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt"><fo:float id="fg:phys332-1"><fo:block text-align-last="centered"><fo:display-graphic href="phys332-1"/></fo:block><fo:block text-align-last="centered">Figure 1. The variable <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>I</mi><mrow><mn>0</mn></mrow></msub></fotex:inlinemath>
+can be used to measure the validity range of the Landau
+theory. It depends on the type and energy of the particle,
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">Z</mi></fotex:inlinemath>,
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">A</mi></fotex:inlinemath>
+and the ionisation potential of the material and the layer thickness. </fo:block></fo:float></fo:block>
+<fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">In the following sections, the different theories and models for the energy loss
+fluctuation are described. First, the Landau theory and its limitations are discussed,
+and then, the Vavilov and Gaussian straggling functions and the methods in the thin
+layers and gaseous materials are presented.
+</fo:block>
+
+<fo:block keep-with-next="true" id="sec:phys332-1" text-align="start" font-size="18pt" text-indent="-3em" font-weight="bold" space-after="6pt" space-before.optimum="12pt">2. Landau theory<fotex:bookmark fotex-bookmark-level="0" fotex-bookmark-label="sec:phys332-1">2. Landau theory</fotex:bookmark></fo:block>
+
+<fo:block font-size="10pt" text-align="justified">For a particle of mass <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>m</mi><mrow><mi>x</mi></mrow></msub></fotex:inlinemath> traversing
+a thickness of material <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath>,
+the Landau probability distribution may be written in terms of the universal Landau
+function <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">φ</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>λ</mi><mo>)</mo></mrow></fotex:inlinemath>
+as<fo:inline-sequence color="green"><fo:simple-link internal-destination="bib-LAND"> [1]</fo:simple-link></fo:inline-sequence>:
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">f</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>ε</mi><mo>,</mo><mi>δ</mi><mi>x</mi><mo>)</mo></mrow> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><mi>ξ</mi></mrow></mfrac><mi xmlns="http://www.w3.org/1998/Math/MathML">φ</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>λ</mi><mo>)</mo></mrow> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+where
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">φ</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>λ</mi><mo>)</mo></mrow> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><mn>2</mn><mi>π</mi><mi>i</mi></mrow></mfrac><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∫</mo>
+ <mrow><mi>c</mi><mo>+</mo><mi>i</mi><mi>∞</mi></mrow><mrow><mi>c</mi><mo>-</mo><mi>i</mi><mi>∞</mi></mrow></msubsup><mo xmlns="http://www.w3.org/1998/Math/MathML">exp</mo><mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><mi>u</mi><mo>ln</mo><mi>u</mi><mo>+</mo><mi>λ</mi><mi>u</mi></mfenced><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">u</mi><mspace width="2cm" xmlns="http://www.w3.org/1998/Math/MathML"/><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">λ</mi> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>ε</mi><mo>-</mo><munderover accent="true"><mo>̄</mo><mi>ε</mi><mrow/></munderover></mrow><mrow><mi>ξ</mi></mrow></mfrac> <mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">γ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">′</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mo xmlns="http://www.w3.org/1998/Math/MathML">ln</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>ξ</mi></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow></mfrac> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">γ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">′</mi> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">4</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">2</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">2</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">7</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">8</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">4</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">γ</mi> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">γ</mi> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">5</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">7</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">7</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">2</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">5</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mtext xmlns="http://www.w3.org/1998/Math/MathML">(Eulers constant)</mtext> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><munderover accent="true" xmlns="http://www.w3.org/1998/Math/MathML"><mo>̄</mo><mi>ε</mi><mrow/></munderover> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mtext xmlns="http://www.w3.org/1998/Math/MathML">average energy loss</mtext> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ε</mi> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mtext xmlns="http://www.w3.org/1998/Math/MathML">actual energy loss</mtext> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+</fo:block>
+<fo:block keep-with-next="true" id="N1783" text-align="start" font-size="14pt" text-indent="-3em" font-weight="bold" space-after="3pt" space-before.optimum="9pt">2.1. Restrictions<fotex:bookmark fotex-bookmark-level="1" fotex-bookmark-label="N1783">2.1. Restrictions</fotex:bookmark></fo:block>
+
+<fo:block font-size="10pt" text-align="justified">The Landau formalism makes two restrictive assumptions :
+</fo:block><fo:list-block font-size="10pt" margin-right="10pt" space-before.optimum="10pt" space-after.optimum="10pt" margin-left="15pt"><fo:list-item><fo:list-item-label><fo:block margin-right="2.5pt" text-align="centered">•</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal">
+<fo:block font-size="10pt" text-align="justified">The
+typical
+energy
+loss
+is
+small
+compared
+to
+the
+maximum
+energy
+loss
+in
+a
+single
+collision.
+This
+restriction
+is
+removed
+in
+the
+Vavilov
+theory
+(see
+section
+<fo:inline-sequence color="green"><fo:simple-link internal-destination="vavref">3 (Vavilov theory)</fo:simple-link></fo:inline-sequence>).
+</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item><fo:list-item-label><fo:block margin-right="2.5pt" text-align="centered">•</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal">
+<fo:block font-size="10pt" text-align="justified">The
+typical
+energy
+loss
+in
+the
+absorber
+should
+be
+large
+compared
+to
+the
+binding
+energy
+of
+the
+most
+tightly
+bound
+electron.
+For
+gaseous
+detectors,
+typical
+energy
+losses
+are
+a
+few
+keV
+which
+is
+comparable
+to
+the
+binding
+energies
+of
+the
+inner
+electrons.
+In
+such
+cases
+a
+more
+sophisticated
+approach
+which
+accounts
+for
+atomic
+energy
+levels<fo:inline-sequence color="green"><fo:simple-link internal-destination="bib-TALM"> [4]</fo:simple-link></fo:inline-sequence>
+is
+necessary
+to
+accurately
+simulate
+data
+distributions.
+In
+<fo:inline-sequence font-family="Computer-Modern-Typewriter">GEANT</fo:inline-sequence>,
+a
+parameterised
+model
+by
+L.
+Urbán
+is
+used
+(see
+section
+<fo:inline-sequence color="green"><fo:simple-link internal-destination="urban">5 (Urbán model)</fo:simple-link></fo:inline-sequence>).</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block>
+<fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">In addition, the average value of the Landau distribution is infinite.
+Summing the Landau fluctuation obtained to the average energy from the
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath>
+tables, we obtain a value which is larger than the one coming from the table. The
+probability to sample a large value is small, so it takes a large number of steps
+(extractions) for the average fluctuation to be significantly larger than zero. This
+introduces a dependence of the energy loss on the step size which can affect
+calculations.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">A solution to this has been to introduce a limit on the value of the
+variable sampled by the Landau distribution in order to keep the average
+fluctuation to 0. The value obtained from the <fo:inline-sequence font-family="Computer-Modern-Typewriter">GLANDO</fo:inline-sequence> routine is:
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>δ</mi><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi><mo>=</mo><mi>ε</mi><mo>-</mo><munderover accent="true"><mo>̄</mo><mi>ε</mi><mrow/></munderover><mo>=</mo><mi>ξ</mi><mrow><mo>(</mo><mi>λ</mi><mo>-</mo><mi>γ</mi><mi>′</mi><mo>+</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo>+</mo><mo>ln</mo> <mfrac><mrow><mi>ξ</mi></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow></mfrac> <mo>)</mo></mrow>
+</mrow></fotex:displaymath>
+In order for this to have average 0, we must impose that:
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML">
+ <munderover accent="true"><mo>̄</mo><mi>λ</mi><mrow/></munderover><mo>=</mo><mo>-</mo><mi>γ</mi><mi>′</mi><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo>-</mo><mo>ln</mo> <mfrac><mrow><mi>ξ</mi></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow></mfrac>
+</mrow></fotex:displaymath>
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">This is realised introducing a <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mtext>max</mtext></mrow></msub><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><munderover accent="true"><mo>̄</mo><mi>λ</mi><mrow/></munderover><mo>)</mo></mrow></fotex:inlinemath>
+such that if only values of <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">λ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mtext>max</mtext></mrow></msub></fotex:inlinemath>
+are accepted, the average value of the distribution is
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><munderover accent="true" xmlns="http://www.w3.org/1998/Math/MathML"><mo>̄</mo><mi>λ</mi><mrow/></munderover></fotex:inlinemath>.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">A parametric fit to the universal Landau distribution has been performed, with following result:
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML">
+ <msub><mi>λ</mi><mrow><mtext>max</mtext></mrow></msub><mo>=</mo><mn>0</mn><mo>.</mo><mn>6</mn><mn>0</mn><mn>7</mn><mn>1</mn><mn>5</mn><mo>+</mo><mn>1</mn><mo>.</mo><mn>1</mn><mn>9</mn><mn>3</mn><mn>4</mn><munderover accent="true"><mo>̄</mo><mi>λ</mi><mrow/></munderover><mo>+</mo><mrow><mo>(</mo><mn>0</mn><mo>.</mo><mn>6</mn><mn>7</mn><mn>7</mn><mn>9</mn><mn>4</mn><mo>+</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>5</mn><mn>2</mn><mn>3</mn><mn>8</mn><mn>2</mn><munderover accent="true"><mi>λ</mi><mrow/><mo>̄</mo></munderover><mo>)</mo></mrow><mo>exp</mo><mrow><mo>(</mo><mn>0</mn><mo>.</mo><mn>9</mn><mn>4</mn><mn>7</mn><mn>5</mn><mn>3</mn><mo>+</mo><mn>0</mn><mo>.</mo><mn>7</mn><mn>4</mn><mn>4</mn><mn>4</mn><mn>2</mn><munderover accent="true"><mi>λ</mi><mrow/><mo>̄</mo></munderover><mo>)</mo></mrow>
+</mrow></fotex:displaymath> only values
+smaller than <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mtext>max</mtext></mrow></msub></fotex:inlinemath>
+are accepted, otherwise the distribution is resampled.
+</fo:block>
+
+
+<fo:block keep-with-next="true" id="vavref" text-align="start" font-size="18pt" text-indent="-3em" font-weight="bold" space-after="6pt" space-before.optimum="12pt">3. Vavilov theory<fotex:bookmark fotex-bookmark-level="0" fotex-bookmark-label="vavref">3. Vavilov theory</fotex:bookmark></fo:block>
+
+<fo:block font-size="10pt" text-align="justified">Vavilov<fo:inline-sequence color="green"><fo:simple-link internal-destination="bib-VAVI"> [5]</fo:simple-link></fo:inline-sequence> derived a more accurate straggling distribution by introducing the kinematic
+limit on the maximum transferable energy in a single collision, rather than using
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mi>max</mi></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">∞</mi></fotex:inlinemath>. Now
+we can write<fo:inline-sequence color="green"><fo:simple-link internal-destination="bib-SCH1"> [2]</fo:simple-link></fo:inline-sequence>:
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">f</mi> <mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><mi>ε</mi><mo>,</mo><mi>δ</mi><mi>s</mi></mfenced> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><mi>ξ</mi></mrow></mfrac><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>φ</mi><mrow><mi>v</mi></mrow></msub> <mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>λ</mi><mrow><mi>v</mi></mrow></msub><mo>,</mo><mi>κ</mi><mo>,</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+where
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>φ</mi><mrow><mi>v</mi></mrow></msub> <mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>λ</mi><mrow><mi>v</mi></mrow></msub><mo>,</mo><mi>κ</mi><mo>,</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><mn>2</mn><mi>π</mi><mi>i</mi></mrow></mfrac><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∫</mo>
+ <mrow><mi>c</mi><mo>+</mo><mi>i</mi><mi>∞</mi></mrow><mrow><mi>c</mi><mo>-</mo><mi>i</mi><mi>∞</mi></mrow></msubsup><mi xmlns="http://www.w3.org/1998/Math/MathML">φ</mi><mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><mi>s</mi></mfenced><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>e</mi><mrow><mi>λ</mi><mi>s</mi></mrow></msup><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">s</mi><mspace width="2cm" xmlns="http://www.w3.org/1998/Math/MathML"/><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">φ</mi><mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><mi>s</mi></mfenced> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mo xmlns="http://www.w3.org/1998/Math/MathML">exp</mo><mfenced open="[" close="]" xmlns="http://www.w3.org/1998/Math/MathML"><mi>κ</mi><mrow><mo>(</mo><mn>1</mn><mo>+</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mi>γ</mi><mo>)</mo></mrow></mfenced><mo xmlns="http://www.w3.org/1998/Math/MathML">exp</mo><mfenced open="[" close="]" xmlns="http://www.w3.org/1998/Math/MathML"><mi>ψ</mi> <mfenced open="(" close=")"><mi>s</mi></mfenced></mfenced><mo xmlns="http://www.w3.org/1998/Math/MathML">,</mo> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">ψ</mi> <mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><mi>s</mi></mfenced> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mi xmlns="http://www.w3.org/1998/Math/MathML">s</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">ln</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">+</mo><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>s</mi><mo>+</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mi>κ</mi><mo>)</mo></mrow><mfenced open="[" close="]" xmlns="http://www.w3.org/1998/Math/MathML"><mo>ln</mo><mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>κ</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>E</mi><mrow>
+<mn>1</mn></mrow></msub><mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>κ</mi><mo>)</mo></mrow></mfenced><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>e</mi><mrow><mo>-</mo><mi>s</mi><mo>/</mo><mi>κ</mi></mrow></msup><mo xmlns="http://www.w3.org/1998/Math/MathML">,</mo> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+and
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>1</mn></mrow></msub><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>z</mi><mo>)</mo></mrow> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msubsup xmlns="http://www.w3.org/1998/Math/MathML"> <mo>∫</mo>
+ <mrow><mi>∞</mi></mrow><mrow><mi>z</mi></mrow></msubsup><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>t</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>e</mi><mrow><mo>-</mo><mi>t</mi></mrow></msup><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">t</mi><mspace width="1cm" xmlns="http://www.w3.org/1998/Math/MathML"/><mtext xmlns="http://www.w3.org/1998/Math/MathML">(the exponential integral)</mtext> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mi>v</mi></mrow></msub> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mfenced open="[" close="]" xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mrow><mi>ε</mi><mo>-</mo><munderover accent="true"><mo>̄</mo><mi>ε</mi><mrow/></munderover></mrow><mrow><mi>ξ</mi></mrow></mfrac> <mo>-</mo><mi>γ</mi><mi>′</mi><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The Vavilov parameters are simply related to the Landau parameter by
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mi>L</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mi>v</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mo xmlns="http://www.w3.org/1998/Math/MathML">ln</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi></fotex:inlinemath>. It can be shown that
+as <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">→</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath>, the distribution of
+the variable <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mi>L</mi></mrow></msub></fotex:inlinemath> approaches
+that of Landau. For <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">.</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn></fotex:inlinemath>
+the two distributions are already practically identical. Contrary to what many textbooks
+report, the Vavilov distribution <fo:inline-sequence font-style="italic">does not</fo:inline-sequence> approximate the Landau distribution for small
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi></fotex:inlinemath>, but rather the
+distribution of <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mi>L</mi></mrow></msub></fotex:inlinemath>
+defined above tends to the distribution of the true
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">λ</mi></fotex:inlinemath> from
+the Landau density function. Thus the routine <fo:inline-sequence font-family="Computer-Modern-Typewriter">GVAVIV</fo:inline-sequence> samples the variable
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mi>L</mi></mrow></msub></fotex:inlinemath> rather
+than <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>λ</mi><mrow><mi>v</mi></mrow></msub></fotex:inlinemath>.
+For <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath>
+the Vavilov distribution tends to a Gaussian distribution (see next section).
+</fo:block>
+
+<fo:block keep-with-next="true" id="N3325" text-align="start" font-size="18pt" text-indent="-3em" font-weight="bold" space-after="6pt" space-before.optimum="12pt">4. Gaussian Theory<fotex:bookmark fotex-bookmark-level="0" fotex-bookmark-label="N3325">4. Gaussian Theory</fotex:bookmark></fo:block>
+
+<fo:block font-size="10pt" text-align="justified">Various conflicting forms have been proposed for Gaussian straggling functions, but most
+of these appear to have little theoretical or experimental basis. However, it has been shown<fo:inline-sequence color="green"><fo:simple-link internal-destination="bib-SELT"> [3]</fo:simple-link></fo:inline-sequence>
+that for <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">κ</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath>
+the Vavilov distribution can be replaced by a Gaussian of the form:
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">f</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>ε</mi><mo>,</mo><mi>δ</mi><mi>s</mi><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">≈</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><mi>ξ</mi><msqrt><mfrac><mrow><mn>2</mn><mi>π</mi></mrow><mrow><mi>κ</mi></mrow></mfrac> <mfenced open="(" close=")"><mn>1</mn><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn></mfenced></msqrt></mrow></mfrac><mo xmlns="http://www.w3.org/1998/Math/MathML">exp</mo><mfenced open="[" close="]" xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mrow><msup><mrow><mo>(</mo><mi>ε</mi><mo>-</mo><munderover accent="true"><mo>̄</mo><mi>ε</mi><mrow/></munderover><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>2</mn></mrow></mfrac> <mfrac><mrow><mi>κ</mi></mrow><mrow><msup><mi>ξ</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow></mrow></mfrac></mfenced> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+thus implying
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">mean</mi> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <munderover accent="true" xmlns="http://www.w3.org/1998/Math/MathML"><mo>̄</mo><mi>ε</mi><mrow/></munderover> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mn>2</mn></mrow></msup> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msup><mi>ξ</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mi>κ</mi></mrow></mfrac> <mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">ξ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>
+max</mi></mrow></msub><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+</fotex:subeqn></fotex:eqnarray>
+</fo:block>
+
+<fo:block keep-with-next="true" id="urban" text-align="start" font-size="18pt" text-indent="-3em" font-weight="bold" space-after="6pt" space-before.optimum="12pt">5. Urbán model<fotex:bookmark fotex-bookmark-level="0" fotex-bookmark-label="urban">5. Urbán model</fotex:bookmark></fo:block>
+
+<fo:block font-size="10pt" text-align="justified">The method for computing restricted energy losses with
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">δ</mi></fotex:inlinemath>-ray
+production above given threshold energy in <fo:inline-sequence font-family="Computer-Modern-Typewriter">GEANT</fo:inline-sequence> is a Monte Carlo method that
+can be used for thin layers. It is fast and it can be used for any thickness of a
+medium. Approaching the limit of the validity of Landau's theory, the loss
+distribution approaches smoothly the Landau form as shown in Figure <fo:inline-sequence color="green"><fo:simple-link internal-destination="fg:phys332-2">2</fo:simple-link></fo:inline-sequence>.
+</fo:block>
+<fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt"><fo:float id="fg:phys332-2"><fo:block text-align-last="centered"><fo:display-graphic href="phys332-2"/></fo:block><fo:block text-align-last="centered">Figure 2. Energy loss distribution for a 3 GeV electron in Argon as given by
+standard GEANT. The width of the layers is given in centimeters.</fo:block></fo:float></fo:block>
+<fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">It is assumed that the atoms have only two energy levels with binding energy
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>1</mn></mrow></msub></fotex:inlinemath> and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>2</mn></mrow></msub></fotex:inlinemath>.
+The particle--atom interaction will then be an excitation with energy loss
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>1</mn></mrow></msub></fotex:inlinemath> or
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>2</mn></mrow></msub></fotex:inlinemath>, or
+an ionisation with an energy loss distributed according to a function
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">g</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">∼</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>2</mn></mrow></msup></fotex:inlinemath>:
+<fotex:equation xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mi xmlns="http://www.w3.org/1998/Math/MathML">g</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mi>I</mi></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow></mfrac>
+<mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><msup><mi>E</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac>
+</fotex:equation></fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The
+macroscopic cross-section for excitations (<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">i</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mo xmlns="http://www.w3.org/1998/Math/MathML">,</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">2</mn></fotex:inlinemath>)
+is <fotex:equation id="eq:sigex" xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>Σ</mi><mrow><mi>i</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">C</mi> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></mrow><mrow><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></mrow></mfrac> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>ln</mo><mrow><mo>(</mo><mn>2</mn><mi>m</mi><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><msup><mi>γ</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mo>ln</mo><mrow><mo>(</mo><mn>2</mn><mi>m</mi><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup><msup><mi>γ</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mi>I</mi><mo>)</mo></mrow><mo>-</mo><msup><mi>β</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mn>1</mn><mo>-</mo><mi>r</mi><mo>)</mo></mrow> </fotex:equation>and
+the macroscopic cross-section for ionisation is
+<fotex:equation id="eq:sigion" xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>Σ</mi><mrow><mn>3</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">C</mi> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow><mrow><mi>I</mi><mrow><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>ln</mo><mrow><mo>(</mo><mfrac><mrow><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi></mrow><mrow><mi>I</mi></mrow></mfrac> <mo>)</mo></mrow></mrow></mfrac><mi xmlns="http://www.w3.org/1998/Math/MathML">r</mi> </fotex:equation>
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mi>max</mi></msub></fotex:inlinemath>
+is the <fo:inline-sequence font-family="Computer-Modern-Typewriter">GEANT</fo:inline-sequence> cut for <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">δ</mi></fotex:inlinemath>-production,
+or the maximum energy transfer minus mean ionisation energy, if it is smaller than
+this cut-off value. The following notation is used:
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt"><fo:inline-included-container><fo:table id="N4332"><fo:table-body><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">r</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">,</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">C</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>parameters of the model</fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>atomic energy levels </fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">I</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>mean ionisation energy </fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>oscillator strengths </fo:inline-sequence></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:inline-included-container>
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The model has the parameters <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath>,
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath>,
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">C</mi></fotex:inlinemath> and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">r</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mn>0</mn><mo>≤</mo><mi>r</mi><mo>≤</mo><mn>1</mn><mo>)</mo></mrow></fotex:inlinemath>. The oscillator
+strengths <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath> and the
+atomic level energies <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath>
+should satisfy the constraints
+ <fotex:eqnarray><fotex:subeqn id="eq:fisum" xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">+</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mn>2</mn></mrow></msub> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn id="eq:flnsum" xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">ln</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">+</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mn>2</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">ln</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>2</mn></mrow></msub> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mo xmlns="http://www.w3.org/1998/Math/MathML">ln</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">I</mi>
+</fotex:subeqn></fotex:eqnarray>
+The parameter <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">C</mi></fotex:inlinemath>
+can be defined with the help of the mean energy loss
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath> in the following way: The
+numbers of collisions (<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath>,
+i = 1,2 for the excitation and 3 for the ionisation) follow the Poisson distribution with a mean
+number <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub><mo>&gt;;</mo></mrow></fotex:inlinemath>. In a step
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath> the mean number
+of collisions is <fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub><mo>&gt;;</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>Σ</mi><mrow><mi>i</mi></mrow></msub><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi>
+</fotex:displaymath>The
+mean energy loss <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi></fotex:inlinemath>
+in a step is the sum of the excitation and ionisation contributions
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>d</mi><mi>E</mi></mrow><mrow><mi>d</mi><mi>x</mi></mrow></mfrac> <mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfenced open="[" close="]" xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>Σ</mi><mrow><mn>1</mn></mrow></msub><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>Σ</mi><mrow><mn>2</mn></mrow></msub><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub><mo>+</mo><msub><mi>Σ</mi><mrow><mn>3</mn></mrow></msub><msubsup><mo>∫</mo>
+ <mrow><mi>I</mi></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi></mrow></msubsup><mi>E</mi><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi></mfenced><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi>
+</fotex:displaymath>From
+this, using the equations (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:sigex">2</fo:simple-link></fo:inline-sequence>), (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:sigion">3</fo:simple-link></fo:inline-sequence>), (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:fisum">1</fo:simple-link></fo:inline-sequence>) and (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:flnsum">1</fo:simple-link></fo:inline-sequence>), one can define the parameter
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">C</mi></fotex:inlinemath>
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mi xmlns="http://www.w3.org/1998/Math/MathML">C</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>d</mi><mi>E</mi></mrow><mrow><mi>d</mi><mi>x</mi></mrow></mfrac>
+</fotex:displaymath>
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The following values have been chosen in <fo:inline-sequence font-family="Computer-Modern-Typewriter">GEANT</fo:inline-sequence> for the other parameters:
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML">
+ <mtable equalrows="false" equalcolumns="false"><mtr><mtd><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub><mo>=</mo><mfenced open="{"><mtable equalrows="false" equalcolumns="false"><mtr><mtd><mn>0</mn> </mtd><mtd><mi>if</mi><mi>Z</mi><mo>≤</mo><mn>2</mn></mtd>
+</mtr><mtr><mtd><mn>2</mn><mo>/</mo><mi>Z</mi></mtd><mtd><mi>if</mi><mi>Z</mi><mo>&gt;</mo><mn>2</mn></mtd>
+</mtr><mtr><mtd> </mtd></mtr></mtable> </mfenced></mtd><mtd><mo>⇒</mo></mtd><mtd><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo>=</mo><mn>1</mn><mo>-</mo><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub> </mtd>
+ </mtr><mtr><mtd><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub><mo>=</mo><mn>1</mn><mn>0</mn><msup><mi>Z</mi><mrow><mn>2</mn></mrow></msup><mi>eV </mi> </mtd><mtd><mo>⇒</mo></mtd><mtd><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>=</mo><msup><mfenced open="(" close=")"> <mfrac><mrow><mi>I</mi></mrow><mrow><msubsup><mi>E</mi><mrow><mn>2</mn></mrow><mrow><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub></mrow></msubsup></mrow></mfrac> </mfenced><mrow> <mfrac><mrow><mn>1</mn></mrow><mrow><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub></mrow></mfrac> </mrow></msup></mtd>
+ </mtr><mtr><mtd><mi>r</mi><mo>=</mo><mn>0</mn><mo>.</mo><mn>4</mn> </mtd><mtd> </mtd><mtd> </mtd>
+ </mtr><mtr><mtd> </mtd></mtr></mtable>
+</mrow></fotex:displaymath> With these values
+the atomic level <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>2</mn></mrow></msub></fotex:inlinemath>
+corresponds approximately the K-shell energy of the atoms and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">Z</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mn>2</mn></mrow></msub></fotex:inlinemath> the number of
+K-shell electrons. <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">r</mi></fotex:inlinemath>
+is the only variable which can be tuned freely. It determines the relative contribution
+of ionisation and excitation to the energy loss.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The energy loss is computed with the assumption that the step length (or the relative
+energy loss) is small, and---in consequence---the cross-section can be considered
+constant along the path length. The energy loss due to the excitation is
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>e</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>1</mn></mrow></msub><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">+</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>2</mn></mrow></msub><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>2</mn></mrow></msub>
+</fotex:displaymath>where
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>1</mn></mrow></msub></fotex:inlinemath> and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>2</mn></mrow></msub></fotex:inlinemath>
+are sampled from Poisson distribution as discussed above. The
+loss due to the ionisation can be generated from the distribution
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">g</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>E</mi><mo>)</mo></mrow></fotex:inlinemath> by
+the inverse transformation method:
+ <fotex:eqnarray><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">u</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">F</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>E</mi><mo>)</mo></mrow> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msubsup xmlns="http://www.w3.org/1998/Math/MathML"> <mo>∫</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>E</mi></mrow></msubsup><mi xmlns="http://www.w3.org/1998/Math/MathML">g</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">x</mi> <mtext xmlns="http://www.w3.org/1998/Math/MathML"/>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>F</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>u</mi><mo>)</mo></mrow> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>I</mi></mrow><mrow><mn>1</mn><mo>-</mo><mi>u</mi> <mfrac><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+</fotex:subeqn></fotex:eqnarray>
+where <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">u</mi></fotex:inlinemath> is a uniform random
+number between <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">F</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>I</mi><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath> and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">F</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn></fotex:inlinemath>. The contribution from the
+ionisations will be <fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>i</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∑</mo>
+ <mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></mrow></msubsup> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>I</mi></mrow><mrow><mn>1</mn><mo>-</mo><msub><mi>u</mi><mrow><mi>j</mi></mrow></msub> <mfrac><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac>
+</fotex:displaymath>where
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub></fotex:inlinemath> is the
+number of ionisation (sampled from Poisson distribution). The energy loss in a step will
+then be <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>e</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">+</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>i</mi></mrow></msub></fotex:inlinemath>.
+</fo:block>
+<fo:block keep-with-next="true" id="N5956" text-align="start" font-size="14pt" text-indent="-3em" font-weight="bold" space-after="3pt" space-before.optimum="9pt">5.1. Fast simulation for <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">6</mn></fotex:inlinemath><fotex:bookmark fotex-bookmark-level="1" fotex-bookmark-label="N5956">5.1. Fast simulation for n3≥16</fotex:bookmark></fo:block>
+
+<fo:block font-size="10pt" text-align="justified">If the number of ionisation <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub></fotex:inlinemath>
+is bigger than 16, a faster sampling method can be used. The possible energy loss
+interval is divided in two parts: one in which the number of collisions is large and the
+sampling can be done from a Gaussian distribution and the other in which
+the energy loss is sampled for each collision. Let us call the former interval
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>[</mo><mi>I</mi><mo>,</mo><mi>α</mi><mi>I</mi><mo>]</mo></mrow></fotex:inlinemath> the interval A,
+and the latter <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>[</mo><mi>α</mi><mi>I</mi><mo>,</mo><msub><mi>E</mi><mi>max</mi></msub><mo>]</mo></mrow></fotex:inlinemath> the
+interval B. <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">α</mi></fotex:inlinemath> lies
+between 1 and <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mi>max</mi></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">/</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">I</mi></fotex:inlinemath>.
+A collision with a loss in the interval A happens with the probability
+<fotex:displaymath id="eq:phys332-5" xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mi xmlns="http://www.w3.org/1998/Math/MathML">P</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>α</mi><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∫</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>α</mi><mi>I</mi></mrow></msubsup><mi xmlns="http://www.w3.org/1998/Math/MathML">g</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mrow><mo>(</mo><mi>α</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub><mi>α</mi></mrow></mfrac>
+</fotex:displaymath>The
+mean energy loss and the standard deviation for this type of collision are
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><mi>Δ</mi><mi>E</mi><mrow><mo>(</mo><mi>α</mi><mo>)</mo></mrow><mo>&gt;;</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><mi>P</mi><mrow><mo>(</mo><mi>α</mi><mo>)</mo></mrow></mrow></mfrac><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∫</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>α</mi><mi>I</mi></mrow></msubsup><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">g</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>I</mi><mi>α</mi><mo>ln</mo><mi>α</mi></mrow><mrow><mi>α</mi><mo>-</mo><mn>1</mn></mrow></mfrac>
+</fotex:displaymath>and <fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mn>2</mn></mrow></msup><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>α</mi><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><mi>P</mi><mrow><mo>(</mo><mi>α</mi><mo>)</mo></mrow></mrow></mfrac><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∫</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>α</mi><mi>I</mi></mrow></msubsup><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>2</mn></mrow></msup><mi xmlns="http://www.w3.org/1998/Math/MathML">g</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi xmlns="http://www.w3.org/1998/Math/MathML">d</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>I</mi><mrow><mn>2</mn></mrow></msup><mi xmlns="http://www.w3.org/1998/Math/MathML">α</mi><mfenced open="(" close=")" xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn><mo>-</mo> <mfrac><mrow><mi>α</mi><msup><mo>ln</mo><mrow><mn>2</mn></mrow></msup><mi>α</mi></mrow><mrow><msup><mrow><mo>(</mo><mi>α</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow></mfrac></mfenced>
+</fotex:displaymath>If the
+collision number is high, we assume that the number of the type A collisions can be
+calculated from a Gaussian distribution with the following mean value and standard
+deviation:
+ <fotex:eqnarray><fotex:subeqn id="eq:phys332-1" xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>&gt;;</mo></mrow> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi xmlns="http://www.w3.org/1998/Math/MathML">P</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>α</mi><mo>)</mo></mrow>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn id="eq:phys332-2" xmlns:m="http://www.w3.org/1998/Math/MathML"><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mi>A</mi></mrow><mrow><mn>2</mn></mrow></msubsup> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi xmlns="http://www.w3.org/1998/Math/MathML">P</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>α</mi><mo>)</mo></mrow><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mn>1</mn><mo>-</mo><mi>P</mi><mrow><mo>(</mo><mi>α</mi><mo>)</mo></mrow><mo>)</mo></mrow>
+</fotex:subeqn></fotex:eqnarray>
+It is further assumed that the energy loss in these collisions has a Gaussian
+distribution with
+ <fotex:eqnarray><fotex:subeqn id="eq:phys332-3" xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><mi>Δ</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>&gt;;</mo></mrow> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>A</mi></mrow></msub><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><mi>Δ</mi><mi>E</mi><mrow><mo>(</mo><mi>α</mi><mo>)</mo></mrow><mo>&gt;;</mo></mrow>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn id="eq:phys332-4" xmlns:m="http://www.w3.org/1998/Math/MathML"><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mi>E</mi><mo>,</mo><mi>A</mi></mrow><mrow><mn>2</mn></mrow></msubsup> <mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>A</mi></mrow></msub><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mn>2</mn></mrow></msup><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>α</mi><mo>)</mo></mrow>
+</fotex:subeqn></fotex:eqnarray>
+The energy loss of these collision can then be sampled from the Gaussian
+distribution.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The collisions where the energy loss is in the interval B are sampled directly from
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>B</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∑</mo>
+ <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>-</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub></mrow></msubsup> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>α</mi><mi>I</mi></mrow><mrow><mn>1</mn><mo>-</mo><msub><mi>u</mi><mrow><mi>i</mi></mrow></msub> <mfrac><mrow><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>-</mo><mi>α</mi><mi>I</mi></mrow><mrow><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac>
+</fotex:displaymath>The
+total energy loss is the sum of these two types of collisions:
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML">
+ <mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">+</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mi>B</mi></mrow></msub>
+</fotex:displaymath></fo:block>
+<fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The approximation of equations (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-1">1</fo:simple-link></fo:inline-sequence>), (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-2">1</fo:simple-link></fo:inline-sequence>), (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-3">1</fo:simple-link></fo:inline-sequence>) and (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-4">1</fo:simple-link></fo:inline-sequence>) can be used under the following
+conditions:
+ <fotex:eqnarray><fotex:subeqn id="eq:phys332-6" xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>&gt;;</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mi>A</mi></mrow></msub> <mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo> <mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn id="eq:phys332-7" xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>&gt;;</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">+</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mi>A</mi></mrow></msub> <mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo> <msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub>
+ </fotex:subeqn><fotex:subeqn xmlns:m="http://www.w3.org/1998/Math/MathML">
+ </fotex:subeqn><fotex:subeqn id="eq:phys332-8" xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><mi>Δ</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>&gt;;</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mi>E</mi><mo>,</mo><mi>A</mi></mrow></msub> <mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo> <mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn>
+</fotex:subeqn></fotex:eqnarray>
+where <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">4</mn></fotex:inlinemath>. From
+the equations (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-5">6</fo:simple-link></fo:inline-sequence>), (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-1">1</fo:simple-link></fo:inline-sequence>) and (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-3">1</fo:simple-link></fo:inline-sequence>) and from the conditions (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-6">1</fo:simple-link></fo:inline-sequence>) and (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-7">1</fo:simple-link></fo:inline-sequence>) the following limits can be
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>α</mi><mrow><mi>min</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><mo>(</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mrow><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mrow><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mi>I</mi></mrow></mfrac> <mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo><mi xmlns="http://www.w3.org/1998/Math/MathML">α</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>α</mi><mrow><mtext>max</mtext></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><mo>(</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mrow><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow></mrow><mrow><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi>I</mi></mrow></mfrac>
+</fotex:displaymath>This
+conditions gives a lower limit to number of the ionisations
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub></fotex:inlinemath> for which the fast
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>c</mi><mrow><mn>2</mn></mrow></msup> </fotex:displaymath>As
+in the conditions (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-6">1</fo:simple-link></fo:inline-sequence>), (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-7">1</fo:simple-link></fo:inline-sequence>) and (<fo:inline-sequence color="green"><fo:simple-link internal-destination="eq:phys332-8">1</fo:simple-link></fo:inline-sequence>) the value of
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi></fotex:inlinemath> is as minimum
+4, one gets <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">≥</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">6</mn></fotex:inlinemath>.
+In order to speed the simulation, the maximum value is used for
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">α</mi></fotex:inlinemath>.
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt">The number of collisions with energy loss in the interval B (the number of interactions
+which has to be simulated directly) increases slowly with the total number of collisions
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub></fotex:inlinemath>.
+The maximum number of these collisions can be estimated as
+<fotex:equation xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">-</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>A</mi><mo>,</mo><mi>m</mi><mi>i</mi><mi>n</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">≈</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>&gt;;</mo></mrow><mo>-</mo><msub><mi>σ</mi><mrow><mi>A</mi></mrow></msub><mo>)</mo></mrow>
+</fotex:equation>From the previous
+expressions for <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>&gt;;</mo></mrow></fotex:inlinemath> and
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mrow><mi>A</mi></mrow></msub></fotex:inlinemath> one can derive the
+<fotex:equation xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>B</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>2</mn><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac>
+</fotex:equation>The following
+values are obtained with <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">c</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">4</mn></fotex:inlinemath>:
+</fo:block><fo:block font-size="10pt" text-align="justified" text-indent="1em" space-before="0pt"><fo:inline-included-container><fo:table id="N7981"><fo:table-body><fo:table-row><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence/></fo:table-cell><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mn>3</mn></mrow></msub></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub></fotex:inlinemath></fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence>16 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>16 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence/></fo:table-cell><fo:table-cell><fo:inline-sequence> 200</fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence> 29.63</fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence>20 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>17.78 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence/></fo:table-cell><fo:table-cell><fo:inline-sequence> 500</fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence> 31.01</fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence>50 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>24.24 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence/></fo:table-cell><fo:table-cell><fo:inline-sequence> 1000</fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence> 31.50</fo:inline-sequence></fo:table-cell></fo:table-row><fo:table-row><fo:table-cell><fo:inline-sequence>100 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence>27.59 </fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence/></fo:table-cell><fo:table-cell><fo:inline-sequence><fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">∞</mi></fotex:inlinemath></fo:inline-sequence></fo:table-cell><fo:table-cell><fo:inline-sequence> 32.00</fo:inline-sequence></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:inline-included-container>
+</fo:block>
+
+<fo:block keep-with-next="true" id="N8234" text-align="start" font-size="14pt" text-indent="-3em" font-weight="bold" space-after="3pt" space-before.optimum="9pt">5.2. Special sampling for lower part of the spectrum<fotex:bookmark fotex-bookmark-level="1" fotex-bookmark-label="N8234">5.2. Special sampling for lower part of the spectrum</fotex:bookmark></fo:block>
+
+<fo:block font-size="10pt" text-align="justified">If the step length is very small (<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">5</mn></fotex:inlinemath>
+mm in gases, <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mo xmlns="http://www.w3.org/1998/Math/MathML">≤</mo></fotex:inlinemath>
+2-3 <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">μ</mi></fotex:inlinemath>m in solids)
+the model gives 0 energy loss for some events. To avoid this, the probability of 0 energy loss is
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">P</mi><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>(</mo><mi>Δ</mi><mi>E</mi><mo>=</mo><mn>0</mn><mo>)</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msup xmlns="http://www.w3.org/1998/Math/MathML"><mi>e</mi><mrow><mo>-</mo><mrow><mo>(</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>1</mn></mrow></msub><mo>&gt;</mo></mrow><mo>+</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>2</mn></mrow></msub><mo>&gt;</mo></mrow><mo>+</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>&gt;</mo></mrow><mo>)</mo></mrow></mrow></msup>
+</fotex:displaymath>If the
+probability is bigger than 0.01 a special sampling is done, taking into account the fact that in
+these cases the projectile interacts only with the outer electrons of the atom. An energy level
+<fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><msub xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mrow><mn>0</mn></mrow></msub><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><mn xmlns="http://www.w3.org/1998/Math/MathML">1</mn><mn xmlns="http://www.w3.org/1998/Math/MathML">0</mn></fotex:inlinemath> eV is chosen
+to correspond to the outer electrons. The mean number of collisions can be calculated from
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mrow xmlns="http://www.w3.org/1998/Math/MathML"><mo>&lt;</mo><mi>n</mi><mo>&gt;</mo></mrow><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo> <mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mn>1</mn></mrow><mrow><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow></mfrac>
+</fotex:displaymath>The number
+of collisions <fotex:inlinemath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">n</mi></fotex:inlinemath>
+is sampled from Poisson distribution. In the case of the thin layers, all the
+collisions are considered as ionisations and the energy loss is computed as
+<fotex:displaymath xmlns:m="http://www.w3.org/1998/Math/MathML"><mi xmlns="http://www.w3.org/1998/Math/MathML">Δ</mi><mi xmlns="http://www.w3.org/1998/Math/MathML">E</mi><mo xmlns="http://www.w3.org/1998/Math/MathML">=</mo><msubsup xmlns="http://www.w3.org/1998/Math/MathML"><mo>∑</mo>
+ <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>n</mi></mrow></msubsup>
+<mfrac xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow><mrow><mn>1</mn><mo>-</mo>
+<mfrac><mrow><msub><mi>E</mi><mi>max</mi></msub></mrow>
+<mrow><msub><mi>E</mi><mi>max</mi></msub><mo>+</mo><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow></mfrac>
+<msub><mi>u</mi><mrow><mi>i</mi></mrow></msub></mrow></mfrac>
+</fotex:displaymath>
+</fo:block> <fo:block keep-with-next="true" id="N8570" text-align="start" font-size="18pt" text-indent="-3em" font-weight="bold" space-after="6pt" space-before.optimum="12pt">6. References<fotex:bookmark fotex-bookmark-level="0" fotex-bookmark-label="N8570">6. References</fotex:bookmark></fo:block> <fo:list-block font-size="10pt" margin-right="10pt" space-before.optimum="10pt" space-after.optimum="10pt" margin-left="15pt"><fo:list-item><fo:list-item-label id="bib-LAND"><fo:block margin-right="2.5pt" text-align="end"> [1]</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal"> <fo:block font-size="10pt" text-align="justified">L.Landau. On the Energy Loss of Fast Particles by
+Ionisation. Originally published in <fo:inline-sequence font-style="italic">J. Phys.</fo:inline-sequence>, 8:201,
+1944. Reprinted in D.ter Haar, Editor, <fo:inline-sequence font-style="italic">L.D.Landau, Collected
+papers</fo:inline-sequence>, page 417. Pergamon Press, Oxford, 1965.
+</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item><fo:list-item-label id="bib-SCH1"><fo:block margin-right="2.5pt" text-align="end"> [2]</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal"> <fo:block font-size="10pt" text-align="justified">B.Schorr. Programs for
+the Landau and the Vavilov distributions and the corresponding random
+numbers. <fo:inline-sequence font-style="italic">Comp. Phys. Comm.</fo:inline-sequence>, 7:216, 1974.
+</fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item><fo:list-item-label id="bib-SELT"><fo:block margin-right="2.5pt" text-align="end"> [3]</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal"> <fo:block font-size="10pt" text-align="justified">S.M.Seltzer and
+M.J.Berger. Energy loss straggling of protons and mesons. In
+<fo:inline-sequence font-style="italic">Studies in Penetration of Charged Particles in Matter</fo:inline-sequence>,
+Nuclear Science Series 39, Nat. Academy of Sciences, Washington DC,
+1964. </fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item><fo:list-item-label id="bib-TALM"><fo:block margin-right="2.5pt" text-align="end"> [4]</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal"> <fo:block font-size="10pt" text-align="justified">R.Talman. On the
+statistics of particle identification using ionization. <fo:inline-sequence font-style="italic">Nucl.
+Inst. Meth.</fo:inline-sequence>, 159:189, 1979. </fo:block></fo:block></fo:list-item-body></fo:list-item><fo:list-item><fo:list-item-label id="bib-VAVI"><fo:block margin-right="2.5pt" text-align="end"> [5]</fo:block></fo:list-item-label><fo:list-item-body><fo:block font-weight="normal"> <fo:block font-size="10pt" text-align="justified">P.V.Vavilov. Ionisation losses of high energy
+heavy particles. <fo:inline-sequence font-style="italic">Soviet Physics JETP</fo:inline-sequence>, 5:749,
+1957.</fo:block></fo:block></fo:list-item-body></fo:list-item></fo:list-block>
+ </fo:flow></fo:page-sequence></fo:root> \ No newline at end of file
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/latextei.tex b/Master/texmf-dist/doc/xmltex/passivetex/latextei.tex
new file mode 100644
index 00000000000..40e379d8aa4
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/latextei.tex
@@ -0,0 +1,4 @@
+\def\xmlfile{latextei.xml}
+\input xmltex
+
+
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/latextei.xml b/Master/texmf-dist/doc/xmltex/passivetex/latextei.xml
new file mode 100644
index 00000000000..af9fbb686c4
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/latextei.xml
@@ -0,0 +1,972 @@
+<?xml version="1.0"?>
+<!DOCTYPE TEI.2 SYSTEM "http://www.oucs.ox.ac.uk/dtds/tei-oucs.dtd" [
+<!ENTITY aacute "&#x00E1;">
+<!ENTITY ap "&#x2248;">
+<!ENTITY alpha "&#x03B1;">
+<!ENTITY barwed "&#x22BC;">
+<!ENTITY beta "&#x03B2;">
+<!ENTITY commaspace " ">
+<!ENTITY gamma "&#x03B3;">
+<!ENTITY delta "&#x03B4;">
+<!ENTITY Delta "&#x0394;">
+<!ENTITY dots "&#x2026;">
+<!ENTITY epsi "&#x03B5;">
+<!ENTITY gg "&#x22D9;">
+<!ENTITY Gt "&#x226B;">
+<!ENTITY geq "&#x2265;">
+<!ENTITY infin "&#x221E;">
+<!ENTITY infty "&#x221E;">
+<!ENTITY int "&#x222B;">
+<!ENTITY kappa "&#x03BA;">
+<!ENTITY lambda "&#x03BB;">
+<!ENTITY langle "&#x2329;">
+<!ENTITY leq "&#x2264;">
+<!ENTITY mu "&#x03BC;">
+<!ENTITY nbsp "&#x00A0;">
+<!ENTITY phi "&#x03C6;">
+<!ENTITY pi "&#x3C0;">
+<!ENTITY psi "&#x3C8;">
+<!ENTITY rangle "&#x232A;">
+<!ENTITY rho "&#x3C1;">
+<!ENTITY sigma "&#x3C3;">
+<!ENTITY Sigma "&#x03A3;">
+<!ENTITY sim "&#x223C;">
+<!ENTITY thinspace "&#x2009;">
+<!ENTITY thickspace "&#x2005;">
+<!ENTITY xi "&#x03BE;">
+<!ENTITY prime "&#x2032;">
+<!ENTITY isinv "&#x2208;">
+<!ENTITY macr "&#x0304;">
+<!ENTITY Emax "<msub><mi>E</mi><mi>max</mi></msub>">
+<!ENTITY exp "E<mtext>exp</mtext>">
+<!ENTITY ln "E<mtext>ln</mtext>">
+<!ENTITY Rarr "&#x21D2;">
+<!ENTITY rarr "&#x2192;">
+<!ENTITY GEANT "GEANT">
+<!ENTITY sum "&#x2211;">
+]>
+<TEI.2>
+ <teiHeader>
+ <fileDesc>
+ <titleStmt>
+ <title>A sample article</title>
+ </titleStmt>
+ <publicationStmt>
+ <availability><p>Converted from LaTeX by Sebastian Rahtz</p> </availability>
+ </publicationStmt>
+ <sourceDesc>
+ <p></p>
+ </sourceDesc>
+ </fileDesc>
+ <revisionDesc>
+ <list>
+ <item>
+ <date>23 Oct 1999</date> SR converted from LaTeX</item>
+ </list>
+ </revisionDesc>
+ </teiHeader>
+ <text>
+ <front>
+ <docTitle>
+ <titlePart type="main">Simulation of Energy Loss Straggling</titlePart>
+ </docTitle>
+ <docAuthor>Maria Physicist</docAuthor>
+ <docDate>January 17, 1999</docDate>
+ </front>
+ <body> <div id="intro"> <head>Introduction</head> <p>Due to
+the statistical nature of ionisation energy loss, large fluctuations
+can occur in the amount of energy deposited by a particle traversing
+an absorber element. Continuous processes such as multiple scattering
+and energy loss play a relevant role in the longitudinal and lateral
+development of electromagnetic and hadronic showers, and in the case
+of sampling calorimeters the measured resolution can be significantly
+affected by such fluctuations in their active layers. The description
+of ionisation fluctuations is characterised by the significance
+parameter <formula><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&kappa;</mi></math></formula>, which is
+proportional to the ratio of mean energy loss to the maximum allowed
+energy transfer in a single collision with an atomic electron
+ <formula
+type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow> <mi>&kappa;</mi><mo>=</mo>
+<mfrac>
+ <mrow><mi>&xi;</mi></mrow>
+ <mrow>
+ &Emax;
+ </mrow>
+</mfrac>
+</mrow>
+</math></formula>
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+>&Emax;</math></formula> is the
+maximum transferable energy in a single collision with an atomic electron.
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow>
+ &Emax;<mo>=</mo> <mfrac><mrow><mn>2</mn><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup></mrow><!--____________
+--><mrow><mn>1</mn><mo>+</mo><mn>2</mn><mi>&gamma;</mi><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub><mo>+</mo><msup><mfenced
+open='(' close=')'><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub> </mfenced><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo>,</mo>
+</mrow></math></formula> where
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&gamma;</mi><mo>=</mo><mi>E</mi><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub></math></formula>,
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>E</mi></math></formula> is energy and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub></math></formula> the mass of the
+incident particle, <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>=</mo><mn>1</mn><mo>-</mo><mn>1</mn><mo>/</mo><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup></math></formula>
+and <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub></math></formula> is the
+electron mass. <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&xi;</mi></math></formula>
+comes from the Rutherford scattering crosss section and is defined as:
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&xi;</mi><mo>=</mo><mfrac><mrow><mn>2</mn><mi>&pi;</mi><msup><mi>z</mi><mrow><mn>2</mn></mrow></msup><msup><mi>e</mi><mrow><mn>4</mn></mrow></msup><msub><mi>N</mi><mrow><mi>A</mi><mi>v</mi></mrow></msub><mi>Z</mi><mi>&rho;</mi><mi>&delta;</mi><mi>x</mi></mrow><!--
+ --><mrow><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mi>A</mi></mrow></mfrac> <mo>=</mo><mn>1</mn><mn>5</mn><mn>3</mn><mo>.</mo><mn>4</mn> <mfrac><mrow><msup><mi>z</mi><mrow><mn>2</mn></mrow></msup></mrow><!--
+--><mrow><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mfrac><mrow><mi>Z</mi></mrow><!--
+--><mrow><mi>A</mi></mrow></mfrac><mi>&rho;</mi><mi>&delta;</mi><mi>x</mi><mspace width='12pt'/><mi>keV </mi><mo>,</mo> <mtext></mtext>
+</math></formula></cell></row></table>
+where
+</p><p><table rend="inline"><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>z</mi></math></formula></cell><cell
+>charge of the incident particle </cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>N</mi><mrow><mi>A</mi><mi>v</mi></mrow></msub></math></formula></cell><cell
+>Avogadro's number </cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>Z</mi></math></formula></cell><cell
+>atomic number of the material</cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>A</mi></math></formula></cell><cell
+>atomic weight of the material </cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&rho;</mi></math></formula></cell><cell
+>density </cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&delta;</mi><mi>x</mi></math></formula></cell><cell
+>thickness of the material </cell>
+</row><row><cell
+> </cell>
+</row></table>
+</p><p><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi></math></formula>
+measures the contribution of the collisions with energy transfer close to
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+>&Emax;</math></formula>. For a given absorber,
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi></math></formula> tends towards large
+values if <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&delta;</mi><mi>x</mi></math></formula> is large
+and/or if <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&beta;</mi></math></formula> is small.
+Likewise, <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi></math></formula> tends
+towards zero if <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&delta;</mi><mi>x</mi></math></formula> is
+small and/or if <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&beta;</mi></math></formula>
+approaches 1.
+</p><p>The value of <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi></math></formula>
+distinguishes two regimes which occur in the description of ionisation fluctuations
+:
+</p><list type="enumerate">
+<item>
+<p>A
+large
+number
+of
+collisions
+involving
+the
+loss
+of
+all
+or
+most
+of
+the
+incident
+particle
+energy
+during
+the
+traversal
+of
+an
+absorber.
+</p><p>As
+the
+total
+energy
+transfer
+is
+composed
+of
+a
+multitude
+of
+small
+energy
+losses,
+we
+can
+apply
+the
+central
+limit
+theorem
+and
+describe
+the
+fluctuations
+by
+a
+Gaussian
+distribution.
+This
+case
+is
+applicable
+to
+non-relativistic
+particles
+and
+is
+described
+by
+the
+inequality
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi><mo>&gt;</mo><mn>1</mn><mn>0</mn></math></formula>
+(i.e.
+when
+the
+mean
+energy
+loss
+in
+the
+absorber
+is
+greater
+than
+the
+maximum
+energy
+transfer
+in
+a
+single
+collision).
+</p></item>
+<item>
+<p>Particles
+traversing
+thin
+counters
+and
+incident
+electrons
+under
+any
+conditions.
+</p><p>The
+relevant
+inequalities
+and
+distributions
+are
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mn>0</mn><mo>.</mo><mn>0</mn><mn>1</mn><mo>&lt;</mo><mi>&kappa;</mi><mo>&lt;</mo><mn>1</mn><mn>0</mn></math></formula>,
+Vavilov
+distribution,
+and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi><mo>&lt;</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>1</mn></math></formula>,
+Landau
+distribution.</p></item></list>
+<p>An additional regime is defined by the contribution of the collisions
+with low energy transfer which can be estimated with the relation
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></formula>,
+where <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></formula>
+is the mean ionisation potential of the atom. Landau theory assumes that
+the number of these collisions is high, and consequently, it has a restriction
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub><mo>&Gt;</mo><mn>1</mn></math></formula>. In <code>GEANT</code> (see
+URL <xptr url="http://wwwinfo.cern.ch/asdoc/geant/geantall.html"/>), the limit of Landau theory has
+been set at <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub><mo>=</mo><mn>5</mn><mn>0</mn></math></formula>.
+Below this limit special models taking into account the atomic structure of the material are
+used. This is important in thin layers and gaseous materials. Figure <ptr target="fg:phys332-1"/> shows the behaviour
+of <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></formula> as
+a function of the layer thickness for an electron of 100 keV and 1 GeV of kinetic
+energy in Argon, Silicon and Uranium.
+</p>
+<p><figure file="phys332-1" id="fg:phys332-1">
+<head>The variable <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></formula>
+can be used to measure the validity range of the Landau
+theory. It depends on the type and energy of the particle,
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>Z</mi></math></formula>,
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>A</mi></math></formula>
+and the ionisation potential of the material and the layer thickness. </head>
+</figure></p>
+<p>In the following sections, the different theories and models for the energy loss
+fluctuation are described. First, the Landau theory and its limitations are discussed,
+and then, the Vavilov and Gaussian straggling functions and the methods in the thin
+layers and gaseous materials are presented.
+</p>
+</div>
+<div id="sec:phys332-1">
+<head>Landau theory</head>
+<p>For a particle of mass <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub></math></formula> traversing
+a thickness of material <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&delta;</mi><mi>x</mi></math></formula>,
+the Landau probability distribution may be written in terms of the universal Landau
+function <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&phi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>)</mo></mrow></math></formula>
+as<ptr target="bib-LAND"/>:
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mo>(</mo><mi>&epsi;</mi><mo>,</mo><mi>&delta;</mi><mi>x</mi><mo>)</mo></mrow> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--
+--><mrow><mi>&xi;</mi></mrow></mfrac><mi>&phi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>)</mo></mrow> <mtext></mtext>
+</math></formula></cell></row></table>
+where
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&phi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>)</mo></mrow> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--_
+--><mrow><mn>2</mn><mi>&pi;</mi><mi>i</mi></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>c</mi><mo>+</mo><mi>i</mi><mi>&infin;</mi></mrow><mrow><mi>c</mi><mo>-</mo><mi>i</mi><mi>&infin;</mi></mrow></msubsup><mo>exp</mo><mfenced
+open='(' close=')'><mi>u</mi><mo>ln</mo><mi>u</mi><mo>+</mo><mi>&lambda;</mi><mi>u</mi></mfenced><mi>d</mi><mi>u</mi><mspace width='2cm'/><mi>c</mi><mo>&geq;</mo><mn>0</mn> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&lambda;</mi> <mo>=</mo> <mfrac><mrow><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mo>&macr;</mo><mi>&epsi;</mi><mrow></mrow></munderover></mrow><!--
+ --><mrow><mi>&xi;</mi></mrow></mfrac> <mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>-</mo><mo>ln</mo> <mfrac><mrow><mi>&xi;</mi></mrow><!-- ___
+--><mrow>&Emax;</mrow></mfrac> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&gamma;</mi><mi>&prime;</mi> <mo>=</mo> <mn>0</mn><mo>.</mo><mn>4</mn><mn>2</mn><mn>2</mn><mn>7</mn><mn>8</mn><mn>4</mn><mo>.</mo><mo>.</mo><mo>.</mo><mo>=</mo><mn>1</mn><mo>-</mo><mi>&gamma;</mi> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&gamma;</mi> <mo>=</mo> <mn>0</mn><mo>.</mo><mn>5</mn><mn>7</mn><mn>7</mn><mn>2</mn><mn>1</mn><mn>5</mn><mo>.</mo><mo>.</mo><mo>.</mo><mtext>(Eulers constant)</mtext> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><munderover accent='true'><mo>&macr;</mo><mi>&epsi;</mi><mrow></mrow></munderover> <mo>=</mo> <mtext>average energy loss</mtext> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&epsi;</mi> <mo>=</mo> <mtext>actual energy loss</mtext> <mtext></mtext>
+</math></formula></cell></row></table>
+</p>
+<div >
+<head>Restrictions</head>
+<p>The Landau formalism makes two restrictive assumptions :
+</p><list type="enumerate">
+<item>
+<p>The
+typical
+energy
+loss
+is
+small
+compared
+to
+the
+maximum
+energy
+loss
+in
+a
+single
+collision.
+This
+restriction
+is
+removed
+in
+the
+Vavilov
+theory
+(see
+section
+<ptr target="vavref"/>).
+</p></item>
+<item>
+<p>The
+typical
+energy
+loss
+in
+the
+absorber
+should
+be
+large
+compared
+to
+the
+binding
+energy
+of
+the
+most
+tightly
+bound
+electron.
+For
+gaseous
+detectors,
+typical
+energy
+losses
+are
+a
+few
+keV
+which
+is
+comparable
+to
+the
+binding
+energies
+of
+the
+inner
+electrons.
+In
+such
+cases
+a
+more
+sophisticated
+approach
+which
+accounts
+for
+atomic
+energy
+levels<ptr target="bib-TALM"/>
+is
+necessary
+to
+accurately
+simulate
+data
+distributions.
+In
+<code>GEANT</code>,
+a
+parameterised
+model
+by
+L.
+Urb&aacute;n
+is
+used
+(see
+section
+<ptr target="urban"/>).</p></item></list>
+<p>In addition, the average value of the Landau distribution is infinite.
+Summing the Landau fluctuation obtained to the average energy from the
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi></math></formula>
+tables, we obtain a value which is larger than the one coming from the table. The
+probability to sample a large value is small, so it takes a large number of steps
+(extractions) for the average fluctuation to be significantly larger than zero. This
+introduces a dependence of the energy loss on the step size which can affect
+calculations.
+</p><p>A solution to this has been to introduce a limit on the value of the
+variable sampled by the Landau distribution in order to keep the average
+fluctuation to 0. The value obtained from the <code>GLANDO</code> routine is:
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow>
+ <mi>&delta;</mi><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi><mo>=</mo><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mo>&macr;</mo><mi>&epsi;</mi><mrow></mrow></munderover><mo>=</mo><mi>&xi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>+</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>+</mo><mo>ln</mo> <mfrac><mrow><mi>&xi;</mi></mrow><!-- ___
+--><mrow>&Emax;</mrow></mfrac> <mo>)</mo></mrow>
+</mrow></math></formula>
+In order for this to have average 0, we must impose that:
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow>
+ <munderover accent='true'><mo>&macr;</mo><mi>&lambda;</mi><mrow></mrow></munderover><mo>=</mo><mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>-</mo><mo>ln</mo> <mfrac><mrow><mi>&xi;</mi></mrow><!-- ___
+--><mrow>&Emax;</mrow></mfrac>
+</mrow></math></formula>
+</p><p>This is realised introducing a <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&lambda;</mi><mrow><mtext>max</mtext></mrow></msub><mrow><mo>(</mo><munderover accent='true'><mo>&macr;</mo><mi>&lambda;</mi><mrow></mrow></munderover><mo>)</mo></mrow></math></formula>
+such that if only values of <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&lambda;</mi><mo>&leq;</mo><msub><mi>&lambda;</mi><mrow><mtext>max</mtext></mrow></msub></math></formula>
+are accepted, the average value of the distribution is
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><munderover accent='true'><mo>&macr;</mo><mi>&lambda;</mi><mrow></mrow></munderover></math></formula>.
+</p><p>A parametric fit to the universal Landau distribution has been performed, with following result:
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow>
+ <msub><mi>&lambda;</mi><mrow><mtext>max</mtext></mrow></msub><mo>=</mo><mn>0</mn><mo>.</mo><mn>6</mn><mn>0</mn><mn>7</mn><mn>1</mn><mn>5</mn><mo>+</mo><mn>1</mn><mo>.</mo><mn>1</mn><mn>9</mn><mn>3</mn><mn>4</mn><munderover accent='true'><mo>&macr;</mo><mi>&lambda;</mi><mrow></mrow></munderover><mo>+</mo><mrow><mo>(</mo><mn>0</mn><mo>.</mo><mn>6</mn><mn>7</mn><mn>7</mn><mn>9</mn><mn>4</mn><mo>+</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>5</mn><mn>2</mn><mn>3</mn><mn>8</mn><mn>2</mn><munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&macr;</mo></munderover><mo>)</mo></mrow><mo>exp</mo><mrow><mo>(</mo><mn>0</mn><mo>.</mo><mn>9</mn><mn>4</mn><mn>7</mn><mn>5</mn><mn>3</mn><mo>+</mo><mn>0</mn><mo>.</mo><mn>7</mn><mn>4</mn><mn>4</mn><mn>4</mn><mn>2</mn><munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&macr;</mo></munderover><mo>)</mo></mrow>
+</mrow></math></formula> only values
+smaller than <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&lambda;</mi><mrow><mtext>max</mtext></mrow></msub></math></formula>
+are accepted, otherwise the distribution is resampled.
+</p>
+</div>
+</div>
+<div id="vavref">
+<head>Vavilov theory</head>
+<p>Vavilov<ptr target="bib-VAVI"/> derived a more accurate straggling distribution by introducing the kinematic
+limit on the maximum transferable energy in a single collision, rather than using
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+>&Emax;<mo>=</mo><mi>&infin;</mi></math></formula>. Now
+we can write<ptr target="bib-SCH1"/>:
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi> <mfenced
+open='(' close=')'><mi>&epsi;</mi><mo>,</mo><mi>&delta;</mi><mi>s</mi></mfenced> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--
+--><mrow><mi>&xi;</mi></mrow></mfrac><msub><mi>&phi;</mi><mrow><mi>v</mi></mrow></msub> <mfenced
+open='(' close=')'><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub><mo>,</mo><mi>&kappa;</mi><mo>,</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mtext></mtext>
+</math></formula></cell></row></table>
+where
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>&phi;</mi><mrow><mi>v</mi></mrow></msub> <mfenced
+open='(' close=')'><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub><mo>,</mo><mi>&kappa;</mi><mo>,</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--_
+--><mrow><mn>2</mn><mi>&pi;</mi><mi>i</mi></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>c</mi><mo>+</mo><mi>i</mi><mi>&infin;</mi></mrow><mrow><mi>c</mi><mo>-</mo><mi>i</mi><mi>&infin;</mi></mrow></msubsup><mi>&phi;</mi><mfenced
+open='(' close=')'><mi>s</mi></mfenced><msup><mi>e</mi><mrow><mi>&lambda;</mi><mi>s</mi></mrow></msup><mi>d</mi><mi>s</mi><mspace width='2cm'/><mi>c</mi><mo>&geq;</mo><mn>0</mn> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&phi;</mi><mfenced
+open='(' close=')'><mi>s</mi></mfenced> <mo>=</mo> <mo>exp</mo><mfenced
+open='[' close=']'><mi>&kappa;</mi><mrow><mo>(</mo><mn>1</mn><mo>+</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mi>&gamma;</mi><mo>)</mo></mrow></mfenced><mo>exp</mo><mfenced
+open='[' close=']'><mi>&psi;</mi> <mfenced
+open='(' close=')'><mi>s</mi></mfenced></mfenced><mo>,</mo> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&psi;</mi> <mfenced
+open='(' close=')'><mi>s</mi></mfenced> <mo>=</mo> <mi>s</mi><mo>ln</mo><mi>&kappa;</mi><mo>+</mo><mrow><mo>(</mo><mi>s</mi><mo>+</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mi>&kappa;</mi><mo>)</mo></mrow><mfenced
+open='[' close=']'><mo>ln</mo><mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>E</mi><mrow>
+<mn>1</mn></mrow></msub><mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi><mo>)</mo></mrow></mfenced><mo>-</mo><mi>&kappa;</mi><msup><mi>e</mi><mrow><mo>-</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi></mrow></msup><mo>,</mo> <mtext></mtext>
+</math></formula></cell></row></table>
+and
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mrow><mo>(</mo><mi>z</mi><mo>)</mo></mrow> <mo>=</mo><msubsup> <mo>&int;</mo>
+ <mrow><mi>&infin;</mi></mrow><mrow><mi>z</mi></mrow></msubsup><msup><mi>t</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup><msup><mi>e</mi><mrow><mo>-</mo><mi>t</mi></mrow></msup><mi>d</mi><mi>t</mi><mspace width='1cm'/><mtext>(the exponential integral)</mtext> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub> <mo>=</mo> <mi>&kappa;</mi><mfenced
+open='[' close=']'><mfrac><mrow><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mo>&macr;</mo><mi>&epsi;</mi><mrow></mrow></munderover></mrow><!--
+ --><mrow><mi>&xi;</mi></mrow></mfrac> <mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mtext></mtext>
+</math></formula></cell></row></table>
+</p><p>The Vavilov parameters are simply related to the Landau parameter by
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub><mo>=</mo><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub><mo>/</mo><mi>&kappa;</mi><mo>-</mo><mo>ln</mo><mi>&kappa;</mi></math></formula>. It can be shown that
+as <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi><mo>&rarr;</mo><mn>0</mn></math></formula>, the distribution of
+the variable <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub></math></formula> approaches
+that of Landau. For <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi><mo>&leq;</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>1</mn></math></formula>
+the two distributions are already practically identical. Contrary to what many textbooks
+report, the Vavilov distribution <emph>does not</emph> approximate the Landau distribution for small
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi></math></formula>, but rather the
+distribution of <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub></math></formula>
+defined above tends to the distribution of the true
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&lambda;</mi></math></formula> from
+the Landau density function. Thus the routine <code>GVAVIV</code> samples the variable
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub></math></formula> rather
+than <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub></math></formula>.
+For <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi><mo>&geq;</mo><mn>1</mn><mn>0</mn></math></formula>
+the Vavilov distribution tends to a Gaussian distribution (see next section).
+</p>
+</div>
+<div >
+<head>Gaussian Theory</head>
+<p>Various conflicting forms have been proposed for Gaussian straggling functions, but most
+of these appear to have little theoretical or experimental basis. However, it has been shown<ptr target="bib-SELT"/>
+that for <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&kappa;</mi><mo>&geq;</mo><mn>1</mn><mn>0</mn></math></formula>
+the Vavilov distribution can be replaced by a Gaussian of the form:
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mrow><mo>(</mo><mi>&epsi;</mi><mo>,</mo><mi>&delta;</mi><mi>s</mi><mo>)</mo></mrow><mo>&ap;</mo> <mfrac><mrow><mn>1</mn></mrow><!--________
+--><mrow><mi>&xi;</mi><msqrt><!--<mi>&radical;</mi>
+ ______________--><mfrac><mrow><mn>2</mn><mi>&pi;</mi></mrow><!--
+ --><mrow><mi>&kappa;</mi></mrow></mfrac> <mfenced
+open='(' close=')'><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn></mfenced></msqrt></mrow></mfrac><mo>exp</mo><mfenced
+open='[' close=']'><mfrac><mrow><msup><mrow><mo>(</mo><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mo>&macr;</mo><mi>&epsi;</mi><mrow></mrow></munderover><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><!--
+ --><mrow><mn>2</mn></mrow></mfrac> <mfrac><mrow><mi>&kappa;</mi></mrow><!-- _______
+--><mrow><msup><mi>&xi;</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow></mrow></mfrac></mfenced> <mtext></mtext>
+</math></formula></cell></row></table>
+thus implying
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>mean</mi> <mo>=</mo> <munderover accent='true'><mo>&macr;</mo><mi>&epsi;</mi><mrow></mrow></munderover> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup> <mo>=</mo> <mfrac><mrow><msup><mi>&xi;</mi><mrow><mn>2</mn></mrow></msup></mrow><!--
+ --><mrow><mi>&kappa;</mi></mrow></mfrac> <mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow><mo>=</mo><mi>&xi;</mi><msub><mi>E</mi><mrow><mi>
+max</mi></mrow></msub><mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow> <mtext></mtext>
+</math></formula></cell></row></table>
+</p>
+</div>
+<div id="urban">
+<head>Urb&aacute;n model</head>
+<p>The method for computing restricted energy losses with
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&delta;</mi></math></formula>-ray
+production above given threshold energy in <code>GEANT</code> is a Monte Carlo method that
+can be used for thin layers. It is fast and it can be used for any thickness of a
+medium. Approaching the limit of the validity of Landau's theory, the loss
+distribution approaches smoothly the Landau form as shown in Figure <ptr target="fg:phys332-2"/>.
+</p>
+<p><figure file="phys332-2" id="fg:phys332-2">
+<head>Energy loss distribution for a 3 GeV electron in Argon as given by
+standard GEANT. The width of the layers is given in centimeters.</head>
+</figure></p>
+<p>It is assumed that the atoms have only two energy levels with binding energy
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub></math></formula> and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub></math></formula>.
+The particle--atom interaction will then be an excitation with energy loss
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub></math></formula> or
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub></math></formula>, or
+an ionisation with an energy loss distributed according to a function
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mo>&sim;</mo><mn>1</mn><mo>/</mo><msup><mi>E</mi><mrow><mn>2</mn></mrow></msup></math></formula>:
+<formula type="equation"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mo>=</mo><mfrac><mrow><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow><mi>I</mi></mrow><!--
+ --><mrow>&Emax;</mrow></mfrac>
+<mfrac><mrow><mn>1</mn></mrow><!-- _
+--><mrow><msup><mi>E</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac>
+</math></formula></p><p>The
+macroscopic cross-section for excitations (<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>i</mi><mo>=</mo><mn>1</mn><mo>,</mo><mn>2</mn></math></formula>)
+is <formula id="eq:sigex" type="equation"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <msub><mi>&Sigma;</mi><mrow><mi>i</mi></mrow></msub><mo>=</mo><mi>C</mi> <mfrac><mrow><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></mrow><!--
+--><mrow><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></mrow></mfrac> <mfrac><mrow><mo>ln</mo><mrow><mo>(</mo><mn>2</mn><mi>m</mi><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mrow><!--
+ --><mrow><mo>ln</mo><mrow><mo>(</mo><mn>2</mn><mi>m</mi><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mi>I</mi><mo>)</mo></mrow><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mrow><mo>(</mo><mn>1</mn><mo>-</mo><mi>r</mi><mo>)</mo></mrow> </math></formula>and
+the macroscopic cross-section for ionisation is
+<formula id="eq:sigion" type="equation"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <msub><mi>&Sigma;</mi><mrow><mn>3</mn></mrow></msub><mo>=</mo><mi>C</mi> <mfrac><mrow>&Emax;</mrow><!-- ________________
+--><mrow><mi>I</mi><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>ln</mo><mrow><mo>(</mo><mfrac><mrow>&Emax;<mo>+</mo><mi>I</mi></mrow><!--
+ --><mrow><mi>I</mi></mrow></mfrac> <mo>)</mo></mrow></mrow></mfrac><mi>r</mi> </math></formula>
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML">&Emax;</math></formula>
+is the <code>GEANT</code> cut for <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&delta;</mi></math></formula>-production,
+or the maximum energy transfer minus mean ionisation energy, if it is smaller than
+this cut-off value. The following notation is used:
+</p><p><table rend="inline"><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>r</mi><mo>,</mo><mi>C</mi></math></formula></cell><cell
+>parameters of the model</cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></formula></cell><cell
+>atomic energy levels </cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>I</mi></math></formula></cell><cell
+>mean ionisation energy </cell>
+</row><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></math></formula></cell><cell
+>oscillator strengths </cell>
+</row></table>
+</p><p>The model has the parameters <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></math></formula>,
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></formula>,
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>C</mi></math></formula> and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>r</mi><mrow><mo>(</mo><mn>0</mn><mo>&leq;</mo><mi>r</mi><mo>&leq;</mo><mn>1</mn><mo>)</mo></mrow></math></formula>. The oscillator
+strengths <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></math></formula> and the
+atomic level energies <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></formula>
+should satisfy the constraints
+ <table rend="inline"><row><cell><formula type="subeqn" id="eq:fisum"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub> <mo>=</mo> <mn>1</mn>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn" id="eq:flnsum"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo>ln</mo><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub><mo>ln</mo><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub> <mo>=</mo> <mo>ln</mo><mi>I</mi>
+</math></formula></cell></row></table>
+The parameter <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>C</mi></math></formula>
+can be defined with the help of the mean energy loss
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi></math></formula> in the following way: The
+numbers of collisions (<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub></math></formula>,
+i = 1,2 for the excitation and 3 for the ionisation) follow the Poisson distribution with a mean
+number <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub><mo>>;</mo></mrow></math></formula>. In a step
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&Delta;</mi><mi>x</mi></math></formula> the mean number
+of collisions is <formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub><mo>>;</mo></mrow><mo>=</mo><msub><mi>&Sigma;</mi><mrow><mi>i</mi></mrow></msub><mi>&Delta;</mi><mi>x</mi>
+</math></formula>The
+mean energy loss <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi></math></formula>
+in a step is the sum of the excitation and ionisation contributions
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mfrac><mrow><mi>d</mi><mi>E</mi></mrow><!--
+--><mrow><mi>d</mi><mi>x</mi></mrow></mfrac> <mi>&Delta;</mi><mi>x</mi><mo>=</mo><mfenced
+open='[' close=']'><msub><mi>&Sigma;</mi><mrow><mn>1</mn></mrow></msub><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>&Sigma;</mi><mrow><mn>2</mn></mrow></msub><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub><mo>+</mo><msub><mi>&Sigma;</mi><mrow><mn>3</mn></mrow></msub><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow>&Emax;<mo>+</mo><mi>I</mi></mrow></msubsup><mi>E</mi><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi></mfenced><mi>&Delta;</mi><mi>x</mi>
+</math></formula>From
+this, using the equations (<ptr target="eq:sigex"/>), (<ptr target="eq:sigion"/>), (<ptr target="eq:fisum"/>) and (<ptr target="eq:flnsum"/>), one can define the parameter
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>C</mi></math></formula>
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>C</mi><mo>=</mo><mfrac><mrow><mi>d</mi><mi>E</mi></mrow><!--
+--><mrow><mi>d</mi><mi>x</mi></mrow></mfrac>
+</math></formula>
+</p><p>The following values have been chosen in <code>GEANT</code> for the other parameters:
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow>
+ <mtable equalrows='false' equalcolumns='false'><mtr><mtd><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub><mo>=</mo><mfenced
+open='{' ><mtable equalrows='false' equalcolumns='false'><mtr><mtd><mn>0</mn> </mtd><mtd><mi>if</mi><mi>Z</mi><mo>&leq;</mo><mn>2</mn></mtd>
+</mtr><mtr><mtd><mn>2</mn><mo>/</mo><mi>Z</mi></mtd><mtd><mi>if</mi><mi>Z</mi><mo>&gt;</mo><mn>2</mn></mtd>
+</mtr><mtr><mtd> </mtd></mtr></mtable> </mfenced></mtd><mtd><mo>&Rarr;</mo></mtd><mtd><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo>=</mo><mn>1</mn><mo>-</mo><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub> </mtd>
+ </mtr><mtr><mtd><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub><mo>=</mo><mn>1</mn><mn>0</mn><msup><mi>Z</mi><mrow><mn>2</mn></mrow></msup><mi>eV </mi> </mtd><mtd><mo>&Rarr;</mo></mtd><mtd><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>=</mo><msup><mfenced
+open='(' close=')'> <mfrac><mrow><mi>I</mi></mrow><!--___
+--><mrow><msubsup><mi>E</mi><mrow><mn>2</mn></mrow><mrow><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub></mrow></msubsup></mrow></mfrac> </mfenced><mrow> <mfrac><mrow><mn>1</mn></mrow><!-- _
+--><mrow><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub></mrow></mfrac> </mrow></msup></mtd>
+ </mtr><mtr><mtd><mi>r</mi><mo>=</mo><mn>0</mn><mo>.</mo><mn>4</mn> </mtd><mtd> </mtd><mtd> </mtd>
+ </mtr><mtr><mtd> </mtd></mtr></mtable>
+</mrow></math></formula> With these values
+the atomic level <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub></math></formula>
+corresponds approximately the K-shell energy of the atoms and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>Z</mi><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub></math></formula> the number of
+K-shell electrons. <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>r</mi></math></formula>
+is the only variable which can be tuned freely. It determines the relative contribution
+of ionisation and excitation to the energy loss.
+</p><p>The energy loss is computed with the assumption that the step length (or the relative
+energy loss) is small, and---in consequence---the cross-section can be considered
+constant along the path length. The energy loss due to the excitation is
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>e</mi></mrow></msub><mo>=</mo><msub><mi>n</mi><mrow><mn>1</mn></mrow></msub><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>n</mi><mrow><mn>2</mn></mrow></msub><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub>
+</math></formula>where
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>1</mn></mrow></msub></math></formula> and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>2</mn></mrow></msub></math></formula>
+are sampled from Poisson distribution as discussed above. The
+loss due to the ionisation can be generated from the distribution
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow></math></formula> by
+the inverse transformation method:
+ <table rend="inline"><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>u</mi><mo>=</mo><mi>F</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow> <mo>=</mo><msubsup> <mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>E</mi></mrow></msubsup><mi>g</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mi>d</mi><mi>x</mi> <mtext></mtext>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>E</mi><mo>=</mo><msup><mi>F</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup><mrow><mo>(</mo><mi>u</mi><mo>)</mo></mrow> <mo>=</mo> <mfrac><mrow><mi>I</mi></mrow><!--____
+--><mrow><mn>1</mn><mo>-</mo><mi>u</mi> <mfrac><mrow>&Emax;</mrow><!-- ___
+--><mrow>&Emax;<mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+</math></formula></cell></row></table>
+where <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>u</mi></math></formula> is a uniform random
+number between <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>F</mi><mrow><mo>(</mo><mi>I</mi><mo>)</mo></mrow><mo>=</mo><mn>0</mn></math></formula> and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>F</mi><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>=</mo><mn>1</mn></math></formula>. The contribution from the
+ionisations will be <formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub><mo>=</mo><msubsup><mo>&sum;</mo>
+ <mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></mrow></msubsup> <mfrac><mrow><mi>I</mi></mrow><!--________
+--><mrow><mn>1</mn><mo>-</mo><msub><mi>u</mi><mrow><mi>j</mi></mrow></msub> <mfrac><mrow>&Emax;</mrow><!-- ___
+--><mrow>&Emax;<mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac>
+</math></formula>where
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></formula> is the
+number of ionisation (sampled from Poisson distribution). The energy loss in a step will
+then be <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&Delta;</mi><mi>E</mi><mo>=</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>e</mi></mrow></msub><mo>+</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></formula>.
+</p>
+<div >
+<head>Fast simulation for <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>&geq;</mo><mn>1</mn><mn>6</mn></math></formula></head>
+<p>If the number of ionisation <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></formula>
+is bigger than 16, a faster sampling method can be used. The possible energy loss
+interval is divided in two parts: one in which the number of collisions is large and the
+sampling can be done from a Gaussian distribution and the other in which
+the energy loss is sampled for each collision. Let us call the former interval
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow><mo>[</mo><mi>I</mi><mo>,</mo><mi>&alpha;</mi><mi>I</mi><mo>]</mo></mrow></math></formula> the interval A,
+and the latter <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow><mo>[</mo><mi>&alpha;</mi><mi>I</mi><mo>,</mo>&Emax;<mo>]</mo></mrow></math></formula> the
+interval B. <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&alpha;</mi></math></formula> lies
+between 1 and <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+>&Emax;<mo>/</mo><mi>I</mi></math></formula>.
+A collision with a loss in the interval A happens with the probability
+<formula type="display" id="eq:phys332-5"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>=</mo><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>&alpha;</mi><mi>I</mi></mrow></msubsup><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi><mo>=</mo><mfrac><mrow><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow><mrow><mo>(</mo><mi>&alpha;</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><!--
+ --><mrow>&Emax;<mi>&alpha;</mi></mrow></mfrac>
+</math></formula>The
+mean energy loss and the standard deviation for this type of collision are
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mrow><mo>&lt;</mo><mi>&Delta;</mi><mi>E</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>>;</mo></mrow><mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--___
+--><mrow><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>&alpha;</mi><mi>I</mi></mrow></msubsup><mi>E</mi><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi><mo>=</mo><mfrac><mrow><mi>I</mi><mi>&alpha;</mi><mo>ln</mo><mi>&alpha;</mi></mrow><!--
+ --><mrow><mi>&alpha;</mi><mo>-</mo><mn>1</mn></mrow></mfrac>
+</math></formula>and <formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--___
+--><mrow><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>&alpha;</mi><mi>I</mi></mrow></msubsup><msup><mi>E</mi><mrow><mn>2</mn></mrow></msup><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi><mo>=</mo><msup><mi>I</mi><mrow><mn>2</mn></mrow></msup><mi>&alpha;</mi><mfenced
+open='(' close=')'><mn>1</mn><mo>-</mo> <mfrac><mrow><mi>&alpha;</mi><msup><mo>ln</mo><mrow><mn>2</mn></mrow></msup><mi>&alpha;</mi></mrow><!--_
+--><mrow><msup><mrow><mo>(</mo><mi>&alpha;</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow></mfrac></mfenced>
+</math></formula>If the
+collision number is high, we assume that the number of the type A collisions can be
+calculated from a Gaussian distribution with the following mean value and standard
+deviation:
+ <table rend="inline"><row><cell><formula type="subeqn" id="eq:phys332-1"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow> <mo>=</mo> <msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn" id="eq:phys332-2"><math xmlns="http://www.w3.org/1998/Math/MathML"><msubsup><mi>&sigma;</mi><mrow><mi>A</mi></mrow><mrow><mn>2</mn></mrow></msubsup> <mo>=</mo> <msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mrow><mo>(</mo><mn>1</mn><mo>-</mo><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>)</mo></mrow>
+</math></formula></cell></row></table>
+It is further assumed that the energy loss in these collisions has a Gaussian
+distribution with
+ <table rend="inline"><row><cell><formula type="subeqn" id="eq:phys332-3"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>&lt;</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow> <mo>=</mo> <msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mrow><mo>&lt;</mo><mi>&Delta;</mi><mi>E</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>>;</mo></mrow>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn" id="eq:phys332-4"><math xmlns="http://www.w3.org/1998/Math/MathML"><msubsup><mi>&sigma;</mi><mrow><mi>E</mi><mo>,</mo><mi>A</mi></mrow><mrow><mn>2</mn></mrow></msubsup> <mo>=</mo> <msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><msup><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow>
+</math></formula></cell></row></table>
+The energy loss of these collision can then be sampled from the Gaussian
+distribution.
+</p><p>The collisions where the energy loss is in the interval B are sampled directly from
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>B</mi></mrow></msub><mo>=</mo><msubsup><mo>&sum;</mo>
+ <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>-</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub></mrow></msubsup> <mfrac><mrow><mi>&alpha;</mi><mi>I</mi></mrow><!--_________
+--><mrow><mn>1</mn><mo>-</mo><msub><mi>u</mi><mrow><mi>i</mi></mrow></msub> <mfrac><mrow>&Emax;<mo>+</mo><mi>I</mi><mo>-</mo><mi>&alpha;</mi><mi>I</mi></mrow><!--
+ --><mrow>&Emax;<mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac>
+</math></formula>The
+total energy loss is the sum of these two types of collisions:
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>&Delta;</mi><mi>E</mi><mo>=</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>+</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>B</mi></mrow></msub>
+</math></formula></p>
+<p>The approximation of equations (<ptr target="eq:phys332-1"/>), (<ptr target="eq:phys332-2"/>), (<ptr target="eq:phys332-3"/>) and (<ptr target="eq:phys332-4"/>) can be used under the following
+conditions:
+ <table rend="inline"><row><cell><formula type="subeqn" id="eq:phys332-6"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>-</mo><mi>c</mi><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub> <mo>&geq;</mo> <mn>0</mn>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn" id="eq:phys332-7"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>+</mo><mi>c</mi><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub> <mo>&leq;</mo> <msub><mi>n</mi><mrow><mn>3</mn></mrow></msub>
+ </math></formula></cell></row><row><cell><formula type="subeqn"><math xmlns="http://www.w3.org/1998/Math/MathML">
+ </math></formula></cell></row><row><cell><formula type="subeqn" id="eq:phys332-8"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>&lt;</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>-</mo><mi>c</mi><msub><mi>&sigma;</mi><mrow><mi>E</mi><mo>,</mo><mi>A</mi></mrow></msub> <mo>&geq;</mo> <mn>0</mn>
+</math></formula></cell></row></table>
+where <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>c</mi><mo>&geq;</mo><mn>4</mn></math></formula>. From
+the equations (<ptr target="eq:phys332-5"/>), (<ptr target="eq:phys332-1"/>) and (<ptr target="eq:phys332-3"/>) and from the conditions (<ptr target="eq:phys332-6"/>) and (<ptr target="eq:phys332-7"/>) the following limits can be
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>&alpha;</mi><mrow><mi>min</mi></mrow></msub><mo>=</mo><mfrac><mrow><mrow><mo>(</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow></mrow><!--
+--><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mi>I</mi></mrow></mfrac> <mo>&leq;</mo><mi>&alpha;</mi><mo>&leq;</mo><msub><mi>&alpha;</mi><mrow><mtext>max</mtext></mrow></msub><mo>=</mo><mfrac><mrow><mrow><mo>(</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow></mrow><!--
+--><mrow><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo>&Emax;<mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi>I</mi></mrow></mfrac>
+</math></formula>This
+conditions gives a lower limit to number of the ionisations
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></formula> for which the fast
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>&geq;</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup> </math></formula>As
+in the conditions (<ptr target="eq:phys332-6"/>), (<ptr target="eq:phys332-7"/>) and (<ptr target="eq:phys332-8"/>) the value of
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>c</mi></math></formula> is as minimum
+4, one gets <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>&geq;</mo><mn>1</mn><mn>6</mn></math></formula>.
+In order to speed the simulation, the maximum value is used for
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&alpha;</mi></math></formula>.
+</p><p>The number of collisions with energy loss in the interval B (the number of interactions
+which has to be simulated directly) increases slowly with the total number of collisions
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></formula>.
+The maximum number of these collisions can be estimated as
+<formula type="equation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub><mo>=</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>-</mo><msub><mi>n</mi><mrow><mi>A</mi><mo>,</mo><mi>m</mi><mi>i</mi><mi>n</mi></mrow></msub><mo>&ap;</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mrow><mo>(</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>-</mo><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub><mo>)</mo></mrow>
+</math></formula>From the previous
+expressions for <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow></math></formula> and
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub></math></formula> one can derive the
+<formula type="equation"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>n</mi><mrow><mi>B</mi></mrow></msub><mo>&leq;</mo><msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub><mo>=</mo> <mfrac><mrow><mn>2</mn><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup></mrow><!--_
+--><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac>
+</math></formula>The following
+values are obtained with <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>c</mi><mo>=</mo><mn>4</mn></math></formula>:
+</p><p><table rend="inline"><row><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></formula></cell><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub></math></formula></cell><cell
+></cell><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></formula></cell><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub></math></formula></cell>
+</row><row><cell
+>16 </cell><cell
+>16 </cell><cell
+></cell><cell
+> 200</cell><cell
+> 29.63</cell>
+</row><row><cell
+>20 </cell><cell
+>17.78 </cell><cell
+></cell><cell
+> 500</cell><cell
+> 31.01</cell>
+</row><row><cell
+>50 </cell><cell
+>24.24 </cell><cell
+></cell><cell
+> 1000</cell><cell
+> 31.50</cell>
+</row><row><cell
+>100 </cell><cell
+>27.59 </cell><cell
+></cell><cell
+><formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&infin;</mi></math></formula></cell><cell
+> 32.00</cell>
+</row></table>
+</p>
+</div>
+<div >
+<head>Special sampling for lower part of the spectrum</head>
+<p>If the step length is very small (<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mo>&leq;</mo><mn>5</mn></math></formula>
+mm in gases, <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mo>&leq;</mo></math></formula>
+2-3 <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>&mu;</mi></math></formula>m in solids)
+the model gives 0 energy loss for some events. To avoid this, the probability of 0 energy loss is
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi><mrow><mo>(</mo><mi>&Delta;</mi><mi>E</mi><mo>=</mo><mn>0</mn><mo>)</mo></mrow><mo>=</mo><msup><mi>e</mi><mrow><mo>-</mo><mrow><mo>(</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>1</mn></mrow></msub><mo>></mo></mrow><mo>+</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>2</mn></mrow></msub><mo>></mo></mrow><mo>+</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>></mo></mrow><mo>)</mo></mrow></mrow></msup>
+</math></formula>If the
+probability is bigger than 0.01 a special sampling is done, taking into account the fact that in
+these cases the projectile interacts only with the outer electrons of the atom. An energy level
+<formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub><mo>=</mo><mn>1</mn><mn>0</mn></math></formula> eV is chosen
+to correspond to the outer electrons. The mean number of collisions can be calculated from
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>&lt;</mo><mi>n</mi><mo>></mo></mrow><mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><mrow><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow></mfrac>
+</math></formula>The number
+of collisions <formula><math xmlns="http://www.w3.org/1998/Math/MathML"
+><mi>n</mi></math></formula>
+is sampled from Poisson distribution. In the case of the thin layers, all the
+collisions are considered as ionisations and the energy loss is computed as
+<formula type="display"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&Delta;</mi><mi>E</mi><mo>=</mo><msubsup><mo>&sum;</mo>
+ <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>n</mi></mrow></msubsup>
+<mfrac><mrow><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow><mrow><mn>1</mn><mo>-</mo>
+<mfrac><mrow>&Emax;</mrow>
+<mrow>&Emax;<mo>+</mo><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow></mfrac>
+<msub><mi>u</mi><mrow><mi>i</mi></mrow></msub></mrow></mfrac>
+</math></formula>
+</p> </div> </div> <div
+type="star"> <head>References</head> <list type="bibliography"> <item
+id="bib-LAND"> <p>L.Landau. On the Energy Loss of Fast Particles by
+Ionisation. Originally published in <emph>J. Phys.</emph>, 8:201,
+1944. Reprinted in D.ter Haar, Editor, <emph>L.D.Landau, Collected
+papers</emph>, page 417. Pergamon Press, Oxford, 1965.
+</p></item> <item id="bib-SCH1"> <p>B.Schorr. Programs for
+the Landau and the Vavilov distributions and the corresponding random
+numbers. <emph>Comp. Phys. Comm.</emph>, 7:216, 1974.
+</p></item> <item id="bib-SELT"> <p>S.M.Seltzer and
+M.J.Berger. Energy loss straggling of protons and mesons. In
+<emph>Studies in Penetration of Charged Particles in Matter</emph>,
+Nuclear Science Series 39, Nat. Academy of Sciences, Washington DC,
+1964. </p></item> <item id="bib-TALM"> <p>R.Talman. On the
+statistics of particle identification using ionization. <emph>Nucl.
+Inst. Meth.</emph>, 159:189, 1979. </p></item> <item
+id="bib-VAVI"> <p>P.V.Vavilov. Ionisation losses of high energy
+heavy particles. <emph>Soviet Physics JETP</emph>, 5:749,
+1957.</p></item></list> </div>
+ </body> </text> </TEI.2>
+
+
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/passivetex.xml b/Master/texmf-dist/doc/xmltex/passivetex/passivetex.xml
new file mode 100644
index 00000000000..87ddc55816f
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/passivetex.xml
@@ -0,0 +1,388 @@
+<?xml version="1.0"?>
+<!DOCTYPE TEI.2 SYSTEM "http://www.oucs.ox.ac.uk/dtds/tei-oucs.dtd" [
+ <!ENTITY properties SYSTEM "properties.xml">
+]>
+<TEI.2>
+ <teiHeader>
+ <fileDesc>
+ <titleStmt>
+ <title>PassiveTeX</title>
+ </titleStmt>
+ <publicationStmt>
+ <p> </p>
+ </publicationStmt>
+ <sourceDesc>
+ <p></p>
+ </sourceDesc>
+ </fileDesc>
+ <revisionDesc>
+ <list>
+ <item><date>2000/12/11</date>version 1.4 </item>
+ <item><date>2000/11/23</date>version 1.3 </item>
+ <item><date>2000/10/04</date>version 1.1 </item>
+ <item><date>2000/09/13</date>A couple of changes to property list</item>
+ <item><date>2000/09/12</date>Notes on memory sizes</item>
+ <item><date>2000/06/24</date>Checking links</item>
+ <item><date>2000/05/30</date>Added conformance and dependency notes</item>
+ <item><date>2000/02/07</date>Second version</item>
+ <item><date>1999/08/08</date>First version, authored in TEI XML</item>
+ </list>
+ </revisionDesc>
+ </teiHeader>
+ <text>
+<front>
+<titlePage>
+<docTitle>
+ <titlePart type="main">PassiveTeX</titlePart>
+</docTitle>
+<docAuthor>Sebastian Rahtz</docAuthor>
+<docDate>November 2000</docDate>
+</titlePage>
+</front>
+<body>
+<div>
+<head>Summary</head>
+<list type="unordered">
+<item>
+PassiveTeX is a library of TeX macros which can be used to process an XML
+document which results from an XSL transformation to formatting objects.
+</item>
+<item>
+PassiveTeX provides a rapid development environment for experimenting
+with XSL FO, using a reliable pre-existing formatter
+</item>
+<item>
+Running PassiveTeX with the pdfTeX variant of TeX generates high-quality
+PDF files in a single operation.
+</item>
+<item>
+PassiveTeX shows how TeX can remain the formatter of choice for XML, while
+hiding the details of its operation from the user.
+</item>
+</list>
+<p>
+Available from <xptr
+ url="http://users.ox.ac.uk/~rahtz/passivetex/"/>.
+ The current version is 1.4, 2000/12/11.
+</p>
+</div>
+<div><head>How does it work?</head>
+<p>
+PassiveTeX relies heavily on work by David Carlisle
+(his namespace-aware XML parser written in
+TeX, <code>xmltex</code>), and was developed from my
+<xref url="http://www.tug.org/applications/jadetex/">JadeTeX</xref>
+macros for processing DSSSL via Jade.
+</p>
+<p>
+Taking the XML version of the TEI Lite guidelines
+(<xref url="test/teiu5.xml">teiu5.xml</xref>, with DTD
+<xref url="test/teixlite.dtd">teixlite.dtd</xref>), we apply an XSL stylesheet
+(see my page of <xref url="http://users.ox.ac.uk/~rahtz/tei">TEI style sheets</xref>),
+and run it through James Clark's XT XSL processor:
+<eg>
+ java com.jclark.xsl.sax.Driver teiu5.xml tei.xsl teiu5.fo
+</eg>
+(assuming you have <code>xt.jar</code>, <code>xp.jar</code> and <code>sax.jar</code>
+on your CLASSPATH ). This creates the new XML file
+<xref url="test/teiu5.fo">teiu5.fo</xref>. We now run XMLTeX on this
+<eg>
+ pdfxmltex teiu5.fo
+</eg>
+which creates <xref url="test/teiu5.pdf">teiu5.pdf</xref>. Voila!
+Actually, we need to do
+<eg>
+ pdfxmltex teiu5.fo
+</eg>
+again, to resolve page-number references in the table of contents. For a comparison
+with an HTML rendering of the same document (using XSL again),
+see <xref url="http://users.ox.ac.uk/~rahtz/tei/teiu5.html">teiu5.html</xref>
+on my TEI page. </p>
+</div>
+<div>
+<head>Installation</head>
+<p>
+The PassiveTeX macros should be downloaded (as a ZIP file,
+<xptr url="passivetex.zip"/>), unpacked, and installed in a TeX system (eg in
+<code>texmf/tex/latex/passivetex</code>) in the normal place where you put
+macros. Consult your local documentation or local expert if you do not know
+how to install a new package; on a web2c-based system, don't forget to
+ run <code>mktexlsr</code> when you have the files in place,
+ to update the file lookup table.
+</p>
+<p>
+What about that <code>pdfxmltex</code> command we saw in the last section?
+You don't have it on your system? You need to download
+<xref url="ftp://ftp.tex.ac.uk/tex-archive/macros/xmltex/base.zip">xmltex</xref>
+(that link gives you a ZIP archive of the system) and install it in the your TeX system.
+It too is just a set of TeX macro packages.
+Then you can use it on a file called (eg) <code>teiu5.fo</code> in one of two ways:
+<list type="ordered">
+<item>Build an <code>xmltex</code> format file for pdfTeX with
+<eg>
+pdftex -ini "&amp;pdflatex" pdfxmltex.ini
+</eg>
+and process your file with
+<eg>
+pdflatex "&amp;pdfxmltex" teiu5.fo
+</eg>
+Or,
+</item>
+<item>
+Make a wrapper file called (eg) <code>teiu5.tex</code> looking like this:
+<eg>
+\def\xmlfile{teiu5.fo}
+\input xmltex
+</eg>
+and run pdfTeX on it as normal with
+<eg>
+pdflatex teiu5.tex
+</eg>
+</item>
+</list>
+Do not worry, <code>xmltex</code> knows how to find the PassiveTeX macros as
+it needs them. You will likely need to increase TeX memory
+values (in the file <code>texmf.cnf</code> if you use a Web2c-based TeX);
+I use:
+<eg>
+main_memory = 2500000
+param_size = 1500
+stack_size = 1500
+hash_extra = 50000
+string_vacancies = 45000
+pool_free = 47500
+nest_size = 500
+save_size = 10000
+pool_size = 500000
+max_strings = 55000
+</eg>
+</p>
+<p>
+For reference, the PassiveTeX package consists of the following files:
+<list>
+<item>The core xmltex `style' files for XSL FO XML:
+<eg>
+ fotex.xmt
+ fotex.sty
+</eg>
+</item>
+<item>
+Support for direct formatting of TEI XML with xmltex
+<eg>
+ tei.xmt
+ teixml.sty
+</eg>
+</item>
+<item>
+Some support files, shared with JadeTeX:
+<eg>
+ unicode.sty
+ ucharacters.sty
+ mlnames.sty
+ dummyels.sty
+</eg>
+</item>
+</list>
+</p>
+<p>
+NOTE: TeX has a limit
+on the length of line it can read,
+and some .fo files you generate may cause
+TeX to die with an message about increasing buf_size.
+If you get that, edit your
+<code>texmf.cnf</code> file, increase the size of <code>buf_size</code> (mine is
+200000), and remake any format files.
+</p>
+<div><head>LaTeX package dependencies</head>
+<p>This setup assumes you have a decent modern TeX setup. The TeX Live 5 CD-ROM
+is what I use, and it is up to date
+(see <xptr url="http://www.tug.org/texlive/"/>).
+</p>
+<p> Here is a
+ list of the packages loaded in a typical run of
+ PassiveTeX, with their version numbers where known:
+<table rend="rules">
+<row><cell> amsbsy.sty </cell><cell> 1999/11/29 v1.2d</cell></row>
+<row><cell>amsfonts.sty </cell><cell> 1997/09/17 v2.2e</cell></row>
+<row><cell> amsgen.sty </cell><cell> 1999/11/30 v2.0</cell></row>
+<row><cell> amsmath.sty </cell><cell> 2000/03/29 v2.08 AMS math features</cell></row>
+<row><cell> amsopn.sty </cell><cell> 1999/12/14 v2.01 operator names</cell></row>
+<row><cell> amssymb.sty </cell><cell> 1996/11/03 v2.2b</cell></row>
+<row><cell> amstext.sty </cell><cell> 1999/11/15 v2.0</cell></row>
+<row><cell> array.sty </cell><cell> 1998/05/13 v2.3m Tabular extension package (FMi)</cell></row>
+<row><cell> article.cls </cell><cell> 1999/09/10 v1.4a Standard LaTeX document class</cell></row>
+<row><cell> bm.sty </cell><cell> 1999/07/05 v1.0g Bold Symbol Support (DPC/FMi)</cell></row>
+<row><cell> color.sty </cell><cell> 1999/02/16 v1.0i Standard LaTeX Color (DPC)</cell></row>
+<row><cell> fontenc.sty </cell><cell> (version not available)</cell></row>
+<row><cell>graphics.sty </cell><cell> 1999/02/16 v1.0l Standard LaTeX Graphics (DPC,SPQR)</cell></row>
+<row><cell>graphicx.sty </cell><cell> 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)</cell></row>
+<row><cell> hpdftex.def </cell><cell> 2000/05/08 v6.70f Hyperref driver for pdfTeX</cell></row>
+<row><cell>hyperref.sty </cell><cell> 2000/05/08 v6.70f Hypertext links for LaTeX</cell></row>
+<row><cell> ifthen.sty </cell><cell> 1999/09/10 v1.1b Standard LaTeX ifthen package (DPC)</cell></row>
+<row><cell> keyval.sty </cell><cell> 1999/03/16 v1.13 key=value parser (DPC)</cell></row>
+<row><cell>longtable.sty </cell><cell> 1998/05/13 v4.09 Multi-page Table package (DPC)</cell></row>
+<row><cell>multicol.sty </cell><cell> 1999/10/21 v1.5w multicolumn formatting (FMi)</cell></row>
+<row><cell> nameref.sty </cell><cell> 2000/05/08 v2.18 Cross-referencing by name of section</cell></row>
+<row><cell> ot1phv.fd </cell><cell> 2000/01/12 PSNFSS-v8.1 scalable font definitions for OT1/phv.</cell></row>
+<row><cell> pd1enc.def </cell><cell> 2000/05/08 v6.70f Hyperref: PDFDocEncoding definition (HO)</cell></row>
+<row><cell> pifont.sty </cell><cell> 2000/01/12 PSNFSS-v8.1 Pi font support (SPQR) </cell></row>
+<row><cell>rotating.sty </cell><cell> 1997/09/26, v2.13 Rotation package</cell></row>
+<row><cell> size10.clo </cell><cell> 1999/09/10 v1.4a Standard LaTeX file (size option)</cell></row>
+<row><cell>stmaryrd.sty </cell><cell> 1994/03/03 St Mary's Road symbol package</cell></row>
+<row><cell> t1enc.def </cell><cell> 1999/12/08 v1.9x Standard LaTeX file</cell></row>
+<row><cell> t1phv.fd </cell><cell> 2000/01/12 PSNFSS-v8.1 scalable font definitions for T1/phv.</cell></row>
+<row><cell> t1ptm.fd </cell><cell> 2000/01/12 PSNFSS-v8.1 font definitions for T1/ptm.</cell></row>
+<row><cell> t2acmr.fd </cell><cell> 1999/01/07 v1.0 Computer Modern Cyrillic font definitions</cell></row>
+<row><cell> t2aenc.def </cell><cell> 1999/11/29 v1.0c Cyrillic encoding definition file</cell></row>
+<row><cell> t3enc.def </cell><cell> (version not available)</cell></row>
+<row><cell>textcomp.sty </cell><cell> 1999/12/08 v1.9x Standard LaTeX package</cell></row>
+<row><cell> times.sty </cell><cell> 2000/01/12 PSNFSS-v8.1 Times font as default roman (SPQR) </cell></row>
+<row><cell> tipa.sty </cell><cell> 1996/06/10 TIPA version 1.0</cell></row>
+<row><cell> trig.sty </cell><cell> 1999/03/16 v1.09 sin cos tan (DPC)</cell></row>
+<row><cell> ts1cmr.fd </cell><cell> 1999/05/25 v2.5h Standard LaTeX font definitions</cell></row>
+<row><cell> ts1enc.def </cell><cell> 1998/06/12 v3.0d (jk/car/fm) Standard LaTeX file</cell></row>
+<row><cell> ts1ptm.fd </cell><cell> 2000/01/12 PSNFSS-v8.1 font definitions for TS1/ptm.</cell></row>
+<row><cell> ulem.sty </cell><cell> 1997/04/21</cell></row>
+<row><cell> umsa.fd </cell><cell> 1995/01/05 v2.2e AMS font definitions</cell></row>
+<row><cell> umsb.fd </cell><cell> 1995/01/05 v2.2e AMS font definitions</cell></row>
+<row><cell> upsy.fd </cell><cell> 2000/01/12 PSNFSS-v8.1 font definitions for U/psy.</cell></row>
+<row><cell> upzd.fd </cell><cell> 2000/01/12 PSNFSS-v8.1 font definitions for U/pzd.</cell></row>
+<row><cell> url.sty </cell><cell> 1999/03/28 ver 1.5x Verb mode for urls, etc.</cell></row>
+<row><cell> Ustmry.fd </cell><cell> (version not available)</cell></row>
+<row><cell> uwasy.fd </cell><cell> 1999/05/13 v1.0iWasy-2 symbol font definitions</cell></row>
+<row><cell> wasysym.sty </cell><cell> 1999/05/13 v1.0i Wasy-2 symbol support package</cell></row>
+</table>
+</p>
+</div>
+</div>
+
+
+<div>
+<head>Extensions</head>
+<p>
+PassiveTeX interprets MathML natively (elements must use the MathML namespace).
+I also support a <code>bookmark</code> element in the
+<code>fotex</code> namespace, used to make PDF bookmarks. Usage is like this:
+<eg>
+&lt;xsl:template match="div2">
+ &lt;xsl:apply-templates select="head"/>
+ &lt;fotex:bookmark
+ xmlns:fotex="http://www.tug.org/fotex"
+ fotex-bookmark-level="2"
+ fotex-bookmark-label="{@id}">
+ &lt;xsl:value-of select="head"/>
+ &lt;/fotex:bookmark>
+ &lt;/fo:block>
+&lt;/xsl:template>
+</eg>
+</p>
+</div>
+
+
+<div>
+<head>Notes on conformance to the XSL draft specification of November 2000</head>
+&properties;
+</div>
+
+<div>
+<head>Sample files</head>
+<p>
+<list>
+<item> The TEI Lite description (<xref
+url="test/teiu5.xml">teiu5.xml</xref>) converted PDF as <xref
+url="test/teiu5.pdf">teiu5.pdf</xref></item>
+<item> A TEI test file (<xref
+url="test/exercise.xml">exercise.xml</xref>)
+converted to PDF as <xref
+url="test/exercise.pdf">exercise.pdf</xref></item>
+<item> A physics paper (<xref url="test/latextei.xml">latextei.xml</xref>) containing a fair
+ amount of MathML markup, originally
+ translated from LaTeX into XML.
+ It is used extensively as an example in the
+ <xref url="http://cseng.awl.com/bookpage.taf?ISBN=0-201-43311-7&amp;ptype=0&amp;catid=&amp;navmin=&amp;ctype=author&amp;catpage=&amp;seriesid=">LaTeX Web Companion</xref>.
+Here we see it
+ converted to <xref url="test/latextei.pdf">latextei.pdf</xref> using
+ <xref url="test/latextei.xsl">test/latextei.xsl</xref></item>
+<item> James Tauber prepared a simple XSL spec (<xref
+url="test/darkness.xsl">darkness.xsl</xref>) for Joseph Conrad's
+<xref url="test/darkness.xml"><emph>Heart of
+Darkness</emph></xref>, which I ran to PDF as <xref
+url="test/darkness.pdf">darkness.pdf</xref></item>
+</list>
+</p>
+</div>
+
+<div>
+<head>Concerns and problems</head>
+<p>
+Some points to bear in mind
+<list type="ordered">
+ <item> Obviously, the XSL FO spec is still a draft.
+ And this system is not conforming
+ precisely to the current draft. </item>
+ <item> This is an experiment system to check whether the
+ idea works. Expect something more polished eventually.</item>
+ <item> You need a modern TeX setup (like
+ <xref url="http://www.tug.org/teTeX/">teTeX</xref> or
+ <xref url="http://www.tug.org/texlive/">TeX Live</xref>)
+to get to grips with it.</item>
+ <item> Quite a few flow objects and characteristics are not dealt with yet.
+ I will add support for more things as needed or requested.</item>
+ <item> I do not have any objective check that what I think XSL FOs are
+ supposed to do is actually right :-}</item>
+ <item> I have only worked so far with the TEI Lite (XML version) and
+ Docbook DTDs, and probably misinterpreted half of what they say.</item>
+</list>
+</p>
+</div>
+
+<div>
+<head>Things for LaTeX users to remember</head>
+<p>
+<list type="unordered">
+<item> No use is made of LaTeX high-level constructs. No sections,
+ no lists, no cross-refs, no bibliographies; on the other hand,
+ some extensions in the <code>fotex:</code> namespace are supported
+(eg to get Acrobat bookmarks)
+</item>
+<item> XSL FO's underlying character set is Unicode; by default,
+ entities are mapped to their Unicode position;
+</item>
+<item> All vertical and horizontal space is explicit in the
+ specification
+</item>
+<item> Page and line breaking is left to TeX: the rest is up to you.
+</item>
+</list>
+</p>
+</div>
+
+<div>
+<head>Future directions</head>
+<p>
+<list type="unordered">
+<item>Complete the MathML handling</item>
+<item>Handle more variety in property values (eg colors, fonts) </item>
+<item>Deal with more complex tables</item>
+<item>Support SVG. How?
+ <list type="unordered">
+ <item>By direct intepretation and mapping to raw PDF</item>
+ <item>By translation to MetaPost, and spawning a MetaPost process</item>
+ <item>By pre-processing to existing TeX graphics languages</item>
+ </list>
+In any case, SVG fragments need to be recognized directly to perform in-line
+graphical functions (setting text at an angle?)
+</item>
+<item>Use Unicode-based TeX variant (Omega) to handle non-Latin material
+more naturally</item>
+</list>
+</p>
+<p>
+I will be very glad to discuss details with anyone. Contact me (Sebastian Rahtz) as
+<xref url="mailto:sebastian.rahtz@oucs.ox.ac.uk">sebastian.rahtz@oucs.ox.ac.uk</xref>
+</p>
+</div>
+</body>
+</text>
+</TEI.2>
+
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/properties.xml b/Master/texmf-dist/doc/xmltex/passivetex/properties.xml
new file mode 100644
index 00000000000..85cd904b3c0
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/properties.xml
@@ -0,0 +1,592 @@
+<!--
+0. done
+1. more or less OK
+2. not done, but pending when for when I need it
+3. not done, cannot see how to do it
+4. N/A
+-->
+<p>
+The following general limitations apply to most of the PassiveTeX
+ implementation of XSL FO:
+<list type="ordered">
+<item>The `px' unit is not recognised</item>
+<item>Absolute dimensions always work, but proportional ones
+are often not recognized </item>
+<item>The functions allowed in attribute values are usually not
+ recognized</item>
+<item>There is no error checking at all, and all properies are
+ recognized; do not assume that they do anything...</item>
+</list>
+</p>
+<p>
+Most of the formatting objects are implemented more or less; the
+following are not implemented at all:
+<list type="ordered">
+<item><code>fo:bidi-override</code></item>
+<item><code>fo:color-profile</code></item>
+<item><code>fo:declarations</code></item>
+<item><code>fo:initial-property-set</code></item>
+<item><code>fo:instream-foreign-object</code></item>
+<item><code>fo:multi-case</code></item>
+<item><code>fo:multi-properties</code></item>
+<item><code>fo:multi-property-set</code></item>
+<item><code>fo:multi-switch</code></item>
+<item><code>fo:multi-toggle</code></item>
+<item><code>fo:region-end</code></item>
+<item><code>fo:region-start</code></item>
+<item><code>fo:table-footer</code></item>
+</list>
+</p>
+<div><head>Properties needed for basic conformance</head>
+<p>
+<table rend="rules">
+<row><cell>alignment-adjust</cell><cell>auto | percentage | length | inherit</cell><cell>Basic</cell>
+<cell>2. should be possible </cell></row>
+
+<row><cell>azimuth</cell><cell>angle | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side
+] || behind ] | leftwards | rightwards | inherit</cell><cell>Basic</cell>
+<cell>4. N/A </cell></row>
+
+<row><cell>background-color</cell><cell>color | transparent | inherit</cell><cell>Basic</cell> <cell>3. does not really map in TeX </cell></row>
+
+<row><cell>baseline-identifier</cell><cell>baseline | before-edge | text-before-edge | middle | after-edge
+| text-after-edge | ideographic | alphabetic | hanging | mathematical
+| inherit</cell><cell>Basic</cell>
+<cell>3. not at all sure where to start </cell></row>
+
+<row><cell>baseline-shift</cell><cell>baseline | sub | super | percentage | length | inherit</cell><cell>Basic</cell>
+<cell>1. basically works </cell></row>
+
+<row><cell>block-progression-dimension</cell><cell>auto | length | percentage | length-range | inherit</cell><cell>Basic</cell>
+<cell>3. do not really understand it </cell></row>
+
+<row><cell>border-after-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-after-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-after-width</cell><cell>border-width | length-conditional | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-before-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-before-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-before-width</cell><cell>border-width | length-conditional | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-bottom-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-bottom-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>1. used in places </cell></row>
+
+<row><cell>border-bottom-width</cell><cell>border-width | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-end-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-end-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-end-width</cell><cell>border-width | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-left-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-left-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-left-width</cell><cell>border-width | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-right-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-right-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-right-width</cell><cell>border-width | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-start-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-start-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-start-width</cell><cell>border-width | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-top-color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>border-top-style</cell><cell>border-style | inherit</cell><cell>Basic</cell> <cell>1. used in places </cell></row>
+
+<row><cell>border-top-width</cell><cell>border-width | inherit</cell><cell>Basic</cell> <cell>2. works for blocks (non-breaking) </cell></row>
+
+<row><cell>break-after</cell><cell>auto | column | page | even-page | odd-page | inherit</cell><cell>Basic</cell> <cell>0. should be working </cell></row>
+
+<row><cell>break-before</cell><cell>auto | column | page | even-page | odd-page | inherit</cell><cell>Basic</cell> <cell>0. should be working </cell></row>
+
+<row><cell>character</cell><cell>character</cell><cell>Basic</cell> <cell>0. should be working </cell></row>
+
+<row><cell>clip</cell><cell>shape | auto | inherit</cell><cell>Basic</cell> <cell>2. theoretically possible </cell></row>
+
+<row><cell>color</cell><cell>color | inherit</cell><cell>Basic</cell> <cell>1. more or less complete </cell></row>
+
+<row><cell>column-number</cell><cell>number</cell><cell>Basic</cell> <cell>0. OK </cell></row>
+
+<row><cell>column-width</cell><cell>length</cell><cell>Basic</cell> <cell>0. OK </cell></row>
+
+<row><cell>content-type</cell><cell>string | auto</cell><cell>Basic</cell> <cell>4. N/A, I think </cell></row>
+
+<row><cell>cue-after</cell><cell>uri | none | inherit </cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>cue-before</cell><cell>uri | none | inherit </cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>direction</cell><cell>ltr | rtl | inherit</cell><cell>Basic</cell> <cell>3. waiting for extended TeX </cell></row>
+
+<row><cell>display-align</cell><cell>auto | before | center | after | inherit</cell><cell>Basic</cell>
+<cell>0. working </cell></row>
+
+<row><cell>dominant-baseline</cell><cell>auto | autosense-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical
+| inherit</cell><cell>Basic</cell>
+<cell>3. dont know where to begin </cell></row>
+
+<row><cell>elevation</cell><cell>angle | below | level | above | higher | lower | inherit</cell><cell>Basic</cell>
+<cell>4. N/A </cell></row>
+
+<row><cell>end-indent</cell><cell>length | inherit</cell><cell>Basic</cell> <cell>0. working </cell></row>
+
+<row><cell>flow-name</cell><cell>name</cell><cell>Basic</cell> <cell>0. working </cell></row>
+
+<row><cell>font-family</cell><cell>[[ family-name | generic-family ],]* [family-name | generic-family] | inherit</cell><cell>Basic</cell>
+<cell>1. more or less OK </cell></row>
+
+<row><cell>font-size</cell><cell>absolute-size | relative-size | length | percentage | inherit</cell><cell>Basic</cell>
+<cell>1. more or less all implemented </cell></row>
+
+<row><cell>font-style</cell><cell>normal | italic | oblique | backslant | inherit</cell><cell>Basic</cell> <cell>1. no oblique or backslant </cell></row>
+
+<row><cell>font-variant</cell><cell>normal | small-caps | inherit</cell><cell>Basic</cell> <cell>0. done </cell></row>
+
+<row><cell>font-weight</cell><cell>normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit</cell><cell>Basic</cell>
+<cell>1. normal and bold only at present, others to follow</cell></row>
+
+<row><cell>format</cell><cell>string</cell><cell>Basic</cell> <cell>3. dont want to think about it </cell></row>
+
+<row><cell>grouping-separator</cell><cell>character</cell><cell>Basic</cell> <cell>3. dont want to think about it </cell></row>
+
+<row><cell>grouping-size</cell><cell>number</cell><cell>Basic</cell> <cell>3. dont want to think about it </cell></row>
+
+<row><cell>height</cell><cell>length | percentage | auto | inherit</cell><cell>Basic</cell> <cell>2. should be OK, waiting for a need </cell></row>
+
+<row><cell>id</cell><cell> id</cell><cell>Basic</cell> <cell>0. used </cell></row>
+
+<row><cell>initial-page-number</cell><cell>auto | auto-odd | auto-even | number | inherit</cell><cell>Basic</cell> <cell>0. done </cell></row>
+
+<row><cell>inline-progression-dimension</cell><cell>auto | length | percentage | length-range | inherit</cell><cell>Basic</cell>
+<cell>3. have not considered at all </cell></row>
+
+<row><cell>keep-with-next</cell><cell>keep | inherit</cell><cell>Basic</cell> <cell>1. done in theory, not working 100%</cell></row>
+
+<row><cell>keep-with-previous</cell><cell>keep | inherit</cell><cell>Basic</cell> <cell>1. done in theory, not working 100% </cell></row>
+
+<row><cell>leader-length</cell><cell>length-range | inherit</cell><cell>Basic</cell> <cell>2. waiting to do soon </cell></row>
+
+<row><cell>leader-pattern</cell><cell>space | rule | dots | use-content | inherit</cell><cell>Basic</cell> <cell>2. waiting to do soon </cell></row>
+
+<row><cell>letter-value</cell><cell>auto | alphabetic | traditional</cell><cell>Basic</cell> <cell>3. dont want to think about it </cell></row>
+
+<row><cell>line-height</cell><cell>normal | length | number | percentage | space | inherit</cell><cell>Basic</cell>
+<cell>1. largely done </cell></row>
+
+<row><cell>line-stacking-strategy</cell><cell>line-height | font-height | max-height | inherit</cell><cell>Basic</cell> <cell>3. untouched </cell></row>
+
+<row><cell>margin-bottom</cell><cell>margin-width | inherit</cell><cell>Basic</cell> <cell>1. done in places </cell></row>
+
+<row><cell>margin-left</cell><cell>margin-width | inherit</cell><cell>Basic</cell> <cell>1. done in places </cell></row>
+
+<row><cell>margin-right</cell><cell>margin-width | inherit</cell><cell>Basic</cell> <cell>1. done in places </cell></row>
+
+<row><cell>margin-top</cell><cell>margin-width | inherit</cell><cell>Basic</cell> <cell>1. done in places </cell></row>
+
+<row><cell>master-name</cell><cell>name</cell><cell>Basic</cell> <cell>0. ok </cell></row>
+
+<row><cell>max-height</cell><cell>length | percentage | none | inherit </cell><cell>Basic</cell> <cell>2. should be doable </cell></row>
+
+<row><cell>max-width</cell><cell>length | percentage | none | inherit</cell><cell>Basic</cell> <cell>2. should be doable </cell></row>
+
+<row><cell>min-height</cell><cell>length | percentage | inherit </cell><cell>Basic</cell> <cell>2. should be doable </cell></row>
+
+<row><cell>min-width</cell><cell>length | percentage | inherit</cell><cell>Basic</cell> <cell>2. should be doable </cell></row>
+
+<row><cell>number-columns-repeated</cell><cell>number</cell><cell>Basic</cell>
+ <cell>2. doable in theory </cell></row>
+
+<row><cell>number-columns-spanned</cell><cell>number</cell><cell>Basic</cell> <cell>2. doable in theory </cell></row>
+
+<row><cell>number-rows-spanned</cell><cell>number</cell><cell>Basic</cell> <cell>2. doable in theory </cell></row>
+
+<row><cell>orphans</cell><cell>integer | inherit</cell><cell>Basic</cell> <cell>2. should be doable </cell></row>
+
+<row><cell>overflow</cell><cell>visible | hidden | scroll | auto | inherit</cell><cell>Basic</cell> <cell>2. theoretically </cell></row>
+
+<row><cell>padding-after</cell><cell>padding-width | length-conditional | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>padding-before</cell><cell>padding-width | length-conditional | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>padding-bottom</cell><cell>padding-width | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>padding-end</cell><cell>padding-width | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>padding-left</cell><cell>padding-width | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>padding-right</cell><cell>padding-width | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>padding-start</cell><cell>padding-width | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>padding-top</cell><cell>padding-width | inherit</cell><cell>Basic</cell> <cell>1. implemented crudely </cell></row>
+
+<row><cell>page-break-after</cell><cell>auto | always | avoid | left | right | inherit</cell><cell>Basic</cell> <cell>1. Mostly implemented </cell></row>
+
+<row><cell>page-break-before</cell><cell>auto | always | avoid | left | right | inherit</cell><cell>Basic</cell> <cell>1. Mostly implemented </cell></row>
+
+<row><cell>page-height</cell><cell>auto | indefinite | length | inherit</cell><cell>Basic</cell> <cell>1. not all possibilities</cell></row>
+
+<row><cell>page-width</cell><cell>auto | indefinite | length | inherit</cell><cell>Basic</cell> <cell>1. not all possibilities</cell></row>
+
+<row><cell>pause-after</cell><cell>time | percentage | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>pause-before</cell><cell>time | percentage | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>pitch</cell><cell>frequency | x-low | low | medium | high | x-high | inherit</cell><cell>Basic</cell>
+<cell>4. N/A </cell></row>
+
+<row><cell>pitch-range</cell><cell>number | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>play-during</cell><cell>uri mix? repeat? | auto | none | inherit </cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>precedence</cell><cell>true | false | inherit</cell><cell>Basic</cell> <cell>3. do not know where to start </cell></row>
+
+<row><cell>provisional-distance-between-starts</cell><cell>length | inherit</cell><cell>Basic</cell> <cell>1. does something, probably wrong </cell></row>
+
+<row><cell>provisional-label-separation</cell><cell>length | inherit</cell><cell>Basic</cell> <cell>1. does something, probably wrong </cell></row>
+
+<row><cell>ref-id</cell><cell>idref | inherit</cell><cell>Basic</cell> <cell>0. used in pagenumber </cell></row>
+
+<row><cell>reference-orientation</cell><cell> 0 | 90 | 180 | 270 | -90 | -180 | -270 | inherit</cell><cell>Basic</cell> <cell>2. doable for most objects </cell></row>
+
+<row><cell>region-name</cell><cell>xsl-region-body | xsl-region-start | xsl-region-end | xsl-region-before | xsl-region-after | xsl-before-float-separator
+| xsl-footnote-separator | name</cell><cell>Basic</cell>
+<cell>0. done </cell></row>
+
+<row><cell>relative-align</cell><cell>before | baseline | inherit</cell><cell>Basic</cell>
+<cell>3. have not got to grips with this </cell></row>
+
+<row><cell>richness</cell><cell>number | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>role</cell><cell>string | none | inherit</cell><cell>Basic</cell> <cell>4. N/A what should I do with it?</cell></row>
+
+<row><cell>rule-style</cell><cell>none | dotted | dashed | solid | double | groove | ridge | inherit</cell><cell>Basic</cell>
+<cell>1. done as far as possible </cell></row>
+
+<row><cell>rule-thickness</cell><cell>length</cell><cell>Basic</cell> <cell>0. done </cell></row>
+
+<row><cell>source-document</cell><cell>uri+ | none | inherit</cell><cell>Basic</cell> <cell>4. N/A not sure what to do with it</cell></row>
+
+<row><cell>space-after</cell><cell>space | inherit</cell><cell>Basic</cell> <cell>1. working more or less </cell></row>
+
+<row><cell>space-before</cell><cell>space | inherit</cell><cell>Basic</cell> <cell>1. working more or less </cell></row>
+
+<row><cell>space-end</cell><cell>space | inherit</cell><cell>Basic</cell> <cell>1. working more or less </cell></row>
+
+<row><cell>space-start</cell><cell>space | inherit</cell><cell>Basic</cell> <cell>1. working more or less </cell></row>
+
+<row><cell>speak</cell><cell>normal | none | spell-out | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>speak-header</cell><cell>once | always | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>speak-numeral</cell><cell>digits | continuous | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>speak-punctuation</cell><cell>code | none | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>speech-rate</cell><cell>number | x-slow | slow | medium | fast | x-fast | faster | slower | inherit</cell><cell>Basic</cell>
+<cell>4. N/A </cell></row>
+
+<row><cell>src</cell><cell> uri | inherit</cell><cell>Basic</cell> <cell>0. implemented </cell></row>
+
+<row><cell>start-indent</cell><cell>length | inherit</cell><cell>Basic</cell> <cell>0. done </cell></row>
+
+<row><cell>stress</cell><cell>number | inherit</cell><cell>Basic</cell> <cell>4. N/A </cell></row>
+
+<row><cell>text-align</cell><cell>start | center | end | justify | inside | outside | left | right | string | inherit</cell><cell>Basic</cell>
+<cell>0. done </cell></row>
+
+<row><cell>text-indent</cell><cell>length | percentage | inherit</cell><cell>Basic</cell> <cell>0. done </cell></row>
+
+<row><cell>visibility</cell><cell>visible | hidden | collapse | inherit</cell><cell>Basic</cell> <cell>2. I think can do this </cell></row>
+
+<row><cell>voice-family</cell><cell>[[specific-voice | generic-voice ],]* [specific-voice | generic-voice ] | inherit</cell><cell>Basic</cell>
+<cell>4. N/A </cell></row>
+
+<row><cell>volume</cell><cell>number | percentage | silent | x-soft | soft | medium | loud | x-loud | inherit</cell><cell>Basic</cell>
+<cell>4. N/A </cell></row>
+
+<row><cell>widows</cell><cell>integer | inherit</cell><cell>Basic</cell> <cell>2. should be doable </cell></row>
+
+<row><cell>width</cell><cell>length | percentage | auto | inherit</cell><cell>Basic</cell> <cell>2. should be OK, waiting for a need </cell></row>
+
+<row><cell>wrap-option</cell><cell>no-wrap | wrap | inherit</cell><cell>Basic</cell> <cell>0. should be working </cell></row>
+
+<row><cell>writing-mode</cell><cell>lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit</cell><cell>Basic</cell> <cell>3. will need an extended TeX </cell></row>
+
+<row><cell>z-index</cell><cell>auto | integer | inherit</cell><cell>Basic</cell> <cell>3. dont know where to start </cell></row>
+</table>
+</p>
+</div>
+
+
+<div><head>Properties needed for full conformance</head>
+<p>
+<table rend="rules">
+<row><cell>absolute-position</cell><cell>auto | absolute | fixed | inherit</cell><cell>Complete</cell> <cell>2. should be doable </cell></row>
+
+<row><cell>background</cell><cell>[background-color || background-image
+|| background-repeat || background-attachment || background-position
+| ]]inherit</cell><cell>Complete</cell>
+<cell>1. implemented but very fragile </cell></row>
+
+<row><cell>background-position</cell><cell>[ [percentage | length ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>border</cell><cell>[ border-width || border-style || color ] | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>border-bottom</cell><cell>[ border-top-width || border-style || color ] | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>border-color</cell><cell>color{1,4} | transparent | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>border-left</cell><cell>[ border-top-width || border-style || color ] | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>border-right</cell><cell>[ border-top-width || border-style || color ] | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>border-spacing</cell><cell>length length? | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>border-style</cell><cell>border-style{1,4} | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>border-top</cell><cell>[ border-top-width || border-style || color ] | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>border-width</cell><cell>border-width{1,4} | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>caption-side</cell><cell>before | after | start | end | top | bottom | left | right | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>cue</cell><cell>cue-before || cue-after | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>font</cell><cell>[ [ font-style || font-variant || font-weight ]? font-size [ / line-height]? font-family
+] | caption | icon | menu | message-box | small-caption | status-bar
+| inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>margin</cell><cell>margin-width{1,4} | inherit </cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>padding</cell><cell>padding-width{1,4} | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>page-break-inside</cell><cell>avoid | auto | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>pause</cell><cell>[time | percentage]{1,2} | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>position</cell><cell>static | relative | absolute | fixed | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>size</cell><cell>length{1,2} | auto | landscape | portrait | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>vertical-align</cell><cell>baseline | middle | sub | super | text-top | text-bottom | percentage | length | top | bottom | inherit</cell><cell>Complete</cell>
+<cell> </cell></row>
+
+<row><cell>white-space</cell><cell>normal | pre | nowrap | inherit</cell><cell>Complete</cell> <cell> </cell></row>
+
+<row><cell>xml:lang</cell><cell>country-language | inherit</cell><cell>Complete</cell> <cell>2. not done yet, but will be </cell></row>
+</table>
+</p>
+</div>
+
+<div><head>Properties needed for extended conformance</head>
+<p>
+<table rend="rules">
+<row><cell>table-layout</cell><cell>auto | fixed | inherit</cell><cell>Extended.Fallback: fixed</cell> <cell> </cell></row>
+
+<row><cell>background-attachment</cell><cell>scroll | fixed | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>2. I can see where I might start </cell></row>
+
+<row><cell>background-image</cell><cell>uri | none | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>2. I can see where I might start </cell></row>
+
+<row><cell>background-position-horizontal</cell><cell>percentage | length | left | center | right | inherit</cell><cell>Extended.Fallback: Initial value</cell>
+<cell>2. I can see where I might start </cell></row>
+
+<row><cell>background-position-vertical</cell><cell>percentage | length | top | center | bottom | inherit</cell><cell>Extended.Fallback: Initial value</cell>
+<cell>2. I can see where I might start </cell></row>
+
+<row><cell>border-collapse</cell><cell>collapse | separate | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>border-separation</cell><cell>length-bp-ip-direction | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>column-count</cell><cell>number | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>0. implemented </cell></row>
+
+<row><cell>content-height</cell><cell>auto | length | percentage | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>1. done for graphics </cell></row>
+
+<row><cell>content-width</cell><cell>auto | length | percentage | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>1. done for graphics </cell></row>
+
+<row><cell>country</cell><cell>none | country | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>2. waiting to find a use for it </cell></row>
+
+<row><cell>empty-cells</cell><cell>show | hide | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>ends-row</cell><cell>yes | no</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>font-height-override-after</cell><cell>use-font-metrics | length | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>3. need extended TeX </cell></row>
+
+<row><cell>font-height-override-before</cell><cell>use-font-metrics | length | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>3. need extended TeX </cell></row>
+
+<row><cell>font-size-adjust</cell><cell>number | none | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>2. doable, I think </cell></row>
+
+<row><cell>font-stretch</cell><cell>normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded |
+expanded | extra-expanded | ultra-expanded |inherit</cell><cell>Extended.Fallback: Initial value</cell>
+<cell>0. should be OK </cell></row>
+
+<row><cell>glyph-orientation-horizontal</cell><cell>angle | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>3. need extended TeX </cell></row>
+
+<row><cell>glyph-orientation-vertical</cell><cell>auto | angle | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>3. need extended TeX </cell></row>
+
+<row><cell>hyphenate</cell><cell>false | true | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>0. done </cell></row>
+
+<row><cell>keep-together</cell><cell>keep | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>language</cell><cell>none | language | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>0. done, if underlying TeX system OK </cell></row>
+
+<row><cell>last-line-end-indent</cell><cell>length | percentage | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>leader-alignment</cell><cell>none | reference-area | page | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>leader-pattern-width</cell><cell>use-font-metrics | length | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>letter-spacing</cell><cell>normal | length | space | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>2. doable in limited circumstances </cell></row>
+
+<row><cell>line-height-shift-adjustment</cell><cell>consider-shifts | disregard-shifts | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>linefeed-treatment</cell><cell>ignore | preserve | treat-as-space | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>2. doable, if tiresome </cell></row>
+
+<row><cell>relative-position</cell><cell>auto | static | relative | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>scaling</cell><cell>uniform | non-uniform | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>0. ok </cell></row>
+
+<row><cell>scaling-method</cell><cell>auto | integer-pixels | resample-any-method | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>4. N/A, I think </cell></row>
+
+<row><cell>score-spaces</cell><cell>true | false | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>3. dont think I can do this </cell></row>
+
+<row><cell>space-treatment</cell><cell>ignore | preserve | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>0. seems to work </cell></row>
+
+<row><cell>span</cell><cell>none | all | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>3. proving hard </cell></row>
+
+<row><cell>starts-row</cell><cell>yes |
+ no</cell><cell>Extended.Fallback: Initial value</cell>
+ <cell>0. works</cell></row>
+
+<row><cell>suppress-at-line-break</cell><cell>auto | suppress | retain | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>table-omit-footer-at-break</cell><cell>yes | no</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>table-omit-header-at-break</cell><cell>yes | no</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>text-align-last</cell><cell>relative | start | center | end | justify | inside | outside | left | right | string | inherit</cell><cell>Extended.Fallback: Initial value</cell>
+<cell>1. works, usually </cell></row>
+
+<row><cell>text-decoration</cell><cell>none | [ [ underline | no-underline] || [ overline | no-overline ] || [ line-through | no-line-through ] || [ blink | no-blink ] ]
+
+| inherit</cell><cell>Extended.Fallback: Initial value</cell>
+<cell>1. done for some possibilities, not all </cell></row>
+
+<row><cell>text-shadow</cell><cell>none | [color || length length length? ,]* [color || length length length?] | inherit</cell><cell>Extended.Fallback: Initial value</cell>
+<cell> </cell></row>
+
+<row><cell>text-transform</cell><cell>capitalize | uppercase | lowercase | none | </cell><cell>Extended.Fallback: Initial value</cell> <cell>2. doable </cell></row>
+
+<row><cell>treat-as-word-space</cell><cell>auto | yes | no | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>white-space-collapse</cell><cell>false | true | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell>0. Done </cell></row>
+
+<row><cell>word-spacing</cell><cell>normal | length | space | inherit</cell><cell>Extended.Fallback: Initial value</cell> <cell> </cell></row>
+
+<row><cell>bottom</cell><cell>length | percentage | auto | inherit</cell><cell>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</cell> <cell>2. doable, I think </cell></row>
+
+<row><cell>left</cell><cell>length | percentage | auto | inherit</cell><cell>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</cell> <cell>2. doable, I think </cell></row>
+
+<row><cell>right</cell><cell>length | percentage | auto | inherit</cell><cell>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</cell> <cell>2. doable, I think </cell></row>
+
+<row><cell>top</cell><cell>length | percentage | auto | inherit</cell><cell>Extended.Fallback: N/A due to fallback for absolute-position, relative-position</cell> <cell>2. doable, I think </cell></row>
+
+<row><cell>column-gap</cell><cell>length | percentage | inherit</cell><cell>Extended.Fallback: N/A due to fallback for column-count</cell> <cell>1. implemented (not for all value types) </cell></row>
+
+<row><cell>hyphenation-character</cell><cell>character | inherit</cell><cell>Extended.Fallback: N/A due to fallback for hyphenate</cell> <cell>3. need to think about how to do this </cell></row>
+
+<row><cell>hyphenation-keep</cell><cell>auto | column | page | inherit</cell><cell>Extended.Fallback: N/A due to fallback for hyphenate</cell> <cell>3. not sure how to do this </cell></row>
+
+<row><cell>hyphenation-ladder-count</cell><cell>no-limit | number | inherit</cell><cell>Extended.Fallback: N/A due to fallback for hyphenate</cell> <cell>3. I dont see how to do this </cell></row>
+
+<row><cell>hyphenation-push-character-count</cell><cell>number | inherit</cell><cell>Extended.Fallback: N/A due to fallback for hyphenate</cell> <cell>2. I think this maps in TeX </cell></row>
+
+<row><cell>hyphenation-remain-character-count</cell><cell>number | inherit</cell><cell>Extended.Fallback: N/A due to fallback for hyphenate</cell> <cell>2. I think this maps in TeX </cell></row>
+
+<row><cell>color-profile-name</cell><cell>name | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:color-profile</cell> <cell>3. would need a lot of thought </cell></row>
+
+<row><cell>rendering-intent</cell><cell>auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:color-profile</cell> <cell>3. not sure how to do this </cell></row>
+
+<row><cell>clear</cell><cell>start | end | left | right | both | none | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:float</cell> <cell> </cell></row>
+
+<row><cell>float</cell><cell>before | start | end | left | right | none | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:float</cell> <cell> </cell></row>
+
+<row><cell>marker-class-name</cell><cell>name</cell><cell>Extended.Fallback: N/A use fallback for fo:marker</cell> <cell> </cell></row>
+
+<row><cell>active-state</cell><cell>link | visited | active | hover | focus</cell><cell>Extended.Fallback: N/A use fallback for fo:multi-properties</cell> <cell> </cell></row>
+
+<row><cell>auto-restore</cell><cell>yes | no</cell><cell>Extended.Fallback: N/A use fallback for fo:multi-switch</cell> <cell> </cell></row>
+
+<row><cell>case-name</cell><cell>name</cell><cell>Extended.Fallback: N/A use fallback for fo:multi-switch</cell> <cell> </cell></row>
+
+<row><cell>case-title</cell><cell>string</cell><cell>Extended.Fallback: N/A use fallback for fo:multi-switch</cell> <cell> </cell></row>
+
+<row><cell>starting-state</cell><cell>show | hide</cell><cell>Extended.Fallback: N/A use fallback for fo:multi-switch</cell> <cell> </cell></row>
+
+<row><cell>switch-to</cell><cell>xsl-preceding | xsl-following | xsl-any | name[ name]*</cell><cell>Extended.Fallback: N/A use fallback for fo:multi-switch</cell> <cell> </cell></row>
+
+<row><cell>extent</cell><cell>length | percentage | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:region-before, fo:region-after, fo:region-start, and fo:region-end</cell> <cell> </cell></row>
+
+<row><cell>blank-or-not-blank</cell><cell>blank | not-blank | any | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives</cell> <cell>3. dont want to think about it </cell></row>
+
+<row><cell>odd-or-even</cell><cell>odd | even | any | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives</cell> <cell> </cell></row>
+
+<row><cell>page-position</cell><cell>first | last | rest | any | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-alternatives</cell> <cell> </cell></row>
+
+<row><cell>maximum-repeats</cell><cell>number | no-limit | inherit</cell><cell>Extended.Fallback: N/A use fallback for fo:repeatable-page-master-reference and fo:repeatable-page-master-alternatives</cell> <cell> </cell></row>
+
+<row><cell>retrieve-boundary</cell><cell>page | page-sequence | document</cell><cell>Extended.Fallback: N/A use fallback for fo:retrieve-marker</cell> <cell> </cell></row>
+
+<row><cell>retrieve-class-name</cell><cell>name</cell><cell>Extended.Fallback:
+ N/A use fallback for fo:retrieve-marker</cell> <cell>1. works usually </cell></row>
+
+<row><cell>retrieve-position</cell><cell>first-starting-within-page | first-including-carryover | last-starting-within-page | last-ending-within-page</cell><cell>Extended.Fallback: N/A use fallback for fo:retrieve-marker</cell>
+<cell> </cell></row>
+
+<row><cell>destination-placement-offset</cell><cell>length</cell><cell>Extended.Fallback: N/A use fallback for fo:simple-link</cell> <cell> </cell></row>
+
+<row><cell>external-destination</cell><cell>uri-reference</cell><cell>Extended.Fallback:
+ N/A use fallback for fo:simple-link</cell> <cell>0. works ok </cell></row>
+
+<row><cell>indicate-destination</cell><cell>yes |
+ no</cell><cell>Extended.Fallback: N/A use fallback for
+ fo:simple-link</cell> <cell>1. should work </cell></row>
+
+<row><cell>internal-destination</cell><cell>null string |
+ idref</cell><cell>Extended.Fallback: N/A use fallback for
+ fo:simple-link</cell> <cell>0. works </cell></row>
+
+<row><cell>show-destination</cell><cell>replace | new</cell><cell>Extended.Fallback: N/A use fallback for fo:simple-link</cell> <cell> </cell></row>
+
+<row><cell>force-page-count</cell><cell>auto | even | odd | end-on-even | end-on-odd | no-force | inherit</cell><cell>Extended.Fallback: no-force</cell>
+<cell> </cell></row>
+
+<row><cell>background-repeat</cell><cell>repeat | repeat-x | repeat-y | no-repeat | inherit</cell><cell>Extended.Fallback: no-repeat</cell> <cell> </cell></row>
+
+<row><cell>script</cell><cell>none | auto | script | inherit</cell><cell>Extended.Fallback: none</cell> <cell>4. dont know what to do with it </cell></row>
+
+<row><cell>unicode-bidi</cell><cell>normal | embed | bidi-override | inherit</cell><cell>Extended.Fallback: See prose</cell> <cell> </cell>
+</row>
+</table>
+</p>
+</div>
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/test.xml b/Master/texmf-dist/doc/xmltex/passivetex/test.xml
new file mode 100644
index 00000000000..321a22835d4
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/test.xml
@@ -0,0 +1,280 @@
+<?xml version="1.0"?>
+<!DOCTYPE TEI.2 SYSTEM "teixlite.dtd">
+<TEI.2>
+ <teiHeader>
+ <fileDesc>
+ <titleStmt>
+ <title>This and that</title>
+ </titleStmt>
+ <publicationStmt>
+ <p> </p>
+ </publicationStmt>
+ <sourceDesc>
+ <p></p>
+ </sourceDesc>
+ </fileDesc>
+ <revisionDesc>
+ <list>
+ <item><date>October 10th 1999</date>Initial version</item>
+ </list>
+ </revisionDesc>
+ </teiHeader>
+ <text>
+<front>
+ <docTitle>
+ <titlePart type="main">Texts for beginners</titlePart>
+ </docTitle>
+<docAuthor>A N Other</docAuthor>
+<docDate>October 10th 1999</docDate>
+</front>
+<body>
+
+<div><head>The table in section 1</head>
+<p>
+Over the whine of the electric mixer, Mara heard her name called, but she
+didn't bother to acknowledge it. Instead she added more sugar to the egg
+whites and continued to beat them until they formed stiff peaks. She was
+spooning the meringue on to the pie filling when she heard the hum of the
+wheelchair approaching the kitchen.
+</p><p>
+`Mara, the mailman just drove by.' The chair rolled to a stop inside the
+room. `I'm expecting some correspondence from Fitzgerald. Will you see if
+it's come?'
+</p><p>
+Mara didn't turn around. I'm busy at the moment, Adam.' She continued to
+spread the meringue thickly over the pie, ignoring the instant of tense
+silence.
+</p>
+<div><head>The table in section 1</head>
+<q rend="display">
+<table cols="3" rend="inline">
+<row><cell cols="3">AT&amp;T Common Stock</cell></row>
+<row><cell>Year </cell><cell> Price</cell><cell>Dividend</cell></row>
+<row><cell>1971</cell><cell>41--54</cell><cell>$2.60</cell></row>
+<row><cell> 2</cell><cell>41--54</cell><cell>2.70</cell></row>
+<row><cell> 3</cell><cell>46--55</cell><cell>2.87</cell></row>
+<row><cell> 4</cell><cell>40--53</cell><cell>3.24</cell></row>
+<row><cell> 5</cell><cell>45--52</cell><cell>3.40</cell></row>
+<row><cell> 6</cell><cell>51--59</cell><cell>.95*</cell></row>
+<row><cell cols="3">(* first quarter only)</cell></row>
+</table>
+</q>
+
+<eg>
+<![CDATA[
+<xsl:template match="eg">
+ <fo:block font-family="{$typewriterFont}"
+ white-space-collapse="false"
+ wrap-option="no-wrap"
+ text-indent="0em"
+ start-indent="{$exampleMargin}"
+ text-align="start"
+ font-size="{$exampleSize}"
+ background="red"
+ color="white"
+ space-before.optimum="4pt"
+ space-after.optimum="4pt"
+ >
+ <xsl:value-of select="translate(.,' ','&#160;')"/>
+ </fo:block>
+</xsl:template>
+]]>
+</eg>
+</div>
+</div>
+<div><head>LOOMINGS</head>
+
+<p>Call me Ishmael. Some years ago&#8212;never mind how long
+precisely &#8212;having little or no money in my purse, and nothing
+particular to interest me on shore, I thought I would sail about a
+little and see the watery part of the world. It is a way I have of
+driving off the spleen, and regulating the circulation. Whenever I
+find myself growing grim about the mouth; whenever it is a damp,
+drizzly November in my soul; whenever I find myself involuntarily
+pausing before coffin warehouses, and bringing up the rear of every
+funeral I meet; and especially whenever my hypos get such an upper
+hand of me, that it requires a strong moral principle to prevent me
+from deliberately stepping into the street, and methodically knocking
+people's hats off&#8212;then, I account it high time to get to sea as
+soon as I can. This is my substitute for pistol and ball. With a
+philosophical flourish Cato throws himself upon his sword; I quietly
+take to the ship. There is nothing surprising in this. If they but
+knew it, almost all men in their degree, some time or other, cherish
+very nearly the same feelings towards the ocean with me. There now is
+your insular city of the Manhattoes, belted round by wharves as Indian
+isles by coral reefs&#8212;commerce surrounds it with her surf. Right
+and left, the streets take you waterward. Its extreme down-town is
+the battery, where that noble mole is washed by waves, and cooled by
+breezes, which a few hours previous were out of sight of land. Look
+at the crowds of water-gazers there. Circumambulate the city of a
+dreamy Sabbath afternoon. Go from Corlears Hook to Coenties Slip, and
+from thence, by Whitehall northward. What do you see?&#8212;Posted
+like silent sentinels all around the town, stand thousands upon
+thousands of mortal men fixed in ocean reveries. Some leaning against
+the spiles; some seated upon the pier-heads; some looking over the
+bulwarks glasses! of ships from China; some high aloft in the
+rigging, as if striving to get a still better seaward peep. But these
+are all landsmen; of week days pent up in lath and plaster&#8212;tied
+to counters, nailed to benches, clinched to desks. How then is this?
+Are the green fields gone? What do they here? But look! here come
+more crowds, pacing straight for the water, and seemingly bound for a
+dive. Strange! Nothing will content them but the extremest limit of
+the land; loitering under the shady lee of yonder warehouses will not
+suffice. No. They must get just as nigh the water as they possibly
+can without falling in. And there they stand&#8212;miles of
+them&#8212;leagues. </p>
+
+<p> Inlanders all, they come from lanes and alleys, streets and
+avenues, &#8212;north, east, south, and west. Yet here they all
+unite. Tell me, does the magnetic virtue of the needles of the
+compasses of all those ships attract them thither? Once more. Say,
+you are in the country; in some high land of lakes. Take almost any
+path you please, and ten to one it carries you down in a dale, and
+leaves you there by a pool in the stream. There is magic in it. Let
+the most absent-minded of men be plunged in his deepest
+reveries&#8212;stand that man on his legs, set his feet a-going, and
+he will infallibly lead you to water, if water there be in all that
+region. Should you ever be athirst in the great American desert, try
+this experiment, if your caravan happen to be supplied with a
+metaphysical professor. Yes, as every one knows, meditation and water
+are wedded for ever.
+ But here is an artist. He desires to paint you the dreamiest,
+shadiest, quietest, most enchanting bit of romantic landscape in all
+the valley of the Saco. What is the chief element he employs? There
+stand his trees, each with a hollow trunk, as if a hermit and a
+crucifix were within; and here sleeps his meadow, and there sleep his
+cattle; and up from yonder cottage goes a sleepy smoke. Deep into
+distant woodlands winds a mazy way, reaching to overlapping spurs of
+mountains bathed in their hill-side blue. But though the picture lies
+thus tranced, and though this pine-tree shakes down its sighs like
+leaves upon this shepherd's head, yet all were vain, unless the
+shepherd's eye were fixed upon the magic stream before him. Go visit
+the Prairies in June, when for scores on scores of miles you wade
+knee-deep among Tiger-lilies&#8212;what is the one charm wanting?
+&#8212;Water &#8212;there is not a drop of water there! Were Niagara
+but a cataract of sand, would you travel your thousand miles to see
+it? Why did the poor poet of Tennessee, upon suddenly receiving two
+handfuls of silver, deliberate whether to buy him a coat, which he
+sadly needed, or invest his money in a pedestrian trip to Rockaway
+Beach? Why is almost every robust healthy boy with a robust healthy
+soul in him, at some time or other crazy to go to sea? Why upon your
+first voyage as a passenger, did you yourself feel such a mystical
+vibration, when first told that you and your ship were now out of
+sight of land? Why did the old Persians hold the sea holy? Why did
+the Greeks give it a separate deity, and own brother of Jove? Surely
+all this is not without meaning. And still deeper the meaning of that
+story of Narcissus, who because he could not grasp the tormenting,
+mild image he saw in the fountain, plunged into it and was drowned.
+But that same image, we ourselves see in all rivers and oceans. It is
+the image of the ungraspable phantom of life; and this is the key to
+it all. Now, when I say that I am in the habit of going to sea
+whenever I begin to grow hazy about the eyes, and begin to be over
+conscious of my lungs, I do not mean to have it inferred that I ever
+go to sea as a passenger. For to go as a passenger you must needs
+have a purse, and a purse is but a rag unless you have something in
+it. Besides, passengers get sea-sick &#8212;grow quarrelsome
+&#8212;don't sleep of nights &#8212;do not enjoy themselves much, as a
+general thing; &#8212;no, I never go as a passenger; nor, though I am
+something of a salt, do I ever go to sea as a Commodore, or a Captain,
+or a Cook. I abandon the glory and distinction of such offices to
+those who like them. For my part, I abominate all honorable
+respectable toils, trials, and tribulations of every kind whatsoever.
+It is quite as much as I can do to take care of myself, without taking
+care of ships, barques, brigs, schooners, and what not. And as for
+going as cook, &#8212; though I confess there is considerable glory in
+that, a cook being a sort of officer on ship-board &#8212;yet,
+somehow, I never fancied broiling fowls; &#8212;though once broiled,
+judiciously buttered, and judgmatically salted and peppered, there is
+no one who will speak more respectfully, not to say reverentially, of
+a broiled fowl than I will. It is out of the idolatrous dotings of
+the old Egyptians upon broiled ibis and roasted river horse, that you
+see the mummies of those creatures in their huge bake-houses the
+pyramids. No, when I go to sea, I go as a simple sailor, right before
+the mast, plumb down into the forecastle, aloft there to the royal
+mast-head. True, they rather order me about some, and make me jump
+from spar to spar, like a grasshopper in a May meadow. And at first,
+this sort of thing is unpleasant enough. It touches one's sense of
+honor, particularly if you come of an old established family in the
+land, the van Rensselaers, or Randolphs, or Hardicanutes. And more
+than all, if just previous to putting your hand into the tar-pot, you
+have been lording it as a country schoolmaster, making the tallest
+boys stand in awe of you. The transition is a keen one, I assure you,
+from the schoolmaster to a sailor, and requires a strong decoction of
+Seneca and the Stoics to enable you to grin and bear it. But even
+this wears off in time. What of it, if some old hunks of a
+sea-captain orders me to get a broom and sweep down the decks? What
+does that indignity amount to, weighed, I mean, in the scales of the
+New Testament? Do you think the archangel Gabriel thinks anything the
+less of me,
+ because I promptly and respectfully obey that old hunks in that
+particular instance? Who aint a slave? Tell me that. Well, then,
+however the old sea-captains may order me about&#8212;however they may
+thump and punch me about, I have the satisfaction of knowing that it
+is all right; that everybody else is one way or other served in much
+the same way &#8212; either in a physical or metaphysical point of
+view, that is; and so the universal thump is passed round, and all
+hands should rub each other's shoulder-blades, and be content. Again,
+I always go to sea as a sailor, because they make a point of paying me
+for my trouble, whereas they never pay passengers a single penny that
+I ever heard of. On the contrary, passengers themselves must pay.
+And there is all the difference in the world between paying and being
+paid. The act of paying is perhaps the most uncomfortable infliction
+that the two orchard thieves entailed upon us. But being paid,
+&#8212;what will compare with it? The urbane activity with which a
+man receives money is really marvellous, considering that we so
+earnestly believe money to be the root of all earthly ills, and that
+on no account can a monied man enter heaven. Ah! how cheerfully we
+consign ourselves to perdition! Finally, I always go to sea as a
+sailor, because of the wholesome exercise and pure air of the
+forecastle deck. For as in this world, head winds are far more
+prevalent than winds from astern (that is, if you never violate the
+Pythagorean maxim), so for the most part the Commodore on the
+quarter-deck gets his atmosphere at second hand from the sailors on
+the forecastle. He thinks he breathes it first; but not so. In much
+the same way do the commonalty lead their leaders in many other
+things, at the same time that the leaders little suspect it. But
+wherefore it was that after having repeatedly smelt the sea as a
+merchant sailor, I should now take it into my head to go on a whaling
+voyage; this the invisible police officer of the Fates, who has the
+constant surveillance of me, and secretly dogs me, and influences me
+in some unaccountable way &#8212;he can better answer than any one
+else. And, doubtless, my going on this whaling
+ voyage, formed part of the grand programme of Providence that was drawn up a
+long time ago. It came in as a sort of brief interlude and solo between more
+extensive performances. I take it that this part of the bill must have run
+something like this:
+<list>
+<item>Grand Contested Election for the Presidency of the
+United States. </item>
+<item>Whaling Voyage by one Ishmael. </item>
+<item>Bloody Battle in Affghanistan.</item>
+</list>Though I cannot tell why it was exactly that those stage
+managers, the Fates, put me down for this shabby part of a whaling voyage,
+when others were set down for magnificent parts in high tragedies, and short
+and easy parts in genteel comedies, and jolly parts in farces &#8212;though I
+cannot tell why this was exactly; yet, now that I recall all the
+circumstances, I think I can see a little into the springs and motives which
+being cunningly presented to me under various disguises, induced me to set
+about
+performing the part I did, besides cajoling me into the delusion that it was
+a choice resulting from my own unbiased freewill and discriminating judgment.
+chief among these motives was the overwhelming idea of the great whale
+himself. Such a portentous and mysterious monster roused all my curiosity.
+Then the wild and distant seas where he rolled his island bulk; the
+undeliverable, nameless perils of the whale; these, with all the attending
+marvels of a thousand Patagonian sights and sounds, helped to sway me to my
+wish. With other men, perhaps, such things would not have been inducements;
+but as for me, I am tormented with an everlasting itch for things remote. I
+love to sail forbidden seas, and land on barbarous coasts. Not ignoring what
+is good, I am quick to perceive a horror, and could still be social with
+it&#8212;would they let me &#8212;since it is but well to be on friendly terms with all
+the inmates of the place one lodges in. By reason of these things, then, the
+whaling voyage was welcome; the great flood-gates of the wonder-world swung
+open, and in the wild conceits that swayed me to my purpose, two and two
+there floated into my inmost soul, endless processions of the whale, and, mid
+most of them all, one grand hooded phantom, like a snow hill in the air.
+</p>
+</div>
+</body>
+</text>
+</TEI.2>
diff --git a/Master/texmf-dist/doc/xmltex/passivetex/xsa.xml b/Master/texmf-dist/doc/xmltex/passivetex/xsa.xml
new file mode 100644
index 00000000000..df46cbc7896
--- /dev/null
+++ b/Master/texmf-dist/doc/xmltex/passivetex/xsa.xml
@@ -0,0 +1,14 @@
+<xsa version="1.0">
+ <vendor>
+ <name>Sebastian Rahtz</name>
+ <email>sebastian.rahtz@oucs.ox.ac.uk</email>
+ </vendor>
+ <product id="fotex">
+ <name>Passive TeX</name>
+ <version>1.3, 10th December 2000</version>
+ <last-release>20001210</last-release>
+ <info-url>http://users.ox.ac.uk/~rahtz/passivetex/</info-url>
+ </product>
+</xsa>
+
+