On Mon, Aug 6, 2018 at 9:35 PM, Andrew <[email protected]> wrote: > I want to write some jupyter notebooks that show how to use latex and I > would like ,y "readers" to be able to compile code snippets and see its > output. I know that jupyter accepts a (fairly large) subset of latex as > markdown but as far as I can see no one has written a latex kernel for > jupyter. I have consulted the official kernel list at > https://github.com/jupyter/jupyter/wiki/Jupyter-kernels and googled in all > ways that I can think of but it seems that a latex kernel does not exist. > Have I missed it?
For what it's worth, we've had functionality that is very similar to this in Sage for a long time, and by now it is pretty mature (i.e., deals with edge cases and what people care about): https://github.com/sagemath/sage/blob/master/src/sage/misc/latex.py#L1034 This is used by Sage worksheets to provide a %latex mode here: https://github.com/sagemathinc/cocalc/blob/master/src/smc_sagews/smc_sagews/sage_salvus.py#L1449 That makes it so in a Sage Worksheet (in https://cocalc.com), one can type %latex at the beginning of the cell, and the rest of the cell is interpreted using latex. In any case, if somebody is ever going to implement this from scratch as a Jupyter kernel, it can be helpful to be aware of (or at least play with) the implementation in Sage... -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CACLE5GD%2BZJi23kP_ADd22RcpfDkM-Z7TM75gQzNxpXcm-C1%2B1A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
