Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » netList
next | previous | forward | backward | up | index | toc

# netList -- a table of boxes

- Usage:
    `netList v`
- Inputs:
  - v, a list of lists of things to be converted to nets and displayed as a table in a net
- Optional inputs:
  - Boxes => ..., default value true, whether to draw boxes around the individual nets. Can be a Boolean, or a pair controlling separately the horizontal and vertical lines of the boxes. Each element of the pair is either a Boolean (draw all or none) or a list of rows/columns where lines are to inserted.
  - BaseRow => an integer, default value 0, the index of the base row, for the purpose of setting the baseline of the net produced. The value is allowed to be as large as the length of v, larger by 1 than one might expect.
  - HorizontalSpace => an integer, default value 0, the amount of space horizontally between entries or between entries and their enclosing boxes
  - VerticalSpace => an integer, default value 0, the amount of space vertically between entries or between entries and their enclosing boxes
  - Alignment => ..., default value Left, Center, Left, Right, or a list of those symbols indicating horizontal adjustment; if it's a list, the i-th entry specifies the adjustment in the i-th column; if not, the symbol applies to all columns.
- Outputs:
  - a net obtained by converting the elements of each list in the list of lists v to nets and arranging them in a table, as specified by the options

## Description

    i1 : f = {{"hi there","foo"},{-3, 2^40}}

    o1 = {{hi there, foo}, {-3, 1099511627776}}

    o1 : List

    i2 : netList f

         +--------+-------------+
    o2 = |hi there|foo          |
         +--------+-------------+
         |-3      |1099511627776|
         +--------+-------------+

    i3 : netList(f,Boxes=>false)

    o3 = hi therefoo
         -3      1099511627776

    i4 : netList(f,Boxes=>true,HorizontalSpace=>1,VerticalSpace=>1)

         +----------+---------------+
         |          |               |
    o4 = | hi there | foo           |
         |          |               |
         +----------+---------------+
         |          |               |
         | -3       | 1099511627776 |
         |          |               |
         +----------+---------------+

    i5 : netList(f,Boxes=>true,Alignment=>Center)

         +--------+-------------+
    o5 = |hi there|     foo     |
         +--------+-------------+
         |   -3   |1099511627776|
         +--------+-------------+

    i6 : netList(f,Boxes=>true,BaseRow=>1)

         +--------+-------------+
         |hi there|foo          |
         +--------+-------------+
    o6 = |-3      |1099511627776|
         +--------+-------------+

    i7 : netList(f,Boxes=>{{1},{1}})

    o7 = hi there|foo
         --------+-------------
         -3      |1099511627776

    i8 : netList apply(5,i->apply(i+1,j->(i,j)))

         +------+------+------+------+------+
    o8 = |(0, 0)|      |      |      |      |
         +------+------+------+------+------+
         |(1, 0)|(1, 1)|      |      |      |
         +------+------+------+------+------+
         |(2, 0)|(2, 1)|(2, 2)|      |      |
         +------+------+------+------+------+
         |(3, 0)|(3, 1)|(3, 2)|(3, 3)|      |
         +------+------+------+------+------+
         |(4, 0)|(4, 1)|(4, 2)|(4, 3)|(4, 4)|
         +------+------+------+------+------+

    i9 : netList(apply(5,i->apply(i+1,j->(i,j))),Boxes=>{true,false})

         ------------------------------
    o9 = (0, 0)
         ------------------------------
         (1, 0)(1, 1)
         ------------------------------
         (2, 0)(2, 1)(2, 2)
         ------------------------------
         (3, 0)(3, 1)(3, 2)(3, 3)
         ------------------------------
         (4, 0)(4, 1)(4, 2)(4, 3)(4, 4)
         ------------------------------

## See also

- net -- format for printing, as a net

## Ways to use netList:

- `netList(VisibleList)`

## For the programmer

The object netList is a method function with options.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/netList-doc.m2:41:0.