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, y)
    % Example function
    arguments
        x myClass % An instance of myClass
        y string 
    end
end
Preview
::: myfunction
    options:
      show_signature: true

myfunction(x, y) ¤

Example function

::: myfunction
    options:
      show_signature: false

myfunction ¤

Example function

show_signature_types¤

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_types: true
or in docs/some_page.md (local configuration)
::: path.to.module
    options:
      show_signature_types: false
myfunction.m
function myfunction(x, y)
    % Example function
    arguments
        x myClass % An instance of myClass
        y string 
    end
end
Preview
::: myfunction
    options:
      show_signature: true
      show_signature_types: true

myfunction(x: myClass, y: string) ¤

Example function

::: myfunction
    options:
      show_signature: true
      show_signature_types: false

myfunction(x, y) ¤

Example function

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, y)
    % Example function
    arguments
        x myClass % An instance of myClass
        y string 
    end
end
Preview
::: myfunction
    options:
      show_signature: true
      separate_signature: true

myfunction ¤

(x, y)

Example function

::: myfunction
    options:
      show_signature: true
      separate_signature: false

myfunction(x, y) ¤

Example function

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_types 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_types: true
          signature_crossrefs: false
or in docs/some_page.md (local configuration)
::: path.to.module
    options:
      separate_signature: true
      show_signature_types: true
      signature_crossrefs: true
myfunction.m
function myfunction(x, y)
    % Example function
    arguments
        x myClass % An instance of myClass
        y string 
    end
end
Preview
::: myfunction
    options:
      separate_signature: true
      show_signature_types: true
      signature_crossrefs: true

myfunction ¤

(x: myClass, y: string)

Example function

::: myfunction
    options:
      separate_signature: true
      show_signature_types: true
      signature_crossrefs: false

myfunction ¤

(x: myClass, y: string)

Example function