You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

4 years ago
////
Included in:
- user-manual: User Interface Macros
////
We are looking for feedback on these macros before setting them in stone.
If you have suggestions, we want to hear from you!
IMPORTANT: You *must* set the `experimental` attribute to enable the UI macros.
=== Keyboard shortcuts
Asciidoctor recognizes a macro for creating keyboard shortcuts using the syntax `+kbd:[key(+key)*]+`.
.Keyboard macro syntax
[source]
----
include::ex-ui.adoc[tag=key]
----
.Result: Keyboard macros displaying common browser keyboard shortcuts
[width="50%"]
include::ex-ui.adoc[tag=key]
You no longer have to struggle to explain to users what keys they are supposed to press.
=== Menu selections
Trying to explain to someone how to select a menu item can be a pain.
With the `menu` macro, the symbols do the work.
.Menu macro syntax
[source]
----
include::ex-ui.adoc[tag=menu]
----
The instructions in the example above appear below.
.Result: Menu macros displaying menu selections
====
include::ex-ui.adoc[tag=menu]
====
=== UI buttons
It can be equally 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!
.Button macro syntax
[source]
----
include::ex-ui.adoc[tag=button]
----
.Result: Button macros displaying UI buttons
====
include::ex-ui.adoc[tag=button]
====