\documentclass{article}
|
|
\usepackage[pdftex,active,tightpage]{preview}
|
|
\usepackage{amsmath}
|
|
\usepackage{amssymb}
|
|
\usepackage{mathrsfs}
|
|
\usepackage{tikz}
|
|
\usetikzlibrary{matrix}
|
|
\usetikzlibrary{calc}
|
|
\usetikzlibrary{fit}
|
|
\usetikzlibrary{arrows}
|
|
\usetikzlibrary{arrows.meta}
|
|
\usetikzlibrary{decorations.pathreplacing}
|
|
\usepackage{xcolor}
|
|
\definecolor{red}{RGB}{235, 77, 75}
|
|
\definecolor{blue}{RGB}{9, 123, 227}
|
|
|
|
\tikzset{
|
|
ncbar angle/.initial=90,
|
|
ncbar/.style={
|
|
to path=(\tikztostart)
|
|
-- ($$(\tikztostart)!#1!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztotarget)$$)
|
|
-- ($$(\tikztotarget)!($$(\tikztostart)!#1!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztotarget)$$)!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztostart)$$)
|
|
-- (\tikztotarget)
|
|
},
|
|
ncbar/.default=0.5cm,
|
|
}
|
|
|
|
\tikzset{square left brace/.style={ncbar=0.5cm}}
|
|
\tikzset{square right brace/.style={ncbar=-0.5cm}}
|
|
|
|
\tikzset{round left paren/.style={ncbar=0.5cm,out=120,in=-120}}
|
|
\tikzset{round right paren/.style={ncbar=0.5cm,out=60,in=-60}}
|
|
|
|
\begin{document}
|
|
\begin{preview}
|
|
\begin{tikzpicture}[auto]
|
|
$body$
|
|
\end{tikzpicture}
|
|
\end{preview}
|
|
\end{document}
|