TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 17 down vote accepted

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

share|improve this answer
2  
Wow, very elegant! – Tom Bombadil Apr 26 '13 at 16:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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