xepersian 与 beamer itemize item pause 的不良行为

xepersian 与 beamer itemize item pause 的不良行为

为什么xepersian将 itemize 环境的项目分成两部分,并且最后一部分与前一部分保持一致pause!(见附件 gif)。(不用担心字体)

編輯規範:xelatex + TexLive 2022 + Win 10 + texstudio 4.5.1

\documentclass{beamer}
\usefonttheme{professionalfonts}

\setbeamercolor{block title}{fg=white, bg=blue!70!black}
\setbeamercolor{block body}{fg=black, bg=gray!20}
\setbeamertemplate{blocks}[rounded][shadow=true]

\usepackage{xepersian}
\setsansfont{Times New Roman}
\settextfont{Times New Roman}

\begin{document}
    \begin{frame}
        \frametitle{Estimation problem}
        \begin{itemize}[<+->]
            \item  In finance it is a common to consider a parametric model for pricing
            derivatives and then estimate its parameters to the historical market data.
            \item  However, this practice raises some questions about its effectiveness
            and implications.
            \item Our work aims to give answers to these questions and outlines an alternative solution
        \end{itemize}
    \end{frame}
    
\end{document}

在此处输入图片描述

答案1

这是由于\pausecmd 中在从右到左的上下文(xelatex 引擎)中出现错误,可以使用这个小例子来重现(该包bidi隐式地用于xepersian从右到左的书写)

\documentclass{beamer}
\usepackage[RTLdocument=on]{bidi}

\begin{document}

\begin{frame}
one 
\pause   
two 
\pause  
three 
\end{frame}

\end{document}

您可以使用beamer-rl类来生成从右到左的演示文稿,编译应该使用 lualatex 来完成,这样就不会产生这个问题

\documentclass{beamer-rl}
\usefonttheme{professionalfonts}
    
\setbeamercolor{block title}{fg=white, bg=blue!70!black}
\setbeamercolor{block body}{fg=black, bg=gray!20}
\setbeamertemplate{blocks}[rounded][shadow=true]

\babelprovide[import,main]{persian}
\babelfont{sf}{Times New Roman}

\begin{document}
    \begin{frame}
        \frametitle{Estimation problem}
        \begin{itemize}[<+->]
            \item  In finance it is a common to consider a parametric model for pricing
            derivatives and then estimate its parameters to the historical market data.
            \item  However, this practice raises some questions about its effectiveness
            and implications.
            \item Our work aims to give answers to these questions and outlines an alternative solution
        \end{itemize}
    \end{frame}
    
\end{document}

答案2

一个技巧是将所有项目分解为单个项目。

\documentclass{beamer}
\usefonttheme{professionalfonts}

\setbeamercolor{block title}{fg=white, bg=blue!70!black}
\setbeamercolor{block body}{fg=black, bg=gray!20}
\setbeamertemplate{blocks}[rounded][shadow=true]

\usepackage{xepersian}
\setsansfont{Times New Roman}
\settextfont{Times New Roman}

\begin{document}
    \begin{frame}
        \frametitle{Estimation problem}
        \begin{itemize}[<+->]
            \item  In finance it is a common to consider a parametric model for pricing
            derivatives and then estimate its parameters to the historical market data.
        \end{itemize} %<---- added
        \begin{itemize}[<+->]  %<---- added
            \item  However, this practice raises some questions about its effectiveness
            and implications.
            \item Our work aims to give answers to these questions and outlines an alternative solution
        \end{itemize}
    \end{frame}
    
\end{document}

相关内容