X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=utils%2Flatex.sh;h=b1a6f50709a6ec6a985980982f88b173b463307a;hb=95645d17a26ea478a202b64ec2282bec284d7729;hp=70b6459a428ce760242c2581f675d16f89c1304f;hpb=d93198d780f88fae2c64aa57ad58ff6b7e482dab;p=m17n%2Fm17n-docs.git diff --git a/utils/latex.sh b/utils/latex.sh index 70b6459..b1a6f50 100755 --- a/utils/latex.sh +++ b/utils/latex.sh @@ -1,16 +1,44 @@ #!/bin/sh +# -*- coding: euc-jp; -*- # $1: target directory (usr/latex, ja/latex, or dev/latex) # $2: latex commnad (latex, platex, or pdflatex) umask 002 USR_JA_DEV=`dirname $1` -TEXINPUTS=`pwd`/styles:`pwd`/data-${USR_JA_DEV}:.: +TEXINPUTS=`pwd`/styles:.: export TEXINPUTS cd $1 LATEX=$2 -${LATEX} m17n-lib.tex +if [ $USR_JA_DEV = "ja" ] ; then + LATEX=platex + SOURCE=m17n-lib-ja + sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \ + -e '/m17n ¥é¥¤¥Ö¥é¥ê ¥â¥¸¥å¡¼¥ëº÷°ú/,/pages/ d' \ + -e '/m17n ¥é¥¤¥Ö¥é¥ê ¥Õ¥¡¥¤¥ë/,/textprop_8c/ d' \ + -e '/m17n ¥é¥¤¥Ö¥é¥ê Directory Documentation/,/dir_000001/ d' \ + -e 's/m17n ¥é¥¤¥Ö¥é¥ê ¥Ú¡¼¥¸/Appendix/' \ + < refman.tex > ${SOURCE}.tex +elif [ $USR_JA_DEV = "dev" ] ; then + SOURCE=m17n-lib-dev + sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \ + -e '/The m17n Library Module Index/,/pages/ d' \ + -e '/The m17n Library File Documentation/,/textprop_8c/ d' \ + -e '/The m17n Library Directory Documentation/,/dir_000001/ d' \ + -e 's/The m17n Library Page Documentation/Appendix/' \ + < refman.tex > ${SOURCE}.tex +else + SOURCE=m17n-lib + sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \ + -e '/The m17n Library Module Index/,/pages/ d' \ + -e '/The m17n Library File Documentation/,/textprop_8c/ d' \ + -e '/The m17n Library Directory Documentation/,/dir_000001/ d' \ + -e 's/The m17n Library Page Documentation/Appendix/' \ + < refman.tex > ${SOURCE}.tex +fi +${LATEX} ${SOURCE}.tex if [ "${USR_JA_DEV}" = "ja" ] ; then - nkf -e < m17n-lib.idx > temp.idx; mv temp.idx m17n-lib.idx + nkf -e < ${SOURCE}.idx > temp.idx; mv temp.idx ${SOURCE}.idx fi -makeindex m17n-lib.idx -${LATEX} m17n-lib.tex +makeindex ${SOURCE}.idx +${LATEX} ${SOURCE}.tex +${LATEX} ${SOURCE}.tex