# Don't edit this file IF it is named latexmkrcDONTedit directly since
#   TeXShop may replace it on update.
# If you wish to edit or add to this file, copy it to ~/Library/TeXShop/bin
#   and rename it latexmkrcedit if that file doesn't already exist.

# Edit this File to add/change dependencies and rules
# The following is used by ALL the latexmk engine files

# change the empty string ,'', to '--shell-escape' to add the shell-escape default
$TSUserCompileOptions = '';
#$TSUserCompileOptions = '--shell-escape';

# turn recorder option off (no .fls file generated)
#$recorder=0;

# turn off duplicated missing references
$silence_logfile_warnings = 1;

# Custom dependency for glossary/glossaries package
# if you make custom glossaries you may have to add items to the @cus_dep_list and corresponding sub-routines
add_cus_dep('glo', 'gls', 0, 'makeglo2gls');
		sub makeglo2gls {
				system("makeindex -s '$_[0]'.ist -t '$_[0]'.glg -o '$_[0]'.gls '$_[0]'.glo");
		}
# The glossaries package, with the [acronym] option, produces a .acn file when processed with (xe/pdf)latex and
# then makeindex to process the .acn into .acr and finally runs of (xe/pdf)latex to read in the .acr file. Unfortunately
# the glossary package does just the reverse; i.e. (xe/pdf)latex processing produces a .acr files and makeindex then
# is used to convert the .acr file to a .acn file which is then ... . This dependency assumes the glossaries package.
add_cus_dep('acn', 'acr', 0, 'makeacn2acr');
		sub makeacn2acr {
				system("makeindex -s '$_[0]'.ist -t '$_[0]'.alg -o '$_[0]'.acr '$_[0]'.acn");
		}
# for glossary package (Sigh...) --- they can co-exist!		
add_cus_dep('acr', 'acn', 0, 'makeacr2acn');
		sub makeacr2acn {
				system("makeindex -s '$_[0]'.ist -t '$_[0]'.alg -o '$_[0]'.acn '$_[0]'.acr");
		}
# example of an added custom glossary type that is used in some of the glossary/glossaries example files:
# this is for the new glossary type command \newglossary[nlg]{notation}{not}{ntn}{Notation} from the glossaries package
# NOTE: the glossary package uses a very different command: the <in-ext> and <out-ext>
# are reversed in the calling sequence :-(
add_cus_dep('ntn', 'not', 0, 'makentn2not');
		sub makentn2not {
				system("makeindex -s '$_[0]'.ist -t '$_[0]'.nlg -o '$_[0]'.not '$_[0]'.ntn");
		}
# for the	glossary package (Sigh...) --- they can co-exist!
add_cus_dep('not', 'ntn', 0, 'makenot2ntn');
		sub makenot2ntn {
				system("makeindex -s '$_[0]'.ist -t '$_[0]'.nlg -o '$_[0]'.ntn '$_[0]'.not");
		}

# dependencies for custom indexes using the index package
# examples for sample.tex for index package:
 add_cus_dep('adx', 'and', 0, 'makeadx2and');
 		sub makeadx2and {
 				system("makeindex -o '$_[0]'.and '$_[0]'.adx");
 		}
 add_cus_dep('ndx', 'nnd', 0, 'makendx2nnd');
 		sub makendx2nnd {
 				system("makeindex -o '$_[0]'.nnd '$_[0]'.ndx");
 		}
 add_cus_dep('ldx', 'lnd', 0, 'makeldx2lnd');
	 sub makeldx2lnd {
	 		 system("makeindex -o '$_[0]'.lnd '$_[0]'.ldx");
	 }

# 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");
		}

# make sure the output directories are not re-directed.
$out_dir = '';
$emulate_aux = 1;

