0

Following these posts: Egad! What are all those files?, File extensions related to LaTeX, etc etc. I would like to know whether I am supposed to keep these or delete them, and also is there a way to to them to export together in one folder. It's very messy when I have multiple .tex files in one file and have to sort them into their separate sub folders. Can they be exported under a folder automatically? Can I chose which ones not to export automatically?

I am using TexShop

user71207
  • 545
  • 4
    I have some .gitignore files to ignore them, but beside this I do nothing at all, I simply leave them there. Some editors have buttons to clean up, and scripts like latexmk have clean up options too, but I seldom use this. – Ulrike Fischer May 08 '21 at 08:50
  • 2
    you can get tex to write auxiliary files into a separate directlory but I strongly advise against it. It vastly complicates teh workflow for no benefit. If you write the files to a non-standard place you have to configure every program, tex, makeindex, bibtex, biber, .... to find them. – David Carlisle May 08 '21 at 08:51
  • I have recently started using LaTeX, so I may not be the most reliable user for this type of question, but I can bring my own experience. To organize my documents I use VSC with a plugin that also allows me to automatically delete all the LaTeX-related extension files (to latch on to what @UlrikeFischer said). – LukeTheWolf May 08 '21 at 09:00
  • If you are using MiKTeX or TeX you can use --output-directory=dir, so the output files will be in this directory (including the .pdf .dvi file). If you want only the aux files in that directory, in MiKTex you can also use --aux-directory=dir. I set the dir as a hidden folder like .build so it doesn't cause me inconvenience – Fran May 08 '21 at 09:35
  • @LukeTheWolf what is the advantage of deleting the files? If you delete the .aux .bib etc it just means that it takes longer to produce the document if you come back to the sources later. – David Carlisle May 08 '21 at 09:46
  • @DavidCarlisle I use that command only when the project build enters a loop. I set up my IDE so that it automatically compiles whenever a project file is saved. Because I may have made some typing errors, it happens that the main file fails to complete the file build and gets stuck on the main page. Otherwise, I never use it, I put everything in a .gitignore file and share the repository without the extension files. – LukeTheWolf May 08 '21 at 09:53
  • @LukeTheWolf oh "make clean" yes that can be necessary but the question is I think about routuinely hiding .aux and .log just because they are there, not because they give errors. – David Carlisle May 08 '21 at 09:55
  • @DavidCarlisle Yes, of course, I understood that too. Maybe I wasn't clear enough. The sense I wanted to give to what I said before is that I usually organize the files in an editor and that, as Ulrike said, I use (if necessary) a command preset by the plugin to do a cleaning. It was not my intention to say that I delete auxiliary files every time, because obviously, that would not bring any advantage. – LukeTheWolf May 08 '21 at 10:06

0 Answers0