# Customizing index and using doc package

I needed an index for my master thesis and wanted to adjust the index with a style file. It took me 3 hours to get it working with the template I am using. My style file was always ignored until I've found out that the problem is caused by including the doc package.

Here is an example:

\documentclass{article}

\usepackage{makeidx}
% \usepackage{doc} % somehow changes the index, indexname etc.

\makeindex

\begin{document}

\tableofcontents

\index{bla} bla.
\index{blub} blub.

\def\indexname{Stichwortverzeichnis}
\makeatletter
\printindex
\makeatother

\end{document}


I've uploaded my index style file here, but I doubt that this is a problem with my index style file?!

To compile you'll need to do (assuming you will save the example to 'index.tex' and the index style file to 'gind.ist'):

latex index.tex

makeindex -s gind.ist -g index # or another index style

latex index.tex
latex index.tex

dvips index.dvi
ps2pdf index.ps


Here the result with the doc package (ingoring my index style file): And here the result without the doc package (using my index style file):

My question: Is this an explicit behaviour of the doc package or is it a nasty side-effect of the package? I've just read the short explanation of the package on CTAN but couldn't answer this question by myself.

-
Just to be sure: which package doc do you mean? What should it do? –  Kurt Apr 16 '13 at 10:28
Actually, I dunno. It was just in my template (from my university) and narrowed this behaviour down to this package. I think it should be this doc package I can't see why this should change the index?! –  patrickvogt Apr 16 '13 at 10:30
\usepackage{doc} % Fuer's BibTeX-Logo (for BibTeX-Logo) So in the template it was just included for the BibTeX-Logo –  patrickvogt Apr 16 '13 at 10:35
Use \newcommand*{\BibTeX}{\textsc{Bib}\TeX{}} for the logo. –  Kurt Apr 16 '13 at 10:50
Thanks, but you also don't see why importing doc would lead to such a strange behaviour? –  patrickvogt Apr 16 '13 at 10:55

The used package doc is part of docstrip which is used to typeset the documentation of LaTeX packages. Try for example texdoc babel and check the index in that documentation (three columns). In your given MWE you also get an index with three columns you don't want.
As you said in the comments you use package doc only to get a proper macro for BibTeX. You can use \newcommand*{\BibTeX}{\textsc{Bib}\TeX{}} to create the BibTeX logo by your own or if you need more LaTeX logos use package hologos to get ready-for-use-macros.