Example #1
0
        public static void SetupDefaultMimeTypes()
        {
            Formatter <LaTeXString> .Register((laTeX, writer) => writer.Write(laTeX.ToString()), "text/latex");

            Formatter <MathString> .Register((math, writer) => writer.Write(math.ToString()), "text/latex");

            Formatter.SetPreferredMimeTypeFor(typeof(LaTeXString), "text/latex");
            Formatter.SetPreferredMimeTypeFor(typeof(MathString), "text/latex");

            Formatter.SetPreferredMimeTypeFor(typeof(string), PlainTextFormatter.MimeType);

            Formatter.SetDefaultMimeType(HtmlFormatter.MimeType);
        }