1

When we compile on Windows a saved document, TeXstudio saves auxiliary output files in the folder of the .tex file. But if we compile an unsaved document, I can't find where these output files are saved. I looked in the Windows temporary folder, but I didn't find them. I also searched for the temporary file name given by TexStudio after the compilation of an unsaved document, but I couldn't find anything. I would like to know where these files are saved for mainly two reasons:
(a) to find my unsaved work in the case of a computer crash, or power failure, and
(b) for cleaning up these files when not needed for saving up space on my hard disk

Do you know where I can find them?

Is there any way from TeXstudio settings (configure TeXstudio) to change this folder? I couldn't find this either looking in TeXstudio manual or in internet.

2 Answers 2

3

TeXStudio does not compile any document, it saves it first and sends a request to the latex distribution to compile it. What you call an "unsaved document" is a document that you have not named. TeXStudio names it and saves it. I tested on my Debian machine, the temporary files are named texstudio_XXXXXX.tex The XXXXXX characters are random and the file is saved in /tmp. You can visualize the name of the file in the log file produced by the compilation of any file erroneous or not. The name given by TeXStudio will appear. I imagine it's not much different on a Windows system.

I strongly advise you not to start editing a LaTeX file by giving it a name!

5
  • I absolutely agree with what you clarify. Sometimes (manytimes) I just compile an unsaved document just because is for testing and it is not the main file I am working on it. As I wrote in my question I cannot locate in temporary file of windows these files, although I searched in windows using as key this random name created by Texstudio without any result.
    – miltos
    Commented Jul 21, 2022 at 9:48
  • For document testing purpose, I create it in the /tmp directory. I am quite sure that the temporary exist somewhere probably with a name beginning with texstudio. Widows is a poor system for hacking...
    – gigiair
    Commented Jul 21, 2022 at 10:02
  • 1
    In a windows OS the unnamed files are located in c:\Users\<username>\AppData\Local\Temp Commented Jul 21, 2022 at 13:54
  • That is correct! I found them there. I was just looking in the folder: C:\Windows\Temp and I couldn't find them.
    – miltos
    Commented Jul 21, 2022 at 14:08
  • 1
    You can post it as an answer to help other readers. Commented Jul 21, 2022 at 16:28
1

The answer to my question was given mainly by Simon Dispa and partly by gigiair: The temp folder that TeXstudio saves the output files (and the .tex file itself) after the compilation of an unsaved document on Windows is located at:
c:\Users<username>\AppData\Local\Temp (most applications save temporary files there).
The names of files are something like "texstudio_XXXXXX.yyy" where XXXXXX is the random name given to the document by Texstudio and yyy is the extension of the file (aux, tex, log, pdf, synctex). You can find them there for cleaning them up or for recovering a file you didn't save (but you have had compiled it at least once).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .