Is it possible to define in TikZ a new decoration or something like that, such that it is possible to write something like:
\draw[dim={text,above}] (A) -- (B);
\draw[dim={text,below}] (C) -- (D);
or even better
\draw (A) dim[text,above] (B);
\draw (C) dim[text,below] (C);
to get something like this:
It's important that the text is sloped.
If possible I would prefer the second syntax, because then I could easily combine such path's:
\draw (A) dim[text,above] (B) -- (C) -- (D) dim[text] (E) dim[text,below] (F) -- circle;
Best Answer
Update
The result looks fine but perhaps the code can be improved.
Update : possible with
edge