42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
# This file is part of the PD system
|
|
# Copyright (C) 1998 Ralf Hartmut Gueting, Fachbereich Informatik, FernUniversitaet Hagen
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#!/bin/sh
|
|
#
|
|
# pd2tex - Converts a PD file to a TEX file
|
|
#
|
|
# May 2004, M. Spiekermann
|
|
|
|
pdFile="$1"
|
|
texFile="$1.tex"
|
|
tmpTexFile=".tmp.$texFile"
|
|
errFile=".pd.err"
|
|
|
|
rm -f $errFile
|
|
pdtabs < $pdFile | maketex >> $tmpTexFile 2>$errFile
|
|
rc_maketex=$?
|
|
|
|
cat $PD_HEADER $tmpTexFile > $texFile
|
|
|
|
if [ $rc_maketex -ne 0 ]; then
|
|
|
|
printf "\n PD-Error: Could not create $texFile completely!\n\n"
|
|
echo "\end{document}" >> $texFile
|
|
|
|
else
|
|
|
|
rm -f $errFile
|
|
|
|
fi
|
|
|
|
rm -f $tmpTexFile
|