diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c48df384508..ce01ef031da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -161,6 +161,21 @@ Guidelines for a good tutorial: Note that the `Figure.show()` function needs to be called for a plot to be inserted into the documentation. +### Example code standards + +When editing documentation, use the following standards to demonstrate the example code: + +1. Python arguments, such as import statements, Boolean expressions, and function + arguments should be wrapped as ``code`` by using \`\` on both sides of the code. + Example: \`\`import pygmt\`\` results in ``import pygmt`` + +2. Literal GMT arguments should be **bold** by wrapping the arguments with \*\* + (two asterisks) on both sides. The argument description should be in *italicized* + with \* (single asterisk) on both sides. + Example: `**+l**\ *label*` results in **+l***label* + +3. Optional arguments are placed wrapped with [ ] (square brackets). +4. Arguments that are mutually exclusive are separated with a | (bar) to denote "or". ## Contributing Code