In beamer v3.0 guide (slide 121) , I've found:

In case of subtle differences in the heights of replacements, overlayarea and overprint environments can be used.

But it's not clear to me.

What are differences between \only and \onslide in Beamer ?

How to decide, which to choose in particular case?


In short, \only<>{} does not render the braced material at all except on the named slides, while \onslide<> renders the material until the next \onslide, sort of like an \item, but, on the off slides, covers it (according to the preference given in \setbeamercovered; i.e. transparent or invisible). There are other alternatives, for example, \uncover<>{}, which functions like \only but acts like \onslide; i.e. takes a specific chunk of text and covers or uncovers it as appropriate.

There are some circumstances where they work differently. For example, using \onslide in one of the amsmath equation environments (I have found) produces horrible bugs:

 a & \onslide<+-> b % Bad
 a & \uncover<+->{b}% Good

Presumably this is because align does what the manual calls "wicked things" in processing its contents.

You also ask about the overlayarea and overprint environments; these are fancy versions of \uncover and \onslide respectively, that reserve the space for an entire sequence of uncoverings. The overprint environment does so automatically but only allows you to uncover in an "itemized" fashion by using \onslide successively, and the overlayarea environment requires you to say exactly the size of the overlay area but allows you to use any Beamer constructs inside; it will then produce the requisite number of slides with various material appearing in that area (including necessary empty space) on each one.

| improve this answer | |
  • 1
    Why are there 4 ways to write same thing-- \only, \onslide, \uncover, \visible ? (are there instances where onslide works but others fail?) – Cyriac Antony Dec 18 '19 at 11:09
  • one can use aligned instead of align – minmax Jul 29 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.