TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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




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



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): with <code>doc</code> package And here the result without the doc package (using my index style file): without <code>doc</code> package

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.

share|improve this question
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
up vote 2 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.