From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [RFC] New "kbd" macro? Date: Fri, 15 Sep 2017 13:20:16 +0200 Message-ID: <878thg8az3.fsf@gmx.us> References: <87377qpwc7.fsf@nicolasgoaziou.fr> <87a81xn1oh.fsf@gmx.us> <87lglhj5vj.fsf@nicolasgoaziou.fr> <87mv5w8lbr.fsf@gmx.us> <877ex0e07e.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsofk-00044e-7H for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 07:20:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsofg-0001Pw-8i for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 07:20:36 -0400 Received: from [195.159.176.226] (port=33893 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsofg-0001Mw-2V for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 07:20:32 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dsofW-0001Sr-7P for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 13:20:22 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > Rasmus 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, And output it as, Ctrl-x-f 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. Ctrl- x- f Maybe it’s unnecessary complexity, with little benefit... Rasmus -- Not everything that goes around comes back around, you know