MakeIndex, Nomenclature, Glossaries and AcronymsCreate index entries in beamer with 2 columns

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
mschulme
Posts: 12
Joined: Tue Dec 21, 2010 10:35 pm

Create index entries in beamer with 2 columns

Post by mschulme »

Hello all together,
the following code generates index entries for latex beamer.

\documentclass{beamer}
\usepackage{makeidx}
\makeindex
\newenvironment{theindex}
{\let\item\par %definitions for subitem etc
}{}
\newcommand\indexspace{}

\begin{document}

\begin{frame}{test 1}
\index{Laplace}Laplace transform is... \LaTeXe\ can make you happy!
\index{Test}
\end{frame}

\begin{frame}{test 2}
\printindex \end{frame}
\end{document}


QUESTION:
How do I need to modify this code such that the index entries are in two columns in the end of the beamer presentation?

Thanks
Marcus
Last edited by mschulme on Fri Feb 25, 2011 11:38 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Create index entries in beamer with 2 columns

Post by localghost »

Use the multicol package and incorporate an according environment into the theindex enviroment.

Code: Select all

\documentclass{beamer}
\usepackage{multicol}
\usepackage{makeidx}

\newenvironment{theindex}{%
  \let\item\par   % definitions for subitem etc
  \begin{multicols}{2}
}{\end{multicols}}
\newcommand\indexspace{}

\makeindex

\begin{document}
  \begin{frame}{test 1}
    \index{Laplace}Laplace transform is... \LaTeXe\ can make you happy!
    \index{Test}
    \index{A}\index{B}\index{C}\index{D}\index{E}\index{F}
  \end{frame}

  \begin{frame}{test 2}
    \printindex
  \end{frame}
\end{document}

Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
mschulme
Posts: 12
Joined: Tue Dec 21, 2010 10:35 pm

Re: Create index entries in beamer with 2 columns

Post by mschulme »

Thanks a lot, Thorsten, works well!
I also checked my initial request as "solved".
Marcus
Post Reply