Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » writing documentation » handling hypertext » net
next | previous | forward | backward | up | index | toc

# net -- format for printing, as a net

- Usage:
    `net o`
- Inputs:
  - x, a thing,
- Outputs:
  - a net, obtained by formatting o for printing

## Description

This function is the primary function called upon by << to format expressions for printing. The default method provided by the system is to convert o to an Expression with expression and then to convert that to a Net.

A new method for formatting expressions of type T may be installed as follows:

    net T := x -> ...

The function provided by the user should return a Net or a String.

There are various such methods for formatting, but we don't document them separately.

## See also

- String -- the class of all strings
- Expression -- the class of all expressions
- AfterPrint -- top level method applied after printing
- toString -- convert to a string
- toExternalString -- convert to a readable string
- expression -- convert to an expression

## Ways to use net:

- `net(Thing)`
- net(String) -- convert a string to a net

## For the programmer

The object net is a method function with a single argument.

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