Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Hello, > > Rasmus <ras...@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