Macaulay2 » Documentation
Packages » Macaulay2Doc » reading the documentation » headlines
next | previous | forward | backward | up | index | toc

headlines -- display a table of documentation headlines

Description

This method displays a table of documentation headlines for the input list.

If the input is a list of documentation nodes generated using the function about, the method help(ZZ) can be used to select and open one of the documentation nodes.

i1 : headlines about firstFunction

o1 = 0.  "FirstPackage :: firstFunction"       -- a silly first function
     1.  "FirstPackage :: firstFunction(ZZ)"   -- a silly first function
i2 : help 0

o2 = FirstPackage::firstFunction -- a silly first function
     *****************************************************

       * Usage: 
             firstFunction n
       * Inputs:
           * n, an "integer", 
       * Outputs:
           * a "string", a silly string, depending on the value of n

     Here we show an example.

     +------------------------+
     |  i1 : firstFunction 1  |
     |                        |
     |  o1 = Hello World!     |
     +------------------------+
     |  i2 : firstFunction 0  |
     |                        |
     |  o2 = D'oh!            |
     +------------------------+
     ------------------------------------------------------------------------

     The source of this document is in FirstPackage.m2:53:0.

This is also true for a list of symbols generated using the function apropos.

i3 : headlines apropos "hilbert"

o3 = 0.  "Polyhedra :: hilbertBasis"           -- computes the Hilbert basis of a Cone
     1.  "Macaulay2Doc :: hilbertFunction"     -- the Hilbert function                
     2.  "Macaulay2Doc :: hilbertPolynomial"   -- compute the Hilbert polynomial      
     3.  "Macaulay2Doc :: hilbertSeries"       -- compute the Hilbert series          

If the input was a list of method keys generated using methods, then in addition the method code(ZZ) can be used to view the source code for the selected entry.

i4 : headlines methods syz

o4 = 0.  "Macaulay2Doc :: syz(GroebnerBasis)"   -- retrieve the syzygy matrix
     1.  "Macaulay2Doc :: syz(Matrix)"          -- compute the syzygy matrix 
i5 : code 1

o5 = -- code for method: syz(Matrix)
     ../../../../Macaulay2/m2/matrix2.m2:310:24-313:65: --source code:
     syz Matrix := Matrix => opts -> (f) -> (
         c := runHooks((syz, Matrix), (opts, f));
         if c =!= null then return c;
         error "syz: no strategy implemented for this type of matrix")
     | -- code for strategy: syz(Matrix,Strategy => Default)
     | ../../../../Macaulay2/m2/matrix2.m2:315:44-321:6: --source code:
     | addHook((syz, Matrix), Strategy => Default, (opts, f) -> (
     |      if not isFreeModule target f or not isFreeModule source f
     |      then error "expected map between free modules";
     |      if ring f === ZZ or not isHomogeneous f
     |      then syz gb (f, opts, Syzygies=>true)
     |      else mingens image syz gb (f, opts, Syzygies=>true)
     |      ))

See also

Ways to use headlines:

  • headlines(List)

For the programmer

The object headlines is a method function.


The source of this document is in Macaulay2Doc/functions/help-doc.m2:349:0.