next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
SimpleDoc > docExample

docExample -- an example documentation node

Synopsis

Description

The variable docExample is a String containing an example of the use of doc(String) to write a documentation page, visible here.
i1 : docExample

o1 = doc ///
       Key
         (simpleDocFrob,ZZ,Matrix)
       Headline
         a sample documentation node
       Usage
         x = simpleDocFrob(n,M)
       Inputs
         n:ZZ
           positive
         M:Matrix
           which is square
       Outputs
         x:Matrix
           A block diagonal matrix with {\tt n} 
           copies of {\tt M} along the diagonal
       Consequences
        Item
         The first side effect of the function, if any, is described here.
        Item
         The second side effect of the function is described here, and so on.
       Description
        Text
          Each paragraph of text begins with "Text".  The following 
          line starts a sequence of Macaulay2 example input lines.
          However, see @TO (matrix,List)@.
        Example
          M = matrix"1,2;3,4";
          simpleDocFrob(3,M)
        Text
          See @ TO "docExample" @ for the code used to create this documentation.
       Caveat
         This is not a particularly useful function.
       SeeAlso
         matrix
         (directSum,List)
     ///

See also

For the programmer

The object docExample is a string.