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

Add a --pygments-style option #62

Merged
merged 10 commits into from
Aug 20, 2021
Merged

Add a --pygments-style option #62

merged 10 commits into from
Aug 20, 2021

Conversation

cpitclaudel
Copy link
Owner

Alectryon used to hardcode a specific pygments style, which I developed based on another package because Coq has more syntactic categories than other languages. This PR solves of GH-58 by making the stylesheet customizable, but with that done it makes no sense to call the resulting stylesheet tango_subtle.css, so I've renamed that to pygments.css.

It won't be a problem for anyone who is using Alectryon or in Sphinx, on the command lines, but custom setups may need a bit more work. Please let me know if you run into trouble (especially if I can make anything easier before the next release).

Closes GH-58.

* alectryon/cli.py (gen_docutils): Skip embedded assets.
(copy_assets): Add support for dynamically-generated assets.
(dump_html_standalone): Don't embed pygments stylesheet.
(build_parser): Add a new --pygments-stylesheet option.
* alectryon/docutils.py (register_stylesheets): Support dynamic assets.
* alectryon/html.py (ASSETS): Change "tango_subtle" to "pygments".
* alectryon/latex.py (ASSETS): Same.

Suggested-by: @gares
Note that this changes spacing in Coqdoc documents very slightly, since these
used to use an embedded stylesheet (which included the pre {} style) rather than
tango_subtle.css (which did not).
This script and the files that it generated are obsolete now that we have
--pygments-style.
@cpitclaudel cpitclaudel merged commit cea4ed4 into master Aug 20, 2021
@cpitclaudel cpitclaudel deleted the gh-58-pygments branch August 20, 2021 19:39
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

Successfully merging this pull request may close these issues.

1 participant