星火微课系统客户端
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

dvipdf 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh
  2. # $Id: dvipdf 9344 2009-01-10 22:11:18Z till $
  3. # Convert DVI to PDF.
  4. #
  5. # Please contact Andrew Ford <A.Ford@ford-mason.co.uk> with any questions
  6. # about this file.
  7. #
  8. # Based on ps2pdf
  9. # This definition is changed on install to match the
  10. # executable name set in the makefile
  11. GS_EXECUTABLE=gs
  12. OPTIONS=""
  13. DVIPSOPTIONS=""
  14. while true
  15. do
  16. case "$1" in
  17. -R*) DVIPSOPTIONS="$DVIPSOPTIONS $1";;
  18. -?*) OPTIONS="$OPTIONS $1" ;;
  19. *) break ;;
  20. esac
  21. shift
  22. done
  23. if [ $# -lt 1 -o $# -gt 2 ]; then
  24. echo "Usage: `basename $0` [options...] input.dvi [output.pdf]" 1>&2
  25. exit 1
  26. fi
  27. infile=$1;
  28. if [ $# -eq 1 ]
  29. then
  30. case "${infile}" in
  31. *.dvi) base=`basename "${infile}" .dvi` ;;
  32. *) base=`basename "${infile}"` ;;
  33. esac
  34. outfile="${base}".pdf
  35. else
  36. outfile=$2
  37. fi
  38. # We have to include the options twice because -I only takes effect if it
  39. # appears before other options.
  40. exec dvips -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -