[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org + beamer: How to get @Š@ to create \alert?

From: Nicolas Goaziou
Subject: Re: [O] org + beamer: How to get @Š@ to create \alert?
Date: Wed, 02 May 2012 13:39:24 +0200


Nick Dokos <address@hidden> writes:

> Richard Stanton <address@hidden> wrote:
>> I've just started using orgmode to create Beamer presentations, and have a
>> question.
>> In the worg documentation
>> (http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html), it gives
>> an example of how enclosing text in "@" signs is supposed to result in
>> highlighted red text. When I try it, I get text surrounded by two "@"
>> signs...
>> Following suggestions from this list back in 2010, I tried customizing
>> org-export-latex-emphasis-alist to
>> Value: (("*" "\\textbf{%s}" nil)
>>  ("/" "\\emph{%s}" nil)
>>  ("_" "\\underline{%s}" nil)
>>  ("+" "\\st{%s}" nil)
>>  ("=" "\\protectedtexttt" t)
>>  ("~" "\\verb" t)
>>  ("@" "\\alert{%s}" nil))
>> but this doesn't seem to help either.
>> Can anyone tell me how to get this working?
> You also need to customize org-emphasis-alist.
> <soapbox>
> Not sure whether this qualifies as a bug or not. It probably does but
> even so, it's unlikely to be fixed and that's probably a *good* thing:
> IMNSHO, these interfaces are about the clunkiest to be found in org: they
> are very "heavy" for the result they produce.
> I hope the new exporter will clean up this area, even at the price of
> backward incompatibility (says he, knowing that any such will not affect
> him :-])

More or less. Markers are hard coded in the parser. For example, *text*
is parsed as (bold (... some properties...) "text") without looking at

Then, it's up to each exporter to produce something meaningful with
`bold', `italic' `underline', `strike-through', `code' and `verbatim'
markup. For a beamer back-end (which is not written yet), I'd suggest to
treat `bold' as "\\alert{%s}", for example.

Unfortunately, the parser assumes `org-emph-re' is a defconst. I'd like
to remove dependency on that variable anyway, but it's difficult to
create a perfect test. For example, the following one is a bit naive:

#+begin_src emacs-lisp
(and (save-excursion
       (if (bolp) (looking-at "\\*\\w")
         (looking-at "\\W\\*\\w")))
       (re-search-forward "\\w\\*\\(\\W\\|$\\)" paragraph-limit t)))


Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]