Pluto.jl: LaTeX macro dependency parsing?

Created on 23 Sep 2020  路  5Comments  路  Source: fonsp/Pluto.jl

Suppose one cell has

md"``\newcommand{\R}{\mathbb{R}}``"

then my second cell has

md"$\R$"

If I update my first cell to

md"\newcommand{\R}{\mathbb{R}^2}``"

then upon saving, can the second cell update its content based on the LaTeX macro update?

Would this be hard/long to implement? I think it would be an extra layer of work and parsing alongside what it already does for Julia cell dependency parsing. Otherwise, just update all text fields which as a suggestion feels silly.

one day

All 5 comments

I think this is too "external". Imagine you write to a file, does Pluto need to check that file's mtime() in order to be "perfectly reactive"?
(Maybe a easier way is to re-run all pure md cells, or making that a short-cut.)

Maybe a easier way is to re-run all pure md cells, or making that a short-cut.

Haha, you and I updated our comments approximately simultaneously to suggest the same thing.

does Pluto need to check that file's mtime() in order to be "perfectly reactive"?

I don't know exactly how Pluto works. But my tall-order suggestion is to parse LaTeX macro dependency the same way it does for Julia variable dependency. So, yes? I suppose?

The short-order suggestion we both have of updating all md cells feels like an immature band-aid solution.

One issue I see with my tall-order suggestion is, suppose Julia detects dependency order of three cells let's call A, B, and C, in that order.

But for LaTeX macros it detects dependency in the reverse order, C, B, then A.

Would that be an issue?

It's a good suggestion, but currently not worth our efforts to work on this. It's just one of the many many possible side effects that code can have, and we don't have a mechanism for tracking those.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fonsp picture fonsp  路  4Comments

FelixBenning picture FelixBenning  路  3Comments

mossr picture mossr  路  6Comments

dpsanders picture dpsanders  路  6Comments

briochemc picture briochemc  路  6Comments