Add side-by-side layout: TeX content left, Lean declarations right#90
Open
faabian wants to merge 2 commits intoPatrickMassot:masterfrom
Open
Add side-by-side layout: TeX content left, Lean declarations right#90faabian wants to merge 2 commits intoPatrickMassot:masterfrom
faabian wants to merge 2 commits intoPatrickMassot:masterfrom
Conversation
Introduce a two-column layout for blueprint pages that displays the LaTeX theorem content on the left and the corresponding Lean doc-gen declarations (statements, equations, structure fields) in a side panel on the right. Key changes: - blueprint.py: Add functions to load and parse doc-gen4 declaration data (load_docgen_declarations, parse_docgen_statement) and extract HTML/plain-text for declaration headers, equations, and structure fields. Add rewrite_lean_links() Jinja2 filter that rewrites doc-gen links at render time: links to declarations present in the blueprint point to the blueprint URL, while others point to the project's doc-gen docs. - blueprint.jinja2s: Add a thmenv template that supports injecting extra header content (thm_header_extras_tpl, thm_header_hidden_extras_tpl) and a right-side panel (thm_side_panel_tpl) next to each theorem environment wrapper. - blueprint.css: Add ~490 lines of CSS for the two-column CSS Grid layout. Theorem wrappers span both columns with their own internal grid. Includes responsive fallback to single-column on smaller screens, wider TOC sidebar, and styling for Lean declaration headers, equations, structure fields, and link types. - _config.yml: Fix baseurl to use the project name subpath so GitHub Pages serves the site at the correct URL.
Author
|
For visibility, feel free to close |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a two-column layout for blueprint pages that displays the LaTeX theorem content on the left and the corresponding Lean doc-gen declarations (statements, equations, structure fields) in a side panel on the right.
Key changes:
blueprint.py: Add functions to load and parse doc-gen4 declaration data (load_docgen_declarations, parse_docgen_statement) and extract HTML/plain-text for declaration headers, equations, and structure fields. Add rewrite_lean_links() Jinja2 filter that rewrites doc-gen links at render time: links to declarations present in the blueprint point to the blueprint URL, while others point to the project's doc-gen docs.
blueprint.jinja2s: Add a thmenv template that supports injecting extra header content (thm_header_extras_tpl, thm_header_hidden_extras_tpl) and a right-side panel (thm_side_panel_tpl) next to each theorem environment wrapper.
blueprint.css: Add ~490 lines of CSS for the two-column CSS Grid layout. Theorem wrappers span both columns with their own internal grid. Includes responsive fallback to single-column on smaller screens, wider TOC sidebar, and styling for Lean declaration headers, equations, structure fields, and link types.
_config.yml: Fix baseurl to use the project name subpath so GitHub Pages serves the site at the correct URL.