Muy bien, me rindo. Quiero un nodo personalizado que se parezca a un símbolo común de turbina o compresor PI&D:
\tikzset{TC/.style={
minimum height=2cm,
minimum width=2cm,
path picture={
\draw (-1,0.5) -- (1,1) -- ++ (0,-2) -- (-1,-0.5) -- cycle;
},
node contents={}
}
}
Ahora me gustaría agregar texto personalizado allí, como "HP\ Turb". Sin embargo, siempre se superpone a los bordes y nunca se alinea:
\tikzset{TC/.style={
minimum height=2cm,
minimum width=2cm,
text height=0.8cm,
text width=1.8cm,
align=center,
path picture={
\draw (-1,0.5) -- (1,1) -- ++ (0,-2) -- (-1,-0.5) -- cycle;
},
node contents={#1}
}
}
Casi todo está apagado:
¿Qué estoy haciendo mal? Editar: También me encantaría tener anclajes en cada esquina y en el medio de cada borde. ¿Cómo puedo lograr eso?
Respuesta1
Le sugiero que utilice la forma de nodo incorporada trapezium
(requiere shapes.geometric
biblioteca).
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\tikzset{mynode/.style={draw, trapezium, trapezium angle=70, trapezium stretches=true, minimum height=2cm, minimum width=2cm, shape border rotate=90, align=center}}
\begin{document}
\begin{tikzpicture}
\node[mynode] at (0,0){HP\\Turb};
\end{tikzpicture}
\end{document}