; TeX output 1996.10.01:1445s}n}9GGGcmss17chemsym7tDtGGcmr17{aLdKGXQ cmr12AT[-E;gXMacroforChemicalSymqbsols!", cmsy10RMatsDahlgren7(߆T cmtt12matsd@physchem.kth.se)&37?R1996/06/27.@t : cmbx9Abstractэ5o cmr9ThisdoAcumen9tdescribestheow cmss9chemsympac9k|rage,PwhichmakesiteasiertotypAechemical '9sym9bAolscorrectly:,withouthavingtoworryabAoutmathmodeortextmode.F:urthermore,'9chemsym2mak9esbAoththesuper-andthesubscriptcommands( ߤN cmtt9^and_)and`" cmsy9'(\cdot)a9v|railable'9inTtextmoAde.'9ThisT leandthepac9k|rage:Copyrightc j1996byMatsDahlgren.pAllrightsreserved.!č9$Nff cmbx121&Intros3duction9%m#R cmss10chemsym#K`y cmr10isaL5ffٓRcmr7A͉TU>'ExXpackqagewhichmakesiteasiertotypGechemicalsymbGolscorrectly*.aSItde nesa 9command( foreachelementofthepGeriodic( table(the109 rst),1+Deuterium,the( Methyl,Ethyl( and9Butylgroups^12(forthePropylegroup,use''ExX2 b> cmmi10"9ofUU1995/06/01(ornewer).692.2,Usage9TheUUpackqageisincludedbystating\usepackage[optionc]{chemsym}9InthedoGcumentpreamble."Theonlyoptionwhichhasanye ectonchemsymiscollision,Psee9bGelow.9ffffğ @ -:q% cmsy6L|{Ycmr8ThisXdo "5-:Aacmr61LSuggestedXbÎyUlfHenriksson(&Cscmtt8ulf@physchem.kth.se).=1*s}n}92.3,CommandsuT9The\Xchemsympackqagede nes116usercommands;Woneforeachofthe109 rstelements,$Deuterium,mCchemical &symbols 9the@!Methyl,wEthylandButylgroups(forthePropylegroup,wuse\Pr,PraseoGdymium),andtheOH,9COOH,_andCH_groups. ThecommandnamesareallmadeupofthechemicalsymbGolpreceeded9byp`\'; thusforNitrogen,jN,youtypGe\N,andforMercury*,jHg,j\Hg,etc.W%ThesecommandsappGear9to4bGerobust.dT*oobtain`CH25X',+yousimplytypGe`\CH_2'inyourinput le;'#`CH35X'isobtainedby9typingUU`\CH_3'(ofcourse).9SinceetherearesixcommandsinTU>'ExX/L5ffA͉TU>'EXealreadyofthiskind(\H,\O,\P,\S,\Re,and\H\O\P$\S0 1\Re< 1\Pr9\Pr), JandLoneenvironmentLinAMS-L5ffA͉TU>'ExX(theSbenvironment),^2theseLoldcommandshaveLto<Sb9bGeUUrenamed.qThenamesofchoiceareshowninthetablebGelow.Il砟hffo;fdͤ ffΟfdTU>'ExX'R ffFWithUUchemsym͟ ff)Use/Example! ffͤ ffΟfdcommandġ ffFyouUUwrite>~ ff< ffffo;ͤ ffΟfd\H/̵ ffF\h9 ff)TheUUaccentin`}o'g ffffo;ͤ ffΟfd\O/̵ ffF\OO4 ff)T_ ffffo;ͤ ffΟfd\P/̵ ffF\PP4 ff){V m ffffo;ͤ ffΟfd\S/̵ ffF\Ss4 ff)xW ffffo;ͤ ffΟfd\Re* ffF\re4 ff)<UU(inmathmoGde) m ffffo;ͤ ffΟfd\Pr* ffF\pr4 ff)Pr#c(inUUmathmoGde) ffffo;ͤ ffΟfd\begin{Sb}͡ ffF\begin{SB}/ ff)(withUUAMS!-L5ffA͉TU>'ExX)͟ ffffo;ͤ ffΟfd\end{Sb}Lǡ ffF\end{SB}b) ff)(withUUAMS!-L5ffA͉TU>'ExX)͟ ffffo;Kqō9Also,`-\kemtkn,a^commandforde ningotherchemicalsymbGolsandsimilarfunctionsisavqailable.&\kemtkn9\kemtkn6takesonemandatoryargument(thestringtotreatasachemicalsymbGol).iTwoother9internalycommands,B\nsrrmand\nsrrmsarealsoavqailable.3\nsrrmsimplyputsits(mandatory)o\nsrrm&\nsrrms9argumentinmathrm.tG\nsrrmsdoGesthesame, butalsoaddsasmallspaceafterit.Thisspaceis9aүsecond,optional,argumentto\nsrrmswhichshouldbGegiveninemunits(without`em').The9defaultШis0.1em.F*orconvenienceШwhentypingchemicalformulasandunitswithexpGonents,|the]^]_9supGer-andsubscriptcommands^and_aremadeavqailablealsooutsideofmathmode,4provided9theioptioncollisionisnot AspGeci ed.]yThus,$withchemsymyoucantypGem^2insteadofm$^2$for9m^2:alsouintextmoGde.?}Analogously*,ܢyoucantypGe\H_2\OOforH2|sOyinbothmathandtextmodeand9getthesameresult.=Noticethattextwhichyoumayputintheargumentsof^and_automatically9is?setinmathmoGde.@Soifyouwant`Mq'youmusttypGeM_{\mathrm{q}}andnotonlyM_q,zthe9latter|ocomesoutas`M 0ercmmi7qj'.(Thisfeatureisnotseriouslydisturbingsincethisfeaturewith^and_9isUUintendedtobGeusedmainlywithnumbGersinthearguments.)9F*uthermore,the6\cdotcommand(proGducinga`')isalsoavqailableoutsidemathmode.iThis\cdot9featureisincludedtofacilitatetypingformulaslike\CH35XCH3"(\CH_3\cdot\CH_3)alsointext9moGde.^3692.4,Thecollisionoption9T*o3avoidprobGelmswithotherpackqagesdueto^(and_)bGeingactive,:thismaybGeswithcedo byسcollision9statingStheoptioncollisionwhenloadingthechemsympackqage.Ifyougetthefollowingerror9messageh(orasimilar),lyouarelikelytohavesuchacollisionwithchemsyminvolved(inthiscase9withUUlongtable):! K!Argumentof^hasanextra}. ! K9ffffğ J= "5-:2LThanksXtoThorstenLohl(lohl@uni-muenster.de)forp "5-:3LAlsoXsuggestedbÎyUlfHenriksson(ulf@physchem.kth.se).=2s}n}l\par ! Kl.120\end{longtable}! K?9T*o!solvetheproblem,Sstatethecollisionoptionanddeletethe.aux lebGeforerunningL5ffA͉TU>'ExX 9again.eSome0packqagescontain^^J-constructswhichmaynotalwaysbGeapparenttotheuser.eOne9example,.whichcollideswithchemsym,isthemulticolpackqage'swarningifyouspGecifyonlyone9column.qInUUthatcase,theerrormessageis:! K!Argumentof^hasanextra}. ! Kl\par! Kl.18\begin{multicols}{1}! K?9Inthiscase,youmayicomearoundtheproblembyspGecifyinganumbGerofcolumns2;%8ifnot, 9spGecifyUUthecollisionoptionforthechemsympackqage.!č93&Examples9This0sectiongivessomesimpleexamplesoftheuseofchemsym.eT*owritetheformulaforwaterin9bGoth'!mathandtextmode,0_youtypGe\H_2\O{},0_whichgivesH2|sO'%asresult.b`Noticethatthisdi ers9from!typing\H$_2$\O,whichgivesH2|wO!asresult.GInthe rstexample,Tthereisnotanyextra9spaceaddedaftertheH.RThisadditionofspacemakesformulaslikeHCN(\H\C\N)easiertoread9thanUUjusttypingHCN:HCN.9TheuseofthecommandsofchemsymisspGeciallyusefulwhenchemicalsymbGolsareusedas9indicesUUinequations.qThefollowingexampleillustratesthis:}M:FZeɟ:(HZcmr52 O)6%qҲ=6MH2 O+8MFZe=i(1)9whichUUwasobtainedbytyping\begin{equation} \mathcal{M}_{\Fe(\H_2\O)_6}=6\mathcal{M}_{\H_2\O}+\mathcal{M}_{\Fe}\end{equation}9ItGisalsoeasytode neotherchemicalsymbGolscommands,}suchascommandsforspGeci cisotopes. 9SuppGoseUUyouratherwanttousethenotation^2ȲH"thanDUYforDeuterium.qThismaybGede nedas:@\newcommand{\hH}{\kemtkn{{}^2H}}9(whichwasusedabGove:P...notation?\hH{}than\D{}for...).[Internally*, chemsymusesasyn-9taxUUlikethistode nethevqariouscommandsforthechemicalsymbGols.^49Afterrunningchemsym.insthroughL5ffA͉TU>'ExX2"(,youcantypGesetthePerioGdicT*ableoftheEle-9mentsbyrunningL5ffA͉TU>'ExX2"*yonthe lepertab.tex.0(It ts neonanA4papGer,andthereshouldbe9no?problemwithaU.S.lettersizepapGeraswell.)TThePerioGdicT*ablerequirestherotating!̲packqage,9whichUUinturnrequiresthepackqagesgraphicxandifthen.9X-ffğ J= "5-:4LTJomakÎethecommandrobust,osay-=K cmsy8nnewcommandfnhHgf@nprotectnkemtknffgg^2Hggorusethecommand nDeclareRobustCommandXinsteadofwnnewcommand.=3#s}n}94&KnownffProblems9'9Sincechemsymmakes^and_active,Yitwillcollidewithotherpackqageswhichmakeuseof '9constructslike^^J~(e.3g.P}thelongtablepackqage).P}T*oavoidthisproblem,!spGecifytheoption'9collisionUUwhenloadingxchemsym(orglobally).9'9Ifthechemsympackqageisusedtogetherwiththerotatingᠲoramstexpackqage,Tchemsymshould'9bGeUUloadedlast.9'9Ifthechemsympackqageisusedtogetherwiththefancyheadingspackqage,(fancyheadingsshould'9bGeUUloadedafterchemsym.^59'9Since)chemsymmakes_and^active,thesecharacterscannotbGeusedinlabelswhenusing'9theychemsympackqage,Bnorin lenamesloadedinL5ffA͉TU>'ExXrunsloadingthechemsympackqage'9(unlessUUyouspGecifythecollisionoption).^69'9Alsobsince^ismadeactive,whenfollowingafteraprimeinmathmoGde('),a\double'9supGerscript"Yaerrorisproducedunlessadoublebracing({})isincludedbeforethe^character.^7'9Thus,UUyoushouldtypGex'{}^2insteadofx'^2whenusingxchemsymtoobtainx^ O!cmsy709^2J.!č95&SendingffaBugReps3ort9chemsymislikelytocontainbugs.TTRepGortsofbugsinthepackqagearemostwelcome,however,due9toyachageofjobs(asof1996/07/01)IycannotguaranteeanydebuggingsuppGort{butI'lltryof9course.qBeforeUU lingabugrepGort,pleasetakethefollowingactions:r1.'9EnsureUUyourproblemisnotduetoyourowninput le,packqage(s),orclass(es);r2.'9EnsureUUyourproblemisnotcoveredinthesection"KnownProblems"abGove;r3.'9T*ry:toloGcatetheproblembywritingaminimalL5ffA͉TU>'ExXinput lewhichreproGducestheproblem.'9IncludeUUthecommand1\setcounter{errorcontextlines}{999}'9inUUyourinput;r4.'9RunUUyour lethroughL5ffA͉TU>'ExX;r5.'9SendUUadescriptionofyourproblem,theinput leandthelog leviae-mailto:8=matsd@physchem.kth.se.9EnjoyyourL雍Q,t}\cmti7ATKß'E-X!matsd.9hffğ J= "5-:5LThanksXtoLarsReinÎton(larsr@stud.unit.no)forp "5-:6LThanksXtoAxel(i0080108@ws.rz.tu-bs.de)forp'ExXpackqageisloaded,andifso,changetheSbenvironmenttobGe 9calledUUSB.6f9\@ifundefined{Sb}{\def\Sb{\protect\kemtkn{Sb}}}%910"W{\let\SB=\Sb\let\endSB=\endSb}9Now,Cwe?make^,C_,and\cdotworkwithout$...$alsointextmoGde{ifnotswitchedo .j`T*odo 9this,UUweneedabGooleanUUandsomeoptionproGcessing...911\newif s,\ifc@llsn\c@llsnfalse912\DeclareOption{collision}{\global\c@llsntrue}913\DeclareOption*{\OptionNotUsed}914\ProcessOptions*915\ifc@llsn\AtEndDocument{%916"W\PackageWarningNoLine{chemsym}{Duetopossiblecollisionswithother917"W\MessageBreakpackages,super-andsubscripsarenotavaliable918"W\MessageBreakoutsidemathmodedespiteyourloadingof`chemsym'}}919\else920"W\def\sprscrpt#1{\ensuremath{^{#1}}}921"W\def\sbscrpt#1{\ensuremath{_{#1}}}922"W\catcode`\^\active923"W\catcode`\_\active924"W\let^=\sprscrpt925"W\let_=\sbscrpt926\fi927\@ifundefined{cd@t}{%928\let\cd@t=\cdot929\def\cdot{\ensuremath{\cd@t}}}{}9(The\@ifundefinedisrequiredforloGcalcompatibilityreasonsatmysite.)Then,somegeneral 9macrosUUarede ned:930\newcommand{\nsrrm}[1]{\ensuremath{\mathrm{#1}}}931\newcommand{\nsrrms}[2][0.1]{\ensuremath{\mathrm{#2}\kern#1em}}932\newcommand{\kemtkn}[1]{\@ifnextchar_{\nsrrm{#1}}{\@ifnextchar^{\nsrrm{#1}}%933"W{\@ifnextchar){\nsrrm{#1}}{\@ifnextchar({\nsrrm{#1}}%934"W{\@ifnextchar]{\nsrrm{#1}}{\@ifnextchar[{\nsrrm{#1}}{\nsrrms{#1}}}}}}}}9Ashyoucansee,youcanchangethespacinginthechemicalformulasbymakingchangesto\nsrrms. 9Thisyoucandowith\renewcommandinyourdoGcumentpreambleorinanotherpackqage le.OLThen9weUUde nethe110commandsforchemicalsymbGols:935\renewcommand{\H}{\protect\kemtkn{H}}%modified936\newcommand{\D}{\protect\kemtkn{D}}=5=s}n}937\newcommand{\He}{\protect\kemtkn{He}} 938\newcommand{\Li}{\protect\kemtkn{Li}}939\newcommand{\Be}{\protect\kemtkn{Be}}940\newcommand{\B}{\protect\kemtkn{B}}941\newcommand{\C}{\protect\kemtkn{C}}942\newcommand{\N}{\protect\kemtkn{N}}943\renewcommand{\O}{\protect\kemtkn{O}}%modified944\newcommand{\F}{\protect\kemtkn{F}}945\newcommand{\Ne}{\protect\kemtkn{Ne}}946\newcommand{\Na}{\protect\kemtkn{Na}}947\newcommand{\Mg}{\protect\kemtkn{Mg}}948\newcommand{\Al}{\protect\kemtkn{Al}}949\newcommand{\Si}{\protect\kemtkn{Si}}950\renewcommand{\P}{\protect\kemtkn{P}}%modified951\renewcommand{\S}{\protect\kemtkn{S}}%modified952\newcommand{\Cl}{\protect\kemtkn{Cl}}953\newcommand{\Ar}{\protect\kemtkn{Ar}}954\newcommand{\K}{\protect\kemtkn{K}}955\newcommand{\Ca}{\protect\kemtkn{Ca}}956\newcommand{\Sc}{\protect\kemtkn{Sc}}957\newcommand{\Ti}{\protect\kemtkn{Ti}}958\newcommand{\V}{\protect\kemtkn{V}}959\newcommand{\Cr}{\protect\kemtkn{Cr}}960\newcommand{\Mn}{\protect\kemtkn{Mn}}961\newcommand{\Fe}{\protect\kemtkn{Fe}}962\newcommand{\Co}{\protect\kemtkn{Co}}963\newcommand{\Ni}{\protect\kemtkn{Ni}}964\newcommand{\Cu}{\protect\kemtkn{Cu}}965\newcommand{\Zn}{\protect\kemtkn{Zn}}966\newcommand{\Ga}{\protect\kemtkn{Ga}}967\newcommand{\Ge}{\protect\kemtkn{Ge}}968\newcommand{\As}{\protect\kemtkn{As}}969\newcommand{\Se}{\protect\kemtkn{Se}}970\newcommand{\Br}{\protect\kemtkn{Br}}971\newcommand{\Kr}{\protect\kemtkn{Kr}}972\newcommand{\Rb}{\protect\kemtkn{Rb}}973\newcommand{\Sr}{\protect\kemtkn{Sr}}974\newcommand{\Y}{\protect\kemtkn{Y}}975\newcommand{\Zr}{\protect\kemtkn{Zr}}976\newcommand{\Nb}{\protect\kemtkn{Nb}}977\newcommand{\Mo}{\protect\kemtkn{Mo}}978\newcommand{\Tc}{\protect\kemtkn{Tc}}979\newcommand{\Ru}{\protect\kemtkn{Ru}}980\newcommand{\Rh}{\protect\kemtkn{Rh}}981\newcommand{\Pd}{\protect\kemtkn{Pd}}982\newcommand{\Ag}{\protect\kemtkn{Ag}}983\newcommand{\Cd}{\protect\kemtkn{Cd}}984\newcommand{\In}{\protect\kemtkn{In}}985\newcommand{\Sn}{\protect\kemtkn{Sn}}986\renewcommand{\Sb}{\protect\kemtkn{Sb}}%modifiedwithAMS-LaTeX987\newcommand{\Te}{\protect\kemtkn{Te}}988\newcommand{\I}{\protect\kemtkn{I}}989\newcommand{\Xe}{\protect\kemtkn{Xe}}990\newcommand{\Cs}{\protect\kemtkn{Cs}}=6I͠s}n}991\newcommand{\Ba}{\protect\kemtkn{Ba}} 992\newcommand{\La}{\protect\kemtkn{La}}993\newcommand{\Ce}{\protect\kemtkn{Ce}}994\renewcommand{\Pr}{\protect\kemtkn{Pr}}%modified995\newcommand{\Nd}{\protect\kemtkn{Nd}}996\newcommand{\Pm}{\protect\kemtkn{Pm}}997\newcommand{\Sm}{\protect\kemtkn{Sm}}998\newcommand{\Eu}{\protect\kemtkn{Eu}}999\newcommand{\Gd}{\protect\kemtkn{Gd}} =100\newcommand{\Tb}{\protect\kemtkn{Tb}} =101\newcommand{\Dy}{\protect\kemtkn{Dy}} =102\newcommand{\Ho}{\protect\kemtkn{Ho}} =103\newcommand{\Er}{\protect\kemtkn{Er}} =104\newcommand{\Tm}{\protect\kemtkn{Tm}} =105\newcommand{\Yb}{\protect\kemtkn{Yb}} =106\newcommand{\Lu}{\protect\kemtkn{Lu}} =107\newcommand{\Hf}{\protect\kemtkn{Hf}} =108\newcommand{\Ta}{\protect\kemtkn{Ta}} =109\newcommand{\W}{\protect\kemtkn{W}} =110\renewcommand{\Re}{\protect\kemtkn{Re}}%modified =111\newcommand{\Os}{\protect\kemtkn{Os}} =112\newcommand{\Ir}{\protect\kemtkn{Ir}} =113\newcommand{\Pt}{\protect\kemtkn{Pt}} =114\newcommand{\Au}{\protect\kemtkn{Au}} =115\newcommand{\Hg}{\protect\kemtkn{Hg}} =116\newcommand{\Tl}{\protect\kemtkn{Tl}} =117\newcommand{\Pb}{\protect\kemtkn{Pb}} =118\newcommand{\Bi}{\protect\kemtkn{Bi}} =119\newcommand{\Po}{\protect\kemtkn{Po}} =120\newcommand{\At}{\protect\kemtkn{At}} =121\newcommand{\Rn}{\protect\kemtkn{Rn}} =122\newcommand{\Fr}{\protect\kemtkn{Fr}} =123\newcommand{\Ra}{\protect\kemtkn{Ra}} =124\newcommand{\Ac}{\protect\kemtkn{Ac}} =125\newcommand{\Th}{\protect\kemtkn{Th}} =126\newcommand{\Pa}{\protect\kemtkn{Pa}} =127\newcommand{\U}{\protect\kemtkn{U}} =128\newcommand{\Np}{\protect\kemtkn{Np}} =129\newcommand{\Pu}{\protect\kemtkn{Pu}} =130\newcommand{\Am}{\protect\kemtkn{Am}} =131\newcommand{\Cm}{\protect\kemtkn{Cm}} =132\newcommand{\Bk}{\protect\kemtkn{Bk}} =133\newcommand{\Cf}{\protect\kemtkn{Cf}} =134\newcommand{\Es}{\protect\kemtkn{Es}} =135\newcommand{\Fm}{\protect\kemtkn{Fm}} =136\newcommand{\Md}{\protect\kemtkn{Md}} =137\newcommand{\No}{\protect\kemtkn{No}} =138\newcommand{\Lr}{\protect\kemtkn{Lr}} =139\newcommand{\Db}{\protect\kemtkn{Db}} =140\newcommand{\Jl}{\protect\kemtkn{Jl}} =141\newcommand{\Rf}{\protect\kemtkn{Rf}} =142\newcommand{\Bh}{\protect\kemtkn{Bh}} =143\newcommand{\Hn}{\protect\kemtkn{Hn}} =144\newcommand{\Mt}{\protect\kemtkn{Mt}}=7Us}n}9AtUUlast,wede nethethreealkylegroupsandsomeotherusefulgroupsaschemicalsymbGols: =145\newcommand{\Me}{\protect\kemtkn{Me}} =146\newcommand{\Et}{\protect\kemtkn{Et}} =147\newcommand{\Bu}{\protect\kemtkn{Bu}} =148\newcommand{\OH}{\protect\kemtkn{OH}} =149\newcommand{\COOH}{\protect\kemtkn{COOH}} =150\newcommand{\CH}{\protect\kemtkn{CH}}9ThisUUbringsustotheendofrchemsym.qHopGeyou'llenjoyit!%9xCopyrightcȷ 1996byMatsDahlgren=8a; ,t}\cmti7+N cmbx12*p0J cmsl10)"V cmbx10(': cmti10' cmmi10 0ercmmi7K`y cmr10ٓRcmr7Zcmr5d