1

I have List of indexes in beamer , but it no indent before the name of slide. When I write \hspace it do very big indent .

    \usepackage{multicol}
\newenvironment{theindex}{}{}
\usepackage[xindy]{imakeidx}

\renewenvironment{theindex}{%

    \setlength{\parindent}{0pt}%
    {{{\hspace{+4pt}\begin{center}\color{blue}\large{\indexname}\end{center}}}}
    \let\item\par   % definitions for subitem etc
    \def\subitem{\par\nobreak\hspace*{1em}\ignorespaces}%
    \def\subsubitem{\par\nobreak\hspace*{2em}\ignorespaces}%
    \def\indexspace{}%
    \begin{multicols}{2}
    }{\end{multicols}   }
\makeindex[options=-L russian -C utf8]

And I need to do right carry of subitems .Like this

enter image description here

but i have this

enter image description here

please help.

Example :

\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[xindy]{imakeidx}

    \renewenvironment{theindex}{%

        \setlength{\parindent}{0pt}%
        {{{\hspace{+4pt}\begin{center}\color{blue}\large{\indexname}\end{center}}}}
        \let\item\par   % definitions for subitem etc
        \def\subitem{\par\nobreak\hspace*{1em}\ignorespaces}%
        \def\subsubitem{\par\nobreak\hspace*{2em}\ignorespaces}%
        \def\indexspace{}%
        \begin{multicols}{2}
        }{\end{multicols}   }
    \makeindex[options=-L russian -C utf8]

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

1 Answer 1

3
+50
\documentclass[mathserif,12pt,aspectratio=169]{beamer}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage[scaled=0.95]{PTSans}
\usepackage{graphicx}
%\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{epstopdf}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{latexsym,amssymb,amsthm}

\newenvironment{theindex}{}{}
\usepackage{multicol}
\usepackage[xindy]{imakeidx}

\renewenvironment{theindex}
{\vspace*{-15pt}\begin{center}\Large Index\end{center}%
 \def\item{\par\hangindent 10pt\parindent0pt}%
  \begin{multicols}{2}
}{\end{multicols}}
\newcommand\subitem{\par\hangindent10pt\parindent10pt}
\newcommand\subsubitem{\par\hangindent20pt\parindent20pt}
\def\indexspace{}%

\makeindex[options=-L russian -C utf8]

\begin{document} 
\begin{frame}
\index{apple}\index{ABC}\index{ABC!abc!123}
foo\index{Algorithm}
\index{apple!Algorithm!This text as subsubitem which is very very long}
\index{apple!Algorithm as subitem}

\end{frame}
\begin{frame}
\index{apple!Algorithm as subitem which is very very very extraordinary long}
foo
\index{short}\index{long}\index{very!long!As subsubitem this is a very very long subindex entry of long}
bar
\end{frame}
\printindex
\end{document}

enter image description here

4
  • Looking good, I tried multiple columns towards another question and found the beamer frames limiting (In my attempt different index would not wrap column well and bound to one page) I am not asking you to ensure your code can exceed those limits, but it would be useful to know if you encountred any limitations at column, frame or page boundaries.
    – user170109
    Commented Apr 30, 2019 at 10:07
  • 1
    look for beamers allowframebreaks. I do not know if it works for an index.
    – user187802
    Commented Apr 30, 2019 at 10:39
  • There are some inherent odd behaviours at column end but overall wraps to next frame/page overcoming many of the poor behaviours I encountered. Since working in an uncommon fashion those oddities are generally to be expected and may need specific real world case by case manipulation. Anyway well done, bounty is time restricted so cant award just now +1
    – user170109
    Commented May 1, 2019 at 0:52
  • Sure, it is beamer and not a simple document class. I suppose that you have to insert manual frame breaks
    – user187802
    Commented May 1, 2019 at 5:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .