New answers tagged

1

Avoid circuitikz elements inside a tikz pic. Here is a rather minimal example producing a similar error as the original code. \documentclass{standalone} \usepackage{circuitikz} \tikzset{pics/mypic/.style={code={\draw (0,0) to[short](1,0);}}} \begin{document} \begin{tikzpicture} \pic (p) {mypic}; \end{tikzpicture} \end{document} The source of the problem ...


4

As suplement to @Andy Wang answer (+1), showing how to make code shorter by defining style of dots: \documentclass[border=3.141592]{standalone} \usepackage{pgfplots} % it load tikz too \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[ > = {Straight Barb[scale=0.8]}, dot/.style = {circle, draw, fill=#1, inner sep=2pt} ...


4

\documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} \draw[help lines] (-5, -5) grid (5, 5); % draw coordinate axes \draw[<->, thick](-5.5,0)--(5.5,0)node[right]{$x$}; \draw[<->, thick](0,-5.5)--(0,5.5)node[above]{$y$}; \node[circle, ...


3

As you have created a grid with steps of size 1, a "quick and dirty" solution is to locate a node in the exact coordinates that you want the text, in this case (7.5,1.5) if I counted well. The only thing that you need to add to your code is: \begin{scope}[color=black] \node[anchor = center] () at (7.5,1.5){a}; \end{scope} at the end. I located ...


0

Use the atbegshi package. \usepackage{atbegshi} \AtBeginShipout { \begin{tikzpicture}[remember picture,overlay] \node [rectangle, fill=sidecolor, anchor=north, minimum width=9cm, minimum height=\paperheight+1cm] (box) at (-5cm,0.5cm){}; \end{tikzpicture} }


0

Apparently you want to solve your problem in a particular way, using the key system of tikz and pre- and post-expansions. I cannot contribute to this in any way. Just in case you consider also other approaches: I suggest to use plain macros. \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows.meta} % \...


1

There's an update to the spath3 which provides the facility to split paths at intersections and work with the resulting components. \documentclass{article} %\url{https://tex.stackexchange.com/q/383762/86} \usepackage{tikz} \usetikzlibrary{spath3, intersections} \begin{document} \begin{tikzpicture} \path[spath/save = line1, draw] (-1,0) .. controls (2,2) and ...


0

I reached this question while trying to fix the inter-nodal distances between nodes in my state transition graph. The tutorial here gives minimal examples of STGs and suggests the below \tikzset configuration in the preamble of the source, \tikzset{ ->, % makes the edges directed >=stealth', % makes the arrow heads bold node distance=3cm, % specifies ...


2

Just add the domain to the functions \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \begin{tikzpicture} \begin{axis}[axis lines=center, xlabel=$x$, ylabel=$y$, xmin=-1, xmax=2, ymin=-1, ymax=2.5, xtick distance=1] \addplot[name path=A, thick, black, samples=20, domain=-1:2]{x} node[pos=0.61, right]{$y=x$}; \...


1

You may liked: Above image is based on your code. Produced is by use of the tikzmark and babe library. Latter solve your. \documentclass[12pt, spanish]{article} \usepackage{babel} \usepackage[x11names,table]{xcolor} \usepackage{mathpazo} \usepackage{tikz} \usetikzlibrary{arrows.meta, quotes, tikzmark, ...


2

Spanish produces an error see here I fixed it. It should now draw your arrows. \documentclass[12pt,spanish]{article} \usepackage{babel} \usepackage[utf8]{inputenc} \usepackage[x11names,table]{xcolor} \usepackage{mathpazo} \usepackage{tikz} \usetikzlibrary{babel} \usetikzlibrary{calc}% to calculate auxilary coordinates \newcommand\tikznode[3][]{% \tikz[...


3

Loading tikz library babel will resolve the problem in using \path[->] ...; Your \tikznode actually is re-implementing utilities in package tikzmark. In general cases, this package is very useful. In your case, the tikz \matrix command is particularly helpful. \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \...


Top 50 recent answers are included