How do I write math in Technical Notes?

How do I write math in Technical Notes?

As a specific example, I want to write what in LaTeX would be $C \theta/{\rm SNR}$

You should just have to put it into the math context.
Example of math equation on its own line:

… math::
SNR = \frac{C } {\sqrt{C/g + ( B/g + \sigma^2_{instr}) , n_{eff}}}
n_{eff} = 2.266 , (FWHM_{eff} / pixelScale)^2

But in this case you have to be sure to include a blank line after the last line and watch the indentation.

Example of math inline:

pixel, :math:`\sigma_{instr}` is t

(:math: context, then backticks around the thing to be math-ed).

1 Like

Perfect. Thank you.

image is :math:`C\theta/{\rm SNR}`.  Note that we here

where the final backtick needs to be followed by a space or a ‘.’, and not another word. E.g.,

image is :math:`C\theta/`SNR.  Note that we here

does not work.

Guidance for writing inline math in reStructuredText can be found in the Developer Guide.

The Guide also specifically mentions the quirk you just mentioned on not being able to write inline syntax without a space afterwards, and offers this solution:

Inline markup also needs to be surrounded by white space, though trailing punctuation is fine. You can get around this with an escaped space that is otherwise invisible, For example one\ *word* renders as onward.

That is, placing a \ before a space will remove the space, allowing inline syntax to apply within a word.

To answer your original question, I’d also recommend using the \mathrm LaTeX command. For example:

:math:`C \theta/\mathrm{SNR}`

I’ve added an extra section specifically on math in reStructuredText with covers both inline and display math (including multiple aligned equations) to the DM Developer Guide.