[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: [org-beamer] \alert
From: |
Eric S Fraga |
Subject: |
Re: [Orgmode] Re: [org-beamer] \alert |
Date: |
Fri, 29 Jan 2010 12:23:32 +0000 |
User-agent: |
Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Fri, 29 Jan 2010 06:26:21 -0500,
Tim Burt wrote:
> Eric S Fraga writes:
> > For any LaTeX expert out there, is there an easy way to determine
> > whether a particular macro has been defined? If so, we wouldn't even
> > need to check for beamer, simply for \alert.
>
> Use the
> \ifx<command>\undefined ... \else ... \fi
> construct to determine if a command already exists, and then to take
> action in the appropriate case. Test the example below both as-is and
> with the first ~\newcommand*{\thisalert}~ commented out to see the
> different results.
[...]
> I hope this is of use,
> Tim
Thanks Tim. Very helpful indeed!
The following org-mode line does the job for me:
#+latex_header: \ifx\alert\undefined\let\alert\textbf\fi
If \alert is not defined, I have =alert= behave as =textbf=.
Alternatively, something like this also works:
#+latex_header: \ifx\alert\undefined\newcommand*{\alert}[1]{\textbf{#1}}\fi
in case one wants more control (e.g. could also change the colour to red).
eric
- [Orgmode] [org-beamer] \alert, Sven Bretfeld, 2010/01/24
- Re: [Orgmode] [org-beamer] \alert, Eric S Fraga, 2010/01/25
- Re: [Orgmode] [org-beamer] \alert, Sven Bretfeld, 2010/01/25
- [Orgmode] Re: [org-beamer] \alert, Sébastien Vauban, 2010/01/26
- Re: [Orgmode] Re: [org-beamer] \alert, Eric S Fraga, 2010/01/26
- Re: [Orgmode] Re: [org-beamer] \alert, Carsten Dominik, 2010/01/28
- Re: [Orgmode] Re: [org-beamer] \alert, Eric S Fraga, 2010/01/29
- Re: [Orgmode] Re: [org-beamer] \alert, Tim Burt, 2010/01/29
- Re: [Orgmode] Re: [org-beamer] \alert,
Eric S Fraga <=
- [Orgmode] Re: [org-beamer] \alert, Sébastien Vauban, 2010/01/29