MakeIndex

The official TeXShop Support Forum.

MakeIndex

Postby petrus » Tue Dec 16, 2008 2:28 pm

An author I work for told me he wants to publish another book. The last time I composed a book for him it was in Latex but I was using textures. I am trying to use the same MasterFile as a Template for this new book, but using Texshop instead. It runs fine except that it does not generate the index. It generates an .ilg file but no index. In the .ilg file I get the error message, "Input index error (file = MasterFile, line = 1): -- Unknown index keyword \documentclass." for the first index entry, then for each index entry after that, "-- Missing arguments -- need two (premature LFD)." then at the bottom "done (0 entries accepted, 116 rejected)". Does anyone know how I can get it to generate an index?
petrus
 
Posts: 11
Joined: Tue May 01, 2007 3:24 pm

Re: MakeIndex

Postby Herbert Schulz » Tue Dec 16, 2008 4:00 pm

Howdy,

Could you post some of the template? How old is it? How about a minimal but complete document that shows this behavior? Was an ind file created at all? What processing steps did you use? Sorry for all the questions and requests but that is the only way the problem can be diagnosed.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: MakeIndex

Postby petrus » Tue Dec 16, 2008 4:22 pm

OK, here is the template, with comments removed. It was published in 2003. Not sure what you mean by "minimal but complete document". An .ind file is created, but when I open it it's completely empty. I processed by Latex, MakeIndex, Latex 2 more times. Don't mind all the questions at all.

:Master Document
\documentclass{book}

%%%%PACKAGES USED
\usepackage{amsmath}\usepackage{minitoc}\usepackage{fancyheadings}
\usepackage{amssymb}\usepackage{amsfonts}\usepackage{rotating}
\usepackage{epsfig}\usepackage{makeidx}

\setcounter{minitocdepth}{6} %creates sections in MiniTOC up to 6 levels
\setcounter{secnumdepth}{10} %numbers sections up to 10 levels
\setcounter{tocdepth}{6}
\renewcommand{\thefootnote}{$^\dagger$}

\renewcommand{\thefigure}{\thechapter.\arabic{figure}}
\renewcommand{\thetable}{\thechapter.\arabic{table}}
\renewcommand{\theequation}{\arabic{equation}}

\makeindex

\numberwithin{equation}{section}
\begin{document}

\input{defs}

\pagestyle{fancyplain}
%-------------------HEADER-------------------------
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ \ #1}}
\lhead[\fancyplain{}{\small \thepage}]{\fancyplain{}{\rightmark}}
\rhead[\fancyplain{}{\small \leftmark}]{\fancyplain{}{\thepage}}
%-------------------FOOTER-----------------------------
\cfoot{ }


\pagenumbering{roman}
\dominitoc

\tableofcontents
\listoftables
\clearpage
\listoffigures
\clearpage

\pagenumbering{arabic}

\include{ChapterOne} %chapter 1

\printindex
\end{document}
petrus
 
Posts: 11
Joined: Tue May 01, 2007 3:24 pm

Re: MakeIndex

Postby Herbert Schulz » Tue Dec 16, 2008 4:59 pm

Howdy,

What is in the file defs.tex? Since I don't have it I've commented it out, created a simple ChapterOne.tex file which has some \index calls and run it through latex->makeindex->latex->dvips->ps2pdf (actually I used the latexmk engine --- more about that later) and it all worked fine. So... what is in defs.tex?
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: MakeIndex

Postby petrus » Tue Dec 16, 2008 6:31 pm

Oh, I forgot about defs. Defs. is a file of my common used macros. I don't see anything odd, but maybe you do.

*** DEFS****

