I am using a little TikZ Code to typeset Calculator keys, which works pretty well in general. I only have one problem: when I type just single lines I would like to have the corresponding box as big as the ones with two parts in it.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[]{amsmath}
\setlength{\parskip}{1em}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes,shadows}
\tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=gray!30,drop shadow, text centered, text=black, text width=8mm]
\tikzstyle{fkey}=[rectangle, draw=black, rounded corners, fill=orange,drop shadow, text centered, text=black, text width=8mm]
\tikzstyle{gkey}=[rectangle, draw=black, rounded corners, fill=blue!40,drop shadow, text centered, text=black, text width=8mm]
\newcommand{\mykey}[2]{%
\begin{tikzpicture} \node (Item) [abstract, rectangle split, rectangle split parts=2]{\textbf{\scriptsize{#1}} \nodepart{second}\textbf{\tiny{#2}}};%
\end{tikzpicture}}
\newcommand{\myfkey}{%
\begin{tikzpicture} \node (Item) [fkey, rectangle split, rectangle split parts=2]{\textbf{\footnotesize{f}} \nodepart{second}};%
\end{tikzpicture}}
\newcommand{\mygkey}{%
\begin{tikzpicture} \node (Item) [gkey, rectangle split, rectangle split parts=2]{\textbf{\footnotesize{g}} \nodepart{second}};%
\end{tikzpicture}}
\newcommand{\mynumberkey}[1]{%
\begin{tikzpicture} \node (Item) [abstract]{\textbf{#1}};%
\end{tikzpicture}}
\begin{document}
\mykey{n}{$12x$}
\mykey{SST}{$\Delta \text{DYS}$}
\myfkey
\mygkey
\mykey{Enter}{=}
\mynumberkey{3}
\end{document}
Best Answer
You can simply add, when you define the styles,
minimum height=...
.For example:
in your preamble will lead to: