Given a frame that has code rendered in a \begin{lstlisting}...\end{lstlisting} environment, is it possible to use beamer's incremental frame building feature to highlight code snippets?

Here is an example of what I would like to use:

x = y \alert<2->{// Assigns the value of y to x.}

You can do this although you don't get the listings formatting inside the alert, but perhaps that's OK for comments..

enter image description here


x = z // Assigns the value of y to x.
x = y `\alert<2->{// Assigns the value of y to x.}'

| improve this answer | |

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.