%%%% DEFINING FREQUENTLY USED BOLD Letters AND Expressions
\def\bA{{\bf A}}
\def\bB{{\bf B}}
\def\bD{{\bf D}}
\def\bE{{\bf E}}
\def\bG{{\bf G}}
\def\bH{{\bf H}}
\def\bJ{{\bf J}}
\def\bL{{\bf L}}
\def\bN{{\bf N}}
\def\bO{{\bf O}}
\def\bP{{\bf P}}
\def\bQ{{\bf Q}}
\def\bR{{\bf R}}
\def\bS{{\bf S}}
\def\bT{{\bf T}}
\def\bU{{\bf U}}
\def\bV{{\bf V}}
%%%%%%%%%%%%%%%%%%% end of bold single letters

\def\bso{\ensuremath{{\bf B}^{\rm SO}}}
%
% \ensuremath puts macro in math mode if user not in math mode
%
\def\erot{\ensuremath{E^{\rm ROT}}}
\def\heff{\ensuremath{{\bf H}^{\rm eff}}}
\def\heffn{\ensuremath{{\bf H}^{\rm eff}_{\rm NORMAL}}}
\def\heffl{\ensuremath{{\bf H}^{\rm eff}_{\rm LOCAL}}}
\def\iheff{\ensuremath{{\it H}^{\rm eff}}}
\def\iheffn{\ensuremath{{\it H}^{\rm eff}_{\rm NORMAL}}}
\def\iheffl{\ensuremath{{\it H}^{\rm eff}_{\rm LOCAL}}}
\def\pheffn{\ensuremath{{\bf H}^{{\rm eff}'}_{\rm NORMAL}}}
\def\pheffl{\ensuremath{{\bf H}^{{\rm eff}'}_{\rm LOCAL}}}
\def\cheff{\ensuremath{{\cal H}^{\rm eff}}}
\def\cheffn{\ensuremath{{\cal H}^{\rm eff}_{\rm NORMAL}}}
\def\cheffl{\ensuremath{{\cal H}^{\rm eff}_{\rm LOCAL}}}
\def\cnorm{\ensuremath{{\cal H}_{\rm NORMAL}}}
\def\cloc{\ensuremath{{\cal H}_{\rm LOCAL}}}
\def\hel{\ensuremath{{\bf H}^{\rm el}}}
\def\ehel{\mbox{\ensuremath{{\bf H}^{\rm el}}}}
\def\heln#1{\ensuremath{{\bf H}^{\rm el(#1)}}}
\def\eheln#1{\ensuremath{{\bf H}^{\rm el(#1)}}}
\def\hrot{\ensuremath{{\bf H}^{\rm ROT}}}
\def\ehrot{\ensuremath{{\bf H}^{\rm ROT}}}
\def\hse{\ensuremath{\bf H}^{\rm SE}}
\def\ehse{\ensuremath{\bf H}^{\rm SE}}
\def\hso{\ensuremath{{\bf H}^{\rm SO}}}
\def\ehso{\ensuremath{{\bf H}^{\rm SO}}}
\def\hsr{\ensuremath{\bf H}^{\rm SR}}
\def\hSS{\ensuremath{{\bf H}^{\rm SS}}}
\def\ehSS{\ensuremath{\bf H}^{\rm SS}}

%%%%%%%%%%%%%%%%% bold Capitals with superscript letters

\def\bfa{{\bf a}}
\def\bad{\ensuremath{{\bf a}^\dagger}}
\def\badd{\ensuremath{{\bf a}^{\dagger 2}}}
\def\badn#1{\ensuremath{{\bf a}^{\dagger #1}}}
\def\bel{{\bf l}}
\def\boop{{\bf Op}}
%%%%%%%%%%%%%%%%%%%%%%%% bold letter combinations


%%%%DEFINING EQUATION REFERENCES

\def\rbeq#1{{Equation (\ref{eq:#1})}}
\def\rbeqt#1#2{{Equations (\ref{eq:#1} and \ref{eq:#2})}}
\def\rbeqh#1#2#3{{Equations (\ref{eq:#1}), (\ref{eq:#2}, and \ref{eq:#3})}}
\def\rbeqf#1#2#3#4{{Equations (\ref{eq:#1}), (\ref{eq:#2}), (\ref{eq:#3}, and \ref{eq:#4})}}

\def\rbeqth#1#2{{Equations (\ref{eq:#1} - \ref{eq:#2})}}
%%%% Two equations Hyphenated

%%OTHER ITEMS USED FREQUENTLY

\def\bo#1{{\bf #1}}% bold, used before version of Textures
\def\ii#1{{\it #1}}% italic, used before version of Textures
\def\etal{{\it et al.}}
\def\ab{{\it ab initio\ }}
\def\ow{\overline{\omega}}
\def\cm{\ensuremath{{\rm cm}^{-1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\cxlhead{%
\renewcommand{\chaptermark}[1]{\markboth{ }{ }}
\renewcommand{\sectionmark}[1]{\markright{ } }
\lhead[ ]{ }\rhead[ ]{ }\headrulewidth 0.0in}
%%%cancels header, used for landscape format


\def\rsmhead{%resumes header for subsequent pages after landscape
\renewcommand{\chaptermark}[1]{\markboth{##1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ \ ##1}}
\lhead[\fancyplain{}{\small \thepage}]{\fancyplain{}{\rightmark}}
\rhead[\fancyplain{}{\small \leftmark}]{\fancyplain{}{\thepage}}
\headrulewidth 0.4pt}
%%%%Resumes header, used changing landscape to portrait

%%%%%%%%%%%%%%%%%%%MACRO FOR TIME OF DAY
\newcount\timing
\newcount\hourcount
\newcount\oldtime
\def\fix{\ifnum\oldtime < 10 0\fi}
\def\fixtiming{\ifnum\timing < 10 0\fi}

\def\realtime{\timing=\time \oldtime=\time
\ifnum\timing>60 \divide\timing by 60
\hourcount=\the\timing
\multiply\timing by 60
\advance\oldtime by-\timing
\ifnum\hourcount<12
\number\hourcount:\fix\number\oldtime
am\fi
\ifnum\hourcount=12
\number\hourcount:\fix\number\oldtime
pm\fi
\ifnum\hourcount>12
\advance\hourcount by -12
\number\hourcount:\fix\number\oldtime
pm\fi
\else12:\fixtiming\number\timing am
\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%END TIME OF DAY MACRO

%%%%%%%%PUTS A TILDE (~) UNDER THE CHARACTER IN {}
\def\unt#1{
\setbox5=\hbox{$#1$}
\setbox6=\hbox{\the\scriptfont2\char'030}
\ifnum\wd5>\wd6{\vtop{\offinterlineskip\hbox{$#1$}\vskip1.4pt\hbox to
\wd5{\hfil\the\scriptfont2\char'030\hfil}}}
\else{\vtop{\offinterlineskip\hbox to
\wd6{\hfil$#1$\hfil}\vskip1.4pt\hbox{\the\scriptfont2\char'030}}}
\fi}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%change equation numbering to alpha

\newcounter{alphaequ}

\def\alphaeqon{%takes the next equation group and makes it
%number each equation as 3a, 3b, 3c, instead of 3, 4, 5
\setcounter{alphaequ}{\value{equation}}%
%sets alphaequ to the value of the current equation number
\setcounter{equation}{0}% to number first eq. as letter a
\addtocounter{alphaequ}{1}%
\renewcommand{\theequation}%
{\thesection.\arabic{alphaequ}\alph{equation}}%
}

\def\alphaeqoff{%shuts off equation numbering by alpha and restores it
%to plain numbering (1.4, 1.5, 1.6, etc)
\setcounter{equation}{\value{alphaequ}}%
%returns the equation counter back to where it was
\renewcommand{\theequation}%
{\thesection.\arabic{equation}}%
%returns equation number format back to regular,
%removing letters
}
\def\alphaeqsetback#1{%resets the alpha counter to allow numbering to go from 11a-11b to 12a-12b
\addtocounter{alphaequ}{1}%
\addtocounter{equation}{-#1}%
}
petrus
 
Posts: 11
Joined: Tue May 01, 2007 3:24 pm

Re: MakeIndex

Postby Herbert Schulz » Tue Dec 16, 2008 7:01 pm

Howdy,

No problems here! I've created a dummy ChapterOne.tex that contains

%%!TEX root = test.tex
\chapter{First Chapter}
\section{The first section of text}
Here is a bunch of text\index{text} and I'll make an index\index{index} at the end so it will create a simple test of creating an index\index{index}.
\newpage
Here is a bunch of text\index{text} and I'll make an index\index{index} at the end so it will create a simple test of creating an index\index{index}.

and that's all (test.tex is the name I gave to the template in the the message above). Running latex->makeindex->latex gives me no errors and the results look ok. What TeX distribution are you using? I don't think the defs.tex file has any problems; I included it and every thing is still ok. If you use this version of ChapterOne.tex does the template compile without problems? If so, the problem would be inside the ChapterOne.tex file you have. Does your ChapterOne.tex file have any \index commands?

If you use the version of
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: MakeIndex

Postby petrus » Tue Dec 16, 2008 7:29 pm

----------------------------------------
What TeX distribution are you using? I don't think the defs.tex file has any problems; I included it and every thing is still ok. If you use this version of ChapterOne.tex does the template compile without problems? If so, the problem would be inside the ChapterOne.tex file you have. Does your ChapterOne.tex file have any \index commands?
----------------


I use TexShop 2.10 in OSX.4.11. The template compiles perfectly, except it does not produce an index. My ChapterOne has 116 \index commands. A lot of them are of the format \index{entry1!entry2} or \index{entry1 $MathEntry$}. Might these entries be causing a problem?

I get the following error message in my console when I try to run MakeIndex:

This is makeindex, version 2.14 [02-Oct-2002] (kpathsea + Thai support).
Scanning input file MasterFile...done (0 entries accepted, 113 rejected).
Nothing written in MasterFile.ind.
Transcript written in MasterFile.ilg.
petrus
 
Posts: 11
Joined: Tue May 01, 2007 3:24 pm

Re: MakeIndex

Postby Herbert Schulz » Tue Dec 16, 2008 7:52 pm

Howdy,

I've now tried a ChapterOne.tex that contains

%%!TEX root = test.tex
\chapter{First Chapter}
\section{The first section of text}
Here is a bunch of text\index{text!index} and I'll make an index\index{index} at the end so it will create a simple test of creating an index\index{index}.
\newpage
Here is a bunch of text\index{text} and I'll make an index\index{index $x^{2}$} at the end so it will create a simple test of creating an index\index{index}.

and everything still works fine.

One thing I noticed is that your makeindex (and probably your TeX distribution too) is quite old. the version of makeindex I'm using is dated in 2007. If you have room on your HD (it's take up to 2GB) download and install MacTeX 2008 (see <http://www.tug.org/mactex/>). It will install TeXShop 2.18 also.

Also, do you have any files in ~/Library/texmf/ (where ~ is your HOME directory), your personal texmf tree? Also, do you have custom/non-free fonts installed?
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: MakeIndex

Postby petrus » Tue Dec 16, 2008 9:34 pm

I have no fonts installed, but I do have bibtex and several .sty files in my /texmf folder: apalike, epstopdf, fancyheadings, graphics, harvard, html, makeidx, mss, revtex, textures.def and trackchanges.sty if that means anything. Now I am totally baffled about the indexing.
petrus
 
Posts: 11
Joined: Tue May 01, 2007 3:24 pm

Re: MakeIndex

Postby Herbert Schulz » Tue Dec 16, 2008 10:42 pm

Howdy,


Why do you have bibtex installed there? Most of those packages come with the latest MacTeX distribution; epstopdf, fancyheadings, graphics, makeidx and there is revtex4.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Next

Return to TeXShop (engl.)

Who is online

Users browsing this forum: No registered users and 1 guest

cron