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:
>
> > When using init_printing(latex_mode='equation') the equations are numbered 
> > in
> > the output and these appear sequentially in pdf output produced by 
> > nbconvert.
> >
> > Is there a way to label the equations so they can be referred to in 
> > markdown cells?
>
> Perusing the source it seems not.
>
> I think it might be possible to implement this by adding a label="foo" keyword
> argument to sympy.display(...).

That sounds reasonable.

Although maybe this is already possible with init_printing() by
setting latex_printer to something that adds the label.

>
> 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
> 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.

Aaron Meurer

>
> Glenn
>
> --
> 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/89dce9a0-548d-4d46-a862-a3305438bd44%40gmail.com.

-- 
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/CAKgW%3D6JscKAE03JTQUoXLfVqbZrY9dJQuAoCA4AUU4C8k3bxTg%40mail.gmail.com.

Reply via email to