Text FormattingFormatting the index page

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
sman
Posts: 9
Joined: Wed Apr 29, 2009 9:08 pm

Formatting the index page

Post by sman »

Hello,

I am looking for a method to design the default index page layout. By default, the page title is "Index" in my {scrreprt} document, followed by two collumns of the form

Abla, 45
Abra, 12

Bla, 8
Bra, 78

Cbla, 99
cbra, 2
...

This looks very sad and uninspiring. I do like to know how to manage the following tasks:
  • smaller fontsize
  • 3 columns instead of 2
  • colon instead of comma (Abla, 45 --> Abra: 45)
  • page numbers with bold fontsize
  • letter groups, meaning more vspace between the letter blocks and above each block the letter of the block, if possible bold and bigger fontsize, different color.
I searched the internet the whole day but did not find any useful solution. Everybody talks about style files but noone gives a comprehensive introduction what do with respect to people who are not latex-freaks. And i am not. Xindy is no alternative for me i think, i did not understand any introduction how to use it on windows, not even how to actually format the index page.

:?: Is there any hint how to fulfil the wishes above for not-a-geek users?


:arrow: I would also be happy if anyone who ever did a stylefile (to realise some of the changes mentioned above) would be so kind and share it. I think this helps more than any geek users manual.

Thank you in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

sman
Posts: 9
Joined: Wed Apr 29, 2009 9:08 pm

Formatting the index page

Post by sman »

Hi,

I can't believe that noone in this worldwide Latex knowledge Community has ever made a style-file for its index page to change simple formats like fontsize or lettergroups and likes to share it !? :( :cry:
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formatting the index page

Post by localghost »

There is no need to open a second thread with an identical topic. If somebody has successfully worked out a solution, it surely will be posted.

I once did a style file on my own some time ago, but with less features than in your list and adapted to German. Some of your ideas were translated with this file, but not all. I will search my system for that file.

Perhaps you should take a look at Xindy. It is said to be more flexible than MakeIndex.


Best regards
Thorsten
sman
Posts: 9
Joined: Wed Apr 29, 2009 9:08 pm

Re: Formatting the index page

Post by sman »

Thank you for searching,

I wrote that I am happy with any kind of solution, it don't has to fulfil all tasks I listed, even one of them is enough :D The reason is, that I merely need examples to understand how things work. And my feeling is that there are too few examples in the internet than necessary.

The adaption to German is no problem for me, because I am German myself, by the way...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Formatting the index page

Post by localghost »

At first some bad news. My search was not successful. I once wrote the style file for some lab reports and my diploma thesis (which already lay some years behind). And after some new setups of the system this file has gone because I didn't save it to another directory.

The good news is that the file was not very comprehensive. But it will take some time for reconstructing. That means reading some manuals and perhaps browsing a book. But I think I will manage that.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formatting the index page

Post by localghost »

I almost forgot this topic. Thus the belated response. But I was able to reconstruct the index style (IST) file. It requires a minor tweak to the \dotfill command, which goes into the preamble.

Code: Select all

\renewcommand{\dotfill}{\leaders\hbox to 5pt{\hss.\hss}\hfill}	% Zeilenfüllung für Indexeinträge
This lets the dots between the entries and the according page numbers look more consistently. The command is then used in the IST file which looks like the following.

Code: Select all

quote '~'
headings_flag 1
heading_prefix "\\centerline{\\bfseries "
heading_suffix "}\\nopagebreak\n"
symhead_positive "Symbole"
numhead_positive "Zahlen"
delim_0 "\\dotfill "
delim_1 "\\dotfill "
delim_2 "\\dotfill "
delim_r "--"
suffix_2p "\\,f"
suffix_3p "\\,ff"
This formats the index with the known two columns but fills the space between entries and page numbers with dots similar to the ToC. Every block for a new alphabetic character is introduced by this character which is centered and bold.

Save this file as personal.ist (or however you want to name it) into the TeX Directory Structure (TDS). For MiKTeX this would be the following.

Code: Select all

C:\Programme\MiKTeX 2.7\makeindex\german
You will find some other predefined styles there, but don't bother. Afterwards you will have to refresh the file name database. You can do that via MiKTeX Settings or on the command prompt.

Code: Select all

texhash
To check whether the new IST file can be found by the compiler, again use the command prompt and type in the following.

Code: Select all

kpsewhich personal.ist
Confirm with enter. If the file is found, this should yield the complete path of the file.

Code: Select all

C:\Programme\MiKTeX 2.7\makeindex\german\personal.ist
Now you can call MakeIndex with the new IST file and German sorting.

Code: Select all

makeindex -s personal.ist -g jobname.idx
This is best done by adapting the concerned settings of your LaTeX editor. Look into the according help file.

That should be enough to fulfill some of your demands. Minor tweaks to the IST file for further formatting can be done later.
Post Reply