Tag Info

Hot answers tagged

6

Like this? \documentclass[tikz]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node (a) {a}; \node[right=1cm of a] (b) {B}; \node[right=1cm of b] (c) {C}; \node[right=1cm of c] (d) {D}; \node[right=1cm of d] (e) {E}; \node[right=1cm of e] (f) {F}; \draw [dashed] (a) to[bend left] node {} (f); ...


6

The simplest thing to do is specify outer sep=0: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ultra thick, MyNode/.style={draw, minimum height=1cm}] \draw[step=1cm,gray,ultra thin] (-1cm,-3cm) grid (5cm,2cm); % default case \begin{scope}[red] \path (0,0) node[MyNode, anchor=south west, minimum ...


5

You are a victim of babel. Add \usetikzlibrary{babel} to escape. \documentclass[a4paper, 12pt]{scrartcl} \usepackage[english, french, ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{tikz-qtree} \usetikzlibrary{positioning,babel} %%<------------------- \usepackage{rotating} \begin{document} ...


5

Why not just this? \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{calc} \makeatletter \newcommand\aescandash[1]{%% \let\ae@scan@dash@result\relax \ae@scan@dash@parse#1_\@nil \ae@scan@dash@result } \def\ae@add@to@result#1#2{%% \ifx#1\relax \def#1{#2}%% \else \expandafter\def\expandafter#1\expandafter{#1#2}%% \fi} ...


4

This is an attempt where tikz pic is used with cloud shape from tikzlibrary. One might to play with cloud puff arc=110, aspect=2 in the cloud/.pic definition for one's like . Furthermore, the node (c1) and (c2) are adjustable to place the two clouds. Edit: Replace the aspect=2 key by cloud ignores aspect key will yield Code \documentclass{article} ...


4

Remark For a version working in PGF version 2.10, please see the bottom of the answer. Here's a possibility using TikZ and its pic path, as Claudio Fiandrino suggested in his comment: The code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,fit} \tikzset{ mynode/.pic={ \node[overlay,draw,circle,inner sep=3pt] at (0,-7.5pt) ...


4

The latest version of PGF has a node contents=<node text> key which can be used in place of the {<node text>} in a node. It could be used like this: \documentclass[tikz, border=5]{standalone} \tikzset{node text/.style={node contents=\transformtext{#1}}} \def\transformtext#1{\ttfamily(#1)} \begin{document} \begin{tikzpicture} \foreach \l ...


3

I would suggest you use the to syntax and specify the out and in angles. Here are a few examples and perhaps adjust the distance: Code: \documentclass[tikz]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[thick, dashed] \foreach [count=\i] \x in {$L_0$, $R_3$, $R_1$, $L_2$, $R_0$} { \node (\i) at (\i,0) {\x}; } ...


3

This is one possible solution where semi-circle is drawn for each nodes involved and then bezier curve is applied to connect all curves. Although the staring angle and end angle of the semi-circles may different for smoothness reason, some kind of repeated pattern is found and used here. Code \documentclass{article} \usepackage{tikz} ...


3

There is actually a preprocessor in disguise. You can use the node contents key started with TikZ 3. And via style nesting it becomes a preprocessor. But the downside is that you have to give all the specs within the brackets because closing bracket finishes the node parsing on a path. Edit: After cfr's correction, a little better with the option to choose ...


2

An alternative (although not necessarily better) way of replacing underscores using extended latex: \documentclass[tikz, border=5]{standalone} {\catcode`\_=13 \gdef_{\rule[-1pt]{0.75em}{1.0pt}}} \def\pp#1{{\catcode`\_=13 \scantokens{#1\ignorespaces}}} \begin{document} \begin{tikzpicture} \node [draw] {\pp{_foo_bar_}}; \end{tikzpicture} \end{document}


2

Thanks to @cfr , this is the solution I came up with. I didn't fully go with his solution because I need \myn unaltered for later purposes in my main document. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \makeatletter \newcommand\aescandash[1]{%% \let\ae@scan@dash@result\relax \ae@scan@dash@parse#1_\@nil \ae@scan@dash@result } ...


2

I think this solution is more clean. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \newcommand{\twonodes}[2]{% \begin{tikzpicture}[remember picture,node distance=0.6cm] \node[ circle, fill=gray] (#1) {}; \node[circle, below of = #1](#2) {}; ...


2

Here's a (very badly designed) custom shape, just to illustrate an alternative method which enables the parametrization of the parent anchor according to the number of the child. Only two children are permitted, but each node can use the circle 1 and circle 1 keys to specify the style for the inner circles: \documentclass[tikz,border=5]{standalone} ...


2

This is not automatic, it's just another manual solution but using hobby library. \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees,calc,positioning,hobby} \begin{document} \begin{tikzpicture} \begin{scope}[level distance=1.5cm, level 1/.style={sibling distance=3.2cm}, level 2/.style={sibling distance=1.7cm}] \tikzstyle{every ...


2

I do not know why the \node text is not centered by default, but you can use the label=center:my text option to place the text in the same node: Alternatively you can place a separate \node after you have your fit. Code: \documentclass[tikz,border=3mm]{standalone} \begin{document} \usetikzlibrary{fit,positioning} \begin{tikzpicture}[ node ...


1

You should use proper tool for each job ;-) Here it is tcolorbox \documentclass[12pt,border=5]{standalone} \usepackage[most]{tcolorbox} \newtcolorbox{mybox}[1][]{ enhanced, colframe=gray!80, colback=gray!40, left=2em,right=1ex,top=1ex,bottom=1ex,%boxsep=1em, leftrule=4pt, rightrule=0pt, toprule=0pt, bottomrule=0pt, arc=0pt, %breakable, ...


1

The problem is that you first write the Gate label and you then draw another line over the top of it. If you just swap the last two lines in your tikzpicture environment then you get what you want: Here is your hacked code: \documentclass[margin=10pt]{standalone} \title{Analogue Synthesizer block diagram} \usepackage{tikz} \begin{document} %Define ...



Only top voted, non community-wiki answers of a minimum length are eligible