答案1
尝试一些定义:
\makeatletter
\let\LTX@item\@item
\def\my@item[#1]{\LTX@item[#1]\hfill}
\def\rebinditem{\let\@item\my@item}
\def\revertitem{\let\@item\LTX@item}
\makeatother
然后按如下方式使用它们:
\begin{frame}
\frametitle<presentation>{Euclid's algorithm}
\begin{minipage}{.65\textwidth}
\begin{enumerate} \rebinditem % <<<-----
\item Pseudo-code:
\item {\tt function GCD($a$, $b$) \{}
\begin{itemize}%\revertitem %<<-- uncomment if desired
\item {\tt if ($b =0$) return $a$;}%
\item \raggedleft {\tt Let $r$ be the remainder\\ when you divide $a$ by $b$}% <<--- multiline item needs \raggedleft
\item {\tt return GCD($b$, $r$);}%
\end{itemize}
\item \}
\end{enumerate}
\end{minipage}
\end{frame}
这种方法适用于任何文档类别,而不仅仅是投影仪。
答案2
一个简单的解决方案(为了好玩):
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{My desired ugly enumerated list ...}
\begin{enumerate}
\item\hfill Some shorter text
\item\hfill Some long, long, long, long, long, long, long, long text which occupay at least two
\item\hfill And short text again
lines
\end{enumerate}
\end{frame}
\end {document}