emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: add entries to *emphasis-alist
Date: Fri, 17 Aug 2012 21:01:00 +0200	[thread overview]
Message-ID: <80vcghuyvn.fsf@somewhere.org> (raw)
In-Reply-To: 20120817122605.GA6624@desktop

Hi Philipp,

Philipp Kroos wrote:
> 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@

You have to make that customization *before* loading Org in your .emacs file.
Weird, never really understood why, but that's like that.

Best regards,
Seb

-- 
Sebastien Vauban

  reply	other threads:[~2012-08-17 19:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 12:26 add entries to *emphasis-alist Philipp Kroos
2012-08-17 19:01 ` Sebastien Vauban [this message]
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=80vcghuyvn.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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 public 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).