I’ve finally gotten around to writing the LaTeX build component for the Sandcastle Help File Builder. A quick proof of concept only took about 20 lines of code. It scans the XML comments for <latex> tags and then generates a GIF image based on the latex code in the tag (using MimeTeX). It then replaces the <latex> tag with an <img> tag that points to the generated image. So far, it seems to work. The only glitch is that it processes each <latex> tag three times. I’m not sure why yet. Anyway, the project is up on Assembla:
http://www.assembla.com/spaces/latex_sandcastle
There are two builds of the plug-in, one for x86 systems and em64t (x64) systems. For now, there are only MS Windows builds. If there is demand for Linux versions, I’ll build them.
The build component is pretty simple to use with the Sandcastle Help File Builder (SHFB):
- Add the three files from the zip file’s binary (x86 or x64) directory into the SHFB BuildComponent directory.
- Add the “LaTeX Build Component” to in ComponentConfiguration in your SHFB config file.
- Add <latex> tags to your source code comments. The <latex> tags have to be inside of a regular XML comment tag such as summary, remarks, etc.
- Build your help file.