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 snippet generation #64

Closed
Casteran opened this issue Aug 23, 2021 · 4 comments
Closed

Latex snippet generation #64

Casteran opened this issue Aug 23, 2021 · 4 comments

Comments

@Casteran
Copy link
Member

I noticed that the movies/*.tex files contain all the Coq code and answers of the corresponding .v file (even the lines which are not contained in any snippet). I don't know wether it really affects the performance of document generation on
long modules (like theories/ordinals/Epsilon0/T1.v or theories/ordinals/Epsilon0/Paths.v.
Perhaps a "lazy" snippet generation is hard to design.

@Casteran
Copy link
Member Author

A possible workaround is to insert systematically comments (*| .. coq:: none |*) (*||*) around every snippet-free region.
I tried it on theories/ordinals/Epsilon0/Paths.v, and it reduced the size of doc/movies/Paths.v from more than 100k lines to just 353 !
I will proceed to a few more experiments.
Notice that this method forbids a user to use Alectryon to look into the so hidden parts of a library

@Zimmi48
Copy link
Member

Zimmi48 commented Aug 23, 2021

Yes, modules need to be reexecuted by Alectryon to extract snippets from them. I don't think that adding .. coq:: none can prevent that. The only solution I can see would be to cut these modules into smaller pieces.

@Casteran
Copy link
Member Author

Casteran commented Aug 23, 2021 via email

@cpitclaudel
Copy link
Contributor

OK, I think I’ll finish first the adaptation to Alectryon of the hydras part of the document (75% done already). Then, we can think about how to improve some details. This adaptation takes some time, because I noticed several inconsistencies to fix between the .v files and the Coqsrc and Coqanswer hand-made blocks. Thanks to Alectryon, the snippets inclusions are now consistent by construction 😀

Ah, this makes me very happy :)

I noticed that the movies/*.tex files contain all the Coq code and answers of the corresponding .v file (even the lines which are not contained in any snippet).

The revamped driver that I made in #71 doesn't generate these latex files any more; only the snippets.

Perhaps a "lazy" snippet generation is hard to design.

That's pretty much what #71 does :)

A possible workaround is to insert systematically comments (*| .. coq:: none |*) (*||*) around every snippet-free region.

… and indeed this should not be needed any more with #71.

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

3 participants