Documentation Anatomy of a Topic


Example

A topic is made up of several sections:

Title: What is the subject of the topic. Search existing topics first to make sure you are not repeating content that already exists. Topics already covered elsewhere on Stack Overflow may be deleted.

Versions: The versions where the material covered by the topic applies. You may pick from any of the versions listed in the introduction topic, or remove them all to indicate that the topic applies to all versions. See Versions for more information.

Introduction (optional): Explains the organizing principle of the contained examples to both readers and contributors. It resides above the examples and is limited to 500 characters.

Examples: Code examples for the topic. The code should be easy to read and well commented. Prose should also be used to explain the concepts needed to understand the code, but try not to be overly verbose.

One example per topic can be "pinned", meaning it floats above the other examples. This can be useful for an extended intro that is too long for the Introduction section.

Syntax (optional): It may be appropriate to include a syntax for the topic at hand. This section is always a code block and must be a markdown list:

- class.method(required_parameter [, optional])
- function f(int x) = { code defining what the function does }

Parameters (optional): When describing a topic as with syntax, it may also be appropriate to include parameter details. Parameters are formatted as a two-column table:

| Parameter | Details |  
| --------- | ------- | 
|       yin |    dark | 
|      yang |   light |

Remarks (optional): Any additional Information regarding the topic that may prove valuable to the end reader. Remarks are freeform.