Section 29.11 HTML in an LMS
If you are using PreTeXt to author course materials, you may want to include the resulting HTML in your LMS (Learning Management System) course shell. While uploading PDFs can also be useful for students to print from, many universities require the documents to also be made available in accessible formats, so HTML is likely your best option.
Depending on which LMS you use, and possibly what settings have been applied to your course shell, you may be able to upload a portable HTML file, as described in Section 29.10. This seems to work with Moodle, but not with Canvas, which blocks javascript inside uploaded files (the Javascript is required to render the MathJax math content). In this case, you have two options:
-
Host your HTML output on a web server (such as using
pretext deploy
to publish your files to GitHub pages) and then link to the content or embed it in your LMS using an iframe. To make embedding easier, you can turn on an “embed this page” button by setting/publication/html/@embed-button
toyes
in the publication file (see Subsection 44.4.21).Once your page is published, click on the button and copy the code to your clipboard. In the LMS, create a page in your course shell. There is likely an “embed code” button in the editor interface of your LMS where you can paste what you copied from the PreTeXt page. When you save the page in your LMS, you should see just the inner content of the pretext page (no table of contents or navigation). However, the page should be fully functional, including interactive elements and MathJax rendered math (so it will be screen reader friendly). -
If you need to keep your document private to your course (for example, maybe it is a set of exam solutions you don’t want to publish on the open web), you can produce a SCORMarchive of your document. To do this, in your
1
Sharable Content Object Reference Modelproject.ptx
manifest, set@compression
toscorm
for the HTML target you want to build.PreTeXt will produce the HTML inside a.zip
archive which will also include a SCORM manifest that tells your LMS how to display the content. You can then upload this SCORM file to your LMS and add it as a page. In Canvas, you can do this by adding SCORM to your course navigation in settings and then clicking the upload button on that page. Brightspace (D2L) lets you upload SCORM files from a page-creation menu. See the documentation for your LMS for additional help.