I'm trying to use tikzit, and I created a shape (basically a new kind of node). The shape is located into /home/user/.config/tikzit/shapes/shape1 but tikzit (and pdflatex as well, obviously) doesn't seem to find it. I have tried both with debian8 and fedora21, but the problem seems to persist.   \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.markings} \usetikzlibrary{shapes.geometric} \pagestyle{empty}  \pgfdeclarelayer{edgelayer} \pgfdeclarelayer{nodelayer} \pgfsetlayers{edgelayer,nodelayer,main}  \tikzstyle{none}=[inner sep=0pt]   \tikzstyle{node1}=[shape1,fill=White,draw=Black]   \usepackage[graphics,tightpage,active]{preview} \PreviewEnvironment{tikzpicture} \newlength{\imagewidth} \newlength{\imagescale}  \begin{document} \begin{tikzpicture}     \begin{pgfonlayer}{nodelayer}         \node [style=node1] (0) at (-1.75, 1) {};     \end{pgfonlayer} \end{tikzpicture} \end{document}
122349
I'm trying to include a file with a specific shape (cup) into another TikZ image, in order to use the cup as a "stamp" to draw more complex figure. The file is located in /usr/share/tikzit/shapes/cap.tikz  \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.markings} \usetikzlibrary{shapes.geometric} \pagestyle{empty}  \pgfdeclarelayer{edgelayer} \pgfdeclarelayer{nodelayer} \pgfsetlayers{edgelayer,nodelayer,main}  \tikzstyle{none}=[inner sep=0pt] \tikzstyle{node1}=[cap,fill=White,draw=Black]  \tikzstyle{simple}=[-,draw=Black,line width=2.000] \tikzstyle{arrow}=[-,draw=Black,postaction={decorate},decoration={markings,mark=at position .5 with {\arrow{&gt;}}},line width=2.000] \tikzstyle{tick}=[-,draw=Black,postaction={decorate},decoration={markings,mark=at position .5 with {\draw (0,-0.1) -- (0,0.1);}},line width=2.000]  \usepackage[graphics,tightpage,active]{preview} \PreviewEnvironment{tikzpicture} \newlength{\imagewidth} \newlength{\imagescale}  \begin{document} \begin{tikzpicture}     \begin{pgfonlayer}{nodelayer}         \node [style=node1] (0) at (-2.5, 1.5) {};     \end{pgfonlayer} \end{tikzpicture}  \end{document}   The code i want to include is the following:  \begin{tikzpicture}         \path [use as bounding box] (-2,-2) rectangle (2,2);         \begin{pgfonlayer}{nodelayer}                 \node [style=none] (0) at (0, 0.75) {};                 \node [style=none] (1) at (-0.5, 0) {};                 \node [style=none] (2) at (0.5, 0) {};         \end{pgfonlayer}         \begin{pgfonlayer}{edgelayer}                 \draw [in=0, out=90] (2.center) to (0.center);                 \draw [in=270, out=-90, looseness=0.75] (1.center) to (2.center);                 \draw [in=90, out=180] (0.center) to (1.center);         \end{pgfonlayer} \end{tikzpicture}   But it seems I miss how to specify the directory of cup. I get this error:     Package pgfkeys Error: The key '/tikz/cap' requires a value. I am   going to ignore this key.   It seems like I have to deal with tikzstyle or pgfkey, but I don't know how to specify an external file.
43938
The folowing code works correctly inside Texlipse together with Miktex 2.9 x64. The tikzexternalize option is used to speed up the compilation process, just make sure the  mode is enables exclicitly passing the -shell-escape argument to the compiler.  \documentclass{article}  \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize[prefix=figures/]  \begin{document}  \begin{tikzpicture} \node[draw, circle, minimum width=1cm] {}; \end{tikzpicture}     \end{document}   Now, when the article class is replaced by the abntex2 class as the following code, the pdf file is not generated inside figures folder any longer.  \documentclass[     % -- opções da classe memoir --     12pt,               % tamanho da fonte     openright,          % capítulos começam em pág ímpar (insere página vazia caso     % preciso)     twoside,            % para impressão em verso e anverso. Oposto a oneside     a4paper,            % tamanho do papel.     % -- opções da classe abntex2 --     %chapter=TITLE,     % títulos de capítulos convertidos em letras maiúsculas     %section=TITLE,     % títulos de seções convertidos em letras maiúsculas     %subsection=TITLE,  % títulos de subseções convertidos em letras maiúsculas     %subsubsection=TITLE,% títulos de subsubseções convertidos em letras maiúsculas     % -- opções do pacote babel --     english,            % idioma adicional para hifenização     french,             % idioma adicional para hifenização     spanish,            % idioma adicional para hifenização     brazil              % o último idioma é o principal do documento     ]{abntex2}  \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize[prefix=figures/]  \begin{document}  \begin{tikzpicture} \node[draw, circle, minimum width=1cm] {}; \end{tikzpicture}  \end{document}   Then the console shows the following information where the main tex file name is DissDaniel.tex:  pdflatex.exe&gt; ===== 'mode=convert with system call': Invoking 'pdflatex -shell-escape -halt-o pdflatex.exe&gt; n-error -interaction=batchmode -jobname "figures/DissDaniel-figure0" "\def\tikz pdflatex.exe&gt; externalrealjob{DissDaniel}\input{DissDaniel}"' ======== pdflatex.exe&gt;  pdflatex.exe&gt; ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e pdflatex.exe&gt; rror -interaction=batchmode -jobname "figures/DissDaniel-figure0" "\def\tikzext pdflatex.exe&gt; ernalrealjob{DissDaniel}\input{DissDaniel}"' did NOT result in a usable output  pdflatex.exe&gt; file 'figures/DissDaniel-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Plea pdflatex.exe&gt; se verify that you have enabled system calls. For pdflatex, this is 'pdflatex - pdflatex.exe&gt; shell-escape'. Sometimes it is also named 'write 18' or something like that. Or pdflatex.exe&gt;  maybe the command simply failed? Error messages can be found in 'figures/DissD pdflatex.exe&gt; aniel-figure0.log'. If you continue now, I'll try to typeset the picture. pdflatex.exe&gt;  pdflatex.exe&gt; See the tikz package documentation for explanation. pdflatex.exe&gt; Type  H &lt;return&gt;  for immediate help. pdflatex.exe&gt;  ...                                               pdflatex.exe&gt;                                                    pdflatex.exe&gt; l.32 \end{tikzpicture}
63680
I am interested in outputting  this graph in  latex using tikz:    So far I got this:    and my tikz code is   \begin{tikzpicture}     \node[shape=circle,draw=black] (A) at (0,0) {A};     \node[shape=circle,draw=black] (B) at (0,3) {B};     \node[shape=circle,draw=black] (C) at (2.5,4) {C};     \node[shape=circle,draw=black] (D) at (2.5,1) {D};     \node[shape=circle,draw=black] (E) at (2.5,-3) {E};     \node[shape=circle,draw=black] (F) at (5,3) {F} ;      \path [-&gt;] (A) edge node[left] {$5$} (B);     \path [-&gt;](B) edge node[left] {$3$} (C);     \path [-&gt;](A) edge node[left] {$4$} (D);     \path [-&gt;](D) edge node[left] {$3$} (C);     \path [-&gt;](A) edge node[right] {$3$} (E);     \path [-&gt;](D) edge node[left] {$3$} (E);     \path [-&gt;](D) edge node[top] {$3$} (F);     \path [-&gt;](C) edge node[top] {$5$} (F);     \path [-&gt;](E) edge node[right] {$8$} (F);    \end{tikzpicture}   I want to know how to draw the arc between nodes B and E and also thicker  arcs with their lengths in center. Any help is appreciated
35423
If I have two tikzpictures drawn:  \documentclass{article} \usepackage[margin = 1in]{geometry} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,calc,shapes,shapes.geometric,patterns} \begin{document}  \tikzset{treetop/.style = {decoration={random steps, segment length=0.4mm},decorate},trunk/.style = {decoration={random steps, segment length=2mm, amplitude=0.2mm},decorate}}  \begin{tikzpicture} \foreach \w/\f in {0.3/30,0.2/50,0.1/70} { \fill [brown!\f!black, trunk] (0,0) ++(-\w/2,0) rectangle +(\w,-3); } \foreach \n/\f in {1.4/40,1.2/50,1/60,0.8/70,0.6/80,0.4/90} {    \fill [green!\f!black, treetop] ellipse (\n/1.5 and \n); } \end{tikzpicture}  \begin{tikzpicture} \shade[bottom color=cyan!60!black, top color=blue!20!white] (0,0) rectangle (10,10); \end{tikzpicture}  \end{document}     How could I use the first tikz picture within the second? Can I define the first picture as some variable and then place this variable within the second picture and have the option of defining its exact location (x,y) and its size? For example, if I wanted to place the tree in the middle of the rectangle (5,5) but make the size of the tree half its current size. How would I do this
108728
I'm having trouble connecting a node inside of a forest tree diagram with some arbitrary text outside it.    MWE:  \documentclass[12pt,paper=a4]{scrartcl} \usepackage[linguistics]{forest} \usetikzlibrary{positioning}  % cf. http://tex.stackexchange.com/a/1912/60686 \tikzstyle{na} = [shape=rectangle,inner sep=0pt,text depth=0pt]  \begin{document}  \begin{forest} [A, name=A     [B]     [C         [X, name=X]         [Y]     ] ] \draw[-latex,dotted] (A) to[out=west,in=west] (X); \end{forest}  \tikzstyle{every picture}+=[remember picture] \tikz\node[na](lorem){Lorem}; ipsum \tikz\node[na](abc){dolor}; sit \tikz\node[na](amet){amet};.  \begin{tikzpicture}[overlay]     \draw (X) to (abc);     \draw[-latex] (lorem) to[out=south,in=south] (amet); \end{tikzpicture}  \end{document}     The result of the above code unfortunately looks like this:    In other words, tikz can't seem to find the node X, so the line just trails off to nowhere instead of connecting the X node to the abc node. In order to demonstrate that connecting things works inside of either the diagram or the text, I drew a bunch of arrows there as well.  Putting the line \tikzstyle{every picture}+=[remember picture] above \begin{forest} causes the various content boxes and drawings to appear all on different pages.
99246
I am trying to find a shape like a paper title folded at top and with some lines, emulating a ruled paper to use in other tikz picture. I have already seen some, and I do think they are done with tikz but I couldn't find the code. it could be like defining a new shape or just a command.      EDIT:  \documentclass{article}  \usepackage{tikz}  % taken from manual \makeatletter \pgfdeclareshape{document}{ \inheritsavedanchors[from=rectangle] % this is nearly a rectangle \inheritanchorborder[from=rectangle] \inheritanchor[from=rectangle]{center} \inheritanchor[from=rectangle]{north} \inheritanchor[from=rectangle]{south} \inheritanchor[from=rectangle]{west} \inheritanchor[from=rectangle]{east} % ... and possibly more \backgroundpath{% this is new % store lower right in xa/ya and upper right in xb/yb \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y % compute corner of ‘‘flipped page’’ \pgf@xc=\pgf@xb \advance\pgf@xc by-5pt % this should be a parameter \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt % construct main path \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}} \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}} \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yb}} \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}} \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}} \pgfpathclose % add little corner \pgfpathmoveto{\pgfpoint{\pgf@xc}{\pgf@yb}} \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}} \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yc}} \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}} } } \makeatother   \begin{document}  \tikzstyle{doc}=[% draw, thick, align=center, color=black, shape=document, minimum width=20mm, minimum height=15mm, ]  \begin{tikzpicture} \node [doc] {Test}; \end{tikzpicture} \end{document}
78370
I would to define a new "T" shape (i.e. the red and green shapes in the following image) so that I can then draw with TikZ the diagram below.    Unfortunately I cannot figure out how to do. To be honest, I have read the section "Declaring New Shapes" from the PGF manual and I am completely lost with the low level pgf commands.     How could I do? Suggestions on any direction are welcomed.
103348
I have an issue with the answer given in this .  As suggested in the comments to its answer, I modified the solution as follows:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \usetikzlibrary{calc,positioning}  \newcounter{image} \setcounter{image}{0}  \tikzstyle{square} = [draw, rectangle, draw=black, minimum width=1cm, minimum height=1cm, text centered]  \tikzset{drawinside/.code args={#1}{         \draw($(#1.west)!0.3!(#1.center)$)--($(#1.east)!0.3!(#1.center)$);         \draw($(#1.south)!0.3!(#1.center)$)--($(#1.north)!0.3!(#1.center)$);         \draw($(#1.south west)!0.4!(#1.west)!0.3!(#1.center)$)--($(#1.south west)!0.165!(#1.west)!0.5!(#1.center)$)--(#1.center);         \draw(#1.center)--($(#1.north east)!0.165!(#1.east)!0.65!(#1.center)$)--($(#1.north east)!0.45!(#1.east)!0.45!(#1.center)$);                } }  \tikzset{record/.style args={#1 and #2}{         rectangle,draw,minimum width=#1, minimum height=#2     } }  \newcommand{\drawrecord}[1] { \stepcounter{image} { \node [record=1 cm and 1 cm, name=a\theimage] at {#1}; } \node[drawinside={a\theimage}]{}; }  \begin{document} \begin{tikzpicture}  \drawrecord{0,0};  \node (sq) [square] {}; \drawrecord{sq};  \end{tikzpicture} \end{document}   but I keep receiving a ! Package tikz Error: Cannot parse this coordinate. error when I call \drawrecord  . how may I solve this issue?  . Is there a way to define \drawrecord as a \tikzstyle instead of a new command?  EDIT:  for the second question, I have been suggested to look into "append after command", but I cannot find documentation about it, anyone has a link?  EDIT2: actually, the second question is kind of redundant, I can simply call  \node [record=1 cm and 1 cm, name=newnode, right of=oldnode]; \node[drawinside={newnode}]{};   in my document. And  \tikzset{drawinside/.code args={#1}{     \draw($(#1.west)!0.3!(#1.center)$)--($(#1.east)!0.3!(#1.center)$);     \draw($(#1.south)!0.3!(#1.center)$)--($(#1.north)!0.3!(#1.center)$);     \draw($(#1.south west)!0.4!(#1.west)!0.3!(#1.center)$)--($(#1.south west)!0.165!(#1.west)!0.5!(#1.center)$)--(#1.center);     \draw(#1.center)--($(#1.north east)!0.165!(#1.east)!0.5!(#1.center)$)--($(#1.north east)!0.4!(#1.east)!0.3!(#1.center)$);             } }   is symmetrical (the previous one is slightly off)
52194
actually it's an easy question, but I could find an answer with Google or the included search on StackExchange ;)  How do I add in the middle of the line a node with Tikz? I want somethink like this:  --------------&gt;      text   Normally I did it with an additional node at command. If I will resize the the arrow then I need to change the position of the node also.  ----------&gt;    text   Which is not the best way for big things. I try to find something in the manual and didn't find an answer yet.   Thanks.  Best regards.
120980
Compiling the following code with pdflatex:  \documentclass{article} \usepackage{tikz}  \begin{document} \begin{tikzpicture}[remember picture, overlay]      \draw (current page.center) node {         \begin{itemize}             \item test         \end{itemize}     };  \end{tikzpicture} \end{document}   ... throws the compiling error:  ! LaTeX Error: Something's wrong--perhaps a missing \item.   The pdflatex version I use (Debian Wheezy) is the following:  pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) kpathsea version 6.1.0 Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty.  Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). Compiled with libpng 1.2.49; using libpng 1.2.49 Compiled with zlib 1.2.7; using zlib 1.2.7 Compiled with poppler version 0.18.4   What can I be doing wrong?
31716
I'm confused about tikz pics. I can freely define them without issue, and even add coordinates inside that will be available by name inheritance like (-A) as for example in \pic (S) at (0,0) {myPic}; \draw (S-A) -- ++(0,0);. This is all documented around p. 255 of the pgf manual.  However I don' understand why it is not possible to give a name to a pic like the one above if no coordinate is defined inside it. By default it would be great if it could behave like a normal node.  MWE:  \documentclass{minimal} \usepackage{tikz}  \tikzset{     myBlock/.pic = {         \node[draw,minimum width=1cm,minimum height=0.5cm] at (0,0) {};     },     myBlockNamed/.pic = {         \node[draw,minimum height=1cm,minimum width=0.5cm] (-m) at (0,0) {};     }, }  \begin{document} \begin{tikzpicture}     \pic () at (0,0) {myBock}; % can't give it a name     \pic (S) at (3,0) {myBlockNamed}; % can give it a name     \draw (S-A) -- ++(2,0); \end{tikzpicture} \end{document}   The underlying point is I'm working on a control blocs library (so that we can stop the chat below with @Alenanno). For example here is the definition of a math operator  \tikzset{     mySum background/.style = {         circle, minimum size=1.5em, fill=white,     },     mySum edge/.style = {         draw=black, circle, minimum size=1.5em, line width=.5pt,     },     pics/bOp/.style = {     code = {       \node [mySum background] {};       \foreach \t [count=\i] in {#1}{         \pgfmathsetmacro{\angle}{\i*90}         \node[anchor=center, font=\tiny] at (\angle:0.45em) {$\t$};       }       \node [mySum edge] {};     },   }, }
61082
I have  \begin{tikzpicture}[-&gt;,auto,node distance=3cm,   thick,main node/.style={draw,font=\bfseries}]   \node[main node] (111) at (0,1) {$X_{1,1}^{(1)}$};   \node[main node] (121) at (0,2) {$X_{1,2}^{(1)}$};   \node[main node] (1n1) at (0,4) {$X_{1,n}^{(1)}$};   \node[main node] (211) at (0,6) {$X_{2,1}^{(1)}$};   \node[main node] (221) at (0,7) {$X_{2,2}^{(1)}$};   \node[main node] (2n1) at (0,9) {$X_{2,n}^{(1)}$};   \node[main node] (n11) at (0,11) {$X_{n,1}^{(1)}$};   \node[main node] (n21) at (0,12) {$X_{n,2}^{(1)}$};   \node[main node] (nn1) at (0,14) {$X_{n,n}^{(1)}$};   \node[main node] (112) at (2.5,1) {$X_{1,1}^{(2)}$};   \node[main node] (122) at (2.5,2) {$X_{1,2}^{(2)}$};   \node[main node] (1n2) at (2.5,4) {$X_{1,n}^{(2)}$};   \node[main node] (212) at (2.5,6) {$X_{2,1}^{(2)}$};   \node[main node] (222) at (2.5,7) {$X_{2,2}^{(2)}$};   \node[main node] (2n2) at (2.5,9) {$X_{2,n}^{(2)}$};   \node[main node] (n12) at (2.5,11) {$X_{n,1}^{(2)}$};   \node[main node] (n22) at (2.5,12) {$X_{n,2}^{(2)}$};   \node[main node] (nn2) at (2.5,14) {$X_{n,n}^{(2)}$};   \node[main node] (11k) at (6,1) {$X_{1,1}^{(k)}$};   \node[main node] (12k) at (6,2) {$X_{1,2}^{(k)}$};   \node[main node] (1nk) at (6,4) {$X_{1,n}^{(k)}$};   \node[main node] (21k) at (6,6) {$X_{2,1}^{(k)}$};   \node[main node] (22k) at (6,7) {$X_{2,2}^{(k)}$};   \node[main node] (2nk) at (6,9) {$X_{2,n}^{(k)}$};   \node[main node] (n1k) at (6,11) {$X_{n,1}^{(k)}$};   \node[main node] (n2k) at (6,12) {$X_{n,2}^{(k)}$};   \node[main node] (nnk) at (6,14) {$X_{n,n}^{(k)}$};   \node[main node] (11n2) at (9.5,1) {$X_{1,1}^{(n-2)}$};   \node[main node] (12n2) at (9.5,2) {$X_{1,2}^{(n-2)}$};   \node[main node] (1nn2) at (9.5,4) {$X_{1,n}^{(n-2)}$};   \node[main node] (21n2) at (9.5,6) {$X_{2,1}^{(n-2)}$};   \node[main node] (22n2) at (9.5,7) {$X_{2,2}^{(n-2)}$};   \node[main node] (2nn2) at (9.5,9) {$X_{2,n}^{(n-2)}$};   \node[main node] (n1n2) at (9.5,11) {$X_{n,1}^{(n-2)}$};   \node[main node] (n2n2) at (9.5,12) {$X_{n,2}^{(n-2)}$};   \node[main node] (nnn2) at (9.5,14) {$X_{n,n}^{(n-2)}$};   \node[main node] (11n1) at (12,1) {$X_{1,1}^{(n-1)}$};   \node[main node] (12n1) at (12,2) {$X_{1,2}^{(n-1)}$};   \node[main node] (1nn1) at (12,4) {$X_{1,n}^{(n-1)}$};   \node[main node] (21n1) at (12,6) {$X_{2,1}^{(n-1)}$};   \node[main node] (22n1) at (12,7) {$X_{2,2}^{(n-1)}$};   \node[main node] (2nn1) at (12,9) {$X_{2,n}^{(n-1)}$};   \node[main node] (n1n1) at (12,11) {$X_{n,1}^{(n-1)}$};   \node[main node] (n2n1) at (12,12) {$X_{n,2}^{(n-1)}$};   \node[main node] (nnn1) at (12,14) {$X_{n,n}^{(n-1)}$};   \path     (111) edge (112)         edge (122)         edge (1n2)     (121) edge (112)         edge (122)         edge (1n2)     (1n1) edge (112)         edge (122)         edge (1n2)     (121) edge[--,dashed] (1n1); \end{tikzpicture}   I just want simple lines, no arrows. How to manage with edge to achieve that? Thanks
18322
I have the following image    that was created with this code:  \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz} \usepackage{tkz-euclide}  \begin{document} \usetkzobj{all} \begin{tikzpicture}     \tkzSetUpPoint[shape=circle,size=10,color=black,fill=black]     \tkzSetUpLine[line width=1]     \tkzDefPoints{0/0/A, 3/0/B', 2/2/C, 4/4/C'}     \tkzDefLine[parallel=through C](B',C') \tkzGetPoint{Phelper}     \tkzInterLL(A,B')(C,Phelper) \tkzGetPoint{B}     \tkzDrawLine[add=0 and 0.2](A,B')     \tkzDrawLine[add=0 and 0.2](A,C')     \tkzDrawSegment(B',C')      \node at ($(A)+(-0.1,-0.2)$)  {$A$};     \node at ($(B')+(0.2,-0.2)$)  {$B'$};     \node at ($(C')+(0,0.4)$)  {$C'$};     \node at ($(B)+(0.2,-0.2)$)  {$B$};     \node at ($(C)+(0.28,0.5)$)  {$C$};     \tkzDrawPolygon[ultra thick,color=blue,fill=blue!20](A,B',C')      \tkzDrawPolygon[line width=0.3pt,color=red,fill=red!20](A,B,C)      \tkzDrawPoints(A,B',C',B,C)     \tkzLabelSegment[below,red](A,B){$c$}     \tkzLabelSegment[left,red](A,C){$b$}     \tkzLabelSegment[right,red](B,C){$a$}     \tkzLabelSegment[below,blue,pos=0.8](A,B'){$c'$}     \tkzLabelSegment[left,blue,pos=0.8](A,C'){$b'$}     \tkzLabelSegment[right,blue](B',C'){$a'$} \end{tikzpicture} \end{document}   As you might notice, the space above C' is bigger than necessary. This is because of Phelper. I need Phelper for the construction, but it should not influence the image size in any way. I've tried to get Phelper closer to C, but that seems not to be possible.  How can I stop defined (but not visible) points from influencing image size?  Please note: I wrap code like this in a figure. So images like the one above are only a part of the whole document. So working with standalone does not solve my problem.
32097
I am trying to run a rather simple code using tikz and a pgf library. My simple code is  \documentclass{book} \usepackage[explicit]{titlesec} \usepackage{fourier} \usepackage{tikz} \usepackage{epigraph} \usepgflibrary{qrr.shapes.openrectangle}  \begin{document}      This is a test document  \end{document}   This code was copied from Gonzalo Medina's answer in . When I run this code I get the error     '!Package pgf Error: I did not find the pgf library qrr.shapes.openrectangle'.   I am using TeXLive-2014 (actually I installed it yesterday) but nonetheless I updated all packages just in case, but that didn't seem to help.  Any idea how to use this specific library and why it cannot be found in the texmf trees?
104256
I have a document with several TikZ pictures in it.  I generally use simple names for the nodes such as:  \node (A) at .....  \node (B) at .....   and so forth.  Because of this I have name clashes between the various pictures.  That's generally not a problem.  However I find myself in a position where I may or may not have defined a certain node within a given picture.  So I use the following snippet to test whether the node has been defined:  \makeatletter \long\def\ifnodedefined#1#2#3{%%   \@ifundefined{pgf@sh@ns@#1}{#3}{#2}} \makeatother   Unfortunately this fails if I've already created a node by the same name in another picture.  Is there a way to scope the definitions of nodes or is there a way to undefine nodes once you no longer need them?  P.S.  I'm aware that I could embed each picture in a standalone file and import it using \includegraphics.  Unfortunately, this approach will not work for the document I'm creating.  MWE  \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc}  \makeatletter \long\def\ifnodedefined#1#2#3{%%   \@ifundefined{pgf@sh@ns@#1}{#3}{#2}} \makeatother  \setlength{\parindent}{0pt} \pagestyle{empty} \begin{document}   There's no node \textbf{D} here, so I draw a triangle:\par \begin{tikzpicture}    \coordinate (A) at (0,0);   \coordinate (B) at (1,0);   \coordinate (C) at (1,1); %  \coordinate (D) at (0,1);    \ifnodedefined{D}     {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }     {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }  \end{tikzpicture}     There is a node \textbf{D} here, so I draw a square:\par \begin{tikzpicture}    \coordinate (A) at (0,0);   \coordinate (B) at (1,0);   \coordinate (C) at (1,1);   \coordinate (D) at (0,1);    \ifnodedefined{D}     {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }     {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }  \end{tikzpicture}      There isn't supposed to be a node \textbf{D} here.  I'm expecting a triangle, but get a square.\par \begin{tikzpicture}    \coordinate (A) at (0,0);   \coordinate (B) at (1,0);   \coordinate (C) at (1,1); %  \coordinate (D) at (0,1);    \ifnodedefined{D}     {  \draw (A) foreach \myn in {B,C,D} {  -- (\myn) } --cycle;  }     {  \draw (A) foreach \myn in {B,C}   {  -- (\myn) } --cycle;  }  \end{tikzpicture}  \end{document}   produces:
100191
In my use of tikz-cd, the down, right and left arrows (\ar{d},\ar{r}, \ar{l} respectively) work fine, but I seem to have no uparrow (nor any up right arrow or up left arrow). When I have \ar{u}, I get the error "No shape named tikz@f@1-0-1 found". Can anyone help me with this?  \documentclass[a4paper,12pt]{article} \usepackage{tikz-cd} \begin{document}  \begin{tikzcd} A\ar{u}\\ B \end{tikzcd}  \end{document}   Replace that u with an l,r or d and it works.
101386
I have the two PGF nodes foo and bar positioned in a row.  \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document}   \begin{tikzpicture}[node distance=0.2cm,mynode/.style={rectangle,draw}]     \node[mynode] (foo)                {foo};     \node[mynode] (bar) [right=of foo] {bar};   \end{tikzpicture} \end{document}   How can I create a third node below those two nodes with the width of foo, bar and the node distance between them? Is there a way to do this with the fit library or is this the wrong approach?