Summary: cstex for tetex 1.0.7-47, 2.0.1-6, ... based TeX systems Name: tetex107-cstex Version: 1.0.0 Release: 3 URL: http://math.feld.cvut.cz/olsak/cstex License: GPL Group: Publishing BuildRoot: %{_tmppath}/%{name}-root BuildArch: noarch Prefix: / Requires: tetex >= 1.0.7-47 Requires: tetex-latex Requires: tetex-dvips Distribution: Mandrake Linux Packager: Peter Gasparovic %description minor modifications of tetex 1.0.7-47, 2.0.1-6 (and possibly later) for full support of CsTeX (typesetting in Czech/Slovak language in TeX). (CS support in both Babel and CsLaTeX.) For best functionality, install also csindex and csbibtex. Strucny popis cinnosti rpm: 1. Uprava konfiguracnych suborov: web2c/texmf.cnf - pridane TEXINPUTS.kpsewhich (uzitocne pri hladani niektorych suborov) tex/generic/config/language.dat - vybrane vzory delenia pre orig. latex (a Babel) web2c/fmtutil.cnf - odkomentovanie riadkov pre cs formaty (v norm. distribucii je to uz hotove) dvips//config.cfg - opravena volba -o 2. Vytvorenie dalsich skriptov pre cs verzie plainu, latexu, pdf..., tj. pre kodovanie iso-8859-2 (...i) a cp1250 (...w) 3. Vygenerovanie cs formatov a orig. latex formatu (kvoli zmenenemu language.dat) %prep #nic %build # nic %install fmtpath=`kpsewhich texmf.cnf` fmtpath=`dirname $fmtpath` fmtpath=`dirname $fmtpath` fmtpath=`dirname $fmtpath` #default value for fmtpath should be /usr/share (Mandrake Linux 8.1, 8.2) #rm -rf $RPM_BUILD_ROOT #mkdir -p $RPM_BUILD_ROOT$fmtpath #cp -r /usr/src/RPM/BUILD/%{name}-%{version}/texmf $RPM_BUILD_ROOT$fmtpath/texmf %preun # $binpath ... where to uninstall csplain, cslatex, pdfcsplain, pdfcslatex: binpath=`which tex` binpath=`dirname $binpath` # $fmtpath ... where to uninstall csplain.fmt and others, and where to begin search of configuration files: fmtpath=`kpsewhich texmf.cnf` fmtpath=`dirname $fmtpath` for fmtname in csplain cslatex pdfcsplain pdfcslatex; do echo $fmtname rm -f $binpath/"$fmtname"i rm -f $binpath/"$fmtname"w rm -f $fmtpath/"$fmtname".fmt done %postun # nic %pre # nic %post # This script installs new scripts: csplain, cslatex, pdfcsplain and # pdfcslatex into bin directory (these new scripts use TCX tables). # Next, install-cstex generates CSTeX formats in texmf/web2c. # For more details, see README.tetex-1.0 in CSTeX distribution. # $binpath ... where to install csplain, cslatex, pdfcsplain, pdfcslatex: binpath=`which tex` binpath=`dirname $binpath` # $fmtpath ... where to install csplain.fmt and others, and where to begin search of configuration files: fmtpath=`kpsewhich texmf.cnf` fmtpath=`dirname $fmtpath` # configuring texmf.cnf: cp -f $fmtpath/texmf.cnf $fmtpath/texmf.cnf.old tmp=`mktemp -q /tmp/texmf.XXXXXX` || error "mktemp" #-------------------------- line=`grep "^TEXINPUTS.kpsewhich" $fmtpath/texmf.cnf` if [ "$line" = "" ]; then sed $'/^TEXINPUTS.tex / a\\\n\ \\\n\ % for searching of strange files (unknown type e.g.)\\\n\ TEXINPUTS.kpsewhich = .;$TEXMF//\ \\\n\ ' $fmtpath/texmf.cnf > $tmp cp -f $tmp $fmtpath/texmf.cnf fi rm -f $tmp chmod 644 $fmtpath/texmf.cnf # configuring language.dat: # (added [^a-z,=]* because of new format of comments in version 2.0.1-6 cp -f $fmtpath/../tex/generic/config/language.dat $fmtpath/../tex/generic/config/language.dat.old tmp=`mktemp -q /tmp/language.XXXXXX` || error "mktemp" sed $'/^%/! s/^/%! /\n\ /american.*tex/ s/^%[^a-z,=]*//\n\ /=USenglish/ s/^%[^a-z,=]*//\n\ /=english/ s/^%[^a-z,=]*//\n\ /czech.*tex/ s/^%[^a-z,=]*//\n\ /slovak.*tex/ s/^%[^a-z,=]*//\n\ /nohyphenation.*tex/ s/^%[^a-z,=]*//\ ' $fmtpath/../tex/generic/config/language.dat > $tmp mv -f $tmp $fmtpath/../tex/generic/config/language.dat chmod 644 $fmtpath/../tex/generic/config/language.dat # configuring fmtutil.cnf: cp -f $fmtpath/fmtutil.cnf $fmtpath/fmtutil.cnf.old tmp=`mktemp -q /tmp/texmf.XXXXXX` || error "mktemp" #-------------------------- sed $'/csplain/ s/^%[^a-z]*//\n\ /cslatex/ s/^%[^a-z]*//\n\ /pdfcsplain/ s/^%[^a-z]*//\n\ /pdfcslatex/ s/^%[^a-z]*//\ ' $fmtpath/fmtutil.cnf > $tmp mv -f $tmp $fmtpath/fmtutil.cnf chmod 644 $fmtpath/fmtutil.cnf # configuring dvips//config.ps: cp -f $fmtpath/../dvips/config/config.ps $fmtpath/../dvips/config/config.ps.old tmp=`mktemp -q /tmp/dvips.XXXXXX` || error "mktemp" sed "s/^o /%o /" $fmtpath/../dvips/config/config.ps > $tmp mv -f $tmp $fmtpath/../dvips/config/config.ps chmod 644 $fmtpath/../dvips/config/config.ps # script creating for: csplain, cslatex, pdfcsplain a pdfcslatex (iso8859-2 and cp1250 versions): echo installing scripts: for fmtname in csplain cslatex pdfcsplain pdfcslatex; do echo $binpath/"$fmtname"i rm -f $binpath/"$fmtname"i echo '#!/bin/sh' > $binpath/"$fmtname"i if [ ! -f $binpath/csplaini ]; then echo You have no write permissions to $binpath exit fi pre= if [ "$fmtname" = "pdfcsplain" -o "$fmtname" = "pdfcslatex" ]; then pre=pdf fi echo "exec ${pre}tex -progname=$fmtname -translate-file=il2-cs" '${1:+"$@"}' >> $binpath/"$fmtname"i chmod a+x $binpath/"$fmtname"i done for fmtname in csplain cslatex pdfcsplain pdfcslatex; do echo $binpath/"$fmtname"w rm -f $binpath/"$fmtname"w echo '#!/bin/sh' > $binpath/"$fmtname"w if [ ! -f $binpath/csplainw ]; then echo You have no write permissions to $binpath exit fi pre= if [ "$fmtname" = "pdfcsplain" -o "$fmtname" = "pdfcslatex" ]; then pre=pdf fi echo "exec ${pre}tex -progname=$fmtname -translate-file=cp1250cs" '${1:+"$@"}' >> $binpath/"$fmtname"w chmod a+x $binpath/"$fmtname"w done # generovanie formatu: mktexlsr cd $fmtpath fmtutil --byfmt csplain if [ ! -f csplain.fmt ]; then echo Impossible to make csplain format, something wrong echo Have you csplain.tar, csfonts.tar and cslatex.tar installed in your texmf? exit fi fmtutil --byfmt cslatex fmtutil --byfmt pdfcsplain fmtutil --byfmt pdfcslatex # originalny latex (ale po zmene vzorov delenia slov v language.dat) fmtutil --byfmt latex fmtutil --byfmt pdflatex mktexlsr %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %changelog * Wed Oct 16 2003 Peter Gasparovic - fixed wrong filename when generating pdf formats (fmtutil instead of initex) * Sat Oct 11 2003 Peter Gasparovic - fixed error when MDK 9.1 (tetex 2.0.1-6). Reported by Miroslav Fikar. * Sat Dec 14 2002 Peter Gasparovic - Initial build.