Skip to content

Signatures options¤

show_signature¤

Show methods and functions signatures.

Without it, just the function/method name is rendered.

in mkdocs.yml (global configuration)
plugins:
- mkdocstrings:
    handlers:
      matlab:
        options:
          show_signature: true
or in docs/some_page.md (local configuration)
::: 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¤

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.

in mkdocs.yml (global configuration)
plugins:
- mkdocstrings:
    handlers:
      matlab:
        options:
          show_signature_annotations: true
or in docs/some_page.md (local configuration)
::: 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¤

Whether to put the whole signature in a code block below the heading.

in mkdocs.yml (global configuration)
plugins:
- mkdocstrings:
    handlers:
      python:
        options:
          separate_signature: false
or in docs/some_page.md (local configuration)
::: 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.

in mkdocs.yml (global configuration)
plugins:
- mkdocstrings:
    handlers:
      matlab:
        options:
          separate_signature: true
          show_signature_annotations: true
          signature_crossrefs: false
or in docs/some_page.md (local configuration)
::: 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