# Chamfered Rectangle and Minimum Text Height

pgf/tikz: I am trying to create a hexagon with a fixed height . Using the chamfered Rectangle. I can turn the rectangle into a hexagon, but when I try to apply the minimum height option it seems to interfere with setting the xsep.

Does anyone know a way around this?

This is the macro I'm trying to make.

\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
{
};
\end{tikzpicture}
\end{figure}
\end{document}


Thankyou.

• Please post a full but minimal example for your question. Also, your command doesn't output anything because this: {|[ is not a proper Tikz command. Maybe you meant {\node[? Feb 19 '16 at 18:41
• @Alenanno done. The { | [ is a valid command. Using matrix means you do not need to constantly write node. Feb 19 '16 at 19:08
• @Zarko hmmm I was under the impression that regular polygon creates one with equal sides? I may be mistaken. I want more of a rectangle with the angled edges. I know I could apply scaling to squish the polygon to the height I'm after, but then the points become over exaggerated. Feb 19 '16 at 19:18
• Only if we know it's supposed to go in a matrix. Feb 19 '16 at 19:18
• @Alenanno I admit I should have included a complete example. However, flat out assuming it was incorrect was still a mistake. By the same strand I could argue \node is invalid because you didn't say I had to put it in tikz environment. Feb 19 '16 at 19:24

If I understand what you like to have as final shape form, than this is easier to obtain by signal shape than with chamfered rectangle. It provide hexagon independent from desired text height:

For above picture I expand your matrix and change the way to define its cells:

\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}[