Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeX macro dependency parsing? #480

Closed
kapple19 opened this issue Sep 23, 2020 · 5 comments
Closed

LaTeX macro dependency parsing? #480

kapple19 opened this issue Sep 23, 2020 · 5 comments
Labels
one day Closed because we won't work on it soon, will be opened again later.

Comments

@kapple19
Copy link

kapple19 commented Sep 23, 2020

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.

@Moelf
Copy link
Contributor

Moelf commented Sep 23, 2020

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

@kapple19
Copy link
Author

kapple19 commented Sep 23, 2020

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.

@kapple19
Copy link
Author

kapple19 commented Sep 23, 2020

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.

@kapple19
Copy link
Author

kapple19 commented Sep 23, 2020

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?

@fonsp
Copy link
Owner

fonsp commented Sep 23, 2020

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.

@fonsp fonsp closed this as completed Sep 23, 2020
@fonsp fonsp added the one day Closed because we won't work on it soon, will be opened again later. label Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
one day Closed because we won't work on it soon, will be opened again later.
Projects
None yet
Development

No branches or pull requests

3 participants