7

I tried to do the following:

% arara: lualatex: {options: -output-directory=.\output\ -aux-directory=.\auxiliary}

I did not succeed. I also tried starting the command with -- as well as absolute path with / or \. A nice to have extra would be, that the folders become created if not already existing.

A second question: Will LuaLaTeX know where the auxiliaries are stored in a second run?


I am working on Win XP 64 with MikTeX 2.9

LaRiFaRi
  • 43,807

2 Answers2

7

The answer is: it is not possible... but it is not arara's fault.

Infact, the command line --aux-directory is implemented ONLY for a few tools in MiKTeX distribution (it doesn't even exists in TeX Live).

If, from the command line, you run lualatex --help you will get

  The following regular options are understood:

   --8bit                        ignored, input is assumed to be in UTF-8 encoding
   --credits                     display credits and exit
   --debug-format                enable format debugging
   --default-translate-file=     ignored, input is assumed to be in UTF-8 encoding
   --disable-write18             disable \write18{SHELL COMMAND}
   --draftmode                   switch on draft mode (generates no output PDF)
   --enable-write18              enable \write18{SHELL COMMAND}
   --etex                        ignored, the etex extensions are always active
   --[no-]file-line-error        disable/enable file:line:error style messages
   --[no-]file-line-error-style  aliases of --[no-]file-line-error
   --fmt=FORMAT                  load the format file FORMAT
   --halt-on-error               stop processing at the first error
   --help                        display help and exit
   --initialize                  be iniluatex, for dumping formats
   --interaction=STRING          set interaction mode (STRING=batchmode/nonstopmode/scrollmode/errorstopmode)
   --jobname=STRING              set the job name to STRING
   --kpathsea-debug=NUMBER       set path searching debugging flags according to the bits of NUMBER
   --lua=s                       load and execute a lua initialization script
   --[no-]mktex=FMT              disable/enable mktexFMT generation (FMT=tex/tfm)
   --nosocket                    disable the lua socket library
   --output-comment=STRING       use STRING for DVI file comment instead of date (no effect for PDF)
   --output-directory=DIR        use existing DIR as the directory to write files in
   --output-format=FORMAT        use FORMAT for job output; FORMAT is 'dvi' or 'pdf'
   --[no-]parse-first-line       disable/enable parsing of the first line of the input file
   --progname=STRING             set the program name to STRING
   --recorder                    enable filename recorder
   --safer                       disable easily exploitable lua commands
   --[no-]shell-escape           disable/enable \write18{SHELL COMMAND}
   --shell-restricted            restrict \write18 to a list of commands given in texmf.cnf
   --synctex=NUMBER              enable synctex
   --translate-file=             ignored, input is assumed to be in UTF-8 encoding
   --version                     display version and exit

Alternate behaviour models can be obtained by special switches

  --luaonly                run a lua file, then exit
  --luaconly               byte-compile a lua file, then exit

As you can see, --aux-directory is not present.


You can obtain something similar depending on your editor, for example WinEdt and TeXMaker have a similar option. See this thread: Is there a way to configure pdflatex to make all but the .tex and .pdf files hidden files?.

karlkoeller
  • 124,410
  • Thanks. But --output-directory=DIR exists. Shouldn't that work somehowe? From my arara.log: 08 Aug 2013 16:28:34.563 TRACE CommandTrigger - Command: lualatex --output-directory=.\output\ "Minimalbeispiel.tex" – LaRiFaRi Aug 08 '13 at 14:27
  • 1
    @LaRiFaRi Unfortunately not in MiKTeX. It is a long time bug. It works in TeX Live. – karlkoeller Aug 08 '13 at 14:39
  • @LaRiFaRi BTW, what editor are you using? – karlkoeller Aug 08 '13 at 14:40
  • TeXnicCenter 2.0 Beta2 – LaRiFaRi Aug 08 '13 at 14:41
  • @LaRiFaRi Unfortunately I don't know a method to obtain something similar in TeXnicCenter. If you want to try WinEdt there is a possibility with it. There is also an arara add-on made by me to have full arara integration. – karlkoeller Aug 08 '13 at 14:49
  • Thank you for your recommendation but I prefer to stay with open source software. Second reason, I am not on Windows for the main time and therefore learning a new IDE would annoy me. Sorry for my inflexibility. – LaRiFaRi Aug 09 '13 at 10:31
  • @LaRiFaRi everyone has his reasons! – karlkoeller Aug 09 '13 at 10:52
2

This may be a little late, but for all of those that still deal with these issues:

I have specifically created a python module for saving the auxiliary files that are generated by LaTeX and BibTeX engines into a desired folder. On my GitHub site are more informations: https://github.com/amrane99/LaTeXCompiler. Once the module has been installed (using pip) you can simply compile the .tex file using lualatex and no BibTeX engine as follows -- the generated files will be stored in the .aux_files folder --:

LaTeXCompiler -file <full_path_to_file>.tex 
              -tex_engine lualatex -no_bib_engine -aux_folder .aux_files

I hope this helps with the common issue of saving the auxiliary files in a separate folder so the working directory is always kept clean.