Skip to main content

The PreTeXt Guide

Subsection 2.2.2 Viewing

You can preview these HTML files you just built using the View command. Again, you can access this in multiple ways: PreTeXt buttom in the toolbar, CTRL+ALT+p, etc. Select View from the dialog. You may be given options on how to view the document, depending on what VS Code plugins you have available to you. Try one or another until you’re able to view your web build in either a new tab of your browser or a tab within VS Code.
The VS Code Live Preview is a good option, but it is buggy when used inside Codespaces. It seems to help to use the VS Code command pallette to run Live Preview: Show Preview (External Browser), then close the tab that opens, and start the process over. You may need to do this a few times before it works.
Now is a great time to try to make edits to your source files (maybe change the title). Note that these changes aren’t updated live in your preview: you will need to build again, and then refresh the preview window to see them. Note, you do not need to run the View command again unless you stop the preview server.