1

I am writing a thesis in TeXstudio and while working today (during which I saved my work several times) my laptop battery was lower than I thought and my laptop died. Thinking nothing of it, I plugged the power cable in and rebooted.

After the reboot, I opened TeXstudio again to find that my document seems to have been corrupted somehow. Screenshots of TeXstudio are below:

1

2

And here is a screenshot of notepad++ when opening there.

3

And here is what I get when trying to open the pdf.

4

This seems to make no sense. I had just saved minutes before my laptop died. Where is my work? I see online that TeXstudio doesn't create backups by default (I have no .bak file), which I wish I would have known, but the app still shouldn't have overwritten my work just because my laptop died. I accept responsibility for not having set up an auto-backup, but I am still furious and worried.

Here is what my directory looks like now:

5

My user\appdata\temp\..\thesis.tex is also no help. Is my work gone or can I salvage it somehow?

Joe
  • 11
  • Sorry, file may be corrupted.... – MadyYuvi Dec 15 '20 at 13:53
  • 1
    This is not a latex question, but a question if some parts are still one your drive or somewhere else. See also https://tex.stackexchange.com/a/329708/2388 – Ulrike Fischer Dec 15 '20 at 13:59
  • For whats its worth, the fact the pdf is corrupted as well would indicate this is not something Texstudio has done. Instead, the sudden reboot may have corrupted a part of your hard drive. – cktai Dec 15 '20 at 14:15
  • @UlrikeFischer do you mean that I asked in the wrong place? I had tried to ask on StackOverflow but it had referred me here upon revision. I figured since the topic is a latex editor, recovering a .tex file, and advice on how I might do that, this would be an appropriate place. I am not sure where else I would have asked. I do see that one of my tags is 'tex-core' though, which I must have autocompleted from 'tex' by mistake. Thanks for the reference link in any case. – Joe Dec 15 '20 at 14:28
  • 5
    a tex-file is a simple text file, and a tex editor is basically a text editor. So your question is really not tex specific but about how to recover a text file lost by a power failure. There is not much anyone here can do. And for the future better setup your system so that all important files are in at least two places, use e.g. git. – Ulrike Fischer Dec 15 '20 at 14:51
  • You could try to ask at Super User Stack Exchange. Good luck! – EuklidAlexandria Dec 15 '20 at 15:41
  • Note that backup software typically does not back up .tex files (or .c or .h etc) unless you tell it to. – John Kormylo Dec 15 '20 at 16:48

1 Answers1

0

I just had the same problem as I type. Thank God I had the entire folder of my thesis backed up on Dropbox. I only had to go to the "Version History" by clicking the three dots to the right of the needed file on Dropbox icon icon on my pc's taskbar. Then I returned to the last version which luckily was just one week earlier

Fonnie
  • 1
  • 2
    While backing up one's work is generally a good idea, I don't think this will help the OP in solving his problem as he apparently missed to do so when the time had come. Also, the whole subject is rather off-topic, given that the problem raised here is about editors and file-systems. – AlexG Mar 15 '23 at 10:23