LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to change style of index in LaTeX? (https://www.linuxquestions.org/questions/linux-software-2/how-to-change-style-of-index-in-latex-550451/)

realos 05-01-2007 03:48 PM

How to change style of index in LaTeX?
 
I like to print index entries in the following latex file with some fancy style, like horizontal lines as seperator between different index entries beginning with a new alphabet or have on letter of alphabet printed. I used these fancy styles a while ago but somehow lost the latex sources and do not remember how to change the activate that option.

Currently following is the index output:

Index

background, 1
H.264, 2
UMTS, 3

I would like something like:

Index

----B-----
background, 1

----H-----
H.264, 2

----U-----
UMTS, 3


Here is the latex file.tex:

Code:

\documentclass[a4paper,10pt]{report}

\usepackage{makeidx}
\makeindex

\usepackage{glossary}
\makeglossary

\author{Luqman Munawar}
\title{Results of Simulation}

\begin{document}
\pagenumbering{roman}
\maketitle

\begin{abstract}
 Some text in abstract
\end{abstract}

\tableofcontents
\listoffigures
\listoftables
\printglossary
\pagebreak

\pagenumbering{arabic}
\chapter{Background}
\label{chap:background}
Here I will write\index{Writing} some information\index{Information} on background\index{background} of the project.
\chapter{H.264}
\label{chap:h.264}
Here I will write some information\index{Information} on H.264\index{H.264}.

\chapter{UMTS}
\label{chap:umts}
Here I will write some information\index{Information} on UMTS\index{UMTS}.


\printindex
\end{document}

Any hint or pointer to documentation is much appreciated. I did search in the Internet for "latex index styles" or "latex index" but did not find any relevant document.

The closest I found was "Makeindex" by Peter Mosgen:
Code:

\begin{theindex}
{\bf H}
\indexspace
\item Heinrich-Heine-Universit\"at\dotfill 1
\indexspace
{\bf N}
\indexspace\nopagebreak%
\item Neurobiologie\dotfill 1
\end{theindex}


H
Heinrich-Heine-Universitat 1
N
Neurobiologie 1
I would like to avoid editing file.ind manually. Maybe there is an option that can be used to select the style in .tex file?

Dr_P_Ross 05-02-2007 04:07 AM

I think you either want to consult the web for the details of makeindex style files (in particular, read about letter groups) or use another tool such as xindy (http://xindy.sourceforge.net/) instead.

psisquare 05-02-2007 06:31 AM

You can change the output style of makindex by putting something like this into a new file.ist file:
Code:

headings_flag 1
heading_prefix "{\\bfseries\\hfil--- "
heading_suffix " ---\\hfil}\\nopagebreak\n"


Diego Torquemada 05-02-2007 07:13 AM

This is not the best place to ask about latex...

go to http://groups.google.com/group/comp.text.tex/topics


All times are GMT -5. The time now is 03:03 AM.