[Tex/LaTex] short curly braces with tikz

bracestikz-pgf

Is there a way to get curly braces with tikz which look more like this one?
curly brace

At the moment I'm using the following to get curly braces:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\usetikzlibrary{decorations.pathreplacing}

\draw[decorate,decoration={brace,amplitude=0.75cm}]  (0,0) -- (1,0);  
\draw[decorate,decoration={brace]  (0,0) -- (1,0);

\end{tikzpicture}
\end{document}

But that results in:

output curly braces

The point is that I need short curly braces with kind of a high amplitude which still look like braces.

Best Answer

Here is a primitive meta-decoration, but it is not as general as the standard brace such as raise,mirror etc. won't work. However, the brace amplitude and other local brace options are passed and would be available as I tried to show below. The new raise amount is controlled with meta-amplitude key.

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathreplacing}

\pgfdeclaremetadecoration{raisedbrace}{initial}{%
\state{initial}[width=\pgfmetadecoratedpathlength]{%
  \decoration{brace}%
  \pgfsetdecorationsegmenttransformation{%
      \pgftransformyshift{\pgfmetadecorationsegmentamplitude}%
  }
  \beforedecoration{
    \pgfpathmoveto{\pgfpointmetadecoratedpathfirst}
    \pgfpathlineto{\pgfpointadd{%
      \pgfpointmetadecoratedpathfirst%
      }{%
      \pgfpointpolar{\pgfdecoratedangle+90}{\pgfmetadecorationsegmentamplitude}%
      }%
    }%
  }%
  \afterdecoration{%
    \pgfpathlineto{\pgfpointmetadecoratedpathlast}%
    \pgfusepath{stroke}
  }
}
}
\begin{document}
\begin{tikzpicture}
\draw[style=help lines] (-1,-1) grid[step=1cm] (3,3);
\draw[decorate,decoration={raisedbrace,amplitude=2mm,meta-amplitude=4mm}]  (0,1) -- (2,2);  
\draw[decorate,decoration={raisedbrace,amplitude=4mm,meta-amplitude=1cm}]  (0,-1) -- (2,-0.5);
\draw[decorate,decoration={raisedbrace,amplitude=1cm,meta-amplitude=5mm}]  (2,3) -- (2,-0.5);
\end{tikzpicture}
\end{document}

enter image description here