Button and Menu UI Macros

You must set the experimental attribute to enable the UI macros.
In order to use the UI macros, you must set the experimental document attribute. Although this attribute is named experimental, the UI macros are considered a stable feature of the AsciiDoc language. The requirement to specify the attribute is merely an optimization for the processor.

Button macro syntax

It can be difficult to communicate to the reader that they need to press a button. They can’t tell if you are saying “OK” or they are supposed to look for a button labeled OK. It’s all about getting the semantics right. The btn macro to the rescue!

Example 1. Using the button macro syntax
Press the btn:[OK] button when you are finished.

Select a file in the file navigator and click btn:[Open].

The result of Example 1 is displayed below.

Press the OK button when you are finished.

Select a file in the file navigator and click Open.

Trying to explain how to select a menu item can be a pain. With the menu macro, the symbols do the work.

Example 2. Using the menu macro syntax
To save the file, select menu:File[Save].

Select menu:View[Zoom > Reset] to reset the zoom level to the default setting.

The instructions in Example 2 appear below.

To save the file, select File  Save.

Select View  Zoom  Reset to reset the zoom level to the default setting.