Tikz Bibliothek calc und mybox
Wieso ist die rote Linie nicht im Dreieck?
\documentclass[headheight=19pt]{scrartcl}
%------------------------------------------------------------------------------
\usepackage[ngerman]{babel}
\usepackage{tikz}
\usepackage[norndcorners,customcolors,nofill]{hf-tikz}
\usetikzlibrary{calc}
%------------------------------------------------------------------------------
\tikzset{
winkel/.style={draw=gray,angle eccentricity=.6,angle radius=0.6cm},
mybox/.style={draw=gray,fill=white,align=left,text width=.9\linewidth}
}
\newbox\mytikzbox
\newcommand{\tikzBox}[2][\mytikzbox]{%
\sbox#1{\pgfinterruptpicture#2\endpgfinterruptpicture}}
%------------------------------------------------------------------------------
\usepackage{blindtext}% für Fülltext
\begin{document}
\begin{center}
\begin{tikzpicture}
\tikzBox{%
\tikz[auto]
\draw
(2.5,0) coordinate[label=right:B] (B)
-- node{$c$}
(-1,0) coordinate[label=left:A] (A)
-- node{$b$}
(2,2) coordinate[label=above right:C] (C)
-- node{$a$}
cycle
;
\draw[red]
(2,2)
--node[swap]{$h$}
($(A)!(C)!(B)$)% Lot von C auf die Strecke AB
;
}
\node[mybox,rounded corners,font=\bfseries]
{\parbox[t]{.6\linewidth}{%
Blub
}%
\parbox[t]{.5\linewidth}{\centering%
\raisebox{\dimexpr-\height+\ht\strutbox\relax}{\usebox\mytikzbox}}};
\end{tikzpicture}
\end{center}
\end{document}