HsIndex

About HsIndex

HsIndex is an index generator that can be used with the LaTeX (LuaLaTeX, XeLaTeX, …) processor in association with the imakeidx package.

HsIndex was made to compensate the absence of xindy in my current Debian 9 installation and my need to make index with Cyrillic characters.

It’s written with Haskell to give an efficient, stable and portable binary program.

Portable

HsIndex can be compiled from source on many Linux distributions where the Haskell platform is available. It should build well with Haskell platform older than 2014.2.

International

HsIndex can handle several languages with various alpĥabet. At this time, it can generate indexes in :

It very few but I wish to increase the number of supported language quickly.

Customisable

HsIndex allow the user to tweak the style of the index (Size of font, alignment, delimiters, …) and the language itself (sorting order, characters substitutions, …).

Introduction

An index is decomposed in 3 sections :

In each section, letters, numbers and symbols are sorted in a specific order.

Built in languages provided by the hsindex generate an index with a classical characters order, a standard style and should be satisfying for most usages.

Characters substitutions are performed on accentuated letters to simplify the index and give a coherent ordering. For example é is replaced by e and œ is replaced by oe

If the style or the language definition doesn’t meet the user requirements, it is possible to set the style and the letters orders in each section.

Modifying style

It is possible to modify the style of the index by setting a style file which contain the LaTeX commands to execute at specific moment in the index.

For example, to modify the preamble, put the following string in a text file :

preamble "\begin{theindex}"

It is possible to modify various key setting of the index such as heading prefix and suffix or the group skip :

heading_prefix "{\vspace{1.5cm}\huge{\textbf{"
heading_suffix "}}\hfill}\nopagebreak"
group_skip     "\\n\\n \indexspace\\n" 

Note : It’s possible to put line break \n but these line breaks must be preceded by two backslashes \\n.

Custom language

It is also possible to modify the character order with a language definition file.

This file is decomposed in several sections :

Usage

Running HsIndex

HsIndex usage is the same than makeindex or xindy :

  1. Place the HsIndex binary in your LaTeX working directory.

  2. Build your LaTeX document with the imakeidx package (1st pass).

  3. Run the hsindex binary with appropriate arguments.

    hsindex english --style="myindexstyle.sty" --input=input.idx --output=output.ind
  4. Build your LaTeX document to incorporate the index (2nd pass).

Downloading HsIndex

Source code of the latest version of hsindex can be downloaded from my gitlab account :

hsindex on gitlab

A binary version running on windows can be downloaded here:

hsindex v0.9.0

Evolution

At this time, hsindex development is just beginning and its features will probably be limited. If you have suggestions to improve this software, a new language you wish to use, send me an email.