Hi Glenn, all.

On Mon, Jan 15, 2024 at 11:06 PM Aaron Meurer <asmeu...@gmail.com> wrote:
> On Mon, Jan 15, 2024 at 1:48 PM Glenn Ramsey <glenn.ramsey...@gmail.com> 
> wrote:
> > On 8/01/24 11:57, Glenn Ramsey wrote:

[...]

> > A question now is if I did that and referred to that in the markdown with
> > something like this: $\@ref(foo)$, would that get picked up? I'm really only

You should not use $-signs, because references don't happen in math
mode, they are part of normal text.
The correct usage is \ref{foo} or \eqref{foo}, without any additional
characters.

> > interested in this for static presentation output (pdf, html) so it wouldn't
> > matter if it doesn't work in interactive modes.
>
> I think the only way to know if it will work or not is to test it. I
> suspect it will work for pdf output, but I have no idea if it will
> work in the browser. It depends on whether MathJax supports \ref.

MathJax does support \ref{...}, as long as it is configured appropriately.

There are some examples in the nbsphinx docs:
https://nbsphinx.readthedocs.io/en/0.9.3/markdown-cells.html#Manual-Equation-Numbering

This also works on nbviewer (which is based on nbconvert):
https://nbviewer.org/urls/nbsphinx.readthedocs.io/en/0.9.3/markdown-cells.ipynb#Manual-Equation-Numbering

It also works on Github:
https://github.com/spatialaudio/nbsphinx/blob/0.9.3/doc/markdown-cells.ipynb

Of course, this also works for PDF output:
https://nbsphinx.readthedocs.io/_/downloads/en/0.9.3/pdf/

It does work on the old Jupyter notebook:
https://mybinder.org/v2/gh/spatialaudio/nbsphinx/0.9.3?filepath=doc/markdown-cells.ipynb

And it does work on JupyterLab:
https://mybinder.org/v2/gh/spatialaudio/nbsphinx/0.9.3?labpath=doc/markdown-cells.ipynb

cheers,
Matthias

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAFesC-ebkQn_JCMJevGzEQ7W_rHV0MvABQm1fiAxD%2BBt-w8Aow%40mail.gmail.com.

Reply via email to