Ejemplo n.º 1
0
 public TypedAtom(SourceSpan source, Atom atom, TexAtomType leftType, TexAtomType rightType)
     : base(source)
 {
     this.Atom      = atom;
     this.LeftType  = leftType;
     this.RightType = rightType;
 }
Ejemplo n.º 2
0
Archivo: Glue.cs Proyecto: 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);
 }
Ejemplo n.º 3
0
 public SymbolAtom(string name, TexAtomType type, bool isDelimeter)
     : base()
 {
     this.Type = type;
     this.Name = name;
     this.IsDelimeter = isDelimeter;
 }
Ejemplo n.º 4
0
 public AlphaNumericAtom(SourceSpan source,
                         string alphanumericsymbol, string defaultalphanumericsymbol = null,
                         TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
     AlphanumericSymbol        = alphanumericsymbol;
     DefaultAlphanumericSymbol = defaultalphanumericsymbol ?? alphanumericsymbol;
 }
Ejemplo n.º 5
0
 public SymbolAtom(string name, TexAtomType type, bool isDelimeter)
     : base()
 {
     this.Type        = type;
     this.Name        = name;
     this.IsDelimeter = isDelimeter;
 }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 9
0
 public void SetFixedTypes(TexAtomType leftType, TexAtomType rightType)
 {
     this.Formula.RootAtom = new TypedAtom(this.Formula.RootAtom, leftType, rightType);
 }
Ejemplo n.º 10
0
 public void AddSymbol(string name, TexAtomType type)
 {
     this.Add(new SymbolAtom(null, SymbolAtom.GetAtom(name, null), type));
 }
Ejemplo n.º 11
0
 protected CharSymbol(SourceSpan source, TexAtomType type = TexAtomType.Ordinary)
     : base(source, type)
 {
     this.IsTextSymbol = false;
 }
Ejemplo n.º 12
0
 public void AddSymbol(string name, TexAtomType type)
 {
     Add(new SymbolAtom(SymbolAtom.GetAtom(name), type));
 }
Ejemplo n.º 13
0
 public TypedAtom(Atom atom, TexAtomType leftType, TexAtomType rightType)
 {
     Atom      = atom;
     LeftType  = leftType;
     RightType = rightType;
 }
Ejemplo n.º 14
0
 public TypedAtom(Atom atom, TexAtomType leftType, TexAtomType rightType)
 {
     this.Atom      = atom;
     this.LeftType  = leftType;
     this.RightType = rightType;
 }
Ejemplo n.º 15
0
 public SymbolAtom(SourceSpan source, string name, TexAtomType type, bool isDelimeter)
     : base(source, type)
 {
     this.Name        = name;
     this.IsDelimeter = isDelimeter;
 }
Ejemplo n.º 16
0
 public void SetFixedTypes(TexAtomType leftType, TexAtomType rightType)
 {
     this.Formula.RootAtom = new TypedAtom(this.Formula.RootAtom, leftType, rightType);
 }
Ejemplo n.º 17
0
 public SymbolAtom(string name, TexAtomType type, bool isDelimeter)
 {
     Type        = type;
     Name        = name;
     IsDelimeter = isDelimeter;
 }
Ejemplo n.º 18
0
 public TypedAtom(Atom atom, TexAtomType leftType, TexAtomType rightType)
 {
     this.Atom = atom;
     this.LeftType = leftType;
     this.RightType = rightType;
 }
Ejemplo n.º 19
0
 public NullAtom(SourceSpan source = null, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
 }
Ejemplo n.º 20
0
 protected CharSymbol(TexAtomType type) : base(type)
 {
     this.IsTextSymbol = false;
 }
Ejemplo n.º 21
0
 public DummyAtom WithType(TexAtomType type) =>
 new DummyAtom(type, this.Atom, this.IsTextSymbol);
Ejemplo n.º 22
0
 public void AddSymbol(string name, TexAtomType type)
 {
     Add(new SymbolAtom(SymbolAtom.GetAtom(name), type));
 }
Ejemplo n.º 23
0
 public DummyAtom(TexAtomType type, Atom atom, bool isTextSymbol)
     : base(atom.Source, type)
 {
     this.Atom         = atom;
     this.IsTextSymbol = isTextSymbol;
 }
Ejemplo n.º 24
0
 protected Atom(SourceSpan source, TexAtomType type = TexAtomType.Ordinary)
 {
     this.Source = source;
     this.Type   = type;
 }
Ejemplo n.º 25
0
 protected Atom(TexAtomType type)
 {
     this.Type = type;
 }
Ejemplo n.º 26
0
 public VVMatrixAtom(SourceSpan source, Atom atom, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
     this.BaseAtom = atom;
 }
Ejemplo n.º 27
0
 public AugmentedMatrixAtom(SourceSpan source, Atom leftatom, Atom rightatom, TexAtomType type = TexAtomType.Ordinary) : base(source, type)
 {
     this.LeftBaseAtom  = leftatom;
     this.RightBaseAtom = rightatom;
 }