X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Fm17n-docs.git;a=blobdiff_plain;f=utils%2Flatex.sh;h=5236482fbd69a68b06e9f1fa68c127332ea162b4;hp=6003c07f4ffda2bbe84666f7cdd5b967e6601f4d;hb=eec81e9290cc6e143f551aaf60d352a89a3c7f18;hpb=7ecab4a333d778b06cbec11a4fc44c1a803d2565 diff --git a/utils/latex.sh b/utils/latex.sh index 6003c07..5236482 100755 --- a/utils/latex.sh +++ b/utils/latex.sh @@ -1,5 +1,5 @@ #!/bin/sh -# -*- coding: euc-jp; -*- +# -*- coding: utf-8; -*- # $1: target directory (usr/latex, ja/latex, or dev/latex) # $2: latex commnad (latex, platex, or pdflatex) @@ -11,21 +11,37 @@ cd $1 LATEX=$2 if [ $USR_JA_DEV = "ja" ] ; then LATEX=platex + if [ -d /usr/local/teTeX/bin ] ; then + PATH=/usr/local/teTeX/bin:$PATH + fi + SOURCE=m17n-lib-ja + echo '\appendix' > app.tex + sed -n -e '/コンパイル/,/GFDL/ p' < refman.tex >> app.tex sed -e '/documentclass/ s/a4paper/a4paper,twoside/' \ - -e '/M17N ¥é¥¤¥Ö¥é¥ê ¥â¥¸¥å¡¼¥ëº÷°ú/,/pages/ d' \ - -e '/M17N ¥é¥¤¥Ö¥é¥ê ¥Õ¥¡¥¤¥ë¤Î²òÀâ/,/textprop_8c/ d' \ - -e 's/M17N ¥é¥¤¥Ö¥é¥ê ¥Ú¡¼¥¸¤Î²òÀâ/Appendix/' \ - < refman.tex > m17n-lib.tex + -e '/コンパイル/,/GFDL/ d' \ + -e '/structMInputXIMArgIM/ r app.tex' \ + < 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 + echo '\appendix' > app.tex + sed -n -e '/Print compile/,/GFDL/ p' < refman.tex >> app.tex 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 's/The M17N Library Page Documentation/Appendix/' \ - < refman.tex > m17n-lib.tex -fi -${LATEX} m17n-lib.tex -if [ "${USR_JA_DEV}" = "ja" ] ; then - nkf -e < m17n-lib.idx > temp.idx; mv temp.idx m17n-lib.idx + -e '/Print compile/,/GFDL/ d' \ + -e '/structMInputXIMArgIM/ r app.tex' \ + < refman.tex > ${SOURCE}.tex fi -makeindex m17n-lib.idx -${LATEX} m17n-lib.tex +${LATEX} ${SOURCE}.tex +#if [ "${USR_JA_DEV}" = "ja" ] ; then +# nkf -e < ${SOURCE}.idx > temp.idx; mv temp.idx ${SOURCE}.idx +#fi +/usr/bin/makeindex ${SOURCE}.idx +${LATEX} ${SOURCE}.tex +${LATEX} ${SOURCE}.tex