dvipdf.test 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #! /bin/sh
  2. # Copyright (C) 2006, 2007 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU Texinfo.
  5. #
  6. # GNU Texinfo is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License,
  9. # or (at your option) any later version.
  10. #
  11. # GNU Texinfo is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. required='tex'
  19. . ./defs || exit 1
  20. set -e
  21. # one_run ARGS -- FILES
  22. # ---------------------
  23. # Run texi2dvi with ARGS, expect the FILES to be left. Remove them.
  24. one_run ()
  25. {
  26. # Use pstricks.
  27. cat >input.tex <<EOF
  28. \documentclass[a4paper]{article}
  29. \usepackage{pst-node}
  30. \pagestyle{empty}
  31. \begin{document}
  32. \begin{psmatrix}
  33. A & B & C & D & E & F
  34. \end{psmatrix}
  35. \psset{arrows=->}
  36. \nccircle{1,1}{0.5}
  37. \nccircle[angleA=30]{1,2}{0.4}
  38. \nccircle[arrows=-,nodesep=0.05]{1,3}{0.2}
  39. \ncloop[angleB=180]{1,4}{1,4}
  40. \ncloop[angleB=180,linearc=0.35,nodesep=0.1]{1,5}{1,5}
  41. \ncloop[angleB=180,linearc=0.15,loopsize=0.4]{1,6}{1,6}
  42. \vspace{1cm}
  43. \begin{psmatrix}
  44. A & B & C & D
  45. \end{psmatrix}
  46. \psset{arrows=->,nodesep=0.05}
  47. \ncangles[armA=0.8,armB=0,angleA=70,angleB=110,linearc=0.22]{1,1}{1,1}
  48. \ncdiag[arm=0.9,angleA=70,angleB=110,linearc=0.3]{1,2}{1,2}
  49. \ncdiag[arm=0.8,angleA=50,angleB=130,linearc=0.25]{1,3}{1,3}
  50. \ncdiag[arm=0.8,angleA=50,angleB=130,linearc=0.28]{1,4}{1,4}
  51. \end{document}
  52. EOF
  53. TEXI2DVI_pass $(optionset_get 1 "$@") input.tex
  54. # There should only be the expected and input files.
  55. assert_and_remove_files $(optionset_get 2 "$@") input.tex
  56. }
  57. one_run --dvipdf --batch --clean \
  58. -- \
  59. input.pdf