From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: add entries to *emphasis-alist Date: Fri, 17 Aug 2012 21:01:00 +0200 Message-ID: <80vcghuyvn.fsf@somewhere.org> References: <20120817122605.GA6624@desktop> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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 "" "")))) > (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