diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/t2/etc/rubibtex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/t2/etc/rubibtex')
-rw-r--r-- | macros/latex/contrib/t2/etc/rubibtex/README | 50 | ||||
-rw-r--r-- | macros/latex/contrib/t2/etc/rubibtex/rubibtex | 110 | ||||
-rw-r--r-- | macros/latex/contrib/t2/etc/rubibtex/rubibtex.bat | 5 | ||||
-rw-r--r-- | macros/latex/contrib/t2/etc/rubibtex/rubibtex.old | 80 | ||||
-rw-r--r-- | macros/latex/contrib/t2/etc/rubibtex/rubibtex.sed | 68 |
5 files changed, 313 insertions, 0 deletions
diff --git a/macros/latex/contrib/t2/etc/rubibtex/README b/macros/latex/contrib/t2/etc/rubibtex/README new file mode 100644 index 0000000000..26dbe3aae1 --- /dev/null +++ b/macros/latex/contrib/t2/etc/rubibtex/README @@ -0,0 +1,50 @@ +This is `rubibtex', a wrapper for `bibtex' which allows one to use +Russian letters as item names in bibliography with BIBTEX. It is part +of the T2 package. + +It is assumed that your rusification is based on a T2 package (for +other rusifications this problem may be absent or may be solved +differently). + +The discussed problem only arises when you are using Russian letters +as item names (i.e., in the argument of \bibitem command). This could +generally be avoided: simply name the reference keys of your books +with Latin letters, --- these reference keys are purely internal LaTeX +values, and do not appear in the DVI file. There are no problems with +using Russian letters in book names, and in all other places which go +to the DVI file. But it _may_ be convenient to use Russian reference +keys in your BIBTEX database files. + +You will need: + +1) LaTeX setup based on a T2 package (in particular, the citehack.sty + file which allows one to use Russian letters as references) + +2) BIBTEX which does not have problems with 8-bit characters + (otherwise it is impossible to use such BIBTEX in _any_ rusified TeX + environment). Unfortunately, the default bibtex32.exe and bibtex.exe + in a emTeX distribution appear to have problems with 8-bit characters. + Try using BIBTEX binaries found at CTAN:biblio/bibtex/8-bit. + +3) SED binary. It is available on any UNIX box. For DOS you can find + it at + + ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/sed118b.zip + + Copy `sed.exe' to a directory contained in %PATH% environment + variable. + +4) The `rubibtex' script/batch file. + +If reference names in your BIB database use russian letters, then run +`rubibtex' instead of `bibtex' (otherwise you can safely run bibtex). + +If you are using DOS, copy `rubibtex.sed' to `\emtex\data' directory, +and copy `rubibtex.bat' to `\emtex\bin' directory. + +If you are using UNIX, copy the `rubibtex' shell script to +e.g. `/usr/local/bin' directory. + +Note: we assume a cp866 encoding (of BIBTEX database files) for DOS +and koi8-r for UNIX. Change the encoding of `rubibtex.sed' or +`rubibtex' script otherwise. diff --git a/macros/latex/contrib/t2/etc/rubibtex/rubibtex b/macros/latex/contrib/t2/etc/rubibtex/rubibtex new file mode 100644 index 0000000000..3938157328 --- /dev/null +++ b/macros/latex/contrib/t2/etc/rubibtex/rubibtex @@ -0,0 +1,110 @@ +#!/bin/sh + +# rubibtex, based on the original version contained in the t2 bundle. +# Thomas Esser, Public Domain. + +progname=rubibtex +tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ +job=$1 +backup="$tmpdir/orig.aux" + +case $job in + "") + echo "usage: $progname file" >&2 + exit 1 +esac + +if test ! -f "$job.aux"; then + echo "$progname: file \`$job.aux' does not exist." >&2 + exit 1 +fi + +trap ' + rm -rf "$tmpdir" + exit 1 +' 1 2 3 7 13 15 +(umask 077; mkdir "$tmpdir") \ + || { echo "$progname: could not create directory \`$tmpdir'" >&2; exit 1; } + +cat <"$job.aux" >"$backup" || { + echo "$progname: could not create backup of file \`$job.aux' as \`$backup'." >&2 + rm -rf "$tmpdir" + exit 1 +} + +sed ' + /^\\citation/ { + s/\\IeC {\\CYRA }/�/g + s/\\IeC {\\CYRB }/�/g + s/\\IeC {\\CYRV }/�/g + s/\\IeC {\\CYRG }/�/g + s/\\IeC {\\CYRD }/�/g + s/\\IeC {\\CYRE }/�/g + s/\\IeC {\\CYRYO }/�/g + s/\\IeC {\\CYRZH }/�/g + s/\\IeC {\\CYRZ }/�/g + s/\\IeC {\\CYRI }/�/g + s/\\IeC {\\CYRISHRT }/�/g + s/\\IeC {\\CYRK }/�/g + s/\\IeC {\\CYRL }/�/g + s/\\IeC {\\CYRM }/�/g + s/\\IeC {\\CYRN }/�/g + s/\\IeC {\\CYRO }/�/g + s/\\IeC {\\CYRP }/�/g + s/\\IeC {\\CYRR }/�/g + s/\\IeC {\\CYRS }/�/g + s/\\IeC {\\CYRT }/�/g + s/\\IeC {\\CYRU }/�/g + s/\\IeC {\\CYRF }/�/g + s/\\IeC {\\CYRH }/�/g + s/\\IeC {\\CYRC }/�/g + s/\\IeC {\\CYRCH }/�/g + s/\\IeC {\\CYRSH }/�/g + s/\\IeC {\\CYRSHCH }/�/g + s/\\IeC {\\CYRHRDSN }/�/g + s/\\IeC {\\CYRERY }/�/g + s/\\IeC {\\CYRSFTSN }/�/g + s/\\IeC {\\CYREREV }/�/g + s/\\IeC {\\CYRYU }/�/g + s/\\IeC {\\CYRYA }/�/g + s/\\IeC {\\cyra }/�/g + s/\\IeC {\\cyrb }/�/g + s/\\IeC {\\cyrv }/�/g + s/\\IeC {\\cyrg }/�/g + s/\\IeC {\\cyrd }/�/g + s/\\IeC {\\cyre }/�/g + s/\\IeC {\\cyryo }/�/g + s/\\IeC {\\cyrzh }/�/g + s/\\IeC {\\cyrz }/�/g + s/\\IeC {\\cyri }/�/g + s/\\IeC {\\cyrishrt }/�/g + s/\\IeC {\\cyrk }/�/g + s/\\IeC {\\cyrl }/�/g + s/\\IeC {\\cyrm }/�/g + s/\\IeC {\\cyrn }/�/g + s/\\IeC {\\cyro }/�/g + s/\\IeC {\\cyrp }/�/g + s/\\IeC {\\cyrr }/�/g + s/\\IeC {\\cyrs }/�/g + s/\\IeC {\\cyrt }/�/g + s/\\IeC {\\cyru }/�/g + s/\\IeC {\\cyrf }/�/g + s/\\IeC {\\cyrh }/�/g + s/\\IeC {\\cyrc }/�/g + s/\\IeC {\\cyrch }/�/g + s/\\IeC {\\cyrsh }/�/g + s/\\IeC {\\cyrshch }/�/g + s/\\IeC {\\cyrhrdsn }/�/g + s/\\IeC {\\cyrery }/�/g + s/\\IeC {\\cyrsftsn }/�/g + s/\\IeC {\\cyrerev }/�/g + s/\\IeC {\\cyryu }/�/g + s/\\IeC {\\cyrya }/�/g + } +' <"$backup" >"$job.aux" + +bibtex "$job" + +cat "$backup" > "$job.aux" +rm -rf "$tmpdir" +exit 0 diff --git a/macros/latex/contrib/t2/etc/rubibtex/rubibtex.bat b/macros/latex/contrib/t2/etc/rubibtex/rubibtex.bat new file mode 100644 index 0000000000..2f0be84cb4 --- /dev/null +++ b/macros/latex/contrib/t2/etc/rubibtex/rubibtex.bat @@ -0,0 +1,5 @@ +@echo off
+move %1.aux %TEMP%
+sed.exe -f %EMTEXDIR%\data\rubibtex.sed %TEMP%\%1.aux > %1.aux
+bibtex.exe -c %EMTEXDIR%\bibtex\csf\cp866rus.csf %1
+move %TEMP%\%1.aux .
diff --git a/macros/latex/contrib/t2/etc/rubibtex/rubibtex.old b/macros/latex/contrib/t2/etc/rubibtex/rubibtex.old new file mode 100644 index 0000000000..8a7f617cde --- /dev/null +++ b/macros/latex/contrib/t2/etc/rubibtex/rubibtex.old @@ -0,0 +1,80 @@ +#!/bin/sh + +TEMP=${TMPDIR-/tmp} + +mv -f $1.aux $TEMP + +sed ' +/^\\citation/ { +s/\\IeC {\\CYRA }//g +s/\\IeC {\\CYRB }//g +s/\\IeC {\\CYRV }//g +s/\\IeC {\\CYRG }//g +s/\\IeC {\\CYRD }//g +s/\\IeC {\\CYRE }//g +s/\\IeC {\\CYRYO }//g +s/\\IeC {\\CYRZH }//g +s/\\IeC {\\CYRZ }//g +s/\\IeC {\\CYRI }//g +s/\\IeC {\\CYRISHRT }//g +s/\\IeC {\\CYRK }//g +s/\\IeC {\\CYRL }//g +s/\\IeC {\\CYRM }//g +s/\\IeC {\\CYRN }//g +s/\\IeC {\\CYRO }//g +s/\\IeC {\\CYRP }//g +s/\\IeC {\\CYRR }//g +s/\\IeC {\\CYRS }//g +s/\\IeC {\\CYRT }//g +s/\\IeC {\\CYRU }//g +s/\\IeC {\\CYRF }//g +s/\\IeC {\\CYRH }//g +s/\\IeC {\\CYRC }//g +s/\\IeC {\\CYRCH }//g +s/\\IeC {\\CYRSH }//g +s/\\IeC {\\CYRSHCH }//g +s/\\IeC {\\CYRHRDSN }//g +s/\\IeC {\\CYRERY }//g +s/\\IeC {\\CYRSFTSN }//g +s/\\IeC {\\CYREREV }//g +s/\\IeC {\\CYRYU }//g +s/\\IeC {\\CYRYA }//g +s/\\IeC {\\cyra }//g +s/\\IeC {\\cyrb }//g +s/\\IeC {\\cyrv }//g +s/\\IeC {\\cyrg }//g +s/\\IeC {\\cyrd }//g +s/\\IeC {\\cyre }//g +s/\\IeC {\\cyryo }//g +s/\\IeC {\\cyrzh }//g +s/\\IeC {\\cyrz }//g +s/\\IeC {\\cyri }//g +s/\\IeC {\\cyrishrt }//g +s/\\IeC {\\cyrk }//g +s/\\IeC {\\cyrl }//g +s/\\IeC {\\cyrm }//g +s/\\IeC {\\cyrn }//g +s/\\IeC {\\cyro }//g +s/\\IeC {\\cyrp }//g +s/\\IeC {\\cyrr }//g +s/\\IeC {\\cyrs }//g +s/\\IeC {\\cyrt }//g +s/\\IeC {\\cyru }//g +s/\\IeC {\\cyrf }//g +s/\\IeC {\\cyrh }//g +s/\\IeC {\\cyrc }//g +s/\\IeC {\\cyrch }//g +s/\\IeC {\\cyrsh }//g +s/\\IeC {\\cyrshch }//g +s/\\IeC {\\cyrhrdsn }//g +s/\\IeC {\\cyrery }//g +s/\\IeC {\\cyrsftsn }//g +s/\\IeC {\\cyrerev }//g +s/\\IeC {\\cyryu }//g +s/\\IeC {\\cyrya }//g +} +' $TEMP/$1.aux > $1.aux + +bibtex $1 + +mv -f $TEMP/$1.aux . diff --git a/macros/latex/contrib/t2/etc/rubibtex/rubibtex.sed b/macros/latex/contrib/t2/etc/rubibtex/rubibtex.sed new file mode 100644 index 0000000000..099f89a565 --- /dev/null +++ b/macros/latex/contrib/t2/etc/rubibtex/rubibtex.sed @@ -0,0 +1,68 @@ +/^\\citation/ {
+s/\\IeC {\\CYRA }//g
+s/\\IeC {\\CYRB }//g
+s/\\IeC {\\CYRV }//g
+s/\\IeC {\\CYRG }//g
+s/\\IeC {\\CYRD }//g
+s/\\IeC {\\CYRE }//g
+s/\\IeC {\\CYRYO }//g
+s/\\IeC {\\CYRZH }//g
+s/\\IeC {\\CYRZ }//g
+s/\\IeC {\\CYRI }//g
+s/\\IeC {\\CYRISHRT }//g
+s/\\IeC {\\CYRK }//g
+s/\\IeC {\\CYRL }//g
+s/\\IeC {\\CYRM }//g
+s/\\IeC {\\CYRN }//g
+s/\\IeC {\\CYRO }//g
+s/\\IeC {\\CYRP }//g
+s/\\IeC {\\CYRR }//g
+s/\\IeC {\\CYRS }//g
+s/\\IeC {\\CYRT }//g
+s/\\IeC {\\CYRU }//g
+s/\\IeC {\\CYRF }//g
+s/\\IeC {\\CYRH }//g
+s/\\IeC {\\CYRC }//g
+s/\\IeC {\\CYRCH }//g
+s/\\IeC {\\CYRSH }//g
+s/\\IeC {\\CYRSHCH }//g
+s/\\IeC {\\CYRHRDSN }//g
+s/\\IeC {\\CYRERY }//g
+s/\\IeC {\\CYRSFTSN }//g
+s/\\IeC {\\CYREREV }//g
+s/\\IeC {\\CYRYU }//g
+s/\\IeC {\\CYRYA }//g
+s/\\IeC {\\cyra }//g
+s/\\IeC {\\cyrb }//g
+s/\\IeC {\\cyrv }//g
+s/\\IeC {\\cyrg }//g
+s/\\IeC {\\cyrd }//g
+s/\\IeC {\\cyre }//g
+s/\\IeC {\\cyryo }//g
+s/\\IeC {\\cyrzh }//g
+s/\\IeC {\\cyrz }//g
+s/\\IeC {\\cyri }//g
+s/\\IeC {\\cyrishrt }//g
+s/\\IeC {\\cyrk }//g
+s/\\IeC {\\cyrl }//g
+s/\\IeC {\\cyrm }//g
+s/\\IeC {\\cyrn }//g
+s/\\IeC {\\cyro }//g
+s/\\IeC {\\cyrp }//g
+s/\\IeC {\\cyrr }//g
+s/\\IeC {\\cyrs }//g
+s/\\IeC {\\cyrt }//g
+s/\\IeC {\\cyru }//g
+s/\\IeC {\\cyrf }//g
+s/\\IeC {\\cyrh }//g
+s/\\IeC {\\cyrc }//g
+s/\\IeC {\\cyrch }//g
+s/\\IeC {\\cyrsh }//g
+s/\\IeC {\\cyrshch }//g
+s/\\IeC {\\cyrhrdsn }//g
+s/\\IeC {\\cyrery }//g
+s/\\IeC {\\cyrsftsn }//g
+s/\\IeC {\\cyrerev }//g
+s/\\IeC {\\cyryu }//g
+s/\\IeC {\\cyrya }//g
+}
|