1

I need to sort russian words in list of index in beamer. How I can do this ? I use Texstudio ,texlive .

  \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{Алгоритм}
    \end{frame}
\begin{frame}
    \index{Банан}
    \end{frame}
\begin{frame}
    \index{Велосипед}
    \end{frame}
\begin{frame}
    \index{Гамма}
    \end{frame}
\begin{frame}
    \index{Дом}
    \end{frame}
\begin{frame}
    \index{Жизнь}
    \end{frame}
\begin{frame}
    \index{Здание}
    \end{frame}
\begin{frame}
    \index{Игра}
    \end{frame}
\begin{frame}
    \index{Еда}
    \end{frame}
\begin{frame}
    \index{Цена}
    \end{frame}
    \begin{frame}
    \index{Стоимость}
    \end{frame}
\begin{frame}
    \index{Яблоко}
    \end{frame}
\begin{frame}
    \index{Устье}
    \end{frame}
    \printindex
    \end{document}
  • 1
    I knew we'd arrive a this point. MakeIndex can't do it. You need Xindy. – egreg Apr 23 '19 at 21:59
  • But, please, if you want people to do experiments to make suggestions, the example should contain Russian words. And, above all: what's the purpose of an index in a beamer presentation? – egreg Apr 23 '19 at 22:33
  • @egreg , You mean write \usepackage[xindy]{imakeidx} ,but it didn`t help, may be I do something wrong. Okey I edited the example . I need index in beamer for lectures ( very big presentation for 4-5 lectures) and list of indexes will be usefull for students – re1nex Apr 24 '19 at 6:16
2

There are two sorts of problems:

  1. MakeIndex does not cope with alphabets other than Latin
  2. Index entries get expanded

You need to use Xindy as the index manager and tell it that you're using the Russian language.

If you want the automatic management of the index, pdflatex has to be run with the -shell-escape option enabled.

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

\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[scaled=0.95]{PTSans}

\newenvironment{theindex}{}{}
\usepackage[xindy]{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[options=-L russian -C utf8]

\AtBeginDocument{%
  \let\originalindex\index
  \renewcommand{\index}[1]{\originalindex{\detokenize{#1}}}%
}

\begin{document} 
\begin{frame}
\index{Алгоритм}
\end{frame}
\begin{frame}
\index{Банан}
\end{frame}
\begin{frame}
\index{Велосипед}
\end{frame}
\begin{frame}
\index{Гамма}
\end{frame}
\begin{frame}
\index{Дом}
\end{frame}
\begin{frame}
\index{Жизнь}
\end{frame}
\begin{frame}
\index{Здание}
\end{frame}
\begin{frame}
\index{Игра}
\end{frame}
\begin{frame}
\index{Еда}
\end{frame}
\begin{frame}
\index{Цена}
\end{frame}
\begin{frame}
\index{Стоимость}
\end{frame}
\begin{frame}
\index{Яблоко}
\end{frame}
\begin{frame}
\index{Устье}
\end{frame}
\printindex
\end{document}

enter image description here

  • Thank you, but how I can do it at the end of document ? – re1nex Apr 24 '19 at 9:42
  • @re1nex What do you mean? – egreg Apr 24 '19 at 9:43
  • I have some problem \makeindex doesn`t undestand parameters .It underlines it and nothing change – re1nex Apr 24 '19 at 9:45
  • How I can turn on option ? – re1nex Apr 24 '19 at 9:56
  • Thank you very much !! at Miktex it works) – re1nex Apr 24 '19 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.