示例#1
0
 public TypedAtom(SourceSpan source, Atom atom, TexAtomType leftType, TexAtomType rightType)
     : base(source)
 {
     this.Atom      = atom;
     this.LeftType  = leftType;
     this.RightType = rightType;
 }
示例#2
0
文件: Glue.cs 项目: Civa/Zenith
 public static Box CreateBox(TexAtomType leftAtomType, TexAtomType rightAtomType, TexEnvironment environment)
 {
     leftAtomType = leftAtomType > TexAtomType.Inner ? TexAtomType.Ordinary : leftAtomType;
     rightAtomType = rightAtomType > TexAtomType.Inner ? TexAtomType.Ordinary : rightAtomType;
     var glueType = glueRules[(int)leftAtomType, (int)rightAtomType, (int)environment.Style / 2];
     return glueTypes[glueType].CreateBox(environment);
 }
示例#3
0
文件: SymbolAtom.cs 项目: Civa/Zenith
 public SymbolAtom(string name, TexAtomType type, bool isDelimeter)
     : base()
 {
     this.Type = type;
     this.Name = name;
     this.IsDelimeter = isDelimeter;
 }
示例#4
0
 public AlphaNumericAtom(SourceSpan source,
                         string alphanumericsymbol, string defaultalphanumericsymbol = null,
                         TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
     AlphanumericSymbol        = alphanumericsymbol;
     DefaultAlphanumericSymbol = defaultalphanumericsymbol ?? alphanumericsymbol;
 }
示例#5
0
 public SymbolAtom(string name, TexAtomType type, bool isDelimeter)
     : base()
 {
     this.Type        = type;
     this.Name        = name;
     this.IsDelimeter = isDelimeter;
 }
        public static Box CreateBox(TexAtomType leftAtomType, TexAtomType rightAtomType, TexEnvironment environment)
        {
            leftAtomType  = leftAtomType > TexAtomType.Inner ? TexAtomType.Ordinary : leftAtomType;
            rightAtomType = rightAtomType > TexAtomType.Inner ? TexAtomType.Ordinary : rightAtomType;
            var glueType = glueRules[(int)leftAtomType, (int)rightAtomType, (int)environment.Style / 2];

            return(glueTypes[glueType].CreateBox(environment));
        }
示例#7
0
 public SymbolAtom(SymbolAtom symbolAtom, TexAtomType type) : base(type)
 {
     if (!validSymbolTypes[(int)type])
     {
         throw new ArgumentException("The specified type is not a valid symbol type.", nameof(type));
     }
     this.Name        = symbolAtom.Name;
     this.IsDelimeter = symbolAtom.IsDelimeter;
 }
示例#8
0
文件: SymbolAtom.cs 项目: Civa/Zenith
 public SymbolAtom(SymbolAtom symbolAtom, TexAtomType type)
     : base()
 {
     if (!validSymbolTypes[(int)type])
         throw new ArgumentException("The specified type is not a valid symbol type.", "type");
     this.Type = type;
     this.Name = symbolAtom.Name;
     this.IsDelimeter = symbolAtom.IsDelimeter;
 }
示例#9
0
 public void SetFixedTypes(TexAtomType leftType, TexAtomType rightType)
 {
     this.Formula.RootAtom = new TypedAtom(this.Formula.RootAtom, leftType, rightType);
 }
示例#10
0
 public void AddSymbol(string name, TexAtomType type)
 {
     this.Add(new SymbolAtom(null, SymbolAtom.GetAtom(name, null), type));
 }
示例#11
0
 protected CharSymbol(SourceSpan source, TexAtomType type = TexAtomType.Ordinary)
     : base(source, type)
 {
     this.IsTextSymbol = false;
 }
示例#12
0
 public void AddSymbol(string name, TexAtomType type)
 {
     Add(new SymbolAtom(SymbolAtom.GetAtom(name), type));
 }
示例#13
0
 public TypedAtom(Atom atom, TexAtomType leftType, TexAtomType rightType)
 {
     Atom      = atom;
     LeftType  = leftType;
     RightType = rightType;
 }
示例#14
0
 public TypedAtom(Atom atom, TexAtomType leftType, TexAtomType rightType)
 {
     this.Atom      = atom;
     this.LeftType  = leftType;
     this.RightType = rightType;
 }
示例#15
0
 public SymbolAtom(SourceSpan source, string name, TexAtomType type, bool isDelimeter)
     : base(source, type)
 {
     this.Name        = name;
     this.IsDelimeter = isDelimeter;
 }
示例#16
0
 public void SetFixedTypes(TexAtomType leftType, TexAtomType rightType)
 {
     this.Formula.RootAtom = new TypedAtom(this.Formula.RootAtom, leftType, rightType);
 }
示例#17
0
 public SymbolAtom(string name, TexAtomType type, bool isDelimeter)
 {
     Type        = type;
     Name        = name;
     IsDelimeter = isDelimeter;
 }
示例#18
0
文件: TypedAtom.cs 项目: Civa/Zenith
 public TypedAtom(Atom atom, TexAtomType leftType, TexAtomType rightType)
 {
     this.Atom = atom;
     this.LeftType = leftType;
     this.RightType = rightType;
 }
示例#19
0
 public NullAtom(SourceSpan source = null, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
 }
示例#20
0
 protected CharSymbol(TexAtomType type) : base(type)
 {
     this.IsTextSymbol = false;
 }
示例#21
0
 public DummyAtom WithType(TexAtomType type) =>
 new DummyAtom(type, this.Atom, this.IsTextSymbol);
示例#22
0
 public void AddSymbol(string name, TexAtomType type)
 {
     Add(new SymbolAtom(SymbolAtom.GetAtom(name), type));
 }
示例#23
0
 public DummyAtom(TexAtomType type, Atom atom, bool isTextSymbol)
     : base(atom.Source, type)
 {
     this.Atom         = atom;
     this.IsTextSymbol = isTextSymbol;
 }
示例#24
0
 protected Atom(SourceSpan source, TexAtomType type = TexAtomType.Ordinary)
 {
     this.Source = source;
     this.Type   = type;
 }
示例#25
0
 protected Atom(TexAtomType type)
 {
     this.Type = type;
 }
示例#26
0
 public VVMatrixAtom(SourceSpan source, Atom atom, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
     this.BaseAtom = atom;
 }
示例#27
0
 public AugmentedMatrixAtom(SourceSpan source, Atom leftatom, Atom rightatom, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
     this.LeftBaseAtom  = leftatom;
     this.RightBaseAtom = rightatom;
 }