Skip to content
Snippets Groups Projects
Unverified Commit 778ee4c0 authored by Chris Holdgraf's avatar Chris Holdgraf Committed by GitHub
Browse files

DOC: Clarify numbered references for sections (#1616)


Co-authored-by: default avatarpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent c684012e
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ Here are several ways to reference this content: ...@@ -127,7 +127,7 @@ Here are several ways to reference this content:
| `` Here is [](my-table-ref) `` | Here is [](my-table-ref) | | `` Here is [](my-table-ref) `` | Here is [](my-table-ref) |
| `` Here is [My cool table](my-table-ref) `` | Here is [My cool table](my-table-ref) | | `` Here is [My cool table](my-table-ref) `` | Here is [My cool table](my-table-ref) |
| `` Here is {numref}`my-table-ref` `` | Here is {numref}`my-table-ref` | | `` Here is {numref}`my-table-ref` `` | Here is {numref}`my-table-ref` |
| `` Here is {numref}`Custom Table %s text ` `` | Here is {numref}`Custom Table %s text <my-table-ref>` | | `` Here is {numref}`Custom Table %s text <my-table-ref>` `` | Here is {numref}`Custom Table %s text <my-table-ref>` |
## Reference content files ## Reference content files
...@@ -199,10 +199,32 @@ For example, see the following references: ...@@ -199,10 +199,32 @@ For example, see the following references:
## Number your references ## Number your references
You can add **numbered references** to either [tables](references:tables) or [figures](references:figures). To add a numbered reference to a table or figure, use the `{numref}` role. If you wish to [use custom text](references:custom-text), add `%s` as a placeholder for the number. You can add **numbered references** to [tables](references:tables), [figures](references:figures), or [sections](references:numbered-sections).
To add a numbered reference to a table or figure, use the `{numref}` role.
See the examples in each section below for usage. ### Use custom text with numbered references
If you are [using custom text](references:custom-text) with your references, use `%s` as a placeholder for the number.
::::{admonition} Example
**Markdown**:
```md
Here's {numref}`Custom Table %s text <my-table-ref>`.
```
**Result**:
Here's {numref}`Custom Table %s text <my-table-ref>`.
::::
See more examples in the sections linked above.
(references:numbered-sections)=
### Reference numbered sections
To reference numbered sections, you should first [enable numbered sections in your Table of Contents](toc/numbering).
Then, you may use the `{numref}` role in the same way that you use it for Figures or Tables.
(references:markdown-syntax)= (references:markdown-syntax)=
## Reference with markdown link syntax ## Reference with markdown link syntax
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment