This project has moved and is read-only. For the latest updates, please go here.

latex in sandcastle

Topics: Developer Forum, User Forum
Dec 31, 2007 at 9:29 AM
Is it possible to include latex into sandcastle output?
For example, some way to embed latex statements in C# comments that will be compiled into an equation (in the final .chm file)?

Thank you in advance,

- Edward.
Dec 31, 2007 at 11:31 AM
Hello Edward, IMHO this is very hard task. As Sandcastle build process can be customized, it is primarily targeted to produce HTML / Compiled HTML output. LaTeX syntax can not be transformed via XSLT.

There are three ways:
  • create own LaTeX output (complete rewrite transform process) and compile it with TeX compiler to *.ps or *.pdf
  • create own build component for transforming latex fragments (IMHO custom tag will be required) into images and include them into final HTML document
  • for equations do not use LaTeX syntax, but use MathML fragments. When You use HTML output and MathML compatible browser (Firefox, Opera, IE with plugin), it should be the easiest way. I don't know if it will work in compiled HTML (chm)
Dec 31, 2007 at 6:52 PM
As noted, if you create a custom build component, you could probably convert the latex statements into an image or HTML assuming you have code to do it or can find a third party library that does it. In such a case, it would be similar to the way the code block component works. I have no experience with latex so it's not something I want to do as I'd have no way of providing proper support for it.

Jan 13, 2008 at 2:09 PM
Hi darilek and Eric:

Thank you very much for the replies (apologize for not thanking sooner, was traveling).
I understand, no problem at all.
The product is still exceptional.

Again, thank you.
- Edward
Jan 11, 2009 at 1:31 PM
Edited Jan 11, 2009 at 1:32 PM
I know this discussion is a year old, but someone find this helpful.  I created a LaTeX  build component that uses mimeTeX to generate GIF images from LaTeX placed in the XML comments. The GIF files are then embedded into the resulting help file. You can grab the component from: (CodePlex doesn't allow GPL v3 code). Any feedback would be greatly appreciated.

Jan 11, 2009 at 8:24 PM
Thanks for the info.  I'll add a link to it in the help file for the next release.