public Box createBox(TeXEnvironment env) {
    double tw = env.getTextwidth();
    if (tw == Float.POSITIVE_INFINITY || type == GATHERED) {
      return new MatrixAtom(isPartial, column, "").createBox(env);
    }

    VerticalBox vb = new VerticalBox();
    Atom at = column.array.get(0).get(0);
    int alignment = type == GATHER ? TeXConstants.ALIGN_CENTER : TeXConstants.ALIGN_LEFT;
    if (at.alignment != -1) {
      alignment = at.alignment;
    }
    vb.add(new HorizontalBox(at.createBox(env), tw, alignment));
    Box Vsep = vsep_in.createBox(env);
    for (int i = 1; i < column.row - 1; i++) {
      at = column.array.get(i).get(0);
      alignment = TeXConstants.ALIGN_CENTER;
      if (at.alignment != -1) {
        alignment = at.alignment;
      }
      vb.add(Vsep);
      vb.add(new HorizontalBox(at.createBox(env), tw, alignment));
    }

    if (column.row > 1) {
      at = column.array.get(column.row - 1).get(0);
      alignment = type == GATHER ? TeXConstants.ALIGN_CENTER : TeXConstants.ALIGN_RIGHT;
      if (at.alignment != -1) {
        alignment = at.alignment;
      }
      vb.add(Vsep);
      vb.add(new HorizontalBox(at.createBox(env), tw, alignment));
    }

    double height = vb.getHeight() + vb.getDepth();
    vb.setHeight(height / 2);
    vb.setDepth(height / 2);

    return vb;
  }
  public Box createBox(TeXEnvironment env) {
    TeXFont tf = env.getTeXFont();
    int style = env.getStyle();
    Box b = base != null ? base.createBox(env) : new StrutBox(0, 0, 0, 0);
    float sep = new SpaceAtom(TeXConstants.UNIT_POINT, 1f, 0, 0).createBox(env).getWidth();
    Box arrow;

    if (dble) {
      arrow = XLeftRightArrowFactory.create(env, b.getWidth());
      sep = 4 * sep;
    } else {
      arrow = XLeftRightArrowFactory.create(left, env, b.getWidth());
      sep = -sep;
    }

    VerticalBox vb = new VerticalBox();
    if (over) {
      vb.add(arrow);
      vb.add(new HorizontalBox(b, arrow.getWidth(), TeXConstants.ALIGN_CENTER));
      float h = vb.getDepth() + vb.getHeight();
      vb.setDepth(b.getDepth());
      vb.setHeight(h - b.getDepth());
    } else {
      vb.add(new HorizontalBox(b, arrow.getWidth(), TeXConstants.ALIGN_CENTER));
      vb.add(new StrutBox(0, sep, 0, 0));
      vb.add(arrow);
      float h = vb.getDepth() + vb.getHeight();
      vb.setDepth(h - b.getHeight());
      vb.setHeight(b.getHeight());
    }

    return vb;
  }