TeXShop contains two preview windows, a pdf window for pdf files and an html window for html files. The html window is live on the internet.

TeXShop has a demonstration project illustrating the use of these windows. This project has been improved and simplified in TeXShop 5.53. To sample the demonstration, select "Open ~/Library/TeXShop" in the TeXShop menu, and from the resulting list of subfolders open "New". Inside is a single subfolder named "Demo". Drag a copy of this folder to your desktop.

The folder Demo contains a Read-Me file and a project folder named Fourier-for-Desktop. Open the project folder, find the file "Fourier.tex", and typeset it. The resulting file is an old document from my teaching days explaining the proof of Dirichlet's convergence theorem for Fourier series, but it contains illustrations and mathematical formulas and thus is useful to sample conversion from pdf to html.

Next open the Read-Me file in Demo, and read only the first two sections. The second section explains how to copy the engine files TeX4ht.engine and TeX4ht-Only.engine from the Fourier folder to TeXShop's active engine folder, so TeXShop will know how to typeset using TeX4ht. Follow these instructions and then stop reading.

At the top of the Fourier.tex source file, change the typesetting engine from pdflatex to TeX4ht and typeset again. After typesetting, two windows open, one displaying the pdf document and the other displaying the html document. In the source code, it is possible to write portions which only appear in the pdf document, and portions which only appear in the html document. The portion for the html document can be written half in latex and half in html, allowing a mixture of text and interactive html elements. For instance, calls to Sage can display graphs which the user determines interactively, and UTube videos can be played. Sample the resulting output, and consult the Read-Me file for further details.

The program TeX4ht is usually initialized using configuration files which extend it's knowledge of typesetting. All typesetting engines for TeX4ht now use these configuration files. The Fourier folder has a sample configuration file that fixes some problems in the earlier version, and can be used unchanged for your own projects. Details are give in the Read-Me associated with Demo.