0

I want to organise better LaTeX process files such as .aux, .log, .nav, .snm, .synctex.gz, .toc and .out. I know the threads

  • here about How to manage LaTeX files in a directory? but it is about version control management.
  • here about Directory organization with multiple papers that share files but it is about working with papers sharing same bibliography.

Keep auxiliary away from your way

It is nice to keep pictures with graphicspath in Images folder such that they do not mess up the workflow. I would similarly like to keep the LaTeX process files in corresponding folders because I have many presentations and these process files are on my way, for instance

7.4.2016_presentation.aux
7.4.2016_presentation.log
7.4.2016_presentation.nav
7.4.2016_presentation.pdf
7.4.2016_presentation.snm
7.4.2016_presentation.synctex.gz
7.4.2016_presentation.toc
7.4.2016_presentation.out
7.4.2016_presentation.tex

Pseudocode to keep all auxiliary files in one directory

\auxpath{{/Users/masi/BitTorrentSync/Inf/.auxiary}}
\logpath{{/Users/masi/BitTorrentSync/Inf/.auxiary}}
\navpath{{/Users/masi/BitTorrentSync/Inf/.auxiary}}
\snmpath{{/Users/masi/BitTorrentSync/Inf/.auxiary}}
\synctexgzpath{{/Users/masi/BitTorrentSync/Inf/.auxiary}}
\tocpath{{/Users/masi/BitTorrentSync/Inf/.auxiary}}
\outpath{{/Users/masi/BitTorrentSync/Inf/.auxiary}}

Removal approach

Benchmark

latexmk -c

which removes auxiliary files. To bind this to any editor is still unknown. I am using TextMate. I do not like the delete approach because I think those auxiliary files should be stored. Better solution would be to keep them in some directory that could be controlled by LaTeX.


How to Keep LaTeX LaTeX Process Files in Directories?

2 Answers2

3

The LaTeX build wrapper ltx2any may be a solution. One of its main features is

Keeps your main directory clean by default.


The basic usage is

ltx2any filename.tex 

and all the auxiliary files will be in a subdirectory. For more options read the linked webpage or run ltx2any --help.

  • Can you add an example how the workflow works with, please. – Léo Léopold Hertz 준영 Apr 24 '16 at 11:50
  • I am not sure how this app differs from latexmk -c. – Léo Léopold Hertz 준영 Apr 24 '16 at 11:56
  • What is the default way to install the app and test it? It seems: 1 install listen (ruby); 2 ltx2any is ruby command so put in path. It would be nice to install it through some manager application. – Léo Léopold Hertz 준영 Apr 24 '16 at 12:00
  • @Masi This is totally different to latexmk -c, as latexmk -c just deletes the files. In ltx2any all the files are still present. – samcarter_is_at_topanswers.xyz Apr 24 '16 at 12:10
  • 1
    @Masi Yes, it needs ruby. If you do not want to add it to your path, just call call the executable file with its whole path. If you have further questions about the installation, ask the author on github, I made the experience, that he is very responsive and helpful. – samcarter_is_at_topanswers.xyz Apr 24 '16 at 12:12
  • I opened a ticket about it here https://github.com/akerbos/ltx2any/issues/80 – Léo Léopold Hertz 준영 Apr 24 '16 at 12:29
  • 1
    (+1) The use of multiple cores to run TikZ externalisations in parallel is the most attractive feature for me - I waited 45 minutes the other day for a file to compile and still ended up going to class with the handout version of my slides i.e. without incremental overlay specifications. Pah. – cfr Apr 24 '16 at 12:42
  • 1
    @Masi I think the README already contains the information needed to install. Setting PATH etc. is a basic thing on any Unix-ish system but it differs from OS to OS and, sometimes, from release to release. So how to set it on one version of OS X is not the same as how to set it on another (in some cases) and similarly for GNU/Linux. Note that you may be able to get it through a package manager. (On a Linux/BSD/etc. system, this is your distro's package manager. On OS X, it would be your choice from the additions available although this is never as satisfactory as the GNU/Linux etc. setups.) – cfr Apr 24 '16 at 12:47
2

If your editor is texstudio, you find a solution here:

https://sourceforge.net/p/texstudio/wiki/Tips%20and%20Tricks/#using-a-separate-directory-for-auxiliary-files

But you can create only one directory for all process-files.

Wolfgang
  • 107