all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to add more markups and formatting for markups to Org
@ 2015-05-31 15:43 Tu, Do
  2015-05-31 16:25 ` Suvayu Ali
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tu, Do @ 2015-05-31 15:43 UTC (permalink / raw
  To: help-gnu-emacs

For example, anything in between *...* is bold by default. I want to add a markup with my own formatting for such markup, i.e. <kbd>...</kbd> with a box surrounds such markup. I also want the mark up to be compatible with (setq org-hide-emphasis-markers t). That is, when the variable is set to t, the <kbd> and </kbd>tags should disappear, leaving the text between it with the specified formatting above.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add more markups and formatting for markups to Org
  2015-05-31 15:43 How to add more markups and formatting for markups to Org Tu, Do
@ 2015-05-31 16:25 ` Suvayu Ali
  2015-05-31 18:41 ` Drew Adams
  2015-05-31 23:52 ` Rasmus
  2 siblings, 0 replies; 4+ messages in thread
From: Suvayu Ali @ 2015-05-31 16:25 UTC (permalink / raw
  To: help-gnu-emacs

On Sun, May 31, 2015 at 08:43:35AM -0700, Tu, Do wrote:
> For example, anything in between *...* is bold by default. I want to add a markup with my own formatting for such markup, i.e. <kbd>...</kbd> with a box surrounds such markup. I also want the mark up to be compatible with (setq org-hide-emphasis-markers t). That is, when the variable is set to t, the <kbd> and </kbd>tags should disappear, leaving the text between it with the specified formatting above.

See: (describe-variable (quote org-emphasis-alist))

Note, I do not think sequence of characters are allowed, only single
characters.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: How to add more markups and formatting for markups to Org
  2015-05-31 15:43 How to add more markups and formatting for markups to Org Tu, Do
  2015-05-31 16:25 ` Suvayu Ali
@ 2015-05-31 18:41 ` Drew Adams
  2015-05-31 23:52 ` Rasmus
  2 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2015-05-31 18:41 UTC (permalink / raw
  To: Tu, Do, help-gnu-emacs

> For example, anything in between *...* is bold by default. I want to
> add a markup with my own formatting for such markup, i.e.
> <kbd>...</kbd> with a box surrounds such markup. I also want the
> mark up to be compatible with (setq org-hide-emphasis-markers t).
> That is, when the variable is set to t, the <kbd> and </kbd>tags
> should disappear, leaving the text between it with the specified
> formatting above.

Also at http://emacs.stackexchange.com/q/12814/105, for those
who might be interested.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add more markups and formatting for markups to Org
  2015-05-31 15:43 How to add more markups and formatting for markups to Org Tu, Do
  2015-05-31 16:25 ` Suvayu Ali
  2015-05-31 18:41 ` Drew Adams
@ 2015-05-31 23:52 ` Rasmus
  2 siblings, 0 replies; 4+ messages in thread
From: Rasmus @ 2015-05-31 23:52 UTC (permalink / raw
  To: help-gnu-emacs

Hi,

"Tu, Do" <solidius4747@gmail.com> writes:

> For example, anything in between *...* is bold by default. I want to
> add a markup with my own formatting for such markup,
> i.e. <kbd>...</kbd> with a box surrounds such markup. I also want the
> mark up to be compatible with (setq org-hide-emphasis-markers t). That
> is, when the variable is set to t, the <kbd> and </kbd>tags should
> disappear, leaving the text between it with the specified formatting
> above.

The org format has a fixed number of supported types.  From the context,
it seems like you have a case in mind where you export to html.

Try (with-temp-buffer (insert "a *b*") (org-element-context)).  As you see
it's bold.  When exporting to html, it's transcoded via org-html-bold.
Thus, adding new markup the way you want in non-trivial as you have to add
it to both org-element and the export backend, e.g. ox-html.

For your case, I'd use a macro:

#+macro: kbd @@html:<kbd>@@$1@@html:</kdb>@@
{{{kbd(my-key)}}}

See also org-hide-macro-markers and font-lock-add-keywords for changing
the face.

Rasmus

-- 
This message is brought to you by the department of redundant departments




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-31 23:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-31 15:43 How to add more markups and formatting for markups to Org Tu, Do
2015-05-31 16:25 ` Suvayu Ali
2015-05-31 18:41 ` Drew Adams
2015-05-31 23:52 ` Rasmus

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.