여러 부분으로 구성된 문제가 포함된 강의 슬라이드가 있습니다. 학생들이 전체 문제를 보고 단계별로 답변을 작성할 수 있었으면 좋겠습니다. 채우고 있는 내용이 멋진 작은 덩어리로 나누어질 수 있는 한 이는 가능합니다.
\documentclass{beamer}
\begin{document}
\begin{frame}\onslide<+->{}
This problem has three parts.
\begin{enumerate}
\item What is the answer to part 1?\\
\onslide<+->{First interpret the question.}\onslide<+->{ Then do some work.}\onslide<+->{ Now we can answer the question, and the answer is} \onslide<+->{ 42.}
\item What is the answer to part 2?\\
\onslide<+->{This problem is easy, and the answer is }\onslide<+->{0.}
\item What is the answer to part 3?\\
\onslide<+->{You'll have to figure this one out for yourself.}
\end{enumerate}
\end{frame}
\end{document}
\onslide<+->
이 솔루션은 상당히 우아합니다( 카운터를 증가시키는 초기 방법을 제외하면 ). 불행히도 정렬과 같이 환경 중간에 일시 중지하려는 경우에는 문제가 발생합니다(또는 매우 지저분해집니다).
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
%% Standard (?) fix to make \pause work at all in align environment
\mode<presentation>{\setbeamercovered{transparent=0}}
\makeatletter
\def\beamerorig@set@color{%
\pdfliteral{\current@color}%
\aftergroup\reset@color
}
\def\beamerorig@reset@color{\pdfliteral{\current@color}}
\makeatother
%%
\begin{frame}
This problem has three parts.
\begin{enumerate}
\item What is the answer to part 1?\\\pause
First interpret the question. Then calculate
\begin{align*}
\Pr[X\in A] &=\pause \frac{1}{2^n} \sum_{i=0}^n \binom{n}{i} \\
&=\pause 1
\end{align*}
\item What is the answer to part 2?\\\pause
More answers, \pause with more parts.
\item What is the answer to part 3?\\\pause
...
\end{enumerate}
\end{frame}
\end{document}
물론 이렇게 하면 첫 번째 부분을 완료할 때까지 문제의 뒷부분이 나타나지 않습니다.
아마도 답변을 더 작은 덩어리로 나누고 이전 텍스트와 첫 번째 부분이 align
동시에 표시되도록 하면 전자 접근 방식이 작동하도록 할 수 있을 것입니다. -사례 기준. 올바른 해결책은 답변 자체 내의 일부 범위로 효과를 제한하거나 \pause
처음에 표시하려는 이후 자료를 불투명하게 하여 이를 재정의 align
하는 것이라고 생각합니다(수정 사항이 이미 텍스트가 항상 투명하게 존재하도록 합니다.)
이를 수행할 수 있는 좋은 방법이 있습니까?
답변1
\always
내용에 대한 슬라이드 카운터를 재설정하는 (분명히 매우 해킹적인) 명령을 사용하여 다음 해결 방법을 사용했습니다 .
\documentclass{beamer}
\usepackage{amsmath}
%% Standard (?) fix to make \pause work at all in align environment
\mode<presentation>{\setbeamercovered{transparent=0}}
\makeatletter
\def\beamerorig@set@color{%
\pdfliteral{\current@color}%
\aftergroup\reset@color
}
\def\beamerorig@reset@color{\pdfliteral{\current@color}}
\makeatother
%%
%% \always{} command ensures that its contents are visible on all slides of the frame.
\newcounter{beamerpausessave}
\newcommand{\always}[1]{\setcounter{beamerpausessave}{\value{beamerpauses}}
\setcounter{beamerpauses}{0}\pause #1
\setcounter{beamerpauses}{\value{beamerpausessave}}\addtocounter{beamerpauses}{-1}\pause}
\begin{document}
\begin{frame}
This problem has three parts.
\begin{enumerate}
\always{\item What is the answer to part 1?\\}\pause
First interpret the question. Then calculate
\begin{align*}
\Pr[X\in A] &=\pause \frac{1}{2^n} \sum_{i=0}^n \binom{n}{i} \\
&=\pause 1
\end{align*}
\always{\item What is the answer to part 2?\\}\pause
More answers, \pause with more parts.
\always{\item What is the answer to part 3?\\}\pause
...
\end{enumerate}
\end{frame}
\end{document}
beamerpauses
저는 아직도 왜 더 간단한 방법이 없을 때 설정 과 사용 의 특정 조합이 \pause
작동하는지 이해하지 못합니다.