升级到 TeXLive 2022 后无法编译 XeLaTeX

升级到 TeXLive 2022 后无法编译 XeLaTeX

我使用的是 Debian Bookworm 和 TeXLive 版本Version 3.141592653-2.6-0.999994 (TeX Live 2022/Debian) (preloaded format=xelatex 2023.6.21)

我能够使用 TeX Live 2021 编译 MWE。但升级到 TeX Live 2022(随 Debian Bookworm 一起提供)后,同一个文件无法编译

梅威瑟:

\documentclass{beamer}
\usepackage{polyglossia}
\usefonttheme{serif}
\setbeamercovered{transparent=0}
 \usepackage{anyfontsize}
\setdefaultlanguage{sanskrit}
\setmainfont{Shobhika Bold} 
\newfontfamily{\dev}[Script=Devanagari,Mapping=RomDev]{Shobhika} %
\newcommand{\devsize}{\Large}
\newcommand{\uvaca}{\normalsize}
\begin{document}

    \begin{frame}[allowframebreaks]
        \begin{center}
            {\Huge  { \bfseries \dev।। puruṣottamayogaḥ ।।}}
        \end{center}    
    \end{frame}

    \begin{frame}
            \begin{center}
                {\huge {\bfseries \dev  atha pañcadaśo'dhyāyaḥ}}            
            \end{center}
    \end{frame}

    \begin{frame}
        {\dev {\devsize
        \hspace*{5em} {\uvaca śrībhagavānuvāca}%

        ūrdhvamūlamadhaḥśākhamaśvatthaṁ prāhuravyayam ।%

        chandāṁsi yasya parṇāni yastaṁ veda sa vedavit ।।1।।}}%
    \end{frame}

    \begin{frame}    
        {\dev {\devsize %
        adhaścordhvaṁ prasṛtāstasya śākhā 

        \hspace*{2em} guṇapravṛddhā viṣayapravālāḥ ।  

        adhaśca mūlānyanusantatāni

        \hspace*{2em} karmānubandhīni manuṣyaloke ।।2।।}}
     \end{frame}
 \end{document}

错误

Runaway argument?
{\dev {\devsize adhaścordhvaṁ prasṛtāstasya śākhā 
! Paragraph ended before \beamer@inlineframetitle was complete.
<to be read again> 
                   \par 
l.44 ^^I \end{frame}

有趣的是,当我将同一篇文档编译为文章时,它就起作用了。

答案1

Beamer 提供了两种指定框架标题的方法:

  • (我首选的)方法通过\frametitle{...}
  • \begin{frame}{frametitle}

如果您{...}在框架上首先使用它,beamer 会认为这是框架标题。您可以通过在后面添加一个空行\begin{frame}或使用\begingroup ... \endgroup代替来避免此问题{...}(这应该已经导致 TL2021 及更早版本出现错误):

% !TeX TS-program = xelatex

\documentclass{beamer}
\usepackage{polyglossia}
\usefonttheme{serif}
\setbeamercovered{transparent=0}
 \usepackage{anyfontsize}
\setdefaultlanguage{sanskrit}
\setmainfont{Shobhika Bold} 
\newfontfamily{\dev}[Script=Devanagari,Mapping=RomDev]{Shobhika} %
\newcommand{\devsize}{\Large}
\newcommand{\uvaca}{\normalsize}
\begin{document}

    \begin{frame}[allowframebreaks]
        \begin{center}
            {\Huge  { \bfseries \dev।। puruṣottamayogaḥ ।।}}
        \end{center}    
    \end{frame}

    \begin{frame}
            \begin{center}
                {\huge {\bfseries \dev  atha pañcadaśo'dhyāyaḥ}}            
            \end{center}
    \end{frame}

    \begin{frame}
    
        {\dev {\devsize
        \hspace*{5em} {\uvaca śrībhagavānuvāca}%

        ūrdhvamūlamadhaḥśākhamaśvatthaṁ prāhuravyayam ।%

        chandāṁsi yasya parṇāni yastaṁ veda sa vedavit ।।1।।}}%
    \end{frame}

    \begin{frame}    
    
        {\dev {\devsize %
        adhaścordhvaṁ prasṛtāstasya śākhā 

        \hspace*{2em} guṇapravṛddhā viṣayapravālāḥ ।  

        adhaśca mūlānyanusantatāni

        \hspace*{2em} karmānubandhīni manuṣyaloke ।।2।।}}
     \end{frame}
 \end{document}

使用 TL2022 编译:https://www.overleaf.com/read/cvxcvptgmzsv

相关内容