From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Burt Newsgroups: gmane.emacs.orgmode Subject: Re: Re: [org-beamer] \alert Date: Fri, 29 Jan 2010 06:26:21 -0500 Message-ID: <19298.50653.520318.554207@nitrogen.burtket> 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> Reply-To: tcburt@rochester.rr.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1264764441 19411 80.91.229.12 (29 Jan 2010 11:27:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2010 11:27:21 +0000 (UTC) Cc: =?utf-8?Q?S=C3=A9bastien?= Vauban , emacs-orgmode@gnu.org, Carsten Dominik To: e.fraga@ucl.ac.uk Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Fri Jan 29 12:27:18 2010 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nap0Q-0004nI-DL for geo-emacs-orgmode@m.gmane.org; Fri, 29 Jan 2010 12:27:18 +0100 Original-Received: from localhost ([127.0.0.1]:58228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nap0P-00021I-Qo for geo-emacs-orgmode@m.gmane.org; Fri, 29 Jan 2010 06:27:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Naozf-00021D-4f for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 06:26:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Naoza-00020u-1s for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 06:26:29 -0500 Original-Received: from [199.232.76.173] (port=54379 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaozZ-00020r-S0 for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 06:26:25 -0500 Original-Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:50437) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NaozZ-0003g3-Hw for emacs-orgmode@gnu.org; Fri, 29 Jan 2010 06:26:25 -0500 X-Authority-Analysis: v=1.0 c=1 a=Ffsxck7hI4YA:10 a=mDV3o1hIAAAA:8 a=OkbQV8XCMw5F77NJvP0A:9 a=Y29nKWfp5NIr8H9BU2rcaKJdDcAA:4 a=Crymp4H7HvEA:10 a=ii61gXl28gQA:10 X-Cloudmark-Score: 0 X-Originating-IP: 66.66.26.230 Original-Received: from [66.66.26.230] ([66.66.26.230:48368] helo=nitrogen.burtket) by hrndva-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id 02/B4-09114-ED5C26B4; Fri, 29 Jan 2010 11:26:23 +0000 In-Reply-To: <87hbq5z1tg.wl%ucecesf@ucl.ac.uk> X-Mailer: VM 8.0.12 under 22.2.1 (i486-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-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 Xref: news.gmane.org gmane.emacs.orgmode:21776 Archived-At: X-Import-Rejected-Reason: Exception: 'utf-8' codec can't encode characters in position 1-2: surrogates not allowed Eric S Fraga writes: > At Thu, 28 Jan 2010 18:58:38 +0100, > Carsten Dominik wrote: > > [...] > > > > > Is there a LaTeX command that can figure out if it is running a beamer > > class? > > If yes, a possible solution would be to redefine \alert in LaTeX when > > not doing BEAMER. > > > > - Carsten > > > > This must be possible but my latex (and tex) programming capabilities > are even worse than my elisp... :( > > 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\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. : \documentclass{article} : \newcommand*{\thisalert}{Do this.} : % Test for existence of \thisalert. : % Create or modify the command accordingly. : \ifx\thisalert\undefined% : \newcommand*{\thisalert}{Do that.}% : \else% : \renewcommand*{\thisalert}{Do this differently.} : \fi : \begin{document} : : \thisalert : : \end{document} I hope this is of use, Tim > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode