SHARE
TWEET

Example of tikz externalization

a guest Jul 26th, 2010 261 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \documentclass{amsart}
  2. \renewcommand{\datename}{Last updated:}
  3.  
  4.  
  5. %%%%%%%%%%% Math  %%%%%%%%%%%%%%
  6. \RequirePackage{amsthm}
  7. \RequirePackage[alphabetic,initials]{amsrefs}
  8. \RequirePackage{array}
  9. \RequirePackage{enumerate}
  10. \RequirePackage{cancel}
  11. \RequirePackage{bbm}
  12.  
  13. %%%%%%%%%%% Graphics  %%%%%%%%%%%%%%
  14. \RequirePackage{tikz}
  15. \usetikzlibrary{matrix,arrows,backgrounds,shapes.misc,shapes.geometric}
  16.  
  17.  
  18. \newcommand{\dimV}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
  19.  
  20. %%
  21. % Dimension vector commands
  22. %%
  23. \newcommand{\dimfv}[5]{\begin{smallmatrix}
  24.                                                 #1\\ #2\\ #3\\ #4\\ #5
  25.                                            \end{smallmatrix}}
  26.  
  27. \newcommand{\dimfr}[4]{\begin{smallmatrix}
  28.                                                 #1\\ #2\\ #3\\ #4
  29.                                            \end{smallmatrix}}
  30.  
  31. \newcommand{\dimvv}[3]{\begin{smallmatrix}
  32.                                                 #1\\ #2\\ #3
  33.                                            \end{smallmatrix}}
  34.  
  35. \newcommand{\dimv}[2]{\begin{smallmatrix}
  36.                                                 #1\\ #2
  37.                                            \end{smallmatrix}}
  38. \newcommand{\ds}{\ \phantom{1}}
  39. \newcommand{\ms}[1]{\ #1\ }
  40.  
  41. % Tell tikz to create pre-complied images.
  42. % These the images will be contained in the folder /diagrams/'name of tex file'/
  43. % contained in the folder your tex document is in.
  44. % Tou must create a diagrams folder with the subfolder 'name of tex file'
  45. % before running this in order for the external pictures to be placed in the
  46. % proper subdirectory.
  47. % If you need to force a diagram to be remade place the command
  48. % \tikzset{external/remake next}
  49. % before the \begin{tikzpicure} you want to remake. See pg 339 for more info.
  50. \newcommand{\diagramfolder}{../diagrams/more-ar-quivers/}
  51. \usetikzlibrary{external}
  52. \tikzexternalize[prefix=\diagramfolder]
  53.  
  54. \begin{document}
  55. \title{More A-R Quivers}
  56. \author{Lucas David-Roesler}
  57. \date{\today}
  58.  
  59. \maketitle
  60.  
  61. Let $Q$ be the quiver
  62.  
  63. \[\begin{tikzpicture}
  64. \foreach \x in {1,2,...,8}
  65.         \node [name = \x] at (\x,0) {$\x$};
  66. \node[name=9] at (8,1) {$9$};
  67. \node[name=10] at (8,-1) {$10$};
  68.  
  69. \foreach \n/\m in {1/2,2/3,3/4,4/5,6/5,7/6,8/7,9/8,8/10}
  70.         \draw[->] (\n) -- (\m);
  71. \path[dashed] (1) edge[bend left] (3) (5) edge[bend left] (7) (9) edge[bend left] (10);
  72. \end{tikzpicture}\]
  73.  
  74. Here is $\Gamma(\cmod kQ)$.
  75.  
  76. %\tikzset{external/remake next}
  77. \[\begin{tikzpicture}
  78. [%background grid/.style={draw,step=1,color=black!10},show background grid,
  79. %scale=1.25,
  80. %rotate=-90,
  81. %every node/.style={rotate=-90}
  82. ]
  83. \foreach[count=\ti from 1] \x/\y/\z in
  84.         {0/0/5,  
  85.          1/1/\dimv45, 1/-1/\dimv65 ,
  86.          2/2/\dimvv345, 2/0/\dimv{4\ 6}{5},
  87.          3/3/\dimfr2345, 3/-1/4, 3/1/\dimvv{3\ds}{4\ 6}{5},
  88.          4/0/\dimv34, 4/2/\dimfr{2\ds}{3\ds}{4\ 6}{5},
  89.          5/-1/3, 5/1/\dimvv234,5/3/6,
  90.          6/0/\dimv23,6/4/\dimv76,6/6/10,
  91.          7/-1/2,7/3/7,7/5/\dimvv{\ms8}{7\ 10}{6\ds\ },
  92.          8/-2/\dimv12,8/4/\dimv{\ms8}{7\ 10}, 8/6/\dimvv876,
  93.          9/-1/1, 9/3/\dimv8{10}, 9/5/\dimv87,9/7/\dimfr9876,
  94.          10/4/8, 10/6/\dimvv987,
  95.          11/5/\dimv98, 12/4/9}
  96.         \node[name=\ti] at (\x,\y) {$\z$};
  97. \foreach \m/\n in
  98.         {1/2, 1/3,
  99.          3/5,2/5,2/4,
  100.          5/7,5/8,4/8,4/6,
  101.          7/9,8/9,8/10,6/10,
  102.          9/11,9/12,10/12,10/13,
  103.          11/14,12/14,13/15,
  104.          14/17, 15/18,15/19,16/19,
  105.          17/20,18/21,19/21,19/22,
  106.          20/23,21/24,21/25,22/25,22/26,
  107.          24/27,25/27,25/28,26/28,
  108.          27/29,28/29,29/30}
  109.         \draw[->] (\m) -- (\n);
  110. \end{tikzpicture}\]
  111.  
  112.  
  113.  
  114. Let $Q$ be the quiver
  115. % \tikzset{external/remake next}
  116. \[\begin{tikzpicture}
  117. \foreach \x in {1,2,...,7}
  118.         \node [name = \x] at (\x,0) {$\x$};
  119. \foreach \x/\n in {5/9,6/8,7/10}
  120.         \node [name = \n] at (\x,-1) {$\n$};
  121.        
  122. \foreach \n/\m in {1/2,2/3,3/4,4/5,6/5,7/6,8/6,9/8,8/10}
  123.         \draw[->] (\n) -- (\m);
  124. \path[dashed] (1) edge[bend left] (3) (5) edge[bend left] (7) (10) edge[bend left] (9);
  125. \end{tikzpicture}\]
  126.  
  127. Here is $\Gamma(\cmod kQ)$.
  128.  
  129. % \tikzset{external/remake next}
  130. \[\begin{tikzpicture}
  131. [%background grid/.style={draw,step=1,color=black!10},show background grid,
  132. %scale=1.25,
  133. %rotate=-90,
  134. %every node/.style={rotate=-90}
  135. ]
  136. \foreach[count=\ti from 1] \x/\y/\z in
  137.         {0/0/5,  
  138.          1/1/\dimv45, 1/-1/\dimv65 ,1/-3/10,
  139.          2/-2/\dimvv{\ms8}{6\ 10}{5\ds \ },2/2/\dimvv345, 2/0/\dimv{4\ 6}{5},
  140.          3/-3/\dimvv865,3/-1/\dimvv{\ds 8}{4\ 6\ 10}{5\ \ds}, 3/1/\dimvv{3\ds}{4\ 6}{5}, 3/3/\dimfr2345,
  141.          4/-4/\dimfr9865,4/-2/\dimvv{\ds 8}{4\ 6}{5},4/0/\dimvv{3\ds 8\ds}{4\ 6\ 10}{5\ \ds}, 4/2/\dimfr{2\ds}{3\ds}{4\ 6}{5},
  142.          5/-3/\dimfr{\ds9}{\ds8}{4\ 6}{5} ,5/-1/\dimvv{3\ 8}{4\ 6}{5}, 5/1/\dimfr{2\ds\ds}{3\ds 8\ }{\ 4\ 6\ 10}{5\ds}, 5/3/6,
  143.          6/-4/4,6/-2/\dimfr{\ds 9}{3\ 8}{4\ 6}{5},6/0/\dimfr{2\ds}{3\ 8 }{4\ 6}{5}, 6/2/\dimv{8}{6\ 10},6/4/\dimv76 ,
  144.          7/-3/\dimv34,7/-1/\dimfr{2\ 9}{3\ 8}{4\ 6}{5}, 7/1/\dimv86,7/3/\dimv{7\ 8\ }{\ds 6\ 10},
  145.          8/-4/3, 8/-2/\dimvv234,8/0/\dimvv986,8/2/\dimv{7\ 8}{6},8/4/\dimv8{10},
  146.          9/-3/\dimv23,9/1/\dimvv{\ds 9}{7\ 8}{6}, 9/3/8 ,
  147.          10/-4/2,10/0/7, 10/2/\dimv98,
  148.          11/-5/\dimv12,11/3/9,
  149.          12/-4/1}
  150.         \node[name=\ti] at (\x,\y) {$\z$};
  151. \foreach \n/\m in
  152.         {1/2,1/3,
  153.           4/5,3/5,3/7,2/7,2/6,
  154.           5/8,5/9,7/9,7/10,6/10,6/11,
  155.           8/12,8/13,9/13,9/14,10/14, 10/15,11/15,
  156.           12/16,13/16,13/17,14/17,14/18,15/18,15/19,
  157.           16/20,16/21,17/21,17/22,18/22,18/23,19/23,19/24,
  158.           20/25,21/25,21/26,22/26,22/27,23/27,23/28,24/28,
  159.           25/29,25/30,26/30,26/31,27/31,27/32,28/32,28/33,
  160.           29/34,30/34,32/35,32/35,32/36,33/36,
  161.           34/37,35/38,35/39,36/39,
  162.           37/40,39/41,
  163.           40/42}
  164.         \draw[->] (\n) -- (\m);
  165. \end{tikzpicture}\]
  166.  
  167.  
  168. Let $Q$ be the quiver
  169.  
  170. % \tikzset{external/remake next}
  171. \[\begin{tikzpicture}
  172. \node[name=1] at (1,0) {1};
  173. \node[name=2] at (2,0) {2};
  174. \node[name=4] at (3,0) {4};
  175. \node[name=3] at (4,0) {3};
  176. \node[name=5] at (3,-1) {5};
  177. \node[name=7] at (4,-1) {7};
  178. \node[name=6] at (5,-1) {6};
  179. \foreach \n/\m in {2/1,4/2,3/4,5/4,5/7,7/6}
  180.         \draw[->] (\n) -- (\m);
  181. \path[dashed] (2) edge[bend left] (3);
  182. \path[dashed] (5) edge[bend left] (6);
  183. \end{tikzpicture}\]
  184. Here is $\Gamma(\cmod kQ)$.
  185.  
  186.  \tikzset{external/remake next}
  187. \[\begin{tikzpicture}
  188. [%background grid/.style={draw,step=1,color=black!10},show background grid,
  189. %scale=1.25,
  190. %rotate=-90,
  191. %every node/.style={rotate=-90}
  192. ]
  193. \foreach[count=\ti from 1] \x/\y/\z in
  194.         {0/0/1,0/4/6,
  195.           1/1/\dimv12,1/5/\dimv76,
  196.           2/0/2,2/2/\dimvv421,2/4/7,
  197.           3/1/\dimv42, 3/3/\dimfr{5}{4\ 9}{2\ds}{1\ds},
  198.           4/0/4,4/2/\dimvv{5}{4\ 7}{2\ds}, 4/4/\dimfr5421,
  199.           5/-1/\dimv34,5/1/\dimv{5}{4\ 7},5/3/\dimvv542,
  200.           6/0/\dimv{3\ 5}{\ 4\ 7} ,6/2/\dimv54,
  201.           7/-1/\dimv57,7/1/\dimv{3\ 5}{4},
  202.           8/0/5, 8/2/3 }
  203.         \node[name=\ti] at (\x,\y) {$\z$};
  204. \foreach \n/\m in
  205.           {1/3,2/4,
  206.            3/5,3/6,4/7,
  207.            5/8,6/8,6/9,7/9,
  208.            8/10,8/11,9/11,9/12,
  209.            10/13,10/14,11/14,11/15,12/15,
  210.            13/16,14/16,14/17,15/17,
  211.            16/18,16/19,17/19,
  212.            18/20,19/20,19/21}
  213.         \draw[->] (\n) -- (\m);
  214.  
  215. \end{tikzpicture}\]    
  216.  
  217. \end{document}
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