我尝试在 Texstudio 中运行此 beamer。但我遇到了“未定义控制序列。\end{frame}”。beamer 在 overleaf 中编译,但在 Texstudio 中编译失败。
\documentclass{beamer}
\usepackage{rtsched}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{multido}
\usepackage{pstricks}
\usepackage{keyval}
\title{An example of using the \texttt{rtsched} package with Beamer}
\author{Giuseppe Lipari}
\institute[Scuola Superiore Sant'Anna]{Scuola Superiore Sant'Anna -- Pisa}
\usetheme{Madrid}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{An example with fixed priority}
\begin{figure}
\centering
\begin{RTGrid}[width=10cm]{2}{20}
%% the first job of task 1 arrives at time 0,
%% with a relative deadline of 4
\TaskArrDead{1}{0}{4}
%% the second job arrives at time 4
\TaskArrDead{1}{4}{4}
%% etc
\TaskArrDead{1}{8}{4}
\TaskArrDead{1}{12}{4}
\TaskArrDead{1}{16}{4}
%% the task executes in intervals [0,1], [4,5], etc.
\TaskExecution{1}{0}{1}
\TaskExecution{1}{4}{5}
\TaskExecution{1}{8}{9}
\TaskExecution{1}{12}{13}
\TaskExecution{1}{16}{17}
%% the second task
\TaskArrDead{2}{0}{4}
\TaskArrDead{2}{6}{4}
\TaskArrDead{2}{12}{4}
\TaskExecution{2}{1}{4}
\TaskExecution{2}{6}{8}
\TaskExecution{2}{9}{10}
\TaskExecution{2}{13}{16}
\end{RTGrid}
\end{figure}
\end{frame}
\end{document}
感谢您的解决方案