MWE

MWE

\visible내용이 multlined포함되어 있고 차례로 중첩된 경우 어떻게 사용합니까 \visible?

MWE

다음 MWE는 multlined.

\documentclass[12pt,beamer,preview,multi={math},border=12pt]{standalone}
\usefonttheme[onlymath]{serif}
\usepackage{mathtools}
\newcommand{\foo}[1]{\visible<+->{#1}}
\begin{document}
\begin{standaloneframe}
    \begin{math}
        \displaystyle
        \begin{aligned}
        \foo{\int_a^b}\foo{f(x)}\foo{\, \mathrm{d}x}
            \foo{&=}\foo{F(b)}\foo{-F(a)}\\
            \foo{&=}\foo{\cos a}\foo{\sin b}\foo{+}\foo{\sin a }\foo{\cos b}\\
            \foo{&=}
                \foo{\begin{multlined}[t]}
                \foo{ax^4}\foo{+bx^3}\\\foo{+cx^2}\foo{+dx}\foo{+e}\\
                \foo{\end{multlined}}
        \end{aligned}
        \end{math}
\end{standaloneframe}
\end{document}

위 코드는 Marmot의 아이디어에서 따온 것입니다.

편집하다

foo 에 대해 모두 제거하면 다음 애니메이션에서 볼 수 있듯이 빈 프레임이 삽입됩니다. 일부 지연은 빈 프레임을 나타냅니다.\begin{multlined}\end{multlined}

\documentclass[12pt,beamer,preview,multi={math},border=12pt]{standalone}
\usefonttheme[onlymath]{serif}
\usepackage{mathtools}
\newcommand{\foo}[1]{\visible<+->{#1}}
\begin{document}
\begin{standaloneframe}
    \begin{math}
        \displaystyle
        \begin{aligned}
        \foo{\int_a^b}\foo{f(x)}\foo{\, \mathrm{d}x}
            \foo{&=}\foo{F(b)}\foo{-F(a)}\\
            \foo{&=}\foo{\cos a}\foo{\sin b}\foo{+}\foo{\sin a }\foo{\cos b}\\
            \foo{&=}
                \begin{multlined}[t]
                \foo{ax^4}\foo{+bx^3}\\\foo{+cx^2}\foo{+dx}\foo{+e}\\
                \end{multlined}
    \end{aligned}
        \end{math}
\end{standaloneframe}
\end{document}

여기에 이미지 설명을 입력하세요

답변1

이는 두 가지 문제가 결합된 것입니다.

  • 환경 \begin{}\end{}환경은 동일한 오버레이에 있어야 합니다.

  • multiline코드를 두 번 처리합니다. <+->필요한 것보다 두 배나 많은 오버레이가 생성되기 때문에 이것을 의 사용과 결합하면 문제가 됩니다 .

다음 해결 방법을 제안합니다.

\documentclass[12pt,beamer,preview,multi={math},border=12pt]{standalone}
\usefonttheme[onlymath]{serif}
\usepackage{mathtools}
\newcommand{\foo}[1]{\visible<+->{#1}}


\begin{document}
\begin{standaloneframe}
    \begin{math}
        \displaystyle
        \begin{aligned}
        \foo{\int_a^b}\foo{f(x)}\foo{\, \mathrm{d}x}
            \foo{=&}\foo{F(b)}\foo{-F(a)}\\
            \foo{=&}\foo{\cos a}\foo{\sin b}\foo{+}\foo{\sin a }\foo{\cos b}\\
            \foo{=& }
            \foo{ ax^4}\foo{+bx^3}\\
            \foo{&+cx^2}\foo{+dx}\foo{+e}\\
        \end{aligned}
        \end{math}
\end{standaloneframe}
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보