Index: mttroot/mtt/bin/trans/latex_tidy ================================================================== --- mttroot/mtt/bin/trans/latex_tidy +++ mttroot/mtt/bin/trans/latex_tidy @@ -12,10 +12,14 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.7 1996/12/19 10:24:29 peterg +## Uniform conversion of mttxi --> x_{i} for x,u,y and z +## Convert ???mttx to mtt x for x,u,y and z +## ## Revision 1.6 1996/12/12 16:03:19 peterg ## Removed global argument stuff for y - its already done in the ## translation. ## ## Revision 1.5 1996/12/12 15:59:06 peterg @@ -33,17 +37,24 @@ ## ## Revision 1.1 1996/08/18 20:03:12 peter ## Initial revision ## ############################################################### - + cat $1 | \ tr "[A-Z]" "[a-z]" | \ -sed -e "s/\// \\\over /g" \ +sed \ + -e "s/_\([a-z0-9]*\)/_{\1}/g" \ + -e "s/\// \\\over /g" \ -e "s/[0-9a-z_]*mtty/mtty/g" \ -e "s/[0-9a-z_]*mttu/mttu/g" \ - -e "s/mttex/\\\chi/g" \ + -e "s/mttx\([0-9]*\)/x_{\1}/g" \ + -e "s/mttex\([0-9]*\)/\\\chi_{\1}/g" \ + -e "s/mttui\([0-9]*\)/v_{\1}/g" \ + -e "s/mttu\([0-9]*\)/u_{\1}/g" \ + -e "s/mtty\([0-9]*\)/y_{\1}/g" \ + -e "s/mttz\([0-9]*\)/z_{\1}/g" \ -e "s/mttdx/\\\dot x/g" \ -e "s/mttdz/\\\dot z_/g" \ -e "s/mttdu/\\\dot u_/g" \ -e "s/dot_/ \\\dot /g" \ -e "s/mtta/A/g" \ @@ -54,15 +65,10 @@ -e "s/mttg/G/g" \ -e "s/mtti/I/g" \ -e "s/mttm/M/g" \ -e "s/mtto/O/g" \ -e "s/mttv/V/g" \ - -e "s/mttx\([0-9]*\)/x_{\1}/g" \ - -e "s/mttui\([0-9]*\)/v_{\1}/g" \ - -e "s/mttu\([0-9]*\)/u_{\1}/g" \ - -e "s/mtty\([0-9]*\)/y_{\1}/g" \ - -e "s/mttz\([0-9]*\)/z_{\1}/g" \ -e "s/mtty0/y_0/g" \ -e "s/mttu0/u_0/g" \ -e "s/mttx/x/g" \ -e "s/mttz/z/g" \ -e "s/mttyy/Y/g" \ @@ -91,15 +97,17 @@ -e "s/omega/\\\omega/g" \ -e "s/zeta/\\\zeta/g" \ -e "s/sin/\\\sin/g" \ -e "s/cos/\\\cos/g" \ -e "s/23/{23}/g" \ - -e "s/+-/ -/g" |\ -cat -s | \ + -e "s/+-/ -/g" \ + | cat -s | \ sed -e "s/ $//g" | \ tr -s '\012' '\012' \ >junk mv junk $1 + +