diff options
author | Kaz Kylheku <kazkylheku@vtech.ca> | 2021-04-13 21:15:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-13 21:15:04 -0700 |
commit | d2bcf2d01c52b23fea69b1492d437404eb67f7ff (patch) | |
tree | 3c843f5e1e4cc29b2d63646bac77128008b4dc6b /genman.txr | |
parent | f9725ac8e3ec93e94b392119cb3b1d1b992943d6 (diff) | |
download | txr-d2bcf2d01c52b23fea69b1492d437404eb67f7ff.tar.gz txr-d2bcf2d01c52b23fea69b1492d437404eb67f7ff.tar.bz2 txr-d2bcf2d01c52b23fea69b1492d437404eb67f7ff.zip |
doc: implement typesetting of keystrokes.
This commit relies on parallel improvements
in man2html, up through commit
ac186529b6b5f80906c3215a67c98505db7bb156
"Implement .M2HT request for HTML passthrough."
* genman.txr: Add CSS block targetting the kbd element,
providing 3D styling for keyboard input.
* txr.1: Define two new macros, .key and .keyn.
These are defined in three different ways: in man page
output, we put square brackets around keystrokes.
In typeset groff output, we put a square border around
them using a box macro cribbed from groff documentation.
In HTML, we use .M2HT to wrap a <kbd> tag around the
keystrokes. Documentatio is updated to use these macros
for all keystrokes. We no longer separate keystroke
sequence elements with commas.
Diffstat (limited to 'genman.txr')
-rw-r--r-- | genman.txr | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -194,6 +194,18 @@ dl.items dt { float: left; padding-right: 1ex; } +kbd { + background-color: #eee; + border-radius: 3px; + border: 1px solid #b4b4b4; + box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset; + color: #333; + display: inline-block; + font-weight: 700; + line-height: 1; + padding: 2px 4px; + white-space: nowrap; +} </style> <script type="text/javascript"> var xpanded = false; |