Esempio 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());
        }
Esempio 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("");
        }
Esempio 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());
        }