TeXShop Changelog

What's new in TeXShop 5.33

Apr 25, 2024
  • When a new source file is first typeset, the output will appear in the Preview window scrolled to the top of the first page. Previously, it might be scrolled partly down this page.
  • When a preview window is closed and later the document is typeset, the preview window will reappear scrolled to the top of the first page. Previously it might be scrolled to a position in the middle of the document.
  • John Collin's latexmk has been updated to version 4.85.
  • TeXShop was only possible because Apple provided developers with pre-built objects for crucial tasks: NSTextView for an editor, and PdfKit for a preview window. When the project started, I anxiously looked through the Pdf API's to see if Apple provided a routine to replace the old pdf file being displayed by a new version of the file; they did.
  • Apple cannot anticipate or fully support all possible uses of their objects. When a new pdf is displayed in a window, it is always opened at the top of the file. If the view should be scrolled to a new position, I have to do that myself. But the API's assume that scroll bars are mostly manipulated by users, and provide only a vague "scroll region to visible" command for programmers to scroll the preview window. Moreover, if the programmer tries to scroll the pdf when it is opened, that scroll produces an annoying flash. I wrote Apple complaining about the flash, and they told me that there is nothing they can do to fix it. So I have to fix it at my end.
  • When a LaTeX source file is opened, TeXShop reads the file and displays the text in a source window. Then it checks to see if a related pdf file is available. If so, TeXShop opens the pdf in a preview window using a routine I wrote named "showWithPath". Later when the user typesets, TeXShop switches from the original pdf to the new pdf using a routine I wrote named "reShowWithPath".
  • The "showWithPath" code is straightforward and I have no problems revising it. But "reShowWithPath" is an entirely different matter and I dread having to even look at it. This is the piece of code that determines the scroll location of the old pdf, loads the new pdf, and then scrolls the new pdf to that same location. It also contains code which hides the screen for a fraction of a second so nobody sees the flash and then uncovers the screen before the user notices a pause and complains. All that scrolling is far from trivial because Apple doesn't provide code to do it automatically. If the user has eliminated part of the text before typesetting, the old scroll location may no longer occur and the code has to gracefully adjust. Just writing about "reShowWithPath" gives me the shivers, and having to modify it leads to nightmares. I hope I never have to touch it again.
  • The bugs fixed in version 5.33 are related to these routines. If you receive the source code of a document from a friend and open it in TeXShop, there is no pdf file to display and so "showWithPath" is never called. When you typeset, TeXShop calls "reShowWithPath", but there is no previous version and thus no previous scroll position. In this special situation, the revised "reShowWithPath" just initializes the pdf and displays it without scrolling. That same situation occurs when you begin writing a new document in TeXShop and haven't yet typeset it.
  • Each source document in TeXShop corresponds to an NSDocument object in computer memory. This object contains the source text and all the windows which might be needed to process it: source window, log window, console window, preview window, etc. If you close the source window, then all of this data is removed from computer memory. But if you close one of the auxiliary windows, like the preview window, it is removed from the screen, but all the data in NSDocument still exists in memory. If you typeset again, the preview window will reappear in its old position. This is not what users expect, since they believe that closing the window made it go away entirely. The final bug fix maintains that illusion by opening the window at its beginning, as though it were being opened for the first time.

New in TeXShop 5.32 (Apr 11, 2024)

  • Version 5.32 fixes one bug. The following process will trigger the process for a few people but probably not you. Create a source window using the menu command "New". Enter one or two lines of text and then save the file using the menu command "Save As". Quit TeXShop and restart it again. Open the new source file. The file's name will be added to TeXShop's "Window" menu, but the corresponding source window will not appear. It seems that TeXShop has created a source file which it cannot display. This is an alarming bug.
  • Here is the good news. There is nothing wrong with the file; it contains the correct text and can easily be opened using a trick. Even better, the bug only occurs if the user has selected "Syntax Color expl3 Code" in the TeXShop Source Window. This menu is a toggle which turns expl3 coloring on or off. When a window first opens, it is off. The only problem is that TeXShop has a hidden preference which turns the item on by default when windows are first opened: defaults write TeXShop expl3SyntaxColoring YES
  • Only users who set this hidden preference are likely to see the bug.
  • The bug has nothing to do with TeXShop's file saving code. It is a bug in TeXShop's syntax coloring code. When opening a source file, TeXShop syntax colors the source just before making the window visible. If the syntax coloring fails, the window is never made visible. TeXShop 5.32 fixes one step in the expl3 syntax coloring routine. After that, the routine does not fail and all windows open correctly.

New in TeXShop 5.31 (Mar 25, 2024)

  • Version 5.31, released one day after the 5.30 release, fixes two bugs in that release. The first bug caused the Preview window to advance a page after each typesetting job in Single and Double Page modes. The second bug caused new projects to set magnification to 100 when initially typeset.

New in TeXShop 5.30 (Mar 25, 2024)

  • Version 5.29 was never released. Version 5.30 fixes just one bug.
  • When TeXShop typesets a source file, it scrolls the pdf window of the new version to the spot visible in the preview window before typesetting. Consequently, the text shown after typesetting changes only slightly to show minor edits or new material added at the end. There are some exceptions. If the text starts with a table of contents covering several pages, and the aux file is deleted before typesetting, the output will jump several pages ahead after typesetting because the table of contents is missing and the document has fewer pages.A second typeset will restore the table of contents and return to the original spot.
  • If material is removed from a document before typesetting and the new document has fewer pages, it is possible that the visible rectangle in the original document is beyond the end of the document after typesetting. In version 4.28 and some earlier versions, TeXShop would then set the page number on the pdf toolbar to a large negative number. Moreover, in fit-to-window mode it could change the magnification of the page actually shown to 100 so the view no longer filled the window. These bugs are fixed.

New in TeXShop 5.28 (Mar 13, 2024)

  • A few subfolders of ~/Library/TeXShop/Engines/Inactive, including Arara and ConTeXt, were revised for this release.
  • TeXShop rewrites the Inactive folder whenever a new version of the program is released, but the rewrite is conservative, updating old files and adding new files and folders. No files or folders are ever removed, so the Inactive folder can become cluttered with irrelevant material. If you want only the latest version of this folder, move the Inactive folder to the desktop (do not move other folders). The next time TeXShop starts, it will recreate Inactive with the current default version.
  • When TeXShop displays a preview file containing links and the user hovers the mouse over a link, a small window temporarily opens showing the linked area. This behavior can be toggled on or off using the menu item ``Link Popups'' in the Preview menu. By default, the behavior is on when a document is first opened, but this default can now be changed using a hidden preference: defaults write LinkPopups NO
  • When TeXShop opens a source file, it checks the directory containing the file to see if it contains a file with the same name as the source but extension ".pdf". If so, TeXShop also opens the pdf file. If the user holds down the Option key while opening the file, the corresponding pdf file is not opened. This last behavior seems to have broken several years ago, but the feature works again.
  • A very interesting bug was reported by Jeff Simmons. Later he discovered the exact cause of the bug and suggested an appropriate fix. When a macro begins with the words "--applescript direct", the applescript is run by TeXShop itself. But when a macro begins with "--applescript", the macro is run by a small auxiliary program in TeXShop. Simmons created and ran such a macro. Later he logged out of macOS and logged in as a different user. But when he tried to run a new "--applescript" macro as this second user, TeXShop instead ran the original macro.
  • Because the auxiliary program is not TeXShop, TeXShop had to find a way to give it the applescript code it should run. Luckily, Unix provides a folder named tmp where programs can store temporary information. So TeXShop put the appropriate applescript program in tmp, and then gave the auxiliary program the name of this file. Since tmp may be used by many programs, knowing the name of the desired file is important.
  • Then the author of TeXShop (and that would be me) made a stupid mistake. He always used the same name for the applescript file in tmp. As long as the same user ran applescript programs, there was no issue, because each new applescript file in tmp overwrote the previous one. But if a user logged out and then logged in as someone else, the new user did not have permission to overwrite the previous file, so the old file remained and ran.
  • This is not a subtle mistake and Unix programmers are aghast after reading this explanation. But Simmons taught me an important lesson, and I'm grateful. By the way, it turns out that Apple has its own substitute for tmp and TeXShop now does the right thing. If you are a Cocoa programmer, please don't write me.

New in TeXShop 5.27 (Feb 13, 2024)

  • If TeXShop is quit when files are open, the files appear in their old location the next time TeXShop starts. This behavior depends on the setting "Close windows when quitting an application" in the Desktop and Dock module of System Preferences. Restoring windows sometimes caused a long delay opening TeXShop after rebooting the Mac. This delay was caused by calling "scroll rect to visible" rather than "goto page" when preview window contents were scrolled to their old position. Apparently the first option caused the Mac to render all the pages of the document before opening it. The problem is fixed.
  • John Collin's latexmk has been updated to version 4.83.
  • TeXShop can now syntax color expl3 code. See the chapter on expl3 in the TeXShop Manual, available in the TeXShop Help menu. According to a readme document from the LaTeX3 team, expl3 "provides the foundation on which new additions to the LaTeX kernel and other advanced extensions are built. The commands provided are not intended for use at the document level." By default, TeXShop syntax colors as usual, but if a new menu item is toggled on, it also syntax colors any expl3 code in the source.

New in TeXShop 5.25 (Jan 25, 2024)

  • As in earlier versions of TeXShop, if you hover the mouse over a link in the Preview window, a small window opens showing the text at the linked location; this window remains open for five seconds and then vanishes. There is a new menu item in the Preview menu called "Link Popups", suggested by Uwe Schmock. This menu is a toggle turning the hover behavior on or off. When it is on, the menu item is checked.
  • If you click in the contents of the Preview window while the Control key is down, a contextual menu opens. The "Link Popups" item is also in this contextual menu.
  • The details of the small window created by hovering over a link can be changed by holding down any combination of three modifier keys before moving a mouse to the link. These modifying keys have been changed so their names give a mnemonic for the effect they create. The SHIFT key shifts the small window to appear above the link, rather than below it. The COMMAND key commands that a bigger window with larger text be displayed. The OPTION key selects the optional behavior that the small window will remain on the screen until the mouse moves. (If a user forgets to push the option key, it can be pushed later; if it is down at the five second mark, the window will remain open.)
  • Latexmk by John Collins was upgraded to version 4.82a.
  • The Edit menu contains an item named "Experiment". Select a section of tricky source text, perhaps a complicated series of mathematical equations. Then select the item. A new small window appears, showing the selected source. This window contains a "Typeset" button. Pushing that button produces a second small window showing the typeset output. It is then possible to experiment with the tricky source without modifying the actual document source, until the experiment produces the correct result. Copy the corrected source back to the document.
  • This item works by creating a new source file for the experiment. The new source contains everything in the main document header up to but not including begin{document}, followed by begin{document}, the experimental source, and end{document}.
  • This even works if the header is the root document of a project, and the experimental source comes from one of the included files. However, previous versions of TeXShop assumed that begin{document} was in this root document. Otherwise the Experiment menu item did nothing.
  • This TeXShop code has been slightly revised. If begin{document} is not in the root document, then the entire root document is used rather than everything up to but not including begin{document}. The Experiment menu item may therefore work for a few additional projects.
  • The code implementing "switch views" in a Preview window that has not been split was completely rewritten for TeXShop 5.25. In version 5.23, there was noticeable creep of the two views as the views were switched over and over. This creep is gone and the views are now stable.
  • Recall how "Switch Views" works. Scroll the Preview window to an interesting spot. Press Option-2 to select this spot, i.e., view. Scroll to a second interesting spot or view. Now Option-2 switches between these two views. Either view can be scrolled when it is active and the scrolled position replaces the original position for that view.
  • In version 5.23, the two views were also the two views seen if the window was split. This is no longer the case. If either view is split, that view will become the top view in the split window, and the bottom view will show an entirely independent third position. If the window is then unsplit, and Option-2 is used to switch to the alternate view in the full window, and then the window is split again, the alternate view will be the top view in the split window and the bottom view will be the same bottom view seen earlier.
  • Thus combining our two full views with splitting windows allows us to work with three independent portions of the pdf file.
  • Any "Display Format" and "Magnification" change made to a Preview Window affects both views. Thus if the window is changed to Double MultiPage mode and later switched with Option-2, the new view will also be in Double MultiPage mode.
  • Finally, substantial efforts were made to improve the "split window" feature in the Preview window. This feature is difficult to modify because users have many ways to change how it works, and improving it for one group of users can makes it worse for a different group of users. Users can split the window vertically or horizontally, they can move the bar separating the two pieces, they can scroll either piece, they can change the display format and magnification of the pieces, they can switch the two pieces. These users may be working on multiple window mode with separate source and preview windows, or single window mode with source and preview in separate halves of a single window. And after all these changes are made and the window is unsplit, users expect to be back to one normal window without any surprises.
  • A few users told me that as soon as something unexpected happened when splitting a window, they stopped using the feature for fear that the underlying pdf file would be damaged. So a word of reassurance is in order. None of these display modifications are written back to the pdf file. They only affect how TeXShop displays the file. If TeXShop does something strange, the file is perfectly safe. Retreat to full window mode and proceed as if nothing happened. If you like, write me to explain the surprise behavior. Then relax.
  • A major complaint has been "display creep." A user splits the window, works in this mode for a while, then unsplits and expects to be exactly back where they started, only to discover that the text crept up or down by several lines. These users then cycle through split/unsplit cycles several times and noticed that each produces a further creep. A major effort has gone into eliminating these creeps. The program isn't perfect, but it is better than before.
  • The "creep problem" depends on display mode. In single page or double page modes, it is not a problem. The more common modes are multipage and double multipage modes, and there creep can occur. An effort was made to reduce the problem in these two modes.
  • If the Option key is held down when a window is split, the split is vertical. This mode actually works as expected, provided you know what to expect. When a window is split, the original single full window's contents are placed in the left vertical side. Since vertical sections are narrower than before, more pages are shown. The original unsplit page is at the bottom of this display rather than the top. This is by design. Similarly when the window is unsplit, the bottom portion of the left side will become the new single window. This is also by design. If the left side is scrolled during the split phase, the new material at the bottom of the left side will become the full window after unsplitting.
  • If the option key is not held down when a window is split, the split is horizontal and the original window's contents are placed in the top half. This is the point where major creeping occurred. To fix the problem, the behavior of unsplitting such a window has changed slightly. In version 5.25, TeXShop remembers the position of the window just before it was split, and that location returns when the window is unsplit. While the window is split, the top can be scrolled elsewhere. But when the window is unsplit, this new position will not expand to the full window; instead the window will return to its original position.
  • However, it is easy to scroll the top to a new position that is "permanent." Temporarily unsplit the window, scroll to the new position, and split again. The old bottom half did not change, but the top half is at a new position and that position will be remembered and returned to the next time the window is unsplit.
  • Note that this new behavior only affects horizontal splitting in Multipage or Double Multipage modes.
  • As in earlier versions of TeXShop, the lower and upper versions of the display can be switched by typing Option-2. This is rarely done, mainly in the situation where the user wants the lower half of the split window to become the full window when it is unsplit. But our "creep fix" cannot be applied in this case because the lower half was never in full page mode, and thus TeXShop does not have a full page mode to remember and return to. So in this very special case, the old code from TeXShop 5.24 is used when the window is unsplit. Consequently, Option-2 may produce slight creep, but since it is rarely used, that should not matter.
  • Two special variations have been added to the split window command in horizontal mode. Most users should ignore these variations, but one or two users may find them helpful. If the shift and control keys are held down when the Split Window menu is selected or the corresponding tool is checked, the window is forced to split so the lower and upper views are the same size. If just the shift key is held down in the same situation, the two views are forced to have the same size and they contain the same material. The first of these variations may be useful for users who rarely move the split bar and never change the magnification of either view. These users probably already have a stable situation without creep. In those rare cases when they do move the split bar (and pay with additional creep), the option takes them back to the stable situation. The second variation was created for a user who lectures directly from a screen showing typeset course notes. He typically shows a full window view of the notes. But when he comes to a theorem, he splits the screen using the second variation. The theorem remains in the upper view, so students can refer back to it and recall the assumptions required for the conclusion. Meanwhile the lower view can be scrolled to show examples and then key steps of the proof.

New in TeXShop 5.24 (Jan 3, 2024)

  • After a document is typeset, the new pdf file is loaded into the Preview Window, replacing the old version. This pdf must be scrolled to the exact spot shown before typesetting, so only edited items change and the document does not slowly creep up and down, or abruptly shift. Apple's PDFKit routines do not have a call making this task easy, so improving preview behavior has been a constant struggle over the years. In the last versions of TeXShop (in multipage and double multipage display modes) the image was very stable unless only a small portion of the upper page was shown and most of the screen displayed the following page. In that case, after typesetting the lower page jumped to fill the entire window. It was possible to predict exactly when this jump would occur. Slowly scroll the Preview window while looking at the "Page Number" item in the tool bar. When only about 1/3 of the top page is visible, the page number will suddenly jump to the next page. After that, typesetting will cause the undesirable jump.
  • This problem is fixed in TeXShop 5.24. I do not know exactly why my fix works, but several users have confirmed that it does. Don't look a gift horse in the mouth.
  • Incidentally, large changes made in the beginning of a document before it was scrolled to the current position and then typeset cause jumps which are unavoidable. This typically happens if a document has a table of contents. If a user kills the aux file and then typesets, the table of contents will vanish and the typeset document will jump ahead by several pages. Typesetting again creates the table of contents and the document jumps back to the expected place.
  • When the TeXShop icon is in the dock and TeXShop is running, holding the mouse button down over the program icon brings up a contextual menu listing several possible actions. This menu is created by Apple with no TeXShop code involved. But it is possible for programmers to add items to the menu, and some Apple programs like TextEdit add a "New Document" item. So does TeXShop in version 5.24.
  • TeXShop now contains latexmk version 4.82 by John Collins. Latexmk is also in TeX Live, and TeXShop will use that copy if it is available. Otherwise TeXShop will default to its internal copy of latexmk.
  • The "About TeXShop" dialog contained the line "Copyright 2001-2023, Richard Koch". The year 2023 has been replaced by 2024.

New in TeXShop 5.23 (Dec 20, 2023)

  • If your Macintosh is appropriately configured and you close TeXShop with a project open on the screen, that project will reappear when TeXShop is restarted, with the windows in the same positions they were in just before TeXShop quit. Until recently this happened instantly, but in the last several versions of TeXShop there was a delay before the old windows reappeared. This turns out to be an error on my part, and it is fixed.
  • The package hyperref can create links from one portion of a document to another. For instance, each entry in the table of contents can become a link to that item in the text, and any reference to a theorem proved earlier can be followed by a link to the actual statement of the theorem. These links are active in the Preview window, so clicking on a link takes you to the corresponding linked spot in the text.
  • Hovering over such links will bring up a small view of the linked text without moving the scroll bar. This is convenient if you are proofreading a series of linked items. For instance, hovering over a section number in the table of contents will display the beginning of that section in the text. Normally the popup is on screen for four seconds and then disappears. If the Shift key is down at the end of these four seconds, the popup will remain on the screen until the mouse moves. For a larger version of the popup, hold down the Option key before hovering over the link. (In previous versions of TeXShop, the Option key played both of these roles.)
  • This facility is enhanced in version 5.23 of TeXShop due to Uwe Schmock's request. Normally the popup is shown just below the link in the text. But sometimes the author will want to compare what comes right after the link to the information in the popup. In that case, hold down the Command key before activating the popup. The popup window will then appear just above the link. This trick can be combined with the Shift and Option key tricks mentioned in the previous paragraph.
  • TeXShop has a Macro facility which makes it possible for users to write applescripts to control common procedures. This impressive Macro facility and the Macro Editor were added to TeXShop long ago by Mitsuhiro Shishikura. The current expert in applescripts is Michael Sharpe, who wrote the wonderful document "Notes on Applescript in TeXShop" in the TeXShop Help Menu.
  • TeXShop provides a number of constants that can be used in Applescripts it runs. These are listed in section 5 of Sharpe's manual. Examples are #FILEPATH#, #PDFPATH#, #DVIPATH#, #PSPATH#. The first provides the full path to the TeX source file, which might be /Users/koch/Documents/Fourier/Fourier.tex. Others give full paths to the pdf file, dvi file, etc., in the same folder. One missing constant sometimes requested is #FOLDERPATH#, which would give a full path to the folder containing these files, rather than individual files in the folder. In the example just quoted, it would give /Users/koch/Documents/Fourier/. I recently discovered a request made four years ago on stackoverflow for such a constant, together with several later requests. Version 5.23 of TeXShop finally provides this missing constant.
  • In the TeXShop manual (which is typeset with XeLaTeX), I activated hyperref with the LaTeX command
  • usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue,
  • citecolor=blue, urlcolor=blue, hyperfigures=true]{hyperref}
  • Uwe Schmock pointed out that adding "bookmarksnumbered" to this command would number the chapters and sections shown in the TeXShop drawer. As we will see, that proves to be a useful change for the manual and may be a useful change for your documents as well. Just change the command to
  • usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue,
  • citecolor=blue, urlcolor=blue, hyperfigures=true, bookmarksnumbered]{hyperref}
  • A new item was added to the Windows menu, "Switch Views". This item is only active if the Preview Window is active. If the Preview Window has been split, the item interchanges the top and bottom views. When the window is later unsplit, the top portion becomes the full contents of the window. Using "Switch Views" before unsplitting brings the bottom portion to the full window.
  • The "Switch Views" menu item also works when the Preview Window is active and unsplit, and this use case may prove to be more important than the original reason for introducing the command. Suppose you want to work on two related portions of a document. In TeXShop's Preview Window, do not split the view. Instead, just scroll to one of the two interesting portions of your document. Then select "Switch Views" and scroll to a second related section of the document. You can now switch between these two portions using the Window menu "Switch Views", which has a keyboard shortcut Option-2.
  • So your document can have two active portions and you can switch between them with Option-2. Although "Switch Views" does not work in the Source window, you can easily edit and revise the two related portions of your document because sync works between the two Preview views and the source file. Suppose text in one of the two portions needs revision. Sync from that text to the source, edit the source, and retypeset.
  • The new command is not perfect. The two views may creep gradually when switched, so a little adjustment with the scroll bar might be needed after switching views. The creep depends on window size and monitor size and may be acceptable for some configurations and not acceptable for others. Perhaps we can improve the feature in later TeXShop versions.
  • A long time ago, a different keystroke sequence was introduced to switch the views of a split preview window. That keystroke sequence has been removed in Version 5.23 because the new menu item is easy to find and use.
  • TeXShop configures the way documents are displayed using two preference items, which it calls "Display Format" and "Magnification". Typical display formats are Single Page, Double Page, Multipage, Double Multipage. Typical magnification items are Fit to Window, Actual Size, and Fixed Magnification. These items can be selected in TeXShop Preferences, and then affect Preview windows when they first open.
  • After a document is open, the two preference items can be changed for a particular Preview window using items in the Preview menu. These choices are temporary while the document is being used, but revert back to the default choices for new documents.
  • When the window is not split, the Preview menu's submenu items "Magnification" and "Display Format" affect the document as a whole, and thus both views simultaneously. So if you change the magnification of the current view, and later use "Switch Views", the second view will also use the new magnification level. If you switch to "Double Page" mode in the current view and later use "Switch Views", the second view will also be in Double Page mode.
  • When the Preview window is split so both views are shown simultaneously, "Magnification" and "Display Format" changes made to the top view affect the entire document as above. Thus if the window is later unsplit, this changes will hold in the entire document, and also apply after "Switch Views" is used.
  • However, when the Preview window is split so both views are shown simultaneously, "Magnification" and "Display Format" changes made to the bottom view will only apply to that portion of the split window, and only as long as the window remains split. This slight design inconsistency makes it possible for a user working with two sections of the document to temporarily magnify the bottom section and inspect fine details without propagating that magnification change to the rest of the interface.
  • An interesting and rather complicated interaction occurs when the Preview window is split and the drawer for this window is open. To describe this interaction, we introduce a concept well-known to Macintosh programmers, but perhaps not to users. Suppose your Macintosh is in use and you type on the keyboard. How does the Macintosh know where to send those keystrokes? Which window should receive them? Which view of a split view? If the drawer of a window is open, should the keystroke go to the drawer or the window?
  • It turns out that at any moment the Macintosh has selected a "first responder". This is the object that first learns of keystrokes. The first responder is the beginning of a chain of more and more general objects. If the first responder is the drawer attached to a window, the keystroke goes to that drawer. But if the drawer cannot use the keystroke, it passes down the chain to the next object, which might be the view associated with that drawer. If the view in turn cannot use the keystroke, it passes further down the chain, perhaps to the window containing the view. If this window cannot use the keystroke, then the keystroke is lost and does nothing.
  • The first responder will change as a user works. Often this happens when the user clicks on a different view. In the example just given, if the window has a split view and the user clicks on the top view, then that view becomes first responder. Then keystrokes never reach the drawer, but instead pass from the top view to the full window. -All of this is complicated and often works ``automatically'' without even the programmer knowing the details of these responder chains.
  • Consider now the following example. Suppose a preview window is active and contains two split views and an open drawer. Suppose the drawer is showing the various chapters of a document, and these chapters are numbered. If you select the second chapter of your document in the drawer, the top view will scroll to the start of this second chapter, and the drawer will mark the second chapter in blue. That blue mark indicates that the drawer is still the first responder.
  • It turns out that numbered drawer contents respond to keyboard shortcuts. If you type Option-1, the drawer will select the first chapter. If you type Option-2 followed by Option-0, the drawer will select chapter 20. Type Option-UpArrow to select the first item and Option-DownArrow to select the last item. Type Option-1.5 to select Chapter 1, Section 5. If chapter 3 is selected, Option-RightArrow will open sub-levels and Option-LeftArrow will close sub-levels. Although these keystrokes select drawer items, it is still necessary to click these items to make the associated view scroll to them.
  • But how do we select items displayed in the bottom view? To do that, click in the bottom view. Notice that the blue selection bands in the drawer change to gray bands. So the drawer is no longer first responder; instead the bottom view is first responder. This action made another invisible change. It sent a message to the drawer's contents linking them to the second view. Now chapters and sections can be selected in the second view.
  • There is a final interesting interaction. Select a chapter in the drawer and type Option-2. This command does not switch the two views, because the first responder is the drawer rather than the Preview Window. Instead it selects chapter 2 in the drawer. But if we click in either view, then that view becomes first responder rather than the drawer. So if we type Option-2, this keystroke will not go to the drawer, but rather to the view just clicked. That view does not understand Option-2, so it passes it on down to the Preview Window. The Preview Window does understand Option-2 as a shortcut for "Switch Views" and switches the views.
  • Pdf documents can be encrypted and password-protected by Apple's Preview, or the commercial version of Adobe Acrobat. Such documents can still be opened by TeXShop and other pdf viewers. When the document is opened a window appears, but instead of showing the document, the window contains a text field where the user can type the password. After the user types that password, the document opens.
  • TeXShop does not contain a single line of code to make this happen. The initial page with a password entry field is created and managed by Apple, and the document is then decrypted when read from disk by Apple. TeXShop was not even recompiled to make this happen. Instead one day an update to macOS appeared and TeXShop got the feature for free. This is the glory of Cocoa (and Swift).
  • Uwe Schmock wrote me after he distributed password-protected notes for his students. He discovered a small number of problems when TeXShop views a password-protected file. These problems are fixed in version 5.23 of TeXShop.
  • The first problem was that the contents of the drawer were empty when such a document was displayed. The reason is that TeXShop initialized the drawer before Apple began decrypting the file. This bug is fixed.
  • The second problem was that when splitting the document horizontally or vertically, the position of the splitting bar was severely limited. This bug was caused because Apple applied constraints to the views displaying the two pieces, but TeXShop does not use constraints to position subviews. This problem is also fixed.
  • A final problem is that students must remember the password of a file that they intend to read often. Many students save a short document on the computer listing passwords required in this way, but that certainly makes the password system less secure. Apple has a system to solve this problem. When the user types a password, Apple offers to save it in their keychain, which is encrypted. Unfortunately, Apple does not make that offer when opening a password protected pdf file. Perhaps in the future, ...
  • In the meantime, students might employ a trick to make passwords easier to use with commonly read encrypted documents. In the Macro menu, select "Open Macro Editor". An editor appears. Select "New Item" and give the item an easy name. Then enter the following code:
  • --Applescript direct
  • tell application "System Events" to keystroke "password"
  • tell application "System Events" to keystroke return
  • Replace the text "password" inside the quotation marks with the actual password. Save the macro. When the text field appears asking for a password, select this macro.
  • There will be one problem. MacOS does not allow Applescripts to control the computer in this manner without permission. So when the macro is first run, an error message will appear. Sometimes, but not always, Apple will open System Settings to the spot where the appropriate permission can be given. That spot is the Privacy & Security module of System Preferences, and the item "Automation" in this item. A special item for TeXShop can be created and given permission to control "System Events".

New in TeXShop 5.22 (Nov 16, 2023)

  • If the user removes a folder from ~/Library/TeXShop and then runs TeXShop, the folder will be recreated with default contents. Curiously, this did not apply to the folder ~/Library/TeXShop/Engines/Inactive, but now it does. Before this change, a user could remove ~/Library/TeXShop/Engines and that entire folder would be recreated, including the Inactive subdirectory, but that technique destroyed any special engines the user might have created.
  • When new versions of TeXShop are introduced, most folders in ~/Library/TeXShop are not changed because these folders store files created and edited by the user. But the Inactive folder is updated because users should have the latest versions of these items. This update adds new files and folders and modifies existing files and folders, but it does not remove files or folders no longer needed. I'm thinking of changing this behavior so Inactive is completely "cleaned up", but that is a more drastic step that needs to be carefully considered. In the meantime, users can accomplish that complete cleanup by removing the Inactive folder and letting TeXShop recreate it.
  • The Typst program was recently updated to version 0.9.0, and Jeroen Scheerder updated the material in ~/Library/TeXShop/Engines/Inactive/Typst for the new version. If you are already using Typst in TeXShop, go to this location. An early section in the document "AboutTypst.pdf" explains how to download and install Typst. Follow these instructions to obtain the new version. The last section of this document explains how to move the contents of the "Advanced" folder into appropriate places. Scheerder revised the contents of "Advanced", so move the revised folders into the same spots.
  • Version 5.20 added a preference item to activate transparency when calling Ghostscript. That item adds a flag to Ghostscript calls, but the flag is only relevant on recent versions of Ghostscript. So TeXShop checked the version of Ghostscript and did not add the flag if the version being used was not recent enough. This check involved calling a shell script that was incompetently written (by me) and failed in Sonoma. The script has been rewritten and the bug is fixed on Sonoma.
  • In version 4.61, the bibtex UTI was changed from org.tug.bib to org.tug.tex.bibtex at the request of the BibDesk team. But not all data structures were changed, breaking the creation of new bibtex files from within TeXShop. This bug was not noticed until now. It is fixed.
  • Version 5.03 of TeXShop included an example program explaining how to create interactive documents using tex4ht. The source code for such a document is ordinary latex. When typeset by pdflatex, the result is a static pdf file. But when typeset by tex4ht, the result is a web page with interactive content. The sample document is in ~/Library/TeXShop/New/Demo.
  • Since tex4ht can output MathJax calls, the mathematical formulas on the web pages it creates are essentially perfect. But the illustrations are sometimes distorted. Recently I read a brief note by Michal Hoftich, who maintains tex4ht, explaining how to fix this problem. So TeXShop 5.22 installs a new folder, ~/Library/TeXShop/New/Demo-Additions-5.22, containing a Read-Me file explaining the very simple modification to the Demo document which fixes illustrations. These Read-Me changes can be made in the same manner to other documents typeset by tex4ht.

New in TeXShop 5.21 (Oct 22, 2023)

  • Jeroen Scheerder improved the support of Typst by using the Packages system now under construction in that project. Packages are similar to style and class files in the LaTeX world; they extend the capabilities of the typesetting system. Scheerder separated each sample program provided in TeXShop 5.20 into a package and a template. The package is hidden away in ~/Library/Application Support/typst and the template is available in the TeXShop templates pulldown in the source window. This makes it possible to start a new project by selecting an initial template and adding material to it. The templates can be edited by users to fit their precise requirements.
  • If a source project opened an html window in TeXShop, and the source was then closed without first closing the html window, TeXShop would sometimes crash. This is fixed.
  • The Chinese localization in 5.20 had one item translated by Google rather than the official localizer. This is fixed.
  • A small number of Interface Builder connections led to objects that no longer exist. This caused cautionary items in the log file, although TeXShop ran fine. The connections are gone and the log entries no longer appear.
  • The log file complained that "unarchiving safe plist type 'NSString' occurred" and warned that this would be disallowed in the future. This is fixed and the log entry is gone.

New in TeXShop 5.20 (Oct 11, 2023)

  • Some people complained that line numbers in the source file are too small to read. A new preference under the "Source" tab allows users to choose between small and large line numbers.
  • The Typst project by Martin Haug and Laurenz Mädje is a complete rewrite of both the input language and the typesetting abilities of TeX and LaTeX. See https://typst.app for details. A TeXShop user, Jeroen Scheerder, recently created an engine file that allows TeXShop to typeset Typst sources. Version 5.20 of TeXShop contains that engine in ~/Library/TeXShop/Engines/Inactive/Typst. This folder also contains simple typst source files, called templates, and instructions explaining how to download and install typst. Thus users can easily experiment with Typst using TeXShop.
  • Typst source files have extension ".typ". This file extension was added to the list of extensions that TeXShop is willing to create and open, and to the list of file types that TeXShop can typeset. Moreover, source files with extension ".typ" can be added to ~/Library/TeXShop/Templates and then will appear in the Templates pulldown menu in the source window.
  • Version 5.18 of TeXShop contains a preference which adds a flag whenever Ghostscript is called telling the program to process transparency operators. This flag is understood by Ghostscript 9.51 and later, so TeXShop has code which checks the version of Ghostscript running, and does not add the flag when the version is earlier than 9.51. But very shortly after the release of TeXShop 5.18, Matthias Schmidt read that code and discovered that it did nothing because it was deactivated by a line of debugging code I forgot to remove. I silently fixed the bug and most people updating to version 5.18 received a version without this bug. Since the bug was minor, I decided not to release a new version just to fix it. It is fixed for everyone in version 5.20.
  • The TeXShop manual was updated slightly to describe the changes in version 5.20. Uwe Schmock has also improved the manual and some of his changes are in the latest version.
  • Max Horn runs an important web site which may be unknown to most TeXShop users. The site is https://github.com/TeXShop/TeXShop and contains the source code for most versions of TeXShop since the program began. While the Horn site was under construction, I sent him old sources obtained by turned on computers that had last run twenty years ago; they started right up! That is how I found the original sources for the earliest TeXShop, which are linked from the the main TeXShop page, https://pages.uoregon.edu/koch/texshop/texshop.html.
  • I am ashamed to admit that git remains a mystery to me. So Horn has access to valuable information I know nothing about. Here's an example. Horn recently reported that the 5.18 sources suddenly contained a complete copy of the final program. That was 90 megs of useless information. Sure enough, a copy had accidentally been saved in the wrong spot. This problem was immediately fixed on the web, but I'm gradually digesting a list from Horn of other elements in the current sources that are probably no longer relevant.

New in TeXShop 5.18 (Sep 22, 2023)

  • Modern versions of Ghostscript do not process transparency operators in ps files unless the flag -dALLOWSPSTRANSPARENCY is added to the function call. In TeXShop 5.18, a preference item titled "Ghostscript Options" under the Typesetting tab can be checked to activate the flag. This activation only applies in two circumstances.
  • When TeXShop opens a postscript file, it calls ps2pdf to convert the postscript to pdf and opens the pdf file. Without the flag, transparency will be ignored in the ps file. With the flag, it will be respected.
  • When TeXShop typesets files in DVI mode, it runs TeX or LaTeX to create a dvi file, runs dvips to create a postscript file, converts the postscript file to pdf using ps2pdf, and displays the pdf file. Projects typeset in this way can use the package pstricks for extra typesetting effects, and pstricks can add transparency to illustrations. Typesetting will only preserve transparency if the flag is set.
  • The flag requires Ghostscript 9.51 or higher. It has no effect when used with earlier versions of Ghostscript.
  • The flag is added (in DVI mode) only if the user has not added "--distillerops" to the simpdftex preference settings. TeXShop does not want to interfere with users who are carefully controlling the Ghostscript flags themselves.
  • This preference item should still work when users supply their own Ghostscript, possibly from macports or homebrew, but that has not been tested.
  • Two sample files are provided for experimentation with the new setting. Select the TeXShop menu "Open ~/Library/TeXShop" and navigate to the folder New/Version-5.18. This folder contains two files which can be copied to your home directory: Transparency.ps and Transparency.tex. Open Transparency.ps in TeXShop. If the new item is not selected, the ruler in the illustration will cover the material underneath. If the new item is selected, the ruler will be partially transparent and show items underneath. Typeset the source file Transparency.tex to see the same change of behavior when typesetting in DVI mode. These samples were provided by Antonis Tsolomitis, with email address [email protected] and web url https://myria.math.aegean.gr/~atsol/newpage-en/.
  • When new typesetting methods become available or older methods require new flags to operate properly, the changes are generally handled in TeXShop by creating new engine files. Herbert Schulz created such engines for transparency, available in ~/Library/TeXShop/Engines/Inactive/GhostscriptTransparencyEngines. The new preference item does not affect these engines, and the engines are more flexible than the preference setting, handling for instance versions of Ghostscript earlier than 9.51. Use Herbert's engines for full control. The new preference is for users who run into a problem and want to click a box for a quick solution.

New in TeXShop 5.17 (Sep 22, 2023)

  • In Single Window mode, after typesetting a project with a root file the root source was brought forward even if the "Continue Editing" preference was selected. This behavior has been fixed by Matthias Schmidt.
  • Uwe Schmock improved the formatting of the TeXShop Manual.

New in TeXShop 5.16 (Aug 25, 2023)

  • There are improvements in the German localization. The "Sharing" and "Mouse Mode" items in the toolbar are translated, and the "Split Window" item has been given a less ambiguous translation. A few translations were tweeked to add consistency and remove typos.
  • A bug with the "Magnification" and "Page Number" items in single window toolbar is fixed. Previously, these items opened an empty preview window, a confusing action in single window mode.

New in TeXShop 5.15 (Jul 23, 2023)

  • Some translations of toolbar items in various languages did not actually appear when TeXShop ran. This should be fixed.
  • A number of German toolbar items were left in English, but should now appear in German.
  • The label tool now correctly appears in German in single window mode. The crash is gone.
  • When using single window mode in English, selecting the magnifying glass tool made it impossible to select any other tool. As a workaround, users were told to hold down the Option key while selecting other items. The bug is now fixed and the workaround is no longer needed.

New in TeXShop 5.14 (Jul 10, 2023)

  • TeXShop 5.14 fixes a crash bug in the German localization of TeXShop. This bug has been present for a long time and only affected single window mode. In that mode, TeXShop crashed when the user tried to customize the toolbar.
  • The bug was caused by the "Labels" tool. The fix eliminates that tool, but only in German and only in single window mode.
  • The user reporting this bug ran into another bug which had been reported earlier. In single window mode, selecting the magnifying glass makes it impossible to switch to other "mouse modes" like text selection and pdf selection. This problem occurs in English and a few other localizations, but there is an easy work around. Hold down the Option key while selecting other tools and then selection works.
  • A new chapter titled "Working Around Bugs" has been added to the TeXShop manual listing this action. Sometimes it is easier to work around a bug than to fix it, and these cases will be listed in the new chapter. Let us hope that it remains short.

New in TeXShop 5.13 (Jul 7, 2023)

  • The Preferences dialog has a button labeled "Set Default Values" at the bottom. Selecting this item changes all items in Preferences to their defaults when TeXShop is first opened. A bug in this command caused it to ignore reverting the source font or font size. This bug is fixed.
  • After selecting "Set Default Values", the "Cancel" and "OK" buttons in Preferences work as usual, so selecting "Cancel" returns to the current defaults, while "OK" accepts the default values.
  • Note that "Set Default Values" followed by "OK" removes any hidden preferences you may have set, so it should be used with caution. However, the new TeXShop Manual in TeXShop Help, added in version 5.12, has a list of all hidden preferences at the very end. The list is long, but you may be able to find a preference there that you set and then forgot.
  • If TeXShop is configured to open all documents in Single Window mode, and the program is quit while windows are open, these windows will be restored the next time the program runs. However, TeXShop did not restore the position of the divider between source and preview views and the divider would be placed in the middle of the single window. Now TeXShop restores the position of the divider.
  • In TeXShop Preferences under the Editor tab, the last three items in the Style box sometimes displayed as integers and sometimes as real numbers. The TeXShop Manual claimed that these items do not work and can be ignored. But in fact the items work after a restart of TeXShop.
  • Now the items always display as integers and take integer values.
  • Moreover, setting an item causes an immediate change in any open source window, so users can experiment until they find satisfactory values. There is a small caveat. TeXShop only learns of changed values when the item is deactivated, so to see the result in open source windows, change a value and then click in a different box. It is tempting to instead push RETURN, but this accepts all changes and closes the Preferences window.
  • After making changes in the Style fields, the "Cancel" and "OK" buttons in Preferences work as usual to reject or accept all changes. If Style changes are rejected, source windows return to their previous style.
  • In the German localization, the "Parens Targets & Highlight Color" item in TeXShop Preferences under the Source tab was not hooked up correctly and misbehaved when used. This is fixed.
  • A number of small changes in the German localization were made for greater consistency across the interface.

New in TeXShop 5.12 (Feb 22, 2023)

  • The folder ~/Library/TeXShop/Engines/Inactive/PreTeXt was revised and the three main PreTeXt engines were rewritten. Consequently, many more examples in mathbook can be typeset with TeXShop.
  • The Help menu contains a new 180 page manual for TeXShop. This help manual can be printed if you want a hard copy, and it can be converted to a stand alone pdf file by selecting "Save as PDF" in the print dialog.
  • The Help menu also contains a TeXShop Help Panel. This collection of web pages was the older way of documenting programs, but we stopped updating the panel around the release of Lion.

New in TeXShop 5.11 (Feb 1, 2023)

  • Zheng-chao Han notified me of a bug when TeXShop typesets a source file stored in iCloud. To be honest, I had never used iCloud until this report. It was a pleasure to discover that TeXShop easily typesets files stored there. In version 5 of TeXShop, there is a new html preview window, which can be used to preview typesetting jobs which output html rather than pdf. But TeXShop would not open html files stored in iCloud, due to a space in one of the directory names in the full path to these files. This is fixed.
  • Incidentally, TeXShop does not work well with the third party product Google Drive. The insertion cursor will randomly jump to the bottom of the page when editing source files on this system. I suspect that Google Drive does not understand automatic saving. The solution is to move source files from Google Drive to your personal machine before editing them, and move the changed versions back to Google Drive when you are done. I cannot fix this problem because I do not have access to Google Drive source code. But they can fix it because they have access to my code.
  • Simon C. Leemann suggested changing the symbols for PageUp and PageDown in the various Preview Windows to up and down arrows rather than left and right chevron symbols. Done.
  • Apple added support for tabbed windows in Cocoa, starting in macOS High Sierra. TeXShop adopted this feature and customized it slightly for LaTeX by defining a couple of magic comment lines about tabs, and adding a Preference Pane setting labeled "If Sync Opens a New Window, Open as Tab in Root Window."
  • Later, Apple improved their tab support, making it possible to provide full support for tabs in TeXShop starting with version 4.72. Read the Changes section for version 4.72 for details. To turn on this full support, find the item "Open New Windows as Tabs" in TeXShop Preferences and in the associated pull-down menu select "Always".
  • When choosing this item, the magic comment lines about tabs should not be used, and the setting "If Sync Opens a New Window, Open as Tab in Root Window" should not be selected. I should remove these features, but I hate to remove items which some people may still be using. Thanks to Mark Auer for pointing out that if both preference items just mentioned are selected, names of tabs can become permuted so the tab named "Chapter 1" can select source for "Chapter 2", etc.
  • Mark Auer later reported another bug. If a tabbed window has a root file tab and tabs for various included chapter files, and if the project is typeset while showing the source for a particular chapter, the window switches to showing the root tab, even though the user is only interested in the chapter's source. Sadly, I could not reproduce this bug.
  • Auer then sent me vast amounts of information about the bug. He made a movie showing it in action. He sent pictures of all of his TeXShop preference settings. He made a tiny example illustrating the problem. I looked and looked at all this information. Eventually I noticed that Mark wrote "! %TEX root = ./MyRoot.tex" while I wrote "! %TEX root = MyRoot.tex". Both are correct, but that extra "./" caused the problem. Both forms are now accepted. Thanks, Mark.
  • Latexmk was updated to version 4.79. Note that TeXShop uses the version of latexmk in TeX Live if it is available.

New in TeXShop 5.10 (Dec 30, 2022)

  • The preference items to set the document and console fonts were broken in the English localization of version 5.09. Now they are fixed.

New in TeXShop 5.09 (Dec 28, 2022)

  • Marco Santi wanted a preference to set the font and size of text in the Macro Editor. There is already a preference to change the default font in the console. To avoid cluttering the Preference Dialog, version 5.09 allows users to also use this console font in the Macro Editor. Just check the box "Use Also for Macro Editor" under the Console Tab.
  • Kurt Richard Todoroff reported an important bug that I could never reproduce. Just before typesettting concluded, his console would stop reporting output and the program would become unresponsive. Luckily, Todoroff knew exactly when this bug was introduced. Although he was using version 5.08, he told me that versions 5.00 and 5.01 typeset without problems but version 5.02 often failed.
  • For the next several days, Todoroff tested versions of the program which I sent him. First I sent unlabeled programs A and B. He reported that A didn't work, but B worked fine. Program A was 5.02 and program B was 5.01. That test gave me confidence to proceed!
  • Version 5.02 was a minor update which fixed a bug in "Highlight Current Line." I asked Todoroff to turn off "Highlight Current Line" in version 5.08 and the bug disappeared. I then replaced my fix of both "Highlight Current Line" and "Use Block Cursor" with a better fix and the problem went away.
  • If you are curious, I'll say more. "Highlight Current Line" draws a light blue background under the line containing the insertion cursor. If the user clicks on a different line, this background must be erased, and then a background must be added under the new line. To erase the background of the old line, I originally erased the background of all lines in the visible portion of the source. But if the user scrolled so the original line was no longer on the screen and then clicked at a new spot, the old background would not be erased, and scrolling could later reveal two different current lines. In version 5.02, I fixed this by erasing the background color of the entire source text. This fix was very inefficient and bit me in the end. Now there is a much better fix.

New in TeXShop 5.08 (Dec 11, 2022)

  • As reported in the version 5.03 changes, a user noticed that the insertion cursor -- the blinking vertical bar in the editor -- can occasionally vanish. The editor still knows where it is, so characters are inserted if you type. But the cursor is missing.
  • Recently, the same user found a way to trigger this bug. If you type command-space, a spotlight search field appears. When this field is dismissed, the cursor has vanished. Knowing how to create the bug makes it easy to figure out how to get the cursor back. Just click in a blank area of the desktop and then in the source window, and the cursor will return. Clicking in another TeXShop window or some other program's window will also do the trick. I'm still working on eliminating the bug completely.
  • When you open a file in TeXShop, the open dialog has a pull-down menu at the bottom allowing you to select the file's encoding. In Ventura, you must push the "Show Options" button to see this menu. If the menu is not used, TeXShop will use the default encoding set in TeXShop Preferences, which is almost always what you want. But if your colleagues send you a source with an unusual encoding, the pull-down menu is useful.
  • Until recently, a similar menu appeared at the bottom of the save dialog. But it was seldom used because without it TeXShop saves files with the same encoding used to open them, as you'd expect.
  • However, some users were tempted to use the menu to change file encodings. They would open a file using one encoding, and then save it using a different encoding. This is dangerous because characters available in one encoding but not in the other will be lost; since the file is overwritten in the process, these characters cannot be recovered. Therefore I removed the menu from the save dialog.
  • Recently, Unicode UTF-8 has become the standard encoding. It has the advantage of preserving all characters. Internally the TeXShop editor uses unicode. The process described in the previous paragraph is less dangerous when converting to UTF-8, provided the file being converted was opened with the correct encoding. So in version 5.08 conversion returns, but in a way that is less likely to mislead users. In the Edit menu under the "Transformations" submenu, there is an item named "Change Encoding". When selected, a dialog appears allowing you to select a new encoding for the file. Nothing will happen until the file is saved, but it will then be saved with the new encoding.
  • One user wrote that his eyesight is failing and he found it difficult to see the insertion cursor. He requested an optional block cursor. I'm sympathetic because I lost the central vision in one eye several years ago.
  • Unfortunately, switching to a block cursor is not easy. In the Accessibility Pane of Apple's System Preferences, users can enlarge the standard cursor and change its color and outline color. But no such modifications are provided for the insertion cursor. Some programs provide a block cursor, but often they do not use Cocoa and rely on an open source library for editor support.
  • In Cocoa's NSTextEdit the source text is a single string, even if a document is an entire book. The central algorithm of NSTextEdit displays this string in the editor. Every time the string contains a line feed, the editor switches to a separate line, but for long lines the editor must select a blank spot to make a soft line feed. When the user enters text, the entire algorithm must run again to modify the layout of lines further along in the string. Adding a block character to the string would thus involve massive modifications of this central Apple code.
  • But of course TeXShop and other programs modify the display for syntax coloring and other reasons. This modification is done in a different way, using what Apple calls an "attributed string." An attributed string is a standard string with extra information for each character, listing its foreground color, background color, and other items. The layout code in NSTextEdit is not changed for attributed strings; the attributes are only used when drawing the string after line breaks have been determined.
  • TeXShop already has a feature named "Highlight Current Line" which draws a light blue background beneath the entire line containing the insertion cursor. In TeXShop 4.08, this routine can be modified to draw a block cursor. The cursor colors the background of the two characters on either side of Apple's blinking insertion line.
  • To turn on the feature, select the item "Use Block Insertion Character" in the TeXShop Source Menu. This item turns on "Highlight Current Line" if it is not currently on, but switches it to Block Cursor Mode. The item only affects the active document; any other document open at the time is not changed.
  • Note that the Block Character colors the background of existing characters. Spaces are characters and their background can be drawn, but if no character is present at a spot, then the background cannot be colored. Thus when starting a brand new line, only the original insertion line is present until the first character is typed. After that, the block character highlights the background of the character left of the insertion line, but there is no character right of the line to highlight. When editing existing text, the characters on both sides are highlighted.
  • It is a good idea to select a source font with fixed width characters if you intend to use the block cursor. Otherwise as you scroll over the characters in a line, the cursor's width will constantly change.
  • Since the menu items "Highlight current line" and "Use Block Insertion Character" are related, a change in one sometimes changes the other. When "Use Block Insertion Character" is turned on, "Highlight current line" is automatically turned on as well. When "Highlight current line" is turned off, so is "Use Block Insertion Character."
  • When "Use Block Insertion Character" is on and then turned off, "Highlight current line" remains on. So it is easy to switch back and forth between hightlighting the current line and showing the block insertion character: toggle "Use Block Insertion Character" off or on.
  • If you want to use the block cursor on all files, turn it on in TeXShop Preferences using an item in the Misc1 tab. This item also makes it possible to modify the color and nature of the block cursor.

New in TeXShop 5.04 (Nov 17, 2022)

  • Developers were given a preliminary version of macOS Ventura 13.1 around November 10, 2022. TeXShop has a serious bug when run on that system. The bug is fixed in TeXShop 5.04, and users should upgrade now to avoid the bug when Ventura 13.1 is released.
  • The bug is dramatic. If you open a new source window and enter some text, and then attempt to close the window, the window remains and becomes a zombie.When you quit TeXShop and open it again, the window reappears. There is no way to get rid of it.
  • This dramatic behavior has a trivial cause. TeXShop adds a menu to the Save Dialog allowing users to set the encoding of the saved file. In all recent versions of TeXShop, the code creating this menu has one bad line which did nothing on earlier systems, but stops the Save Dialog from opening in Ventura 13.1. That bad line of code is no longer in TeXShop 5.04.
  • I took this opportunity to entirely remove the encoding pull-down menu from the Save Dialog. It is still present in the Open Dialog because a user could receive a file from a colleague with an unusual encoding and want to open that particular file. If a user then edits the file and saves it, the encoding used to open the file is also used to save it, so an encoding menu isn't needed in the Save Dialog.
  • If you use the Save Dialog's encoding menu for other reasons, you can bring it back with a new hidden preference setting: defaults write TeXShop EncodingMenuInSaveDialog YES
  • The encoding menu in the Save Dialog is typically used in one of two cases. The first is when a brand new file is saved and the user doesn't want to use the default encoding set in Preferences. In this case, a user could add a magic comment line setting the encoding to the unusual value and achieve the same result. The other case is when users are trying to convert a file from one encoding to another. That kind of conversion is tricky; opening a file in one encoding and saving in another can fail and lose information. Removing the encoding menu from the Save Dialog removes the temptation to act without careful planning.

New in TeXShop 5.03 (Sep 18, 2022)

  • After the release of version 5.02, a few small problems emerged, particularly in the demo program. I made corrections on my web page without changing the version number, so if you downloaded early, you might have small flaws and if you downloaded later, you don't. Two larger problems were reported and fixed the same way.
  • Now that the program is stable, it is time to bring everyone up to date. I do not expect further TeXShop updates for a couple of months, fingers crossed. Here are the two important bugs:
  • A pulldown menu in the Save Dialog allows users to change the extension of the saved file. This menu was out of sync by one element after the first four items. So if you selected an extension, you got the previous extension in the list. This is fixed.
  • One user complained that the cursor occasionally vanishes and TeXShop must be restarted to get it back. I cannot reproduce this bug. The Cocoa APIs contain a class named NSCursor which has two relevant commands: [NSCursor hide] and [NSCursor unhide]. It is, of course, important that calls to these routines be paired up so the cursor is not left hidden at the end. XCode can search the complete TeXShop code base; the search revealed that these cursor routines are only called in TeXShop during the operation of the magnifying glass.
  • My routine had extra code to insure that the routines were called in pairs, but the final unhide was not protected in the same way. I added that protection. I don't know if the extra code is necessary because I cannot reproduce the bug, but it cannot hurt.

New in TeXShop 5.02 (Sep 2, 2022)

  • TeXShop 5.01 came with a demo source file and support document explaining how to create web projects with interactive elements using TeXShop 5 and TeX4ht. Within days of releasing the program, I discovered a much better way to create these documents. In the new method, the interactive pieces of the document, which are written in html, can be written directly in the source code for TeX4ht, and the resulting web page can be read linearly with interactive elements following other text in the main document.
  • The demo source and support document have been revised to reflect this discovery. That is the main reason that TeXShop 5.02 has been released. As before, after installation go to ~/Library/TeXShop/New and copy the Demo folder to your home directory or another place you store TeX source files. When you have time, open this folder and follow the instructions inside.
  • Two other issues are addressed:
  • The code to color the input line in the source window had a minor bug. If the user issued a "select All" command and then cancelled it by clicking in a source line, the selectAll coloring was cancelled in the visible region, but scrolling revealed traces of it in other text. Repaired.
  • To fix a memory issue, TeXShop 5 refuses to open the magnifying glass if the pdf file has a magnification level above 250. One user complained, so there is now a hidden preference: defaults write TeXShop GlassMaxMagnification 300
  • The default value is 250 and any choice above that is asking for trouble.

New in TeXShop 5.01 (Aug 29, 2022)

  • Recall that ~/Library/TeXShop stores user configuration files: templates, typesetting engines, macros, etc. Because users will modify the contents of most folders, TeXShop does not rewrite them during updates. But a few folders are rewritten. Users can edit typesetting engines, so ~/Library/TeXShop/Engines is not modified. But Engines/Inactive is a collection of alternate engines, and that folder is completely rewritten each time you update TeXShop so it contains the very latest versions of these unused engines.
  • If you think a folder is out of date, you can throw it away or move it to the desktop. The next time TeXShop runs, it will rewrite that folder using default values.
  • On rare occasions it is advisable to modify a file in a folder whose contents you can edit. In those cases, the required modification is described in "About This Release" in the TeXShop Help Menu. Theoretically users will read "About This Release" every time they upgrade the program. Usually it will say that no changes are needed.
  • One special folder, ~/Library/TeXShop/New, is completely rewritten each time TeXShop is updated. For several years I kept old material in that folder, just in case. In version 5.01 I cleaned that folder and it now contains only two folders required for version 5.01 and explained in "About This Release".
  • Now on to other issues. The following changes were made:
  • When first writing a file to disk, a dialog allows you to choose the name and location of the file. The dialog has a pull-down menu allowing you to choose a file extension; the default extension is ".tex". This dialog now allows ".html" as an alternate extension.
  • TeXShop has keyboard shortcuts to enlarge or shrink the source text. They are "command-plus" and "command-minus", but neither requires the shift key. Unfortunately, at some point in the past it became necessary to "select-all" before issuing these commands. This is no longer necessary and the shortcuts again work by themselves.
  • A small number of users ran into a memory management problem in TeXShop. The program suddenly required a large amount of memory to run, up to 4 gigabytes.
  • I converted TeXShop from manual memory management to "automatic reference counting" many years ago. In this system, memory management is mostly done automatically by the Apple API's. So while memory issues can appear, they are rare.
  • This particular problem turned out to be triggered by selecting a high magnification for the preview window, and then using the magnifying glass. To protect against the problem, the magnifying glass will now only work when the magnification level of the preview image is below 250. Otherwise nothing will happen when you use the glass. If you want to inspect an area at very high magnification, use a pinch gesture to magnify as much as you like.
  • An explanation may be useful. When TeXShop magnifies, it first constructs a hidden image of the entire active page of the pdf display. If the page being displayed has been highly magnified, only a small portion of the page will appear on the screen, but the offscreen image must contain that entire page, and that can require a gigantic amount of memory.
  • TeXShop 5.00 and 5.01 contain new features to facilitate the creation of classroom material which combines the clear logical treatment of a set of pdf notes with the interactive features of a rough and tumble classroom and web experience: experiments, movies, question and answer sessions, and the like. You won't notice these changes unless I point them out. So I constructed an example project and an elaborate document that explains how that project was created. I'm hoping that most TeXShop users will read that document and work their way through the example project.
  • The example adds about a megabyte to the size of TeXShop, but the elaborate document explaining it has lot of pictures and size almost 10 megabytes. Where could I put it? I decided to put it in ~/Library/TeXShop/New. This increases the size of the TeXShop download by about 10 megabytes. But in a few months after the example has been distributed, it will be removed from New and we'll be back to the old download size.
  • I recommend that after installing TeXShop 5.01, you go to TeXShop's "TeXShop menu" and select "Open ~/Library/TeXShop." Open the "New" folder and copy the complete folder named "Demo" to your home directory or another place you save TeX projects.
  • When you have a little time, go to that Demo folder. Read the short file "Preparing-for-the-Demo". The last paragraph will explain what to do next. Good luck.

New in TeXShop 5.00 (Aug 12, 2022)

  • Version 5.00 is a major new release of TeXShop. But when typesetting traditional documents, there are no changes. Most users will see nothing new until they read this document.
  • Rather than immediately explaining the new features, I'll demonstrate one addition. Make sure a document is open in TeXShop or an empty source window created by the "New" menu item is visible. In the Preview menu, there is an item labeled "Show HTML Window". Select this item. A window will appear looking like a Safari window and displaying HTML content.
  • The Apple API's used by TeXShop contain a class called WKWebKitView which implements a web view for any standard Macintosh program. The new HTML Window in TeXShop was created that way. Notice that the links in this page are active, so while the HTML code for the initial page is contained in TeXShop, it is easy to get to web pages that are live on the web. Toolbar arrows allow you to move back and forth between pages. Almost all web features are active in this window.
  • A URL field at the top of the new window allows you to navigate to any web page you like. Unlike Safari, this field does not do Google searches, and it is very strict about syntax, so if the URL you type is not precisely correct, nothing may happen. The toolbar also contains a Search Field, but it is not currently active and will be activated in a future version of TeXShop.
  • The HTML Window behaves like the Source and Preview windows. Move it to a reasonable position, probably on the right side of the screen, give it a reasonable size, and then choose the menu item "Save HTML Window Position." After that, the window will always appear in the selected position.
  • In TeXShop Preferences under the Preview tab, there are new items for the HTML Window. If you fill in the "Home URL" item with the URL of a significant web page, that page will appear rather than the TeXShop default page when selecting "Show HTML Window".
  • All this is well and good, but Safari does the same thing with much more support in the interface. So what's the point?
  • A Short Essay on NSDocument:
  • TeXShop is constructed using the NSDocument class in the Cocoa APIs. It has a nib file containing all the graphical elements used by a typical document, and source code files which process that document. When I program TeXShop I imagine that it only opens and processes one document at a time; thus the text in the source window will always be the source for that document, and the view in the preview window will always be the pdf for that document. All of the extra code to handle multiple documents is provided automatically by Cocoa.
  • When a new document is opened, all of the objects in the NSDocument nib file for that document are instantiated at once. Some are shown and many are hidden away to be used later on. These objects include a source window, a preview window, a console window, a log window, a window with two panes for single window mode, and an extra graphics window in case the user opens a tiff, jpeg, or png file. The key new feature in version 5.00 of TeXShop is that the document nib file also contains an html window which can show live html content. Thus if a typesetting engine produces html files rather than pdf files, the html file can be previewed directly in TeXShop.
  • Recall that "Show HTML Window" opens a default HTML Window. This is not a global window available for common use by all documents. Instead it is the particular HTML window assigned to the active document. To verify this assertion, close all documents and notice that the "Show HTML Window" menu item is grayed out. If you have two open documents, activate "Show HTML Window" twice, once when each document is active. Notice that you get two HTML windows. They will appear at the same spot, but you can separate them.
  • An Example which Finally Illustrates the Point of All This:
  • In version 5.0 of TeXShop the folder ~/Library/TeXShop/Engines/Inactive contains a subfolder named "html". This folder contains an engine named "html.engine". Drag this engine to the active area of the engines folder.
  • It is then possible to both edit and preview html source files directly in TeXShop. TeXShop has always had the ability to open html source files and syntax color the file appropriately. Open such a file and select the html engine in the toolbar. After editing, type command-T to typeset. Immediately the source will open in TeXShop's new HTML Window, and you'll see a live web preview of your html code.
  • To do this efficiently, it is useful to add a magic comment line to the top of the html file with the text
  • % !TEX TS-program = html
  • However, there is one tricky issue. The symbol % does not start a comment in html, so this magic line will confuse web browsers. The trick here is to surround the line with html comment symbols on lines immediately above and immediately below the magic comment. See the example file in the folder ~/Library/TeXShop/Engines/Inactive/html.
  • If your Macros menu is up to date, there is a macro named "PreTeXt Header" which makes this very easy. Select a spot near the top of the file, click to determine where the macro will place new text, and choose the macro. It will add both comment signs and a magic engine sign, but the magic engine will be named "PreTeXt" because the macro was invented for a different purpose. Change "PreTeXt" to "html".
  • The new html features have simplified my life. The Changes document you are currently reading was written in html and later converted to pdf. As a writer, I suffer the fatal flaw of using too many words; don't claim you didn't notice. The only way I can create documents is to write once, and then edit over and over, each time removing words. Version 5.00 of TeXShop makes this a breeze. Push the delete key, push command-T, and see the result.
  • As we will see shortly, there are other TeX applications which require short stretches of html code. I tend to forget html commands and find myself looking them up on Google. For instance, I type a tag containing "bold", but the correct tag contains just "b".
  • TeXShop 5.00 has a facility to help users like me. In the Help menu, there is a new item labeled "HTML Commands." This item brings up an html file listing appropriate tasks and the correct tags to implement the task. Each item also contains a short sample showing how the tag will actually be used. Unfortunately, this help document is written in html source code, so it is difficult to read. But the source can be typeset. Push command-T and you'll see a page that is easy to read.
  • There is more. The help document can be edited and the changes will automatically be saved. So when you need a command not listed, look it up usig Google and then add that example to the help file. This facility is essential because the initial document provided in TeXShop doesn't list many commands.
  • The actual source for the help document is contained in a new directory ~/Library/TeXShop/HTML, and the actual document is named "Help.html". This folder can also contain support files. It currently contains an image "topdot.jpg" used by Help.html and a few other support files, and you can add similar support files.
  • When TeXShop is updated, Help.html and the various support files will not be touched, because you may have edited these items. But the HTML folder also contains a subfolder named "Inactive" and that folder will be updated. So more extensive help files may be provided in the future, which you can merge with your own additions to the default file. Since I'm not an html expert, I encourage users to contribute better initial Help.html files for this Inactive folder.
  • There are many advantages in this new approach, but almost immediately you will notice that synctex does not work in either direction. In one direction, there is a sort of clumsy replacement. If you have a position in the HTML window and you want to jump to the corresponding position in the source, select a fairly long section of text in the pdf and then copy. This text should come from a single line of output. Then switch to the source and paste the result in the Find panel. This will usually bring you to the corresponding spot in the source. It may be possible to automatic this process so a single click does the same thing. I'm investigating. I have no idea how to sync in the other direction.
  • Another Important Example:
  • TeX4ht is a program written by Eitan M. Gurari. It uses a standard LaTeX source file as input, but outputs an html file instead of a pdf file. In 2009, Gurari was preparing a talk for the TeX User Group conference about an extension which outputs braille, when he suddenly died. His TeX4ht project has been taken over by other volunteers and is being actively developed currently.
  • Go to ~/Library/TeXShop/Engines/Inactive/TeX4ht. This folder contains an engine titled TeX4ht.engine. Make a copy of this engine and drag it to the active engines folder ~/Library/TeXShop/Engines. The TeX4ht folder also contains a subfolder titled Example. Make a copy of this entire folder and drag it to your home directory or another directory used for TeX projects. Inside this folder is a LaTeX file named Sample.tex. Open it in TeXShop 5.00. A Source Window and a pdf Preview Window will open. Look carefully at the source file and notice that the first line is a magic comment saying to typeset using the TeX4ht engine.
  • Typeset.
  • Now alongside the pdf Preview Window there is an html Preview Window. The pdf window displays the output when typeset by pdfLaTeX. The html window displays the output when typeset by TeX4ht. This makes it easy to compare the results.
  • Resize both windows. They behave differently.
  • If you have a trackpad, resize both window contents with a finger gesture. Both resize. In particular, finger gestures can magnify the html image.
  • Each document contains an active link at the end. Click these links. The pdf link causes Safari to open and display the new page. But the html link opens the linked page in the original html window, and the Back arrow can take you back to the original content.
  • Add extra material to the source and typeset again. Notice that both windows are immediately updated. Neither window jumps to the top of the document when reloaded. For HTML, this is a major advantage over the old method of opening the output in Safari and clicking the reload icon when changes are made.
  • Math4ht has many parameters controlling its operation. Originally it created a large number of small pictures for mathematical equations, and the web page displayed these pictures. It can also output MathML and many modern browsers can interprete these commands. An even nicer approach is to render mathematics using MathJax. This is the approach recommended by the American Mathematical Society and produces very acceptable typeset equations. Users will want to create their own engines to explore the advantages of these various approaches. The TeX4ht engine uses MathJax, but an alternate engine is also provided in Inactive/TeX4ht which uses MathML.
  • How Are HTML Engines Constructed:
  • There are exactly five new commands which can be added to engine scripts to implement features like those just presented:
  • !TeX-noPreview
  • !TEX-pdfPreview
  • !TEX-htmlPreview
  • !TEX-bothPreview
  • !TEX-noConsole
  • Each command starts with "!TEX". The little circle above is not part of the command.
  • These are analogues of the magic comment lines used in TeXShop source, but there are a few differences. First, the lines can appear anywhere in an Engine file, because Engine files are short and it costs nothing to search the whole file. Second, the magic lines do not have to start at the beginning of a line; they can appear anywhere in the text. It is crucial, of course, that the lines look like comments to the shell interpreter. So for standard engines, each line should be prefaced with the # comment symbol. But engines can be interpreted by a variety of tools, and the comment symbol depends on the tool being used. That is why the actual magic comments can start anywhere on the page.
  • The standard behavior of TeXShop still applies if an engine has none of these lines. After executing all lines of the engine, TeXShop looks in the document directory to see if there is a file with the same name as the source, but extension ".pdf". If so, it opens this pdf file in the Preview Window, unless the Option Key is depressed.
  • If the line "!TeX-noPreview" is present, no preview window appears even if some of the other lines are also present.
  • Otherwise if the lines "!TEX-pdfPreview" and or "!TEX-bothPreview" are present, TeXShop searches the document directory to see if there is a file with the same name as the source, but extension ".pdf". If so, it opens this pdf file in the Preview Window.
  • If the lines "!TEX-htmlPreview" and or "!TEX-bothPreview" are present, TeXShop searches the document directory to see if there is a file with the same name as the source, but extension ".html". If so, it opens this html file in the HTML Window.
  • The line "!TEX-noConsole" suppresses showing the console. It is unlikely that this line will be used with any engine except the one which processes html code.
  • TeX User Group Conferences:
  • Next I claim the privilege of interrupting this change document to write a blog post. Apologies.
  • The TeX User Group (TUG) was founded in 1980, shortly after the appearance of TeX. It publishes a journal, TUGboat, three times a year and creates the distribution TeX Live, which works on almost all computer platforms. TeX Live is created in collaboration with similar TeX User Groups in other countries. TUG holds an annual meeting each year, sometimes in the U.S. and sometimes abroad.
  • In 2001 after MacOS X was released, I was invited to speak at the national TUG conference in Delaware by Wendy McKay; TUG offered to pay my way. I knew almost nothing about TUG, but imagined a conference of 2,000 users. We would meet in a large auditorium and listen to talks on solving common typesetting issues. Perhaps 100 Mac people would be there, excited to hear anything about MacOS X. When I got to Delaware, I discovered that there were 45 people at the conference and almost every one was on the program. They paid their own way. I sheepishly refunded the travel money back to TUG. There were only three or four Mac folks, but they all became significant in my life.
  • Wendy worked for Jerrold Marsden at CalTech. Marsden was a leading authority in classical mechanics, and is the author of many well known mathematical textbooks. He used a Macintosh to write mathematics very rapidly, and invited TeX experts to CalTech to solve TeX problems. Among these was Ross Moore from Australia, who was also at the Delaware conference. He knows more deep facts about LaTeX than anyone I know, and has often spoken at TUG conferences. He is currently working on accessibility for pdf documents written with LaTeX. Hans Hagen, author of ConTeXt, was also at Delaware.
  • Delaware had a special honored guest, Hàn Thế Thành. His pdftex program added code to Knuth's TeX which output pdf files rather than dvi files. His project was absolutely crucial for TeXShop because otherwise I'd have to make a dvi viewer, far beyond my capabilities.
  • Thành came from Vietnam and his pdftex work was part of his PhD thesis from Masaryk University, Brno, Czech Republic. He talked about that thesis at the conference, beginning with a detailed image of a page from the Gutenberg bible. This remarkably beautiful page had absolutely straight right margins. But when you measured with a ruler, they turned out not to be straight; instead commas and periods were pushed slightly into the margin, creating the illusion of a straight side. In his thesis, Thành added that ability to pdfTeX and pdfLaTeX.
  • I began my talk in Delaware by installing TeX onto a new MacOS X machine using Gerben Wierda's installer. In the process, the Finder crashed and I spent ten seconds restarting it. After the talk, a participant said to me "I'm not interested in your program, but it is amazing that you could restart the Finder without rebooting the machine."
  • I have been to many TUG conferences. In Hawaii, the organizers pulled us out to look at the sunset because Mercury was visible close to the horizon. A few days later they pulled us out at noon because on that one day at that one time, the Sun was directly overhead. In a recent conference at Palo Alto, I met my collaborator Yusuke Terada, from Japan, for the first time. Shortly after we met, I looked over his shoulder at another participant, and asked Terada "do you know who that is?" It was Donald Knuth.
  • Already in Delaware, there were talks about XML. The speakers directly typed XML code during their talks, and the indentation grew and grew until it was two pages right of the original margin. It took me several years to understand the goal of these talks. XML is easily parsed by computers and LaTeX is not. Authors submit papers to publishers already formatted in a personal way, but the publishers need to reformat these articles to conform to the standard of a journal or book series. This can be done automatically by computers if the paper is in XML, but requires work by hand for articles in LaTeX. All well and good, but I stopped paying attention to XML talks.
  • There were also pessimistic talks by famous figures in the TeX world, predicting that TeX would be dead in another five years. Most of these talks were from England, and I gradually realized that many speakers had jobs in the Open University system. For these jobs, they didn't want to produce static articles, but rather interactive documents allowing students to input information and try experiments. Their students had iPads and other portable machines and worked remotely. HTML web documents were much more useful than static LaTeX documents. Eventually I stopped listening to these talks as well.
  • In my little corner of the world, TeX had created a revolution. Our mathematics department used to employ three secretaries to type mathematical manuscripts. They are gone. Today if you go into a mathematician's office, there will be a computer running LaTeX and a chalk board. Research is done with these two devices and immediately typeset and sent to collaborators in Europe. All of our PhD students use TeX for quizzes and exams, and when we hired younger hot shots as Assistant Professors, they required graduate students to submit homework written in LaTeX. If research articles in some other field must be in Microsoft Word, that's their problem, not mine.
  • Covid and Reconsidering TUG Talks:
  • Then Covid hit. Luckily I'm retired, but I watched my mathematical colleagues switch to remote teaching with only a week's notice. I don't know how they did it. Gradually I realized that those pessimistic talks contained an important message.
  • Some of my colleagues at the University of Oregon switched to PreTeXt to write lecture notes; I'll describe that project in a moment, but suffice it to say that one goal of that project is to allow authors to write interactive material which can be accessed over the web. Authors write using XML. Perhaps I should have listened to those talks after all.
  • Here's my "dream setup for the future." A faculty member would write lecture notes in LaTeX. These notes would be typeset by an engine which outputs both pdf and html. The pdf document would contain the course in final polished form, so students could look back at the clear logical direction of the lectures. The html document would contain interactive material: movies, questions with student input, etc., so students would be actively involved, even if working remotely.
  • The HTML Preview window has been added to support software that already exists, but even more to encourage new software which makes things easier for authors.
  • Maybe PreTeXt will be the answer for interactive documents. Maybe an extended version of TeX4ht will be the tool of choice. Maybe projects not yet invented will rise to the top. It is likely that several solutions will ultimately emerge.
  • PreTeXt, a Project Worth Keeping an Eye On:
  • At the 2014 TUG conference in Portland, Oregon, I heard a talk by Robert Beezer of the University of Puget Sound on Mathbook XML. A former PhD student of mine named Tom Judson was converting a textbook he had published into the new interactive XML format. I talked to Beezer, but the conversation soon switched to a description of how Beezer and Judson met, which was via very serious bicycling in France.
  • A couple of years later, I found myself in a group of alumni of the University of Oregon, wearing suits and talking about possible donations. As rapidly as possible, I retreated to the mathematics building where people wearing jeans talked about mathematics. One of the faculty members there asked if I knew anything about PreTeXt, a way of writing interactive mathematics that he and other faculty were using. I didn't, but I looked it up on the internet. Turns out, Beezer's project had been renamed.
  • PreTeXt is an interesting project. The central idea is that authors enter formatting commands using a special form of XML. But mathematics is entered in standard LaTeX form, so writing documents is quite straightforward and not nearly as verbose as documents entirely in XML. The source is then translated into other formats using XSL. In this way, PDF, HTML, EPUB and other versions can be created automatically from the source. All of this is described very clearly on the web site https://pretextbook.org
  • In 2019, I spent a considerable amount of time revising TeXShop so it would be useful in this project. I added some new engines for PreTeXt, provided appropriate syntax coloring for XML documents, and made other changes.
  • In the Covid years I lost track of the project. When I recently returned, I discovered that several changes have been made in the PreTeXt project and TeXShop's PreTeXt engines no longer worked. So the material in ~/Library/TeXShop/Engines/Inactive/PreTeXt has been completely revised for version 5.00 of TeXShop. A new engine is included which shows the PreTeXt source in the Source Window and the HTML output in the HTML window. This means that interactive features can be tested while the source is being written. Another engine provides the PDF Preview in one window and HTML Preview in a second window so the two can be compared.
  • An enormous advantage of PreTeXt over similar projects is that substantial effort is devoted to interactive elements. It is all well and good to argue that html output allows interaction, but this is only useful if authors have easy access to many different ways to interact with readers; these cannot be scattered over the internet, but must be gathered together and curated by someone.
  • PreTeXt is a good example of a project which creates html files containing interactive elements. But it is a complicated project. To give it a try, go to the folder mentioned in the previous paragraph and read the document "PreTeXt with TeXShop", which explains how to download the project and typeset several example files provided in the download.
  • Another Look at TeX4ht:
  • When writing this version of TeXShop, I used a small one page document to test TeX4ht. Then one night I woke up in the middle of the night and thought "I need to test a real document." So I picked a 35 page set of lecture notes with lots of png and jpeg illustrations, tables, and extensive mathematics and added just one line saying "typeset me with TeX4ht". I hesitated briefly thinking "this may crash the program, or else it will take a long, long time to typeset." Then I pushed the typeset button.
  • Typesetting took only a few seconds, two windows appeared on the screen, one contained pdf output supplied by pdflatex and one contained html output supplied by TeX4ht. This HTML view had illustrations, mathematics, tables, everything. Amazing.
  • An hour later, I realized that the "iftex" package makes it possible to write source with different outcomes in the pdf and html windows. So I added "usepackage{iftex}" to the header and wrote the following source text:
  • ifpdf
  • We'll include a static image, but in the browser you can see a movie here.
  • else
  • To understand this point, run the following movie
  • The two preview windows had different text at that point.
  • My dream system requires more. In the html window, I want to write html code. So I need a new directive. Let us call it "beginHTML". Typical source code would then be
  • ifpdf
  • Here is the initial frame of a movie illustrating this point %and then code to display a jpg
  • else
  • beginHTML
  • -- html code to embed an actual movie --
  • endHTML
  • At this point, Karl Berry called my attention to the HCode command in TeX4ht. Sure enough, it worked. For example, the following code fragment typesets fine:
  • ifpdf
  • Here is the initial frame of a movie.
  • else
  • HCode{
  • -- a piece of html code; in this Changes document, the code is interpreted by html
  • -- and you will see the result rather than the source code! --
  • Rather than explaining the new features, I'll demonstrate. Here's a link:
  • Slides: Dirac's Belt Trick, Quaternions, and the iPad }
  • But HCode has severe limitations. It can only accept a single paragraph, and TeX4ht itself embeds the text in a tag pair of p's. Only html source which can be embedded in a paragraph will be accepted. I could not, for instance, display a graphic this way. I may not entirely understand HCode, so some of these things may be possible.
  • Later I discovered that I could open the html file generated by TeX4ht and just copy/paste straight html code from various of my web pages into the output. This always worked fine, and I could do the more complicated tasks I desire.
  • This suggests that TeX4ht could be modified by adding a new command similar to HCode, say HFullCode. This command would directly insert the material between { and } into the html document. It would not surround the insertion with a tag pair of p's and would preserve line breaks. I don't know if this is possible or will be done.
  • However, there is an alternate way to provide interactive html content. Since TeX4ht projects can contain links, the pieces of interactive content can be placed on separate html pages. And since TeXShop supports authoring and Web preview of such separate pages, writing them could be part of a single workflow.
  • Of course links could also be embedded in the pdf file, but this feels psychologically wrong. Students should think of the pdf as the polished final version of a course, to be read like an article or book. Students should think of the html version as an interactive document, asking questions, trying experiments, teaching how mathematics is actually created. Reading it would be a typical web experience, where it is natural to follow links to further material.
  • One major problem is that interactive content will often contain mathematical equations. So those extra html pages need to contain mathematics. For author sanity those mathematical equations should be input using LaTeX notation and rendered using MathJax. The MathJax web site seems to suggest that this is possible, but I don't yet understand the details.
  • So let my final word repeat an earlier sentiment. Maybe PreTeXt will be the answer for interactive documents. Maybe TeX4ht will be the tool of choice. Maybe projects not yet invented will rise to the top, and several solutions will ultimately emerge.
  • Epilogue:
  • Version 5.00 of TeXShop introduces two new features. First, TeXShop can display isolated web pages directly within the program using "Show HTML Window." And second, TeXShop can preview html output of engines exactly as it now previews pdf output. The first of these is a sort of trick with limited utility, and the second is the key new ability.
  • I can imagine use cases of the first feature. Suppose you are writing a document which is a response to a currently active web page. You could load this web page with "Show HTML Window" to make it constantly available as you write, freeing Safari for random browsing.
  • However, there is an important difference between the way TeXShop opens PDF documents and the way it opens Web pages. When TeXShop opens a PDF file, it appears in an independent window on the screen, not tied to any project currently being edited. But when TeXShop opens a Web page, it uses a window from the active project. This is the same window that the project will use if it has to preview html output. When you use TeXShop for conventional LaTeX projects, it is fine to open an occasional active Web page with "Show HTML Window". But if you use TeXShop for projects which directly create html output, using "Show HTML Window" is not a good idea.

New in TeXShop 4.79 (Jul 31, 2022)

  • Isao Sonobe updated OgreKit to version 2.1.12. This fixed a copy/paste bug in the ``Replace'' field of the panel. In addition, the font and font size used in the Find and Replace fields of the panel can be changed and the changes will be remembered even if TeXShop is quit and restarted. To modify these values, open the OgreKit Find Panel and then select the TeXShop menu /Source/Font/Show Fonts. The standard Font panel will open, allowing you to select a font and size. Do this for each field.
  • Szilágyi Zsolt reported a curious bug when using the magnifying glass in single window mode. It is impossible to select any tools in the toolbar which are over the Preview half of the window. Thus it is not possible to switch from magnifying mode to text selection mode, and impossible to split the window. Tools on the other half of the window still work.
  • This bug apparently first appeared in TeXShop 4.66. I spent some time trying to find the cause without success. I haven't given up, but the bug is not yet fixed.
  • A day later, Zsolt reported an easy workaround. Hold down the option key while selecting tools, and then selection works. In particular, switching from magnifying mode to another action like text selection turns off the bug. But even if you want to stay in magnifying mode, you can proceed by using option while selecting other tools.
  • Thanks to Zsolt, I can relax. I'll still try to fix the bug.

New in TeXShop 4.78 (Jul 18, 2022)

  • The tags menu marks the locations in the source file for "chapter", "section", "subsection", and other commands. The command "part" has been added for very large book projects divided into parts, each with several chapters.
  • I am not a TeXShop power user. If you watched me enter source text, you would loose all faith in the program. But there is one trick that I do use and recommend even for beginners. Although they can typeset using a menu command or a toolbar command, it is much easier to enter the keystroke command-T.
  • This week, looking at the interface builder file defining the typeset menu, I found an additional menu item in the Typeset menu that doesn't appear when TeXShop runs. The item title is "Trash Aux & Typeset". That would have been very useful earlier this year when defective Aux files caused me to push the "Trash Aux Files" button in the console every time I wanted to typeset.
  • It turns out that this menu item has been there all along. Open the typeset menu, but do not choose an item. Then push the Option key. Notice that the first item changes from "Typeset" to "Trash Aux & Typeset", and the keyboard shortcut changes from command-T to option-command-T. So typing option-command-T will call the TeXShop command to trash Aux and related files, and then typeset.
  • TeXShop 4.78 introduces a related trick. Suppose you are writing a long book, and you like to typeset after writing each new sentence. You don't care if this step updates the table of contents or reference numbers because you only want to look at the new sentence, so you typeset with pdflatex rather than pdflatexmk to speed up the process. But every so often, you do want to update everything and so you switch to pdflatexmk. In version 4.78, holding down both the control and option keys changes the first menu "Typeset" to "Typeset with Alternate Engine" which calls pdflatexmk rather than pdflatex and has keyboard shortcut command-option-control-T. Thus three separate commands are instantly at your finger tips.
  • This trick also works if you use XeLaTeX and xelatexmk or LuaLaTeX and lualatexmk. In fact, an arbitrary engine can be used for the first two commands and a second arbitrary engine can be selected for the third command. The first two commands use the default engine chosen in the toolbar, and the third command uses an engine that can be set in the Misc tab of TeXShop Preferences by editing the "Alternate Engine" item.
  • Recall that you can also set the typesetting engine used for a source file using a magic comment line. This takes preference over the new feature in the Typeset command.
  • This new feature will work "out of the box" if pdflatexmk is one of the typesetting options available in the pull-down menu second left in the source toolbar. For several years it has been provided as one of the default engines. But if you are an old user, you might not have it because we do not update ~/Library/TeXShop/Engines when we update TeXShop. However, we do update ~/Library/TeXShop/Engines/Inactive. So find pdflatexmk.engine in ~/Library/TeXShop/Engines/Inactive/Latexmk and drag it into the active area ~/Library/TeXShop/Engines.
  • If the mouse hovers over an entry in a table of contents, a small popup window opens showing the text at the referenced location. This window appears for about 5 seconds or until the mouse moves, and then vanishes. If the "Option" key is pressed after the window appears and held down through those 5 seconds, the window will not vanish until the mouse moves. This behavior has been in TeXShop for some time.
  • This behavior has been enhanced slightly in version 4.78. If the option key is held down BEFORE the mouse hovers over an entry, a larger popup window will appear showing more of the text in that referenced location. The text will appear with regular size rather than reduced size. As before, if the option key continues to be held down for 5 seconds, the window will not vanish until the mouse moves.
  • MacOS Big Sur introduced a new kind of toolbar search field which expands when being used and collapses otherwise. When TeXShop runs on Big Sur or higher, it uses this new search field in the Preview Window. Before that change, typing command-F when the Preview Window was active selected the search field. This broke with the new kind of search field. The bug is now fixed, and thus command-F selects the search field in the Preview window and the find panel in the Edit window.
  • Finally, Marco Santi reported that the color choices in the Themes tag of TeXShop Preferences are not reliably set when changed. For example, if a color is selected for the Source Background using the RGB Sliders method of choosing colors, and the values are 255, 253, 35, and then another color is manipulated, when you return to the Source Background color, its values might be 255, 255, 38. This bug is fixed. It had an interesting cause. The code which finds a color from a color well had two lines:
  • NSColor *newColor = ((NSColorWell *)theWell).color;
  • NSColor *theColor = [newColor colorUsingColorSpace: NSColorSpace.genericRGBColorSpace];
  • I thought the second line performed a "normalization" of the color, but in fact it did a color correction of some sort. Now it is commented out and the first line sets "theColor".

New in TeXShop 4.77 (Jul 8, 2022)

  • David Sanchez reported a bug which could crash TeXShop. When "syntax coloring" and "color current line" are both on, typing a line of text followed by many blank lines and then selecting and deleting the text and lines will crash the program. Forty blank lines are enough to cause the crash. This bug is fixed, and the fix forced an early release of version 4.77.
  • The menu command "Open from Stationery" now presents an alphabetized list of stationery.
  • Finally, a comment about keyboard shortcuts for menu items. These shortcuts are initially set in an interface builder file and thus vary depending on the localization. Changing shortcuts is a nightmare and I essentially never do it nowadays. There are two ways users can make changes. The first and easiest is to set new shortcuts in the Keyboard Module of Apple's System Preferences. In this module, select "Shortcuts" and on the left side of two panels which appear, select "App Shortcuts". Click the plus key to add a new shortcut and in the resulting panel change "All Applications" to "TeXShop."
  • This method works well for most shortcut choices, but a few choices fail in Monterey. The situation may improve in Ventura. One recent user ran into problems trying to select command-/ and command- for Comment and Uncomment.
  • A second method is to edit the file "KeyEquivalents.plist" in ~/Library/TeXShop/Menus. Extensive comments at the top of the file explain exactly what to do. If changes are made for the same menu in both Apple Preferences and KeyEquivalents, the KeyEquivalent changes take precedence. So when the Apple Preference method fails, try the Key Equivalents method. Note that both methods require listing the exact menu title. This will vary by localization. Use the titles provided by your localization.
  • There is a complication a user recently brought to my attention. A few users activate more than one keyboard in the System Preferences Keyboard module under the "Input Sources" tab. The same physical keyboard is used, but the resulting characters depend on the keyboard chosen in a menu bar item on the right side of the screen. When a user switches keyboards, macOS may change the keyboard equivalents to different keys; the exact algorithm used is unclear. Menus with keyboard shortcuts show the keyboard shortcut on the right side, and these also change when switching keyboards. All of this is done automatically by macOS without any code from me.
  • The user bringing this to my attention used both the British and Spanish keyboards. When command-/ and command- were used as keyboard shortcuts with the British Keyboard, switching to Spanish caused strange choices of shortcuts, and switching back to English did not return to the correct settings. This seems to be a recent macOS bug, which may be fixed in a later system and at any rate only affects users who routinely use more than one keyboard and then happen to select specific buggy shortcuts.

New in TeXShop 4.76 (Jun 16, 2022)

  • TeXShop 4.75 changed the behavior of Preview in "double page" and "double-multipage" modes. This proved to be controversial and is fixed in version 4.76. If your default display environment is "multipage", none of these changes matter to you.
  • TeXShop uses Apple's PDFKit to display pdf files. This kit has two properties named "displaysRTL" and "displaysAsBook" which change double page behavior. Both are booleans. Most scripts are written from left to right, and setting displaysRTL to NO causes the pages to also flow from left to right. Scripts like Arabic and Hebrew are written from right to left and setting displaysRTL to YES causes the pages to also flow from right to left. In TeXShop 4.75, the "Page One on Left" and "Page One on Right" preferences set this property. This also holds for 4.76, but the items are renamed "Pages Flow Left to Right" and "Pages Flow Right to Left."
  • Version 4.75 ignored displaysAsBook, although earlier versions usually set it to YES. When it is YES, the first page is shown by itself and the remaining pages are shown as double pages. By convention, there are an odd number of pages in a book before the actual content begins, so this causes the left and right pages to appear as they would if a user opened the actual book.
  • In version 4.76, displaysAsBook is set to YES by default and the initial page appears by itself. Just in case, a hidden preference setting named "DisplayAsBook" is included, and users who dislike the single page can get rid of it by issuing the following command in Terminal: defaults write TeXShop DisplayAsBook NO
  • In addition, two new special comment lines are provided so the property can be set on a document by document basis. These overrule the defaults and turn book display mode on or off for that document.
  • In Japan, text can be written horizontally or vertically. When it is written vertically, pages should appear from right to left. Therefore we also provide special comment lines to set "displaysRTL" on a document by document basis.

New in TeXShop 4.75 (Jun 15, 2022)

  • In "double page" and "double-multipage" modes, the Preview window shows pairs of pages side by side. A preference item determines whether the first page is shown on the left side or the right side. This preference item stopped working some time ago because I failed to notice that Apple provided a new Boolean instance property for PDFView in High Sierra and later. The property is named "displaysRTL". The preference item again works on High Sierra and above.
  • In TeXShop Preferences under the Editor tab, there are a series of items called "Parens Matching Settings". These items were added by my wonderful colleague Yusuke Terada to help users manage matching pairs of parentheses in TeX source code. Concentrate on the first and third, labeled "Highlight Enclosed Characters" and "Blink Highlight." If the third is checked, then every time a closing parenthesis ), }, ] is typed, the corresponding opening parenthesis blinks. If the first is also checked, then the entire region between the matching parentheses blinks red when the closing parenthesis is typed.
  • But you can't have everything. The blink for a matching parenthesis always works, but the red color from the first item doesn't work if the new ability to highlight the current line is being used. That is because both of these items work by coloring the background and the two operations interfere with each other. I do not plan to fix this problem; users who depend on the red color should turn off highlighting the current line.
  • If only "Highlight Enclosed Characters" is checked and "Blink Highlight" is not checked (and if highlighting the current line is off), then the entire region between the matching parentheses turns red and remains red until the cursor is moved. This gives the user time to inspect the region between parentheses carefully, particularly if the region is large. While moving the cursor turns off the red color, scrolling does not, so if the region between parentheses is extremely large, it can still be inspected by scrolling to the beginning. Some users rely on this feature.
  • Unfortunately, the new code to highlight the current line broke this final feature even when "highlight the current line" was turned off, so scrolling turned off the red color. This bug is fixed.

New in TeXShop 4.74 (Jun 15, 2022)

  • Voice Over is technology for those with limited sight; it reads the screen while the user controls the computer with keyboard commands. Support for Voice Over is added automatically by the AppKit when sources are compiled. A user reported that Voice Over works in the TeXShop Source Window, but not in the Preview Window. Instead Voice Over claims that this window has no contents. Further experiments show that Voice Over can be tricked into working in the Preview Window by issuing the menu commands "Next Page" and then "Previous Page". The trick requires that documents contain at least two pages. Add a blank page to one page documents to make the trick work for them.
  • In TeXShop 4.74, this trick is applied automatically when preview windows are first opened or modified after typesetting. The trick is barely noticeable because it happens rapidly. This process is controlled by a hidden preference item and is off by default. To turn it on, issue the following command in Terminal: defaults write TeXShop FixVoiceOver Yes
  • There is hope that the fix will not be required in a future TeXShop version or with a future version of macOS. That is why it is controlled by a hidden preference.
  • Users can select the default Preview Page Style in Preferences: Single Page, Multi-Page, etc. An item in the Preview menu allows this choice to be temporarily changed for the currently active window. This menu is seldom used and has a bug. Sometimes more than one item is checked simultaneously in the menu. This is fixed.
  • A slightly different bug involves the Preference choice for Preview Magnification Method: Actual Size, Fixed Magnification, Fit To Window. Almost everyone should be using Fit To Window, the default choice.
  • Again, an item in the Preview menu allows this choice to be temporarily changed for the active window. But that menu behaves strangely. If the user chooses Actual Size, the item Fixed Magnification will be checked when the menu is next inspected.
  • This bug is caused by a bad design choice when TeXShop was constructed long ago. The magnification tool should never have been included because the Macintosh has much better way to handle Preview magnification: use a pinch gesture in the track pad. But it is too late to get rid of the magnify tool because some users rely on it. I strongly recommend using the gesture; then the menu in question will never be used and its strange behavior can be ignored.
  • In fact, every time the magnify tool is used even for a moment, the window's magnification mode is switched to Fixed Magnification. There really are only two magnification modes for the window: Fit to Window and Fixed Magnification. When the user selects Actual Size, they are really switching to Fixed Magnification mode and simultaneously setting the magnification scale to 100. That is why the check mark moves. For consistency, it also ought to move to Fixed Magnification when the magnify tool is used and Preview is in Fit To Window mode.
  • Changing user's menu choices behind their backs is bad design, and is forbidden in the Macintosh Interface Guidelines. A more acceptable solution would only allow using the magnify tool when Preview is in Fixed Magnification mode. But this would mean that a tool which always worked in the past would sometimes stop working.
  • In the end I decided to change nothing.
  • When syncing from the Source Window to the Preview Window, TeXShop switches the Preview view to the page containing the desired item. This works well for users with large monitors. But a portable computer may be showing only a portion of the page, and the desired item can be off the visible portion of the page. Now TeXShop also scrolls the page to make the desired item visible. Note that synctex is not perfect and in rare situations will not choose a reasonable sync spot.

New in TeXShop 4.73 (May 27, 2022)

  • When using large monitors, it is easy to lose the position of the cursor in the source window. Johan Havermans suggested a fix: "color the current line in the editor." In TeXShop 4.73, the current line is printed over a slightly blue background.
  • This feature can be turned on and off. In the TeXShop Source menu, a new item is titled "Highlight Current Line." If highlighting is on, this item will turn is off. If highlighting is off, this item will turn it back on. The menu item only applies to the currently active source window. The default behavior when windows are first opened is controlled by a new Preference checkmark item under the Edit tab: "Highlight Current Line". When TeXShop 4.73 first runs this item is off, but many users may prefer to turn it on.
  • The background highlight color can be set by a new color item under the Preferences Themes tab: "Current Line". Users who have never edited TeXShop Themes (i.e., TeXShop Colors) should quit TeXShop and then move the file ~/Library/TeXShop/Themes to the Desktop. When TeXShop runs again, it will generate a new Themes folder in which each theme has a value for the "Current Line" color. Users who have edited a theme can instead edit the Current Line color in this theme, making sure to change its value in the process, and then save the theme. This will add the new color to the list of colors defined by the theme.
  • John Havermans also suggested that the state of the Drawer attached to the Preview window be remembered when TeXShop quits and restored when it restarts and reopens windows. This feature is in version 4.73, but only if the Preference item "Open New Windows as Tabs" is set to "Automatically" rather than "Always".
  • Bruno Voisin reported that the magnifying glass does not work on pages that are rotated. This is fixed.
  • In the course of reporting this bug, Voisin called my attention to new support in LaTeX for PDF files, added as of the June, 2022 release. He sent the following illuminating source file. The source creates a document with three pages. The first and third pages contain text formatted in the standard way, but the second page is in landscape mode showing a wide picture. If this output came from a book, all three pages would be standard pages and the user would rotate the book to look at the picture. But when the author is creating the pages on a computer screen, the second page should be rotated for easier viewing. This source file causes the second page to be appropriately rotated.
  • When TeXShop prints pdf files containing rotated pages, all pages are printed in portrait mode and information is lost on rotated pages. The solution to this problem is easy. Before printing, comment out the three lines starting with "ExplSyntaxOn" and typeset. Then no page needs to be rotated in the printed output.
  • One problem remains. Suppose you are creating a document which most users will read on the screen, but a few will print. Should pages with sideways-figures be rotated or not? This is a problem I cannot solve, since the fix must be in the software your readers use to display pdf, not the software you use to create it.
  • If users opened the "Customize Toolbar" dialog, the "Go to page" and "Magnification" items were displayed too high and difficult to grab. This bug is fixed.
  • Chris Goedde reported that when TeXShop Preferences says to open files as tabs, the active Preview tab was for the new file just opened, but the active Source tab was for an earlier file. This is fixed. (A similar problem when opening as tabs in single window mode is not fixed; sorry. After opening in this situation, activate the desired tab by hand. )
  • Several users reported problems when opening projects with a root file after indicating that all files should open as tabs. This problem is caused by the Preference item under the Misc tab labeled "Project Root File: Minaturize the opened root window." Uncheck this item.
  • In previous versions of TeXShop, this item was checked by default. Starting with TeXShop 4.73, it is not checked by default. But this change will not help users who have installed earlier versions of TeXShop. Even if you do not use root files, you probably should uncheck the item so you don't run into the problem later on.
  • Two default preference items were changed: "Highlight Enclosed Characters" is now unchecked and "Blink Highlight" is now checked. Both are in the Edit tab. These preferences determine behavior when a right curly bracket is typed; the first sets the text between matching brackets to red, and the second blinks the matching bracket. First time users found the second behavior helpful, but were surprised by the first behavior. Users who have already run TeXShop will see no change.

New in TeXShop 4.72 (Apr 23, 2022)

  • Latexmk by John Collins is supported by Herbert Schulz for TeXShop. TeXShop contains the actual latexmk script, and engines which use this script. Collins also uploads the script to CTAN so it is in TeX Live. When the script is updated, the update is available almost immediately via TeX Live Utility, but it doesn't arrive in TeXShop until a new version of the program is released.
  • TeXShop now contains revised latexmk engines by Schulz which use the latexmk in the active TeX Distribution. If this distribution does not have latexmk, then the internal version in TeXShop is used.
  • If you did not select "Close windows when quitting an app" in Apple's System Preferences, windows that are open when TeXShop quits will reappear when it is next opened. The source window scrolls to the spot it was at when closed, but the preview window didn't do this in previous TeXShop versions. Now it does.
  • If the TeXShop Preference item "When 0pening Source and Preview, Use One Window" is selected at the bottom of the Preview tab, the interface is converted to one where each document is displayed in a single window, with source on one side and preview on the other. There are only two situations when the old window pair must be used: when starting a new document, and when typesetting a source file sent by someone else. But in both of these cases, you can immediately switch to one-window mode after typesetting using the menu command "Use One Window."
  • However, the situation when quitting and then restarting TeXShop had problems. After restarting TeXShop, both the source and preview panes in the window did not scroll to their old spots, but instead opened at the top of the document. Moreover if two documents were open, the windows for these documents did not move to their old positions on the screen, but instead ended up exactly on top of each other. Both problems are now fixed. Therefore "single window mode" and the original "double window mode" have essentially equal footing in the program.
  • There were similar problems with tabs. In double window mode, some tabs were reproduced and others were not. In single window mode, tabbed windows were recreated as separate windows for each tab. Both problems are fixed when operating in "tabbed mode" to be described next.
  • Incidentally, there are a few remaining problems when windows are reopened and repositioned. In either single window mode or double window mode, it is possible to wind up with both kinds of windows. If you quit the program, and then restart it, all windows are recreated in the current mode. So if documents always open in single window mode, but you also have a separate source-preview pair and you quit and then restart, the source-preview pair will open in single window mode. Or if you always open documents as two windows, one for source and one for preview, but you happen to have created a single-window pair, and you then quit TeXShop and restart it, the single window pair will have become separate source and preview windows. These cases should rarely happen; I have never had a complaint about the problem.
  • Several years ago Apple introduced support for tabs in windows. Recently a user, Szilágyi Zsolt, wrote that TeXShop has a problem with tabs, and he sent a movie showing the problem in action. A few days later he solved the problem himself. I looked at the movie anyway, and Zsolt was doing things with tags in TeXShop that I never dreamed were possible. So I asked how he did them and was told that in Apple's System Preferences under the General tab, there is an item labeled "Prefer tabs in full screen when opening documents." Here the words "full screen" appear in a pull-down menu whose other choices are "never" and "always". Selecting "always" greatly improves the way tabs work in TeXShop.
  • Next I discovered that some applications have a similar preference. This makes it possible to improve tab support in these applications without forcing it upon the full system. For example, Safari has an item labeled "Open pages in tabs instead of windows" with possible values "Never", "Automatically", and "Always". The choice "Automatically" causes Safari to follow the global preference item in System Preferences.
  • Version 4.72 adds a similar preference for TeXShop. The item is at the bottom of the Source tab in TeXShop Preferences, with the same choices as Safari.
  • TeXShop's editor can work in several modes: external editor, separate source and preview windows, one window containing both source and preview, and full screen. I'll describe the behavior of tabs in the second and third cases. There is nothing to say about external editors, and nobody I know works exclusively in full screen mode.
  • When separate source and preview windows are used:
  • Set the new preference to "Always" and close all windows. Open a document from disk. A source window and a preview window appear. Open another document. The source and preview for the new document are added as tabs to the existing source and preview windows. We still have only two windows. Open a third document, perhaps this time one based on a root file with various chapter files. A tab for the root file appears in the source window, and a tab for the preview appears in the preview window. We still have only two windows.
  • Select one of the source tabs and typeset. A console window appears; when typesetting ends, the appropriate preview tab is activated. Select a different source tab and typeset again. Rather than creating a new console window, a tab is created in the existing console; after typesetting ends, the appropriate preview tab is activated. We still have only three windows: source, preview, console.
  • Try sync from source to preview or preview to source. These work and activate the appropriate tab in the destination of the sync.
  • Select the log file for a document. A new window appears containing the log. Change to a different document and show its log file. A tab appears in the log window for the new log. We only have four windows: source, preview, console, log.
  • Open a document in the Help menu. A new window appears containing the document. Note that the document does not appear as a tab in the source or preview windows. This is deliberate since help pages are often used in conjunction with TeX tasks and both need to be visible. We don't want to clutter the source and preview windows with documents which aren't source or preview items. Each Help document gets a separate window because multiple items aren't often used simultaneously and some of the items are displayed by other programs like Apple's Preview and not even governed by the new TeXShop preference.
  • Select the menu item "About TeXShop." It is displayed in a separate dialog, as we would hope.
  • In the preview window, open the Drawer. Then switch to another tab and notice that the Drawer disappears. That is because each tab controls its own drawer. Switch back to the original tab and notice that the drawer opens again. Activate drawers for two different preview tabs. Notice that when switching from one tab to another, the contents of the drawer change to match the selected tab.
  • Select a tab for a document containing a root file and various chapter files. Sync from the preview to the source. Notice that the appropriate chapter file opens and a new tab for it is created. Using sync in this way, you can obtain tabs for all chapters currently being edited. It is also possible to set up tabs using the magic line % !TEX useTabs. In that case, these chapter tabs will be created when the document is first opened. But if a book project has many chapters, this can cause a bewildering list of tabs; it is probably better to use sync to create tabs only for the chapters currently being edited.
  • So far, things work in the expected manner. We end with a couple of cases where surprising things happen. Suppose we still have source and preview windows with three tabs for three projects. Activate one of these tabs and select "Use One Window." A new window is created containing both source and preview panes, but only for the active tab, not for all three projects. If we select "Use One Window" again, another of the documents is converted to single window mode, but this time that single window becomes a tab in the single window for the first document. Selecting "Use One Window" a third time converts the remaining document, and now at last we have what we expected to get immediately, namely a one-window object with three tabs for the three documents. Unwrapping these windows using "Use Separate Windows" works the same way, unwrapping one document at a time.
  • The surprising behavior of tabs and "Use One Window" is actually useful because it solves a problem with full screen mode. This mode is essentially useless if you are a "separate window mode" person, because it is impossible to write TeX if you only have access to the source, or only have access to the output. But suppose you are writing a very tricky portion of a document and would like to concentrate only on it without distractions. Convert the document to a single window with "Use One Window." Then click the green button to make this window full screen. You now have both source and text on the screen, which is exactly what you need. Moreover, you can typeset because when you do that, the console becomes a floating window on top of the screen. Use it to fix errors and then close it. Continue editing. When you are done, click the green button to return to a single window, and then select "Use Separate Windows" to return your document to tabs where it started.
  • You can also move two different source tabs to tabs in a single window and then convert this window to full screen. This makes it possible to work on two separate documents at the same time in full screen mode.
  • There is only one really bad piece of news for people who use separate source and preview windows. If you have a document with a root file and various chapter files, tabs work fine as long as you stay in this mode. But converting such a document to single-window mode and then taking it full screen will completely fail. Single windows contain ONE source file and ONE preview file. If your project also has chapter files and you try to convert it to single window mode, you end up with a single window for the root source and the preview output, and then lots of source windows for the individual chapters. This isn't something I can fix.
  • So you have to make a choice. If you like to split your projects into a root and chapters, fine. This decision is completely reasonable. Always work with separate source and preview windows. Tabs may make your screen less cluttered; give them a try. Never convert projects to one window mode, and never use full screen mode. This is actually how I work.
  • The other choice is to write books with just a single source file. Many famous authors work this way. I used to use ROOT-CHAPTER, but recently I've written even longer documents with just a single source. In that case, the full TeXShop interface is available to you.
  • If you work exclusively in single-window mode:
  • I recommend activating the preference item "Opening Source and Preview: Use One Window" at the bottom of the Preview Tab in TeXShop Preferences. Then documents immediately open in one window mode.
  • Although the Window menu has items "Use One Window" and "Use Separate Windows", there are only two circumstances when these are helpful. The first occurs when you start a new document. The second occurs when someone sends you a TeX source document without an associated pdf. In both cases, create or open the source file. Typeset. Now you have both windows. Activate one of the two and select "Use One Window".
  • Set the new preference to "Always" and close all windows. Open a document from disk. A window opens containing the source and the output of the document. Open a second document. A new tab appears in the window, showing the source and output of the second document. We still have one window. Open a third document. Another tab appears and our window contains all three documents.
  • We do not get one set of tabs for the preview portion and a separate set for the output portion. Instead we only get one set of tabs because tabs select entire documents.
  • Select a tab and typeset. A console window appears and the new output appears in the window. Select a different source tab and typeset again. Rather than creating a new console window, a tab is created in the existing console. We still have only two windows: project and console.
  • Sync works fine.
  • Select the log file for a document. A new window appears containing the log. Change to a different document and show its log file. A tab appears in the log window for the new log. We only have three windows: project, console, log.
  • Open a document in the Help menu. A new window appears containing the document, so the help document does not appear as a tab in the document window. This is deliberate since help pages are often used in conjunction with TeX tasks and both need to be visible. Note that each Help document gets a separate window.
  • Select the menu item "About TeXShop." It is displayed in a separate dialog, as usual.
  • Open the drawer. Then switch to another tab and notice that the Drawer disappears. That is because each tab controls its own drawer. Switch back to the original tab and notice that the drawer opens again. Activate drawers for two different tabs. Notice that when switching from one tab to another, the contents of the drawer change to match the selected tab.
  • So far, things work in the expected manner. There is one surprise. Suppose we still have three tabs. Activate one of these tabs and select "Use Separate Windows" Two new windows are created containing the source and preview for the active tab, not for all three tabs. If we select "Use Separate Windows" again, another of the tabs is converted source and preview files, this time as tabs in the source and preview windows. So we work one project at a time, rather than converting all tabs at once. However, this is a task that is rarely done if you use one-window mode.
  • Select a window with tabs. Click the green button to convert the window to full screen mode. You can still typeset because the console will appear as a floating window over the screen, and can be closed to give a full screen view. Now tabs allow you to work on several projects at once in full screen mode.
  • There is only one bad piece of news. If you work in one-window mode, you cannot work with projects that have a ROOT file and then various CHAPTER files. But you couldn't do that before tabs either. Many authors of books keep the full source in a single file.

New in TeXShop 4.70 (Mar 18, 2022)

  • Apple warned that the Python scripting language is deprecated and will eventually be removed. That finally happened in Monterey 12.3, released in March, 2022. Luckily, TeXShop does not use Python.
  • Another deprecated item in macOS is the bash shell. The default shell changed from bash to zsh in 2019, but bash is still available in Monterey. It has not been upgraded in many years and could be removed in the future. To protect against that, shell scripts in TeXShop that previously used bash have been changed to use zsh. In most cases, the switch was trivial.
  • Herbert Schulz revised the latexmk and transparency engines in TeXShop in this way. The new versions are in ~/Library/TeXShop/Engines/Inactive, in folders named ``GhostscriptTransparencyEngines'' and ``Latexmk''. The update to TeXShop did not change active engines because users may have edited these engines. Although most old latexmk and transparency engines continue to work, Schulz recommends updating them to the latest versions so he has a fixed base for future changes.
  • When macOS is shut down, a dialog appears with an optional check box labeled "Reopen windows when logging back in." If this is checked, all programs running when the machine was shut down will restart the next the the machine is rebooted. One user reported that TeXShop gets into an infinite loop when restarted in this way, but after it is force quit and other programs are loaded, TeXShop runs without difficulty. I could not reproduce this problem.
  • TeXShop 4.70 has a hidden preference item for users who run into this problem. The item is called IgnoreStartOnReboot and has default value NO. To change it to YES, issue the following command in Terminal: defaults write TeXShop IgnoreStartOnReboot YES
  • After this change, all other programs will start when the machine is rebooted, but TeXShop will not. Restart TeXShop manually. The preference affects the behavior of the "Restart" item in the Apple menu in the same way.
  • This preference does not modify the Open at Login list set for users in System Preferences, so if TeXShop is listed there, it will still start on login.
  • Latexmk is upgraded to version 4.77.

New in TeXShop 4.69 (Feb 15, 2022)

  • Added "perl script" = pk to the list of file typinput{../../current/texshop/documentation.html} es understood by TeXShop
  • Herbert Schulz revised the active engines pdflatexmk.engine and sepdflatexmk.engine and revised the folders "Latexmk" and "GhostscriptTransparencyEngines" in ~/Library/TeXShop/Engines/Inactive to improve passing parameters to the engines and on through pdflatexmk to the various binary files being called
  • Keiran Harcombe supplied a new dark scheme named Dracula. See https://draculatheme.com/texshop/ for details. The theme is now supplied in ~/Library/TeXShop/Themes. Since this location is not rewritten during updates, a copy of the theme with explanations by Harcombe is in ~/Library/TeXShop/New/Theme-Dracula.
  • The default shell in macOS switched from bash to zsh and Apple marked bash as deprecated. It is likely that bash will still be available for some time, but just in case, a number of engines which previously used bash have been changed to use zsh instead. Active engines are not changed during updates, but this change can be seen in ~/Library/TeXShop/Engines/Inactive. Only a small number of engines were affected.
  • Latexmk was updated to version 4.76.
  • The file ~/Library/TeXShop/bin/tslatexmk/latexmkrcDONTedit has been modified to allow setting of a directory for most aux-like files using TeXShop's `parameter' directive. If you use pdflatexmk, you should move the present ~/Library/TeXShop/bin/latexmkrcedit, if it exists, to the desktop. Then restart TeXShop and typeset using any of the latexmk based engines. This recreates that file based on the DONTedit version. If you added any customizations to the original version of latexmkrcedit, copy them from the old version on the desktop to the new version.
  • New versions of the latexmk engines were provided in Engines/Inactive/latexmk in TeXShop 4.67 and 4.68. If you use one or more of these engines in the active engine area, but did not update to the new version recently, update now.

New in TeXShop 4.68 (Oct 10, 2021)

  • There is new material in ~/Library/TeXShop/Engines/Inactive/Sage to support the latest release of Sage-Math. This material is mostly due to Herbert Schulz, who noticed the update and discovered that the Macintosh version broke several sample documents. His debugging led to a fix, both in the Macintosh version of the program and in our engines.
  • Latexmk was updated to version 4.75.
  • There are no TeXShop code changes. TeXShop should be ready for macOS Monterey when it is released.

New in TeXShop 4.67 (Aug 27, 2021)

  • In version 4.66, an unfortunate bug was introduced when the "Ascii" encoding was added to TeXShop. If the source file contains a magic line at the top setting the encoding, but the encoding is misspelled and thus not one of the encodings understood by TeXShop, then TeXShop hangs, and no typesetting can be done until the user quits and restarts TeXShop. This is fixed, and TeXShop now puts up an error dialog and chooses an alternate encoding. Incidentally, the best way to avoid this error is to use the "Encoding" Macro, which forces you to choose an encoding from a menu and only presents legal choices.
  • Erik A. Johnson discovered that the "Trash AUX File" command in TeXShop fails when the source file is in a Google Drive volume because Google Drive does not have a Trash Folder. He examined the TeXShop sources and supplied several fixes for this problem. TeXShop 4.67 contains the most straightforward of his fixes. The fix calls the NSFileManager's "trashItemAtURL" method to put the item in the trash, but if this method returns an error, then it calls the "removeItemAtPath" method to remove the item entirely.
  • TeXShop now understands the "perl script" file type for files with extension ".pk".
  • Herbert Schulz revised the active engines pdflatexmk.engine and sepdflatexmk.engine and revised the folders "Latexmk" and "GhostscriptTransparencyEngines" in ~/Library/TeXShop/Engines/Inactive/Latexmk. These changes have to do with passing parameters to the engines and on through pdflatexmk to the various binary files being called. Users should read the documentation in the Latexmk folder.
  • The remaining items fix bugs when TeXShop is run on macOS 12.1, Monterey. When line numbers are activated in the source window, the first bug caused missing line numbers during scrolling. The fix replaces these missing line numbers after the scroll is completed.
  • A second bug caused a slight displacement in the pdf window after each typesetting job. This has been a problem for many years, but the displacement was worse in Monterey. The bug fixes this problem, both in Monterey and in earlier versions of macOS.
  • During Monterey testing, an initial switch to "Single Window Mode" displayed only the tool bar of the new window, without the two content regions. This proved to be a resizing problem, fixed by resizing the window appropriately. Once fixed, the bug did not recur. Users who run into this problem should resize.

New in TeXShop 4.66 (Jul 7, 2021)

  • There are eight changes in TeXShop 4.66. The first four are minor; the remaining four are more important.

New in TeXShop 4.64 (May 4, 2021)

  • Latexmk is updated to version 4.73. Version 4.72b of latexmk, introduced in the previous version of TeXShop, had a serious bug causing long pauses when the program parsed the log file of certain book length projects. This is fixed.

New in TeXShop 4.63 (Apr 23, 2021)

  • The Ghostscript transparency engines were revised by Herbert Schulz (with help by Bruno Voisin). These engines in ~/Library/TeXShop/Engines/Inactive now take into account recent Ghostscript modifications and a change in TeX Live 2021.
  • Latexmk is updated to version 4.72b.
  • The Menu Item "Source --> CommandCompletion-->Add Word" lacked a keyboard shortcut in the German localization. Fixed.

New in TeXShop 4.62 (Mar 22, 2021)

  • This version fixes localization problems, particularly in the Help menu, introduced in version 4.61.

New in TeXShop 4.61 (Mar 22, 2021)

  • This version changes the bibtex UTI from org.tug.bib to org.tug.tex.bibtex at the request of the BibDesk team. In addition, it adopts Apple's modern names for localized versions of the program, fixing some minor bugs in which text in strange scripts appears in occasional dialogs.

New in TeXShop 4.60 (Mar 2, 2021)

  • The preference item "Open as Tab in Root Window" introduced in 4.59 is now off by default. Users who installed 4.59 may need to turn it off themselves. Most users will never need this feature.
  • In Apple's System Preferences under the General tab, there is an item labeled "Prefer tabs: in full screen when opening documents." The text in italics is a pull-down menu with three choices: "never", "in full screen", and "always". Users who have selected "always" should not select "Open as Tab in Root Window" because they already have the desired behavior. Moreover, the TeXShop item will interfere with the behavior given by this preference setting.
  • The System Preferences item changes the behavior of all Cocoa programs, while the TeXShop item only affects TeXShop. Moreover, the System Preferences item opens all source files as tabs in a single window, while the TeXShop item only opens source files associated with a given root as tabs in that root window.

New in TeXShop 4.59 (Feb 23, 2021)

  • The TeXShop Help Menu has been rearranged slightly and a new item has been added labeled "TeX Live Documentation". TeX Live contains a massive amount of documentation, and this item makes these documents available to the user by displaying a page of links to alphabetical lists of documents and certain individual items. The links respect the active distribution, so files in TeX Live 2020 will be displayed if that is your active distribution, but when you update to TeX Live 2021, document files in TeX Live 2021 will be displayed. If you install a distribution like BasicTeX which omits the documentation, these links will become inactive.
  • Some links refer to material on the internet and are always active.
  • Among the linked information is the "learnlatex online LaTeX lessons" for new users (with interactive examples), a recent document by Jim Hefferon listing packages all LaTeX users should know about, and a catalog illustrating all fonts in TeX Live.
  • Applescript macros begin with the line "--applescript direct" or "--applescript". If the first form is used, TeXShop itself runs the script. If the second form is used, a small program called ScriptRunner in TeXShop runs the macro. This second form is required if the script asks TeXShop to perform tasks.
  • In previous versions of TeXShop, ScriptRunner only had x86_64 code and macros starting with "--applescript" failed on Arm machines. In TeXShop 4.59, the bug is fixed because ScriptRunner has a universal binary.
  • The next two items were requested by Uwe Schmock. After a TeX typesetting job completes, the console becomes active and items can be copied from it and pasted elsewhere. But this didn't work after BibTeX or MakeIndex jobs. Now it does.
  • Suppose a project has a root file and include files for various book chapters. When the user uses SyncTeX to sync from the Preview Window to the Source Window, it sometimes has to open chapter files. A new Preference item makes these files open as tabs in the Source Window rather than as independent windows. This feature requires Catalina or higher; the preference item is ignored on earlier systems.
  • The feature also does not work in Single Window mode. Tabs were added to Cocoa by Apple and work with very little code, often no code at all. But they assume a basic window design which doesn't hold in Single Window mode, so adding them to Single Window mode would involve dangerous kludges. Using independent windows for source and preview is the primary TeXShop mode and highly recommended for projects large enough to divide into independent chapters.
  • There is a famous text editor named emacs. This editor was written before computers had mice, so it had elaborate commands to move the cursor. There were keystrokes to move forward one character, back one character, forward one word, back one word, forward one sentence, back one sentence, etc. Additional keystroke commands were available for copy and paste. The great disadvantage of emacs was that the editor came with a two page table of instructions and took weeks to master. The advantage is that it allowed rapid entry of text without lifting a hand to reach the mouse. (Modern versions of emacs accommodate mice.)
  • The Cocoa text editing code used by TeXShop and many other programs on the Macintosh was originally written by engineers at NeXT; many of these engineers used emacs. So they added a vast number of emacs keystroke shortcuts to the editor. I don't know the history of this code, but I like to imagine that the emacs keystrokes were added secretly without telling Steve Jobs. Most modern Mac users are completely unaware of this feature.
  • For a small sample, hold down the control key and type the letter "f". Notice that the cursor moves forward one character with each keystroke. Replace "f" by "b" and the cursor moves backward.
  • The site https://www.hcs.harvard.edu/~jrus/site/system-bindings.html has a long list of such shortcuts; appropriate Google searches will explain in detail how the system works. Herbert Schulz has a useful website with many items for TeXShop users: https://herbs.github.io. One of this items is a folder with Key Binding documents and samples.
  • Emacs keystrokes were completely customizable and the shortcuts for the Cocoa editor are similarly customizable. This is done by placing a file named DefaultKeyBinding.dict in ~/Library/KeyBindings. The structure of this file can be found with Google searches; some sites contain sample customization files.

New in TeXShop 4.58 (Jan 4, 2021)

  • Claudio Beccari asked if the font used by the log window can be changed. In version 4.58, the console font and font size are also used by the log window. Changing the console font and font size modifies the font in both the console and the log window.
  • Some time ago a preference was added which modified kerning and ligatures in the source window. This never worked and was abandoned, but an unfortunate souvenir remained. Setting the document font in Preferences became unnecessarily complicated: a sample window appeared and font changes were first sampled in that window. When the OK button was pressed, the sample window went away and the font change appeared in all open source windows. But the change was not permanent until the OK button at the bottom of the Preference Pane was pressed.
  • In 4.58, changing the document font works like setting the console font. Press the "Set" button and the Font Panel appears. Selecting a new font or size in the Panel immediately changes the display of all open source windows. Click "OK" at the bottom of the Preference Pane to make the change permanent and "Cancel" to revert to the original font choice. The Sample Window is gone.
  • Updated to the latest Sparkle update framework, version 1.24.0.
  • The French localization of the Preference Pane's Source Tab had a missing item to set Parens Targets and HighLite colors. This is back.
  • The author of latexmk, John Collins, remarks that TeXShop engines used by latexmk should not move output files out of the source folder to alternate folders. This restriction can easily be enforced by adding the following lines to the file ~/Library/TeXShop/bin/latexmkrcedit:
  • # make sure the output directories are not re-directed.
  • $out_dir = $aux_dir = '';
  • The latexmkrcedit file just mentioned is created automatically by latexmk the first time it is used, and then left in place because some users edit it and add personal features. If you have never edited this file, please remove it from ~/Library/TeXShop/bin. A revised version will be written the first time latexmk is used. If you have edited latexmkrcedit, please edit the file now and add the lines above to the file.

New in TeXShop 4.57 (Dec 15, 2020)

  • Fixed the issue about ".LucidaGrandeUI" font.
  • Increased the default font size of the Find/Replace text view to 18pt (on Mojave and higher).
  • In darkmode, the text color will be automatically adjusted.
  • Users will not notice the first item, which fixed debugging messages in XCode.
  • This should end the flurry of changes caused by Apple's Arm release, and I expect that TeXShop will remain unchanged through the holidays at least.

New in TeXShop 4.55 (Dec 13, 2020)

  • The previous version, 4.54, fixed a bug when running on Sierra and High Sierra. After that fix, TeXShop could again run on macOS 10.12 and higher. The fix made no changes in the code; instead it replaced the Source Window in the English Interface Builder file with a copy of the German version, and then hooked up the connections for this object. Unfortunately, the window had several layers: a Split View, followed by two Scroll Views lying over two Clip Views, each containing a Text View. So some of the connections were not made.
  • That had rather dramatic consequences. Splitting the source window failed, various macros no longer worked, and Single Window mode failed. Thanks to rapid and detailed complaints from users, these problems were fixed by adding the missing connections. Version 4.55 is exactly what 4.54 was intended to be.

New in TeXShop 4.54 (Dec 13, 2020)

  • Version 4.50 had a bug which caused text in the editor to slide under the line numbers, making the initial characters of lines unreadable. This bug only occurred on Sierra and High Sierra. Consequently I revised the TeXShop web pages to say that TeXShop requires Mojave or higher, and I modified the Sparkle update mechanism to only offer updates to users running Mojave or higher.
  • By mistake this modification of Sparkle was omitted when version 4.53 was released. Several users consequently encountered the bug again and wrote me. One of them, Bernard Magneron, provided screen snapshots and a very clear description of the bug, and then added a key fact I did not know: the bug only occurred in the English version of TeXShop, but not in other languages..
  • That important hint led to an easy fix. So TeXShop 4.54 again works on Sierra and High Sierra as well as all higher systems. The web pages have been revised and the Sparkle restriction has been permanently removed. Thank you, Bernard.
  • The "Abort" routine, available by pushing a button on the console, kills the typesetting process in case of severe trouble and prints "Process aborted" in the console. In version 4.54 of TeXShop, if this button is pressed while the option key is down, then TeXShop closes the file handle piping information from the typesetting process to the console and prints "Console output killed". This addition is provided for very rare cases when a defective macro creates a loop causing TeX to ignore the kill signal.

New in TeXShop 4.53 (Dec 7, 2020)

  • Isao Sonobe created version 2.1.8 of OgreKit (this is the older of the two versions mentioned in the 4.51 Changes below) and compiled it for both Apple Silicon and Intel using XCode 12.2, the latest development system for macOS. This version does not use Garbage Collection and thus compiles fine for Apple Silicon, and it does not have the "Find All" bug described in the 4.51 Changes. Thus OgreKit is restored as a full-fledged modern component of TeXShop again, thanks entirely to Sonobe's work. TeXShop again supports regular expressions.
  • It is a thrill to release TeXShop restored to normal, without having to do any work myself.
  • Note that command-+ can be used to increase the font size in the Find and Restore fields of OgreKit. A "select all" is needed before doing this in the Restore field, so "command-A command-+ command-+ ..." Copying text from the source to the Find panel also respects size. These size changes are not remembered when erasing fields and entering new searches, but that is a minor problem which can be fixed later on.
  • In 4.51, some changes were added to improve the experience splitting the Preview window. Further work has been done which slightly improves this action. Now the position of the top portion matches its position in the unsplit window for certain sizes. This is working on my large monitor, but not on the portable screen, so this is very much work-in-progress.

New in TeXShop 4.51 (Nov 21, 2020)

  • In about half of the localizations of TeXShop, the Preference setting which changes the font used by the console broke. This is fixed. Thanks to Jacques Bloch for this bug report.
  • A tool in the Preview Window selects Scroll, Select Text, Magnify, Magnify (Large), or Select PDF. If the window becomes too narrow, this item falls off the window and becomes a pull down menu, but the menu only displayed four choices. This is fixed; the menu now displays all five choices. Thanks to John Pryce for this bug report.
  • Uwe Schmock in Vienna requested a change in the code which splits the Preview window, based on an experience using it while teaching remotely. The new code has three features:
  • The contextual menus for the Source window and the Preview window have an additional item to split the window. This item recognizes the option and shift keys if held down when the item is chosen. Recall that the Option key switches from horizontal to vertical splitting.
  • All other changes affect only the Preview window. Suppose the window is split, so the original full window goes to the top pane. Scroll both panes and then undo the split so the top pane becomes the full window again. The next time you split, the second pane will still hold its original scrolled material. So if you are editing chapter 4, but referring to a section in chapter 2 over and over, that section in chapter 2 will remain present when you split.
  • If the window is split and you hold down the Shift key and push the split icon, the two pieces will switch positions. If you then undo the split, you'll go to a full view of the region originally in the bottom.
  • I hope this code is immediately useful. It has a few rough edges which will be fixed soon. I need to get this version out because of the following item.
  • For a long time, the default Find option in TeXShop was the OgreKit Panel, a third party project from Japan. Now the default option is the Apple Find Bar, which is also used by several Apple applications. Users may want to switch.
  • OgreKit is an open source project on GitHub. It supports regular expressions, so I was thrilled to include it in TeXShop. For many years, TeXShop used version 2 of the OgreKit code.
  • When Dark Mode was released on Mojave, OgreKit was modified to support it. This modification was called version 3 of OgreKit. At the same time, a number of important changes were made to OgreKit "under the hood." The most important change involved memory management: version 2 uses garbage collection while version 3 uses ARC, automatic reference counting.
  • Unfortunately, version 3 was never finished and the last modification to the GitHub source occurred two years ago. Very briefly, TeXShop switched to this version 3 of OgreKit, but it turned out that the code had a fatal error and we immediately switched back to version 2. This fatal error involved "Find All". This button seemed to work if pressed in OgreKit. But afterward, TeXShop froze. The user could type, but nothing new appeared on the screen. At that point, it was necessary to abort the program and restart. But when the user did that, they discovered that their new typing actually had been accepted and then saved. In particular, if they typed gobbledygook when the editor stopped responding, the gobbledygook was now in their source. Of course this is a fatal error.
  • To repeat, version 4.44 of TeXShop uses version 2 of the OgreKit code, which works fine except for minor Dark Mode problems. However, version 2 cannot be used in the Apple Silicon era because it uses garbage collection. Apple has deprecated garbage collection and recommends that users switch to ARC. The garbage collection code is still in Big Sur, so TeXShop 4.44 continues to work there. But XCode 12, which is required to compile for Apple Silicon, refuses to compile programs which use it. This is a sure sign that it will be removed from future version of macOS, perhaps very soon.
  • Since TeXShop 4.50 and higher support Apple Silicon, we had to switch to Version 3 of OgreKit. TeXShop 4.50 contains an OgreKit with the fatal "Find All" bug. But in Version 4.51 of TeXShop, I removed the "Find All" button from the OgreKit Panel, so users should be unable to create the error.
  • There is no chance that I'll find time to fix OgreKit, but I prefer to leave it in TeXShop in its imperfect state for users who need regular expressions. Since I don't use it myself, I'd appreciate bug reports, and I'd like to be notified immediately if some other feature breaks the TeXShop editor. These bugs won't be fixed unless some volunteer is willing to take over the project, which would be wonderful. But if a bug breaks the TeXShop editor, I'll remove the feature if possible and otherwise remove the entire Find Pane.

New in TeXShop 4.50 (Nov 12, 2020)

  • Apple redesigned the look of the toolbar on Big Sur, macOS 11, and provided a large number of toolbar icons, recommending that programmers use these icons rather than designing their own. The toolbar has a cleaner look and the icons are less elaborate than before.
  • When version 4.50 of TeXShop is run on Big Sur, it adopts this new look for the toolbar and its icons. The new icons cannot be provided on earlier systems because they depend on Big Sur APIs, so the TeXShop toolbar is unchanged when run on earlier systems.
  • Some Big Sur users may prefer the old icons. A new preference item under the "Misc" tab allows them to switch back to old icons. When it is selected, the change will apply to any new window opened afterward. The toolbar itself will still have the new Big Sur look. This preference item has no effect on earlier systems. I recommend avoiding the preference item and using the new icons, which will seem natural after a few days.
  • TeXShop provided three "Typeset Button" tools, for the Source, Preview, and Single Window Mode windows. In the initial release of version 4.50, the button in the Preview window caused the program to crash. Rather than resurrecting that button, it has been removed from the program. The Preview button was mainly used with an External Editor, but these users can still typeset by using an item in the Typesetting menu, or by typing command-T.
  • TeXShop now has universal binaries and runs natively on Arm machines.
  • The toolbar has items to split the Edit Window and the Preview Window into two independent portions. In previous versions of TeXShop, this split was done horizontally, with one portion on the top half and one on the bottom half. That still works in TeXShop 4.50, but if the option key is held down while clicking the tool, the split is now vertical rather than horizontal.
  • The TeXShop Preview window has a tool to select a portion of the page and convert it to an illustration in pdf, tiff, jpeg, or png format. Several ways are provided to output this illustration. It can be copied from the page and pasted into another program, or dragged to the desktop to form a file there. Alternately, the menu command "Save Selection to File" opens a Save Panel which the user can use to save the illustration to any chosen folder, with any chosen name, and in any of the possible formats. But at some point in the past, this "Save Selection to File" command stopped worked. It is fixed in TeXShop 4.50.
  • One of the possible illustration formats was "PICT", a format used in the original Macintosh from 1984 to 2000. As far as I know, no other computer system used this format. Saving illustrations in this format failed in recent versions of macOS, probably because support was removed from the operating system. All traces of the PICT format have been removed from TeXShop 4.50.
  • Latexmk has been upgraded to version 4.70a.
  • A LuaHBTeX engine is available in ~/Library/TeXShop/Engines/Inactive. This location also contains a MetaPost engine by Vafa Khalighi which uses only pdfTeX and mptopdf.
  • The asymptote engine has been upgraded to a version supplied by Vishaal Rajani and Cole Zmurchok. Moreover the .asy filetype has been upgraded to be one of the "TeX Extensions" eligible for syntax coloring and the like.
  • If a TeX command has the form cite[...][...]{word}, then in addition to syntax coloring the "cite", TeXShop syntax colors "word". At the suggestion of Akshay Gupte, citation syntax coloring has been extended to natbib commands. So in version 4.50 the same rule applies to any command with begins with the letters "cite" or "Cite".
  • MacTeX-2020 installed Ghostscript 9.50 rather than Ghostscript 9.51 or 9.52 because these more recent versions did not correctly handle transparency. This bug is fixed in Ghostscript 9.53.3, released on October 15, 2020, and available as an install package from https://pages.uoregon.edu/koch. Ghostscript 9.53.3 will be part of MacTeX-2021.
  • If you install Ghostscript 9.53.3 and use transparency in illustrations, you should go to ~/Library/TeXShop/Engines/Inactive/, find the folder GhostscriptTransparencyEngines, and inside that folder find "For TeXShop/Engines". Find the file latexTR.engine in this folder and move this file or a copy to ~/Library/TeXShop/Engines, making it an active engine. Then instead of typesetting with pdflatex in DVI mode, you should use this engine. These engines and samples are due to Herbert Schulz. For an explanation, continue reading.
  • The default typesetting engine in TeXShop is pdftex or pdflatex, which is a modified version of the original TeX program. This modified version outputs pdf files, which are easily processed by macOS and other modern systems. The original TeX program output a dvi file; the instructions in this dvi file essentially said "open a specific font, say computer modern, and stamp glyph 57 here, stamp glyph 71 here, stamp glyph 91 here, etc." Knuth assumed that other programmers would then write software which read the dvi file and output printing instructions for specific printers. The first printers used by TeX were postscript printers, and the first such program was dvips, which converted the dvi output to postscript for the printer.
  • As for illustrations, the original TeX did not itself process them. Instead, if the author inserted an eps illustration, TeX set aside an area for the illustration and then inserted a "special" command in the dvi file. Such special commands were intended for the printer driver, which could ignore some such commands and process others it understood. Since dvips understood postscript, it could insert the postscript code from the eps file into the postscript output stream. Later the "pstricks" package was written, allowing authors to directly insert postscript instructions in their source code. Again TeX just passed these instructions to dvips, which knew what to do with the postscript.
  • Adobe invented and controlled postscript, and licensed their postscript code to printer makers for a hefty fee. But Adobe released the postscript language specification for anyone to use, so the open source community was free to reimplement the language in open source form. The resulting code, Ghostscript, is extensively used everywhere, and very actively maintained. In the TeX world, the program ps2pdf is extensively used to convert postscript to pdf (it calls Ghostscript to do the hard work). This makes it possible to typeset using the chain TeX -> dvips -> ps2pdf, which is exactly what the DVI command does in TeXShop.
  • Postscript is actually a von Neumann complete programming language, which theoretically can perform any calculation, although it is optimized for making two-dimensional images. A common trick is to write a postscript program to compute a table of prime numbers and simultaneously print the table. Since postscript is a complete language, it is vulnerable to security attacks, and the team responsible for Ghostscript actively searches for such attack points and patches them. For this reason, users should keep their copy of Ghostscript up to date.
  • In particular, certain features of postscript are inherently dangerous, but luckily rarely used for TeX. These features must be retained so old projects are not damaged, but the Ghostscript team has marked them for special consideration. They added a flag called dSAFER; if this flag is set, these dangerous commands are disabled. For example, deletefile and renamefile are disabled, and Ghostscript can only open stdout and stderr for writing.
  • In Ghostscript 9.50, the SAFER mode was made the default. So dSAFER is mostly replaced by the flag -dNOSAFER which allows dangerous features to run.
  • But meanwhile, the Ghostscript programmers discovered that the postscript commands setting transparency produced inconsistent results when mixed with other methods. The fix ultimately will require replacing .setopacityalpha, .currentopacityalpha, .setshapealpha, .currentshapealpha. For the moment, these commands still exist but are marked as deprecated as of 9.53. Authors of several TeX style files and packages will have to replace these commands by modern equivalents defined in Ghostscript. The 9.53 documentation says for each "Note, it is strongly suggested that this method not be used as it currently may give inconsistent results when mixed with methods that set stroke and fill alpha values."
  • In 9.50, these commands were disabled by default, and turned on by -dNOSAFER. This meant that authors who needed them had to accept the full set of insecurities allowed by -dNOSAFER. In 9.53.1, this is no longer the case. Instead the deprecated commands are enabled by adding the flag -dALLOWPSTRANSPARENCY.
  • This design broke in 9.51 and 9.52 for reasons that are unclear to me. TeX users should stick with 9.50 or upgrade to 9.53.3.
  • Many more details, including the replacements for the deprecated transparency commands, can be found in the Ghostscript documentation. Special thanks to Herbert Schulz and Bruno Voisin, who are the experts in all this. Herbert wrote the new engine for DVI mode, which looks at the version number of the Ghostscript installed on a machine and adjusts the flags accordingly. Bruno Voisin created the setup we use to provide Ghostscript on the Mac, including additional font support and so forth. I just follow his instructions.
  • Herbert Schulz provides support for many TeXShop users and is an expert in features of the program which I seldom use. He has a special web page devoted to issues he has studied with suggested macros, scripts, engines, and documents. This page is well worth visiting: https://herbs.github.io

New in TeXShop 4.44 (Oct 23, 2019)

  • In version 4.35 of TeXShop, Jörg Christian Kirchhof improved the TeXShop "HardWrap" command so it correctly handled comment lines. Shortly after 4.43 appeared, he wrote to complain that his new code had been removed. Possible, since I've been switching between Mojave and Catalina. But in fact his code was present and worked when TeXShop was run inside XCode, but did nothing when TeXShop was compiled to become a stand-alone program. Apple optimized his code out of existence. Kirchhof fixed this, and improved the code to handle another tricky edge case.
  • The Apple Find Bar now works in the console. Activate the main text by clicking in it, and then type command-F. Use the arrow keys to move from item to item. "Find and Replace" is not available because the console text is not editable.
  • I've been using Dark Mode more and more and changed the default coloring scheme for that mode. To obtain it, quit TeXShop. Then go to ~/Library/TeXShop/Themes and rename DarkTheme.plist to something else, perhaps OldDarkTheme.plist. When TeXShop restarts, it will create a new DarkTheme.plist. You still have the old one, renamed, if you prefer your version to mine.
  • I used this opportunity to change two default items in TeXShop Preferences. This will not affect previous users. The default Find method is now the Apple Find Bar. This method is used by more and more programs like Safari, TextEdit, and Word, and users have come to expect it. The OgreKit panel remains the default in Japan.
  • I also unchecked "Editor Can Add Brackets" in TeXShop Preferences under the Editor tab. When this item is checked and more than two items are selected in the Source Window, typing {, (, [, or $ places a matched pair of brackets around the selection. This can be useful for users who know about it, but new users (and others) don't like surprises, and interprete them as errors in the code.

New in TeXShop 4.43 (Oct 18, 2019)

  • In an evening phone call, Louis M. Guenin pointed out that the Apple Find Bar in TeXShop doesn't behave like the similar Find Bar in Safari, TextEdit, and other Apple programs. In other programs, the entire window being searched darkens during a search and all instances of the phrase being searched stand out in white, with the active element in yellow.
  • The Find Bar is created by Cocoa with only a single line of TeXShop source code turning it on. It has an extra parameter called ``incrementalSearchingEnabled'' which TeXShop did not set. Now TeXShop sets the parameter.
  • There is a hidden preference to turn the feature off for users who dislike it: defaults write TeXShop IncrementalSearch NO
  • TeXShop has three search panels, the Apple Find Panel, the Apple Find Bar, and the OgreKit Find Panel. The choice among them is made in TeXShop Preferences and becomes active the next time TeXShop starts. The Apple Find Bar is the least intrusive, simply adding an extra search line at the top of the source window, but it is surprisingly powerful; users should give it a try. It supports "search and replace" once the word "replace" is checked, and there is a hidden pull down menu with other options, triggered by the symbol on the left side of the bar. And it fully supports Dark Mode.

New in TeXShop 4.42 (Oct 1, 2019)

  • During typesetting, it is not possible to cut and paste text from the console, but cut/paste works after typesetting ends. If there is an error, TeX waits for further input but cut/paste remains inactive. Pushing RETURN until typesetting ends will make it active. If the user pushes ABORT, cut/paste remained inactive in earlier versions of TeXShop, but now it becomes active.
  • In single window mode, several Preview menu items were deactivated. Now most remain active.
  • A similar deactivation occurs in the Source menu; the five items between "Duplicate" and "Revert" are deactivated. Many of these items behave unexpectedly in Single Window Mode because they only change the source file, so the active Source and Preview are no longer related. Moreover, none of these menu items is in the TeXShop source code, as can be verified by opening the source in XCode. Instead, they are added to the menu automatically by Cocoa when Automatic Saving is activated. Because they are entirely encoded in Cocoa, changing their behavior for Single Window mode could lead to instabilities in file saving behavior, and instability in that system would be intolerable. So in single window mode, these items are still disabled in TeXShop 4.42.
  • The Macintosh uses Uniform Type Identifiers (UTI) to identify various kinds of files: tex files, latex files, pdf files, html files, etc. On other operating systems, these types are often determined by file extensions: .tex, .ltx, .pdf., .html, etc. Macintosh programs contain a file named Info.plist which, among other things, associates file extensions used by the program with corresponding UTI's.
  • When the UTI system was invented, Apple predefined UTI's for various well-known types. Examples include public.html, public.xml, public.jpeg, public.png. Some types are associated with companies primarily in charge: com.apple.rtfd for .rtfd files, and com.adobe.pdf for pdf files.
  • When this system was designed, the designers did not pay enough attention to open source types not on their generic list and not controlled by a particular company. This creates headaches for authors of programs dealing with these open source files. The TeX world is a prime example; our files have extensions .tex, .ltx, .ctx, and .texi among others, but Apple does not provide public.tex, public.ltx, public.ctx, or public.texi, and the rules say that the "public domain" is under Apple's control and cannot be extended by developers.
  • Faced with this dilemma, developers for TeX programs on the Macintosh have by and large invented their own UTI's for these fundamental types. Originally, TeXShop used org.tug.tex, etc., but as other front ends and editors appeared defining their own UTI's, TeXShop switched to edu.uo.texshop, etc. If a user has several front ends and editors, the UTI assigned to a TeX file becomes unpredictable. These UTI's are used for QuickLook and Spotlight Searching, and these also begin to fail. Icons attached to these files can change at random, for no known reason.
  • In early September, I filed a developer support incident about this issue and requested that Apple extend the public list and define public.tex. I now wish I had requested public.tex, public.ltx, public.ctx, and public.texi.
  • Developer support wrote back correctly pointing out that the existence of these UTI's would not solve the problem unless all front end developers and editor developers dealing with TeX agreed to adopt the UTI's. Instead, they suggested that the governing body overseeing TeX development propose appropriate UTI's and obtain agreement from software authors to use them. In a separate message, they acknowledged that in the current environment with multiple UTI's defined by multiple pieces of software, there was no way to make QuickLook and Spotlight work correctly.
  • In the TeX world, I know of no "governing body overseeing TeX." Perhaps the closest approximation to such a body would be TUG, the TeX User Group, but in fact there are dozens of such groups across the world, and they are mostly independent of each other. In the windows world, the primary TeX distribution is MikTeX, which is independent of TUG. And as for TUG itself, it is a loose collection of people passionately devoted to TeX, but certainly not to any particular computer platform running TeX. Since UTI is a Mac-only design, there would be reluctance within TUG to get involved with this issue.
  • One more item in Info.plist is probably relevant here. When defining UTI's, an application lists each as an "Exported Type" or an "Imported Type". An Exported Type is a type created by that particular application, while an Imported Type is created by some other entity but used by the application. When I switched to edu.uo.texshop.tex, I defined it as an Exported Type in hopes that the operating system would pay more attention. I now think this was a mistake.
  • Our only hope is that someone will take on the thankless task of rounding up software authors and getting them to agree to a single UTI, at least for the four types I've listed above. I'm not willing to be that person, and indeed I suspect it isn't reasonable for someone developing one of the TeX applications to perform the task. I suspect that the job would be infinitely easier if Apple began by defining public.tex, public.ltx, public.ctx, and public.texi, and perhaps a first userful step would be for others to add their request to the pile.
  • But in the meantime, TeXShop 4.42 takes an initial step in the required direction. It reverts to the original choice of org.tug.tex, org.tug.ltx, org.tug.ctx, and org.tug.texi for files with extensions .tex, .ltx, .ctx, and .texi, and all four are defined as Imported Types rather than Exported Types.
  • Perhaps the day will come when these four items can become public.tex, public.ltx, public.ctx, and public.texi.

New in TeXShop 4.41 (Sep 22, 2019)

  • Version 4.41 fixes minor engine problems caused by the elimination of the default ConTeXt menu item. Note that up to date ConTeXt engine files remain in 4.41; the version of ConTeXt in the menu was years out of date.

New in TeXShop 4.40 (Sep 22, 2019)

  • The "flash fix" in version 3.39 works on Mojave and Catalina. But the bug also affects High Sierra, and a slightly different fix is required for that operating system. In version 4.40, the bug is also fixed in High Sierra.
  • LaTeX is a set of typesetting macros by Leslie Lamport and others; ConTeXt is an alternate set of typesetting macros by Hans Hagen. The TeXShop typesetting menu contains special items for LaTeX and ConTeXt, but not for other engines like XeTeX and LuaTeX. However, the ConTeXt item is out of date; it still calls pdflatex although modern versions of ConTeXt use luaTeX (and have associated engine files). So ConTeXt has been removed from the typesetting menu. Its entry in the Default Command item in TeXShop Preferences under the Typesetting tab is also gone. Of course ConTeXt is still available as an engine, so the change encourages users to use the modern version of ConTeXt rather than a version which is several years out of date.

New in TeXShop 4.39 (Sep 16, 2019)

  • James Crippen reported that in version 4.38, when the magnify tool is selected in the Preview window and the Source window is active, clicking in the content region of the Preview window magnifies but does not activate the window. This is fixed. Now the first click in the content region of an inactive Preview window activates that window, but an additional click is needed to magnify.

New in TeXShop 4.38 (Sep 15, 2019)

  • The magnification glass code in 4.37 had bugs. With the glass active, it was impossible to scroll the pdf window with a track pad. Moreover, the window could not be resized, and the mouse-based scroll bar did not work; instead both actions triggered the magnifying glass.
  • These problems are fixed in 4.38.
  • The fixes should be sufficiently tested today to insure no future problems. But just in case, anyone with source code can return to the original version of the glass before 4.37 was released. On line 59 of globals.h, the code "#define IMMEDIATEMAGNIFY 0" occurs. Remove this line or comment it out and recompile.

New in TeXShop 4.37 (Sep 15, 2019)

  • Apple's PDF software has a routine to load and display a new pdf file. A common use case is to display the first page of the new file, and then the routine works well. But we want to display the same page before and after typesetting, and it is usually not the first page. Then Apple's routine introduces an annoying "flash".
  • TeXShop has a fix for this problem. Just before loading the new pdf file, it takes a picture of the old page and glues this picture on top of the Preview window. When the new pdf is loaded, it creates a flash but the flash is hidden beneath the picture. Then the picture is removed. This whole process takes about half a second.
  • Several routines are available in Apple's API's to take that picture. At first TeXShop used a routine named "screenCacheImageForView" which worked perfectly. But later I realized that this routine had a memory leak and each typesetting job used up 20 megs of memory. So I switched to a second routine called "bitmapImageRepForCachingDisplayInRect". This routine had no memory leak, but caused a blurry display for a moment after each typesetting job.
  • In version 4.37, the original screenCacheImageForView is used, but the memory leak is fixed. Four hours after finding this fix, the exact same fix was emailed to me by Martin Hairer. Thanks!
  • Version 4.35 introduced a hidden preference setting called "CreateImage" which allowed users to experiment with various picture taking routines. This preference is still present, but has been completely deactivated.
  • The Preview window has a magnifying glass, but it behaved in a strange way. To magnify, the user pressed the mouse button and then moved the mouse by a few pixels. Pressing the mouse without moving it did not reveal the magnifying glass (unless the press occurred in the white space surrounding the text).
  • This is fixed; the magnifying glass now appears immediately when the mouse button is pressed.
  • Tóbiás Áron reported an interesting bug. If BibTeX was run by an Applescript, it failed to report to Applescript that it had finished. This broke the Applescript macro "Bibliography", which called pdflatex and then BibTeX and then pdflate twice more. Fixed.

New in TeXShop 4.27 (Apr 7, 2019)

  • When using the Apple Find Bar, command-G now searches for the next item immediately; it isn't necessary to activate the edit portion of the window before using this shortcut.
  • Nicola Vitacolonna provided new LilyPond engines and documentation.
  • The documentation on the Sage engine has been improved.
  • Latexmk was updated from version 4.61 to version 4.63b.

New in TeXShop 4.26 (Mar 7, 2019)

  • There are two ways to activate sync from source to preview and preview to source; either click on a spot while holding down the command key, or bring up a contextual menu from a spot and select the first item, "sync". The second method lost accuracy sometime in the Mojave era. This is fixed and now the two methods are equivalent.
  • The information on using TeX and Sage together in ~/Library/TeXShop/Engines/Inactive/Sage has been improved, and the example typesets correctly with the latest Sage.

New in TeXShop 4.25 (Feb 20, 2019)

  • TeXShop 4.25 fixes an important memory leak. It fixes Applescript support, which broke a couple of months ago. And it continues the story of synchronizing with external editors started by TeXShop 4.24. Only people who configure TeXShop for an external editor will be interested in that third feature. But first, the memory leak, and applescript support.

New in TeXShop 4.24 (Feb 5, 2019)

  • Seiji Zenitani reported that In localized versions of TeXShop, the Tags and Index pulldown menus first appear in English and then switch to the correct language when initialized. This is particularly annoying in Japanese because English stands out like a sore thumb. Fixed.
  • Jesús Soto uses TeXShop with an external editor, TextMate, and requested that SyncTeX in TeXShop be given the ability to sync from the Preview window to the corresponding source in TextMate. I absolutely, positively, refused to honor this request. But I couldn't help thinking about it. In the end I relented.
  • TextMate installs a command line program in /usr/local/bin which is able to control some of the features of the editor. For instance, the command: /usr/local/bin/mate --line 50 /Users/koch/Syllabus.tex
  • opens Syllabus.tex in TextMate (if not already open) and highlights line number 50. This makes it easy to support syncTeX from TeXShop to TextMate because the standard TeXShop routine to implement syncTeX can still be used until the last moment when a line in the Source Window would be highlighted; this final step can be replaced by a call to "mate".
  • Therefore TeXShop 4.24 can sync from the Preview window to TextMate in the standard way: click on a spot in the pdf display while holding down the command key. As a bonus, Goto Error works from the Console window if the user is using TeXShop to typeset. Click this button to be taken to the first error, and click again and again to cycle through the first few errors. Of course TeXShop must be in "external editor" mode to use these features; It is also necessary to activate the features with a hidden preference: defaults write TeXShop TextMateSync YES
  • TextMate is one of many editors for the Macintosh. The ultimate goal is to add the same support for most other editors. TeXShop Preferences would have a drop-down menu listing editors it understands. The user could select their editor in this menu and automatically "sync from pdf to editor" and "Goto Error".
  • Unfortunately, I don't have time or money to accumulate editors and determine how each can be controlled. But users can gather this information for me. TeXShop 4.24 already supports other editors provided their users can write simple shell scripts, as will be explained shortly. If a user adds this support, they should send information back to me on how it was done, so I can make it easier for future users of their editor to gain the feature.
  • If you use a different external editor and want to implement the feature, you must first turn it on using a hidden preference: defaults write TeXShop OtherEditorSync YES
  • This default deactivates the TextMateSync preference mentioned earlier. Instead whenever TeXShop wants to "sync from pdf to editor" or "Goto Error", it calls a shell script in /usr/local/bin named "othereditor". When it calls this script, it sends two parameters to the call: $1 contains the line number (as a string), and $2 contains a full path to the desired tex source file. The othereditor script then calls the external editor using its version of the "mate" program.
  • But there is no "othereditor" script in /usr/local/bin. The user needs to create this script. The script must be named "othereditor" with no extension, and have its execute bit turned on. The script should call whatever binary is used by the desired editor to open the file $2 if it is not already open, and jump to line $1.
  • For example here is the complete "othereditor" script file for TextMate:
  • #!/bin/tcsh
  • set path= ($path /Library/TeX/texbin /usr/texbin /usr/local/bin)
  • /usr/local/bin/mate --line $1 $2

New in TeXShop 4.23 (Jan 25, 2019)

  • TeXShop provides default light and dark themes in ~/Library/TeXShop/Themes, named LiteTheme.plist and DarkTheme.plist. These are available in case the user activates other themes and then accidentally removes them. If LiteTheme.plist or DarkTheme.plist is removed from the directory, TeXShop will recreate it. However, previous versions of TeXShop failed to recreate DarkTheme. That is because the code to recreate LiteTheme was copied and pasted to recreate DarkTheme, but variables inside this code were not changed. This bug is fixed. It is unlikely that many users ran into it.
  • Several users, however, ran into a second bug. When they started TeXShop, the Preview Window and the Console Window did not update their colors. In dark mode, the font color and background color of the console were equal, so the contents were invisible. Opening TeXShop Preferences and editing these colors fixed the problem, but this had to be done every time TeXShop started.
  • This problem only affected users who configured TeXShop to use an external editor. The problem is now fixed.
  • Most theme colors are for the editor, so the initialization code which set these colors was placed in the section of TeXShop initializing the editor, and thus never ran in external editor mode. The fix involved moving this color initialization code five lines down in the code base, so it covered all documents.
  • Kurt Roth pointed out that version 4.22 broke "makeIndex" and provided a useful source file which clearly showed this binary working in version 4.21 and failing in 4.22. This problem is fixed. The source file made it easy to isolate the problem. Thanks, Kurt!
  • There were two main changes in 4.22 which could affect makeIndex. The first was that I switched from the old NSTask API's, now deprecated, to the new API's. Roth's source code revealed that this switch was not the cause of his problem.
  • The second change was that I switched from the "notification" method of telling TeXShop that an external task ended to the "termination Handler" method. This handler failed with makeIndex, announcing a termination before the task was finished. The fix involved switching back to the old method when makeIndex is run.
  • It is possible that the terminationHandler is misbehaving for other TeX tasks, so that instead of fixing the NSTask problem discussed at length in the 4.22 changes, it made the problem worse. Consequently, in TeXShop 4.23 we use the new NSTask API's on High Sierra and Mojave (where they are available), but revert on all operating systems to the old notification method of telling TeXShop that an external task ended.
  • This fix bypasses the fix for NSTask problems implemented in TeXShop 4.22 and described in detail in the associated Changes document. Therefore if latex seems to have failed due to the bug, TeXShop will not call "Trash AUX Files" and will not try to typeset a second time. Moreover, it will not display log information in the console.
  • However, hidden preference items are available to turn this behavior back on, and activate the terminationHandler, for users who'd like to help debug the NSTask problem. To turn on the terminationHandler, which is off by default:
  • defaults write TeXShop UseTerminationHandler YES
  • Turning this on will also turn on the NSTask bug fix by default. To turn it off:
  • defaults write TeXShop DoNotFixTeXCrash YES
  • Logging information will be off by default. To turn it on:
  • defaults write TeXShop DisplayLogInfo YES
  • Note: A very small number of users got an experimental version of TeXShop 4.23 before its official release. For those users, the default value of UseTerminationHandler was YES rather than the current NO. These users should run:
  • defaults write TeXShop UseTerminationHandler NO

New in TeXShop 4.22 (Jan 7, 2019)

  • Footnote syntax coloring is now triggered by footnote, autocite, footcite, and cite. In each of these commands, optional parameters [...] are ignored but do not turn off coloring the required {...}.
  • A small number of users have reported a bug while typesetting large documents (700 pages and larger). The bug occurs randomly. Typesetting will suddenly stop in the middle, without an error message, and input to the console will end, but the rest of TeXShop will remain active. Recovery is easy; just typeset again. Since the aux file was not properly closed, it is usually necessary to "Trash Aux Files" before typesetting.
  • TeXShop 4.22 has a workaround for this bug. Because it adopted a new Apple API for NSTask, and implemented a "terminationHandler" provided by that API, it can identify typesetting jobs which ended because of the bug. It then automatically calls "Trash Aux Files" and typesets again. This happens so rapidly that users may not notice the double typesetting job.
  • There is a possibility that this "fix" will have unintended consequences, although several users have tested it for a week. So there is a hidden preference to turn it off:
  • defaults write TeXShop DoNotFixTeXCrash YES
  • TeXShop can output log information about NSTask and the typesetting bug. This is off by default, but can be turned on with a hidden preference:
  • defaults write TeXShop DisplayLogInfo YES

New in TeXShop 4.21 (Dec 17, 2018)

  • In version 4.21, a footnote is colored starting with the initial "{"until the matching occurrence of "}" is found. In version 4.20, coloring ended with the first "}", but this brace did not form a matching pair with the starting brace if other "{, }" pairs were in the comment.
  • In 4.21, the "Color Index" tool colors index items using the "index color". In 4.20 by mistake, the "footnote color" was used. TeXShop 4.21 only colors the material in the index parameter; when first introduced several versions ago, the "Color Index" tool also colored the word "index" and associated braces.

New in TeXShop 4.20 (Dec 11, 2018)

  • The menu item "Close Current Environment" added an extraneous "92" to the text it inserted in the source. This was caused by a warning issued by the compiler and its suggested fix, which I accepted too readily, The "92" is now gone.
  • TeXShop has a special color for footnote text. This color can be turned off by a hidden preference, but it was always off in version 4.19. The bug is fixed. The footnote color is also used for index text if the "Color Index" tool is added to the toolbar and checked. This broke and is now fixed.
  • In the Italian localization, single window mode showed a blank left side. This is fixed.

New in TeXShop 4.19 (Dec 10, 2018)

  • In some situations, the initial bracket or brace of a command parameter was not syntax colored. The bug was hard to see in Lite mode, but stood out like a sore thumb in Dark mode. The bug is fixed. Many users may not have noticed this bug because it only occurred when the second of the three new "Spell Checking" options in TeXShop Preferences was on.
  • John Farragut pointed out that the console transparency was set to the source transparency rather than to its own value as set in Themes. This is fixed.
  • Before version 4.18, the tags menu was entirely reconstructed after each new text entry. This was wasteful of computer resources and risked making the editor sluggish. In 4.18, this code was deactivated and instead the tags menu is constructed just before it is displayed.
  • Tag entries can be displayed in three different menus. If the toolbar is in "Icon Mode" or "Icon + Text" mode, the icon itself is a drop-down menu which displays the tags. If the toolbar is in "Text Only" mode, the "Tags text" is a drop-down menu which displays the tags. Finally, there us a TeXShop Preference setting which adds a Tags menu to the menu bar, and this menu also displays the tags. Clicking on the Tags Icon updates all three menus.
  • However, there was a bug in 4.18, so that clicking on the "text only" tool or on the Tag menu in the menu bar did not update any menus. This caused problems for users whose toolbars are in "Text Only" mode, since nothing they clicked updated the menus. Consequently, all tag menus remained empty. This problem also affected the new Labels item. Most users set the toolbar to "Icon" or "Icon + Text" modes, and did not run into this problem. I got only one bug report.
  • Unfortunately, this problem does not have an easy solution. The code in version 4.18 depended on a feature of PopUp menus in Cocoa; they can send a notification when first clicked, before displaying their popup menu, giving time for the menu to be constructed on the fly. Ordinary menus and menus attached to "Text Only" mode do not come with this Cocoa feature. I spent several days trying to find a work-around, before deciding that any work around would not be in the spirit of Cocoa and could easily break in the future. Returning to the old method of updating the Tag menu would fix the problem. But this would risk a sluggish editor, and benefit only 10% of users who set the toolbar to text only mode.
  • Consequently, version 4.19 introduces another tool for these special users affected by the problem. The name of the tool is "Update" because clicking it updates all tag and labels menus to the current state of the text. Users who adopt text-only toolbars should add the Update tool to their Source toolbar. If they sometimes use "single window mode", they should also add the Update tool to that toolbar. Then use Tags and Labels as usual, even after editing text. But if you begin to notice that Tags or Labels doesn't take you to exactly the correct line, hit Update before continuing. Incidentally, when syntax coloring is on, the Tags and Labels menus are updated once when a document is first opened.

New in TeXShop 4.18 (Dec 3, 2018)

  • There is a new tool in the Source and Combined Windows toolbars called "Labels". It behaves like the existing Tags tool except that it lists all labels in the source code. Selecting an item in the resulting pull down menu takes the user to the definition of that particular label.
  • The Tags menu now also tags lines beginning with the following commands, for users of Beamer and Powerdot
  • When a TeXShop engine job runs, it will find that TeXShop has set a new environmental variable for it called TS_CHAR. This variable holds the current selection location in the source file. Some engine authors may find this useful.
  • Michael Beeson sent a crash report for TeXShop when using the "search" method of synchronization, a very old method mostly superseded by Lauren's SyncTeX. The crash is fixed in 4.18.
  • The most controversial Sims' addition, and the most useful for some, concerns to spell checking in TeXShop. When spell checking is on, many LaTeX commands are marked as misspelled. This is annoying. One common solution is to install a LaTeX-aware spell checker like cocoAspell. Thanks to Sims, TeXShop can now handle this problem --- for some users --- while using the standard Apple spell checker and standard Apple dictionaries.
  • Apple provides three ways to spell check text in Cocoa, and TeXShop inherits these three methods. The methods are activated for the current file in TeXShop's Edit menu, and default values can be set in TeXShop Preferences.
  • The first of these items is titled "Check Spelling", and has a keyboard shortcut "command + semicolon". When this combination is pressed, the first misspelled word is highlighted. Each additional press causes TeXShop to jump to the next misspelled word and highlight it. This spell check command is thus a glorified search in which only misspelled words are found.
  • A second way to spell check is to activate the menu item "Correct Spelling Automatically." This converts your computer into a giant iPhone, constantly standing behind you and changing what you type into what it thinks you ought to have typed. This feature can be turned off in system preferences, but users had a hard time discovering how to do it. So I added this item to TeXShop, not because I wanted users to use it, but because I wanted users to easily turn it off !
  • The final way to spell check is to use the menu item "Check Spelling While Typing." This item underlines misspelled words as they are typed, and the user can then go back and correct these words. This is how I spell check in TeXShop. The new spelling code works well with this style of spell checking. The new code doesn't work with the other methods, but it does no harm there.
  • In TeXShop Preferences, there is a new box of selections labeled "Spell Checking". These items are off by default. Leave them off if you use cocoAspell or any spell checking method except "Check Spelling While Typing."
  • The first spell checking item turns off spell checking for all TeX command words: documentclass, usepackage, begin, alpha and the like. The second is explained in the next paragraph and the third turns off spell checking inside comments. Some users may write little essays as source comments and prefer to leave spell checking on for them
  • Many TeX commands have optional parameters [...] and mandatory parameters {...}. The entries inside these parameters can also be specialized TeX words. That is true of the first example below, and it is annoying if the spell checker marks "parfill" and "parskip" as misspelled. On the other hand, in the second example the parameter is a user-supplied string which ought to be spell checked.
  • The second item in the "Spell Checking" box of TeXShop Preferences turns on a somewhat crude method of handling both kinds of parameters. When this item is on, most TeX command parameters are spell checked. But TeXShop has an internal list of certain TeX commands whose parameters contain specialized words, and for these it turns off spell checking for the first two parameters (if they occur in the source). This internal list, incidentally, is exactly the list marked for special handling by cocoAspell. But cocoAspell is more intelligent, and can mark which parameters to spell check and which to skip.
  • There is a hidden preference setting to extend the list of specialized TeX commands. The first command below adds one more element to the existing array of user supplied exceptions. The second command erases the array so the user can start over. Note that neither command affects TeXShop's default list of special commands.
  • What is the mechanism used to turn off spell checking? I wish I had thought of Sims' idea. The text in the TeXShop source window is an "attributed string." This means it is an ordinary (often very long) string, with an additional data structure associated with the string that lists attributes like "text color" and "background color" for selected ranges of the string. Sims noticed that one of the available attributes is "do not spell check this selection." So Sims added lines to TeXShop's syntax coloring code which prevent the Mac from spell checking TeX commands or comments. This means in particular that the feature only works if syntax coloring is turned on.
  • Note that cocoAspell uses more sophisticated methods and operates at the optimal moment when the system is actually checking spelling, rather than at an earlier syntax coloring moment. So if you use cocoAspell, you will want to turn all the "Spell Checking" preferences off.
  • Because TeXShop doesn't act at the "spell checking moment", there are some minor glitches with our method. When a document is first opened, there can be a slight delay and then all TeX commands will be marked as misspelled. But a single click in the edit window will fix this problem. Similarly, while source is being typed, some commands may be marked as misspelled, but the mark will be removed when RETURN is pressed.
  • Unfortunately, the new attribute is totally ignored by the "Check Spelling" search item, so it will not help when you go through the manuscript word by word looking for misspellings.

New in TeXShop 4.17 (Nov 21, 2018)

  • Version 4.16 had an updated OgreKit Find Panel. Unfortunately, we only briefly tested this panel, and it caused several problems when 4.16 was released.
  • The new panel did not support Yosemite, making TeXShop crash on Yosemite. The new panel refused to run on isolated machines running Sierra, although it worked on most machines. The panel had other minor bugs which were reproducible but with easy workarounds.
  • Then a serious, reproducible, and dangerous bug was discovered. If the "Find All" button was pressed in OgreKit, it worked as expected, but afterward the editor appeared to accept no new edits. Although the user could type, no new material appeared in the source. But if the source window was closed and then reopened, these edits suddenly appeared. Thus a user could close a document in one state, and open it in a different state. This is not acceptable.
  • Version 4.17 reverts to the old OgreKit. This has minor font size problems and problems in Dark Mode, but no serious bugs.
  • Version 4.17 has only one other change. In earlier versions of TeXShop, synctex from source to preview colored rather large sections of preview text. If a user in Dark Mode selected orange rather than yellow, a small section of orange appeared in a larger yellow selection. Now synctex colors a smaller section for greater accuracy, and with only one color.

New in TeXShop 4.16 (Nov 19, 2018)

  • The Ogrekit Find Panel has been modified by the author, Isao Sonobe, to use the latest Apple technologies . These changes include slight fixes to fully support Dark Mode. The changes are greatly appreciated.
  • The Korean localization has been brought up to date by Kangsu Kim. Many thanks.
  • The Matrix Panel has been improved slightly to support Dark Mode, although the table deliberately has a white background in both modes.
  • Following a request of Kasper Steensgaard, syntax coloring for footnote, footcite, and autocite is modified to also color the inserted text. For example, the entire source phrase "footnote{This is well known}" is syntax colored. Steensgaard works in the field of law where footnotes are common, and this change makes editing them easier.
  • The color of these footnotes is initially the same as the color of other LaTeX commands, but this color is now editable in the Themes panel of TeXShop Preferences.
  • I have learned that some users object to even slight editor changes, so there is a hidden preference to turn this feature off: defaults write TeXShop SyntaxColorFootnote NO.
  • The latest version of the Sparkle update code, adopted in TeXShop 4.14, supports delta updates. These updates load much faster because they only contain code that has changed since a previous version. The update to 4.16 will contain delta updates 4.14 --> 4.16 and 4.15 --> 4.16. Thus if you update from a version of TeXShop earlier than 4.14, you will download the complete program rather than the delta update.
  • Future updates will contain a delta update from the previous version only, so this is an incentive to keep the program up to date.

New in TeXShop 4.15 (Nov 5, 2018)

  • In TeXShop 4.14, a file named TeXShop,scriptSuite and a program named ScriptRunner were inadvertently omitted from the TeXShop Application Bundle. This broke several Applescript macros. The missing files are again present in TeXShop 4.15.

New in TeXShop 4.14 (Nov 5, 2018)

  • In macOS Lion, Apple added a "bounce" when the text in Text Edit scrolled to the top or bottom of the screen. Some users found this bounce excessive, and we added two hidden Preference Items to control it. The first, "defaults write TeXShop SourceScrollElasticity NO" was supposed to turn this bounce off, but in succeeding versions of macOS had less and less effect. The bounce also caused line number scrolling to break near the top and bottom of the text, and we added an extra fix for this problem: "defaults write TeXShop FixLineNumberScroll YES". But future versions of macOS fixed this "Line Number Scroll Bug", so our fix wasn't necessary and instead caused harm by dramatically increasing the bounce effect.
  • In version 4.14 we have given up on bounces and disabled both of these hidden preference items. The result is a mild bounce similar to the behavior of scrolling in other text programs. For many of us, the change improves the behavior of scrolling near the top and bottom of the source in TeXShop.
  • In Dark Mode on Mojave, many symbols in the LaTeX Panel were barely visible. This is fixed.
  • The Sparkle Update Framework in TeXShop has been updated to the latest version. Sparkle updates are protected by a public key encryption system. Until this update, that public key was DSA, but Sparkle has switched to EdDSA, a system based on elliptic curves. This version of TeXShop contains both public keys so updates from older versions of TeXShop still work. Once you have TeXShop 4.14, further Sparkle updates will use the EdDSA key. For some time to come, TeXShop will contain both keys to protect users who are slow to update.
  • Latexmk has been updated to version 4.61.
  • The German translation of buttons in the log window is fixed.
  • The Sage engine documentation in TeXShop/Engines/Inactive has been updated for the current version of Sage.
  • For a number of years, TeXShop has been signed using my Apple Developer ID. This protects users who download the program from the internet and have the default Apple security system enabled. The first time they run TeXShop, a dialog appears saying "TeXShop is an app downloaded from the internet. Are you sure you want to open it?" If we didn't sign the program, this dialog would instead report that it was from an unknown developer and should be thrown into the trash.
  • Starting next year, Apple will require two additional steps from developers. First, they will require that programs be compiled with a "Hardened Runtime." This is a system in which programs indicate that they intend to use facilities which could compromise security: camera, location services, address book, photo library, execution of JIT-compiled code, etc. Version 4.14 was compiled with the hardened runtime turned on, but did not have to turn on any of these exceptions. Note that a Hardened Runtime is NOT a sandboxed application. Sandboxing, which is required for applications in the App Store, could seriously affect TeXShop's interaction with the command line programs in TeX Live, so I have never even investigated sandboxing the program or adding it to the store
  • The second additional step is to send the program to Apple before signing so they can "machine check" it for viruses and other security flaws. At the 2018 Developer Conference, Apple strongly emphasized that this was not a code review or interface validation, but just an additional check for security problems. The check takes from five to ten minutes and requires a hardened runtime in advance.
  • The two steps are optional this year, but become mandatory next year. TeXShop 4.14 passed both steps. According to the Developer Conference, there is a way for users to detect this: in the dialog that appears when TeXShop is first opened, the TeXShop icon should appear rather than just a generic icon.

New in TeXShop 4.13 (Oct 10, 2018)

  • The Apple Color Picker has many ways to select a color: by mousing in a color wheel, by using RMK and CMYK sliders, by selecting crayons, and by directly entering color values in a box. This final method caused the Picker to close in 4.** versions of TeXShop. This is fixed.
  • In TeXShop Preferences under the Editor tab, in the second column, there is an item called "Flash Back for Isolated Parens". When selected, this item causes TeXShop to flash a slightly pink background color on the screen when a bracket or parenthesis with no matching symbol is typed, and then return to the original background color. On Mojave, the screen always returned to a white background, even in dark mode. Moreover, there was no way to change the "pink" color in the Themes editor. This is fixed. Now the command works in both Lite and Dark modes, and the "Flash" color for the Editor can be changed in the Themes tab.
  • Applescript macros in TeXShop can run in two ways. If the macro begins with the phrase "-- applescript", a separate small program, ScriptRunner, embedded in TeXShop runs the macro. If the macro begins with the phrase "-- applescript direct", TeXShop itself runs the macro. Herbert Schulz pointed out that ScriptRunner code has not been modified in several years and still contains both 32 bit and 64 bit code. This is fixed.
  • Version 4.08 introduced a new preference "Remaining Lines Paragraph Indent" under the Editing tab. By default, this value was set to 30, which caused TeXShop to format paragraphs of source code by indenting all lines after the first line. I received more mail about this than any other change in the 4.** series, and I learned an important lesson: "When a new feature is introduced which will change the appearance of the source code, the default value should make no change!" In version 4.13, the default value of this item is 0. Users who installed earlier versions and have been living with an 'undesirable feature' will need to change the default manually.

New in TeXShop 4.12 (Sep 30, 2018)

  • Many TeXShop macros stopped worked on Mojave. These macros use AppleTalk and AppleEvents to communicate with other programs. Apple has sandboxed AppleEvents in Mojave for security reasons. Now before such interaction is allowed, a dialog appears explaining what is about to happen, and giving the user the opportunity to allow or forbid the interaction. This dialog contains the line "TeXShop uses Apple Events to process AppleTalk scripts in the Macro Editor". This line is defined in a new element in the Info.plist file, which was absent in earlier versions of TeXShop, is present in version 4.12, and is required before sandboxed AppleEvents can be sent.
  • Two users have pointed out that the preference item "Flash Back for Isolated Parens", in the second column under the Editor tab of TeXShop Preferences, breaks Dark Mode. Users of Dark Mode should turn this item off.

New in TeXShop 4.11 (Sep 30, 2018)

  • The main purpose of 4.11 is to fix two Dark Mode problems on Mojave.
  • Users continue to complain that they cannot magnify source text with a keystroke.
  • Users also report that all but the first lines of paragraphs are indented. This is also explained below, but to repeat: To remove this feature, open TeXShop Preferences, select the Editor tab, and in the lower right corner change "Remaining Lines Paragraph Indent" from 30 to 0.
  • Previously, {, }, and $ were syntax colored, but [, ], & were not. Starting in 4.10, square brackets received the same syntax coloring. In 4.11, & also receives this coloring.
  • When users push the "Set" button to change source fonts, a Sample Text window appears showing three sample lines of text. Font, Typeface, and Size changes in the font panel are applied to this sample text until the user presses "OK" in the window. After that, the changes appear in TeXShop source windows. If the user presses "OK" these changes become permanent. If the user pressed "Cancel", these choices revert to their original values.
  • However, in Dark Mode the text color in the Sample Window changed to white, but the background color remained white and the text became invisible. This is fixed, and reasonable values are selected for both Lite and Dark modes.
  • The menu command "Open Macro Editor" opens a window showing an outline view of existing macros and an editing region where these macros can be changed and new macros can be entered. But in Dark Mode, the outline view had white text on a white background and became invisible. This is fixed, and reasonable values are selected for both Lite and Dark modes.

New in TeXShop 4.10 (Sep 26, 2018)

  • When a blank new document was opened in 4.08 and 4.09, the text was colored black regardless of the chosen Theme. This is fixed.
  • Previously, {, }, and $ were syntax colored, but [, ] were not. Now all of these symbols receive the same syntax coloring.
  • TeXShop gives a Command Color to symbols beginning with / and continuing with 'a' - 'z' or 'A' - 'Z'. These are the typical commands used by Latex authors.

New in TeXShop 4.09 (Sep 25, 2018)

  • This version fixes a bug in the Theme Preference code of TeXShop 4.08. Apple's color picker has several modes, including options to choose colors using CMYK values or gray scale sliders. In version 4.08, TeXShop obtained colors from color wells, and asked these colors for their RGB values without first converting colors in other color spaces to RGB. Fixed.

New in TeXShop 4.08 (Sep 23, 2018)

  • When previous versions of TeXShop ran on Mojave, several tools in the Source and Preview toolbars were missing. These items could be restored using several tricks, including opening the "Customize Toolbar" dialog. But they would again be missing the next time TeXShop ran.
  • This bug is fixed in version 4.08. But users who ran an earlier TeXShop on Mojave will have to take one of two actions to restore their tools. The safest is to open a project which has both a source window and a preview window, With the source window active, select the Windows menu item "Customize Toolbar..." and drag the custom set of tools to the toolbar. Repeat this operation with the preview window active. Then with the source window active, select the Windows menu item "Use One Window." Both source and preview will appear in a single window. With this window active, select the Windows menu "Customize Toolbar..." and drag the custom tools to the single-window toolbar.
  • Another more drastic way to fix the problem is to make sure TeXShop is not running and throw away ~/Library/Preferences/TeXShop.plist. Then run TeXShop. Tools will reappear. Reset any preference item you may have changed.
  • When line numbers were showing on the Source Window in Mojave, the source could scroll by about half an inch in the horizontal direction. Scrolling to the left made the beginnings of line vanish under the line numbers column. Scrolling to the right made half an inch of the source vanish off the right side. This turned out to be a Mojave bug, which Apple fixed in the fifth developer beta.
  • Programs must be recompiled on Mojave before they support Dark Mode on that system. When TeXShop was recompiled, the magnifying glass broke, the fix for a "flash after typesetting" broke, and two other features broke. All depended on drawing into an invisible overlay view above the Preview Window. This drawing code has been revised to work on Mojave, and the revised code also works on earlier systems.
  • On Mojave, the "General" preference pane for Apple's System Preferences has the ability to switch between "Light" and "Dark" appearances of the interface. In Dark mode, the toolbars of windows have a dark background, Preference and Print panels have a dark background, and so forth. But Dark Mode does not change the content regions of program displays. So in initial Mojave betas, the TeXShop editor still had black text on a white background, and the TeXShop Preview window still had the standard appearance of typeset output.
  • Some Apple programs on Mojave change these content regions in Dark Mode and others do not. For instance, Apple's TextEdit shows black text on a white background, but the editor in XCode switches to white text on a dark background. Apple's Preview program continues to show pdf files with their standard appearance, including black text on a white background. This is not surprising since the alternative would be to reach into the pdf file and switch colors on the fly, a more or less hopeless task.
  • So the question is, what should TeXShop do in Dark Mode? Note that TeXShop has had the ability for many years to change text color and background color in the Editor, the Console, and the Log file. TeX pdf output contains black text on a transparent background, so the underlying paper color shines through when printed. Thus the color of the Preview window can be changed by changing the background color of that window, an ability that has been in TeXShop for some time.
  • In this version of TeXShop, we allow users to design their own "Dark Mode" for content regions. By default, the editor switches to white text on a black background in Dark Mode, and the Preview window receives a darker glow in that mode. But users can decide to keep the original black on white appearance of these content regions, or design their own color theme.
  • To make this work, the Preference Panel's color choices have been completely rewritten. There is now a tab called "Themes" devoted to coloring various components of the program. All of the color commands have been moved to this tab. These new color commands work on all systems supported by the program, not just on Mojave. In previous versions of TeXShop, many colors could only be changed using various obscure hidden Preference settings. Now all color choices are available in the Themes tab.
  • The Themes portion of Preferences is shown above. On the right are all colors currently set by TeXShop. Some items have an obvious meaning and others are obscure. A full set of such choices is called a "Theme". TeXShop allows users to create as many themes as they like. These themes are listed in three pulldown menus on the left: Lite Mode Theme, Dark Mode Them, Theme to Edit. The first menu sets the theme used on all systems below Mojave, and the theme used in Lite Mode on Mojave. The second menu sets the theme used in Dark Mode on Mojave. The final menu sets the theme which Preferences is currently editing.
  • TeXShop is shipped with several themes, including "LiteTheme" and "DarkTheme". These are the default themes for Lite Mode and Dark Mode. As explained later, there is a way for users to rename or remove Themes known to TeXShop. But TeXShop will always replace "LiteTheme" and "DarkTheme" and use them if other required themes are missing.
  • Gary Gray contributed two themes, GLG-Lite for Lite mode and GLG-Dark for Dark mode. Gray then tweaked GLG-Dark, and ended up with a dark theme that was was so my better than mine that I ended up using it as the default and thus renaming it DarkTheme. So Gray lost credit, but gained users. Thanks.
  • Two other themes, SolarizedLite and SolarizedDark, appeared first on the internet before Mojave was introduced. The general page by Ethan Schoonover about this design is https://ethanschoonover.com/solarized/. Specific lite and dark designs were then created in 2012 by "johannesjh": https://github.com/altercation/solarized/issues/167.
  • A final theme, which I call Manteuffel, was created in 2016 by Christian Manteuffel based on the design of iA Writer. See http://christian.manteuffel.info/blog/ia-writer-inspired-theme-for-texshop/
  • There is no distinction between themes for Lite Mode and themes for Dark Mode. Thus both Lite Mode Theme and Dark Mode Theme could be set to LiteTheme if the user always wants dark text on a white background.
  • After editing a theme, push "Cancel" or "OK" to end a preference session. If "Cancel" is pressed, the edited colors will not be saved and the Lite Mode and Dark Mode themes will return to choices before opening the Preference Pane. If "OK" is pressed, the edited colors will be saved and Lite Mode and Dark Mode themes will change to their new values.
  • But some users may want to edit several different themes during a session. When these users are finished editing their first theme, they should press "Save Edited Theme." This will save the changes for that theme permanently, even if the entire session is ended using the "Cancel" button. Repeat the process for other themes.
  • To create a new theme, first change "Theme to Edit" to obtain reasonable starting colors for your new theme. Then push "Create New Theme" and fill in the resulting dialog with a title for this threme. Do not use spaces in this title. The new theme will become the "Theme to Edit" and you can begin changing colors.
  • You may have set color preferences for TeXShop in previous versions of the program. These color preferences still exist, but they are no longer used by the program. To create a theme using these old preference settings, push "New Theme from Prefs". You'll be asked to name the theme; please do not use spaces in this name.
  • Some people on the internet developed color themes for TeXShop and made them available as shell scripts which reset various TeXShop color setting preferences. These shell scripts still work, but they no longer affect the appearance of TeXShop. After running such a script, you can use "New Theme from Prefs" to convert the "preference color scheme" to a regular Theme.
  • Recall that various TeXShop items which users can customize are set in ~/Library/TeXShop where Library is the Library folder in your home directory. This folder is often hidden in the Finder, but TeXShop has a menu item "Open ~/Library/TeXShop" to take you there. This folder has various subfolders. For example, one of the folders is named Templates. This folder contains the templates that appear in the Templates toolbar item. Each is an ordinary TeX source file. Adding new files to this Templates folder automatically creates new templates.
  • There is a new folder in ~/Library/TeXShop named "Themes". This folder contains very small ".plist" files describing the various Themes in TeXShop. If you create a theme you like, give it to others by putting its plist file on the Internet. To install a new theme of this kind, just drop its plist form in the Themes folder.
  • You can also remove Themes you no longer use by removing their plist files from the Themes folder. Avoid removing themes being used for Lite Mode or Dark Mode (although TeXShop should react gracefully when it runs into this situation). As explained earlier, the themes LiteTheme and DarkTheme will be recreated if they are removed.
  • When a theme is selected for editing, TeXShop colors will temporarily be reset to those colors. Revising colors is then interactive; as soon as colors change in Preferences, they will also change in TeXShop's Source and Preview windows.
  • Most colors at the top of the Preferences dialog are self explanatory. The colors "Invisible Chars, Enclosed Chars, Braces" are used for some features introduced by Yusuke Terada; see the menu item "Show Invisible Characters" and the item "Parens Targets & Highlight Color" in the Source Tab of Preferences, and the items "Show Invisible Characters" and "Parens Matching Settings" in the Editor Tab of Preferences. The items "Image Copy Foreground, Background" refer to features set in the Copy Tab of Preferences.
  • Finally, notice that the transparency of the Source, Preview, and Console windows can be set. These settings bring up a full Color Well, but the colors of these items are ignored and only the alpha values of the choices matter. Here "alpha = 1" is the usual value, and smaller values of alpha make the window more transparent.
  • There are additional features of TeXShop 4.08 that are not related to Mojave:
  • The first of these features comes from a bug report by Geoff Pointer. In TeXShop, double clicking on one of {, }, [, ], (, ), or finds the matching symbol and highlights everything in the source between these symbols. Pointer complained that this procedure ignored comments and escaped symbols, so double clicking } might well select a matching { in code that had been commented out, or a match of the form {.
  • These problems are fixed in version 4.08. When selecting a matching symbol, comments and escaped symbols are ignored. And by the way, TeXShop understands that % does not begin a comment.
  • TeXShop has another series of methods to deal with such brackets, added to the program by Terada Yusuda. These methods provide immediate feedback as the user is typing. One item flashes the matching bracket as soon as a bracket is typed; another temporarily highlights the region between matching brackets. One item momentarily flashes the screen if an unmatched bracket is typed. Some users depend on these features, while others find them distracting, so each feature can be turned on or off by preference settings at the top of the right column under the TeXShop Preferences "Editor" tab.
  • The bug reported by Geoff Pointer also applies to these second methods, and has not been fixed there. Because these methods are applied in real time during typing, and because they are used in small regions where the user is actively working, efficiency of code seemed more important than global accuracy. At a later time, this decision may be revisited.
  • The second of these features was requested by Brian Levine. If text is selected in the TeXShop editor and the selection is longer than two characters, then pressing (, {, (, or $ will enclose the selection in the appropriate brackets. This new behavior can be turned off in TeXShop Preferences by unchecking the item "Editor Can Add Brackets" under the Editor Tab.
  • The third feature was requested by Stephen Moye. The print dialog now contains an item to set paper size. Moye works with the AMS using a printer with trays for various paper sizes. Previously he had to select the paper size using "Page Setup" before dealing with the Print Dialog and printing. Now only one dialog is involved instead of two.
  • When Moye initially requested this feature, I told him that printing is controlled entirely by the underlying Cocoa system, so it would be impossible to fulfill his request. This proved to be not entirely true. Hence the new feature.
  • I'd like to use this occasion for a short aside. This aside may read like a rant about printers, but in fact its purpose is to explain why application programmers shouldn't have to deal with features of particular printers.
  • For years I've used a $1000 Color Laserprinter weighing 60 pounds. Recently a gear broke on the printer. It would be easy to fix it except that I couldn't figure out how to get the printer down my stairs and into the car. So I decided to buy a new printer and discovered that Laserprinters now cost $400. The store I visited delivers to the doorstep. But they absolutely, positively refused to deliver on up my stairs, or remove my old printer.
  • I asked the service representative what printer he'd recommend. He recommended a $79 HP. This seemed to me like a sort of "bait and switch in reverse," but I had to print, so I bought the $79 machine.
  • It prints faster than my old printer. The ink doesn't smudge. It has built in internet and was immediately recognized by all my devices. It calls home when it runs out of ink and new ink is delivered to my door, but so far it ran out of ink only once. It scans. It's light and was easy to carry up stairs. Apparently I was years and years out of date regarding printers, and I have to apologize to all my friends who asked for advice on buying one. (Remember, however, that I printed often when I was teaching, and I print rarely after retiring.)
  • What has this got to do with TeXShop? Well, TeXShop has essentially no code for handling printers. All of the messy details are handled automatically by Cocoa, Apple, and the printer manufacturers. Imagine what life would be like if programmers had to be involved in that chain. How many printers could we support even if we wanted to?
  • There are three main interaction points between users and printers. First, printers have their own preference module in Apple's System Preferences where the default page size can be set. This makes sense for most printers, whose paper trays can be configured to hold paper of different sizes, but only one size at a time. Second, the paper size of printers can be changed in "Page Setup", a menu item in TeXShop and most Cocoa programs. And finally, the print dialog handles all sorts of choices, like saving to pdf rather than printing, or many other things.
  • What is the point of Page Setup? Why is paper size set there? Because many programs use that knowledge to reset the behavior of the program. Should my editor for personal letters be formatted for letter paper? or a4 paper? Aha, Page Setup to the rescue.
  • However, in TeX, paper size is set by commands in the TeX source or configuration of the entire TeX Distribution. It would make no sense for TeXShop to reach into these sources and change them when Page Setup indicates a new paper size. So the truth is that TeXShop doesn't do anything when the user changes Page Setup. That menu is useless, particularly now that paper size is in the Print Dialog. But I'm keeping it, because otherwise I'd have to answer email questions of the form "where is page setup?"
  • In recent versions of TeXShop, the syntax coloring code is turning off while the source file loads. Therefore, files aren't syntax colored until the user begins moving the mouse. It is possible that this code was added to fix bugs if syntax coloring is started too soon, but experiments suggest that the bug no longer exists. So in version 4.08, files are syntax colored as soon as they are opened. In case of trouble, it is possible to return to the old behavior using a hidden preference
  • Gary Gray requested that TeXShop start paragraphs flush with the left margin, but indent remaining paragraph lines. TeXShop 4.08 has this feature. Some users are in the habit of inserting line feeds when their source lines approach the right margin; they will not notice any difference. Other users type several lines of source text between line feeds. The resulting "paragraphs" will now be visible for easier scanning.
  • This feature is controlled by two new preference settings, available under the Edit Tab. The first sets the indent of the initial paragraph line. By default this is set to 0.0. The second sets the indent of the remaining paragraph lines. By default this is set to 30.0.
  • The item to set the length of tabs has been grouped together with the two above preference settings. Moreover, one more setting, previously hidden, is available. This setting changes the interline spacing between lines of the source. In particular, users can double space the source text if they desire by changing this value.
  • The tab length is an integer, and roughly measures the number of letters between tab settings. Thus small values of this setting are reasonable. The entry works even if the edit font is not monospaced.
  • But the remaining entries for First Line Paragraph Indent, Remaining Lines Paragraph Indent, and Interline Spacing are floating point numbers measured in points in user coordinates. Only limited ranges of these preference settings are allowed, and the Preference dialog will replace unreasonably large or small values by more reasonable maximum and minimum values.
  • TeXShop has a preference to select the desired dictionary used by the program. Thus the system wide dictionary can be a standard Apple dictionary, while TeXShop can be configured to use a cocoAspell dictionary which does not count LaTeX commands as misspelled. During the course of preparing TeXShop 4.08, we discovered that this Preference item was disconnected in most localizations. This is fixed. If the setting seemed to affect nothing earlier, please try again.
  • Items in the Templates pull-down menu in the toolbar used to be listed sorted alphabetically. Later, this menu was extended to allow sub-menus, and the sorting feature was lost. It is restored in 4.08.
  • Another request from Stephen Moye is to add a preference item forcing TeXShop to place the source window in front of the preview window when opening files. (There is already a preference which causes TeXShop to activate the source window after each typesetting job.) A hidden preference item has been created to do this
  • Many programs on the Mac access the internet. Apple recently required that programs use the https protocol rather than http for this access, due to the added security of https. But programs can opt out of that requirement. TeXShop directly accesses the internet in only two places (although it can use iCloud indirectly via Cocoa): it uses Sparkle for program updates, and it downloads two small movies if the user doesn't have them and asks to see them in TeXShop Help. Because faculty web pages at the University of Oregon were served with http, TeXShop opted out.
  • But the University of Oregon recently switched to https for faculty pages, so Sparkle and movie downloads have been switched to https and TeXShop no longer opts out of this security requirement.
  • Latexmk has been updated to version 4.60.
  • The "About" panel has a line giving a range of copyright dates. The range ended in 2017 because I failed to notice that that line was localized. Now it correctly ends in 2018.
  • Scrolling in the editor window has a "bounce" near the top. We added a hidden preference setting to remove that bounce
  • Herbert Schulz revised the "File Encoding.pdf" file in the TeXShop Help menu.
  • The Help document "Comment Lines and Hidden Preferences" was revised to remove misprints pointed out by Herbert Schulz. Unfortunately, the document hasn't yet been extended with new information.
  • When TeXShop toolbars showed Text, or both Icons and Text, the Text was broken in many localizations. That was because I did not realize that XCode could set the encoding of the localization files ToolbarItems.strings. The encodings of these files are now all set to UTF-8 Unicode, and Text in the Toolbars finally looks reasonable.
  • The author of the Spanish localization, Juan Luis Verona, pointed out an important consequence of changing the default encoding in TeXShop to UTF-8. Characters with accents and umlauts can be encoded in Unicode either as special characters, or as combinations of characters. For instance, ü can be encoded as U+00FC or as U+0075 and U+0308. When a LaTeX or pdfLaTeX file is encoded in UTF-8, the typesetting engine calls usepackage[utf8]{inputenc} to interprete the input file. But this package does not understand combination characters. For an explanation of the reason these characters are hard to read, see https://tex.stackexchange.com/questions/94418/os-x-umlauts-in-utf8-nfd-yield-package-inputenc-error-unicode-char-u8̈-not/94420#94420.
  • Luckily, source characters with accents and umlauts typed by the user are encoded as single characters in TeXShop. But if a user copies the text from a pdf and pastes it into the source, combination characters are used. These look fine in TeXShop, but typeset incorrectly because of the inputenc problem discussed above. Incidentally, this problem does not occur when using XeLaTeX or LuaLaTeX.
  • This problem appeared much earlier in Japan, and Yusuke Terada added code to fix the problem. This code is turned on by an item in TeXShop Preferences under the Misc tab. The item used to read "During File Save (for Japan), Automatic UTF-8-Mac to UTF-8 Conversion". In version 4.08 of TeXShop, the words "for Japan" have been removed from this item, but it is still off by default. Users who run into the problem should turn it on. A little caution is required here; for instance, the item caused trouble for users writing in Hebrew (which is why we added the words "for Japan").
  • In 2005 Michael Witten, then at M.I.T., added a "Wrap Lines" menu item to TeXShop. This menu offered to wrap lines "never", or "by word", or "by character". Witten added a hidden preference to set the default setting, and this preference is now made public in the Editor tab of TeXShop Preferences.
  • Most users are likely to stick with the default setting, "by word". I've added the setting because I wanted to write a little essay about line feeds.
  • In TeX, two line feeds produce a new paragraph; but TeX ignores single line feeds in almost all cases. Exceptions include comments, where adding a line feed in the middle adds the last half of the comment to the active text, and displayed formulas, which often break when line feeds occur in the middle. But otherwise, line feeds are irrelevant.
  • Thus a TeX paragraph can be written as one long line, or as several sentences, or as several lines broken in the middle. The style users adopt can depend on their background. Writers like to write paragraphs unbroken by line feeds. Programmers, however, tend to add line feeds after each sentence because when they are writing programs rather than TeX, these line feeds show the logical structure of the text. As an extreme example, in Apple's programming language Swift, individual statements need not end with a semicolon if they end with a line feed, so semicolons are only needed when stringing several statements together on a single line.
  • There are several advantages to writing TeX source as a series of lines, rather than as full paragraphs. Errors in TeX are indicated by line, so they can be found more rapidly when the source is a series of lines. Synctex also works by line and can produce more accurate syncs when lines are used.
  • Of course some programming languages ignore line feeds, and make it possible to write programs as long multi-command paragraphs, but such paragraphs are virtually impossible to read and programmers avoid them religiously.
  • Since programs are in practice a series of fairly short lines, programmers have many useful utilities built on the premise that they will deal with files containing short lines. One example is "diff", which can compare two files and clearly list the differences. This utility works well on TeX files written as a series of lines, but becomes more or less useless if the paragraph style is adopted. When programmers moonlight as editors of journal articles and the like, they can become frustrated when their favorite tools no longer apply.
  • All of this is to suggest to new users that it could be handy to adopt the style of adding line feeds to keep individual lines short. But the advantages are relatively minor and seasoned users have more important things to worry about.
  • Why is this issue related to TeXShop? The first key point to understand is that TeXShop never adds line feeds to a source file behind the user's back. Any line feed in a source file is present because the user pushed RETURN.
  • But what should happen if the user is typing and reaches the right side of the window? By default, TeXShop adds a "soft line feed" so additional characters appear on the next line. A "soft line feed" is a line feed that affects the appearance of the text, but is not added to the source file. There are several indications that such line feeds are soft. Resize the window, and notice that the text is reformatted and line feeds appear at different places. But the source doesn't change in any way. This is actually an advantage, because users can resize windows on the fly, and because when a source is moved to a new larger screen, the full window is used rather than ending up with blank space on the right.
  • In addition, such soft wraps are indicated in the line number column on the left of the window. The first line of a paragraph receives a line number, but if there are additional lines created by soft wraps rather than line feeds in the source, these lines have no line number because they are part of the line started above.
  • Some programmers, however, intensely dislike soft wraps because they destroy the logical appearance of the source which the programmer has carefully created. These programmers prefer no wrapping by the editor. When the user reaches the right boundary of the text, the editor should begin horizontal scrolling so additional characters are shown on the same line. The disadvantage is that users must scroll the text horizontally to read everything (or make the window wider if the screen has room). The advantage is that the logical structure is visible.
  • Programmers who work as editors of TeX articles may prefer no wrapping by the editor for another reason: it encourages authors to add those hard RETURN line feeds to the text and thus create source which is a series of fairly short lines. Thus the "Wrap Lines: Never" preference could be thought of as training wheels for the user.
  • That's my little essay. Adopt the editor behavior which makes you most confortable. Even if you stick with "Wrap Lines: by Word", you might like to get in the habit of adding more hard line feeds to the source.
  • Final question: why would anyone ever want to "Wrap Lines: by Character"? I have no idea. It is one of the options Apple provides, so it is an option Michael Witten provided, and therefore it is in Preferences.
  • Final observation: adding this Preference gave me a chance to look closely at Michael Witten's code from so long ago. He did not pick an easy programming task. Witten had to deal with the editor, and the scroll bar, and the layout manager, and "paragraph attributes", and lots of other things. In the end, I'm impressed that it all worked.

New in TeXShop 4.01 (Apr 17, 2018)

  • Daniel Nowacki discovered that in some circumstances, most file menus could be disabled in Single Window Mode. This included Show Console, Show Log File, Close, Save, Print, Print Source, Convert Tiff, Abort Typesetting, and Trash AUX Files. The problem is fixed.
  • Other items in this menu are deliberately disabled in Single Window mode, like Duplicate, Rename, Move To, Revert To, and Page Setup. It is easy to work around these. But Daniel's expanded list was a real nuisance.

New in TeXShop 4.00 (Apr 13, 2018)

  • Latexmk updated to version 3.55d.
  • The change in version 3.98 to set interline spacing and kerning in TeXShop Preferences was hopelessly broken. This was pointed out to me in a phone call from Louis M. Guenin. The method seemed to work, but any lines added later in the editor reverted to the original style. Consequently, this method has been disabled in 4.00. It is still possible to set interline spacing and kerning for individual files as in 3.98, but Preferences cannot set default values. The Preferences code is still in place and correctly sets font and font size. It also appears to set interline spacing and kerning, but when the user clicks "OK", those settings are ignored.
  • More details on this release at:
  • http://darkwing.uoregon.edu/~koch/texshop/version.html

New in TeXShop 3.99 (Mar 15, 2018)

  • The German localization was updated.
  • The original Preference dialog did not fit on the screen when users had an 11 inch or 13 inch portable. In version 3.99 of TeXShop, an additional Editor tab was added to the dialog and the Source items were split between the Source and Editor tabs. This allows the entire dialog to be shortened.
  • When TeXShop opens a postscript file, it runs a script which calls ghostscript to convert the ps file to pdf, and then displays the pdf file. Bruno Voisin noticed that this process fails when the name of the postscript file contains spaces. He discovered the cause: the ps2pdfwrap script in TeXShop defining the conversion does not quote one filename. This is fixed.

New in TeXShop 3.98 (Mar 8, 2018)

  • Early versions of High Sierra contained a bug which broke updating the Page Number box in the preview window during scrolling. The bug also broke the up and down arrows in the preview toolbar. This High Sierra bug is fixed in High Sierra 10.13.4, currently in beta release for developers. TeXShop 3.91 contains a workaround for the bug. The workaround runs a small routine to update the Page Number box once a second whenever the Preview Window is active, even when the user is not scrolling. In TeXShop 3.98, the workaround only runs on early versions of High Sierra, and the original more efficient TeXShop code runs on High Sierra 10.13.4 and above.
  • Latexmk is updared to version 3.44a.
  • Version 3.94 of TeXShop contained a fix for the "flash after typesetting" bug in High Sierra when the preview window is using multipage or double multipage modes. However, the fix was also applied in single page or double page modes, where is may have caused problems. In addition, the patch caused problems for some users who worked with an external editor, or turned on the "Automatic Preview Update" TeXShop preference. The patch has been reworked slightly to avoid all of these problems.
  • The Font submenu in the Source menu has been enlarged with additional items from Apple allowing users to set interline spacing for the source text, and adjust the kerning and ligatures for this text. Keyboard shortcuts for interline spacing make it easy to adjust this spacing; for instance, double spaced source is possible. Additional items allow copying and pasting this style information, so once one source window has been adjusted, the adjustments can easily be applied to other source windows.
  • The TeXShop Preference item to set the font for TeX source has been changed to also set interline spacing, kerning, and ligatures. Thus the style changes introduced above can be made default styles for all future files. This works as follows: clicking the Set button to initiate a font change makes a small sample window drop down to show the effect of Font and Style changes. The Font submenu in the Source menu is active for this small window, allowing Style changes as above. When the OK button for the sample window is pressed, these changes appear in all open TeXShop windows. The main Cancel or OK buttons in the Preference Dialog must still be pressed, either to retreat to previous choices for fonts and styles, or to make the changes permanent. The code to set default font styles has one minor bug I haven't been able to fix. If an empty window is opened, the font is correctly set for the window, but new font styles are not set. For example, suppose a user has requested double spaced source in TeXShop. If this user selects ``New'' to open an empty window and then selects the LaTeX Template, the new source in the window will be single spaced. It is easy to work around this bug. If the window is saved, closed, and reopened, the styles will ``take'' and the source will now be double spaced. Or if another window is open with correct spacing, the font style can be copied from this window and pasted into the new window.
  • Following a suggestion by Emerson Mello, who provides the TeXShop localization for Brazil, an additional item has been added to the TeXShop Help menu. This item lists all "special comment" lines understood by TeXShop, and lists all hidden Preference items which can be set for the program. The special comment list is complete, but in this version of TeXShop, only some hidden preference items are listed. The list will be completed in future TeXShop versions.

New in TeXShop 3.97 (Jan 11, 2018)

  • TeXShop 3.97 has a new preference setting determining whether the source editor is placed on the left or right side in Single Page mode.
  • Because work on MacTeX-2018 is beginning, TeXShop will not be further updated for several months.

New in TeXShop 3.96 (Jan 7, 2018)

  • For some time, TeXShop has had the ability to combine the source and preview windows of a document into a single window showing both views, or break such a window back into two windows. This is done with the commands "Use One Window" and "Use Separate Windows" in the Window menu. There is now a preference item in TeXShop Preferences to determine the mode used when a document is first opened. See the bottom of the Source tab in TeXShop Preferences.
  • The Sparkle update code in TeXShop 3.96 was updated to version 1.18.1.
  • In High Sierra when previewing in "multipage mode", each typesetting job caused a flash in the Preview window before new material appeared. This problem was fixed in versions 3.94 and 3.95. The fix worked by placing a picture of the old preview pdf over the Preview window just before switching to the new version of this pdf. The flash still occurred, but was hidden by the picture. One second later, the picture was removed, revealing the new pdf. The steps of placing a picture and later removing it were totally invisible to the user.
  • Because of a High Sierra bug, scrolling the Preview window did not update the Page Number box in the Preview toolbar. TeXShop 3.92 contained a workaround for this bug, but the workaround did not apply when the source and preview were contained in a single window. Now it does.
  • If the source window font or font size changed, and the window was later split, new text added to the bottom portion appeared with the old font and size. This bug was pointed out by J. F. Groote, and is fixed in version 3.96.

New in TeXShop 3.92 (Nov 25, 2017)

  • High Sierra has a bug which breaks updating the pageNumber field when scrolling in the Preview Window. TeXShop 3.91 has a workaround for this bug, but the workaround broke the ability to enter a new page number and go there. This is fixed. After going to a new page, click once in the pdf content region to activate page updates during scrolling.
  • TeXShop has two magic lines to activate tabs. The first, "useTabs", automatically adds "include" files as tabs, while the second, "useTabsWithFiles", gives the author much tighter control over which source files to use as tabs. Tommaso Pecorella wrote asking that the first command also automatically add "input" files as tabs. The reason I didn't do this at first is that the syntax for "input" allows situations that aren't really appropriate for tabs. For example, a source that is "input" can itself "input" other files. Some authors break the source into hundreds of pieces, inputting these pieces as necessary. So whether the request is appropriate or not depends on the writing style of the user. In TeXShop 3.92, the "useTabs" command will also create tabs for "input" files, but only if the user activates this feature with a hidden preference: defaults write TeXShop TabsAlsoForInputFiles YES.

New in TeXShop 3.88 (Sep 18, 2017)

  • In version 3.86, .bbl files were added to the list of files automatically removed by "Trash AUX Files". Two users complained, giving reasons. So these files are no longer automatically removed. Notice that there is a hidden preference to add file types to those removed, so users who want to remove.bbl files can still do so.
  • The syntax parser had a bug which could crash TeXShop. This bug was discovered by Yusuke Terada, who provided a fix.
  • Masson Thierry suggested three new features, and all are in version 3.88. He suggested adding frametitle to entries added automatically to the tags menu. This should be helpful when using the Beamer slides package.
  • Masson suggested a new "magic line": % !TEX pdfSinglePage,When this line is added to the top of a source file, the resulting pdf preview will show single pages, even if the default is to show a single scrollable document. This feature is aimed at Beamer authors, who want slides to display one slide at a time, but other documents to scroll.
  • Several years ago, Ramon Figueroa-Centeno provided beautiful macros to set the magic lines which determine the typesetting program, the encoding, and the program root. Immediately below these macros, the macro menu now has a menu listing all other possible magic lines as submenus. Selecting such a submenu adds the corresponding magic line at the current position of the cursor in the source editor. Thus users need no longer remember the syntax of these magic lines.

New in TeXShop 3.87 (Sep 12, 2017)

  • The bug fix for Bibtex allowing citation keys with spaces turns out to be a bad idea. Bibtex documentation states that citation keys cannot have spaces, and the fix broke other user's Bibtex interaction. The fix has been removed. There are no other changes.

New in TeXShop 3.86 (Sep 9, 2017)

  • The Chinese localization had overlapping text in Preferences; this is fixed.
  • Antti Knowles found two bugs and sent the code to fix them. When synctex is used to sync from the Preview window to the Source window, it colors the matching text yellow. After that in earlier versions of TeXShop, if a selection was made using only the keyboard, the selection would still be in yellow. The selection color would change to standard selection color only after a click of the mouse. This is fixed.
  • Knowles second fix concerns the autocomplete feature of BibTeX. If a latex label contains a space, the autocomplete feature would show the full label in the list, but selecting this label would only include the label up to the first space. The fix for this is a little iffy. If users of TeXShop and BibTeX run into problems, please write me immediately.
  • Tristan Hubsch pointed out that "hyperref tooltips" used with tables of contents and elsewhere could run off the page to the left or right. In that case, they were cut off. This annoying glitch is fixed (unless the page is so narrow that the tooltip could never fit on it).
  • Added ".engine" and ".sh" (shell script) as file types that TeXShop can write.
  • At the request of Simon Robinson, addd ".bbl" and ".synctex(busy)" as file types which are automatically removed by the Remove AUX File commands.
  • The remaining items are all motivated by email sent by Bob Kerstetter. He reported that http://tidbits.com/article/17351 had an article about the language Markdown, listing editors used on the Macintosh to create these sources, and TeXShop was in that list. Markdown is a very simple markup language invented by John Gruber whose files can be easily converted to html, pdf, latex, and other languages. Many conversion programs are available free on the internet, including a program called "pandoc". In the ~/Library/TeXShop/Engines/Inactive program, there is a folder containing pandoc engines. But I discovered that the information about pandoc was out of date. The pandoc site now contains an open source install package for OS X, making it very easy to install pandoc. So I removed the existing engines, and placed a document called Pandoc.pdf in the pandoc folder, with links to the Gruber article and the pandoc site. Note that the pandoc site contains a large number of possible conversions, and details about how they work.
  • I also received email from Alan Munn, who tried to create stationery for Markdown files (.md files) and failed. This caused me to revise the Stationery feature of TeXShop slightly. Originally, users could create two kinds of files and place them in ~/Library/TeXShop/Stationery. First, they could create a piece of stationery, with extension ".tex". Then they could create a comment file with the same name and extension ".comment" describing the stationery. After that, the TeXShop Stationery menu showed available stationery, with descriptions of each possibility. It turns out that the extension assigned to stationery was irrelevant. So in TeXShop 3.86, stationery files can have any extension except ".comment", or no extension at all. The extension is actually never used. Stationery is treated just like blank windows in TeXShop, except that stationery pages are marked as "dirty." If you try to close one, or typeset one, or whatever, a dialog will appear asking you to name the file and save it to a location of your choosing. This dialog contains a pull-down menu of file types which TeXShop can write, and that menu is how users actually choose filetype. Markdown stationery can be saved with type ".md" in this way, and stationery for any other file type can be handled the same way.
  • The folder ~/Library/TeXShop/Engines/Inactive/pandoc contains two new engines. The first, Md2pdf.engine, converts a Markdown source file to a pdf file and opens the pdf file in TeXShop. The second, Md2HTML.engine, converts a Markdown source file to an HTML file and opens the HTML file in Safari. Users should note that many other conversion engines for Markdown are available on the internet, and in most cases it is very easy to write engine files which call these conversion engines.
  • A few people use TeXShop as a general editor. I'm one of them, but I sort of thought I was alone. If you use TeXShop to edit other things than .tex files, the syntax coloring feature of TeXShop can be annoying. TeXShop 3.86 has a new menu item which turns syntax coloring on or off. This applies to the source window at the top of the stack. Users can have several source windows, some using syntax coloring and some not. The old "Syntax Color" item in TeXShop Preferences is still there, but it now selects the default choice for syntax coloring when a new document is opened. Changing this Preference does not affect syntax coloring in documents already open. It would, of course, be wonderful if someone would write general syntax coloring code for TeXShop, so users could choose one scheme for Markdown, one for HTML, one for C code, etc. I don't intend to do that, but I'd gratefully accept the code from someone else.

New in TeXShop 3.85 (Aug 10, 2017)

  • TeXShop 3.82 introduced "useTabs", an easy way to add tabs to projects with a root file and chapter files. TeXShop 3.84 added "useTabsWithFiles", a second method of adding tabs requiring a little more work for a lot more flexibility. Unhappily, the code for this second method broke the first method.
  • TeXShop 3.85 again activates both methods.
  • In High Sierra, tabs can be given special short names in place of the names of the files they represent. As the number of tabs increases, this becomes more and more useful. The second method of adding tabs has always supported these shorter names. A similar technique is provided in TeXShop 3.85 for the first method.
  • The magic line containing "useTabs" can be followed by an optional list of short names as in this example: % !TEX useTabs (one, two, , short name, five)
  • This additional parameter must be on the same line as "useTabs", but notice that single lines can wrap in the editor without adding a line feed. The short names are listed inside a pair of round brackets, and are separated by commas. White space at the beginning and end of a short name will be ignored, but a short name can contain more than one word, as in the above example. If the space between two commas is blank, the original name will be used for that file. If the list has fewer names than the number of tabs, original names will be used for the remaining tabs. If the list is longer than the number of tabs, names at the end will be ignored.
  • Version 3.85 runs on the original list of supported systems, including High Sierra. Tabs require Sierra and higher, and short names require High Sierra and higher. Short names can be input on Sierra, but they will be ignored on that system.
  • TeXShop 3.85 was compiled by XCode 8.3.3 running on Sierra. It runs fine on High Sierra, but the "short tab names" feature doesn't work there because XCode doesn't have API's for High Sierra. I tried compiling TeXShop on High Sierra using the beta copy of XCode provided for that system. The code worked fine in High Sierra and short tab names worked. But unfortunately, the resulting code had minor problems running on Sierra. The High Sierra version is available at the TeXShop web site at http://pages.uoregon.edu/koch/texshop/texshop.html.
  • The TeXShop 3.85 source code has one line commented out which must be activated to get short tab names on High Sierra. If you want to compile yourself on High Sierra, search the source file TSDocument.m for "High Sierra" and uncomment the following line of code: windowToTab.tab.title = self.includeFileShortNames[i];

New in TeXShop 3.84 (Aug 3, 2017)

  • When version 3.82 of TeXShop was released, I said that it would be the final version of TeXShop until late fall. But bugs were discovered, so version 3.83 was released.
  • These versions of TeXShop created only half of the promised support for tabs, and I found that I couldn't stop in the middle. Version 3.84 completes tab support, and should finally be the last release until late fall. Note that tabs require Sierra or higher because Apple first added tab support in that version of macOS.
  • Tabs are not appropriate for all TeX projects. They work best on books and large articles with from five to fifteen chapters or divisions, each introduced with an include command. Some authors prefer to divide their project into many more pieces, perhaps one file per section, and then associating a tab with each file would product unmanageably many tabs.
  • TeXShop has two mechanisms to enhance Sierra tab support. The first is very simple. Within the top 20 lines of the root file, add the line % !TEX useTabs.
  • When this command is given, TeXShop itself searches for include files to associate with tabs; the mechanism should cover perhaps 70 percent of cases.
  • The second mechanism gives the user considerably more control over the tabs. Within the top 20 lines of the root file, add the line % !TEX useTabsWithFiles.
  • Below that, within the top 50 lines of the root file, add a line for each tab % !TEX tabbedFile{chapter1/Introduction.tex} (One).
  • In this command, a path to the file shown in the tab is given in curly brackets. In the example, the path starts from the folder containing the project root file, but see more details below. Notice that the file extension must be included. That is because the second mechanism allows pdf, tiff, jpg, log, aux, and other files as tabs. Authors sometimes give source files long descriptive names, which makes the tab titles very long. The final piece of the above line in round brackets is optional, and gives a shorter tab name.
  • The optional short name will only be recognized in High Sierra, because it requires additional Apple API first made available there. Feel free to use the term in Sierra; it will cause no harm there, but will be ignored.
  • Finally, we list some technical details. The first mechanism searches for include lines after begin{document} in the body of the root file. It is common to list files without extensions, and in that case TeXShop adds the extension ".tex" when creating the tab. In the second mechanism, however, TeXShop will not change the extension given by the user, or add a missing extension, because tab files can have unusual types so the extensions provide crucial information. Both methods create at most 20 tabs and ignore lines which might create more of them. The "useTabs" mechanism only works if the root file has at most 20,000 characters, to avoid very long searches for include lines in gigantic root files.
  • If a window with tabs is left open when TeXShop is closed, then the next time TeXShop is opened, macOS opens the window and recreates the tabs. The new tab mechanism recognizes this behavior and lets macOS do the job without itself creating tabs. However, macOS does not understand tabs made from pdf files, graphic files, and a few others, so some of the tabs may be missing. It is easy to get these tabs back. Close the document and then reopen it. This forces TeXShop to recreate the tabs, and then all tabs come back. Or open the missing files yourself and drag their windows to missing tabs. (This macOS behavior is not a bug; other features of TeXShop depend on it. We cannot have everything.)
  • Finally, a word about the path information between the curly brackets in the "tabbedFile" magic lines. Three types of path strings are recognized. The first are strings that start in the location of the root file. Examples include {chapter1.tex} and {Chapter1/Introduction.tex}. Longer strings of directories are allowed. When it sees this sort of string, TeXShop prepends the full path to the folder containing the root file.
  • Another possibility is a path starting at your home directory, like {~/Galois/Equations.tex}. Here ~ denotes the home directory, so this file is probably not in the project directory.
  • Finally, TeXShop recognizes full paths like {/Users/koch/Galois/Equations.tex}.
  • If you use still more Unix conventions, they may or may not work. No guarantees. Tests suggest that spaces are allowed in both directory names and file names, but I'm loathe to recommend them.
  • There are a few tricky points. The Finder often lists TeX source files without the ".tex" extension, but this extension is just hidden, not absent. It must be written as part of the tab file path. (During testing, I was confused by this point several times).
  • When TeXShop is asked to create a tab, it opens the file exactly as if a user had dragged the file icon to TeXShop and dropped it there. Then the window described in the tab is "tabbed." This creates a few surprising cases that look like bugs but aren't. For example, then TeXShop opens a dvi file, it actually converts the file to pdf using dvips and Ghostscript, and then opens the pdf file. So tabbing a dvi file will give a pdf file as a tab.
  • Here is another surprising case. Suppose that you are working on a project named "Galois.tex" and you earlier created a project named "Abel.tex". When you open Galois.tex, you want Abel.tex as a tab so you can refer to that source file as you write Galois. But if you drop the icon for Galois.tex on TeXShop, both Galois.tex and Galois.pdf will open in separate windows. Similarly dropping the icon for Abel.tex on TeXShop will open Abel.tex and Abel.pdf. After tabbing occurs, you'll have a tabbed window containing Galois.tex and Abel.tex, and you'll have Galois.pdf in a separate window. But you'll also have Abel.pdf in another window. The existence of this extra pdf file looks like a bug, but isn't.
  • This release of TeXShop was compiled by XCode 8.3.3 running on Sierra. It runs fine on High Sierra, but the "short tab names" feature doesn't work there because XCode doesn't have API's for High Sierra. I tried compiling TeXShop on High Sierra using the beta copy of XCode provided for that system. The code worked fine in High Sierra and short tab names worked. But unfortunately, the resulting code had minor problems running on Sierra. No doubt these will be fixed before the release of High Sierra.
  • Consequently, if you are beta testing High Sierra and want to use short tab names, you'll need to search the source file TSDocument.m for "High Sierra" and uncomment the following line of code windowToTab.tab.title = self.includeFileShortNames[i].
  • Then compile on High Sierra.

New in TeXShop 3.83 (Jul 28, 2017)

  • Murray Eisenberg discovered problems with the new "useTabs" feature and sent me his full source code to debug. This proved extremely useful! The problems I foresaw with this feature have not materialized, but Eisenberg's source revealed more elementary and embarrassing bugs, now fixed.
  • The only files which receive tabs are those loaded by include{myfile} statements after begin{document} in the root file. Here "myfile" can be a file name, partial path, or full path. Murray's document loaded chapters in a more complicated way, but was easily modified to meet this condition. It would be easy to extend TeXShop so an alternate method could also be used, in which the user lists files to be tabbed using "% !TEX fileForTab = " statements. This technique could assign files to tabs even if they aren't part of the source (for instances, tables of symbols), and could specifiy which chapters are tabbed for books with enormously many chapters. Write if you want this feature, which however will not appear until fall.
  • It is slightly possible that version 3.82 broke UTF-8 encoding in Japan and other far Eastern countries; the evidence is iffy at the moment. But if that happened, it is fixed in 3.83.

New in TeXShop 3.82 (Jul 26, 2017)

  • Some time ago, TeXShop was revised to support Apple's Sharing toolbar item. For instance, if the source window is active and you select "Mail" in the item, a mail window opens containing the TeX source as an enclosure. If the preview window is active, this mail window contains the pdf output as an enclosure. Another sharing option is "Airdrop". I think of this as an option for graduate students relaxing in Starbucks. If such a student notices someone interesting drinking coffee, they can use Airdrop to share a selected portion of TeX source code, or a selected region of Preview output. I keep hoping to be invited to a Wedding due to this feature, but not yet. I have never actually used any of the features in the sharing tool. In High Sierra, the sharing tool is also available from a new "Share" menu in the File menu. This menu has an extra item called "Add People." To use it, save a TeX document in iCloud. Then in Add People, send an email message or other sharing notification to a friend offering to share this document. After that, you and your sharing partner can simultaneously edit the document. You can write the first line of a proof and your colleague can immediately add the next sentence. When the document is being shared with someone else, a gray "Share" message is displayed just right of the file title on the edit window header.
  • The other new feature is available in both Sierra and High Sierra. Recall that TeXShop allows large projects to be organized as a root document and various chapter files. The root contains header items and include statements just after begin{document}. These include statements input the source files for various chapters into the document. Chapter files include a header pointing back at the root document% !TEX root = ../MyRoot.tex but the root file has no such header. When a chapter file is typeset, this magic line tells TeX to typeset the root and thus the entire document. The magic line also helps sync and "goto error" locate the correct chapter source, including opening it if it is not yet open. In Sierra, users can use the new "tabs" feature to manually move the chapter windows into the root source window as tab entries. But this is messy work which has to be done every time the project is reopened. The new feature automates this procedure. To activate this feature, first turn off two TeXShop preferences under the Misc tab: "Open root file automatically on opening. a child" and "Miniaturize the opened root window." Both of these items probably represent bad ideas in the design of TeXShop, so the features might be removed in a later version of TeXShop. Then add a magic line to the top of the root file source: % !TEX useTabs. When a project with this line is opened, the various chapter files are opened as tabs in the main window. Thus just two windows appear, the source under various chapter tabs, and the single output pdf file. Sierra already has the ability to recreate tabs in a window if the window is left open when TeXShop quits. But once such a window is closed, the tabs have to be recreated from scratch. The new header creates them automatically. If the source code has the magic line and its window is left open when TeXShop quits, then Sierra is allowed to recreate the tabs itself when the program reopens. The new code will only run if the user quits a document, and then later opens it again. This tab feature is somewhat experimental. It works fine for me now, but a number of tricky edge cases make me a little nervous. If you are going to try it, I suggest that you duplicate your project and work using the duplicate. In case of problems, carefully analyze exactly what you did that caused an error, and then send me a note. If possible, send me full source when a problem occurs. Once the tabs are active, I would expect everything to work without problems. It is only the step that creates the tabs that is slightly worrisome. But not enough to hold back this release.

New in TeXShop 3.81 (Jul 21, 2017)

  • E. Lazard reported that inserting a single space in the search field in the preview window drawer causes a crash. This bug has existed for a long time, and is fixed.
  • The "Open for Preview" menu item broke in 3.80. This is fixed. Many users reporting this problem were not aware of the Preference item "Configure for External Editor," which is the more natural way to use an external editor.
  • In High Sierra, the list of user-defined engines in the popup engine menu was not sorted; although it was sorted in Sierra. This is fixed.
  • The French localization contains a translation by Rene Fritz of the latest version of Herbert Schulz's TeXShop Tips and Tricks, available in the Help menu.
  • After typesetting, the page number of the current page in the Preview window was set to 1, even when a later page was displayed. This is fixed. (The actual bug was that the page number was set to the current page of the lower half of the split window, even when that half was invisible.)
  • TeXShop's selection of the dictionary to be used when checking spelling is improved. This is a very minor matter for most users, but it requires an extensive discussion.

New in TeXShop 3.80 (Jul 11, 2017)

  • SyncTeX, which makes it possible to easily move back and forth between a spot in the source and the corresponding spot in the output, was written by Jérôme Laurens. This software consists of two pieces. One piece adds code to the various TeX engines, causing the creation of appropriate sync information and output of this information to the file myfile.synctex.gz during typesetting. The second piece can be used by authors of front ends; it opens the myfile.synctex.gz file, parses its contents, and deduces sync positions from the parsed data. TeXShop uses Jérôme's front end parsing code.
  • In 2017, Synctex was revised by Jérôme; among other changes, syncing now works between code to input graphics in the source and the resulting image in the output. But when TeXLive 2017 was released, the revised code for front end authors was not yet ready. Luckily the old code continued to work with ordinary tex, latex, pdftex, and pdflatex.
  • Unfortunately, this code did not work with LuaTeX and LuaLaTeX, so users working with these engines usually could not sync. Even worse, TeXShop often crashed when using these engines because the initial parsing of the file myfile.synctex.gz itself crashed.
  • The new front end code is now available, and is used by TeXShop 3.80. The crashes of LuaTeX and LuaLaTeX have ceased, and synchronization works again, more accurately than in earlier years. Some new features require setting the flag which turns synctex on to 2 or higher. Thus users may want to write "--synctex=2" rather than "--synctex=1". This change can be made in TeXShop Preferences under the Engine tab, and in individual engines the user may have activated.
  • A new engine called "filltex" was written by David Gerosa, and is available in ~/Library/TeXShop/Engines/Inactive/filltex. This spectacular engine is very easy to install; here's what it does. Two databases are commonly used in the astronomy and theoretical physics scientific communities: ADS and INSPIRE. These databases list preprints and published papers, referencing each with a citation index like 2016PhRvL.116f1102A. Suppose you have written a scientific paper in one of these fields, and suppose you citations use the standard forms for ADS and INSPIRE. For instance, your paper might have many citations, like "for more details consult cite{2016PhRvL.116f1102A}." When the paper is done, typeset it using filltex. The engine will scrape bibliographic data from ADS and INSPIRE using the web, construct a bibliography, add the bibliography to the article, and rewrite the citations appropriately. All of this happens in one run of the engine. To see an example, typeset the example in the Inactive/filltex folder.
  • Many additional databases exist for other fields, and Gerosa tells me that using these databases with filltex is just a matter of revising the python code appropriately for these databases. He recommends that users interesting in doing this consult his git hub, as listed in the documents in TeXShop/Engines/Inactive/filltex.
  • A modified SageTeX engine is now in Engines/Inactive/sage, together with new instructions for setting it up. These changes are required because the latest release, SageMath-7.6, has new requirements and a new internal structure.
  • In some versions of macOS, opening a TeXShop Preview document in multipage mode scrolled down to the middle of the first page, rather than starting at the top. This is fixed.
  • Some users noticed a slight creep of the Preview Window wth each typesetting job. This is fixed or at least improved.
  • TeXShop now contains latexmk 4.53a.
  • Herbert Schulz made changes in "TeXShop Tips & Tricks", available in the TeXShop Help menu.
  • Further details regarding this release are available at:
  • http://darkwing.uoregon.edu/~koch/texshop/version.html

New in TeXShop 3.77 (Feb 14, 2017)

  • Items in the Tags menu are indented to make entries easier to find.
  • A bug in Apple's search routines broke the search tool in the Preview Window's Drawer. This bug was fixed by Apple and search now works as before. It is conceivable that it is broken on Sierra 10.12.0 and 10.12.1; I no longer have such systems to test. Users who run into a problem on these systems should update the operating system to 10.12.2 or higher. If a user clicks in a search result at the bottom of the Drawer, the corresponding item in the pdf Preview is highlighted. The up and down arrows can be used to rapidly scan various search results. This ability temporarily broke in 3.76, but works again in 3.77.
  • At the suggestion of a user, the TeXShop Edit menu has an entry "Paste As Comment." This works essentially like "Paste" except that the newly pasted lines are marked as comments. This makes it possible to copy and paste a large selection from another document, and then carefully activate portions of the material.
  • The Sage engine in the "Inactive" portion of ~/Library/TeXShop/Engines was improved by Markus Baldauf. Thanks!
  • The latexmk file was updated to version 4.52c.
  • Updated the TeXShop Help Menu document "First Steps with TeXShop" and the document "Quickstart Guide for Command Completion" in /LibraryTeXShop/Documents.
  • At the request of Br. Samuel, OSB, the types gabc, gtex, glog, and gaux are now recognized by TeXShop; these types are used by the Gregario software. The files gabc and gtex are added to the types which receive syntax coloring and other "tex file" privileges, and gaux, glog, and gtex are added to file types deleted by Trash Aux Files.
  • TeX users on Unix platforms often define an environment variable named TEXINPUTS, which lists folder which TeX should search for input files, style files, and the like. Using this variable is actively discouraged in TeX Live and MacTeX, and these systems are configured to make the variable unnecessary. For instance, files used by an individual user can be placed in ~/Library/texmf. People who answer user questions about MacTeX sometimes run into problems associated with TEXINPUTS, since mistakes defining the variable can bring TeX crashing to a halt. And often users don't mention that they have set TEXINPUTS, leading to hours of useless debugging. With these warnings, we now confess that TeXShop has a new facility for those few users with a legitimate need to set TEXINPUTS. A user recently described such a case. This user belonged to a group whose members used common input files stored on a server. The members of this group worked on a variety of tasks which all used the same basic template, but then input different files depending on the task. These input files were given the same name, but stored in different folders on the server. To pick a task, a member of the group selected a particular server folder using TEXINPUTS, and proceeded.

New in TeXShop 3.75 (Nov 9, 2016)

  • There is only one change. In TeXShop 3.74 on Sierra 10.12.1, scrolling in the pdf window was jerky. This is fixed.

New in TeXShop 3.74 (Nov 8, 2016)

  • In Version 3.72, when the mouse hovers over a hyperref link, a popup window shows the linked portion of the document. This did not work well for equations with an equation number on the right side of the page. Now if the link is in the right half of the page, the linked portion is selected further left.
  • TeXShop uses five files by Jerome Laurens to interpret the contents of synctex files. These files are occasionally updated with TeX Live updates. Previous versions of TeXShop used version 1.9 of the files; this version of TeXShop uses version 1.18. Users may notice small changes in sync due to this update.
  • The edit menu contains an item labeled "Experiment...". Selecting this item brings up a small source window; text can be copied from the main source window to this window, and then edited there. A "Typeset" button on the small window typesets the experiment and shows it in a second small window. Both windows can be enlarged and their contents can also be enlarged using the standard keyboard shortcuts to change font size or pdf size. This facility, suggested by Wendy McKay, is particularly useful when editing complicated equations or tables.
  • Recently this feature was mentioned on the web site tex.stackexchange.com, and Denis Bitouzé suggested an improvement. Following his suggestion, if a selection of source is made first and then the menu is chosen, the selection is automatically copied into the experiment window.
  • If no selection is made and instead the cursor is simply positioned by clicking at a point, then the Experiment window opens with its previous contents. Thus if a user carefully edits an equation, closes the experiment window, and then decides on a final change, the contents can be brought back for another edit.
  • A TeXShop preference allows users to set the background color of the preview window, but that preference was ignored by the initial Sierra release. It is working again in a developer update beta. So users will want to install that update when it is released by Apple.
  • CocoAspell is a spell checker by Anton Leuski which understands LaTeX and thus does not mark control words as misspelled. It is an extension of Apple's Spell Check system, controlled by a Spelling Preference Pane. Users get all the benefits of Apple's integration of spell checking with document source editors, but with a dictionary that is LaTeX aware.
  • The preference pane associated with this Spell Checker broke in El Capitan, and the entire spell checker broke in Sierra. But luckily, Anton Leuski released a new version for El Capitan and Sierra on November 8, and converted the project to open source. See "http://people.ict.usc.edu/~leuski/cocoaspell/". Users need to download the spell checker at Anton's site because he makes many dictionaries available there depending on the language(s) needed. Highly recommended.

New in TeXShop 3.73 (Sep 12, 2016)

  • The LaTeX hyperref package adds active links and url's to pdf documents. Many are under author control, but the package automatically links table of contents items to the starts of chapters and sections, and links reference items to the corresponding bibliography entries.
  • TeXShop 3.72 makes it easy to understand these links at a glance. If the mouse hovers over a link, a popup window appears for several seconds showing the linked portion of the document. This is particularly useful when checking references in the document.
  • Normally the popup is on screen for four seconds and then disappears. If the option key is down at the end of these four seconds, the popup will remain on the screen until the mouse moves.
  • There is one cosmetic flaw. When the mouse hovers over a link, a small popup from Apple also appears giving the page where the link points. I don't know how to eliminate their popup. It does not appear in Sierra, so if you find it bothersome, upgrade to Sierra.
  • This feature was requested by Mark M. Wilde, who noticed that it is already present in Skim. Indeed Skim has a somewhat more elegant version.
  • TeXShop has a hidden preference setting to control the "ColorIndex" tool, as requested by Murray Eisenburg. Type the following command in Terminal to turn this item on by default for each new document: defaults write TeXShop IndexColorStart YES.
  • The TeXShop magnifying glass has been enhanced, as requested by Steffen Wolfram, but the enhancements are only available in El Capitan and higher. When either magnifying glass is being used, temporarily pushing the Command, Option, or Control keys will increase the amount of magnification, and temporarily pushing Shift-Command, Shift-Option, Shift-Control will decrease the magnification.
  • Herbert Schulz updated the Tips & Tricks Help File.
  • Following a request by Markus Gail, the Help commands "ShowHelpForPackage" and "openStyleFile" remove hidden white space, making them more robust.
  • TeXShop is now explicitly released under the GPLv2, and a copy of this license is available in the TeXShop menu.

New in TeXShop 3.71 (Aug 25, 2016)

  • Differs from 3.70 only in the German and Dutch localizations:
  • In both German and Dutch, the pdf search field in the toolbar was not connected to the rest of the program.
  • Some German translations were improved by Michael Rößner.
  • The German source window had horizontal slack, and scrolled horizontally about half an inch. This was due to a bug in XCode 7.3.1. Merely opening an NSDocument.nib for a specific language creates the bug for that language. Luckily the bug is fixed in XCode 8.0 Beta. All localizations were tested in TeXShop 3.71 and none exhibit the bug.

New in TeXShop 3.70 (Aug 23, 2016)

  • Version 3.70 again uses the more extensive fixes by Martin Hairer for a memory leak problem, but with a small change to fix the bugs in the Preview toolbar that occurred in version 3.66.
  • The behavior of the pdf search field on the toolbar has been improved. As before, command-F activates the search field so text can immediately be typed into it. Push RETURN to select the first occurrence of the word of phrase typed. This now switches the first responder to the pdf view, so the selection is highlighted in blue and easy to find.
  • To find the next occurrence, type command-g. To search backward, type shift-command-g. These commands again produce selections highlighted in blue. They are chosen to make searches in the text and pdf windows behave the same way. (In earlier versions, RETURN and SHIFT RETURN performed these functions, but this was not parallel to find for text, and left gray selections rather than blue ones.)
  • To search on a particular page, go to that page and select some text, making sure the selection is not empty. The next search will begin at that spot. An empty selection will start the search at the beginning of the document.
  • If a search reaches the end of the document, it will cycle back to the beginning.
  • The pdf drawer alternate search method is still available. It works on all systems, including Sierra. However, Sierra's PDF search routines seem to have significant bugs, which have been reported to Apple. If these bugs are fixed, the current version will probably fail on Sierra, but this will be very easy to fix.

New in TeXShop 3.68 (Aug 19, 2016)

  • Version 3.66 included a fix for a memory leak written by Martin Hairer. This fix created an unfortunate bug. If the user closed the Preview window associated with a document and later typeset the document, the Preview window reappeared. But many tools in the window's toolbar no longer worked.
  • Luckily, Martin Hairer provided two different versions of his memory leak fix, one quite conservative with just a few changes, and the other more elaborate with lots of changes. The bug only affected the more elaborate version. TeXShop 3.68 has the conservative set of Hairer bug fixes, and no longer exhibits the toolbar bug.
  • The new search field on the Preview window has been improved. Now when the pdf window is active, typing command-F will activate the search field so a phrase can immediately be typed there. (The drawer no longer opens.)
  • As before, after typing a phrase in the search field, type RETURN to select the first occurrence of the phrase in the pdf file. Type RETURN again and again to select later occurrences. Type SHIFT RETURN to do a backward search.
  • In Sierra, the old pdf search routine in the preview window Drawer stopped working. In TeXShop 3.66, this search field was deactivated on all systems and replaced by the new search field on the window toolbar. Some users missed the old method, so in 3.68 it is restored on all systems. Users who try both search methods will notice some harmless interaction between the two methods. Sierra users will discover that the old method fails.

New in TeXShop 3.66 (Aug 16, 2016)

  • Version 3.66 has important code changes by Martin Hairer of the Department of Mathematics, University of Warwick. These code changes fix memory leaks in previous versions of the program.
  • The changes include replacing several instance variables with class properties, whose retain/release behavior under ARC is more predictable. But the primary change is to remove some strong reference cycles in which object A referenced object B and object B referenced object A, and neither could be released without first releasing the other.
  • Recent versions of Apple’s PDFKit use large amounts of memory because they create and cache bitmaps for faster display. If Activity Monitor is used while opening a document in TeXShop and scrolling through the preview pages, this memory usage can seem alarming, but in practice it does not cause problems.
  • The problems solved by Hairer are different and can be seen by closing documents without quitting TeXShop. In this case, the program did not recover the memory used by the document being closed. Hairer’s fix dramatically improves this sort of problem, although it is likely that smaller memory problems remain.
  • A few users reported a related bug. They would close a document, reach into the document’s folder, and throw the pdf into the trash. But the Macintosh would claim that the pdf was still in use and refuse to empty the trash until TeXShop itself closed. This problem is a symptom of a memory problem and is fixed by Hairer's code.
  • In Sierra, the old pdf search routine in the preview window Drawer stopped working. In TeXShop 3.65, this search field was replaced with a more useful search field in the Preview Window toolbar; the new search works in all versions of OS X. In recent Sierra releases, the old pdf search came partly to life, and interfered with the new search. Temporarily, the old search if turned off in all versions of OS X. If the old search works again in later versions of Sierra, it may be turned on again, but we suspect most users will use the new toolbar search field.

New in TeXShop 3.65 (Jul 19, 2016)

  • Version 3.65 again works on Lion and Mountain Lion, and thus on all versions of Mac OS from Lion to Sierra.
  • I omitted the QTKit framework, and made AVKit and AVFoundation optional. The AV frameworks aren't available on Lion and Mountain Lion, hence the crash of 3.64 on these systems. Demo Movies will only play on Mavericks and above.
  • The sync fix from source to preview for Sierra is only added on Sierra, since it seems to cause minor problems on earlier systems.
  • The tool to search PDF files is now localized.
  • Sparkle in TeXShop is updated to version 1.14.0.
  • Yusuke Terada added code to recalculate tab lengths whenever the user changes the font or font size.

New in TeXShop 3.64 (Jul 17, 2016)

  • The most-often-requested new TeXShop feature is tabs in the source and preview windows. Sierra provides this feature automatically, without any additional TeXShop code. Creating these tabbed views is straightforward. Further details will be provided when Sierra is released.
  • The initial beta release of Sierra had substantial PDFKit problems, but most were fixed by Apple in the next beta. One problem was jumpy, non-responsive scrolling. I fixed this in TeXShop and Apple later fixed it in general. My initial fix does no harm and is still present in 3.64.
  • Sync from source to preview worked in Sierra, but the preview selection was not highlighted. This bug was due to TeXShop and is now fixed.
  • TeXShop's Help Menu has a Demo item which can download and display two short movies for new users. This was coded using Apple's QTKit, which was deprecated in Mac OS 10.9 in favor of AVKit. In Sierra, QTKit is gone. TeXShop 3.64 switches to AVKit. The movies, which used to be in .mov format, are now in .mp4 format.
  • TeXShop's Preview window has a drawer, which displays an outline of the pdf if the source uses hyperref. The bottom half of the drawer allows searches of the pdf file, but does not work in the Sierra beta. Since the code for the search in the drawer comes directly from PDFKit documentation, I suspect this is an Apple bug which will eventually be fixed. In the meantime, TeXShop 3.64 adds a new search field to the Preview window's toolbar. Type a word and push RETURN and TeXShop will select the first occurrence of the word in the pdf. Push RETURN again to display the next occurrence, etc. Click the mouse in the PDF window to restart searching at the top of the document. Select some actual text in the PDF window to start searching at that point. The search item will remain after Sierra is released, even if Apple fixes the drawer bug, because I suspect that many users will prefer it.

New in TeXShop 3.62 (Jun 3, 2016)

  • Latexmk upgraded to version 4.45
  • Slight improvement in TeXShop Tips & Tricks by Herbert Schulz
  • The menu item "Select TeXShop as Default TeX Editor" is now active when either the Source or the Preview window is on top
  • George Gratzer's "First Steps", the first section of his book "More Math Into LaTeX", has been updated to the contents of the 5th edition.
  • The TeXShop "Experiment" command ignores smart dashes, and thus does not convert multiple dashes into a character which confuses TeX
  • A few error messages referred to http://tug.org/MacTeX rather than the correct http://tug.org/mactex. This is fixed.
  • The TeXShop Preference Setting for "Show Console" was not initialized to the current value when TeXShop was opened after quitting. This is fixed.
  • Added a fix by Martin Hairer when using a git server with TeXShop.

New in TeXShop 3.61 (Feb 23, 2016)

  • "What's New" in TeXShop Help claimed that Sparkle was updated to version 1.31. The update version number was actually 1.13.1, the latest version.
  • In TeXShop Preferences under the Misc tab, the items "pTeX support" and "During File Save" are only useful in Japan. They are now labeled so users elsewhere will not be tempted to activate them.
  • The error message when typesetting fails to find pdflatex or another tool has been improved.
  • If the user is running El Capitan and has set the location of TeX binaries to /usr/texbin or /Library/TeX/texbin, but this second location does not exist, an error message explains what to do.
  • Slight improvements in Korean and Spanish localizations
  • Improved pTeX scripts by Yusuke Terada in ~/Library/TeXShop/bin.

New in TeXShop 3.60 (Feb 11, 2016)

  • Updated to Sparkle 1.31 for security reasons.
  • TeXShop no longer adds a creator and type to files it writes. These were obsolete from the Classic version of the file system.
  • The command "Set TeXShop as Default TeX Editor" is now active when either the Source or Preview window is active
  • Slight cleanup in English and Korean localization.

New in TeXShop 3.59 (Jan 2, 2016)

  • A new item is provided in the TeXShop menu, "Select TeXShop as Default TeX Editor." Many programs are able to edit .tex files, so when the user double clicks such a file, it is not clear which program will open it. Selecting the new menu item informs Apple's Launch Services that TeXShop should open such files. The appropriate Launch Services API does not distinguish between different versions of a program. A few users are in the bad habit of keeping several copies of TeXShop on their computer, and then the new menu will select a random version to run. It is best to keep TeXShop in /Applications/TeX and update it via the Sparkle update mechanism. Then only one copy of TeXShop will be on the disk. The author of TeXShop sympathizes with sloppier users, since he has dozens of versions of TeXShop on his disk. He opens new files by dragging their icons to the TeXShop icon in the Dock to insure that the correct copy runs.
  • Alan Munn reported the following strange bug:
  • \documentclass{article}
  • \begin{document}
  • \begin{enumerate}
  • \item John started the car.
  • \item John stopped the car.
  • % environment completion here produces \stoped
  • % even if the line is commented out
  • % completing again produces the correct completion
  • % but environment completion after these comments seems to work
  • This bug is fixed.
  • The TeXShop menu has a new item just below Preferences called "Open ~/Library/TeXShop". When this item is selected, the Finder will open the ~/Library/TeXShop folder. In recent versions of OS X, ~/Library is a hidden folder. The new command makes it easy to access this folder without using special tricks. Files in this location customize TeXShop for the individual user. For example, the Templates subfolder has all templates which appear in the Templates pulldown menu. These templates can be opened and edited in TeXShop; other templates can be added to the folder.
  • For many years, users could type a line like: % !TEX encoding = IsoLatinGreek at the top of a source file to indicate that the file should be opened or saved using the LatinGreek encoding. But if the encoding name, here "IsoLatinGreek", was not recognized by TeXShop, the program would open the file using the "Mac OS Roman" encoding without reporting an error. This bug is now fixed. An unrecognized encoding name will cause an error dialog to appear reporting the error, and then the file will be opened in "ISOLatin9", the current default encoding. The best way to avoid this sort of error is to use the Encodings Macro to write the displayed line, since this Macro lists all legal encodings and allows users to select the one they want.
  • The alternate front end TeXWorks uses the same encoding magic line, but has different names for many standard encodings. TeXShop now recognizes the TeXWorks names, making it easier for collaborators to share files.
  • The TeXShop Help menu now has a new document by Herbert Schulz titled "File Encoding in TeXShop". This document explains the significance of various encodings of the source file, a topic of importance to users who do not write in English.

New in TeXShop 3.58 (Nov 10, 2015)

  • Fixes:
  • In external editor mode, typesetting caused blank pages to be displayed. This is fixed, or at least mostly fixed. It is important to configure TeXShop correctly so the fix works. There are two ways to use TeXShop in external editor mode. You can typeset with TeXShop, by making the pdf page active and typing command-T. Or you can typeset from the editor or from a shell, and configure TeXShop to update the display when the pdf file changes. In the first case, the TeXShop preference "Automatic Preview Update", under the Preview tab, should be off. In the second case, it should be on.
  • When the pdf window is split, the bottom half sometimes became blank. This bug is fixed.
  • When the pdf window is split and then the user typesets, half of the display is often blank. This version of TeXShop fixes the problem. The fix works well in "multipage format", which I recommend. It can have problems in "single page format" and "double page format", although it usually works in these cases. Because of these small problems, the fix can be turned off. To do so, type the following command in Terminal: defaults write TeXShop FixSplitBlankPages NO
  • Incidentally, all three bugs have been reported to Apple.
  • In addition, the following changes were made:
  • Max Horn fixed the "unindent" command. The previous version of this command would sometimes lose a character.
  • Max Horn also added #defines for NSAppKitVersion10_9 and the link in the TeXShop code base, so the source code should compile on Yosemite and Mavericks as well as on El Capitan.
  • James Crippen asked that "paragraph" and "subparagraph" be added as default tags because these items are used in the Memoir class. So currently in LaTeX, the following receive automatic tags:
  • chapter
  • section
  • subsection
  • subsubsection
  • paragraph
  • subparagraph
  • macro
  • environment
  • Fixed the French localization so both documents in Help that have been translated into French occur in the Help menu. The translations of documents by Herbert Schulz are by Rene Fritz.

New in TeXShop 3.57 (Oct 16, 2015)

  • The command to show the Key Bindings editor broke in the German localization, and is now fixed.
  • The command to split the Source Window broke in 3.56 and is now fixed, at least in most localizations. This is not a bug in the code; instead it is a bug in how XCode processes nib files. Fixing it required dropping down to XCode 7.0 and editing very carefully there. The bug still exists in the text window when in single window mode.
  • TeXShop can now edit documents with extension lua.

New in TeXShop 3.56 (Oct 12, 2015)

  • Debugging code accidentally left in version 3.55 caused a pause between typesetting and display of the new pdf. This is fixed.

New in TeXShop 3.55 (Oct 12, 2015)

  • Fixes two significant bugs when running in El Capitan:
  • The text boxes in the Preview toolbar were incorrectly sized, so numbers in them were not properly centered vertically. This includes the page number box, total page box, and magnification box. All are now fixed in all localizations. Localizations other than English are only lightly tested, so problems in the box display in these localizations should be brought to our attention.
  • The magnifying glass displayed bitmapped images rather than clear pdf text when run in El Capitan. This was discovered early on, and a bug report was filed with Apple on July 11.
  • Over the years, at least four different designs were written to create a TeXShop magnifying glass. All were eventually broken by Apple changes. The Yosemite magnifying glass contained three major calls
  • thePDFData = [[self documentView] dataWithPDFInsideRect: [[self documentView] visibleRect]];
  • NSImage *theImage = [[NSImage alloc] initWithData: thePDFData];
  • [theImage drawinRect: magnifiedRect fromRect: sourceRect operation: NSCompositeSourceOver fraction 1.0];
  • The first call asked the Preview Window to provide the raw pdf data creating the region visible on the screen. The second converted this to an NSImage, a common object for handling illustrations in Cocoa. The final call read from a section of this image, and wrote the result to a (usually larger) section, essentially enlarging the image. Our bug report claimed that the third call was broken in El Capitan.
  • After furious work this week, it turned out that the third command works well and the bug is in the first call, which asks for the raw PDF data of a typeset document. Apple claims that drawing of pdf documents is faster in El Capitan; apparently that's because PDFKit converts several pages to bitmaps and saves them for later drawing. The first call occasionally returns raw PDF code, but more often it just returns a bitmap. Magnifying that bitmap gives unpleasant results.
  • The bug is fixed by getting the raw PDF data a different way, on a page by page basis. Because I wanted to fix this bug rapidly, the current code only gets data from one page of a document. Imagine that several pages are shown on the screen, perhaps because scrolling left part of one page and part of another page on the screen. Or perhaps the user is displaying two pages side by side. When magnification begins by clicking on a point, only the material on that page will appear in the magnifying glass. If the glass moves off of the initial page, it will show white contents with no magnified material. Release the mouse, and push it again to magnify a different page.
  • This code may be improved in the future. On Yosemite and earlier, the old code is used. We could use the old code everywhere if Apple fixed the bug.
  • One user was bothered by bouncing behavior when scrolling. Here is advice from a past TeXShop release. In Yosemite, the source code window's scroll controls have some elasticity, so the source bounces slightly at the top and bottom of the document. Yusuke Terada noticed that these bounces sometimes obscure the first or last lines of the document, making it difficult to edit these lines. Yusuke Terada added a hidden preferences to turn off this elasticity. To activate the hidden item, type the following in /Applications/Utilities/Terminal: defaults write TeXShop SourceScrollElasticity NO
  • Finally, complaints have surfaced that the display of pdf files in El Capitan is unsatisfactory for some combinations of monitor and computer. Everyone seems to agree that the display is sharp and clear on large Retina display machines, and the problem may be caused by Apple optimizing for these machines. If you are bothered by poor display quality, the best we can do is to repeat the advice given two years ago when this problem first surfaced.
  • I am just barely able to notice a difference myself, using Apple's 27 inch Thunderbolt Display. A few users sent me email with pairs of png files, showing an image under Mavericks and under Yosemite and pointing out the fuzzy result on Yosemite, but in some of these cases I couldn't see the difference. So the problem seems to depend strongly on the computer screen used, and perhaps on user sensibilities. Some users may be completely happy while others are desperate for fixes.
  • Version 3.44 of TeXShop has several hidden preference items which may help with this problem. There is no universal solution, so experimentation with these preference settings will be needed if you find the display fuzzy.
  • TeXShop and many other graphical front ends for TeX and PDF display use Apple's PDFKit and Cocoa frameworks. These frameworks rasterize pdf images are an extremely low level not accessible to programmers. Version 3.44 tries to expose all the routines in Cocoa which could modify this rasterization. Notice that TeXWorks and Adobe Acrobat do not use PDFKit and Cocoa and thus behave differently. It does little good to call these programs to our attention since switching to a different pdf display library would betray a key feature of TeXShop (and other programs using these frameworks, namely that they are fully native applications.
  • With these caveats, let us list possible solutions. Yusuke Terada noticed that in Japan, the display could appear fuzzy and then be made legible by tweeking the magnification. So he added code in TeXShop to do this automatically each time a pdf file is opened or typeset. To turn this feature on, type the following in Terminal: defaults write TeXShop FixPreviewBlur YES
  • If this tweek fixes the problem, leave it on and stop reading. Otherwise turn the feature off by using the same command with YES replaced by NO, since the tweek is likely to interfere with remaining experiments.
  • Apple's System Preferences in the General Pane has an item labeled "Use LCD font smoothing when available." A few users discovered that turning this item off cured fuzzy behavior. I think this fix won't help most users, but it might be worth a try.
  • TeXShop also has a preference item under the Preview tab labeled "Smooth text and line art." This item was originally added to fix a different problem. One user created an illustration with very thin lines. On a previous TeXShop, the lines vanished with regular monitors, although they appeared with the Retina display. The user discovered that the lines appeared in Acrobat, and by turning on antialiasing they also appeared in TeXShop.
  • The code provided by Cocoa to turn on antialiasing has additional features not exposed in previous versions of TeXShop. Cocoa provides the ability to set the level of antialiasing. The previous "Smooth text and line art" preference set this value as "high". In TeXShop 3.44, hidden preference settings can select the interpolation level. To test various levels of antialiasing, turn on "Smooth text and line art" in TeXShop Preferences and then set the hidden preference
  • defaults write TeXShop InterpolationValue 3
  • where the final value can be any integer between 0 and 4. Apple's API documentation provides the following names for these values, which perhaps give a hint of their function. The list is as follows; the strange reversal of 3 and 4 occurs in the official list:
  • 0 = NSImageInterpolationDefault
  • 1 = NSImageInterpolationNone
  • 2 = NSImageInterpolationLow
  • 4 = NSImageInterpolationMedium
  • 3 = NSImageInterpolationHigh
  • Frankly, I suspect an entirely different solution will be best for most people. That solution is to change the font used for your TeX document, via the wonderful macros written by Michael Sharpe and added to TeXShop late this summer. For detailed explanation, read the description below under "TeXShop Changes 3.39."
  • Notice that it is possible to add Michael's commands for one particular font to your default template, so that font will always be used for new documents.
  • All of these fonts are included in the full TeX Live distribution, so using them should cause no trouble when collaborating with Windows or Linux users.
  • The font commands take up four or five lines in the preamble, and are easily discarded once the document is complete if you want the final document to have a plain vanilla look. On the other hand, Michael's choices come from an expert and may satisfy more readers than the previous default font choices.

New in TeXShop 3.54 (Sep 30, 2015)

  • The Sparkle update mechanism was broken in 3.53. It is fixed in 3.54.
  • For some time, TeXShop has not contained the two movies which appear in the Help Menu. They are downloaded when the user requests them. This broke in 3.53, and is fixed in 3.54.

New in TeXShop 3.53 (Sep 29, 2015)

  • On Mavericks, the Preview display of text was slightly blurry on many screens. This was probably caused by changes Apple added to support the Retina display. Many work arounds for the problem has been suggested. Terada Yusuke added code which improved the display for many. His code is activated by a hidden preference
  • defaults write TeXShop FixPreviewBlur YES
  • Apple improved the pdf display in Yosemite, and again in El Capitan. But some users still see traces of the old blur. Terada Yusuke has modified his code for El Capitan, and users unsatisfied with the Preview output should activate the above hidden preference.
  • Near the end of the Macro menu, there is an item ``Tables --> Table'' which inserts the outline for a table into the source. The first line of this source is
  • \begin{table}[htdp]
  • However, ``d'' is not a legal parameter for tables. Previous versions of LaTeX ignored this error, but it is flagged as an error in the 2015 version.
  • The easiest way to fix this is to open the TeXShop Macro editor and remove the ``d''. If you have never edited the default macros, you can also get the fix by quitting TeXShop, going to ~/Library/TeXShop and throwing the entire Macros folder in the trash. Then restart TeXShop and the current Macros folder will be created.
  • Some changes made in TeX Live 2015 caused a few programs to output unexpected SyncTeX code, which then caused TeXShop to lose control of the mouse. This was a TeXShop bug, not a SyncTeX bug. It was fixed in 3.52.
  • When using SyncTeX, occasionally the system cannot find a match. In those cases, the older Sync method is called. But this older method turned out to crash for the same reason. So in 3.53, the old Sync is not called and in these unusual situations, no Sync is found.
  • One or two coding changes were made so TeXShop will compile with the latest XCode.

New in TeXShop 3.52 (Jul 14, 2015)

  • TeXShop 3.52 uses the new link automatically when appropriate, and thus needs no configuration for El Capitan. To be specific, on startup, if the path setting in TeXShop Preferences under the Engines tab is /usr/texbin AND /usr/texbin either does not exist or is not a symbolic link AND /Library/TeX/texbin exists and is a symbolic link, then the preference setting is changed to /Library/TeX/texbin. Similarly if the preference setting is /Library/TeX/texbin AND /Library/TeX/texbin either do not exist or is not a symbolic link AND /usr/texbin exists and is a symbolic link, then the preference setting is changed to /usr/texbin. In all other cases, the setting is not touched.
  • Engine files in ~/Library/TeXShop/Engines which define $PATH have been modified by adding /Library/TeX/texbin to the path; /usr/texbin remains so these files will work on both old and new systems.
  • Macros in ~/Library/TeXShop/Macros has been modified to refer to /Library/TeX/texbin rather than /usr/texbin. (Only three occurrences of /usr/texbin were found in the old Macros file.) Users do not automatically get the new macros, so users with an older system will not be affected. Users who installed MacTeX-2015 or BasicTeX-2015 can safely use the new Macros because they have the new link.
  • The English Help Panel has been modified to mention /Library/TeX/texbin rather than /usr/texbin.
  • In the current El Capitan beta, sync from source to preview switches to the correct pdf page, but does not hilight the new selection in yellow. This is fixed.
  • In the current El Capitan beta, the magnifying glass works but displays a bitmap rather than a sharp pdf image. I suspect this is an Apple bug which will be fixed.
  • The German localization has been improved by Lukas Christensen. Thanks!
  • Klaus Tichmann reported a synctex bug and a fix. The "synctex_scanner_get_name" sometimes returns NULL rather than a valid string. This can lead to loss of mouse control. The fix is in version 3.52.

New in TeXShop 3.51 (Apr 15, 2015)

  • TeXShop has two new macros by Michael Sharpe, tabularize and tabularize + space. These macros were suggested by Nils Enevoldsen and make it easier to construct and edit tables. To examine the Macros, go to ~/Library/TeXShop/New/Macros and copy the items tabularize.plist and tabularize.pdf to the desktop. The second is documentation for the macros.
  • To add the Macros, select "Open Macro Editor" in the Macro menu. Then select "Add Macros from file...", which appears in this menu. Navigate to the desktop and select the file tabularize.plist.
  • Many missing German translations were added to the German localization by Lukas Christensen.
  • There is a minor fix to the Korean localization by Karnes Kim.
  • Latexmk was updated to 4.43.
  • The Help menu contains a short new document by Herbert Schulz, "TeXShop Feature Confusion".
  • There is a new item in the Edit Menu, "Correct Spelling Automatically", and a related new item in the Preferences Panel, "Correct Spelling". The menu item toggles spelling correction on or off for the top most document. The Preferences item sets the default setting when a document is first created or opened.
  • Spelling correction is a new feature inherited from the iPhone. When it is on, the Mac automatically corrects the spelling of misspelled words, and often suggests completions for words or phrases that are partially typed. Note that "check spelling" and "correct spelling" are different; the first underlines misspelled words in red, while the second actually changes the text.
  • Many of us dislike spelling correction. When this system doesn't know a word, it can replace it with a new bizarre choice. For this reason, spelling correction is off by default until the Preference setting is changed.
  • Spelling correction only works with Apple dictionaries. If cocoAspell has been installed on your system and one of its dictionaries is chosen, spelling correction won't do anything.
  • System 10.10.3 introduces a new emoji feature "Skin tone modifier" for ethnic diversity. Yusuke Terada's Character Info feature has been modified to support this feature.
  • Previously, typesetting in single window mode left the text side of the window active. This is fixed, and now the behavior is determined by the "After Typesetting" item in TeXShop Preferences. When this item is set to "Bring Preview Forward", typesetting in single window mode makes the preview side of the window active.
  • Yosemite 10.3.3, released on April 8, 2015, fixes the "preview blur" problem which cropped up when Yosemite was introduced. The original system was optimized for the Retina display and produced blurry text in the Preview window on regular monitors. In 10.3.3, the display is again crisp on these monitors.
  • Consequently, fixes for this problem introduced in TeXShop 3.44 and 3.45 are no longer needed. In particular, we recommend setting FixPreviewBlur to NO via the Terminal command defaults write TeXShop FixPreviewBlur NO

New in TeXShop 3.50 (Jan 23, 2015)

  • Richard Koch's email address changed from [email protected] to [email protected]. All occurrences of this address in TeXShop were changed.
  • A TeXShop Preference item allows the user to set the size and location of the console window when it opens. This item has a button titled "Set with current position." In 3.49, this button was always active, even thought it only makes sense if the option "All consoles start at fixed position" is selected. Now it is active only in this case. This behavior is consistent with similar Preference item behaviors for the Source and Preview windows.
  • Terada Yusuke updated the OgreKit spell panel to the latest version. In the process, he added features and fixed bugs:
  • There is a Chinese localization by Wei Wang, [email protected].
  • When rich text was pasted to OgreKit, the style was mistakenly pasted. This is fixed.
  • Previously the Japanese yen mark was incorrectly passed to OgreKit. This is fixed.
  • A strange behavior of OgreKit when using OS X Spaces, pointed out by Daniel Grieser, is fixed. Previously the Preview and Source windows were attached to a space, but the Find window floated to whatever space was currently active.

New in TeXShop 3.49 (Jan 17, 2015)

  • TeXShop installs two movies for beginners in ~/Library/TeXShop/Movies/TeXShop. These movies are quite large, 5.4 MB and 9.4 MB as gzipped files. Until version 3.49, every update of TeXShop contained these movies, slowing download times. TeXShop 3.49 finally does the right thing; it no longer contains the movies. If the user asks to view one of them, TeXShop downloads that movie from the web site, installs it in the above location, and runs it. Once downloaded, the movie remains on the user's machine.
  • This simple change reduces the size of the TeXShop download from 54 MB to 39 MB, and the size of the unzipped program from 83 MB to 53 MB.
  • The Experiment feature of TeXShop, introduced in version 3.37, did not handle the "% !TEX encoding = ..." line in the header of the source file correctly, so users with UTF-8 files ran into trouble using the feature. This is fixed.
  • The Source Preview menu item and associated keyboard shortcut now work in Single Window mode.
  • In the French Localization, the item in TeXShop Preferences to set the font of the source file was broken. This is fixed.
  • Three hidden preferences were added, allowing users to change the yellow highlight color to another color, when used by inverse sync from the pdf window to the source text. This is helpful if the user has changed the default colors of the source window. The new items are: defaults write TeXShop ReverseSyncRed 1.00, defaults write TeXShop ReverseSyncGreen 1.00 and defaults write TeXShop ReverseSyncBlue 0.00.
  • Latexmk is updated to version 4.42
  • MakeIndex failed on files with multiple dots in the name; now fixed.
  • A new TeXShop Preference item under the Console tab allows users to set the default size and location of the Console Window. To set these values, open a document and use TeXShop’s “Show Console” menu to bring the console to the foreground. Adjust its size and location as desired. Then open TeXShop Preferences, select the Console tab, choose “All consoles start at fixed position” and press the “Set with current position” button. Then click “OK.”

New in TeXShop 3.48 (Dec 8, 2014)

  • Currently the keyboard shortcut Cmd-F brings up the Find Panel. There are three panels, depending on a Preference choice. In 3.48, the command brings up the Find Panel unless the Preview Window is active. In that special case, Cmd-F opens the drawer for the Preview Window and places the cursor in its Search Field.
  • This simple change was suggested by Markus Gail.
  • Sparkle has been updated from version 1.5 to version 1.8. The TeXShop Preference Pane now has items in the Misc tab controlling the action of Sparkle. Users can choose to update manually with the "Check for Updates" menu. In that case, there will be no Sparkle notification of new updates. Or Sparkle can search for updates daily, weekly, or monthly, and notify the user when an update is available.
  • There is another fix for the Yosemite scroll bug in Single Page and Double Page modes.
  • Updated to latexmk 4.40h.

New in TeXShop 3.47 (Dec 2, 2014)

  • The height of the Templates toolbar item for the Source Window was increased by one pixel in most localizations to make it match other items in the same toolbar.
  • The code for keyboard shortcuts in the Preview window has been revised:
  • TeXShop has always enhanced the left and right arrow keys to provide paging if there is no horizontal scroll bar. This code is still present.
  • Otherwise, recent versions of TeXShop tried to fix a Yosemite bug in which scrolling paged in the wrong direction. This bug occurs in Single Page and Double Page modes, but not in Multiple Page or Double Multiple Page modes.
  • The new code only fixes the bug in Single Page and Double Page modes, reverting to the App Kit code in the non-broken modes. Moreover, the new code only fixes the bug in Yosemite and above. If Apple fixes the bug, the fix can be turned off completely, using the hidden default
  • defaults write TeXShop YosemiteScrollBug NO
  • If TeXShop is quit without closing windows, the windows will reappear when TeXShop is restarted. Initially, only the Source Window was restored, but in recent TeXShop versions the Preview window is also restored.
  • Previously the Preview window was always restored to the main monitor, even if the user had multiple monitors. This is fixed and now the Preview window appears on the monitor it was originally on.

New in TeXShop 3.46 (Nov 25, 2014)

  • In Yosemite with Single Page or Double Page modes in the Preview Window, the arrow keys scrolled in the wrong direction. This was fixed in a previous TeXShop version. However, the fix partly broke the behavior of the up and down arrows in all modes.
  • In 3.46, the old behavior for up and down arrows returns; these keys scroll up or down one line until coming to the end of a page, and then page.
  • In previous versions of TeXShop, each typesetting job caused a slight adjustment in the portion of the page displayed. Typically, the window would gradually creep upward. This adjustment seemed to depend on magnification, the portion of the page displayed, and more. We tried various kludges to minimize the creep.
  • It looks like Apple fixed this bug in the latest Yosemite, so we have removed the kludges. Preliminary tests show that creep is greatly reduced. Notice that the problem will definitely remain in earlier versions of OS X. Upgrade to the latest version is possible.
  • When TeXShop runs with Auto Saving active, some items in the file menu are modified automatically by Apple. These items are labeled Save As, Duplicate, Rename, Move To, Export, Revert to Saved, Revert.
  • In particular, Revert allows users to activate a "Time Machine" like window and revert back to an earlier version.
  • Some of these items do not work in Single Window Mode, and Revert causes TeXShop to crash. So (at least temporarily) the items are all disabled in Single Window Mode. Obviously they continue to work in the usual mode in which the source and preview are placed in different windows.
  • This crash has never been reported, and we suspect that Single Window users seldom try these items. Note that "Save" is unaffected by the change, and often used.
  • Warning: Apple has experimented with the placement of these items; in Lion, for instance, Revert was on a pull down menu activated from the window title. We have not gone back to earlier versions of the operating system to make corresponding fixes.
  • There are minor improvements in the Japanese, Korean, and Italian localizations.
  • OgreKit has been updated to the latest version. Also OgreKit is now localized for Korean.
  • Yusuke Terada fixed "Remember last position" for the Console window. This is complementary to a previous addition of "Always Open Console at a Fixed Position".
  • Fixed minor toolbar glitches pointed out by Herbert Schulz: "Page" and "Scale" were improperly clipped in some localizations including English.
  • Added a new encoding option: Korean (Windows, DOS)

New in TeXShop 3.45.1 (Nov 6, 2014)

  • The command to trash AUX files had a bug and did not fully work. The problem is now fixed.

New in TeXShop 3.45 (Nov 4, 2014)

  • The left column of the Macro Editor window was essentially blank, showing separator images but no text. This error was caused because TeXShop 3.44 was compiled on Yosemite. The same source code compiled on Mavericks worked on both Mavericks and Yosemite. A work around was found and the source now compiles and works on both Mavericks and Yosemite.
  • The command to trash AUX files had a bug and did not fully work. The problem is now fixed.
  • Karnes Kim produced a Korean localization of TeXShop, which is now part of the program.
  • Yusuke Terada provided tweeks and fixes for the following:
  • The hidden preference setting "defaults write TeXShop FixPreviewBlur YES" has been improved so that it works if users zoom the PDF by pinch gestures with the Magic Mouse or trackpad.
  • In TeXShop 3.41, the maximum possible PDF window magnification was increased from 1000% to 2000%. But a few constants in the code still contained the 1000% limit. These have been changed to 2000%.
  • A small error prevented the fix for remembering the PDF Window location when quitting. This is fixed.
  • In the Macro Editor, dashes and quotes were automatically changed to smart dashes and smart quotes, breaking some applescript macros. This is fixed.

New in TeXShop 3.44 (Oct 31, 2014)

  • Several users reported a crash just after typesetting when TeXShop ran on Yosemite. The users told me that only certain documents caused crashes, and under unusual circumstances. For instance, some documents caused crashes if typeset twice in succession. It turned out that only documents using hyperref crashed, and the crash was caused by incorrect code in TeXShop used to process the outline that such documents often contained. It was not necessary to open the Preview drawer and view the outline to get the crash. The code is fixed.
  • On Yosemite using a Preview window configured for "Single Page" or "Double Page" display, the keyboard shortcuts to page up or page down were reversed. This bug was noticed by Yusuke Terada and fixed. There are no changes in "MultiPage" or "Double MultiPage" modes since Yosemite behaves correctly for these modes.
  • Autosave for the Preview window was broken and is fixed.
  • The next two items discuss hidden preferences to fix minor TeXShop annoyances. Before adopting these hidden preferences, users should determine whether they find the current behavior annoying.
  • Herbert Schulz noticed that during scrolling of the source window, the lines numbers scroll at a slightly different rate and require a fraction of a second to catch up. Yusuke Terada pointed out that this is due to a fix implemented in Lion for a Lion bug affecting line numbers. Apparently this line number bug has been fixed by Apple in Yosemite. A hidden preference is available to turn the fix off. When this is done, line numbers and text scroll in unison except near the ends when source elasticity applies. By turning off source elasticity as well, the line numbers and text scroll together: defaults write TeXShop FixLineNumberScroll NO defaults write TeXShop SourceScrollElasticity NO
  • One user discovered that "Aggressive Trash AUX", which is activated by a hidden preference setting, could remove items in hidden ".git" directories and thus impact repository management systems. In version 3.44, TeXShop does not search hidden directories in aggressive mode.
  • Finally, a number of users switching to Yosemite reported fuzzy preview images and inadequate antialiasing on certain monitors. I'm told the image looks fine on Retina displays including the new 27 inch iMac. Perhaps Apple optimized pdf rasterization for these displays without worrying enough about other monitors. Frankly, I am just barely able to notice a difference myself, using Apple's 27 inch Thunderbolt Display. A few users sent me email with pairs of png files, showing an image under Mavericks and under Yosemite and pointing out the fuzzy result on Yosemite, but in some of these cases I couldn't see the difference. So the problem seems to depend strongly on the computer screen used, and perhaps on user sensibilities. Some users may be completely happy while others are desperate for fixes. 
Version 3.44 of TeXShop has several hidden preference items which may help with this problem. There is no universal solution, so experimentation with these preference settings will be needed if you find the display fuzzy.

New in TeXShop 3.43 (Oct 13, 2014)

  • Fixed a bug after drawing a selection rectangle in the Preview Window. If this window became inactive and then was activated again, drawing into the window would become erratic or worse. Now when the window is deactivated, the selection rectangle is removed.
  • TeXShop has a hidden preference reversing the order of the source and preview windows in single-window mode defaults write TeXShop SwitchSides YES
  • After selecting this preference setting, use "Customize Toolbar" with the single window active to rearrange tools appropriately.
  • Yusuke Terada fixed Automatic UTF-8-Mac to UTF-8 Conversion, which is used mainly in Japan, so it correctly opens root file documents.
  • Yusuke Terada also fixed a couple of cases when TeXShop commands created a "ghost window" with no content, and made (command+1) switching source window also work on console windows.

New in TeXShop 3.42 (Sep 22, 2014)

  • Has the following changes:
  • In Split Full Window mode, additional toolbar tools are provided: the "Scale" tool, the "Color Index" tool, and the "Key Bindings" tool.
  • Toolbar items for this window now have reasonable localized names, rather than the very technical names in version 3.41.
  • Various bugs in the Split Full Window mode are fixed.
  • The Spanish localization temporarily changed to Chinese. This is fixed.
  • The Macro menu failed to work in Split Full Window mode if the user switched to another window and then back to the split window. This bug is fixed.
  • In Full Window mode, if the text portion was split, both the Macro menu and the Sync between Preview and Source always used the same piece of text rather than switching when the other piece of text was made active. This is fixed.
  • Yusuke Terada improved the new "Character Info" command from 3.41. He writes
  • National Flags:
  • An emoji character of a national flag consists of 2 unicode characters.
  • Support for Ideographic Variation Selector (IVS)
  • In Japan and China, some kanji characters have multiple variants. For example, both 神 and 神󠄀 have the same meanings (they mean "God") and the same readings. They are considered as variant forms of the same kanji. IVS, Ideographic Variation Selector, is used in order to distinguish them. For example, the single unicode character U+795E brings the output "神". On the other hand, the sequence "U+795E U+E0100" brings the output "神󠄀". U+E0100 itself is not a letter. This is a variation selector. In Unicode, there are variation selectors like this in U+FE00..U+FE0F (Variation Selectors), U+E0100..U+E01EF (Variation Selectors Supplement), U+180B..U+180D (Mongolian Free Variation Selectors). In the current version of TeXShop, the character info of "神󠄀" is displayed as "a letter consisting of 3 characters". I modified TSGlyphPopoverController.m for IVS support so that this is displayed as "CJK UNIFIED IDEOGRAPH-795E (Variant)", like "RED APPLE (Emoji Style)".

New in TeXShop 3.41 (Sep 4, 2014)

  • When editing a document, it is possible to place the source view and preview view in a single window rather than dealing with two windows for these views. This is particularly useful when using the "full screen" option, since the screen will contain both source and preview views.
  • In previous versions of TeXShop, duplicate copies of many documents in the Help menu were placed in the Localized directories of TeXShop, even though these documents had never been Localized. This duplication is cleaned up in version 3.41, reducing the size of the program by almost a third. The English versions of the documents will still appear when TeXShop is used in another language.
  • Yusuke Terada provided a new menu item in the Edit menu called "Character Info." To use it, select one or more letters in the source file and then select the menu item. If only one letter is chosen, a balloon will appear showing a magnified version of the glyph, its full unicode name, and its unicode character. When glyphs require two or three characters, all required characters will be displayed. If several letters are selected, the balloon will list the number of characters, words, and lines in the selection, and show the unicode character for each glyph.
  • Christian Icking discovered that TeXShop became inoperative or crashed when opening a file containing % !TEX root = but with no non-space characters after the equal sign. This bug is fixed.
  • Typesetting for "Experiment" is more robust. It now uses the Preference settings for pdflatex and simpdftex latex and the personallatex setting. If the user's pulldown menu is set to latex, the three choices of 1) pdflatex, 2) tex + dvi, 3) personal script are obeyed. This should make the command work for TeX in Japan.
  • The commands Next Source Window and Previous Source Window in the Window menu again work, and do not bring up "ghosts" of closed windows.
  • In the previous version, the Indent and Unindent commands were modified to insert spaces rather than tabs in the source. A few users preferred tabs. There is now a preference item for these users; they should check "Use Tabs" in TeXShop Preferences, under the Source tab.
  • The Preference command to select the source font was broken when TeXShop was used in English, due to a missing connection in the English Localization File. This is fixed.
  • Yusuke Terada doubled the maximum magnification level allowed for PDF files, so it is now possible to look at very small details of the preview output.
  • Yusuke Terada provided new Preference settings under the Miscellaneous tab for projects with a root file. When opening a chapter file, TeXShop previously also opened the root file and then immediately miniaturized the root source. Users can choose to avoid this miniaturization, or to avoid opening the root file at all. In the second case, the root will open when needed, for instance during typesetting.

New in TeXShop 3.39 (Aug 13, 2014)

  • The most significant change in 3.39 is the addition of Michael Sharpe's "Recent TeX Fonts" document and associated font Macros. Michael and I attended the TeX User Group meeting in Portland, Oregon at the end of July, 2014. I knew him as an Applescript expert; several of his scripts are in TeXShop. Other macros from him will appear in a future version. To see his scripts, go to https://dl.dropboxusercontent.com/u/3825336/TeX/index.html. Pay particular attention to macrocopier.zip on this location, a stand alone program which makes it easy to maintain and extend TeXShop macros. At the TUG meeting, I discovered that Sharpe is a font expert widely known to users on other platforms. TeX Live contains a very large number of TeX fonts, but it is not that easy to use them. Most font sets don't have mathematical symbols, and it becomes a design task to find pleasing combinations of fonts for text, sans-serif sections, and mathematics. 
Sharpe wrote a document called "Recent TeX Fonts", now available in the TeXShop Help menu. This document describes a number of pleasing font combinations, one per page. Each page lists the features of a set, provides an extensive sample of text and mathematics typeset using it, and contains the exact LaTeX code needed to use the font set. These sets are the result of extensive work by Sharpe; I understand that some of them took four months to perfect. 
One way to use the document is to select an article or book written with standard fonts and copy Sharpe's implementation section into the document's header and retypeset. 
To make this even easier, Sharpe slightly modified the LaTeX template which comes with TeXShop, defining a section in the header bounded by %SetFonts comments. The space between two such comments can be empty when the document is originally written. Sharpe defined three macros called "GetFontSet," "SaveFontSet," and "TestFontSet." The first of these brings up a small dialog listing known font sets. When one is selected, its implementation code is written to the source document between the %SetFonts comments, replacing other implementation code there. So with one click and one typeset, the document can be seen written with a new set of fonts. 
Users can also put their own implementation code between the %SetFonts comments. The SaveFontSet macro reaches between the comments and saves the implementation code to a file in ~/Library/TeXShop/bin named "SetFonts", which is used by the GetFontSet macro to list known font combinations. Thus "SetFonts" gradually builds into a library of known font combinations. 
I'll let the TestFontSet macro speak for itself. 
To use these Sharpe additions, it is necessary to use the full TeX Live as installed by MacTeX, because BasicTeX doesn't contain many fonts. All the font sets defined by Sharpe have been tested and are available with TeX Live 2014, except two. The garamondx font has a license permitting free personal use provided the font is not sold. This font is on CTAN, but it cannot be in TeX Live because TUG sells a DVD containing TeX Live. However, a script named getnonfreefonts is available to download and install this font. See https://www.tug.org/fonts/getnonfreefonts/. 
The "SetFonts" template also has a Lucida entry. Lucida is a commercial font, sold by TUG and others. See https://www.tug.org/store/lucida/index.html. Many users own this set, and Sharpe's detailed and non-trivial code to use them will help them obtain the most from the fonts. It is our hope that the existence of these easy techniques will lead to more LaTeX documents that don't scream out "I was written with \TeX," and instead have a professional printed look. 

  • TeXShop has a new icon by Thiemo Gamma in Switzerland, designed for Yosemite. Gamma also redesigned the dialog which appears when you select the menu item "About TeXShop". The story of TeXShop icons is complicated. The original icon was designed by Jérôme Laurens. Jérôme also designed the TeX Live Utility icon, and I like both a lot. 
When the Retina display appeared, it was necessary to redraw the icon, but unfortunately source code for Jérôme's icon did not exist. Other users then contributed revised icons, which I didn't quite like. So I tried myself and discovered that making icons is really, really hard. Eventually William Adams managed to create a high resolution version of Jérôme's icon and I like it a lot. Adams also provided a document icon. 
But Apple revised the look of icons in Yosemite. I intended to ignore the new design. 
Then completely unexpectedly, Gamma sent a new icon. I think it is wonderful for a reason I'll explain in a moment. Gamma is extremely modest about it. When he learns how difficult it is for others to make icons and how much in demand good designers are, he'll have a happy life. 
My goal for TeXShop has always been that it should vanish into the background, allowing writers to concentrate on the document they are writing without distraction. Sometimes this goal is met, and sometimes not. Gamma's icon is a symbol of this goal. It is simple and subdued, sitting there in the background. 
TeXShop still contains Adams' icon for documents. The source code also still contains his program icon. 

  • TeXShop 3.38 has a significant bug, first discovered by James Crippen. When a source document is long and the preview window is active, clicking on the source window leads to a several second delay before the source window becomes active. This bug was caused by a single line of code, added to help a few users in Japan. The bug is fixed in 3.39. The line of code creating the bug was added for users who meet all of the following conditions:
  • They use Japanese input methods
  • They customize the background and foreground colors of the source window
  • They choose a dark color for the background
  • These users can activate the bad line and live with the bug by typing the following in Terminal 
defaults write TeXShop ResetSourceTextColorEachTime YES 


  • Herbert Shultz provided a new version of the Help document TeXShop Tips and Tricks, and René Fritz provided a French translation.
  • The Brazilian localization in TeXShop 3.38 was mistakenly added by Koch to the localization for Portuguese in Portugal. This is fixed in 3.39.
  • Will Robertson asked that the TeXShop "indent" command insert spaces rather than a tab. This makes fine adjustments afterward easier. Version 3.39 gives Robertson his wish.
  • Yusuke Terada provided fixes for a number of small problems in TeXShop: The color matching options for copying from the Preview window, set in TeXShop Preferences under the Copy tab, were broken in recent versions. This is fixed. 
The routine which selects an image from the Preview window has been improved. 
Toolbar tips for mouse actions in the Preview window have been added and localized. 


  • Yusuke Terada also fixed a more significant bug. If a particular font is set in TeXShop Preferences, either by the user or by default, but that font is no longer in the system, then TeXShop would refuse to run. This may explain some very obscure problems reported in the past. The bug is fixed.

New in TeXShop 3.38 (Aug 2, 2014)

  • If the option key is down when a source file is opened, the associated pdf file will not be opened.
  • TeXShop is written in Cocoa, an object oriented framework inherited from NeXT. Object oriented programs create a large number of objects dynamically during program operation. "Memory management" is the task of disposing of these objects when they are no longer being used. If an object is disposed too soon, the program crashes when another part of the program tries to use it. If an object is left dangling and not disposed, memory gradually clogs up. Recently Apple introduced "automatic reference counting", a technology which leaves the memory management task to the compiler, allowing the programmer to ignore it. TeXShop adopted this technology in version 3.35, leading to increased stability and significantly fewer crashes. 
In reference counting, each object keeps a reference number counting the number of parts of the program using it. When a piece of the program is done with the object, that part sends the object a "release" message and the object decreases its reference count by one. When the count reaches zero, the object is automatically removed from memory. 
There is one situation which the compiler cannot handle automatically. Suppose object A is using object B and object B is using object A. Each object then has a reference count at least one, and usually higher if the objects are being used by other parts of the program. Suppose now that the rest of the program is done with the two objects. The objects are sent a number of "release" messages, until eventually each has reference count one. Since the count is not zero, object A does not go away, so it does not send a release message to object B. Similarly ... 
The solution of this problem is to manually introduce a "weak reference" from one object to the other. We give object A a reference to object B, but only give object B a weak reference to object A. A weak reference does not increase the reference count. Thus when all other objects are done with the pair, object A has reference count zero, but object B has reference count one. So object A is removed from memory, and just before that happens it sends a "release" to object B. Now object B has reference number zero, and it too is removed from memory. 
TeXShop 3.38 completes the process of conversion to automatic reference counting, by correctly indicating weak references. Thus versions 3.35 through 3.37 could leave unused objects in memory, but 3.38 fixes that problem.

New in TeXShop 3.37 (Aug 2, 2014)

  • Added a preference setting for the Preview window: ``smooth text and line art.'' By default this is on. The setting was requested by Tom Burke, who created an illustration using GeoGebra which looked pixelated when displayed at small size in TeXShop. Mysteriously, the illustration looked fine under the magnifying glass, or when printed. It also looked fine on a Retina display, but in that case the circles and lines were very thin. To see what the setting does, turn the new preference setting off and open the file Burke.pdf with TeXShop. Notice that the illustration is pixelated, but looks fine under a magnifying glass. Then turn the preference on and open the same file again. This pdf file was created typesetting the TeX source file Burke.tex together with the illustration abI3d8.pdf . 
The same preference setting is provided by Apple's Preview and other programs. Users with a Retina display may wish to turn it off. 

  • Yusuke Terada added small changes for users in Japan. He wrote "during the time Hiragana is input until it is converted to Kanji, `undecided characters' are displayed, but the source text color is not applied and they are displayed in black. This behavior has been modified."
  • A new item, "Experiment...", was added to the Edit menu and is available when the source window is active. This addition has been a recurring request of Wendy McKay. The item allows users to experiment with short, but complicated, fragments of TeX before copying the source into the main document. When the item is chosen, a panel appears. Type a TeX fragment into the panel, say $$\sqrt{x^2 + y^2}$$. Push the Typeset button at the bottom of the panel, and a second panel appears showing the result of typesetting the fragment. The fragment can contain anything: a displayed formula, ordinary text, several pages of mixed material. To typeset, TeXShop creates a new source file with the header of the current document up until "\begin{document}", the new fragment, and a final "\end{document}." This also works in a project with a root file. In that case the contents of the root file up until "\begin{document}" are used. 
Both panels have close buttons. The "escape" key will also close panels when they are active. 
Although the two panels do not have resize buttons, they can both be resized. TeXShop will remember the new sizes and locations and use them the next time "Experiment..." is selected. The font in the source panel will be the default TeXShop source font. The keyboard shortcuts "command +" and "command -" work in the source panel to enlarge the text if desired. Key bindings and command completion are available in the source panel, but with one caveat. Command completion uses the tab key in the panel even if it uses the escape key for regular source, since the escape key in a panel closes the panel. 
The "Experiment..." feature requires a latex-like engine. It will not work with ordinary plain tex. The source panel's Typeset button looks at the main source window's toolbar to determine a typesetting engine., and also uses the "% $TEX engine = ..." mechanism if available at the top of the source window. If "Plain TeX" or "Context" is selected, nothing happens. If "bibtex" or "make index" are chosen, pdflatex is used. Obviousy "pdflatex, xelatex, and lualatex" can be used. The panel will try to use any user-defined engine selected, but some such engines may fail if they don't expect latex-like code or output pdf. 
The preview panel understands mouse scroll commands and trackpad gesture commands to scroll and resize. It understands "command-shift +" and "command-shift -" to resize contents. 
If you close a panel during work and later reopen it, the contents will be remembered. But the contents are lost when quitting TeXShop. It is assumed that the panels will be used for short fragments of work; when the user is satisfied, they will transfer the source to the main document using copy and paste. Panel contents are not auto-saved and cannot be manually saved except via the copy mechanism. 
Each document has its own source and preview panels, so if you have multiple documents open, you could also have multiple source and preview panels open, leading to a confusing mess. I expect users to exercise common sense and only experiment with one fragment at a time. One way to avoid confusion would be to hide the panels when a document becomes inactive. I didn't want to do that because a user constructing a complicated example might want to temporarily open a second document and copy source from that document into the panel as a starting point.

New in TeXShop 3.36.2 (Jun 7, 2014)

  • Fixed magnification on Yosemite
  • Fixed sharing icon on source toolbar
  • Fixed two broken IB connections
  • Changed [NSApp delegate] to (TSAppDelegate *)[NSApp delegate] in two spots to make the code compile on XCode 6

New in TeXShop 3.36.1 (May 22, 2014)

  • This version was released with version number 3.36.1 to test the operation of adding a final digit to the version number. In the future, this will be used for "silent updates" in which a minor problem is fixed in the first hours of a release. In the past we did not change the version number for such silent updates, but from now on we add a decimal digit to the end of the version in both the TeXShop home page and the program. We do not update change documents for minors updates. Source files are always updated at the same time as the program, even for minor updates.
  • The command-1 shortcut to switch from the Preview Window to the Source Window failed if the Preview Window was closed and then reopened. This is fixed. Certain other keyboard shortcuts were also affected.

New in TeXShop 3.36 (May 14, 2014)

  • Changes:
  • The "remember and restore" operation has been improved to remember the position and size of both the Source and Preview windows for all open files and restore them the next time TeXShop is restarted.
  • Recall that holding down the option key while quitting closes and forgets all windows; in that case, TeXShop will restart with a clean slate. Similarly, holding down the shift key while restarting TeXShop will restart with a clean slate.
  • It would be possible to remember other window positions: Console, Log File, etc. For the moment TeXShop does remember these positions since the operation seemed more confusing than helpful.
  • Herbert Schulz improve Command Completion by fixing bugs and controlling whether a forward or reverse search is done during the operation.
  • Fixed a bug for "Edit the Key Binding File." Closing this dialog and then bringing it up a second time produced a blank dialog window. The bug was pointed out by Emerson Mello and is now fixed.
  • The "Enter Fullscreen" menu item was not localized, but as soon as a source window opened, it switched to the user's language. Now it is localized even when no file is open.
  • Protected against a rare bug in which a Notification was sent to a closed Source Window.
  • Attempted to make TeXShop Icon behavior more reliable by providing the extension of the Icon file in the Info.plist, by changing UTI types belonging to com.tug to instead belong to org.tug, and by using Apple defined UTI's when available. The Apple mechanism linking icons with particular applications continues to have problems in the open source world, where a particular file type can be claimed by multiple applications.

New in TeXShop 3.35 (Apr 29, 2014)

  • Both magnification in the Preview window and selection of rectangular regions in the Preview window are disabled on Lion. Users of Lion should upgrade to Mountain Lion if at all possible, since these features will be active again. Users who cannot upgrade should consider moving to version 3.26 because the two disabled features work with that version. But version 3.26 will not be further upgraded and TeXShop Lion users will be stuck there in the same way that Snow Leopard users are stuck with TeXShop 2.
  • The OgreKit Find Panel was upgraded to the latest version by Yusuke Terada, and additional bugs in it were fixed. About the changes, he wrote "This version is based on the latest OgreKit. The latest OgreKit adopts Onigumo as its regular expression engine instead of Oniguruma, which OgreKit used previously. The development of Oniguruma is now stopped, and Onigumo is its fork version. Ruby also used to adopt Oniguruma until Ruby 1.9, but it was replaced by Onigumo since Ruby 2.0. By using Onigumo, new regular expressions like \K, \R, \X can be used.
  • " I built the latest OgreKit specialized for TeXShop. In order to solve the problems in which OS X replaced ordinary quotes with smart quotes, etc, I disabled the meddling functions by default:
  • Smart Copy/Paste
  • Smart Quotes
  • Smart Dashes
  • Smart Links
  • Automatic Data Detection
  • Automatic Text Replacement
  • Automatic Spelling Correction
  • "A message from Juan Luis Varona Malumbres said: Yusuke, please let to me to explain a small problem with the Ogrekit Find Panel in TeXShop: The election Origin: Top/Cursor (in Spanish Origen: Principio/Cursor) works very well in English, but not in Spanish: it always does a 'Cursor' search. Can you fix it, please? "I've fixed it today.
  • "I found another bug of OgreKit in Spanish environment. When you select some range in TeX source and do 'replace all' with OgreKit Find Panel, the entire document is set to the replacement scope, even if you choose "Selection" as the scope of search. This issue occurred only in the Spanish environment. I've fixed this issue"
  • Previous versions of TeXShop allowed paths with a tilde in the TeX Binary Path Setting Preference. For instance, this setting could be "~/Library/TeX/texbin". But such paths caused problems in a small number of minor TeXShop features. A full audit of the TeXShop code was performed and now such tilde's should always work in the setting.
  • TeXShop now contains Michael Sharpe's GotoLabel Macro. Here is his description. "This is macro for TeXShop's Macro Menu, allowing you to bring up a list of labels containing specified text, and move to the chosen label.
  • "To install, choose Macros/Open Macro Editor... (in the TeXShop main menus) and then from the Macros menu, choose Add Macros from File. This brings up a file selector with which you may select GotoLabel.plist. This install the macro in the Macro Menu, where you may move it to any convenient position, and, if you wish, give it a hot key.
  • "This provides an alternative to adding an item to TeXShop's tags by inserting a line %:tag_name in the source. With a lengthy document with many labels, it seems advantageous to be able to filter the list of labels."
  • If you open the Edit Menu --> Spelling and Grammar panel, you can set the dictionary using by the Spell Checker at the bottom of the Panel. TeXShop now remembers this choice, and will automatically use it the next time the program is started.
  • Unfortunately another feature of TeXShop can interfere with this process, the optional "% !TEX spellcheck = " command at the top of a file. I suspect that many users don't use the "% !TEX spellcheck" syntax. They will run into no problems.
  • If no files containing "% !TEX spellcheck" have been opened since TeXShop was opened, and the user chooses a different dictionary, then that different dictionary will be remembered as the new TeXShop default dictionary.
  • But if the user chooses a different dictionary AFTER opening some files containing the "% !TEX spellcheck" line, then that choice will not be remembered when TeXShop closes.
  • So if you do not use the "% !TEX spellcheck" syntax, you can change the default dictionary used by TeXShop by opening the Spelling and Grammar panel and making the change. But if you sometimes use the "% !TEX spellcheck" syntax, the foolproof way to change the default dictionary is to open TeXShop without opening files, change the dictionary with the Spelling and Grammar panel, and quit.

New in TeXShop 3.34 (Apr 18, 2014)

  • A localization for Brazilian Portuguese is provided by Emerson Ribeiro de Mello.
  • Spell checking now remembers a dictionary chosen in the "Show Spelling and Grammar" panel. This makes it easier to use the CocoAspell package.
  • CocoAspell adds dictionaries to Apple's Spelling System which understand LaTeX and thus do not claim that LaTeX commands are misspelled. Obtain the system at http://cocoaspell.leuski.net/. After installing, notice that an extra Spelling Preference Pane has been added to Apple's System Preferences. Select a dictionary and turn on TeX/LaTeX filtering. Then either select this dictionary in TeXShop"s "Show Spelling and Grammar" panel, or select it globally in the "Keyboard" pane of Apple's System Preferences under the Text tab.
  • In Mavericks, the code for selecting a region of the Preview file and the code for magnifying a region of the Preview file broke. This was fixed in an earlier version of TeXShop by using the old code for Lion and Mountain Lion, but using entirely new code for Mavericks. It appears, however, that the old code for Lion and Mountain Lion did not work. Now the Mavericks code is used in all cases and works on Lion, Mountain Lion, and Mavericks.
  • Added Haskell literate script (lhs) as a type that TeXShop can edit, and that can be typeset and syntax colored
  • The Pythontex engine and documentation were slightly altered
  • Rene Fritz provided a new French translation of TeXShop Tips & Tricks
  • TeXShop now contains Latexmk 4.40
  • TeXShop has a menu command to convert tiff illustrations to png. This command uses "convert" if available, but otherwise uses Apple's "sips" program, which has been part of OS X for a long time. Thus the removal of "convert" from MacTeX-2014 will not affect TeXShop.
  • In Multipage mode, each typeset produced a small upward creep in the contents of the Preview window for some users. This is slightly improved, though not yet completely fixed. fixed.
  • In Single Page mode, typesetting produced a momentary flash in the Preview window showing the document's first page, immediately replaced by the current page. This is fixed.
  • New code by Dirk-Willem van Guik to set the "Job Title" for print jobs.
  • The "Show Log File" command has been improved. When this window is first opened, it shows the full log file. Twelve check boxes at the top set various queries to texloganalyser, a script in TeX Live which can pull various pieces of information from the log file. The Redo button then displays this information. For instance, texloganalyser can display all warniings, or all overfull boxes, or all fonts used in a document. Unchecking all boxes and pushing Redo again displays the full log file.
  • If "Show Log File" is selected while holding down the Control key, a dialog appears asking for an extension. If the user types the extension "aux", then the window will display the aux file rather than the log file. Since texloganalyser only works on log files, checking boxes will then have no effect.
  • A new Preference item is provided: "Tags Menu in Menubar". When this item is selected, a duplicate of the Tags menu will appear in the menubar. The new item allows advanced users to hide the Source window's toolbar: use command-T to typeset, selected the appropriate engine using text at the top of the source, use the menu versions of the Macro and Tags menus, and notice that "Split Window" is provided as a menu command in the Windows menu.
  • New versions of the LilyPont and MetaPost engines are provided by Nicola Vitacolonna.

New in TeXShop 3.26 (Nov 6, 2013)

  • The combination of Preference Settings "Configure for External Editor" and "Automatic Preview Update" is now compatible with App Nap in Mavericks. Thanks to Zhiming Wang for pointing out this problem and its connection to App Nap.
  • In Mavericks, the Get Info panel for many applications has a check box to turn off App Nap. TeXShop has no such box. The reason turns out to be that TeXShop is compiled with XCode 5 on Mavericks, and Apple assumes that applications compiled on Mavericks have been fixed to deal with App Nap. TeXShop is now fixed in the approved manner.
  • Michael Sharpe wrote a beautiful document describing Applescript in TeXShop and problems that might be encountered writing new Applescript Macros. I have added that document to the Help Menu, In addition, I added Michael to the list of TeXShop contributors, because his web page contains a number of AppleScript corrections which I have adopted in the Applescript Macros shipped with TeXShop.
  • The following four Macros had problems with recent versions of OS X. Fixed versions by Michael Sharpe and included in this release: Open Quickly, Insert Reference, New Array, New Tabular.
  • There is a new arara engine by Alan Munn in ~/Library/TeXShop/Engines/Inactive/Arara. The arara program is part of TeX Live 2013. Documentation for it is included in the above folder. Roughly speaking, it is a replacement for both latexmk and parts of the TeXShop engine mechanism.
  • Small changes were made in the Japanese localization by Seiji Zenitani

New in TeXShop 3.25 (Oct 21, 2013)

  • Version 3.24 contained a new version of Sparkle, but unfortunately not the latest version. The version in 3.24 didn't have a Japanese localization. Terada Yusuke found and compiled the latest version, now in 3.25.
  • A few users report crashes when quitting TeXShop or closing a file. I was never able to reproduce this crash. Terada Yusuke made a partial fix, so the number of such crashes should diminish.
  • The default preference settings for users in Japan have a small fix for Kpsetool.
  • Some locations referred to the old TeXShop web url, http://www.uoregon.edu/~koch/texshop/texshop.html. These have been changed to the new url, http://pages.uoregon.edu/koch/texshop/texshop.html.
  • In version 3.17, the old Search sync method broke when syncing from the Preview page to the Source page. So it was disabled in version 3.18, and users were told to switch to the modern SyncTeX method. This is still recommended. But the Search sync method is now fixed, and will be used in those rare cases when SyncTeX does not find a match.

New in TeXShop 3.24 (Oct 12, 2013)

  • The Sparkle upgrade mechanism in previous versions of
  • the TeXShop 3 series does not work on Mavericks. This is fixed in 3.24.

New in TeXShop 3.23 (Aug 1, 2013)

  • Fixed one bug. In 3.22, if the user configured TeXShop to use an external editor and then set the hidden preference ExternalEditorTypesetAtStart to YES, the program crashed when opening a file. This is fixed in 3.23.

New in TeXShop 3.22 (Jul 30, 2013)

  • If the option key is pressed, the "Typeset" menu changes to "Trash Aux & Typeset". Selecting it trashes aux and related files before typesetting. Recall that command-T is a keyboard shortcut for "Typeset". Similarly option-command-T is a keyboard shortcut for "Trash Aux & Typeset." This ingenious addition was suggested and made by Paul Smyth.
  • There is a new engine for pythontex in ~/Library/TeXShop/Engines/Inactive. This folder also has a README explaining how to install pythontex, and a tex source file from the author of pythontex which can be used to test the engine and simultaneously see some of the features of pythontex in use.
  • There is a new engine for Sage in ~/Library/TeXShop/Engines/Inactive/Sage. The method of installing sagetex.sty in TeX Live explained in "About Sage" in the Sage directory has also changed. These changes was suggested by Daniel Grambihler and improve the ease of use of Sage in TeX. There were two basic problems with the previous method. First, the TeX file sagetex.sty changed with the version of Sage and thus had to be reinstalled each time Sage was updated. Second, the engine file calls the Sage binary, which is inside the Sage program wrapper. But the authors of Sage distribute the program with a name that includes the version number, so the engine file had to be rewritten whenever Sage was updated. Daniel Gramhihler recommended that we ask users to change the name of the program to "Sage" whenever they update, and that we install a symbolic link to sagetex.tex in TeX Live rather than the actual style file. The result is that when Sage is updated, the engine file automatically finds the new binary and TeX Live automatically uses the new style file.
  • TeXShop now opens and edits files of type fdd.
  • There is a new hidden preference to set the line spacing in the source window: defaults write TeXShop SourceInterlineSpace 1.0 . Only values between .5 and 40.0 will be accepted. The standard line spacing is given by the default 1.0, and double spacing is given by the value 10.0.
  • Nicola Vitacolonna made extensive changes to the Italian localization of TeXShop. Minor changes for other localizations were also made by their localizers.

New in TeXShop 3.21 (Jul 22, 2013)

  • Three bugs appeared when running on OS X Mavericks: the magnifying glass in the Preview window broke, rubber band selecting of a region of the Preview window broke, and sharing the png of the selected region broke. All three are fixed. The code which runs on Mountain Lion and below remains in place, so small changes in behavior will only be seen on Mavericks. The magnifying glass has an interesting history. The original code used an unusual call in Cocoa. It broke in Leopard. This code was replaced by tricky code relying on another unusual Cocoa routine. This broke in Mavericks. The new Mavericks codein 3.21 is straightforward, drawing in a temporary transparent overlay view for both magnification and rubber banding.
  • In Mountain Lion, sharing of a region of the Preview window provides a png of this region. In Mavericks and above, it provides a pdf of the region, which can be resized without losing detail.
  • For a long time we have recommended that users new to TeXShop arrange the location and size of the Source and Preview windows on the desktop as desired. Most users prefer a side by side configuration with the Source window on the left and the Preview window on the right. Then activate the Source window and in the Source menu select ``Save Source Position''. Similarly activate the Preview window and in the Preview menu select ``Save Preview Position''. From that point on, all TeXShop source and preview windows will appear in the selected positions. If you have a portable connected to a large monitor, this configuration works as long as you are attached to the monitor. But when you are traveling, the windows will appear on the screen of your portable, and probably not in ideal positions. TeXShop 3.21 has an extra configuration to fix this. Arrange a source and preview window on your portable screen in ideal position; the portable can be attached to the large monitor at the time. Then activate the source window and in the Source menu select ``Save Source Position for Portable''. Activate the preview window and in the Preview menu select ``Save Preview Position for Portable''. After this step, windows will appear in the desired position when you are connected to the large monitor at home or office, and windows will appear in the desired position on the portable screen when you are traveling. It will do no harm to skip this portable configuration. If you have multiple screens, Maverick has the ability to start applications on any screen. Thus it may be convenient to use the "portable" configuration for a second screen even if you do not have a portable.
  • The following bug was pointed out by Simon C. Leemann. Until 3.21, double clicking on a blank space in the source window selected the space and the words on either side of the space. This is fixed and now only the space is selected.
  • TeXShop allows users to select alternate engines on a file by file basis.
  • The next feature was requested by Alan Munn about a year ago. Apologies for the delay. In the meantime, Mark Everitt wrote an ingenious script to provide this feature. The feature provided by that script is now built into TeXShop. The command BibTeX in the TeXShop typeset menu runs BibTeX; notice that this command has a keyboard shortcut. In Japan, a different program is used instead, so Yusuke Terada provided an item in TeXShop Preferences under the Engine tab to select the program to be run when this menu item is selected. Examples are bibtex, biber, pbibtex, etc. The Preferences item can also be used to add flags to the command.
  • TeXShop 3.21 contains latexmk 4.37.
  • The following bug was pointed out by Basil Grammaticos, and is fixed in TeXShop 3.21. TeXShop has an AutoCompletion feature. If the user begins typing a phrase like \begin{ and then presses the escape key, TeXShop will complete the phrase. If there are several completions, TeXShop will cycle through the possibilities each time the escape key is pressed. These completions are listed in a file which users can edit using the command "Edit Command Completion File" in the Source menu. But if no completions are found, TeXShop reverts to a different autocompletion method which is build into Cocoa. This time, pressing the escape key opens a small window listing all possible completions. Click on one to complete the phrase. These completions come from the system dictionary. The first kind of completion is likely to appear when typing a TeX construction, and the second kind appears when typing an ordinary word or phrase. Basil pointed out that in many programs, the second completion list begins with phrases which already appear in the document. In earlier versions of TeXShop, these nearby phrases were missing. This bug was caused by adding Autocompletion to TeXShop too early. If no completion was found, the code called the dictionary to provide an autocompletion list. Then Apple added a similar call to TextEdit, which first finds nearby phrases and then asks the dictionary for further words. TeXShop now calls that TextEdit routine. TeXShop now has a hidden command to turn off AutoSaving: defaults write TeXShop AutoSaveEnabled NO. WARNING: This command will cause crashes on Lion, so it should only be used on Mountain Lion and above. The TeXShop developers use AutoSave. If you turn off AutoSave, you are entering untested waters.
  • The Sage engine script was revised in TeXShop 3.21, and the Sage instruction document in ~/Library/Engines/Inactive/Sage was rewritten.
  • Ulrich Bauer added a patch to TeXShop 3.17 for users working with a server. This patch was supposed to be inactive unless AutoSave was on. But a mistake in the code caused it to be used by a few people who didn't use AutoSave. This is fixed.
  • Finally, Yusuke Terada provided a number of changes for users in Japan:
  • At the bottom of the TeXShop Preference window, a pull down menu labeled "Defaults" offers to change all preferences to their default values. The first item in this menu is labeled "Regular" and is for most users. The remaining items are for users in Japan, who interact with TeX in a variety of unusual ways. It contains six new items to replace the original two legacy items.
  • An earlier version of TeXShop contained an automatic UTF-8-Mac to UFT-8 Conversion. But this routine converted some Japanese Kanji characters to different glyphs. This is fixed by excluding certain characters from the conversion, as explained in the Unicode Consortium Report
  • http://tug.org/mactex"> http://unicode.org/reports/tr15/#Primary_Exclusion_List_Table.

New in TeXShop 3.10 (May 28, 2012)

  • Two important changes that require user intervention.
  • Go to TeXShop Preferences and select the Engine tab. Press both “Default” but- tons in the pdfTeX section of the pane in the middle of the left side.
  • Go to the Library folder in your home directory. This folder is hidden in Lion, but you can get to it from the Finder’s “Go” menu by pressing the option key while the menu is selected. In this Library folder, there is a TeXShop folder containing several subfolders. Inside TeXShop/New/Templates is a template named “Latex- Template.tex”. Move this to TeXShop/Templates, overwriting the old template with the same name. If you edited this old template, you’ll need to merge your changes with the changes from the new version. 
The key feature of TeXShop 3.10 is removal of the “–shell-escape” flag for the pdftex and pdflatex engines. This flag gives TEX permission to call other programs during typesetting. Unfortunately, the flag allows any shell program to be run, including for instance a short command which erases everything in your home folder. So when the flag is set, you could download a TEX file from a malicious web site, typeset it, and lose all of your files.
  • Pushing the two “Default” buttons in Preferences removes the flags.
  • Contains a new command in the File menu called “Convert tiff.” This item is active when a TeX source window is active. Selecting the item brings up a dialog listing all files and folders in the directory containing the source file. Only tiff files are active in this dialog; others are grayed out. Multiple items can be chosen in the dialog. Pushing the “Convert” button at the bottom of the dialog will create png versions of all selected tif or tiff illustrations.
  • The Convert tiff dialog could be strengthened in the future to provide other graphic con- versions, if there is sufficient demand.
  • The new Latex Template removes the inclusion of epstopdf because it is no longer neces- sary, and removes code to automatically convert tiff files to png using convert because it will not run without “–shell-escape” and has been replaced with the new TeXShop menu command.
  • There is one final change in TeXShop 3.10. For many years, TeXShop has provided two different ways to create projects governed by a master root file with several include files. The earlier method used a menu command Create Project Root. The later more powerful method involves adding ”% !TEX root = ...” to the first few lines of included files. This is the preferred method.
  • Removed the menu item Create Project Root. Old projects using this mechanism will still typeset correctly, but new projects should use the ”% !TEX root = ...” syntax instead.

New in TeXShop 3.06 (Sep 5, 2011)

  • On Lion, the hidden setting SourceWindowAlpha sometimes does not work. Especially, on opening source files which contain "TEX root =", SourceWindowAlpha is always ignored. To fix this issue, I added a method "setAlpha:" into TSTextEditorWindow.m and modified "initWIthContentRect:".
  • On Lion, if you open a source file which contains "TEX root = foobar.tex" but foobar.tex does not exist, the window of foobar.tex is newly created. (On SnowLeopard, an error dialog was displayed in such a situation.) I modified a single line of TSDocument-RootFile.m to fix this issue.
  • Modified TSDocument-Jobs.m in order to allow the BibTeX engine setting to have options.
  • In addition, Terada improved OgreKit 2.1.4 to make it more useful.
  • New OgreKit Find Panel uses the same font as TeXShop source windows. Syntax coloring, paren match highlighting, showing invisible characters and so on work also in OgreKit Find Panel. Auto Completion(Key Binding) and Command Completion also work. The settings of each function (on/off, its color) follow those of TeXShop.
  • When regular expressions are enabled, the background color in the panel changes.
  • Previously, when you open TeXShop source windows in different spaces, pressing Command+F caused switching spaces. By using the new OgreKit.framework, OgreKit Find Panel always appears in the current space.
  • Previously, after using "Replace All" of OgreKit Find Panel, the colors of all characters in TeXShop source window were changed to black. In the new OgreKit.framework, this issue is fixed by sending "NeedsForRecolorNotification" to NotificationCenter after using "Replace All".

New in TeXShop 3.05 (Sep 5, 2011)

  • Before TeXShop typesets, it saves the source document. To do that, TeXShop calls the routine used by the "Save" menu. When AutoSave is activated, this menu item is renamed "Save A Version" and creates a new version of the document visible with the "Browse All Versions..." command. Users of TeXShop 3.01 who routinely typeset often obtained a enormous number of versions, making the "Browse All Versions..." command clumsy to use.
  • TeXShop 3.05 contains significant patches by Ulrich Bauer which fix this problem. TeXShop now saves changes before typesetting, but without creating new versions. This is in line with the design of AutoSave in Lion, which saves changes every few minutes but creates new Versions much less frequently. Roughly speaking, Bauer's patches call autosaveDocumentWithDelegate rather than saveDocumentWithDelegate when the autosave call is appropriate.
  • The program has a patch to TeXShop's syntax coloring routine by Daniel Toundykov. When this routine was made faster and more reliable in TeXShop 2.10, the modification broke the ability to change the background and foreground colors in TeXShop's source window. Toundykov's patch fixes this problem.
  • To change the source background color's Red component defaults write TeXShop background_R 0.25
  • Set background_G and background_B to change the corresponding Green and Blue components.
  • To change the source foregrounds color's Red component defaults write TeXShop foreground_R 0.25
  • Set foreground_G and foreground_B to change the corresponding Green and Blue components.
  • To change the insertion point color's Red component defaults write TeXShop insertionpoint_R 0.25
  • Set insertionpoint_G and insertionpoint_B to change the corresponding Green and Blue components.
  • The folder ~/Library/TeXShop/CommandCompletion now contains a subfolder named GratzerMathCC with an expanded list of command completions. These new completions are by George Gratzer, and are useful when typesetting mathematics. The folder also has a pdf file documenting the additions. To activate the new completions, drag CommandCompletion.txt from the GratzerMathCC folder to the main CommandCompletion folder, replacing the existing CommandCompletion.txt there.

New in TeXShop 3.04 (Aug 11, 2011)

  • Auto Save is automatically activated in TeXShop 3.04. The Preference item to turn it on or off has been removed. Users who intensely dislike Auto Save can switch to an older version of TeXShop.
  • The main reason for the change is that there is a serious bug in TeXShop when Auto Save is off. Without Auto Save, opening a graphic file e.g., a jpg, pdf, png, tiff, or eps file, also opens a blank source file with the same title. This also occurs when opening a document for an external editor, or opening a dvi file. This problem does not occur when Auto Save is on. Thanks to Di Xiao for tracing this bug to Auto Save.
  • Notice that Apple programs like TextEdit also automatically activate Auto Save on Lion.
  • Version 3.04 contains a fix for "Show Full Path" in Lion, by Yusuke Terada.
  • Added "md" to the file types TeXShop can edit, and typesetting engines can process. Such "markdown" files can be processed by pandoc and converted to latex, epub, and pdf. See http://johnmacfarlane.net/pandoc/
  • The German localization has a different key equivalent for the menu command which enlarges the font in the source document.
  • When the Preference Item for Arabic, Hebrew, and Persian is activated, lines containing one of these languages are right justified. The new rule is that a line is right justified if its first, second, or third letter is in one of these languages. For instance, this rule right justifies a line beginning with "\" containing Persian letters, but does not right justify the command "\section{ ... }" even if the section title is in Persian.
  • There is a hidden preference to change this behavior. If the following command is entered in Terminal, a line containing any characters in Arabic, Hebrew, or Persian will be right justified: defaults write TeXShop RightJustifyIfAny YES
  • When the Preview window is taken full screen, it switches into double page mode. The user, however, can switch it into single page mode using a menu command. This is useful when displaying Beamer documents. If the window is taken out of full screen mode, and later back into it, the display mode change made by the user will be remembered. TeXShop now remembers the mode change if it is made using a contextual menu rather than a menu in the menu bar. Thanks to David Poole for pointing out this bug.

New in TeXShop 3.03 (Aug 5, 2011)

  • Choosing the "Print ..." menu with the source window open started a print job which understood "Page Setup" changes. Choosing the same menu with the preview window open started a print job that ignored "Page Setup." The print dialogs for these two operations were different: one was a standalone dialog and one was a drop-down dialog in a window. Both dialogs might be open at once on the screen. This problem is fixed.
  • The hidden preference defaults write TeXShop TagSections NO turned off all tags, rather than just tags for sections and subsections. This is fixed.

New in TeXShop 3.02 (Aug 3, 2011)

  • The program is again called "TeXShop" rather than "TeXShop-64". Renaming the program was a mistake because it broke several Applescript macros.
  • TeXShop's Sparkle upgrade mechanism still upgrades within the 2.** series and within the 3.** series, but not from one series to the other. A major reason for renaming the program was to obtain this result, but it turns out that renaming is not necessary for it to work.
  • Note that MacTeX-2011 contains TeXShop 2.43. If you put TeXShop 3.02 in /Applications/TeX and later upgrade to MacTeX-2011, the program will be downgraded to TeXShop 2.43. If you haven't yet upgraded, it might be best to put TeXShop 3.02 in /Applications.
  • In TeXShop 3.00 and 3.01, line numbers do not scroll when using overlay scrollers. They do scroll with legacy scrollers. If the source window is split, the top portion scrolls with overlay scrollers.
  • Debugging experiments show that this is a Lion bug. We can reproduce it with a small 15 line program.
  • TeXShop 3.02 has an ingenious patch by Yusuke Terada to temporarily fix the problem. TeXShop has a hidden preference to turn this on; by default it is on. To turn the fix off defaults write TeXShop FixLineNumberScroll NO
  • We hope that ultimately Apple will fix the bug. When they do, the patch will be turned off automatically.
  • Automatic tagging of "% \chapter" in docstrip didn't work. Now it does.
  • All three "Find" methods --- OgreKit, Find Panel, Find Bar work for both the source and log windows. The OgreKit method also works for the console window, but (at least temporarily) the other methods don't.

New in TeXShop 2.43 (Jun 30, 2011)

  • Forgot to update a hidden file in the distribution. Consequently, users did not get the updated ConTeXt engines in ~/Library/TeXShop/Engines/Inactive. This is fixed in 2.43.

New in TeXShop 2.42 (Jun 29, 2011)

  • TeXShop 2.42 has new code to process SyncTeX. The new code is required for TeX Live 2011, whose release is imminent, and works with earlier TeX distributions as well.
  • Tags have been extended slightly to deal with dockstrip document. Thus the tags menu now recognizes:
  • % \chapter
  • % \section
  • % \subsection
  • % \begin{macro}
  • % \begin{environment}
  • Both the log file and the console are shown using the document's encoding rather than MacRoman encoding. The primary advantage of this change is that users with Unicode source files will see unicode characters written correctly in the log and console output.
  • TeXShop 2.42 contains latexmk 4.24.

New in TeXShop 2.41 (Apr 26, 2011)

  • The old Auto Completion facility in TeXShop has been given a more understandable name: Key Bindings. All features remain the same. Internally in code, the feature is still called "AutoCompletion", but interface elements have been changed to the new name.
  • The facilities Key Bindings and Command Completion have been made more prominent in the interface. The Source menu has a new "Key Bindings" menu and the "Command" menu just below it has been renamed "Command Completion". Both of these items have submenus. The Key Bindings menu has submenus
  • Toggle On/Off
  • Edit Key Bindings File...
  • and the Command Completion menu has submenus
  • Add Word
  • Marks
  • Edit Command Completion File...
  • The commands in the Command Completion menu were present in earlier versions and have been rearranged so make the two facilities parallel. The Edit Key Bindings File... item is new, bringing up a new editor by Yusuke Terada. Thus users no longer need edit a configuration file in ~/Library/TeXShop. The "Toggle On/Off" item turns key bindings on or off on a file by file basis, duplicating functionality previously provided by an optional toolbar source item. The old Preference Panel item turning Key Bindings on or off remains, setting the default when files are first open.
  • A new "Close Current Environment" item in the Source Menu closes the open environment nearest the cursor. This feature will remain in future versions of TeXShop, but it is likely that the menu will disappear in the future and users will access the feature using an item in Key Bindings, Auto Completion, or Macros, because these facilities already have short commands which insert text into the source code.
  • The default values for "pdfTeX" and "TeX and DVI" under the Engine tab in the Preference dialog have become too long to be shown in the dialog. So instead, button are provided which insert these default values into the appropriate fields. After doing that, the values in the fields can be edited, of course.
  • If a portion of the source code is selected and then the Statistics panel is opened, the panel shows statistics for that selection, rather than statistics for the entire source file.
  • TeXShop 2.41 contains latexmk 4.23a.

New in TeXShop 2.40 (Apr 18, 2011)

  • When working with a project containing a root file, windows would sometimes move as new chapter source files were opened. This is fixed.
  • TeXShop has a hidden preference, "RedConsoleAfterError", which colors console output red after an error occurs in the source. This preference stopped working several versions ago. It again works.
  • A few users disliked the temporary red color of parentheses in the new parenthesis matching code, but didn't want to turn parenthesis matching completely off because they wanted the matching parenthesis to blink. These users can now change the temporary parenthesis color in the Preference Panel.
  • Hidden preference items were added to change all of the colors used in the new 2.38 additions by Yusude Terada: the temporary parenthesis color (default is magenta), the highlight color for text between matching parentheses (default is yellow), and the color of invisible characters when shown (default is orange).On Snow Leopard and above, matching braces are briefly marked with a yellow badge over the brace; this fulfills a request for great visibility of the matching characters. The badge can now be turned off with a hidden preference: defaults write TeXShop brieflyFlashYellowForMatch NO .

New in TeXShop 2.39 (Apr 13, 2011)

  • Some languages use extensive diacritical marks, including more than one mark for each letter. For these languages, there are two conventions about the order that the main character and diacritical marks are written. The two conventions are
  • UTF-8-Mac = NFD = Normalization Form Decomposition
  • UTF-8 = NFC = Normalization Form Composition
  • A major problem is that the two forms look the same on the screen, but typeset differently (or in some cases not at all). Users in Japan sometimes copy and drag UTF-8-MAC text to TeXShop, but then find that they cannot typeset. So Yusuke Terada provided automatic conversion. This breaks Hebrew and Arabic typesetting.
  • In TeXShop 2.39, a new Preference item under the Miscellaneous tab turns this automatic conversion on. The preference item should be turned on by users in Japan, but most other users should leave it off.
  • The program comes with French translations by Rene Fritz of Herbert Schulz' two documents on Command Conversion and TeXShop Tips and Tricks.
  • Minor improvements have been made in the French, Spanish, German, and Chinese translations.

New in TeXShop 2.38 (Mar 30, 2011)

  • Show Invisible Characters: TeXShop can now show ordinary space characters, Japanese full width space characters, tab characters, and newline characters visually in the source window. Preference items turn each choice on or off, so users can display only some items if desired. A Preference item determines whether invisible characters are shown when files are first opened, and a menu item then toggles invisible characters on or off on a file-by-file basis.
  • Much better handling of parentheses: { and }, ( and ), [ and ], and < and >. When such a pair is closed, the matching opening parenthesis is clearly marked, and the entire section between these parentheses is colored yellow. This yellow color remains until another character is typed, and then it vanishes. Thus it is much easier to close a parenthesis and then stop and make sure the scope of that parenthesis pair is correct. By default, this feature is on, but it can be turned off in Preferences.
  • If a parenthesis is typed with not matching pair, the computer beeps, or if desired the screen flashes. This feature is off by default and must be turned on in preferences.
  • The parenthesis matching settings are controlled by five preference items, which can be turned on or off individually. The first item, "Highlight Enclosed Characters", marks text between matching parentheses in yellow when a parenthesis is closed. The yellow vanishes when additional characters are typed. The second item, "Show Indicator in Moving", activates this feature when using arrow keys to move through the text, so when the active position becomes a parenthesis, the area it controls is shown in yellow. The third item, "Blink Highlight", causes a matching parenthesis to switch temporarily to red and then blink back to its natural syntax color. When this item is off, the matching parenthesis will remain red until a new character is typed. The last two items, "Beep for Isolated Parens" and "Flash Back for Isolated Parens", cause the computer to beep, or momentarily flash the source window background, when a parenthesis is typed which has no match.
  • Two new items were added to the Window menu: "Next Source Window" and "Previous Source Window". These cycle through source windows without changing the Preview Window. This is particularly useful in a project which inputs multiple source files.
  • The default preference setting which determines the position of source windows when first opened is "Remember last position on close". But an introductory movie in TeXShop's Help menu suggests changing this preference setting to "All windows start at fixed position". Because this change is recommended, the original "Remember last position on close" code in TeXShop did not work well.
  • Terada has improved the default greatly. New windows now appear cascading down and to the right as recommended by Apple's Interface Guidelines, rather than on top of each other. Try this method to get a feel for Terada's improvement. Similar remarks apply for positioning of Preview windows.
  • Note that if you use the "All windows start at fixed position" setting, Terada's changes do not apply and TeXShop works as it always has.
  • TeXShop uses the default Cocoa behavior for window titles. Before considering Terada's modification, recall this default behavior. Suppose a source file is titled "Sample.tex". Then the title at the top of the source window will read "Sample.tex" and the title at the top of the preview window will read "Sample.pdf". If you click on either title while holding the Command Key down, a pull down menu will appear listing the various components of the full path to the file. Choosing one of these items will open the corresponding folder in the Finder. In this way, it is very easy to go to the actual source or output file in the File system. Window titles are also listed in TeXShop's "Window" menu. Selecting a window title there will bring the corresponding window to the front.
  • All this is fine unless your work flow includes the following sort of action: suppose you have folders named Sample1, Sample2, Sample3, and Sample4, and suppose each folder contains a file named Data. Suppose that your master document uses Sample1/Data and Sample2/Data. If your master and both data files are open on your desktop, you may want to switch from one data file to another using the items in the Window menu. But these items will both be named "Data". It would be much better if the Window menu listed "Sample1/Data" and "Sample2/Data" so you could keep them straight.
  • Terada's change makes this possible. An optional toolbar item named "Show Full Path" with a checkbox is provided for the source window; this item must be added using "Customize Toolbar" and isn't in the default toolbar. Checking this item will cause the source and preview windows to list the full path to files rather than just the title of the files. Moreover, this full path will be listed in the Window menu.
  • Full path can be turned on or off on a file by file basis, so some files can show the full path while others show only the window title. The default checkbox state in the toolbar of a newly opened window will be the state last set by the user. Thus a user who always wants the full path displayed can check the item once and then forget it, even when quitting and restarting TeXShop. If that user changes their mind, uncheck the item once and forget it. But some users will want to turn on full paths for some files and turn it off for other files.
  • A new menu item in the TeXShop Help menu is provided, named "Open Style File". This item will open any style file in the texmf trees visible to TeX and LaTeX. This command uses "kpsetool" to find such style files, but the tool and its parameters can be changed in a new Engine file preference.
  • Syntax coloring has been changed slightly. Previously, the @ symbol ended a TeX command, so "\@this" would only color "\@". But now the command is assumed to continue until a break character, so for example, every character of the following line will be colored: \ifx\@@input\@undefined\let\@@input\input\fi
  • This will mainly affect users editing style files.
  • We suspect that most users won't notice the change, and those who notice will like it. But the old behavior can be restored with a hidden preference: defaults write TeXShop MakeatletterEnabled NO
  • A minor bug fix to the "Uncomment" command: previously, TeXShop removed empty uncommented lines, but now it doesn't.
  • A new preference "BibTeX Engine" is provided listing the default BibTeX engine. Most users will list "bibtex" as the default. This preference is mainly present for users in Japan, where users have access to bibtex, jbibtex, pbibtex, and ubibtex
  • New hidden preference items named "backgroundAlpha" and "ConsoleBackgroundAlpha" are provided. For example, the following commands will provide source windows with translucent backgrounds: $ defaults write TeXShop SourceWindowAlpha 0.9 $ defaults write TeXShop backgroundAlpha 0.6
  • (Actually my experiments show that both of these preference items are irrelevant, and the old SourceWindowAlpha and ConsoleWindowAlpha, documented in TeXShop Help, are enough to make transparent windows. I'll keep this item in the change document 'just in case.' -- Dick Koch)When "utf export" is enabled to support pTeX in Japan, UTF-8-Mac encoded text is automatically converted to UTF-8 encoded text.
  • In addition to the work of Terada, TeXShop 2.38 has the following changes:
  • Version 2.38 contains a new Chinese localization by Linus Yang, from Fudan University in Shanghai, China. Thanks!
  • The Help menu now contains a link to a wonderful document by Herbert Shultz called "TeXShop Tips & Tricks." This document describes a number of useful TeXShop features in much more detail than the Help panel, including sections on working with large documents, pdflatexmk, editing shortcuts, auto completion, and command completion.
  • The following bug is fixed: when a TeX source window is closed, the pdf Preview window is also closed. In previous versions, the Preview window was not deliberately closed in code, but it closed anyway because closing a document releases its nib file. This may have caused crashes in a small number of cases. In Apple's forthcoming Lion system, the corresponding crash always happens. But version 2.38 of TeXShop fixes this problem.
  • In short, this fix may help stability on earlier systems, and is required for Lion.
  • The next addition is by Alvise Trevisan. In previous versions of TeXShop, if you type begin{itemize} (or \begin{}} or a number of other typical fragments) and then push the Escape key, the corresponding \end{itemize} will appear on the following line and it is only necessary to fill in the intermediate lines. Unfortunately, if the opening \begin{itemize} is indented, the indentation is not preserved for the corresponding \end{itemize}. But with Trevisan's modification, it is preserved.
  • Herb Schulz adopted Trevisan's code to provide a similar preservation of indentions throughout Command Completion.
  • The ConTeXt-MKIV.engine and the document "About the Inactive Folder" in TeXShop/Engines/Inactive have been revised to indicate that users must run the following command ONCE in Terminal before using this engine: luatools --generate
  • Added the file extensions bbx, cbx, and lbx to the list of files which TeXShop can edit, and activated syntax coloring for such files.
  • Added the extensions .bcf and .run.xml to Files->Trash Aux Files. This is needed to switch from biber to bibtex in latexmk.
  • Alan Munn updated the help files advanced_otherfiles, advanced_syntaxcolor, basic_preferences, and advanced_personaltetex. The revisions document a couple of obscure features, but the key point is that Munn's formatting makes these files easier to read. It also introduces some inconsistency in the appearance of help pages, but we hope the remaining pages will be reformatted in the same way over time.
  • The program contains version 4.23 of Latexmk.
  • For some time, TeXShop has contained a Substitutions submenu in the Edit Menu. This menu allows users to activate a number of operating system enhancements for inputting text: Smart Copy/Paste Smart Quotes Smart Dashes Smart Links Data Detectors Text Replacement
  • Consult Apple documentation for details.
  • Until version 2.38, users had to activate these items each time they opened a file. In TeXShop 2.38, the last choices a user makes are remembered and used when new files are opened, even after quitting TeXShop.
  • Warning: Operating system 10.4 (Tiger) only supports smart Copy/Paste. System 10.5 (Leopard) adds support for smart quotes and smart links. The remaining items are only available in system 10.6 (Snow Leopard) and beyond. All items are standard parts of Apple's text system, and some may not be appropriate when editing TeX/LaTeX documents.
  • TeXShop 2.38 adds a new magic marker to select the spelling dictionary; this idea was first introduced in the latest release of TeXworks. Suppose a source file is written in German and one of the first twenty lines in the file is % !TEX spellcheck = de-DE
  • Then the spell checker will use the German dictionary with this document, but will use the default spelling dictionary for all other open documents without this line. TeXShop reads this line when opening the file, so when the magic marker is created, the file must be saved, closed, and reopened before TeXShop will use it. If a project uses several include files, each include file must contain the line.
  • When using this command, Apple dictionaries are specified using either the ISO 639-1 or ISO 639-2 standards for determining language designations, and the ISO 3166-1 standard for regional designations. The regional designation is used to distinguish between a language as used in one part of the world and that same language in another part of the world. For instance, French is "fr" in ISO 639-1 and "fre" in ISO 639-2; French (France) has regional designation "FR" and French (Canadian) has regional designation "CA". So to select a French dictionary in Canada, "spellcheck = fr" will work, and "spellcheck = fr-CA" would be even better. Since these are ISO standards, similar commands will work on other platforms, although TeXShop only runs on the Mac. The language standards are described in http://www.loc.gov/standards/iso639-2/php/English_list.php
  • and the regional standards are at http:www.iso.ch
  • although this second site is difficult to use.
  • Specifying a cocoAspell dictionary is slightly tricky. The Spelling Preference Pane installed by cocoAspell lists all cocoAspell dictionaries, including active dictionaries. Names in this list are the names to be used following "spellcheck". When these dictionaries appear in Apple's list in the Language & Text panel, they often have different names. Those names don't work.
  • For example, there is a ocoAspell dictionary named German. If the German dictionary is selected in the Spelling Preference Panel, then the resulting dictionary will be listed in Apple's panel as Deutch (Aspell). In this case % !TEX spellcheck = de
  • will select Apple's German dictionary and % !TEX spellcheck = German
  • will select the cocoAspell German dictionary, while % !TEX spellcheck = Deutsch (Aspell)
  • will select nothing.
  • Similarly there is a cocoAspell dictionary named German (Germany) in the Spelling Preference Pane. To select it, the appropriate command is % !TEX spellcheck = German (Germany)

New in TeXShop 2.37 (Sep 10, 2010)

  • TeXShop 2.37 is an extremely minor upgrade.
  • TeXShop 2.37 contains an updated Japanese localization by Seiji Zenitani.
  • TeXShop has latexmk 4.18; it has a Quick Start Guide for latexmk in ~/Library/TeXShop/Engines/Inactive/Latexmk.
  • Dick Koch's web address changed from http://www.uoregon.edu/~koch/texshop to http://pages.uoregon.edu/koch/texshop.

New in TeXShop 2.36 (Jul 10, 2010)

  • TeXShop 2.35 is an internal version never publicly released.
  • Added a new preference item which switches between the tab and escape keys as the trigger for command completion.
  • Recall that complicated commands entered with command completion include "marks" where the various command arguments occur. The Completion/Marks menu contains menu commands to go to the next mark, or to the previous mark. These menu commands have keyboard shortcuts which have not been changed. But TeXShop 2.36 adds extra keyboard shortcuts for these two commands: option-escape to go to the next mark control-escape to go to the previous mark When the tab key triggers command completion, these shortcuts become option-tab to go to the next mark control-tab to go to the previous mark
  • Keyboard shortcuts always cause trouble for some users, who may have third party utilities which already use those shortcuts. So there is a hidden preference to turn off the new shortcuts for next mark and previous mark: defaults write TeXShop CommandCompletionAlternateMarkShortcut NO
  • Added a menu item following the File/New command: New from Stationery... Selecting this item brings up a list of stationery: Beamer, AMS-Article, Letter, Project, ProjectChapter, etc. Each item is listed in the left column and briefly described in the right column. Selecting an item opens a new document with the contents of the chosen stationery. This document is not associated with the stationery file on disk, so pushing the typeset button asks the user to save the document and suggests as a default name "Untitled", exactly as if the document had been created by the New command. Version 2.36 contains rather rudimentary stationery files. I'm hoping users will contribute better and more robust alternatives for future versions.
  • Stationery files are stored in a new folder: ~/Library/TeXShop/Stationery. This folder works like all other folders in ~/Library/TeXShop. Users can remove files from the folder, edit files currently there, and add additional files. To recreate the default folder, entirely remove the Stationery folder and restart TeXShop. Each stationery document ends with extension ".tex". If the folder contains a file with the same name, but extension ".comment", then this file is assumed to contain a one line comment about the file, which will appear in the right column of the stationery dialog. Thus the folder contains both Beamer.tex and Beamer.comment. This "comment" file is optional. An easy way to create a comment file is to duplicate an existing file, rename it, and edit its contents with TeXShop. The stationery mechanism is a variant of the Templates menu in TeXShop, which is unchanged. My hope is that the default stationery menu will lead new users more quickly to the standard documents almost everyone eventually creates. Hence I intend to keep the default collection fairly small. Users are free to add additional stationery to the mix.
  • Version 2.36 contains a slightly revised LilyPond engine.
  • Version 2.36 contains a new default ConTeXt-MKIV engine, created after consulting Hans Hagen at TUG-2010.

New in TeXShop 2.34 (Jun 4, 2010)

  • Removed keyboard shortcut for "hard wrap", since pushing it by mistake can have drastic consequences.
  • Added new Edit menu items: Substitutions, Transformations, Speech. These are standard Apple items, which automatically add these features to the editor. However, part of this addition is not complete. In a future version, there will be Preference items to preserve the user's choices for smart copy/paste, smart quotes, smart dashes, smart links, data detectors, and text replacement. Currently, choices are temporary while the document is open.
  • New version of Latexmk, 416a.
  • LuaLatex is now a default engine, since LuaTeX has progressed to a system which can be used for real work. But only new users will see the change; older users must drag LuaLatex from the Inactive folder to the active area.
  • The Sage engine and documentation are slightly improved.
  • Fixed the problem of offset line numbers in the German localization.
  • Added the Stex extension as one TeXShop can edit and syntax color; this is used when working with R.

New in TeXShop 2.33 (Mar 3, 2010)

  • TeXShop 2.32 is an internal version never publicly released.
  • The major change in 2.33 improves the upgrade process. In previous TeXShop versions, it was necessary to regenerate various folders in ~/Library/TeXShop to get new defaults. While this method still works, the changes make regeneration unnecessary. There are three aspects to the change:
  • TeXShop now automatically updates three subfolders of ~/Library/TeXShop: bin, Engines/Inactive, and Scripts. This upgrade does not remove files added by the user; it only writes new files and folders or updates existing files and folders known to TeXShop. Note that active engines in ~/Library/TeXShop/Engines are not updated; only the inactive folder is updated.
  • TeXShop adds a new folder, ~/Library/TeXShop/New. This folder can be totally rewritten during an update.
  • Finally, TeXShop Help contains a file named "About This Update," which is rewritten for each update, explaining the exact steps needed to obtain new defaults.
  • As an example of how these changes are used, consider the case when there is a new default Macro. It is no longer necessary to regenerate the Macros folder to obtain this Macro. Instead, the New folder will contain the new macro. Use the Macro Editor's "Add Macros from File..." item to add the macro, and drag it in the Macro Editor's list to an appropriate spot.
  • Another example: the latexmk engine is often upgraded, but the upgrade usually changes support files in bin rather than the engine itself. From now on, such upgrades will be made automatically without user intervention. Fairly often, additional engines are added to the Inactive folder during upgrades. These will automatically appear without user intervention. For version 2.33, it is important that latexmk users read "About This Release" so they will make a few changes needed to automate future upgrades.
  • One technical detail: the New folder contains a hidden file listing the version of TeXShop which created the most recent update. TeXShop will only update files in ~/Library/TeXShop if it is a later version than the version listed in this hidden file. So TeXShop doesn't update at each new start, and old version can be run without changing ~/Library/TeXShop.
  • Improved Spanish localization by Juan Luis Varona.
  • Fixed a bug reported by Tomas Zahradnicky: when a user attempted to print a file which had not been typeset, a dialog appeared asking the user to typeset first. The dialog has an "OK" button, but clicking the Close icon instead caused a hang. Fixed.
  • Fixed a bug reported by Micael Sharpe: searching in the Preview window and afterward closing the source window sometimes caused a crash. Fixed.
  • New code by Scott Lambert to improve the Comment/Uncomment and Indent/Unindent code.
  • Added fdb_labexmk to the extensions automatically removed by "Trash AUX Files", to improve the operation of latexmk.
  • The flip code used by some default macros is now a universal binary.

New in TeXShop 2.31 (Feb 22, 2010)

  • Goto Error is improved. It now highlights the text just before the error (as reported by TeX in the console) rather than an entire line containing the error. When searching for errors, users should first look at the spot where the highlighting ends. This change was requested by users who let TeXShop automatically soft wrap lines; to TeX, these source files appear to contain whole paragraphs rather than individual lines. In earlier versions of TeXShop, Goto Error highlighted these entire paragraphs, making the error hard to spot.
  • Fixed the notorious "toolbar incorrectly drawn bug". This bug occurred when the Preview toolbar contained the "mouse mode matrix" but this matrix was forced offscreen when the Preview window appeared because the window was too narrow to contain it. In that situation, the tools in the toolbar were drawn too high and partially cutoff, or so high that they were invisible. The bug is fixed.
  • Fixed an obscure bug reported by Jean-Michel Bismut: he got intermittent crashes when closing the Preview window with command-W or the red close circle. The bug mainly appeared when TeXShop was used with an external editor. Fixed.
  • Fixed a bug reported by Cesar Rivas: when the Default Page Style was "Single Page", the toolbar scale reported the wrong value, and thus zoom in and zoom out started from the wrong values. The bug fix solved another problem: previously if the user picked a mouse tool like "magnify" that was not the default and then typeset, the toolbar would still show the magnify tool active, but the actual tool would change to its default value. Fixed.
  • TeXShop has a new SageTeX engine by Dan Drake. This engine is easier to install because SageTeX is now part of Sage rather than an extra download. The engine no longer reruns Sage when typesetting a source in which the sage commands have not changed.
  • For a brief time, SageTeX was part of TeX Live 2009. This is no longer true because SageTeX is closely tied to Sage and needs to be updated when Sage is updated. SageTeX users should carefully read the short document in ~/Library/TeXShop/Engines/Inactive/Sage before installing the new engine; the document explains the simple step required when upgrading Sage.
  • The internal TeXShop script which calls ConTeXt was modified to make the Abort command work. Although it worked for other engines, it recently stopped working for ConTeXT. Steffen Wolfrum reported the bug and was instrumental in finding a fix. The broken script was a tcsh script, and Wolfrum discovered that Abort worked when the internal script was rewritten as a bash script.
  • Added a new menu item, "Abort Typesetting", with a keyboard shortcut. This makes it possible to call abort from the keyboard without using the mouse. The shortcut works regardless of which window is active.
  • The pdf file is now closed when the Preview window is closed. In version 2.30, the entire document had to be closed to close the pdf file. In 2.29, TeXShop itself had to quit to close the file. So we are making incremental progress.
  • Improvements in French localization by Rene Fritz.
  • Slight improvements in ConTeXt and MetaPost help sections.
  • Slight improvements in latexmk.
  • Better error detection in the "Paste Spreadsheet Cells" macro.
  • The default KeyEquivalents.plist in ~/Library/TeXShop/Menus was defective; among other things, it had comments within comments, which is illegal. The file has been fixed.
  • KeyEquivalents.plist doesn't actually change any keyboard shortcuts because the changes it illustrates are commented out. But users can change TeXShop's default keyboard shortcuts by editing the file. However, there are some limitations. The OgreKit Find Panel menu items are handled in a special manner and cannot be changed with KeyEquivalents. The Macro menu items are also handling in a special way and cannot be changed with KeyEquivalents, although they can be changed with TeXShop's built-in Macro Editor. Finally, File menu items are sometimes overridden by Cocoa, so shortcut changes in that menu can have unintended consequences.

New in TeXShop 2.30 (Feb 3, 2010)

  • TeXShop has a new item in the Help Menu named "About This Release." This item will be revised for each release, and explains any steps needed to activate new features. Users should form a habit of reading this short file after upgrading.
  • New users get the latest defaults and can ignore the step. But older users may need to make small changes in Preferences, and regenerate certain subfolders in ~/Library/TeXShop. These locations allow users to modify the default behavior of TeXShop, so the program does not automatically update them because it does not want to deactivate user choices behind the user's back.
  • This version fixes a crucial crash bug involving synctex, searching pdf documents, and related notifications. Some users ran into the bug when attempting to search pdf documents. Others had crashes immediately after syncing. Many users avoided the crash entirely. Now it should be fixed for everyone.
  • TeXShop has a "Goto Error" menu command, mirrored on the console window. Until this version, the command only worked on individual files. But the command now works with projects controlled by a root file. If an error occurs in an included source file not open on the desktop, that source will open and the line with the error will be highlighted. This change requires a new flag in all engines: " --file-line-error". In TeXShop default preferences, this is set for pdftex, pdflatex, simpdftex, and xetex. If users wrote other engines, they will need to add the flag for these.
  • New MetaPost and MetaFun engines by Nicola Vitacolonna are included. The engines are called "nv-metapost" and "nv-metafun." To prepare for these engines, the operation of TeXShop when using MetaPost and MetaFont has been revised. The built-in MetaFont command has been removed entirely; Vitacolonna's nv-metapost works much better for that purpose. The buildin MetaPost command has been retained for compatibility with projects by current users. This command just calls mpost directly. The preference item which switched this command between MetaPost and mptopdf has been removed.
  • Users working with MetaPost for illustrations, or MetaFont, users will want to use nv-metapost and nv-metafun instead. Minimal documentation for these commands is available in TeXShop Help's advanced section on ConTeXt and MetaPost. But a more extensive README by Vitacolonna is available in ~/Library/TeXShop/Engines/Inactive/MetaPost.
  • Very important improvements to command completion by Herbert Schulz are now included. These improvements allow "tags" in completed commands with parameters. When a command is completed, the entire command, including tags where the required parameters go, appears in the source file, and the first tag is selected. The user can type the parameter, replacing the tag. A keyboard shortcut then activates a new menu item which jumps to the next tag. The user can thus fill in all parameters without removing their hands from the keyboard.
  • A greatly expanded command completion file by Herbert Schulz is included in this release. For detailed instructions, read the document about command completion written by Schulz and available in ~/Library/TeXShop/CommandCompletion.
  • A new "Paste Spreadsheet Cells" macro by Alan Munn has been added to the Macro menu. This wonderful macro allows users to copy an array of cells from a spreadsheet and paste the array, properly formatted with TeX commands, in the TeX source code. Munn wrote instructions for this command, which are in TeXShop Help's Macro section, in Default AppleScript Macros.
  • A new latexmk engine, version 4.13a, is included.
  • The right justification feature introduced in TeXShop 2.28 for Arabic, Hebrew, and Persian has been improved. Now a line must start with a character from one of these languages before it is right justified. Thus lines containing TeX commands with embedded Arabic, Hebrew, or Persian will still be left justified.
  • Added Windows Latin 1 to the list of supported encodings.
  • Added "ctx" to list of extensions which are regarded as TeX files and can be syntax colored and typeset.
  • In 2.29, closing a document left the associated pdf file open until TeXShop quit. This bug is fixed; the pdf file is closed when the source document closes.

New in TeXShop 2.29 (Dec 26, 2009)

  • There are many changes in TeXShop Help, to remove all references to teTeX, to add a help section on encoding, and to separate the section on Engine files into one section on General Engine Files and a second section on XeTeX.
  • There are slight improvements in the Program, Encoding, and Root macro files by Ramon M. Figueroa-Centeno.
  • The -synctex=1 flag was added to the XeTeX and XeLaTeX engines.
  • A bug was fixed which broke SyncTeX when filenames contained unicode characters.
  • Trash AUX files now trashes .synctex and .synctex.gz files.
  • The script for mptopdf changed to much more extensive script by Nicola Vitacolonna. This script, and one for metafun, are in the inactive folder of the Engines folder. But the metapost script is also used internally, replacing the original naive script.
  • An extra source preference named "Arabic, Persian, Hebrew" has been added. This item only works if Syntax Coloring is active. When the new item is activated, lines in the source which contain characters from these languages --- i.e., characters in the range 0x0590 - 0x06FF -- are right justified on the screen. This does not affect actual typesetting of the file.
  • Removed command line equivalents for "Bold" and "Italic".
  • Removed "package" check for file types tex, ctx, bst, drv, abc, ly, texi, Rnw. Now no file types have "package" checked. The reason this obscure bug got into the code is unclear; it caused some folders on the desktop to appear as packages for TeXShop.
  • There are a small number of German localization corrections.
  • The keyboard command to trash AUX files also works if the console or preview window are active.
  • If the shift key is held down while selecting "Trash AUX Files", the pdf preview file is also trashed. This key can be held in combination with option or not, depending on the choice of aggressive trash. However, aggressive trashing with the shift key down will NOT remove other pdf files (!)
  • The code for SyncTeX is revised. TeXShop used to call a script in TeX Live by Jerome Laurens to interprete .synctex files. This script changed in TeX Live 2009, breaking synctex operation. Now TeXShop embeds the script in TeXShop itself (as it should have from the beginning), making it immune to changes in the script. This makes it possible for Laurens to improve the script, and then for TeXShop to adopt these changes as its code is revised.
  • In the original TeXShop for TeX Live 2009, the embedded code didn't have POWERPC code, causing crashes on powerpc. This is fixed. The INTEL version of the embedded file also has information to interprete files produced by dvips.

New in TeXShop 2.26 (Mar 17, 2009)

  • The TeXShop/Engines/Inactive folder contains two scripts from Daniel Becker which call texcount to count active words in a TeX source file. These engines were promised in 2.25 but erroneously omitted. They are in 2.26. To obtain them, quit TeXShop and move the entire Engines folder from ~/Library/TeXShop to the Desktop. Then restart TeXShop. TeXShop will create a new Engines folder. Merge in any changes you have made in the old Engines folder on the desktop to the new folder.
  • Juan Luis Varona sent new Program and Encoding macros which display the various choices, so it is not necessarily to look up the wording of these choices. A few days later, Ramon M. Figueroa-Centeno send similar but fancier macros. Ramon's macros are now in TeXShop. To obtain them, quit TeXShop and move the entire Macros folder from ~/Library/TeXShop to the Desktop. Then restart TeXShop. TeXShop will create a new Macros folder. Merge in any changes you made to the old Macros on the desktop to the new copy, using the Macro Editor.
  • A memory leak introduced by the code to split the Preview window in 2.25 is fixed. The bug was similar to the old flaw in PDFKit which caused memory to be gradually used up when typesetting a document many times, but this time the bug was caused by me.
  • A bug in the zoom code for the preview window when using multiple monitors is fixed.
  • A bug which caused TeXShop to ignore a "% !TEX TS-program = ..." command when typesetting from a file with an associated root file is fixed.
  • The French localization is improved.
  • A localization error caused the "Split Window" icon on the Preview Window toolbar to display strange text. This is fixed.
  • A bug caused the Preview Window's toolbar to vanish temporarily if the user tried to move certain text portions of the toolbar. This is fixed.
  • One of the keyboard zoom shortcuts acted only on the top portion of the Preview window when split. This is fixed.
  • The TeX mdimporter code distributed with TeXShop in 2.25 contained only i386 code. Now it contains code for both PPC and i386.

New in TeXShop 2.25 (Feb 27, 2009)

  • Split window, previously available for the source window, now also works for the Preview window. Buttons and tools which interact with the Preview window are applied to the active portion of the Preview window when split. To activate the other portion, click on it. To avoid cluttering the interface, the active portion of the Preview window is not marked. Note that it is possible to use different Display formats in the two views. For instance, after splitting the window you can activate the lower portion and select Double Multiple Page in the Display Format menu to obtain a single page view in the top half and a double page view in the lower half.
  • Syncing from source to Preview now scrolls the selection to the visible portion of the window. When the Preview is split, syncing from source to preview goes to the active portion of the Preview window.
  • A new menu command, Show Log File, opens the log file. This file is updated after typesetting. If a source file has a root file, the menu command opens the log file of the root file, rather than the nonexistent root file of the input file.
  • If the command key is held down while choosing this menu item, a dialog will appear asking for the extension of the file to be opened. For instance, typing "aux" into the dialog opens the aux file rather than the log file. The requested extension can be typed with or without an opening period.
  • A new Help menu command, "Show Package Documentation", opens a dialog which requests the name of a package in TeX Live. It then opens the TeX Live documentation for this package, using the command line program "texdoc." This improvement was suggested by Juan Luis Varona.
  • TeX Live has a vast amount of documentation; go to /usr/local/texlive/2008/texmf-dist/doc/latex to see some (but not all) of this documentation. Note that almost all documentation folders have lower case names; therefore it is best to name packages in lower case when requesting documentation: pdftex, latex, graphicx, geometry, texdoc. But there are exceptions: IEEEtran.
  • Documentation is sometimes available in several different forms: pdf, html, etc. Add the extension to the request to see a particular form of the documentation. For instance, enter "pdftex.pdf" or "pdftex.html" to see these forms of the pdftex documentation. Texdoc will choose a convenient form on its own if the extension is omitted.
  • Texdoc does not open the documentation in TeXShop; instead it uses the Mac's default application for a given extension. By default, the Macintosh opens pdf files in Preview and html files in Safari, so texdoc will use those viewers. There is a standard way to redefine the default application for an extension. If you change the default, texdoc will use the new default application.
  • It is also possible to directly configure texdoc to use particular viewers; see the texdoc documentation for details.
  • Sometimes texdoc will not find documentation for a package, style file, or program. In that case, nothing will appear. In particular, TeXShop does not put up a warning dialog when documentation is not found. Although such a dialog would be useful at first, in the end it might become annoying.
  • It is possible to set the foreground color of the Console window in Preferences. This was requested by users who prefer white characters on black backgrounds for the console.
  • A new menu command opens the console if it has been closed.
  • The menu items to change the text color in the source, to justify right, left, or center in the source, and to bring up the ruler in the source have been removed, since they make no sense in TeX.
  • There are localization improvements in French, Spanish, and Japanese.
  • This version fixes a bug which ignored Console Preferences when using external editors.
  • TeXShop can now create and edit asy files.
  • Added a contextual menu item to the Source and Preview windows: Sync. Some users may prefer this menu item for synchronization because using it avoids the command key.
  • The TeXShop/Engines/Inactive folder now contains two scripts from Daniel Becker to call texcount to count active words in a TeX source file. The output may be more accurate than the output from detex, which is currently called by TeXShop's "statistics" command.
  • Users who upgrade TeXShop can get the new Inactive folder by quitting TeXShop, moving ~/Library/TeXShop/Engines to the desktop, and then restarting TeXShop. The new default Engines folder will be created by TeXShop. After it is created, merge extra items in your old copy on the desktop back into the ~/Library/TeXShop/Engines folder.
  • The Inactive folder also contains a "sage.engine" file. This engine makes it possible to use the open source mathematical software Sage, a replacement for Maple, Mathematica, and MatLab, directly from within a TeX source file. For instance, a single TeX line can ask Sage to plot a function; in the typeset output, this plot will appear at that spot. Or a single line can ask Sage to integrate a complicated expression symbolically; in the typeset output, the answer will be shown, typeset consistently with other mathematical expressions in the document. The inactive folder contains an example document typeset in this way. Sage is available free at http://www.sagemath.org/.
  • There was discussion on one of the mailing lists about the logic behind TeXShop's "Typeset" menu command, the "%!TEX program" mechanism, and the fact that "BibTeX" and "MakeIndex" are not really typesetting commands. Members of the list tried to understand the logic behind fine details of TeXShop's operation, but this was a hopeless task because there wasn't much logic present.
  • An attempt has been made in version 2.25 to provide consistent behavior, but without a complete overhaul of the interface. The code now works in the following way:
  • The "Typeset" command in the Typesetting menu always does exactly the same thing as the "Typeset" button in the source window toolbar. Both commands call the typesetting command listed in the drop down menu next to the toolbar button, unless the first few lines of the source file contain a line of the form
  • %!TEX TS-program = ...
  • If such a line is present, then the Typeset command uses the indicated program instead (unless the drop down menu is set to bibtex or makeindex; see comments below). The selected item in the drop down menu does not change, so commenting out the source line will cause typesetting to revert back to the method indicated in the drop down menu. Incidentally, TeXShop ignores extra comment characters at the beginning of the above source line, so it cannot be commented out by adding an extra comment. I prefer to add a space between the "TS" letters.
  • In previous versions of TeXShop, it was not possible to select bibtex, makeindex, metapost, context, or metafont in the "%!TEX TS-program" line, for purely historical reasons. This anomaly has been fixed, and any engine can be selected:
  • tex, pdftex, latex, pdflatex, bibtex, makeindex, metapost, context, metafont, or a user defined engine
  • There should be one space after the equal sign before the program name, and case is important.
  • Selecting bibtex or makeindex in the drop down menu causes these programs to be called even if a "%!TEX TS-program" line is present, since these two programs aren't really typesetting engines and a user may need to call them even when an unusual typesetting engine is being used.
  • So much for the basic "Typeset" command. The TeXShop "Typeset" menu also contains items to call TeX, LaTeX, BibTeX, MakeIndex, MetaPost, ConTeXt, and MetaFont. These items are present mainly for historical reasons and most users ignore them. Adding new engines to TeXShop doesn't add extra menu items because the menu would become awkwardly long if a user had a large number of extra engines.
  • The BibTeX and MakeIndex items are treated specially. Selecting one of these items causes TeXShop to run the resulting program regardless of the setting of the toolbar's drop down menu and the possible presence of a "%!TEX TS-program" source line. This is probably the most convenient way to call these two commands.
  • The remaining TeX, LaTeX, MetaPost, ConTeXt, and MetaFont menu commands behave in a slightly different way. Selecting one of these menu items causes TeXShop to run the resulting command, regardless of the toolbar's drop-down menu selection and regardless of any "%!TEX TS-program" line. Moreover, selecting one of these menu commands changes the toolbar's drop-down menu selection to the engine chosen in the menu command. The idea behind this design is that beginning users may first find the menu commands and typeset using them. If such a user later uses the "Typeset" button in the toolbar, it should cause the same behavior as the earlier menu command.
  • Sorry for this complexity; I'm trying to balance leaving the interface unchanged for users set in their ways with easier use of the BibTeX and MakeIndex commands.

New in TeXShop 2.20 (Jan 26, 2009)

  • Line numbers are displayed in the source file.
  • A preference item turns this feature on or off; a menu item turns it on or off for the currently active window.
  • This feature depends on free code by Paul Kim at Noodlesoft.
  • The code is at http://www.noodlesoft.com/blog/; see "Displaying Line Numbers with NSTextView".
  • I don't read this blog, but the code was pointed out to me in an email from Ryan Cuthbertson, who downloaded the TeXShop source code, implemented the change, and sent crystal clear instructions explaining how to add the feature. Kudos to Cuthbertson. Kudos especially to Paul Kim and Noodlesoft; Kim's code is so well written that Cuthbertson had to add only 32 lines of code to TeXShop to make it work.
  • TeXShop now uses Sparkle to implement "Check for Updates."
  • This brings many advantages. Rather than directing a user to the TeXShop web page when an update is available, TeXShop now lists new features directly, downloads the update upon request, and even quits TeXShop, installs the new version, and restarts the program upon request.
  • Sparkle is another remarkable product from the open source software community.
  • Written by Andy Matuschak and available at http://sparkle.andymatuschak.org/, it provides every feature you'd want in an update mechanism.
  • The documentation for developers available on the web page is a model of clarity and simplicity. Sparkle is used by a number of other GUI programs for TeX, so users for find it familiar.
  • The console window has been greatly improved by Will Robertson, who sent a new Nib file containing his changes several months ago. I waited to implement the improvements until I could add a console preference tab to TeXShop Preferences allowing users to modify Robertson's choices. The font and background color for the console can be modified in Preferences. Users can adjust the console width to match the number of characters typically output by TeX, and then select a preference allowing the window to be resized only in the vertical direction. Note that preference changes are immediately reflected in the console, so the trick to easy console configuration is to bring a console window to the front, open Preferences, try out various fonts, font sizes, and background colors until satisfied, activate horizontal resizing and adjust the console width, and then, if desired, lock down this width in Preferences.
  • A number of items in the Preference panel have been moved to make the operation of the panel more transparent. The most important tab items come first: Source, Preview, Console, Typesetting. In the Preview tab, the "Fixed Magnification Amount" appears immediately following the "Magnification Method" to make it clearer that "Fixed Magnification" only applies when the "Magnification Method" is "Fixed Magnification."
  • Previously, clicking the green "Zoom Dot" on TeXShop windows expanded the window to fill the screen. An attempt has been to made this operation more rational. The Source window now expands to fill the left portion of the screen; the console expands only vertically, and the Preview window expands to fill the right portion of the screen. The Preview window expands by the largest amount because users may want to zoom the image and check fine details. I'd appreciate advice on refinement of the zoom behavior. Recall that the behavior must make sense on small portable screens and large Cinema displays.
  • For some time, TeXShop recognized hidden preference items to set the background color of the Source and Preview windows. These preference items are now exposed and can be set in the Preference dialog.
  • A bug in the MatrixPanel code disabled the hidden preference "matrixsize''. This bug is fixed.
  • The name of the alternate typesetting mode "TeX and Ghostscript" has been changed to "TeX and DVI". This fulfills a request of the American Mathematical Society, who have been dealing with users claiming that TeXShop cannot produce dvi files.

New in TeXShop 2.18 (Aug 29, 2008)

  • Added a new Preference item under the Typesetting tab. The preference is called "After Typesetting" and the choices are "Bring Preview Forward"' and "Continue Editing."' The first item activates the Preview window after typesetting and brings it forward, as TeXShop has behaved in the past. When the "Continue Editing" item is activated, typesetting updates the contents of the Preview window but leaves the Edit window active with the editing cursor blinking. This makes it possible to typeset, glance over to check that things look right, and continue editing. This option is particularly useful on large monitors which can show the full contents of both windows.
  • Added support for SyncTeX. SyncTeX is new synchronization technology by Jerome Laurens which is included in TeX Live 2008 (but not earlier TeX distributions). The technology is built directly into pdfTeX and XeTeX. In modern TeX distributions, most typesetting actually calls pdfetex (even if using latex to output a dvi file), and thus the technology is available for such typesetting.
  • Added encodings ISOLatinGreek, MacCentralEurRoman, and WindowsLatin2 (i.e., WindowsCentralEurRoman).
  • Added code by Adam Maxwell to permit BibDesk Completions; this is controlled by a new Preference Setting. By default, it is not activated.
  • Fixed French nib file so Typeset menu works again (there are no longer simultaneous checks on "PdfTeX" and "TeX & Ghostscript").
  • Fixed tab settings, so now changing tab spacing in Preferences works correctly.
  • Command-T now typesets even when the console window is active.
  • Fixed pdf updating. If a user has an external editor and uses TeXShop to display pdf output, and if the "Automatic Preview Update" preference is set, then whenever the pdf file is updated, TeXShop reads and displays the latest version, activating the pdf window when it does so. There is a hidden preference item named "BringPdfFrontOnAutomaticUpdate". If this is set to "NO", then the preview window is supposed to be updated but not brought forward. Recently, the preview window did this, but didn't display the new content until the user manually activated it. This is fixed.
  • Instead of separate commands to display each of George Gratzer's symbol tables, there is one command to display all of the tables in one document. It is much easier to find a symbol if you can scroll through tables rather than guessing which table has the desired symbol.
  • Modified default LaTeX macros to bring them up to date.