Guest User

Untitled

a guest
Feb 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{calc}
  3. usepackage{tikz}
  4. usetikzlibrary{hobby, arrows.meta,bending}
  5.  
  6. newcommand*{jdx}[1][1]{%
  7. begin{tikzpicture}[baseline, xscale=#1]
  8. 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)}]
  9. (2.1,2.5);
  10. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  11. end{tikzpicture}}
  12.  
  13. newcommand*{gapdx}[1][1]{%
  14. begin{tikzpicture}[baseline, xscale=#1]
  15. 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)
  16. (1.48,.8) ..
  17. ([blank=soft]1.43,1.4)
  18. .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
  19. (2.1,2.5);
  20. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  21. node[blue, circle, draw, text width=10pt] at (1.43,1.4) {};
  22. end{tikzpicture}}
  23.  
  24.  
  25. begin{document}
  26. Without verb|[blank=soft]| is OK:
  27.  
  28. jdx
  29.  
  30. 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:
  31.  
  32. gapdx
  33.  
  34. end{document}
  35.  
  36. documentclass{article}
  37. usepackage{calc}
  38. usepackage{tikz}
  39. usetikzlibrary{hobby, arrows.meta,bending}
  40.  
  41. newcommand*{jdx}[1][1]{%
  42. begin{tikzpicture}[baseline, xscale=#1]
  43. 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)}]
  44. (2.1,2.5);
  45. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  46. end{tikzpicture}}
  47.  
  48. newcommand*{gapdx}[1][1]{%
  49. begin{tikzpicture}[baseline, xscale=#1]
  50. 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)
  51. (1.48,.8) ..
  52. ([blank=soft]1.43,1.4)
  53. .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
  54. (2.1,2.5);
  55. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  56. end{tikzpicture}}
  57.  
  58.  
  59. begin{document}
  60. Without verb|[blank=soft]|:
  61.  
  62. jdx
  63.  
  64. With verb|[blank=soft]|:
  65.  
  66. gapdx
  67.  
  68. end{document}
  69.  
  70. documentclass{article}
  71. usepackage{calc}
  72. usepackage{tikz}
  73. usetikzlibrary{hobby, arrows.meta,bending}
  74.  
  75. newcommand*{jdx}[1][1]{%
  76. begin{tikzpicture}[baseline, xscale=#1]
  77. 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)}]
  78. (2.1,2.5);
  79. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  80. end{tikzpicture}}
  81.  
  82. newcommand*{gapdx}[1][1]{%
  83. begin{tikzpicture}[baseline, xscale=#1]
  84. 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)}]
  85. (2.1,2.5);
  86. fill (.1,.85) circle (2pt);
  87. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  88. end{tikzpicture}}
  89.  
  90.  
  91. begin{document}
  92. Without verb|[blank=soft]|:
  93.  
  94. jdx
  95.  
  96. With verb|[blank=soft]|:
  97.  
  98. gapdx
  99.  
  100. end{document}
  101.  
  102. documentclass{article}
  103. usepackage{tikz}
  104. usetikzlibrary{hobby, arrows.meta,bending,decorations.markings}
  105.  
  106. newcommand*{jdx}[1][1]{%
  107. begin{tikzpicture}[baseline, xscale=#1]
  108. 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)}]
  109. (2.1,2.5);
  110. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  111. end{tikzpicture}}
  112.  
  113. newcommand*{gapdx}[1][1]{%
  114. begin{tikzpicture}[baseline, xscale=#1]
  115. draw[black, -{To[angle=90:.3cm 1,length=9mm, flex'=.86]}, line width=4pt,
  116. postaction={decorate,
  117. decoration={markings,mark=at position 0 with {fill (0,0) circle (2pt) ;}}
  118. }] (.1,.85) to [curve through={(.79,.18) .. (1.45,.7)
  119. (1.48,.8) ..
  120. ([blank=soft]1.43,1.4)
  121. .. (1.2,1.6) .. (.9,1.6) .. (1.9,1.6)}]
  122. (2.1,2.5);
  123. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  124. node[blue, circle, draw, text width=10pt] at (1.43,1.4) {};
  125. end{tikzpicture}}
  126.  
  127.  
  128. newcommand*{standardz}[1][1]{%
  129. begin{tikzpicture}[baseline, xscale=#1]
  130. draw[black, {Round Cap}-{To[angle=90:.3cm 1,length=9mm, flex'=.86]},
  131. line width=4pt]
  132. (.1,.85) to[bend right]
  133. (1.48,.8)
  134. (1.43,1.4) to[bend right] (2.1,2.5);
  135. node[red, circle, draw, text width=10pt] at (.1,.85) {};
  136. node[blue, circle, draw, text width=10pt] at (1.43,1.4) {};
  137. end{tikzpicture}}
  138.  
  139.  
  140. begin{document}
  141. Without verb|[blank=soft]| on has one path, and the arrow heads are in the
  142. beginning and at the end of the path:
  143.  
  144. jdx
  145.  
  146. Standard Tiemph{k}Z behavior: whenever there is a gap in the path, the arrow
  147. heads are attached at the last stretch.
  148.  
  149. standardz
  150.  
  151.  
  152. The Hobby paths do not behave differently. If you want to add a round line cap
  153. at the beginning, you may just use decorations, which affect the whole path.
  154.  
  155. gapdx
  156.  
  157. end{document}
Add Comment
Please, Sign In to add comment