public Box createBox(TeXEnvironment env) {
   Box bbase = base.createBox(env);
   float drt = env.getTeXFont().getDefaultRuleThickness(env.getStyle());
   float space = INTERSPACE * SpaceAtom.getFactor(TeXConstants.UNIT_EM, env);
   float sspace = 1.5f * drt + 0.5f * SpaceAtom.getFactor(TeXConstants.UNIT_POINT, env);
   return new FramedBox(new FramedBox(bbase, 0.75f * drt, space), 1.5f * drt, sspace);
 }
Exemplo n.º 2
0
  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;
  }
Exemplo n.º 3
0
 public TeXEnvironment(int style, TeXFont tf, int widthUnit, float textwidth) {
   this(style, tf, null, null);
   this.textwidth = textwidth * SpaceAtom.getFactor(widthUnit, this);
 }
Exemplo n.º 4
0
 public void setTextwidth(int widthUnit, float textwidth) {
   this.textwidth = textwidth * SpaceAtom.getFactor(widthUnit, this);
 }
Exemplo n.º 5
0
 public float getInterline() {
   return interline * SpaceAtom.getFactor(interlineUnit, this);
 }
Exemplo n.º 6
0
  public Box createBox(TeXEnvironment env) {
    final float factor = 12 * SpaceAtom.getFactor(TeXConstants.UNIT_MU, env);

    return new FcscoreBox(N == 5 ? 4 : N, factor * 1f, factor * 0.07f, factor * 0.125f, N == 5);
  }