# Tag Info

0

As I didn't see a solution using the 3d library yet, I made a small example of how to use it in this case. Code \documentclass[tikz, border=2mm]{standalone} \usetikzlibrary{3d} % unfortunately, "canvas is xy plane at z" does not work properly, this code fixes it \makeatletter \tikzoption{canvas is xy plane at z}[]{% ...

0

yshift does nothing because it only adds a value to the coordinates in TikZ's coordinate system, which has nothing to do with how the tikzpicture is drawn on the page. If you want them vertically centered, add baseline=(current bounding box.center) to both tikzpictures. If you want the two triangles vertically aligned, add baseline=(s3.south) as an option ...

1

Your code works if you add clip=false to the second axis environment, containing the node with the annotation. Having done that you can just move it to the position of your choice, by changing the coordinates for the \node. That said, the second axis environment is not really necessary here, you might as well add it inside the first axis environment, or ...

0

The command \draw[blue] (0,1cm) circle (1cm); draws a circle of radius 1cm. The command \draw[gray,thin] (0,.25) circle (.25); draws a circle in the coordinate system of the axis. That is, it plots the set of all points that satisfy x^2 + (y-0.25)^2 = 0.25^2 within the axis coordinate system. Now note that the x scale and the y scale are different in your ...

2

A possible solution is: \documentclass[border=3mm,tikz,]{standalone} \usetikzlibrary{arrows,automata, chains, positioning, } \begin{document} \begin{tikzpicture}[ > = stealth', shorten > = 1pt, node distance = 13mm and 0mm,% deleted "on grid" auto,% added ...

3

While someone provides a only-beamer-solution, you could consider to use tcolorbox and its easily customizable boxes. \documentclass{beamer} \usepackage[most]{tcolorbox} \setbeamertemplate{blocks}[rounded][shadow=true] % use rounded blocks with standard beamer shadow \begin{document} \begin{frame}{Example frame} \begin{block}{Block with shadow} I, ...

1

Here is my solution: \begin{tikzpicture}[x=1mm, y=1mm] % Largest radius \def\l{3.25}; % Rotation angle in radians \def\a{1.2*pi}; % Second parameter of the spiral \def\b{0.25} \begin{scope}[rotate=-90] \pgfmathsetmacro{\shift}{{\l*exp(\b*2*pi)+\l}} ...

0

2

\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \shadedraw[shading=radial, line width=3mm, color=blue, outer color=red, inner color=yellow] (0,0) circle (4); \end{tikzpicture} \end{document}

0

The trouble is that (upper_left_arrowhead) is directly above (A). Hence, \x1 is equal to zero and, hence, \y1/\x1 cannot be calculated. TeX tells you this on the console. It has nothing to do with veclen. The compilation isn't getting that far. I'm a bit unclear why you are doing things in ways which appear needlessly complex. For example, why such a ...

0

This might help. One can use an american resistor or cute inductor for springs, and a european resistor for mass. \documentclass{standalone} \usepackage{circuitikz} \makeatletter % ************************* mechanical dashpot ************************** \ctikzset{bipoles/dashpot/height/.initial=.6} \ctikzset{bipoles/dashpot/width/.initial=.8} ...

1

The code is working fine you just need to add , after data as @jarauh mentioned.

0

Since you seem to want expandable commands, you have to set the relevant bits at color definition time, because the extraction/conversion functions provided by xcolor are not expandable. Here's a way, with two “extended” commands for color definition, namely \Xdefinecolor and \Xcolorlet. \documentclass{article} \usepackage{xcolor,xparse} \ExplSyntaxOn ...

1

Perhaps too much ado for a 'simple' question, but this extracts the floating point values of the color specification. Improved version: Rounding the floating point values to integer numbers -- not failsafe of course! Basic explanation: extractcolorspecs yields the model and color specification in a command, the later giving a CSV list of floating point ...

1

Using the \ifthispageodd{}{} macro of the Komma-Script bundle you can test when the page is odd and therefore change the definition of the chapter. You did not say what to do with the name of the chapter. In this case stays on the left. If you will like to mirror the position the \node macro also should be changed. ...

2

This answer proposes to use preaction and|or postaction to define a style which draws all three layers in one command but doesn't solve the problem about equally distributed 11 dots between two points. \documentclass{article} \usepackage{tikz} \makeatletter \tikzset{ dot diameter/.store in=\dot@diameter, dot diameter=3pt, dot spacing/.store ...

1

No you can't. Either you loose the line joining features (miter etc.) or you use one color per stroke if used the typical -- operation. The stopping part can be done via to or edge operations and the above statement also apply to them (in different contexts) \draw (0,0) edge[draw=red] (1,1) (1,0) edge[draw=blue] (0,1); This gives a different ...

0

According pgf-pie documentation you can use pos option to place a pie inside a tikzpicture. You don't need minipage. And also from examples, seems that a second parameter inside values list (10/A, 20/B) adds names to pie. If you don't want a second legend, write a values list with empty names. If the order is correct, the first legend will serve. ...

0

With the subfigure package. I have not the pgf-pie package, so I can not test it, but this code should work : \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \usepackage{pgf-pie} \begin{document} \begin{center} \begin{figure*}[t!] \centering \begin{subfigure}[b]{0.5\textwidth} \begin{tikzpicture} ...

0

\begin{tikzpicture} \definecolor{green}{HTML}{54FF00} \definecolor{white}{HTML}{FFFFFF} \definecolor{red}{HTML}{FF0000} \definecolor{blue}{HTML}{0048FF} \fill[green](0,0)rectangle(7,7); \fill[red](0,6)rectangle ++(1,1); \fill[red](2,2)rectangle ++(1,3); \fill[red](3,3)rectangle ++(2,1); \fill[blue](1,2)rectangle ++(1,4); \fill[white](3,4)rectangle ...

1

One advantage of forest is that you can use tier to tell the package that certain nodes should be on the same level of the tree, even if some have more intervening nodes than others. For example, in the code below if n children=0{tier=terminums}{}, says that terminal nodes should all be placed on the same tier of the tree. So the 2 action 3 nodes can ...

1

Like this? Relevant segment of your MWE: % Draw the links between forces \path[->,thick,red] ([xshift=-3mm] substitutes.south east) edge ([xshift=-3mm] rivalry.north east) (users) edge (rivalry) (suppliers) edge (rivalry) ([xshift=-3mm] rivalry.south east) edge ([xshift=-3mm] entrants.north east) (entrants) edge (comment-rivalry) ; ...

2

Here are the relevant lines to be changed : %%%%%%%%%%%%%%%% % Draw the links between forces \path[->,thick] ([xshift=-2ex]substitutes.south east) edge ([xshift=-2ex]rivalry.north east) (suppliers) edge (rivalry) (users) edge (rivalry) (entrants) edge (comment-rivalry) ([xshift=-2ex]rivalry.south east) edge ([xshift=-2ex]entrants.north east);

2

The solution given in the question you linked (How can I keep my TikZ overlay picture on the same page?) does work here, in the following sense: \begin{longtable}{p{3cm}p{3cm}} \toprule first column & second column\tikz [remember picture] \node (rightmark) {};\\ \midrule \endhead A & A \\ A & A \\ A & A \\ A ...

0

If you read the section in the manual pgfplots.pdf about the patch option, you will find that the file is read three lines at a time. Each consecutive triple of points defines one triangle. That is, lines one to three define triangle one, lines four to six define triangle two, and so on. And this is what you get. If you want to use patch to draw a ...

4

I would draw it three times since the shapes are nontrivial \begin{tikzpicture} \foreach\y/\x in{0/gray,.4/white,0.5/blue}{\node[shift={(\y pt,\y pt)},text=\x] {Effect};} \end{tikzpicture}

1

The problem is that the custom itemize labels grow to the left. You can fix it by adding overlay and a xshift: Code \documentclass{article} \usepackage{enumitem} \setlist[itemize,1]{label=$\bullet$,leftmargin=0mm, itemindent=7mm,labelsep=2mm,topsep=1mm,itemsep=-1mm,parsep=1mm} \usepackage{tikz} \newcommand{\clabel}{ ...

5

The allow upside down key sets \ifpgfallowupsidedownattime which is used in the basic layer transformations so it is difficult to influence this behaviour without some fairly major hacking. So it is probably best to set the node anchor manually conditionally using the angle of the line, which is quite easy to get in this case: ...

2

(Sorry I overlook your second code) Instead of sloped system, you can use auto and an optional swap \documentclass[tikz,border=2mm]{standalone} \begin{document} \tikz{ \foreach \C in {1,...,5} \draw[-latex](\C*72-72:5)--(\C*72:5)node[sloped,auto,swap,pos=.66]{XYZ}; } \end{document} The question is that TikZ does not know how to handle ...

4

This is not a completely automatic solution like the one proposed in Tikz foreach inside matrix but node contents and nodes in empty cells options can help to provide a semiautomatic solution. \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m) [draw, matrix of nodes, nodes in empty cells, ...

2

According to private communications with the OP, a solution without the bclogo package is preferred. The following rebuilds the boxes using tcolorbox. Still, the very nice graphics from bclogo is used without loading that package. Hopefully, the requirements are fulfilled: \documentclass[dvipsnames]{article} \usepackage[skins]{tcolorbox} ...

2

If you set the nodes above and below points on the path, then they will not interfere with the continuity of the path. For example: \documentclass[tikz,border=10pt]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0) node (nodeA) [below] {$V_1$} -- (2,2) node (nodeB) [above] {$V_2$} node [midway, above, sloped] (EdgeAB) {$E_1$} -- (3,0) node ...

0

My attempt to substitute the compiled result by tikzexternal.sty worked as soon as I defined \ifpgfpicture. The legend to name feature uses this switch which belongs to PGF. However, it should be save to define it and keep it at value 'false'. The following example worked for me: \documentclass{article} %\usepackage{pgfplots} ...

1

I believe this is an interesting question. First, I want to point out that the notation for physicist is not the same as for mathematicians. What physicist call theta (ϴ), mathematicians call phi (ϕ) and vice-versa. I refer the reader to the Wikipedia website for the conventions used. The macro is simple and I include it next with the convention asked here. ...

0

Here is a \pdfliteral solution. It only works for single numbers. \def\circled#1{% #1% \pdfliteral{ q .5 w 10 0 0 10 -2.5 3.5 cm .05 w .5 0 m .5 .276 .276 .5 0 .5 c -.276 .5 -.5 .276 -.5 0 c -.5 -.276 -.276 -.5 0 -.5 c .276 -.5 .5 -.276 .5 0 c h S Q }% } \circled{1} a \circled{2} b \circled{3} c \circled{10} \bye

18

Next time, please show us what you have so far, even if that is only a beginning. It makes it much easier to help and avoids people having to start setting up things from scratch. This answer contains 2 different solutions. The second (under EDIT below) is a modified version of the first which more closely matches the image in the question. Here's a ...

13

This might give you a starting point. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta,shapes.multipart} \begin{document} \begin{tikzpicture}[ thick,>={Triangle[]}, circ/.style = {draw,circle,minimum size=5ex}, rect/.style = {draw,rectangle,minimum size=5ex}, splt/.style = {draw,rectangle split,rectangle split ...

2

assuming every column has at least one non-circled number you could use \mycircled{1} defined via \newcommand\mycircled[1]{\makebox[0pt]{\circled{#1}}} Which hides the width of the circled entries. Otherwise you could replace 0pt by \digitwidth defined by \newlength\digitwidth \settowidth\digitwidth{1} To force a circled digit to be as wide as a ...

1

I finally solved it using the bounding-box approach on the tikz side (I did not use circuitikz after all as it does not allow for more than two inputs per gate). First I place the nodes using GraphViz as a preprocessor, then the wires are drawn following John Kormylo's suggestion. It's still quite rudimentary, but for small circuits it works fine. You can ...

0

Source Complementing what @RichardHDowney answered. The circuitikz manual contains all the information about the circuit elements that can be used with circuitikz, in section 3.2.4 Stationary sources of this manual two batteries will appear battery and battery1. MWE with battery \documentclass{minimal} \usepackage{circuitikz} \begin{document} ...

0

Like this? For above image I firs cleanup your code (all nodes use as child etc, see code below), than added two options to three growth parent anchor = north, and edge from parent/.style = {draw=none} and set all nodes anchor to anchor=north: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} ...

2

Possible but not perfect solution \documentclass[border=10pt]{standalone} \usepackage{tikz,bm} \usetikzlibrary{calc,positioning,fit,arrows} \begin{document} \begin{tikzpicture} [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% node distance=.2cm, whiteCircle/.style={circle,draw,very thick, inner ...

0

The name of the big outer node which draws the Thalamus box is just Thalamus: \node[draw,fit=(#2-c1) (#2-c2) (#2-c3) (#2-c4) (#2-tt), red](#2){}; draws the big node's box. The name of the node is (#2) which is the second argument you give when drawing it: \bloc{(0,0)}{Thalamus} %the position of box 1 So Thalamus is the name you need to connect to in ...

3

Your picture includes two different coordinates named B in different places. If you comment out the second definition, the triangle looks OK as far as I can tell: \documentclass[border=10pt,tikz]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} %The vertices A, B, and C for a right triangle are located. \coordinate (A) at (0,0); ...

2

In the end I went with \parshape instead of \shapepar, which didn't work in TikZ. So I used the background package for background image and picture enviroment for absolute positioning. \documentclass{article} \usepackage[a6paper]{geometry} \usepackage{graphicx} \usepackage{fontspec} \usepackage{background} \usepackage{pst-barcode} ...

1

Another solution is to use saveboxes: \documentclass[ ,crop=true ,varwidth=\maxdimen ]{standalone} \usepackage{forest} \newsavebox{\tempbox} \begin{document} \savebox{\tempbox}{A\tikz{\node[circle,draw,inner sep=.15ex]{1};}} \Forest{ [\usebox{\tempbox} [B] [C]] } \end{document}

2

Nesting tikzpicture environments should be avoided. It guarantees unpredictability ;). However, there is a straightforward way to do this using forest which provides a tikz key for adding annotations to nodes after the tree is drawn: \documentclass[border=10pt,tikz]{standalone} \usepackage{forest} \usetikzlibrary{positioning} \begin{document} \Forest{ ...

2

Yes, you can associate further labels with the lines at whatever position you want. This is simply by defining a new macro similar to the one in that answer, with mark=at position #1 customized for your need. So, the new macro here accepts two arguments; one for position and another for content (label/.style args={#1#2}{...}). ...

4

A path is not a plot and the options which apply to one do not necessarily apply to the other. You need to create nodes or coordinates and/or labels or use edge and labels or.... There are many ways. However, you can do all this as part of the path specification with \draw. I've also moved very thick to an option for the picture to avoid repeating it. For ...

1

Section 4.7.6 of the pgfplots documentation shows how to define your own colormap, but you need to take slightly different approaches to apply the map to symbols or lines. \documentclass[border=1mm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[colormap={greenblue}{rgb255(0cm)=(0,0,255); rgb255(1cm)=(0,255,0)}] ...

Top 50 recent answers are included