PhD thesis of Renata Kopečná Angular analysis of B+->K*+(K+pi0)mu+mu- decay with the LHCb experiment
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.0 KiB

  1. #!/bin/bash
  2. #
  3. # compile a feynman diagram
  4. if [ $# -eq 1 ]; then
  5. echo "Building $1_diagram from $1.tex"
  6. else
  7. echo "Usage: bash make_plot.sh texfileName"
  8. echo "texfileName is without .tex!"
  9. exit 2
  10. fi
  11. pdflatex $1".tex" 2>/dev/null 1>&2
  12. if [ $? -ne 0 ]; then
  13. echo "First compilation failed. Check log."
  14. exit 1
  15. else
  16. echo "First pdflatex succesfully completed."
  17. fi
  18. mpost $1"_diagram" 2>/dev/null 1>&2
  19. if [ $? -ne 0 ]; then
  20. echo "mpost compilation failed. Check log."
  21. exit 1
  22. else
  23. echo "mpost succesfully completed."
  24. fi
  25. pdflatex $1".tex" 2>/dev/null 1>&2
  26. if [ $? -ne 0 ]; then
  27. echo "Second compilation failed. Check log."
  28. exit 1
  29. else
  30. echo "Second pdflatex succesfully completed."
  31. fi
  32. #Remove the second pdf page, pdftk need output != input so rename it afterwards
  33. #If it works, it aint stupid
  34. pdftk $1.pdf cat 1 output $1_2.pdf
  35. mv $1_2.pdf $1.pdf
  36. #Always clean after build
  37. rm $1.aux
  38. rm $1.log
  39. rm $1.synctex
  40. rm $1_diagram.log
  41. rm $1_diagram.mp
  42. rm $1_diagram.t1
  43. rm $1_diagram.1