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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
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
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