emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Philipp Kroos <Philipp.Kroos@t-online.de>
To: emacs-orgmode@gnu.org
Subject: add entries to *emphasis-alist
Date: Fri, 17 Aug 2012 14:26:05 +0200	[thread overview]
Message-ID: <20120817122605.GA6624@desktop> (raw)

Hi,

is it still possible to add items to the emphasis alists?
I'm preparing a presentation with orgmode/beamer and try to get a markup 
for alert using '@'.
According to some (old..) thread 
(http://lists.gnu.org/archive/html/emacs-orgmode/2010-01/msg00592.html)
I added an entry to org-emhasis-alist and
org-export-latex-emphasis-alist, see below.
Unfortunately, this is not working, '@noise@' is exported to '@noise@' 
literally.
I had a quick look at the source in org-latex.el and if I understand it 
correctly, the fontification is done in org-export-latex-fontify 
according to matches with org-emph-re, defined in org.el. But 
org-emph-re doesn't match with '@'- consequently, the markup is ignored.  

So do I have to redefine org-emph-re as well or is there any other trick?
I'm using the current org from git.

Thanks all!


;; this is how I add the entries to the lists
  (setq org-emphasis-alist
        (append org-emphasis-alist
                '(("@" org-warning "<b>" "</b>"))))
  (setq org-export-latex-emphasis-alist
        (append org-export-latex-emphasis-alist
                '(("@" "\\alert{%s}" nil))))

;; this is a minimal example
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_FRAME_LEVEL: 1

* Testsection
** with some important @noise@

             reply	other threads:[~2012-08-17 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 12:26 Philipp Kroos [this message]
2012-08-17 19:01 ` Sebastien Vauban
2012-08-17 19:50   ` Nick Dokos
2012-08-19 11:01     ` Philipp Kroos
2012-08-19 11:38       ` Nicolas Goaziou
2012-08-19 12:53         ` Philipp Kroos
2012-08-19 15:25           ` Bastien

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120817122605.GA6624@desktop \
    --to=philipp.kroos@t-online.de \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: add entries to *emphasis-alist' \
    /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

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).