LateXSL A system for displaying LaTeX formulas in Web pages by Steve White How it works ============ LateXSL relies on three standard, modern Web technologies. * XSLT to parse LaTeX and produce HTML * Unicode fonts to display special symbols * Cascading Style Sheets for sizing, positioning, and line drawing Only in 2007 have all three matured adequately on all major platforms for such a thing to work. As of this writing in 2015, all major browsers on desktop systems and on smartphones have adequate XSL implementations. Your input file is a standard XHTML file, with LaTeX commands embedded in special tags. When the reader looks at this file, it is processed by an XSLT "stylesheet", which processes the LaTeX into CSS-styled HTML. The Web browser displays this HTML. Modes of operation ================== For LateXSL to work, the transformation language XSLT must be available. The simplest way to get XSLT is for the reader to use a modern Web browser, many of which have XSLT built-in. However, if your Web server supports XSLT, the processing can be done on the server side. The advantage of this approach is that your reader could use an older browser to view the documents. (However, the advantage isn't so great: most older browsers that don't support XSLT also don't support the requisite CSS, and so will make a mess of it anyway.) Basic use ========= Download the latest LateXSL package from the LateXSL progject page. Unpack the archive, and place the contents somewhere accessible to your web server. The package contains a documentation directory docs/ and an examples/ directory. For the system to work, HTML files must be properly structured XML. They may be HTML 4 or XHTML, but they must be correct. It sometimes takes a little work to get it right, but an on-line "HTML validator" is a great help. The primary addition that needs to be made to a properly-formatted HTML file in order to use the system is the addition of a single line, just after the standard initial line and before the DOCTYPE line of the HTML file. The 'href' attribute needs to be edited to provide a path (accessible to your web server) to the 'late.xsl' file of the LateXSL distribution. After that, math to be dispayed on a separate line may be typed directly as plain LaTex into a text block marked as LaTeX with a "class" attribute, so:
The LaTeX will then be displayed as math in the web browser. Likewise, math to be displayed within a line is indicated as such by . Building HTML files =================== The Makefile is provided to show how one might do XSLT pre-processing. It isn't necessary for the use of the LateXSL software. This is useful only on Unix-like systems. If you type make it will build the example files from the examples/ directory and put the resulting HTML files in the html/ directory. This pre-processing is really useful for debugging, but also, you might want to pre-process your documents to deliver simple HTML to your readers. You could do that by modifying the Makefile. More information ================ See the LateXSL web site http://latexsl.sourceforge.net