Menu

#454 Support @function attribute in keycap

output: all formats
open
XSL (399)
5
2015-02-24
2012-07-05
No

According to the TDG[1], the keycap element supports a @function attribute. That can hold "special" keys like alt, control, and others. Such a @function attribute makes it easier to make your documentation consistent. For example, you can write this:

Press the <keycap function="control"/> key to ...

However, the DocBook stylesheet currently does not support the @function attribute at all. If you transform your above text you will get:

Press the key to ...

During a discussion[2] on the docbook-apps mailinglist, we discovered the need for a keycap context in our language files.

Please add the context and support this in the keycap template. Thanks!

----- References:
[1] http://www.docbook.org/tdg5/en/html/keycap.html
[2] https://lists.oasis-open.org/archives/docbook-apps/201207/msg00010.html

Discussion

  • Thomas Schraitle

    English language file with keycap context

     
  • Thomas Schraitle

    See the first draft of the keycap context of the uploaded en.xml file. Probably there are better ways to express some keys (for example the backspace). Probably it's also a matter of font support which glyph is available.

    I wasn't sure about the "option" value in @function. Maybe someone can explain that.

     
  • Thomas Schraitle

    keycap context added to gentext/locale/en.xml in revision 9467.

     
  • Thomas Schraitle

    Ok, fixed in revision 9469.

    Current implementation is: If @function is set and keycap is empty, then template will use the content from the keycap context, otherwise it will use just the given text.

    I've tested it in my environment and it worked, but could anyone test it please? Thanks!

     
  • Thomas Schraitle

    A change for this issue has been added to the current codebase.
    Please test the change with the latest snapshot from:

    http://docbook.sourceforge.net/snapshots/

     
  • Thomas Schraitle

    • assigned_to: nobody --> kosek
     
MongoDB Logo MongoDB