1# Chemsym.perl 2# Keith Refson, November 1997 3# 4# This version does NOT support the use of '^' and '_' outside math mode. 5 package main; 6 7# 8# Undo catcode fiddling for images.tex. This disallows the 9# use of _ and ^ outside math mode, but it's probably in math mode there. 10# 11${AtBeginDocument_hook} .= "\$preamble .= \'\\catcode`\\^=7\n\';"; 12${AtBeginDocument_hook} .= "\$preamble .= \'\\catcode`\\_=8\n\';"; 13 14sub do_cmd_H{join('',"H", $_[0]);} 15sub do_cmd_D{join('',"D", $_[0]);} 16sub do_cmd_He{join('',"He", $_[0]);} 17sub do_cmd_Li{join('',"Li", $_[0]);} 18sub do_cmd_Be{join('',"Be", $_[0]);} 19sub do_cmd_B{join('',"B", $_[0]);} 20sub do_cmd_C{join('',"C", $_[0]);} 21sub do_cmd_N{join('',"N", $_[0]);} 22sub do_cmd_O{join('',"O", $_[0]);} 23sub do_cmd_F{join('',"F", $_[0]);} 24sub do_cmd_Ne{join('',"Ne", $_[0]);} 25sub do_cmd_Na{join('',"Na", $_[0]);} 26sub do_cmd_Mg{join('',"Mg", $_[0]);} 27sub do_cmd_Al{join('',"Al", $_[0]);} 28sub do_cmd_Si{join('',"Si", $_[0]);} 29sub do_cmd_P{join('',"P", $_[0]);} 30sub do_cmd_S{join('',"S", $_[0]);} 31sub do_cmd_Cl{join('',"Cl", $_[0]);} 32sub do_cmd_Ar{join('',"Ar", $_[0]);} 33sub do_cmd_K{join('',"K", $_[0]);} 34sub do_cmd_Ca{join('',"Ca", $_[0]);} 35sub do_cmd_Sc{join('',"Sc", $_[0]);} 36sub do_cmd_Ti{join('',"Ti", $_[0]);} 37sub do_cmd_V{join('',"V", $_[0]);} 38sub do_cmd_Cr{join('',"Cr", $_[0]);} 39sub do_cmd_Mn{join('',"Mn", $_[0]);} 40sub do_cmd_Fe{join('',"Fe", $_[0]);} 41sub do_cmd_Co{join('',"Co", $_[0]);} 42sub do_cmd_Ni{join('',"Ni", $_[0]);} 43sub do_cmd_Cu{join('',"Cu", $_[0]);} 44sub do_cmd_Zn{join('',"Zn", $_[0]);} 45sub do_cmd_Ga{join('',"Ga", $_[0]);} 46sub do_cmd_Ge{join('',"Ge", $_[0]);} 47sub do_cmd_As{join('',"As", $_[0]);} 48sub do_cmd_Se{join('',"Se", $_[0]);} 49sub do_cmd_Br{join('',"Br", $_[0]);} 50sub do_cmd_Kr{join('',"Kr", $_[0]);} 51sub do_cmd_Rb{join('',"Rb", $_[0]);} 52sub do_cmd_Sr{join('',"Sr", $_[0]);} 53sub do_cmd_Y{join('',"Y", $_[0]);} 54sub do_cmd_Zr{join('',"Zr", $_[0]);} 55sub do_cmd_Nb{join('',"Nb", $_[0]);} 56sub do_cmd_Mo{join('',"Mo", $_[0]);} 57sub do_cmd_Tc{join('',"Tc", $_[0]);} 58sub do_cmd_Ru{join('',"Ru", $_[0]);} 59sub do_cmd_Rh{join('',"Rh", $_[0]);} 60sub do_cmd_Pd{join('',"Pd", $_[0]);} 61sub do_cmd_Ag{join('',"Ag", $_[0]);} 62sub do_cmd_Cd{join('',"Cd", $_[0]);} 63sub do_cmd_In{join('',"In", $_[0]);} 64sub do_cmd_Sn{join('',"Sn", $_[0]);} 65sub do_cmd_Sb{join('',"Sb", $_[0]);} 66sub do_cmd_Te{join('',"Te", $_[0]);} 67sub do_cmd_I{join('',"I", $_[0]);} 68sub do_cmd_Xe{join('',"Xe", $_[0]);} 69sub do_cmd_Cs{join('',"Cs", $_[0]);} 70sub do_cmd_Ba{join('',"Ba", $_[0]);} 71sub do_cmd_La{join('',"La", $_[0]);} 72sub do_cmd_Ce{join('',"Ce", $_[0]);} 73sub do_cmd_Pr{join('',"Pr", $_[0]);} 74sub do_cmd_Nd{join('',"Nd", $_[0]);} 75sub do_cmd_Pm{join('',"Pm", $_[0]);} 76sub do_cmd_Sm{join('',"Sm", $_[0]);} 77sub do_cmd_Eu{join('',"Eu", $_[0]);} 78sub do_cmd_Gd{join('',"Gd", $_[0]);} 79sub do_cmd_Tb{join('',"Tb", $_[0]);} 80sub do_cmd_Dy{join('',"Dy", $_[0]);} 81sub do_cmd_Ho{join('',"Ho", $_[0]);} 82sub do_cmd_Er{join('',"Er", $_[0]);} 83sub do_cmd_Tm{join('',"Tm", $_[0]);} 84sub do_cmd_Yb{join('',"Yb", $_[0]);} 85sub do_cmd_Lu{join('',"Lu", $_[0]);} 86sub do_cmd_Hf{join('',"Hf", $_[0]);} 87sub do_cmd_Ta{join('',"Ta", $_[0]);} 88sub do_cmd_W{join('',"W", $_[0]);} 89sub do_cmd_Re{join('',"Re", $_[0]);} 90sub do_cmd_Os{join('',"Os", $_[0]);} 91sub do_cmd_Ir{join('',"Ir", $_[0]);} 92sub do_cmd_Pt{join('',"Pt", $_[0]);} 93sub do_cmd_Au{join('',"Au", $_[0]);} 94sub do_cmd_Hg{join('',"Hg", $_[0]);} 95sub do_cmd_Tl{join('',"Tl", $_[0]);} 96sub do_cmd_Pb{join('',"Pb", $_[0]);} 97sub do_cmd_Bi{join('',"Bi", $_[0]);} 98sub do_cmd_Po{join('',"Po", $_[0]);} 99sub do_cmd_At{join('',"At", $_[0]);} 100sub do_cmd_Rn{join('',"Rn", $_[0]);} 101sub do_cmd_Fr{join('',"Fr", $_[0]);} 102sub do_cmd_Ra{join('',"Ra", $_[0]);} 103sub do_cmd_Ac{join('',"Ac", $_[0]);} 104sub do_cmd_Th{join('',"Th", $_[0]);} 105sub do_cmd_Pa{join('',"Pa", $_[0]);} 106sub do_cmd_U{join('',"U", $_[0]);} 107sub do_cmd_Np{join('',"Np", $_[0]);} 108sub do_cmd_Pu{join('',"Pu", $_[0]);} 109sub do_cmd_Am{join('',"Am", $_[0]);} 110sub do_cmd_Cm{join('',"Cm", $_[0]);} 111sub do_cmd_Bk{join('',"Bk", $_[0]);} 112sub do_cmd_Cf{join('',"Cf", $_[0]);} 113sub do_cmd_Es{join('',"Es", $_[0]);} 114sub do_cmd_Fm{join('',"Fm", $_[0]);} 115sub do_cmd_Md{join('',"Md", $_[0]);} 116sub do_cmd_No{join('',"No", $_[0]);} 117sub do_cmd_Lr{join('',"Lr", $_[0]);} 118sub do_cmd_Db{join('',"Db", $_[0]);} 119sub do_cmd_Jl{join('',"Jl", $_[0]);} 120sub do_cmd_Rf{join('',"Rf", $_[0]);} 121sub do_cmd_Bh{join('',"Bh", $_[0]);} 122sub do_cmd_Hn{join('',"Hn", $_[0]);} 123sub do_cmd_Mt{join('',"Mt", $_[0]);} 124 1251; 126