{{Short description|Multi-language software documentation generator}} {{Multiple issues| {{notability|Products|date=January 2015}} {{primary sources|date=January 2015}} }}
{{Infobox Software | name = Natural Docs | logo = Natural-Docs-Logo.png | author = Greg Valure | latest release version = 2.3 | latest release date = September 11, 2023 | operating system = [[Cross-platform]] | programming language = [[C Sharp (programming language)|C#]] ([[Perl]] before 2.0)<ref>[https://www.naturaldocs.org/about/ About Natural Docs]</ref> | genre = [[Documentation generator]] | license = [[GNU Affero General Public License|AGPL]] | website = [http://www.naturaldocs.org NaturalDocs.org] }} '''Natural Docs''' is a multi-language [[documentation generator]]. It is written in [[C Sharp (programming language)|C#]] and available as [[free software]] under the terms of the [[GNU Affero General Public License|AGPL]]. It attempts to keep the comments written in [[source code]] just as readable as the generated documentation. It is written and maintained by Greg Valure.
==Background== Theoretically, Natural Docs can generate documentation from any language that can support comments, or from plain text files. When executed, it can automatically document functions, variables, classes, and inheritance from [[ActionScript]], [[C Sharp (programming language)|C#]], and [[Perl]] regardless of existing documentation in the source code. In all other languages, these need to be explicitly documented for them to be generated. It can generate documentation in [[HTML]], either with frames or without.
Unlike [[Javadoc]], it is not considered an industry standard for documenting in any language, although it can incorporate Javadoc documentation for languages with "full support."<ref>[https://www.naturaldocs.org/languages/ Natural Docs Languages]</ref> It is used by some hobbyists and companies, such as [[CNET|CNET Networks, Inc.]] and [[Iron Realms Entertainment]].<ref>[http://clientside.cnet.com/libraries/cnets-global-framework/ CNET's Global Framework] by [[CNET|CNET Networks, Inc.]] and [http://clientside.cnet.com/cnet.gf/docs/ generated documentation] using Natural Docs</ref><ref>[http://www.ironrealms.com/corp/other.htm Rapture] by [[Iron Realms Entertainment]] and [http://www.ironrealms.com/rapture/manual/ generated documentation] using Natural Docs</ref> It has gained popularity amongst [[ActionScript]] developers because no other free documentation generator exists that fully supports ActionScript and because it generates higher-quality output than similar generators that partially support the language, such as [[ROBODoc]].
==Example== This is an example of the documentation style: <syntaxhighlight lang="c"> /* * Function: Multiply * * Multiplies two integers. * * Parameters: * x - The first integer. * y - The second integer. * * Returns: * The two integers multiplied together. * * See Also: * <Divide> */ int Multiply (int x, int y) { return x * y; } </syntaxhighlight> For comparison, this is how the same thing would be documented with [[Javadoc]]: <syntaxhighlight lang="java"> /** * Multiplies two integers. * * @param x The first integer. * @param y The second integer. * @return The two integers multiplied together. * @see Divide */ int Multiply (int x, int y) { return x * y; } </syntaxhighlight>
==See also== *[[Comparison of documentation generators]]
==Notes and references== {{Reflist}}
==Further reading== *[http://www.naturaldocs.org Natural Docs Home Page] *[https://web.archive.org/web/20050603033339/http://www.naturaldocs.org/features.html List of features] *[https://web.archive.org/web/20150820064110/http://www.naturaldocs.org/languages.html List of supported languages]
[[Category:Free documentation generators]] [[Category:Source code documentation formats]] [[Category:Software using the GNU Affero General Public License]]