Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Keyboard Font for LaTeX

So the result looks like:

Press F5 for help.

I've checked the fancybox package, but it only includes three patterns: doublebox, ovalbox, shadowbox. I need something like buttonbox.

share|improve this question

marked as duplicate by diabonas, ℝaphink, lockstep, Thorsten, Harish Kumar Sep 12 '12 at 12:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

10  
See: How to look up a symbol. In this case, the symbol list shows that you may use the keystroke package: Press \keystroke{F5} for help. –  Stefan Kottwitz Sep 12 '12 at 9:05

3 Answers 3

Maybe a short tikz command can help you to do it

\documentclass[10pt]{article}

\usepackage{tikz}
\usetikzlibrary{shadows}

\tikzstyle{buttonstyle} = [rectangle, fill = black!30, draw = black!80, drop shadow, font={\sffamily\bfseries}, text=white]

\newcommand*{\button}[1]{\tikz{\node[buttonstyle] {#1};}}

\begin{document}
Press \button{F5} for help !
\end{document}

enter image description here

share|improve this answer

It is also possible to get it with pdflatex. I used xelatex (lualatex) in this example:

\documentclass{article}
\usepackage{libertineotf}

\begin{document}
Press \LKeyF{5} for help !
\end{document}

enter image description here

share|improve this answer

Improving a little on Ger's answer:

Code

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{shadows}

\newcommand{\button}[1]%
{   \begin{tikzpicture}[baseline=(tempname.base)]
        \node[draw=gray, fill=yellow!5, rounded corners=0.5pt, inner sep=2pt, minimum width=1.5em, minimum height=1.5em, general shadow={fill=gray!50, shadow xshift=0.5pt, shadow yshift=-0.5pt, shadow scale=1.15}] (tempname) {#1};
    \end{tikzpicture}
}

\begin{document}

\textsc{Count von Count:} There are \button{8}, \button{8} buttons!

\end{document}

Result

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.