Exemplo n.º 1
0
        public ReferenceMathComponent(BuildAssembler assembler,
                                      XPathNavigator configuration) : base(assembler, configuration, false)
        {
            try
            {
                if (_latexFormatter != null)
                {
                    _xpathSelector = XPathExpression.Compile(
                        "//math[starts-with(@address, 'Math')]");

                    MathController.Create("reference", _numberShow,
                                          _numberIncludesPage, _numberByPage, _numberFormat);
                }
            }
            catch (Exception ex)
            {
                this.WriteMessage(MessageLevel.Error, ex);
            }
        }
        public ConceptualMathComponent(BuildAssembler assembler,
                                       XPathNavigator configuration) : base(assembler, configuration, true)
        {
            try
            {
                if (_latexFormatter != null)
                {
                    _xsltContext = new CustomContext();
                    _xsltContext.AddNamespace("ddue",
                                              "http://ddue.schemas.microsoft.com/authoring/2003/5");

                    _xpathSelector = XPathExpression.Compile(
                        "//ddue:math[starts-with(@address, 'Math')]");
                    _xpathSelector.SetContext(_xsltContext);

                    MathController.Create("conceptual", _numberShow,
                                          _numberIncludesPage, _numberByPage, _numberFormat);
                }
            }
            catch (Exception ex)
            {
                this.WriteMessage(MessageLevel.Error, ex);
            }
        }