They will appear at the same spot, but you can separate them.Īn Example which Finally Illustrates the Point of All This: If you have two open documents, activate "Show HTML Window" twice, once when each document is active. To verify this assertion, close all documents and notice that the "Show HTML Window" menu item is grayed out. Instead it is the particular HTML window assigned to the active document. This is not a global window available for common use by all documents. Recall that "Show HTML Window" opens a default HTML Window.
Thus if a typesetting engine produces html files rather than pdf files, the html file can be previewed directly in TeXShop. 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. 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. Some are shown and many are hidden away to be used later on. When a new document is opened, all of the objects in the NSDocument nib file for that document are instantiated at once.
All of the extra code to handle multiple documents is provided automatically by Cocoa. 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. It has a nib file containing all the graphical elements used by a typical document, and source code files which process that document. TeXShop is constructed using the NSDocument class in the Cocoa APIs. 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".Īll this is well and good, but Safari does the same thing with much more support in the interface. In TeXShop Preferences under the Preview tab, there are new items for the HTML Window. 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."Īfter that, the window will always appear in the selected position. The HTML Window behaves like the Source and Preview windows. The toolbar also contains a Search Field, but it is not currently active and will be activated in a future version of TeXShop. 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. Almost all web features are active in this window.Ī URL field at the top of the new window allows you to navigate to any web page you like. Toolbar arrows allow you to move back and forth between pages. 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.
The new HTML Window in TeXShop was created that way. Which implements a web view for any standard Macintosh program. The Apple API's used by TeXShop contain a class called WKWebKitView A window will appear looking like a Safari window and displaying HTML content. In the Preview menu, there is an item labeled "Show HTML Window". Make sure a document is open in TeXShop or an empty source window created by the "New" menu item is visible. Rather than immediately explaining the new features, I'll demonstrate one addition. Most users will see nothing new until they read this document. But when typesetting traditional documents, there are no changes. Version 5.00 is a major new release of TeXShop.