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

Cannot reproduce #2

Open
Coda-Coda opened this issue Jan 19, 2023 · 3 comments
Open

Cannot reproduce #2

Coda-Coda opened this issue Jan 19, 2023 · 3 comments

Comments

@Coda-Coda
Copy link

Hi, unfortunately I am struggling to reproduce even very simple uses of Alectryon in generating slides based on this repo. Currently the error I get on make docs is:

... alectryon/docutils.py", line 631, in init_generator
    raise NotImplementedError("Unknown output format")
NotImplementedError: Unknown output format

One possiblity is that I'm using the wrong version of hovercraft or Alectryon. I cannot see a .opam file. I am using Alectryon v1.4.0 and hovercraft 2.7.

Any help/tips would be much appreciated if you have the time, thanks.

My reST file looks similar to the following:

:title: Example
:css: talk.css
:css: alectryon.css
:css: tango_subtle.css
:js-body: alectryon.js


.. :auto-console: true

----

  .. coq::

    Check nat. (* .unfold *)

My full attempt is at https://github.com/Coda-Coda/Eth-Eng-Grp-Talk-2023
Previously I thought I had it working, but that was actually just static .. code:: coq blocks.

@cpitclaudel
Copy link
Owner

Thanks for the report. I should be able to get to this on Monday. Let me know if it's higher priority than that.

@Coda-Coda
Copy link
Author

Thanks, I managed to get it working today actually so it's not urgent. The fix involved editing Alectryon as follows.
Original docutils.py in Alectryon v1.4.0 line 624 (in definition of init_generator):

        if 'html' in formats:

Fixed:

        if {'html', 'xml'} & formats:

For context see: https://github.com/cpitclaudel/alectryon/blob/v1.4.0/alectryon/docutils.py#L624
I think this works now because hovercraft asks for XML format at some point which previously threw an error, seemingly providing HTML instead works fine for the slide building.
This feels like it may be a bit of a hack, so if you have time at some point to have a look at fixing it properly that would still be valuable to me. Thanks for your help!

@cpitclaudel
Copy link
Owner

Ah, this certainly rings a bell. I wonder if it's that hovercraft previously asked for HTML, perhaps…
The problem with requesting XML is that docutils XML isn't rich enough to capture the syntax highlighting and decoration that Alectryon does on Coq code.
I will look for sure, but your patch is perfect for now.

Coda-Coda added a commit to Coda-Coda/alectryon that referenced this issue Jan 23, 2023
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

2 participants