OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] keycap vs keysym


On 24/09/2007, Dave Pawson <davep@dpawson.co.uk> wrote:
> C-x w r    means  unhighlight-regexp
>
> <keycombo> seems wrong with the combinations?
> <keycombo>C-x</keycombo><userinput>w r</

You can use the action attribute of keycombo to distinguish between
sequences of keys and keys pressed together. So this could be written
as:

  <keycombo action="seq">
    <keycombo action="simul">
      <keycap function="control">Ctrl</keycap>
      <keycap>x</keycap>
    </keycombo>
    <keycap>w</keycap>
    <keycap>r</keycap>
  </keycombo>

> Less sure about this. revert-buffer isn't a command...
> This is why I mentioned <userinput>... except you
> can't have userinput within keycombo, so it would
> need to be external, i.e. not in the same wrapper.

You could use <keycombo action="seq"> as above, since the user has to
press r, e, v, etc in sequence, but it would be good to use different
markup for a sequence of conceptually separate keys (as in C-x w r)
and for a sequence where you're typing a word. This distinction is
useful for presentation as well as semantics - normally in Emacs
documentation you see spaces between keys in sequences like "C-x w r"
but not between letters in command names like "M-x revert-buffer". You
could use something like <keycombo action="other" otheraction="type">
where the meaning of the otheraction attribute is defined by the user
or style sheet. But if you're treating the sequence "revert-buffer" as
a keycombo you should probably have a separate keycap element for each
letter, which is a bit cumbersome. I would probably use something
like:

  <phrase>
    <keycombo action="simul">
      <keycap action="meta">Meta</keycap>
      <keycap>x</keycap>
    </keycombo>
    <function>revert-buffer</function>
  </phrase>

Although maybe there's a better wrapping element than phrase. I used
the function element for "revert-buffer" since it's an Emacs Lisp
function, but maybe command or userinput would also be appropriate.

> Also, emacs has this idea that Meta X is written M-x
> Control X is written C-X to indicate that they
> are pressed together?
> Is the hyphen 'styling' (i.e. introduce at the xslt stage?)

I'd say it is. Then you can use different style sheet settings or
customisations depending on the conventions for the documentation
you're producing. The key combination of control and X together could
be written as "C-x", "Ctrl-X", "Control+X", "^X", etc and it seems to
me that the markup should be the same and the rendering governed by
the style sheet.

Hope this helps,

Andy


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]