[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [RFC] New "kbd" macro?

From: Rasmus
Subject: Re: [O] [RFC] New "kbd" macro?
Date: Fri, 15 Sep 2017 13:20:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Hello,
> Rasmus <address@hidden> writes:
>> I quite like the fbox look, but it would — perhaps – be rather heavy
>> inline!
>> How about making it a format-string for LaTeX and a separate style for
>> ODT?  Then you could change it on a document-basis if needed.
> Could you elaborate? Where would the format string be specified?
> Also, you need two format strings: one for the whole keybinding, one for
> special keys (respectively @kbd and @key in Texinfo).

You are right, for LaTeX, you would probably want two.  So


would be initiated for org-latex-kdb-format string, which would default to


Whether a key is needed depends on what it exactly entrails.  If each of
"CTRL", "x" and "f" is a key, then perhaps it makes sense to have a
separate formating-string to e.g. denote "\fbox{%s}", allowing output
like, if desired.


> I'm not much into ODT styles, but if you have an example, I will merrily
> add it.

I guess the most straight forward way would be just add a new style to

    <style:style style:name="OrgKbd" style:family="text" 

And output it as,

    <text:span text:style-name="OrgKbd">Ctrl-x-f</text:span>

According to this thread,


LO even supports nested text:span, so it could probably even have a
seperate style for KBD.

    <text:span text:style-name="OrgKbd">
    <text:span text:style-name="OrgKey">Ctrl</text:span>-
    <text:span text:style-name="OrgKey">x</text:span>-
    <text:span text:style-name="OrgKey">f</text:span>

Maybe it’s unnecessary complexity, with little benefit...


Not everything that goes around comes back around, you know

reply via email to

[Prev in Thread] Current Thread [Next in Thread]