; TeX output 1997.02.14:1504so0DtGGcmr17The7tpacqkages߆TG cmtt12easyvectorXQ cmr12EnricoBertolazzi LabSoratoriodiMatematicaApplicatacDipartimenrtodiIngegneriaCivileedAmbientaleUnivrersit adegliStudidiTVrento0Mesiano,TVrenrto,Italy߆T cmtt12bertolaz@ing.unitn.its8!J!t : cmbx9Abstractэ[ o cmr9The"ߤN cmtt9easyvectorpac9k|rageisasimplemacropack|ragethatprovidesa NC-lik9eTsyntaxforwritingvectorsormatrices.!č5$Nff cmbx12Contents5%"V cmbx101DSomeTexampleswith& cmmi10;"(comma).DThepackqageoptiondefinevectorsmeansthatthecommand\aa...\zz5anda\AA...\ZZIareprede nedasvectors.R Italsode nethecommands\Balpha,1*so5\Bbetacandsoon,asbGoldgreekvectors.Thelatexcommands\aa,\AA,\gg, 5\l,&\ss,\SSR\ttcaresavedcinthecommands\oldxxwherexxisthenameof5theUUoldcommand. !52MLUseffofthe\newvectorcommand5TheUUgeneralsyntaxof\newvectorcommandis I\newvector[a,b]{cmd}5orI\newvector(a)[cmd]5Inthe rstcase,itcreatesthenewcommand(macro)\cmdwhichexecutesa 5whenF;inscalarmoGde,I@andbwheninvectormode.lInthesecondcaseitcreates5ax?newcommand\cmdwhichsubstitutestheletter\mathit{a}wheninscalar,5moGde3kand\mathbf{a}wheninvectormode. Scalarmodeisactivqatedwhen5\cmdϣisimmediatelyfollowedϣby[.InscalarmoGdeeverythingbGetween[and]5(withUUbalancing)isassumedtobGeindices.qF*orexamplethecommands3:/5ꪉffN5*5*ff꫍q \newvector[\alpha,\beta]{W} \newvector[X,\mathbf{X}]{X} \[?\W=(\W[i,j]),\qquad\X=(\X[i,j;k])\]M˄5*ffffffN2BDgenerate/c:/5WffN-Q-QffXWk N4=(  0ercmmi7i;j j);X=(Xki;j)M˄-QffffffN/VDTheUUstructureofthe[::: ]commandisthefollowing D[i,j,...,k;x,y,...,z]5where i,j,...,karesubscriptsandx,y,...,zaresupGerscripts.>Thecharacter 5;jʲisusedasaseparatorbGetweenjdi erentindices,p(andthecharacter;separates5subscriptsmFandsupGerscripts.TherearenolimitsonthenumbermFofindices,sCand5theUUcoGdeisreentrant,UUasthefollowingexampleillustratesD\:/5ќsffNWWff֜s: \newvector(a)[av] \newvector(b)[bv] \[?\av=\pmatrix{\av[1,1]&\av[1,2]\crm\av[2,1]?&\av[2,2]\cr},\qquad\bv?=\left\{\bv[\gamma,\bv[i,j;k];a]\right\} \]M˄WffffffN2soDproGduces3:/5ffN77ffS\a=^u cmex10 40': cmti10aٓRcmr71;1%Ëa1;2 4a2;1%Ëa2;27c^@j;b=`n qba{ n9;1t}\cmti7bj8O \cmmi5ki;j:`oM˄7ffffffNE53MLUseffofthe!32command5In:somecircumstancesitisusefultoforcevectormoGdealsowhenusingindices. 5ItUUispGossiblebyusingthecharacter!bGefore[,h:/5ꪉffN)*)*ff꫍q \newvector(z)[zzz] \[?\zzz[1,2,3]\neq\zzz![1,2,3]\]M˄)*ffffffN,gDwhichUUproGducesthefollowingoutput:.J:/5ȉffN,p,pffȍȟ#z1;2;3q !", cmsy106=z1;2;3M˄,pffffffN@(54MLUseffofthe\newcustomvectorcommand5InUUsomecircumstancesthiscommandcanbGeuseful,e.g.,2~:/5UVffN4UT4UTffUVG \def\myindex[#1,#2,#3]{_{#1_{#2}}^{#3}} \newcustomvector[a,a]{aaa}\myindex \[?\aaa[1,2,3]=\aaa[3,2,1]\]M˄4UTffffffNDwhichUUproGduces/:/5ÐffN-x-xffÐÐQa31Zcmr52 *=a132M˄-xffffffN/DImpQortan9t:ղF*ortheolduser(version<CN0:6)thecommand\customindex5isUUsuppressedandthe\newcustomvectorisusedinstead.3;1t}\cmti70': cmti10'߆Tff cmtt12& cmmi10 0ercmmi7O \cmmi5K`y cmr10ٓRcmr7Zcmr5u cmex10Y