3

I want to put few lines of code sample in description of a parameter. It's possible to add :param, the :type, etc. But is it possible to add a block of comments in front of the :param? Here's the code that I'm using now:

    :param namespace_type: defines the category of the equation.
    :type namespace_type: str
    :param n_comp: number of compartments in the neuron
    :type n_comp: int
    :param layer_idx: indices of the layers in which neuron resides.
    :type layer_idx: array
    :param eq_template_soma: the template equation used for soma in brian2:
    dgeX/dt = -geX/tau_eX : siemens
    dgealphaX/dt = (geX-gealphaX)/tau_eX : siemens
    dgi/dt = -gi/tau_i : siemens
    dgialpha/dt = (gi-gialpha)/tau_i : siemens

which produces this and as you can see the equation part (which is in the format that is used in brian2 module) is shown as unaligned plain text. I want to put those equations as a code sample.

Kennet Celeste
  • 4,593
  • 3
  • 25
  • 34

0 Answers0