[OS X TeX] Why won't TeXShop pdflatexmk use index style

Murray Eisenberg murrayeisenberg at gmail.com
Fri Aug 5 21:13:47 CEST 2016


> On Fri, 5 Aug 2016 12:13:00 -0500, Herbert Schulz <herbs at wideopenwest.com <mailto:herbs at wideopenwest.com>> wrote:
> 
>> On Aug 5, 2016, at 10:38 AM, Murray Eisenberg <murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>> wrote:
>> 
>> Source file  styledndex.tex:
>> 
>>        \documentclass{book}
>> 
>>        \usepackage{makeidx}
>>        \makeindex
>> 
>>        \begin{document}
>> 
>>        Some text.\index{apple}\index{apricot}
>>        \index{banana}\index{blackberry}\index{blueberry}
>>        \index{currant}\index{cherry}
>>        \index{date}
>> 
>> 
>>        \printindex
>> 
>>        \end{document}
>> 
>> Index style file styledindex.ist:
>> 
>>        headings_flag 1
>>        heading_prefix "{\\medskip\\hfill\\large\\textsf <smb://medskip//hfill//large//textsf>{\\textbf <smb://textbf>{"
>>        heading_suffix "}}\\hfill <smb://hfill>}\\medskip\\nopagebreak\n? <smb://medskip//nopagebreak/n?>
>> 
>> When I just (i) run Latex from within TeXShop; (ii) from command line execute
>> 
>>     makeindex -s styledindex.ist styledindex
>> 
>> and (iii) again run latex from within TeXShop, I get the index with the style I expect ? each letter group is headed by its letter A, B, C, or D (and in a bold sans-serif).
>> 
>> However, with the following file platexmkrc in the source directory...
>> 
>>    add_cus_dep('idx', 'ind', 0, 'makeidx2ind');
>>                 sub makidx2ind {
>>                                system("makeindex ?s '$_[0]'.ist -o '$_[0]'.ind '$_[0]'.idx");
>>                 };
>> 
>> ? if instead I run the pdflatexmk engine from within TeXShop, those letter group headings do not appear ? the .ist file is being ignored ? although of course an index is produced.
>> 
>> What?s wrong?
> 
> Howdy,
> 
> The makeindex command is built-in to latexmk so setting a rule doesn't do the job. A platexmkrc file in the same directory as the root .tex file containing the line
> 
> $makeindex = "makeindex -s styledindex.ist %O -o %D %S";
> 
> (with a blank line afterward) should do the job. Let me know if it doesn’t.

Yes, I’m aware of using that last line in the pdflatexmk bash script (pdflatexmk.engine. In fact, with your help, on a previous occasion I created a modified engine to use just such a _particular_ custom makeindex command. Actually, the last line of the engine becaame:

    "${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -r "${TSBIN}/pdflatexmkrc" -e '$makeindex = q/makeindex -s BOOKLB.IST %O -o %D %S/;' "$1"

And that worked just fine for .tex source BOOKLB.TEX.

But what I’m trying to do now is to generalize that, so that whatever the name nnnn.tex of the source .tex file, the engine will run makeindex with style file nnnn.ist. That is, is there some form of a parameter I can place there in the “-s …” part of the makeindex command in the engine?


---
Murray Eisenberg			murrayeisenberg at gmail.com
503 King Farm Blvd #101	Home (240)-246-7240
Rockville, MD 20850-6667	Mobile (413)-427-5334


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20160805/f3cee870/attachment-0001.html>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


More information about the macostex-archives mailing list