0

For the sake of this question I have created the following small example to reproduce the issue I am asking about.

\documentclass[a4paper]{article}
\usepackage{parskip}
\usepackage[os=win]{menukeys}

\begin{document}
\keys{a} \keys{b}\\
\keys{A} \keys{B}\\
\keys{<} \keys{>}
\end{document}

I would like to synthesize the < and > character as a key press using \keys{}. However, I am not talking about the cursor keys here. I mean the smaller than and greater than keys which can be accessed by using the Shift+, and Shift+. sequence on a US-English keyboard.

The above example produces this:

erratic menukeys behavior

Edit: I'd like to add the ~ key to the list of problematic characters which won't render inside \keys{}.

2
\documentclass[a4paper]{article}
\usepackage{parskip}
\usepackage[os=win]{menukeys}
\usepackage[T1]{fontenc}
\begin{document}
\keys{a} \keys{b}\\
\keys{A} \keys{B}\\
\keys{<} \keys{>}
\end{document}
1

To add the ~, you can try to create your own tilde and use it inside \keys.

\documentclass[a4paper]{article}
\usepackage{parskip}
\usepackage[os=win]{menukeys}
\usepackage[T1]{fontenc}

\newcommand{\til}{{\raise.17ex\hbox{$\scriptstyle{\sim}$}}}

\begin{document}
\keys{\til} \keys{\til}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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