使用 \printindex 命名幻灯片

使用 \printindex 命名幻灯片
\newenvironment{theindex}{}{}
\usepackage{imakeidx}

\renewenvironment{theindex}{%
    \let\item\par  % definitions for subitem etc
    \let\subitem\par
    \let\subsubitem\par
}
\makeatletter
\def\@idxitem{\par}

\def\imki@firstpagestyle{empty}
\makeatother
\newcommand\indexspace{}
\makeindex

我需要用 来命名幻灯片\printindex,但我不知道该怎么做。 的参数\makeindex不起作用。

例子:

\documentclass[mathserif,12pt,aspectratio=169]{beamer}


\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[scaled=0.95]{PTSans}
\usepackage{graphicx}
%\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{epstopdf}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{latexsym,amssymb,amsthm}




\usepackage{multicol}


\newenvironment{theindex}{}{}
\usepackage{imakeidx}
\renewenvironment{theindex}{%
    \let\item\par   % definitions for subitem etc
    \let\subitem\par
    \let\subsubitem\par
}
\makeatletter
\def\@idxitem{\par}

\def\imki@firstpagestyle{empty}
\makeatother
\newcommand\indexspace{}
\makeindex

\begin{document} 
\begin{frame}
\index{apple}
\end{frame}
\begin{frame}
\index{Algorithm}
\end{frame}
\printindex
\end{document}

答案1

只需插入\printindex框架即可。

\documentclass[mathserif,12pt,aspectratio=169]{beamer}

\usetheme{Warsaw}

\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage[scaled=0.95]{PTSans}
\usepackage{graphicx}
%\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{amssymb}
\usepackage{multicol}

\newenvironment{theindex}{}{}

\usepackage{imakeidx}

\renewenvironment{theindex}{%
    \let\item\par   % definitions for subitem etc
    \let\subitem\par
    \let\subsubitem\par
}{}
\makeatletter
\def\@idxitem{\par}

\def\imki@firstpagestyle{empty}
\makeatother
\newcommand\indexspace{}
\makeindex

\begin{document} 

\begin{frame}
\frametitle{Apples}
\index{apple}
\end{frame}

\begin{frame}
\frametitle{Algorithms}
\index{Algorithm}
\end{frame}

\begin{frame}[allowframebreaks]
\frametitle{\indexname}
\let\clearpage\relax % avoid empty frames
\printindex
\end{frame}

\end{document}

在此处输入图片描述

相关内容