在当前页面之前已生成了多少个页面(而非框架)?

在当前页面之前已生成了多少个页面(而非框架)?

用于LuaLaTeX生成Beamer演示文稿,在某个时候,我必须知道(在 Lua 端)在当前页面之前已经生成了多少页面(而不是框架)?

\documentclass{beamer}

\begin{document}

\directlua{

    for i = 1 , math.random (1 , 5) do
    tex.print (
    "\\begin{frame}" ..
    "frame " .. i ..  " could complex with overlays" ..
    "\\end{frame}" )
    end
    
    tex.print (
    "\\begin{frame}" ..
    " How many pages, not frames, have been generated before this one? " ..
    "\\end{frame}" )
}
\end{document}

相关内容