Signatures options¤
show_signature¤
- Type
boolTrue
Show methods and functions signatures.
Without it, just the function/method name is rendered.
plugins:
- mkdocstrings:
handlers:
matlab:
options:
show_signature: true
::: matlab_callable
options:
show_signature: false
myfunction.m
function myfunction(x)
% Example function
arguments
x myClass % An instance of myClass
end
end
Preview
::: myfunction
options:
show_signature: true
myfunction(x)
¤
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |
::: myfunction
options:
show_signature: false
myfunction
¤
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |
show_signature_annotations¤
- Type
boolFalse
Show the type annotations in methods and functions signatures.
Since the heading can become quite long when annotations are rendered, it is usually best to separate the signature from the heading.
plugins:
- mkdocstrings:
handlers:
matlab:
options:
show_signature_annotations: true
::: path.to.module
options:
show_signature_annotations: false
myfunction.m
function myfunction(x)
% Example function
arguments
x myClass % An instance of myClass
end
end
Preview
::: myfunction
options:
show_signature: true
show_signature_annotations: true
myfunction(x: myClass)
¤
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |
::: myfunction
options:
show_signature: true
show_signature_annotations: false
myfunction(x)
¤
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |
separate_signature¤
- Type
boolFalse
Whether to put the whole signature in a code block below the heading.
plugins:
- mkdocstrings:
handlers:
python:
options:
separate_signature: false
::: path.to.module
options:
separate_signature: true
myfunction.m
function myfunction(x)
% Example function
arguments
x myClass % An instance of myClass
end
end
Preview
::: myfunction
options:
show_signature: true
separate_signature: true
myfunction ¤
myfunction(x)
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |
::: myfunction
options:
show_signature: true
separate_signature: false
myfunction(x)
¤
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |
signature_crossrefs¤
Whether to render cross-references for type annotations in signatures.
When signatures are separated from headings with the separate_signature option and type annotations are shown with the show_signature_annotations option, this option will render a cross-reference (link) for each type annotation in the signature.
plugins:
- mkdocstrings:
handlers:
matlab:
options:
separate_signature: true
show_signature_annotations: true
signature_crossrefs: false
::: path.to.module
options:
separate_signature: true
show_signature_annotations: true
signature_crossrefs: true
myfunction.m
function myfunction(x)
% Example function
arguments
x myClass % An instance of myClass
end
end
Preview
::: myfunction
options:
separate_signature: true
show_signature_annotations: true
signature_crossrefs: true
myfunction ¤
myfunction(x: myClass)
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |
::: myfunction
options:
separate_signature: true
show_signature_annotations: true
signature_crossrefs: false
myfunction ¤
myfunction(x: myClass)
Example function
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
myClass
|
An instance of myClass |
required |