22

So I was using Texstudio to write an article and the computer just froze. I had to restart the computer, my 2 hour work was gone. I was stupid enough to not save it at all...

Does anyone know if Texstudio auto saves your document like MS word? Is there a way that I can recover it? (I built it countless times when I was writing the article.)

Mico
  • 506,678
MechAvia
  • 321
  • 2
    Welcome to TeX.SE. I've edited your posting lightly and deleted the thank-you-in-advance line -- on this site, the best way to say "thank you" is to upvote answers you find helpful and to "accept" the answer that best solves the issue(s) you've raised. – Mico Jul 05 '14 at 05:38
  • I don't think it can be recovered. – hola Jul 05 '14 at 07:18
  • 1
    If you built it, it should be saved somewhere. That file might be corrupted though. – Juri Robl Jul 05 '14 at 08:45
  • An issue requesting this feature is open on the project's github page: https://github.com/texstudio-org/texstudio/issues/644 – Mira Weller Oct 27 '19 at 16:30

6 Answers6

16

TeXstudio does not save any temporary copies of your file.

There is an option Advanced Editor -> Special Options -> Auto Save All Files. When activated, this callsFile -> Save All` in regular intervals. However, this function is deactivated by default, because it saves and thus overwrites your original file. Since a user should be aware of this behavior and its consequences, it is not activated by default.

Tim Hoffmann
  • 11,159
  • RStudio's solution to this is to store temporary copies of each file in a hidden folder in the same location as the main file and save every five seconds, if that helps. – kennyB Apr 21 '15 at 00:56
  • 3
    The user should also be aware that TeXstudio does NOT auto-save by default and its consequences. – Justas May 02 '15 at 20:42
  • 1
    Referring to the "Error Tolerance" usability guideline of: http://www.wqusability.com/articles/5es-upa2003.pdf – Justas May 02 '15 at 21:04
  • 2
    This is idiotic and short-sighted. Ideally, it should save under a name such as actual-file-name-.tex . It's like people have stopped thinking ... – Sebi Sep 21 '20 at 08:59
  • -1 just for the sake of a much more useful answer below – Rafael Oct 20 '20 at 00:26
11

I had the same problem. If you have build or compiled the file you can be lucky and find the document in your %userprofile%\AppData\Local\Temp folder.

You can find this folder in windows by typing %temp% in the Run command Window. Windows+R -> type '%temp%' -> your file should be here

Jonatan
  • 109
8

Tim's advice is correct. In 5 easy steps:

  1. Select Options menu
  2. Select Configure TexStudio submenu
  3. Near the lower left corner (not very visible) check the "Advanced options" checkbox
  4. Now you see the "Advanced Editor" submenu: select it
  5. In the "Special Options" paragraph "Save automatically all files": select the time interval you like

That's it!

4

For others looking for this option on a Mac, the location of the autosave option is a bit different. Here is where you will find it:

  1. In the menu bar, click on "TeXstudio" -> "Preferences".
  2. Click on the box label "show advanced options" located in the bottom-left corner of the preferences window.
  3. Select the check box labeled "Adv. Editor" in the panel on the left side of the preferences window.
  4. In the "special options" section of the preferences window, find the drop down menu labeled "Auto Save All Files:". The default value is "Never".
  5. Select the desired save frequency from the drop down menu (1, 2, 5, 10, 20, or 60 minutes between saves).
jthomas
  • 141
3

I also recommend storing your Tex files on Github in case your computer completely crashes and doesn't want to start back up again (saved me few hours of work).

user21398
  • 189
  • 1
    Well, at last github is public, I'm not sure it is a very good place to store a backup. Better us CD-ROMs, usb sticks, mobile harddisk drive, ... – Mensch Dec 04 '18 at 03:19
  • Sure, but this requires more effort than typing 2 commands on bash – user21398 Dec 04 '18 at 18:29
  • Another option is to store files in a automatic synchronized service, such as Dropbox or OneDrive, assuming you don't want to type commands to save neither store it public. – FHZ Feb 03 '20 at 12:11
0

you can use a searching tool named Everything. Open this software, searching ".tex" and find the latest file, which is the file you want.

cita
  • 1
  • Welcome to TeX.SE! – Mensch Oct 14 '21 at 12:51
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Oct 14 '21 at 12:53