see page 117 in tikz manual 3.0
\documentclass[11pt]{report} \usepackage{amsmath,mathtools} \usepackage{graphicx} \usepackage{pdfpages} \usepackage{tikz} \usepackage{pgffor} \begin{document} \pdfximage{file2.pdf} \foreach \index in {1,...,\the\pdflastximagepages} { \begin{tikzpicture}[remember picture] \node[inner sep=0pt] at (current page.center) {\includegraphics[page=\index]{file2.pdf}}; \end{tikzpicture} } \end{document}
from http://pgf-and-tikz.10981.n7.nabble.com/Draw-a-shape-use-it-many-times-td4323.html
\documentclass{article} \input{commonlatex} \usepackage{tikz} \newcommand{\MyChair}{ \draw[fill=blue!15,thick] plot coordinates {(-2,-1)(-2,1)(-1,2)(2,3)(3,2)(3,-2)(2,-3)(-1,-2)}; \draw[fill=blue!15,thick] plot coordinates {(-2.5,-1)(-2.5,1)(-3.25,2)(-3.25,-2)}; } \begin{document} \begin{tikzpicture} [scale=0.125,smooth cycle] \foreach \row in {1,2,...,10} { \foreach \col in {1,2,...,4} { \begin{scope}[xshift=\row cm,yshift=\col 10 cm] \MyChair \end{scope} } } \end{tikzpicture} \end{document}
see http://tex.stackexchange.com/questions/1342/aligned-equations-inside-of-tikz-node
\documentclass{standalone} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \tikzset{font=\small} \begin{tikzpicture} \Tree [.A [.\node(B){B}; ] [.\node(C){C}; ] ] \begin{scope}[xshift=0in,yshift=-2cm] \Tree [.\node(Dx){D}; [.E ] [.F ] ] \end{scope} \draw[-] (B) -- (Dx); \draw[-] (C) -- (Dx); \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [<->] (3,0) -- (0,0) -- (0,3); \draw (0,0) rectangle (3,3); \draw [fill=lightgray] (0,2.8)--(0,0)--(2.8,0); \node [font=\Huge] at (2,2) {$0$}; \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [very thin] (1,1) rectangle (2,2); \draw [<->] (3,0) -- (0,0) -- (0,3); \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [<->] (3,0) -- (0,0) -- (0,3); \draw [very thin] (1,1) rectangle (2,2); \draw [fill=lightgray] (1,1)--(1.5,1)--(1,1.5); \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\x{0}% \def\y{0}% \draw [very thin] (\x,\y) rectangle (\x+2,\x+2); \draw [fill=lightgray] (\x,\y)--(\x+1.75,\y+0)--(\x+0,\y+1.75); \node[font=\Huge] at (\x+1.25,\y+1.25) {$0$}; \node at (\x+2.25,\y+1) {$+$}; \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[draw] (0,0) rectangle (2,1); \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[fill,draw] (0,0) rectangle (2,1); \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[shade,draw] (0,0) rectangle (2,1); \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[shade,top color=yellow!80!black, bottom color=white,draw] (0,0) rectangle (2,1); \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture} \node {A} [edge from parent fork down] child {node {B}} child {node {C}} ; \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \tikzset{every node/.style={draw, rectangle, rounded corners } } \begin{tikzpicture} \node {A} [edge from parent fork down] child {node {B}} child {node {C}} ; \end{tikzpicture} \end{document}
|
|
|
\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \tikzset{level 1/.style={sibling distance=2cm}, level 2/.style={sibling distance=1cm}} \begin{tikzpicture} \node {A} [edge from parent fork down] child {node {B} child {node {B1}} } child {node {C} child {node {C1}} child {node {C2}} child {node {C3}} } ; \end{tikzpicture} \end{document}
|
|
|
see http://tex.stackexchange.com/questions/124862/how-to-draw-a-d
iagram-that-forks-out-then-joins-in-the-middle-then-forks-out-ag
%written by Qrrbrbirlbel at Tex stackexchange \documentclass[tikz]{standalone} \usetikzlibrary{positioning-plus,paths.ortho} \tikzset{ parents/.style 2 args={ @parents/.style={insert path={edge[edge from children path] (#1-##1)}}, @parents/.list={#2}}, edge from parent path={ (\tikzparentnode\tikzparentanchor) |-| (\tikzchildnode\tikzchildanchor)}, edge from children path/.style={ to path={ (\tikztostart\tikzchildanchor) |-| (\tikztotarget\tikzparentanchor) \tikztonodes}} } \begin{document} \begin{tikzpicture}[ node distance=\tikzleveldistance and \tikzsiblingdistance, on grid, text depth=+0pt, hvvh=from center ] \node (A) {A} child {node {B}} child {node {C}}; \node[below=2:of A] (E) {E} [parents={A}{1,2}] [sibling distance/.expanded=2*\the\tikzsiblingdistance] child {node {F} child {coordinate [anchor=center,sibling distance/.expanded=.5*\the\tikzsiblingdistance] child {node {N}} child {node {Q}} } child {node {R}} } child {node {G}} child {node {H}}; \node[below=of (E-2)(E-3)] (L) {L} [parents={E}{2,3}] child {node {M}} child {node {N}} child {node {K}} ; \end{tikzpicture} \end{document}
|
|
|