9

Since computers are around for quite a while now and menues turned out a success as user interface elements, I’m wondering whether there were efforts made to standardize a certain way of punctuation in menu instruction sequences used in manuals/guides/tutorials. I think the first one on this list of alternatives is the most used notation:

Settings -> Show all -> Interface -> Hotkeys settings

Settings > Show all > Interface > Hotkeys settings

Settings \ Show all \ Interface \ Hotkeys settings

Settings → Show all → Interface → Hotkeys settings

I guess the last one would be the preferred one, but the arrow → is not easily available with regular keyboard settings.

Lenar Hoyt
  • 1,629

1 Answers1

7

I am of the opinion that this is based on user preference. As such, there are many options at your disposal and it depends on the flavour you're interested in. Personally I prefer options two (>) and four ().

However, menukeys provides an easy way to switch between formats. Here's an example taken directly from the menukeys documentation where you can also find other ideas for tweaking the output:

enter image description here

\documentclass{article}
\usepackage{menukeys}% http://ctan.org/pkg/menukeys
\begin{document}
To set the unit of the rulers go to \menu{Extras > Settings > Rulers}
and choose between millimetres, inches and pixels. The short cut
to view the rulers is \keys{cmd + R}. Pressing these keys again
will hide the rulers.
The standard path for saving your document is \directory{Macintosh HD/Users/
Your Name/Documents} but you can change it at \menu{Extras > Settings
> Saving} by clicking \menu{Change save path}.
\end{document}

A less graphical way of dealing with this could be via a standard list-processing package like etoolbox:

enter image description here

\documentclass{article}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\newcommand{\menu}[2][ $\rightarrow$ ]{% \menu[<separator>]{<csv list>}
  \def\listitemsep{\def\listitemsep{#1}}% Delayed definition of list item separator
  \renewcommand*{\do}[1]{\listitemsep\textsf{##1}}% Item format
  \docsvlist{#2}% Process list
}
\newcommand{\keys}{\fbox}
\newcommand{\directory}{\texttt}
\begin{document}
To set the unit of the rulers go to \menu{Extras, Settings, Rulers}
and choose between millimetres, inches and pixels. The short cut
to view the rulers is \keys{cmd + R}. Pressing these keys again
will hide the rulers.
The standard path for saving your document is \directory{Macintosh HD/Users/%
Your Name/Documents} but you can change it at \menu{Extras,Settings,
Saving} by clicking \menu{Change save path}.
\end{document}

The above code uses a delayed definition of the list item separator to accommodate only setting separators between elements.

Of course, expl3 provides similar list-processing capabilities using xparse.

Werner
  • 603,163