executablebooks / meta

A community dedicated to supporting tools for technical and scientific communication and interactive computing
https://executablebooks.org
128 stars 164 forks source link

Numbered/labeled theorems, propositions and lemmas, as well as a proof environment. #43

Open jstac opened 4 years ago

jstac commented 4 years ago

This is one of the core deliverables from the proposal, to make our output on par with LaTeX. A typical PDF example is shown below. Further comments are given after the image.

image

Regarding how this is rendered --- which I guess depends on the theme, hence CCing @drdrij --- for PDF this looks great but probably not for HTML. (For starters, italics rarely look nice with sans serif fonts.) To me, for HTML, this style looks better:

image

chrisjsewell commented 4 years ago

This should be implemented, but... not in this package. It would be a separate sphinxcontrib package, that you would use 'adjacent' to myst-parser/myst-nb. From a quick google, this is an existing package: https://sphinxcontrib-proof.readthedocs.io, but obviously the formatting is not particularly great.

jstac commented 4 years ago

That does the job, although I like the HTML representation pictured above a lot better.

So, assuming we use such a package, we can use the directives supplied by the package directly in MyST?

If so, how about I shift this issue to https://github.com/ExecutableBookProject/meta/issues?

chrisjsewell commented 4 years ago

Yeh go for it. If MyST-Parser is doing its job properly, you should be able to create/import any sphinx extension (and its roles/directives) that you care to think of 😁

jstac commented 4 years ago

Also related is the eq highlighting and show/hide proofs on https://en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation.

(search for "The Euler–Lagrange equation, then, is given by").

I would love to have these in case anyone has time to look into it. CC @drdrij @AakashGfude