#$ run_tex
#
# include errors as well for pdflatex
# echo "directory please"
# read dir
#  echo $dir
# sleep 1

# echo "filename please"
# read file

master_file="thesis_first_04082013"
echo $master_file
sleep 1

# # ln -s /data/research/comps/figures/ ./$file
# echo "complete figure links"
# 
# ln -s /data/research/thesis/uiDiss_srk_04082013.sty .
# ln -s /data/research/bib/aas_macros_srk.sty .
# ln -s /data/research/bib/master_bib.bib .
# ln -s /data/research/thesis/figures/ .
# sleep 2

# echo "linking tex files"
# 
# ch0="/data/research/thesis/ch0_prelude/prelude.tex"
# ln -s $ch0 .
# 
# ch1="/data/research/thesis/ch1_intro/02242013_rev2/ch1_intro_rev2_master.tex"
# ln -s $ch1 .
# 
# ch2="/data/research/thesis/ch2_background/02242013_rev2/ch2_lit_rev2_master.tex"
# ln -s $ch2 .
# # 
# ch3="/data/research/thesis/ch3_instr_process/02242013_rev2/ch3_rev2_master.tex"
# ln -s $ch3 .
# 
# ch4="/data/research/thesis/ch4_results/02242013_rev2/ch4_results_rev2_master.tex"
# ln -s $ch4 .
# # 
# ch5="/data/research/thesis/ch5_model/02242013_rev2/ch5_model_rev2_master.tex"
# ln -s $ch5 .
# # 
#  ch6="/data/research/thesis/ch6_conclusion/02242013_rev2/ch6_summary_rev2_master.tex"
#  ln -s $ch6 .
# # 
#  app1="/data/research/thesis/appendix1/02242013_rev2/app1_rev2_master.tex"
#   ln -s $app1 .
# echo " end linking tex files"
# sleep 2
# ln -s ../intro_final/intro_final_master.tex .
# 
# ln -s ../lit_final/lit_final_master.tex .
#  ln -s ../results_final/results_final_master.tex .
#  ln -s ../future_rev1/future_rev1_master.tex .
# sleep 2
# export file=intro_11122012
# echo "filename please"
# read file
#  echo $file
# echo "executing Latex"
# echo " File name"
# read $file
# echo $file
# sleep 2


# pdflatex -interaction=batchmode ./$dir/$file

# pdflatex -interaction=batchmode  $master_file 
# bibtex $master_file
# # sleep 2
# 
pdflatex -interaction=batchmode $master_file 
pdflatex -interaction=batchmode $master_file 
# 
echo $master_file.pdf
 acroread $master_file.pdf &
# cp master_final.pdf srkaeppler_comps_final.pdf 



