SHARE
TWEET

Untitled

a guest Aug 17th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. documentclass{article}
  2.  
  3. usepackage{tikz}
  4. usepackage{pgfplots}
  5. usepgfplotslibrary{external}
  6. tikzexternalize[mode=list and make]
  7.  
  8. begin{document}
  9.  
  10. input{tikz/figure.tikz}
  11.  
  12. end{document}
  13.      
  14. begin{figure}
  15. begin{tikzpicture}
  16. begin{axis}
  17. addplot {x^2};
  18. end{axis}
  19. end{tikzpicture}
  20. caption{Our first external graphics example}
  21. end{figure}
  22.      
  23. ALL_FIGURE_NAMES=$(shell cat mwe.figlist)
  24. ALL_FIGURES=$(ALL_FIGURE_NAMES:%=%.pdf)
  25.  
  26. allimages: $(ALL_FIGURES)
  27.     @echo All images exist now. Use make -B to re-generate them.
  28.  
  29. FORCEREMAKE:
  30.  
  31. include $(ALL_FIGURE_NAMES:%=%.dep)
  32.  
  33. %.dep:
  34.     mkdir -p "$(dir $@)"
  35.     touch "$@" # will be filled later.
  36.  
  37. mwe-figure0.pdf:
  38.     pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "mwe-figure0" "deftikzexternalrealjob{mwe}input{mwe}"
  39.  
  40. mwe-figure0.pdf: mwe-figure0.md5
  41.      
  42. documentclass{article}
  43.  
  44. usepackage{tikz}
  45. usepackage{pgfplots}
  46. usepgfplotslibrary{external}
  47. tikzexternalize[mode=list and make]
  48.  
  49. tikzset{%
  50.     external/system call={cd .. && pdflatex tikzexternalcheckshellescape --halt-on-error --interaction=batchmode --output-directory=./build --jobname "image" "texsource"},
  51.     /pgf/images/include external/.code={%
  52.         includegraphics{build/#1}%
  53.     },
  54. }
  55. begin{document}
  56.  
  57. input{tikz/figure.tikz}
  58.  
  59. end{document}
  60.      
  61. ALL_FIGURE_NAMES=$(shell cat mwe.figlist)
  62. ALL_FIGURES=$(ALL_FIGURE_NAMES:%=%.pdf)
  63.  
  64. allimages: $(ALL_FIGURES)
  65.         @echo All images exist now. Use make -B to re-generate them.
  66.  
  67. FORCEREMAKE:
  68.  
  69. include $(ALL_FIGURE_NAMES:%=%.dep)
  70.  
  71. %.dep:
  72.         mkdir -p "$(dir $@)"
  73.         touch "$@" # will be filled later.
  74.  
  75. mwe-figure0.pdf:
  76.         cd .. && pdflatex -shell-escape --halt-on-error --interaction=batchmode --output-directory=./build --jobname "mwe-figure0" "deftikzexternalrealjob{mwe}input{mwe}"
  77.  
  78. mwe-figure0.pdf: mwe-figure0.md5
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top