From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [RFC] New "kbd" macro?
Date: Fri, 15 Sep 2017 13:20:16 +0200 [thread overview]
Message-ID: <878thg8az3.fsf@gmx.us> (raw)
In-Reply-To: 877ex0e07e.fsf@nicolasgoaziou.fr
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Rasmus <rasmus@gmx.us> 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
{{{kbd(CTRL-x-f)}}}
would be initiated for org-latex-kdb-format string, which would default to
\texttt{%s}
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.
\texttt{\fbox{Ctrl}-\fbox{x}-\fbox{f}}
> 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
OrgOdtStyles.xml,
<style:style style:name="OrgKbd" style:family="text" style:parent-style-name="Source_20_Text"/>
And output it as,
<text:span text:style-name="OrgKbd">Ctrl-x-f</text:span>
According to this thread,
https://lists.freedesktop.org/archives/libreoffice/2011-November/021281.html
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>
</text:span>
Maybe it’s unnecessary complexity, with little benefit...
Rasmus
--
Not everything that goes around comes back around, you know
next prev parent reply other threads:[~2017-09-15 11:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 13:22 [RFC] New "kbd" macro? Nicolas Goaziou
2017-09-13 14:03 ` Kaushal Modi
2017-09-13 14:05 ` Kaushal Modi
2017-09-13 19:25 ` Nicolas Goaziou
2017-09-14 4:45 ` Marcin Borkowski
2017-09-14 13:49 ` Oleh Krehel
2017-09-13 19:24 ` Eric S Fraga
2017-09-14 8:07 ` Rasmus
2017-09-14 22:02 ` Nicolas Goaziou
2017-09-15 7:36 ` Rasmus
2017-09-15 10:16 ` Nicolas Goaziou
2017-09-15 11:20 ` Rasmus [this message]
2017-09-15 11:52 ` Nicolas Goaziou
2017-09-15 12:54 ` Kaushal Modi
2017-09-15 13:08 ` Kaushal Modi
2017-09-15 15:53 ` Nicolas Goaziou
2017-09-17 7:20 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878thg8az3.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.