-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Fixed the doc sets/recursively_enumerated_set.py
#37331
Fixed the doc sets/recursively_enumerated_set.py
#37331
Conversation
I'm not sure creating a new media is a good idea, since it's hard to change. Instead, try following how combinat/bijectionist does it. You can see the result here |
Hi,
But, it was kind of difficult to manage the alignments, font size, inverted commas etc in the pyx file itself. I will try to implement it and commit. Thank you. |
Cool! Could you try to remove the bullet points alltogether? Also, the arrow labelled 2) must point to an arrow, not to a vertex of the tree. In fact, either the two arrows labelled 1) and 2) (which "explain" the diagram) should look very different from the other arrows, or should be removed entirely (together with the text "an initial element" and "a function ..."). I would actually vote for removing them: the concept is not all that difficult to understand to warrant such a complicated figure. |
Great job! Thank you for looking so carefully through the whole text! Did you use a tool or did you do it by hand? |
Thank you for your comments :-) The initial part was done by me; later I used Grammarly to cross-check things. It suggested some modifications like replacing 'depth first search' with 'depth-first search', 'non negative' with 'non-negative' and so on, which I did not appreciate by going through some other documentation of Sage. Also, I wanted to say that maybe some Sphinx directive like |
It would be cool if you could finish this, so it makes it into the upcoming release! |
Thank you! One question: it might be even better to simplify to single quotes, as one might be used to from working with sage. I.e.,
(and without the \hspace) What do you think? |
Consider the following:
Some observations:
|
I'd go with
It is not all that nice, but it's readable and very simple. |
Cool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! I would like to wait for the linter, to make sure that there is no trailing whitespace. Unfortunately, I do not have the rights to approve the workflow, it seems!
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> Modified the doc in `sets/recursively_enumerated_set.py ` (in the section `Example: Forest structure`) to display the HTML nicely; also corrected some typos. <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> Sphinx `.. MATH::` directive is unable to render the `picture` environment in LaTeX, as a result of which the image is not begin displayed nicely in [sets/recursively_enumerated_set](https://doc.sagema th.org/html/en/reference/sets/sage/sets/recursively_enumerated_set.html) . I generated the pdf and png of the required image by compiling the LaTeX code and attached the image. The inspiration is from `Figure: The five complete binary trees with four leaves` in [combinat/tutorial](http s://doc.sagemath.org/html/en/reference/combinat/sage/combinat/tutorial.h tml). <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> This PR resolves an open issue, that is -- sagemath#37084. <!-- If your change requires a documentation PR, please link it appropriately. --> The link of the original documentation -- [sets/recursively_enumerated_s et](https://doc.sagemath.org/html/en/reference/sets/sage/sets/recursivel y_enumerated_set.html). ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. (Not required it seems.) - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> None. <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#37331 Reported by: Janmenjaya Panda Reviewer(s): Martin Rubey
90cdce0
to
de98279
Compare
It seems that there have been too many commits. |
No, I don't think so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think so either. It has useful information of things that have been tried.
@tscrim, did you look at the generated html? I think it looks terrible :-( I am unhappy about the |
Hello, I want to make two points.
This is a temporary solution. I believe we should include the definitions of
This seems like a more robust and better solution concerning the examples than the existing one. This will address both the issues raised by @mantepse and @tscrim and give a better overview of the doc.
Please consider putting |
Also, the Lint test is failing. I suppose, once again there is some trailing whitespace. |
@mantepse I don’t think it looks that bad, but okay. Let me again suggest keeping how the original version was but changing all of the headings to be I don’t think it is useful to duplicate documentation with the (precise) definitions. They are examples. If someone wants the definitions, they can look later in the doc. I agree with @mantepse that the quotes in the latex looks pretty bad in the html. I would remove them all and replace the empty with The lint test is very reliable. If it is failing, then it needs to be fixed. |
@mantepse What do you think about the doc now? |
Looks OK! Possibly the module heading should be |
Is it required to change the file name from |
NO! |
Documentation preview for this PR (built with commit 162c152; changes) is ready! 🎉 |
@mantepse Any additional comments? I am ready to set this to a positive review. |
Perfect! |
Modified the doc in
sets/recursively_enumerated_set.py
(in the sectionExample: Forest structure
) to display the HTML nicely; also corrected some typos.Sphinx
.. MATH::
directive is unable to render thepicture
environment in LaTeX, as a result of which the image is not begin displayed nicely in sets/recursively_enumerated_set. I generated the pdf and png of the required image by compiling the LaTeX code and attached the image. The inspiration is fromFigure: The five complete binary trees with four leaves
in combinat/tutorial.Fixes #37084.
The link of the original documentation -- sets/recursively_enumerated_set.
📝 Checklist
⌛ Dependencies
None.