Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{calc}
- usepackage{tikz}
- usetikzlibrary{hobby, arrows.meta,bending}
- newcommand*{jdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, {Round Cap}-{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7) .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- end{tikzpicture}}
- newcommand*{gapdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, {Round Cap}-{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7)
- (1.48,.8) ..
- ([blank=soft]1.43,1.4)
- .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- node[blue, circle, draw, text width=10pt] at (1.43,1.4) {};
- end{tikzpicture}}
- begin{document}
- Without verb|[blank=soft]| is OK:
- jdx
- With verb|[blank=soft]| the rounded end is not where I need it, here I want a rounded end where there is the red circle and a sharp end where there is the blue one:
- gapdx
- end{document}
- documentclass{article}
- usepackage{calc}
- usepackage{tikz}
- usetikzlibrary{hobby, arrows.meta,bending}
- newcommand*{jdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, {Round Cap}-{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7) .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- end{tikzpicture}}
- newcommand*{gapdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black,line cap=round, -{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7)
- (1.48,.8) ..
- ([blank=soft]1.43,1.4)
- .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- end{tikzpicture}}
- begin{document}
- Without verb|[blank=soft]|:
- jdx
- With verb|[blank=soft]|:
- gapdx
- end{document}
- documentclass{article}
- usepackage{calc}
- usepackage{tikz}
- usetikzlibrary{hobby, arrows.meta,bending}
- newcommand*{jdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, {Round Cap}-{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7) .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- end{tikzpicture}}
- newcommand*{gapdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, -{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7) (1.48,.8) .. ([blank=soft]1.43,1.4) .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- fill (.1,.85) circle (2pt);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- end{tikzpicture}}
- begin{document}
- Without verb|[blank=soft]|:
- jdx
- With verb|[blank=soft]|:
- gapdx
- end{document}
- documentclass{article}
- usepackage{tikz}
- usetikzlibrary{hobby, arrows.meta,bending,decorations.markings}
- newcommand*{jdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, {Round Cap}-{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7) .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- end{tikzpicture}}
- newcommand*{gapdx}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, -{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt,
- postaction={decorate,
- decoration={markings,mark=at position 0 with {fill (0,0) circle (2pt) ;}}
- }] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7)
- (1.48,.8) ..
- ([blank=soft]1.43,1.4)
- .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
- (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- node[blue, circle, draw, text width=10pt] at (1.43,1.4) {};
- end{tikzpicture}}
- newcommand*{standardz}[1][1]{%
- begin{tikzpicture}[baseline, xscale=#1]
- draw[black, {Round Cap}-{To[angle=90:.3cm 1,length=9mm, flex'=.86]},
- line width=4pt]
- (.1,.85) to[bend right]
- (1.48,.8)
- (1.43,1.4) to[bend right] (2.1,2.5);
- node[red, circle, draw, text width=10pt] at (.1,.85) {};
- node[blue, circle, draw, text width=10pt] at (1.43,1.4) {};
- end{tikzpicture}}
- begin{document}
- Without verb|[blank=soft]| on has one path, and the arrow heads are in the
- beginning and at the end of the path:
- jdx
- Standard Tiemph{k}Z behavior: whenever there is a gap in the path, the arrow
- heads are attached at the last stretch.
- standardz
- The Hobby paths do not behave differently. If you want to add a round line cap
- at the beginning, you may just use decorations, which affect the whole path.
- gapdx
- end{document}
Add Comment
Please, Sign In to add comment