15

How can I draw curly braces where the "pinch" is not in the middle of brace, i.e. one of the "legs" is longer than the other, using TikZ?

19

You can define a style and use the aspect key (which determines the fraction of the total length where the "middle part" of the brace will be) for the brace decoration:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}

\tikzset{
mybrace/.style={decorate,decoration={brace,aspect=#1}}
}
\begin{document}

\begin{tikzpicture}
\draw[mybrace=0.5] (0,0) -- (3,1);
\draw[mybrace=0.75] (0,1) -- (3,2);
\draw[mybrace=0.25] (0,2) -- (3,3);
\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.