From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: [org-beamer] \alert Date: Mon, 1 Feb 2010 17:18:39 +0100 Message-ID: <67C523EF-35DE-4180-8C0B-8DD4D0FEE9FD@gmail.com> References: <871vhffhf8.fsf@gmx.ch> <87pr4y1me5.wl%ucecesf@ucl.ac.uk> <877hr4zz0s.fsf@mundaneum.com> <87k4v4omyk.wl%ucecesf@ucl.ac.uk> <91C8F5F5-83A0-4041-B941-5DA51B3CD3C4@gmail.com> <87hbq5z1tg.wl%ucecesf@ucl.ac.uk> <19298.50653.520318.554207@nitrogen.burtket> <87aavxrtff.wl%ucecesf@ucl.ac.uk> <87vdek53e8.fsf@mundaneum.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NbzpM-00067B-LU for emacs-orgmode@gnu.org; Mon, 01 Feb 2010 12:12:44 -0500 Received: from [199.232.76.173] (port=35849 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbzpM-00066W-3v for emacs-orgmode@gnu.org; Mon, 01 Feb 2010 12:12:44 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NbzpI-0005oy-8h for emacs-orgmode@gnu.org; Mon, 01 Feb 2010 12:12:43 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:35949) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NbzpH-0005o4-Pz for emacs-orgmode@gnu.org; Mon, 01 Feb 2010 12:12:40 -0500 Received: by ewy28 with SMTP id 28so2524061ewy.8 for ; Mon, 01 Feb 2010 09:12:34 -0800 (PST) In-Reply-To: <87vdek53e8.fsf@mundaneum.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?ISO-8859-1?Q?S=E9bastien_Vauban?= Cc: emacs-orgmode@gnu.org On Jan 29, 2010, at 4:36 PM, S=E9bastien Vauban wrote: > Hi Eric, Tim, Carsten and all, > > Eric S Fraga wrote: >> 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 =20= >>>> whether >>>> a particular macro has been defined? If so, we wouldn't even need =20= >>>> to check >>>> for beamer, simply for \alert. >>> >>> Use the >>> \ifx\undefined ... \else ... \fi >>> construct to determine if a command already exists, and then to =20 >>> take action >>> in the appropriate case. Test the example below both as-is and =20 >>> with the >>> first ~\newcommand*{\thisalert}~ commented out to see the different >>> results. > > Thanks to all. This is great stuff... > > >> 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 =3Dalert=3D behave as =3Dtextbf=3D. > > Could this somehow made part of Org-mode, so that one does not need =20= > to repeat > this one-liner in every file that could be exported to pure LaTeX =20 > and/or > Beamer? Yes - this is in there now. Let's see if someone complains. - Carsten