CSS Stylesheet Notes

SnuggleTeX defaults to using CSS (Cascading StyleSheets) to style XHTML elements. This can be controlled in a number of ways:
  • The default option when creating web pages is to include all of the CSS declarations within a <style>...</style> section in the XHTML <head>....</head> section. This can be turned off by calling setIncludingStyleElement(false) on your WebPageOutputOptions Object. In this case, you will want to use one of following alternative approaches for providing the style information.
  • By calling setInliningCSS(true) on your WebPageOutputOptions (or indeed DOMOutputOptions) Object, SnuggleTeX will add style attributes to XHTML elements as required. This might be a useful option if the resulting XHTML is going to be grafted into the content of another page on another system, as it still gives you some control over CSS.
  • The SnuggleTeX distributions include a snuggletex.css file that may be able to deploy alongside your web outputs. In that case, use the setCSSStylesheetURLs() to link this (and any other) CSS files to your web outputs.