; TeX output 1997.04.14:1216x=6oDtqGcmr17User'sBGuidetotheDiagramEnuNvironment,"V_ersionB4.1#􍍍fXQ ff cmr12Paul/Burchard(burchard@math.utah.edu)&aU April/14,19974z'NG cmbx121D(Inutro=ductionb#'XQ cmr12The߆T cmtt12diagramenrvironmentallowstheLDD"|{Ycmr8A_ٹT UE!X-2g cmmi12"3$uusertoeasilycreatecomplex'commrutativeq5diagrams,byplacingformulanoSdesonaconceptualgridand'attacrhingarrowstothem.8TheFBgridusedinthesediagramsisnota xedsquaregrid.KInstead,])the'enrvironmentautomaticallygeneratesacorrectlyscaledandshapSedrectan-'gularlgridwhicrhwillcompactlyholdtheformulas,,whileleavingroSomfor'the zarrorwsbSetweenthem.WMoreover,/thearrowsautomaticallyadapttothe'spaces^$bSetrweentheformulasbSeingconnected. TThesefeaturesareaccom-'plished%withathree-passalgorithmthattakresintoaccountthewidthand'heighrtofeveryformula.8The7arrorwsinthesediagramsarequite exible. AArrowsmayV,inany'comrbination,>V8!", cmsy10D_pSoinrtinanyofalargenumbSeroflatticedirections;j8D_spanmrultiplerowsandcolumnsofthegrid;8D_crossotherarrorws;8D_harvelabSelsoneitherorbothsides,withadjustablepositioning;8D_harveavXarietryofhead,tail,andshaftstyles.'ThefancierarrorwstylesaremadepSossiblebyspSecial- cmcsc10LamS-T UE!Xarrowfonts,'butthepacrkXagecanbSeusedwithoutthemifnecessaryV.1*x=8TVo.getafeelforhorwthepackXageworks,herearesomeexamplesofcom-'mandsforproSducingarrorws:T \arrow{e}ع+*t8+P+wz+X+&`+&`*t8+&`P+&`wz+&`X+M+M*t8+MP+Mwz+MX+s UTX \arrow[2]{ene,t,3,..}{fff}r-0}ع+s *t8+s P+s wz+s X+32fdO line10-k쎎&`Ojvlixfevl?AULd\arrow{s,lr}{\alpha}{\beta}x2cmmi8   s < lcircle10pPpD ,plp#{\p'fp+`Rp00>$p49)p8aПTp<p@ppD@pIôpM-ݯLpQVۚpUن|pYPrp] ]paIDpf"4pjK tpnt` pr0pvS#arrorwheadsonbSothends9gAdoublearrorwhead*9g'lefthalfofarrorwhead*9g`righrthalfofarrowhead*'Arrorwtailoptionsare:9gVsinglearrorwtail*9gJleft shhoSokarrorwtail*9gLrighrt shhoSokarrowtail*9gSsquigglearrorwtail*'Inthedefaultcon guration,thelabSelpositioningoptionsare:9g11/4ofwrayfromtailend9g22/4ofwrayfromtailend(thedefault)9g33/4ofwrayfromtailend'Horwever,/ifmore exibilitryisneeded,thereisanARROWPARTSparameter'whicrhspSeci eshowmanypiecesthearrowwillbSedividedintotodetermine'themeaningofthelabSelpositioningoption. (Ingeneral,thepositioning'optionnmarybSeanysingledigit.)2FVorexample, topSositionalabel5/6ofthe'wrayfromthetailendofthearrorw,youwouldusecommandslikethese:9g\dgARROWPARTS=69g\begin{diagram}L ...,\arrow{e,t,5}{MYLABEL}...9g\end{diagram}6.Ǡx='ARROWPARTS#shouldhbSeevren,8sothatordinarylabelscanbeproperlyposi-'tionedatthehalf-wraypSoint.(V'4D(FinezTaGuningtheDiagramsb#'Manry;oftheparametersusedbythediagramenvironmentareaccessibleto'yrouanddoScumentedheresothattheexistingfeaturescanbSe ne-tuned.8TheqmostimpSortanrtparameteris\dgARROWLENGTH,whichspSeci esthe'minimrumlengthforallarrows.9ThediagramenvironmentwillindepSendently'adjustthehorizonrtalandverticalscalesofitsrectangulargriduntilatleast'thatΫmruchroSomisavXailableforeacharrow. Thiscalculationtakesinto'accounrttheroSomthatmustbSesetasidefortheeachofthetwoformulas'bSeingconnectedbryanarrow.8Thedefaultminimumarrowlengthis9g\dgARROWLENGTH=2.5em'TheA\arrowcommandmaryalsobSeusedoutsideofthediagramenvironment;'inthatcase,itslengthisinsteadconrtrolledbytheparameter9g\dgTEXTARROWLENGTH=1.1em8Some;anomaliesyroumayencounter: qthecollisionofformulasisnot'crheckedunlessanarrorwconnectsthem. mTherefore,iftwoformulasturn'outtoorverlapyoucanjustconnectthemwithaninvisiblearrow.77x=8AnotherproblemmaryoSccurwhenyousimulate\arrowfragments"usinga' nergrid.OThearrorw-lengthcheckerdoSesnotknowwhatisa\fragment"and'soFitwillforceeacrhfragmenttobSe\dgARROWLENGTHFlong.MATheeasiestway'to xthisistoloScallydivide\dgARROWLENGTHbrythescalefactorbetrween'thecoarseand negrids.8FVorexample:e܍9g\divide\dgARROWLENGTH,by29g\begin{diagram}nj\node[2]{A}\arrow[2]{s}\\E\node{B}\arrow{e,-} Y\node{}\arrow{e,t}{\alpha}\node{C}\\nj\node[2]{D}9g\end{diagram} *l7AP BPPmC)D Nm :feK Nm?PPՈӞ32fd{bDPH32fd-bD $l8The"spacesetasideforaformrulafurtherincludespaddingtokeepthe'arrorwsLfromactuallytouchingtheformulas._Thepaddingincreasestheap-'parenrthorizontalsizeofeachformulaby\dgHORIZPADandtheapparent'vrerticalsizeby\dgVERTPAD.ThedefaultvXaluesoftheseparametersare:9g\dgHORIZPAD=1em9g\dgVERTPAD=2ex8TheK-ratioofthehorizonrtalandverticalscalesofthegrid,cNknownasthe'aspffect ratio,,cannotbSecompletelyarbitrarybecauseoftheslopelimitations'offonrt-basedarrows.FInorderthatthefullrequiredsetofcompass-pSoint'directionsibSearvXailable,theoptimalcalculatedaspectratiowillbeapprorxi-'matedsoastobSecompatiblewiththearvXailablefonts.eInplainLDD"A_ٹT UE!XmoSde'theCpSossibileaspectratiosarehalf-inrtegersupto2,+whileinLamS-T UE!Xmode'theyarehalf-inrtegersupto3.8\dgLABELOFFSETe8iseZthe(approrximate)distancewhichwillseparatelabSels'fromRdtheirarrorws.Anarrowisdividedinto\dgARROWPARTSR=partsforcustom'pSositioning>oflabelsalongthearrorw(theonlysensiblechoicesforthisnumbSer'are2,4,6,8,10).8Bydefault,9g\dgLABELOFFSET=.7ex9g\dgARROWPARTS=48 =x=8Theh follorwingtwoparametersregulatetheappSearanceofdottedarrows'inplainLDD"A_ٹT UE!XmoSde:Ս9g\dgDOTSPACING=0.35em9g\dgDOTSIZE=1.5\fontdimen8\tenln8Bydefault,noSdesaretrypeset\displaystyle,andlabels\scriptstyle.'Thisisconrtrolledbythecommands\dgeverynode(whichisexecutedprior'toytheformrulaofeachnoSde)and\dgeverylabel(whichisexecutedpriorto'the