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

Save Lean example contexts for later #42

Open
david-christiansen opened this issue Feb 10, 2024 · 1 comment
Open

Save Lean example contexts for later #42

david-christiansen opened this issue Feb 10, 2024 · 1 comment

Comments

@david-christiansen
Copy link
Collaborator

Right now, Lean example contexts exist in an ephemeral environment extension that contains an environment. This is fine if all the examples exist in a single file, but it doesn't work well if one wants to e.g. have a blog post or book chapter that builds on another one.

Serializing the saved environment to a .olean isn't really a good idea. So I plan to add an option to save the syntax of the commands that gave rise to the environment and export them for replay while rendering the other environment.

This is not great for complex running examples (like in Functional Programming in Lean), though. For that, we need a better solution. It could look like writing the example in an examples file with named commands, as the book's text is now, but extracting them into Verso via metaprogramming rather than regexps. This needs further thought.

@david-christiansen
Copy link
Collaborator Author

#50 at least works around this, and may supersede it. I'll try it on bigger examples and then get back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant