my blog lives here now
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
3 years ago
7 years ago
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \usepackage{amsmath}
  4. \usepackage{amssymb}
  5. \usepackage{mathrsfs}
  6. \usepackage{tikz}
  7. \usetikzlibrary{matrix}
  8. \usetikzlibrary{calc}
  9. \usetikzlibrary{fit}
  10. \usetikzlibrary{arrows}
  11. \usetikzlibrary{arrows.meta}
  12. \usetikzlibrary{decorations.pathreplacing}
  13. \usepackage{xcolor}
  14. \definecolor{red}{RGB}{235, 77, 75}
  15. \definecolor{blue}{RGB}{9, 123, 227}
  16. \tikzset{
  17. ncbar angle/.initial=90,
  18. ncbar/.style={
  19. to path=(\tikztostart)
  20. -- ($$(\tikztostart)!#1!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztotarget)$$)
  21. -- ($$(\tikztotarget)!($$(\tikztostart)!#1!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztotarget)$$)!\pgfkeysvalueof{/tikz/ncbar angle}:(\tikztostart)$$)
  22. -- (\tikztotarget)
  23. },
  24. ncbar/.default=0.5cm,
  25. }
  26. \tikzset{square left brace/.style={ncbar=0.5cm}}
  27. \tikzset{square right brace/.style={ncbar=-0.5cm}}
  28. \tikzset{round left paren/.style={ncbar=0.5cm,out=120,in=-120}}
  29. \tikzset{round right paren/.style={ncbar=0.5cm,out=60,in=-60}}
  30. \begin{document}
  31. \begin{preview}
  32. \begin{tikzpicture}[auto]
  33. $body$
  34. \end{tikzpicture}
  35. \end{preview}
  36. \end{document}