I always seem to compile the code but forget to save. Albeit I do save every now and then, but I want to know if it automatically saves when I compile the code, just incase my laptop hangs or something happens that might make me lose my work in the future.
[Tex/LaTex] Does TexShop automatically saves when you Typeset
texshop
Related Solutions
I am the author of TeXShop. TeXShop always saves the source before typesetting, whether you use Auto Save or not. The "dirty file" indicator is unreliable in recent systems, and seems to have been completely removed in Sierra. The Apple setting "Ask to keep changes when closing documents" DOES NOT turn off Auto Saving, at least in Sierra. It merely puts up a dialog when you close a document asking if you want to revert to its startup state. If you do this, your source and output will not agree, since the output contains all the changes you made before the last typeset.
Some users have found a hidden Apple preference to turn off Auto Save for all applications. I spent several hours yesterday helping a user who turned it off, forgot about it, and then ran into trouble with recent systems. Eventually the user created a new account and ran TeXShop in the new account, where it ran perfectly.
Sierra fixes a number of Apple bugs which affected TeXShop, and I rather strongly recommend that users upgrade to it. I recommend leaving Auto Save on. In particular, TeXShop is NEVER tested with Auto Save off, since the Preference to turn it off is hidden from ordinary users.
The preview window in TeXShop is created every time you compile your document. You should never really need to use the Open for Preview menu item (in fact, I had no idea it existed or what it did.)
So the typical window layout that most users use is to put their source on one side taking up half of the screen and move the preview window to take up the other half of the screen.
The following key commands are useful to know:
- Command-T Compiles your document and displays the updated preview
- Command-B Runs
bibtex
on your document (orbiber
if you set that to be the default bibliography program) - Command-1 Switches between the source and preview windows (in both directions)
- Command-click in the source window, this will take you to the same approximate place in the typeset preview; in the preview window it will take you to the approximate place in the source (See What exactly is SyncTeX? for more details on how this works).
You can set the preferences to say how the windows are to be displayed when you re-open TeXShop. The two options are to remember the last position they were in, or to have them all open in fixed positions.
Best Answer
Yes. It calls an external program to typeset, so it must save the file first. Mac OS always gives a visual indication if the file has unsaved changes: the red "close window" button is blocked out. You will notice that the button clears whenever you typeset.
(Version 2.45 had a bug where it did not automatically save when typesetting. However, you would surely notice this, since changes would not appear in the output until you saved the file.)