Those are the three flowcharts I want to draw, and there are some problems:
How to add the
Dashed BoxandCrossin the third picture.I don't know how to add the rectangle
Bond worth Pin the first picture.
\documentclass[UTF8]{ctexart}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{shapes.geometric, arrows,calc,decorations.markings}
\tikzset{
process/.style={
text width=2.5cm, draw,
minimum height=1.6cm,
text centered,
},
process1/.style={
text width=2.5cm, draw,
minimum height=0.8cm,
text centered,
},
description/.style={
text centered,
text width=10cm,
},
myarrow/.style={
postaction={
decorate, decoration={
markings,mark=at position #1 with {\arrow{Stealth};
}
}
}
},
}
\usepackage{setspace}
\usepackage{etoolbox}
\AtBeginEnvironment{tikzpicture}{\singlespacing}
\begin{document}
\pagestyle{empty}
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Default\\ protection\\ buyer};
\node[process, right=10em of p1] (p2) {Default\\ protection\\ seller};
\draw[-Stealth, line width=1pt] ([yshift=-8ex, xshift=8ex]p2.west) -- node[description, above] {100} ([yshift=-8ex, xshift=-8ex]p1.east);
\draw [-Stealth, line width=1pt]([yshift= 8ex,xshift=0.5cm]$(p1)$) --node[midway] (Rect){}([yshift=8ex,xshift=-.5cm]$(p2)$);
\draw[fill=white] ($(Rect)+(-1.5,-0.7)$)rectangle($(Rect)+(1.5,0.7)$) node[midway] (Text){};
\node at (Text) {\begin{minipage}{3cm}\centering
Bond\\ worth P
\end{minipage}};
\end{tikzpicture}
\end{center}
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Asset Swap\\ Seller};
\node[process, right=8em of p1] (p2) {Asset Swap\\ Buyer};
\node[process1, right=4em of p2] (p3) {Bond};
\draw[-Stealth] ([yshift=2ex]p1.east) -- node[description, above] {C} ([yshift=2ex]p2.west);
\draw[-Stealth] ([yshift=-2ex]p2.west) -- node[description, below] {LIBOR + S} ([yshift=-2ex]p1.east);
\draw[-Stealth] (p3.west) -- node[description, below] {C} (p2.east);
\draw[dashed] ($(p1)+(-1.8,-1)$)rectangle($(p2)+(1.8,1)$);
\draw[ultra thick] ($(p3)+(-1.7,-0.8)$)--($(p3)+(1.7,0.8)$);
\draw[ultra thick] ($(p3)+(-1.7,0.8)$)--($(p3)+(1.7,-0.8)$);
\end{tikzpicture}
\end{center}
\end{document}



\draw [-Stealth, line width=1pt]([yshift= 8ex,xshift=0.5cm]$(p1)$) --node[midway] (Rect){}([yshift=8ex,xshift=-.5cm]$(p2)$); \draw[fill=white] ($(Rect)+(-1.5,-0.7)$)rectangle($(Rect)+(1.5,0.7)$) node[midway] (Text){}; \node at (Text) {\begin{minipage}{3cm}\centeringtwo arrows may have some difference in length, how to set the length here? – A.Oreo Oct 16 '17 at 07:06