[OS X TeX] making an index (nomenclature)

Nicolae Garleanu nbgarleanu at gmail.com
Mon Feb 5 20:25:08 EST 2024


That sounds like a good solution — though, not knowing what is wrong with my .tex file that prevents pdflatexmk from working, while makeindex works, I’ll have to try it first.

Given that I have never used a make file, and thus haven’t yet gotten used to the benefits, I would be equally happy, if not happier, to be able to call makeindex directly in texshop (to circumvent terminal). If I can do that, though, then I am guessing that I can also customize texshop to run the appropriate latexmk that you outlined.
 
Nicolae



> On Feb 5, 2024, at 18:39, John Collins <jcc8 at psu.edu> wrote:
> 
> From the command line, there's only a latexmk command, but no pdflatexmk.  You invoke latexmk as 'latexmk -pdf ...' to get it to use pdflatex for compiling the document.  (By default, latexmk uses latex.)
> 
> To get what you want from the command line:
> 
> 1. Create a file named latexmkrc in the document directory containing the following:
> 
>   # Custom dependency and function for nomencl package
>   add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
>   sub makenlo2nls {
>       system("makeindex -s nomencl.ist -o '$_[0]'.nls '$_[0]'.nlo");
>   }
>   # Arrange for cleanup operations to remove .nlo and .nls files
>   push @generated_exts, 'nlo', 'nls';
> 
>   # Use pdflatex to compile .tex documents (unless overridden on CL):
>   $pdf_mode = 1;
> 
> That configures latexmk to deal with nomenclature and to use pdflatex.
> 
> 2. Then you can just run
> 
>   latexmk sample.tex
> 
> (Change the filename to whatever you are using, of course.)
> 
> John
> 
> 
> On 2/5/24 6:24 PM, Nicolae Garleanu wrote:
>> I don’t mean to try to have anyone else waste time on this, but just in case
>> it rings a bell with anyone: On my “real” file, 1. If I run makeindex from
>> command line all OK. 2. The % !TEX program = pdflatexmk snippet at the top
>> of the file does not do anything. It does work on the MWE. The two files are
>> in the same directory. All the nomenclature related commands in the MWE are
>> also in the real file.Is there a way to run pdflatexmk from the command line
>> as a check? Just writing it followed by file name gives me a “command not
>> found" error (as it perhaps should).
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: https://www.tug.org/mactex/faq/index.html
> List Reminders and Etiquette: https://sites.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: https://www.tug.org/mactex/index.html
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20240205/981f517d/attachment.htm>


More information about the MacOSX-TeX mailing list