Batch-processing of tikz files now uses tikz2pdf, successfully.

master
Taha Ahmed 13 years ago
parent 91f655e744
commit b0b46e1879

@ -90,32 +90,32 @@ else
echo "Any other input exits the program"
read usrchoice
# Determine number of .Rnw files in current directory
Rnwfileno=$(ls -1 $Rnwfiles | wc -l)
echo "No of .Rnw files: $Rnwfileno"
# Check if number of .Rnw files larger than one
if [ $Rnwfileno -gt 1 ]; then
# If larger than one, ask for user input
# Indicates more than one Rnw file in current directory.
# This introduces a naming ambiguity.
# Resolve by asking user for current jobname
echo "Found $Rnwfileno .Rnw files in current directory"
echo "Please specify the jobname"
read jobname
if [ -z "$jobname" ]; then
# string is null
echo "Specified jobname cannot be parsed. Terminating..."
exit 1
fi
else
# There is exactly one *.Rnw file is current directory
# Fetch the jobname from the .Rnw filename by stripping off the file extension
Rnwfilename=$(ls -1 $Rnwfiles)
jobname=${Rnwfilename%.*}
fi
echo "Jobname set to: $jobname"
## Determine number of .Rnw files in current directory
#Rnwfileno=$(ls -1 $Rnwfiles | wc -l)
#echo "No of .Rnw files: $Rnwfileno"
#
## Check if number of .Rnw files larger than one
#if [ $Rnwfileno -gt 1 ]; then
# # If larger than one, ask for user input
# # Indicates more than one Rnw file in current directory.
# # This introduces a naming ambiguity.
# # Resolve by asking user for current jobname
# echo "Found $Rnwfileno .Rnw files in current directory"
# echo "Please specify the jobname"
# read jobname
# if [ -z "$jobname" ]; then
# # string is null
# echo "Specified jobname cannot be parsed. Terminating..."
# exit 1
# fi
#else
# # There is exactly one *.Rnw file is current directory
# # Fetch the jobname from the .Rnw filename by stripping off the file extension
# Rnwfilename=$(ls -1 $Rnwfiles)
# jobname=${Rnwfilename%.*}
#fi
#
#echo "Jobname set to: $jobname"
if [[ $usrchoice == "pdf-all" || $usrchoice == "1" ]]; then
echo "<1> 'pdf-all' chosen"
@ -126,11 +126,9 @@ else
simpledelay.sh 2
for tikzfilename in $tikzfiles; do
# Remove the file extension
tikzlabel=${tikzfilename%.*}
# Call pdfLaTeX with tikz label as jobname # See TiKZ manual section 63 for more details
echo "Executing <pdflatex --jobname=$tikzlabel $jobname.$TeXfiletype>"
pdflatex --jobname=$tikzlabel $jobname.$TeXfiletype
# Call tikz2pdf
echo "<Executing> tikz2pdf $tikzfilename"
tikz2pdf --once $tikzfilename
done
echo "Completed TikZ file processing"
fi

Loading…
Cancel
Save