On 10/18/2011 01:18 PM, Wei-Dong Lian wrote: > Hello, > > I have a small problem in using the pgf codes. In beamer, I need to > define some animations operations, examples \only<1->{pgf code}. > However, for my article document, I do not want to invoke the > animation operations codes. I wonder if we can determine the document > type, if it is beamer, then include the animations codes, otherwise > suppress these codes. As such, the pgf codes are applicable to both > beamer and article document type. Otherwise, one will maintain two > versions of the same file. It is a bit ugly. > Does someone know how to determine the current document type to > suppress some unrelated codes for a certain document type. > You can't do this without using more TeX code. In TeX code, you can test for some macro that is only defined in one of the two classes.
In LyX, though, you could instead use branches. Richard