3

I am using makeidx and my own version of minitoc.ist to make an index in a report. Although it is my own version of the file, they are identical. I did not want to make any changes in the original file while troubleshooting.

Basically, what I want to do is:

\documentclass[paper=a4, fontsize=12pt]{report}
\usepackage{minitoc} % Using or omitting this package makes no difference.
\usepackage{makeidx}
\makeindex

\begin{document}
\section{one}
\index{one}
\section{two}
\index{two}
\printindex
\end{document}

The errors I get are:

! Undefined control sequence. \begin{theindex}\flushcolumns
! Undefined control sequence. \makeatletter\scan@allowedfalse
! Undefined control sequence. {\lneed
! Undefined control sequence. ...skip}\large\bfseries\null\hfill\relax\xhead

Corresponding to these lines in my .ist file:

"\\\\begin{theindex}\\\\flushcolumns\\\\parindent=0pt \n \\\\makeatletter\\\\scan@allowedfalse\n"
heading_prefix   "{\\\\lneed{8.5}\\\\vspace{\\\\baselineskip}\\\\large\\\\bfseries\\\\null\\\\hfill\\\\relax\\\\xhead{"

Removing the commands \\\\flushcolumns, \\\\scan@allowedfalse, \\\\lneed{8.5} and \\\\xhead results in the errors disappearing. I am just wondering what they are supposed to do, why don't they work, and whether removing them - instead of solving the problem - will give a different result?

2
  • Maybe you need to add \usepackage{minitoc}. But, really, code snippets are rarely useful in the TeX world. A complete minimal example (or see here) is usually the best way forward.
    – jon
    Feb 24 '15 at 21:09
  • Thank you jon, for pointing out my mistake. As you can see above, I have replaced the preamble with a minimal example that gives the same result.
    – Kajsa
    Feb 26 '15 at 9:40
3

From the documentation of minitoc, chapter "6 Jargon":

minitoc.ist This file contains a style for formating the index in the english documentation. It is generated when compiling minitoc.ins.

From the description I would conclude, that this file is a helper file for the generation of the documentation and does not belong in TDS:makeindex/ IMHO.

If you want a foreign file for your own files, then the dependencies needs to be derived, such as package that define commands, which are used in minitoc.ist. Examples:

  • \flushcolumns is defined by package multicol.

  • \lneed is defined in minitoc.ins, a quite unusual place.

  • \xhead is defined in minitoc.dtx.

  • Switch \ifscan@allowed is defined by package doc.

2
  • Ok. I have imported the multicol and doc packages so those errors are gone but the other two remain. The minitoc package is installed threw MikTex 2.9. Why does my MikTex not find the functions?
    – Kajsa
    Mar 13 '15 at 12:17
  • @zba09ker minitoc.ins and minitoc.dtx are not "run" files, these are just files for packing/unpacking minitoc and generating its documentation. Such (source) files are usually not installed in the TeX search path. It would slow down TeX compiling and cause name clashes, if all source files would be added. Take the parts of minitoc.ist and its definitions, which you understand and want to have and copy them to your own project. Mar 13 '15 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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