Ejemplo n.º 1
0
        public String getHTMLBody()
        {
            MathEngine.resetSymbolTable();

            StringBuilder generatedHTML = new StringBuilder();

            foreach (LMD_Object lmdObj in Content)
            {
                // first, the object is built (generation of expression tree etc.)
                lmdObj.build();
                // then HTML is generated
                generatedHTML.Append(lmdObj.HTML);
            }

            return(generatedHTML.ToString());
        }
Ejemplo n.º 2
0
        public String getCommandResult()
        {
            MathEngine.resetSymbolTable();

            foreach (LMD_Object lmdObj in Content)
            {
                LMD_Mathtext mtext = lmdObj as LMD_Mathtext;
                if (mtext != null)
                {
                    String commandResult = mtext.buildAndReturnResultIfPossible();
                    if (commandResult != null)
                    {
                        return(commandResult);
                    }
                }
            }
            return("");
        }
Ejemplo n.º 3
0
        public String toHTML(RenderingMode ModeForRendering)
        {
            MathEngine.resetSymbolTable();

            StringBuilder generatedHTML = new StringBuilder();

            generatedHTML.Append((ModeForRendering == RenderingMode.LOCAL) ? headerLocale : headerGlobal);

            foreach (LMD_Object lmdObj in Content)
            {
                // first, the object is built (generation of expression tree etc.)
                lmdObj.build();
                // then HTML is generated
                generatedHTML.Append(lmdObj.HTML);
            }

            generatedHTML.Append(footer);

            return(generatedHTML.ToString());
        }