-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat(docutils): Use section_self_link
(needs html5 + CSS update)
#79
base: master
Are you sure you want to change the base?
Conversation
On second thought, it seems with this current PR version, the user would need to write a
@cpitclaudel What source file should be edited in alectryon to make this option a default? |
Thanks, looks good! Two questions:
Should we make it the default? I'd prefer to not deviate too much from plain docutils. If we must it can be done in docutils.py, in the custom writer inherited from html5writer, I think. The advantage of doing it there is that it can still be overwritten by a setting. |
Hi @cpitclaudel
IMHO, I'd vote for it. Indeed:
Yes! but I improved it a bit → adding the
OK, I see what you mean, but:
However, regarding the implementation, I'm not sure I could extend/refine this PR as quickly as you could… |
@cpitclaudel friendly ping :) WDYT? |
Hi @cpitclaudel, how are you? would you have the time to help integrating this contribution? AFAIAC, this will be a very important enhancement for our Alectryon-based courses. |
Hi @erikmd, sorry for the delay :'( Here's the issue: docutils HTML5 compiler does a lot of things differently from the HTML4 one, so people who just recompile an existing document with custom stylesheets will see breakage. I don't know when/whether docutils will switch, but I'm not sure we should until they do. You say it will enhance courses, but why not use it already? IIUC all you need is to add the additional flag and add the short CSS to your own stylesheets? Sorry if I missed something (and sorry I took so look to reply) |
Hi @cpitclaudel, no worries and thanks for your reply! Some thoughts:
|
that's a good point :) but we did so already: https://github.com/pfitaxel/tapfa-coq-alectryon/blob/master/docutils.conf |
so the main goal of this PR was to let more users to benefit from this feature… including users that are not aware of the docutils internals. And even I agree with you that backward-compatibility is paramount, I guess this PR (which is incomplete BTW, so in draft mode, cf. this comment) should not incur "regressions"… WDYT? |
ping @cpitclaudel, would you have some time to help me improve/finalize this PR if you agree with my last comments? |
Sorry, I had lost track of this. So there are three things here:
|
I recently noticed that despite the availability of this new feature in docutils: https://sourceforge.net/p/docutils/feature-requests/28/
(which BTW can only be enabled in HTML5), the feature requested in #19 was not yet possible in alectryon.
So, this PR makes it possible to benefit from this feature in Alectryon as well by default.
Cc @cpitclaudel