
pgf/tikz: Estoy intentando crear un hexágono con una altura fija. Usando el Rectángulo biselado. Puedo convertir el rectángulo en un hexágono, pero cuando intento aplicar la opción de altura mínima parece interferir con la configuración del xsep.
¿Alguien sabe alguna forma de solucionar esto?
Esta es la macro que estoy intentando hacer.
\documentclass[a4paper, 12pt]{report}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{shapes.multipart}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{shapes.arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{matrix}
\newcommand{\Task}[2]{|[chamfered rectangle, chamfered rectangle angle=50, thick, draw, text centered, text width=1.5cm, minimum width=3cm, minimum height=1.3cm, chamfered rectangle xsep=5cm, scale=0.5](#1)|{#2}}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\matrix (grlplay) [matrix of nodes, row sep = 0mm] %grlFlow-row-column
{
&\Task{label}{name} & \\
};
\end{tikzpicture}
\end{figure}
\end{document}
Gracias.
Respuesta1
Si entiendo lo que le gusta tener como forma final, entonces es más fácil de obtener por signal
forma que con chamfered rectangle
. Proporciona un hexágono independiente de la altura del texto deseada:
Para la imagen de arriba, amplié su matriz y cambio la forma de definir sus celdas:
\documentclass[a4paper, 12pt]{report}
\usepackage{tikz}
\usetikzlibrary{arrows,matrix,shapes.symbols}
% for show only figure
\usepackage[active,floats,tightpage]{preview}
\setlength\PreviewBorder{1em}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}[
task/.style = {signal, draw, thick,
signal to=west and east,
text width=22mm, minimum height=9mm, align=center}
]
\matrix (grlplay) [matrix of nodes, row sep = 1mm] %grlFlow-row-column
{
left & \node[task] {name}; & right \\
left & \node[task] {name}; & right \\
};
%\draw[red,->] (grlplay-1-1) -- (grlplay-1-3);
\end{tikzpicture}
\end{figure}
\end{document}