9

Im not sure what the term used for what I want so I will explain it. I want a double long drawn "S" to show that the line in my figure is actually longer than is shown- implying that there is a missing segment in between the two "S"s in the picture. If you look at the output of the diagram below it might make more sense. Looking at the dimensions in the picture, it is obvious that the lines are not drawn to scale, hence I need the lines to contain a break of the form I described above.

EDIT:

Here is a rough example of what I mean, showing the break. I guess the slanted line could also work but the "S" is ideal but should be uniformly thinner than shown in this picture. example

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (4,0.2) -- (8,0.2);
\draw (4,1.8) -- (8,1.8);
\draw[semithick,to-to] (4,2.5) -- +(16,0) node[fill=white,font=\footnotesize] at +(7.75,0) {100 m};          
\draw[semithick,to-to] (4,-1) -- +(8,0) node[fill=white,font=\footnotesize] at +(4.0,0) {10 m};
\end{tikzpicture}
\end{document}
  • Do you have an image you could post of what it should look like? I've seen zigzags used this way but not curved lines. (But it is really out of my field so what I've seen is likely an extremely poor guide to what is used!) – cfr Aug 25 '14 at 19:34
  • Please see my edited question. – Dipole Aug 25 '14 at 19:44
4

We can use the pic environment from PGF 3.0 to define any pattern and just use it as a node wherever we want. Here is an example of a line break of the last pattern as per the OP:

\documentclass[tikz,border=2mm]{standalone}
\tikzset{ext/.pic={
\path [fill=white] (-0.2,0)to[bend left](0,0.1)to[bend right](0.2,0.2)to(0.2,0)to[bend left](0,-0.1)to[bend right](-0.2,-0.2)--cycle;
\draw (-0.2,0)to[bend left](0,0.1)to[bend right](0.2,0.2) (0.2,0)to[bend left](0,-0.1)to[bend right](-0.2,-0.2);
}}
\begin{document}
\begin{tikzpicture}
\path [draw] (0,0)--pic {ext}(0,2);
\path [draw] (1,1)--pic [rotate=90]{ext}(3,1);
\end{tikzpicture}
\end{document}

This gives the following output:

enter image description here

5
\documentclass[tikz,border=5mm]{standalone}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}
\draw (4,0.2) -- node[fill=white,rotate=90,inner sep=-1.25pt,outer sep=0,anchor=center]{$\approx$} (8,0.2);
\draw (4,1.8) -- node[fill=white,rotate=0,inner sep=-2.5pt,outer sep=0]{//} (8,1.8);

\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.