## IntroductionTop, Main, Index

Ruff! (Runtime function formatter) is a documentation generation system for programs written in the Tcl programming language. Ruff! uses runtime introspection in conjunction with comment analysis to generate reference manuals for Tcl programs.

Ruff! is covered by a liberal BSD open-source license that permits use for any purpose.

## Why Ruff!Top, Main, Index

In comparison with other source code based documentation generators, Ruff! produces documentation that not only requires less duplication of effort from the programmer, but is also more complete, more accurate and more maintainable.

- Comments in source code do not have to be reproduced for documentation purposes.
- Ruff! requires minimal markup in the comments making it lightweight as well as reducing clutter.
- Supports inline formatting using Markdown syntax.
- Program elements like command arguments, defaults and class relationships like inheritance are automatically derived.
- Maintenance is less of a burden as documentation is automatically updated with source modification such as changes to defaults, addition of mix-ins etc.

On the output side,

- Ruff! supports multiple formats (currently HTML, Markdown and nroff).
- Generated documentation can optionally be split across multiple pages.
- Hyperlinks between program elements, and optionally source code, make navigation easy and efficient.
- A table of contents and optional searchable index permits quick location of command and class documentation.
- Class relationships are extracted and the full API for a class, with inherited and mixed-in methods, is flattened and summarized.
- The HTML formatter includes multiple themes switchable by the end-user.

The Ruff! documentation itself is produced with Ruff!. Examples of other packages documented with Ruff! include cffi, CAWT, iocp, obex, promise.

## DocumentationTop, Main, Index

The ::ruff reference page describes the Ruff! documentation generation API. The ::ruff::sample page shows some sample output for some of the Ruff! features along with the associated source code from which it was generated.

## DownloadsTop, Main, Index

Download the Ruff! distribution from https://sourceforge.net/projects/magicsplat/files/ruff/. The source code repository is at https://github.com/apnadkarni/ruff.

## InstallationTop, Main, Index

To install, extract the distribution to a directory listed in your Tcl `auto_path` variable.

## HistoryTop, Main, Index

Changes in v2.0:

- Added Nroff formatter for Unix manpages.
- Added themes with end-user selection.
- Added end-user control for positioning navigation pane.
- Classes defined with metaclasses are recognized.
- Proc and method synopsis overrides, for example to distinguish invocation options.
- Web assets are linked by default (option `-linkassets`) instead of being embedded.
- Incompatibility: Generated HTML and CSS templates have changed and require modern browsers (no Internet Explorer support).
- Incompatibility: The `-stylesheets` option is not supported.
- Incompatibility: The `-navigation` option only takes `scrolled` `sticky` as valid values.
- Incompatibility: The `-output` option is not supported. Use `-outfile` and `-outdir` instead.
- Incompatibility: Output file names use hyphen as a separator instead of underscore.
- Bug fixes

## CreditsTop, Main, Index

Ruff! is authored by Ashok P. Nadkarni.

It uses the `textutil` package from tcllib, a modified version of the Markdown inline parser from the Caius project, and portions of the `nroff` generator from Tcllib's `doctools` package.