Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My current .latexmkrc looks (more or less) like this:

$pdflatex = "xelatex -src-specials -synctex=1 -interaction=nonstopmode %O %S";

# for nomenclature
add_cus_dep("nlo", "nls", 0, "nlo2nls");
sub nlo2nls {
    system("makeindex $_[0].nlo -s nomencl.ist -o $_[0].nls -t $_[0].nlg");
}

makeindex works as expected. Being a lazy person I'd like to use that shiny new feature of latexmk and output to a build directory to reduce clutter ($out_dir). Unfortunately I did not find a way to tell latexmk to look in that directory for the .nlo dependency (I guess it looks in the source files' dir).

Any ideas how to modify nlo2nls?

share|improve this question

closed as too localized by lockstep, Marco Daniel, Stefan Kottwitz Feb 5 '12 at 0:25

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Did you try adding $out_dir/ in front of each $_[0]? –  egreg Dec 30 '11 at 20:35
    
Yes, I forgot to mention that doesn't work. The problem seems to be that latexmk doesn't find the dependency file: Latexmk: Missing input file: 'thesis.nls'. This is expected, as thesis.nls is generated from thesis.nlo which is is output to build/. –  Alex Dec 30 '11 at 20:39
    
It works for me with version 4.30a with exactly the custom dependency you defined. If you don't have the current version of latexmk, I would upgrade, since there were some problems with building to an output directory in earlier versions. If you have the problem with the current version, I would need to see more details to debug the problem. –  John Collins Jan 2 '12 at 19:29
add comment

Browse other questions tagged or ask your own question.