# Tag Info

0

This doesn’t work in the same way as giving the option draw or fill as an option to a scope will not stroke or fill all paths in tho scope. Given as an option to a scope, they just set the color in the event a path uses those options without a value. In your case \draw[double] (0, 4) -- (5, 4); would use the blue from the scope’s setting. The manual ...

0

pointer of callout shape lies on line, which go through given coordinate (in your case c22.west) and center of callout shape. in your case you determined callout position regarding its shape center. i'm afreid, that i not understand well what you like to achieve, so below is mwe, which show, how will me design your sketch: ...

3

This can also be done using tikz-qtree, which is a package that takes the syntax of the qtree package for writing trees and combines it with TikZ. You can have an arbitrary number of children for each root with this package and its syntax. Similar to @someonr's solution, this solution also uses the positioning library to place the additional information in ...

5

You can use the positioning library to place nodes relative to each other. Like \node[left=<dimen/factor> of <another node>] {}. Just give the nodes inside your tree a name. To get any amount of children simply add or remove child{ ... }. For more information please take a look at the tikz manual (especially "18 Making Trees Grow" and "16.5.3 ...

3

Use the TikZ library arrows.meta and then you can scale the arrow heads as you wish. Here are a few examples. \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} \draw[->,line width=4pt] (0,0) to (1,0); \end{tikzpicture} \begin{tikzpicture} \draw[-{>[scale=2.5, length=2, ...

0

Using the "bad to" code from meta arrow tips, with the various coefficients (-3, 4, -2.75, 2.5, etc) scaled appropriately, appears to do the trick. Sometimes bad is good. (This doesn't answer the question of whether there is an option to modify the standard arrow command, without defining a new arrow tip, but perhaps the answer to that is simply no'.)

0

Well, you could put each tikzpicture into a separate file using \documentclass{standalone} and replace the original tikzpicture with \includegaphics{filename.pdf}

1

This attempt uses let and veclen to determine the distance between n1 and n7, then incorporates your node N definition, which requires two inputs. To demonstrate, the original 4-line-code starting from 'dimedef' is marked out and replaced by the \path command this solution provided. This attempt generates the same output from the OP in which the length 164 ...

23

Just to get things going... \documentclass[border=0.125cm]{standalone} \usepackage{tikz} \tikzset{gift box/.cd, x/.store in=\gbx, y/.store in=\gby, z/.store in=\gbz, x=0,y=0,z=0 } \tikzdeclarecoordinatesystem{gift box}{% \tikzset{x=(-20:1cm),y=(200:1cm),z=(90:1cm)}% \tikzset{gift box/.cd, #1}% ...

4

Looking at pgf-umlsd.sty is not so difficult to find that by default, all threads are filled with gray!30. But being an optional parameter you can change it just declaring which color do you prefer: \newthread[white]{c}{:Client}. I've selected white because none draws transparent threads which don't cover the background dotted line. Second question was more ...

31

I think the best approach is to use Lindenmayer systems. The following code defines a Lindenmayer rules for drawing a single "arm" of the snowflake. I think it is crucial that the "arm" is symmetric. Then this arm is repeated rotated 60 degrees each time to produce the complete snowflake. Changing the Lindenmayer rule, the angle turned by the rules + and ...

2

There are certain places where TikZ don't parse the math such as node names and a few other places. Inside a loop you can instead use the evaluate=<var> as <resulting var> using <formula> syntax. You could have used a counter that starts from 1 in this specific case too. Moreover you need to use (...) to nest the math and {...} to hide it ...

3

You can call the frame (absolute) center: \begin{filecontents}{circle} \documentclass[crop,preview,tikz]{standalone} \begin{document}% \begin{tikzpicture}% \draw (0,0) circle (1cm);% \end{tikzpicture}% \end{document} \end{circle} \end{filecontents} \documentclass{beamer} \usepackage{standalone} ...

5

This is, I think, a bug in the intersections library in TikZ. Although it does not produce an error with the CVS version of TikZ, the underlying bug is still there. When TikZ names a path then it has to save that path to a macro. Because the path might undergo considerable changes as it is being processed, the best time to save it is right at the end. So ...

15

Not very proud of the output...but lazy enough not to enter some nice profile coordinates by hand =) \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shadows} \newcommand{\profile}[1][]{ \pgfmathsetseed{1234} \draw[snowflake,#1] (0:rnd) \foreach \i in {1,...,10}{ -- (rnd*15:rnd*3+\i) } -- ++(0:1) -- ...

21

6

There is not much you can do. The problem is with TeX and turning on the fpu library is not going to help you. See it like this, TikZ relies on TeX length registers and other TeX related mechanism to copmute the paths. Then sends to the driver as paths. Now the driver is pretty good at scaling down objects. But your object description never reaches to the ...

3

Here's a TikZ-based attempt. Update In response to OP's comment, the following code uses a stretched version of the brace character and adjusts the vertical alignment of the braced block. (The red boxes and lines are drawn to show alignments. Comment out the relevant part of the code to switch them off.) Code \documentclass{beamer} \usepackage{tikz} ...

10

Real easy with stackengine, and some scalerel thrown in for the brace. \documentclass{beamer} \usepackage[usestackEOL]{stackengine} \usepackage{scalerel} \renewcommand\stackalignment{l} \parskip .5cm \begin{document} \begin{frame}{frame title} \stackunder{\parbox{5cm}{Description Item 1}}{% \hspace{1cm}\Longunderstack{% --- sub item 1\\ --- sub ...

1

using an empiric solution : \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[draw,rounded corners,yellow,minimum height=1cm, minimum width=1cm] (A) {ABC}; \node[draw] (B) at (1,1) {B}; \coordinate[xshift=-0.3ex,yshift=-0.3ex] (fakeA) at (A.north east); \draw [<->, blue] (fakeA) -- (B); \draw [red] (A.north ...

2

Here is a bit manual approach using shorten. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[draw,rounded corners] (A) {A}; \node[draw] (B) at (1,1) {B}; %\fill[red] (A.north east) circle(0.5pt) node[font=\tiny, above, anchor =west]{(A.north east)}; \draw[<->,shorten <= -2pt+\pgflinewidth] (A) -- (B); ...

6

There are two problems in this drawing. First the zig-zag line, second the top formula which has special alignment requirements. The following code suggests solutions for these problems. There is a short explanation: First, each position for each asterisk is defined as a named coordinate, with names n0, n1, n2, and so on, but nothing is drawn yet. These ...

1

Thanks for help, based on your solution I have done this piece of code : \documentclass[tikz,border=10pt,a4paper]{article} \usepackage{etoolbox,tikz} \usetikzlibrary{decorations} \usetikzlibrary{decorations.shapes} \usetikzlibrary{calc} \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \tikzset{decorate ...

8

Using the code from Calling a previously named path in tikz, we can define the curve before drawing the rectangles but delay its rendering until afterwards. \documentclass{article} %\url{http://tex.stackexchange.com/q/150486/86} \usepackage{tikz} \usetikzlibrary{intersections} \makeatletter \tikzset{ use path for main/.code={% \tikz@addmode{% ...

6

I don't know what causes the problem with not being able to draw after that \foreach, but a different way is to use the backgrounds library to place the rectangles on the bottom layer. \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections,backgrounds} \begin{document} \begin{tikzpicture} %axis \draw (-.5,0) -- (6.5,0); %curve ...

6

You need to know at least the zig-zag's peaks coordinates. Because the angles of zig-zag lines and level separation are the same, a simple way to draw the zig-zag with stars is by using decorations. Code \documentclass[border=10pt,tikz]{standalone} \usetikzlibrary{decorations.shapes,shapes} \begin{document} \begin{tikzpicture}[x=1cm, y=1.25cm] ...

3

Click the Edit button and add any package you need to the template. Mine follows for reference: \documentclass{standalone} \usepackage{tikz,pgfplots} \pgfplotsset{compat=newest} \usepgfplotslibrary{groupplots} \begin{document} <> \end{document} The <> mark is where the code you type in KtikZ will be placed.

2

Ideally, one could place a node at the (1,0)-(.5\pgfarrowsleftextend,0), i.e. the end point of the arrow minus half of the total width of the stealth' arrow tip. But I don't know how to access the length stored in \pgfarrowleftextend, so the following solution involves some manual fiddling. Use inner sep=<dim> to control the radius of the circle Use ...

1

Well for "Symbols" there is tikzsymbols: You can use TikZ as well: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.misc} \newcommand*\circled[1]{{\scriptsize\tikz[baseline=(char.base)]{ \node[shape=circle, draw, inner sep=1pt, align=center] (char) {#1};}}} \usepackage{tikzsymbols} \begin{document} Something like that ...

0

Here is a slight variant, that helps a bit in managing file names: Main file: (with .tex extension) \documentclass{standalone} \usepackage{currfile} \usepackage{tikz} \begin{document} \input{\currfilebase.tikz} \end{document} TikZ File: (with .tikz extension) \begin{tikzpicture} \draw (-1.5,0) -- (1.5,0); \draw (0,-1.5) -- (0,1.5); \draw (0,0) ...

4

Another try with TikZ using my libraries positioning-plus and paths.ortho ([1], [2]) I am also using the shift left and shift right styles from the tikz-cd according to another answer of mine. Their implementation however is a little flawed as they do not work well with |*. Maybe a decoration as in [3] and [4] might be better suited here. Code ...

4

Here is a solution using the nonzero rule and the even odd rule to fill paths. All I did was adapt your code with these commands. It can be done cleaner. In addition, you should use scope to group items. This example is mainly to show what can be done with the nonzero and the even odd rules. \documentclass{standalone} \usepackage[tikz]{bclogo} ...

1

Changing this tiny line of code \usepackage[usenames,dvipsnames]{color} to \usepackage[usenames,dvipsnames]{xcolor} fixed it, thanks @Ignasi

7

Is this what you seek? Here scope environment is used. Be aware that clip command must be contained in the scope environment to limit the effect of clipping. Without scope environment, the clipping effect will continue to the end of the code. Code \documentclass{standalone} \usepackage[tikz]{bclogo} ...

0

By shrinking the code to an MWE, an unprocessed-floats error came up. Using a for-loop for multiple invoking of the same tikz, the error shows up after the 18th iteration (image). After including the morefloats package it was solved and successfully tested up to 30 images.

3

One option is to place the labels upon the figure outside of tikz. Here, I use \stackinset to accomplish it. I place the tikz image in an \sbox, and the nest a bunch of \stackinsets around the box. The only quirk was that to place the "Control Plane" and "User Plane" labels, I had to smash them, or else they changed the size of the resulting figure ...

5

See update for a better solution You used a lot of "hardcoded" values to "manually" draw each line. I would have used named coordinates computed from the coordinates of the frame of each node to draw the connecctions instead. Anyway, since you have this part already done, you can continue with the same approach for the remaining text. You can use your ...

18

Possibly... \documentclass[]{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \usepackage{fullpage,amsmath} \usepackage{times} \begin{document} \begin{tikzpicture}[baseline=(A.center)] \tikzset{BarreStyle/.style = {opacity=.3,line width=3 mm,line cap=round,color=#1}} \matrix(A) [matrix of math nodes, left delimiter = {[}, right delimiter ={]}] ...

13

What about this? Code (only the changed parts): \tikzset{BarreStyle/.style = { opacity=.3,line width=6 mm, line cap=round, line join=round, color=#1, shorten >= -0.1ex, shorten <= -1ex} } [Same matrix definition] \draw [BarreStyle=red] (A-1-1.center) to (A-1-2.center) to (A-2-2.center) ...

7

A first solution may come with the decorations.shapes library. The code: \documentclass[tikz,border=10pt]{standalone} \usepackage{etoolbox,tikz} \usetikzlibrary{decorations.shapes} \tikzset{decorate with/.style args={#1 with size #2}{ decorate,decoration={shape backgrounds,shape=circle,shape size=#2}, fill=#1, } } \begin{document} ...

3

If you don't mind parameterizing a bunch of stuff (including the scale) the arcs can be drawn fairly precisely, by calculating the angle on the main circle subtended by the chord formed by the radii of the nodes. There will still be a slight error in the arcs caused by pgf "backing-up" along the tangent of the endpoint of the arc. In the CVS version of pgf ...

1

It seems that the focal point is to keep the circle reserved when nodes are moved along the circle. To this end, this attempt proposes arccommands. \draw (alpha:radius) arc (alpha:beta:radius); % alpha=start angle, beta=end angle Code: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \tikzset{cblue/.style={circle, ...

3

Using bend left won't be useful here. But use of in and out angles with carefully chosen looseness may help. Adjust them to suit your needs. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \tikzset{cblue/.style={circle, draw, thin,fill=cyan!20, scale=0.5}} \begin{document} \begin{tikzpicture}[->,>=stealth',shorten ...

2

The *shape*s have various nodes defined. You can access those: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{tikzpicture} [ hexa/.style={shape=regular polygon, regular polygon sides=6, minimum size=1cm, %draw, anchor=south}, ...

5

You can tell pgfplots that the input is actually given in polar coordinates using data cs=polar. Pgfplots will automatically transform it to the output coordinate system: \documentclass{standalone} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=center, axis equal image, enlargelimits=true, ...

6

Your file mydocument.tex \documentclass{article} \usepackage[landscape]{geometry} \usepackage{tikz} \begin{document} \input{tikzpicture.tex} \end{document} File tikzpicture.tex: \begin{tikzpicture} \draw (-1.5,0) -- (1.5,0); \draw (0,-1.5) -- (0,1.5); \draw (0,0) circle (1cm); \end{tikzpicture} Then edit tikzpicture.tex with QTikZ. Or have I ...

3

You shouldn't use \usetikzlibrary{mindmap,shadows} outside the preamble. To include the mindmap with a specified width just use \includestandalone[width=.75\linewidth]{mindmap} The preamble of the included files can be used if package option subpreambles is set to true. You might like to replace the \documentclass{article} with ...

4

Remarks I defined two new node styles full and empty for the dots at the ends of the line. Implementation \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[ full/.style = {circle,draw,fill,inner sep=1pt}, empty/.style = {circle,draw,fill=white,inner sep=1pt} ] % To be added \draw[help lines] (0,0) -- (45:7); ...

3

You can define a new style called mylabel and shift it a bit vertically (y). This way you can just redefine the style, and all labels placed this way will look the same (3 and 4). With the tikzlibrary positioning you can do something like above right= and . See plots 5 and 6. Thanks at @HarishKumar for pointing that out. \documentclass{standalone} ...

2

Here is a MWE of such a table. \documentclass{minimal} \usepackage{tikz} \newlength{\csize} \newlength{\cwidth} \newlength{\clabel} \newcommand{\cell}[1]% centers text in cell {node[above right,minimum width=\csize, minimum height=\csize]{#1}} \begin{document} \setlength{\csize}{1.5\baselineskip}% cell size (note: \baselineskip depends on current font) ...

Top 50 recent answers are included