[OS X TeX] How specify .ist for index?
Herbert Schulz
herbs at wideopenwest.com
Sun Sep 23 23:23:07 CEST 2012
On Sep 23, 2012, at 4:16 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>
> On Sep 23, 2012, at 14:34:08 -0500, Herbert Schulz <herbs at wideopenwest.com> wrote:
>
>> On Sep 22, 2012, at 2:19 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>
>>>
>>> On Sep 22, 2012, at 15:11:45 -0500, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>>>
>>>> On Sep 21, 2012, at 2:51 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>>>
>>>>> On Sep 21, 2012, at 15:44:48 -0500, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>>>>
>>>>>>
>>>>>> On Sep 20, 2012, at 3:36 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>> On Sep 20, 2012, at 10:17:31 -0500, Herbert Schulz <herbs at wideopenwest.com> wrote:
>>>>>>>
>>>>>>>> On Sep 20, 2012, at 10:07 AM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sep 19, 2012, at 10:48:48 +0200, Claus Gerhardt <claus.gerhardt at uni-heidelberg.de> wrote:
>>>>>>>>>
>>>>>>>>>> You have to use a shell script specifying that .ist file, see the [linked attachment] where I use a german.ist file. The .ist file should be saved in texmf/makeindex where texmf is your personal texmf folder.
>>>>>>>>>>
>>>>>>>>>> The shell script can be called by an Applescript.
>>>>>>>>>>
>>>>>>>>>> Claus….
>>>>>>>>>>
>>>>>>>>>> Url : http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20120919/f6ec0d64/makeindexc-0001.zip
>>>>>>>>>>
>>>>>>>>>> On Sep 19, 2012, at 3:11, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> How does one go about specifying a .ist file to be used when makeindex is run automatically from within TeXShop?
>>>>>>>>>>>
>>>>>>>>>>> (In my .ist file I use the usual settings so that each letter of the alphabet is typeset large and bold just before all the index entries that start with that letter.)
>>>>>>>>>
>>>>>>>>> Is there some way to integrate this into TeXShop? So that either using the MakeIndex choice for Typeset -- or even, preferably, being able to do it all with the the pdflatexmk choice -- can be directed to use a particular .ist?
>>>>>>>>>
>>>>>>>>> After having such a lovely front end to TeX as TeXShop, it seems a great shame to have to go to a command line to call a script.
>>>>>>>>>
>>>>>>>>
>>>>>>>> If you want to integrate it into the pdflatexmk engine (actually this will do it for all of the latexmk based engines --- if that's no good let me know) just add the line
>>>>>>>>
>>>>>>>> $makeindex = "makeindex -s my.ist %O -o %D %S";
>>>>>>>>
>>>>>>>> (on a separate line) where my.ist is the index style file you want to use to ~/Library/TeXShop/bin/latexmkrcedit. Note: from then on the my.ist file will always be used. Note that the my.ist file needs to be where TeX can find it; e.g., ~/Library/texmf/makeindex for personal .ist files---create that folder if necessary.
>>>>>>>
>>>>>>> That works very nicely, thank you! (Although not as easily as would be the case if one could just use the TeXShop preferences to specify the file. Yes, that's a feature request!)
>>>>>>>
>>>>>>> I note that this still works if I use a symlink in ~/Library/texmf/makeindex to the actual .ist file. So then when I want to change the index style file, I don't have to copy a new file to that location, just re-create the symlink to the new one.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> If you wish to you can actually create an engine file, pdflatexistmk (?), that will set that ist for makeindex and then use that engine when you wish.
>>>>>
>>>>> Is creating a separate pdflatexistmk (say) better for some reason than just editing latexmkrcedit if I'm going to be changing from one .ist to another for different jobs?
>>>>>
>>>>
>>>> Howdy,
>>>>
>>>> Editing the latexmkrcedit file changes the behavior of all of the latexmk based engines while creating the pdflatexistmk.engine (answering your question below) localizes the change to that engine alone.
>>>>
>>>>> If I do create such an engine, do I correctly understand that you're referring to something named, say, pdflatexistmk.engine that goes into ~/Library/TeXShop/Engines? And that it would be similar, say, to pdflatexmk.engine but _somehow_ add the needed information about the .ist for makeindex?
>>>>>
>>>>
>>>> Yes. What you would do is duplicate the pdflatexmk.engine file, rename it pdflatexistmk.engine and edit it. Change the line
>>>>
>>>> "${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -r "${TSBIN}/pdflatexmkrc" "$1"
>>>>
>>>> (that's all one line even if it looks wrapped on your screen) to
>>>>
>>>> "${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -r "${TSBIN}/pdflatexmkrc" -e '$makeindex = q/makeindex -s my.ist %O -o %D %S/' "$1"
>>>>
>>>> (again all on one line).
>>>>
>>>>> The crux of pdflatexmk.engine seems to be that it calls ~/Library/TeXShop/bin/tslatexmk/latexmk with some options, one of which refers to latexmkrcedit. So are you suggesting that I create a new option for latexmk, which would involve modifying latexmk, or is there a way within the proposed pdflatexistmk.engine to pass an additional option to latexmk?
>>>>>
>>>>> (I see several options of the form "-r …" in the call to latexmk from within pdflatexistmk.engine, but I don't see how they get used in latexmk. Is this some universally understood bash or perl parameter?)
>>>>
>>>>
>>>> Not exactly a new -r option, which tells latexmk to read a specific initialization file which contain perl code, but the -e option, which actually contains perl code.
>>>
>>> I tried what you suggested: duplicating pdflatexmk.engine, renaming the duplicate to pdflatexistmk.engine, and editing its last line so that it now reads:
>>>
>>> "${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -r "${TSBIN}/pdflatexmkrc" -e '$makeindex = q/makeindex -s BOOKLB.IST %O -o %D %S/' "$1"
>>>
>>> And I commented out the change I had previously made to ~/Library/TeXShop/bin/latexmkrcedit (to include a $makeindex = …" line.
>>>
>>> But now typesetting my document using pdflatexistmk as choice does NOT apply the formatting prescribed by that specified .ist. And it makes no difference whether that .ist is in ~/Library/texmf/makeindex or the document's source directory.
>>>
>>> Note that the method of editing latexmkrcedit did work (with pdflatexmk.engine).
>>>
>>> Did I misunderstand something here?
>>>
>>
>> Howdy,
>>
>> What is displayed on the Console when you run that command?
>>
>> Could you try to add a ; just after the %S/ and before the final '? I'm not sure if that will do anything.
>
> The original edit you proposed in order to create pdflatexistmk.engine, as well as the change to include the semicolon you just suggested…
>
> - both work on a minimal working example; BUT
> - do NOT work on my actual document, which is a book-length document.
>
> For the former, I see in the console the expected:
>
> Run number 1 of rule 'makeindex indexletters.idx'
> ------------
> Running 'makeindex -s BOOKLB.IST -o "indexletters.ind" "indexletters.idx"'
>
> For the latter, however, the console omits any "-s" option!
>
> That's weird.
>
> And as I already said, if I use the usual pdflatexmk.engine and instead do the edit to latexmkrcedit, both the MWE and the actual book document see the "-s" option and use it.
Howdy,
You say it works for one case but not the other? Did the one where it works use makeindex? If not it certainly isn't a correct minimal case.
Could you send me a minimal example that doesn't work, ist file and engine file?
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the macostex-archives
mailing list