Opened 3 years ago
Closed 2 years ago
#29993 closed enhancement (fixed)
Enable MathJax in the TOC of Sage reference manual and documentation website
Reported by: | klee | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-9.2 |
Component: | documentation | Keywords: | |
Cc: | slelievre, jhpalmieri | Merged in: | |
Authors: | Kwankyu Lee | Reviewers: | John Palmieri |
Report Upstream: | N/A | Work issues: | |
Branch: | 6c881bc (Commits, GitHub, GitLab) | Commit: | 6c881bc53699c7628bc5a5fd8d681ee96c273231 |
Dependencies: | Stopgaps: |
Description (last modified by )
We do that. The trick is to add :math: role somewhere. Try to find it :-)
We also reorganize the TOC a bit while we are at it. In particular,
- the plane and space curves section is split away from elliptic and hyperelliptic curves section.
Attachments (2)
Change History (47)
comment:1 Changed 3 years ago by
Branch: | → u/klee/29993 |
---|
comment:2 Changed 3 years ago by
Commit: | → 18acfd22ef02eb181d225cdfc866b76461604cf1 |
---|
comment:3 Changed 3 years ago by
Commit: | 18acfd22ef02eb181d225cdfc866b76461604cf1 → 939308cceb93de2ff1f1bdb7166cbad19581f474 |
---|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
939308c | Enable MathJax in TOC page
|
comment:4 Changed 3 years ago by
Authors: | → Kwankyu Lee |
---|---|
Description: | modified (diff) |
Status: | new → needs_review |
comment:5 Changed 3 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 3 years ago by
Commit: | 939308cceb93de2ff1f1bdb7166cbad19581f474 → 49e32dae2cc5c8bb1c55c05ef2a9d41c0fd4155d |
---|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
49e32da | Enable MathJax in TOC page
|
comment:7 Changed 3 years ago by
Commit: | 49e32dae2cc5c8bb1c55c05ef2a9d41c0fd4155d → 3e266ab7f0ad339514ec5dbbe831772b02d23d69 |
---|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
3e266ab | Enable MathJax in TOC page
|
comment:8 Changed 3 years ago by
Commit: | 3e266ab7f0ad339514ec5dbbe831772b02d23d69 → 6e64dd8c1b237db68a72fb641bcae90d666494a1 |
---|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
6e64dd8 | Enable MathJax in TOC page
|
comment:9 Changed 2 years ago by
Cc: | slelievre added |
---|
comment:10 Changed 2 years ago by
Cc: | jhpalmieri added |
---|
comment:12 Changed 2 years ago by
Status: | needs_review → needs_work |
---|
comment:13 Changed 2 years ago by
Commit: | 6e64dd8c1b237db68a72fb641bcae90d666494a1 → 032df6c98836aff3f1c2339f208e3c101b0add4d |
---|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
032df6c | Enable MathJax in TOC page
|
comment:14 Changed 2 years ago by
Status: | needs_work → needs_review |
---|
comment:15 Changed 2 years ago by
Description: | modified (diff) |
---|
comment:16 follow-ups: 18 20 Changed 2 years ago by
Is there a reason why we want to enable mathjax on the TOC? Maybe the idea is that perhaps we have been omitting putting tex in the TOC before for some reason, and now we can? Or is there perhaps a particular reason?
comment:17 follow-up: 19 Changed 2 years ago by
It looks okay to me. I don't understand the changes in the themes; can you explain those?
comment:18 Changed 2 years ago by
Replying to DavidLowry:
Is there a reason why we want to enable mathjax on the TOC? Maybe the idea is that perhaps we have been omitting putting tex in the TOC before for some reason, and now we can? Or is there perhaps a particular reason?
There have been maths in the TOC, like p-adic and SL_2(Z). I guess they were not in tex just because mathjax didn't work. This ticket solves the problem.
comment:19 follow-up: 21 Changed 2 years ago by
Replying to jhpalmieri:
It looks okay to me. I don't understand the changes in the themes; can you explain those?
I split arithmetic geometry (elliptic and hyperelliptic curves) from algebraic geometry (plane and space curves). Other than this, the changes are minor and rephrasings.
If you have better suggestions on the changes, let me know.
comment:20 follow-up: 25 Changed 2 years ago by
Status: | needs_review → needs_work |
---|
Replying to DavidLowry:
Maybe the idea is that perhaps we have been omitting putting tex in the TOC before for some reason...
The pdf doc of the TOC does not still render the maths correctly with this ticket. That might be one of the reasons.
comment:21 follow-up: 22 Changed 2 years ago by
Replying to klee:
Replying to jhpalmieri:
It looks okay to me. I don't understand the changes in the themes; can you explain those?
I split arithmetic geometry (elliptic and hyperelliptic curves) from algebraic geometry (plane and space curves). Other than this, the changes are minor and rephrasings.
If you have better suggestions on the changes, let me know.
Sorry, my question was about the changes to the two files layout.html
.
comment:22 Changed 2 years ago by
Replying to jhpalmieri:
Replying to klee:
Replying to jhpalmieri:
It looks okay to me. I don't understand the changes in the themes; can you explain those?
I split arithmetic geometry (elliptic and hyperelliptic curves) from algebraic geometry (plane and space curves). Other than this, the changes are minor and rephrasings.
If you have better suggestions on the changes, let me know.
Sorry, my question was about the changes to the two files
layout.html
.
Ah! They are actually bug fixes. Look at this page:
https://doc.sagemath.org/html/en/reference/arithgroup/index.html
The vertical line, called sidebar toggle, separating the search box on the left and the main content on the right has wrong height and looks ugly.
The changes do the right job to compute the height of the sidebar toggle.
comment:23 Changed 2 years ago by
Commit: | 032df6c98836aff3f1c2339f208e3c101b0add4d → 59761821124227f84cc639a82b55d747f334b151 |
---|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
5976182 | Enable MathJax in TOC page
|
comment:24 Changed 2 years ago by
Status: | needs_work → needs_review |
---|---|
Summary: | Enable MathJax in the TOC of Sage reference manual → Enable MathJax in the TOC of Sage reference manual and Sage documentation site |
comment:25 Changed 2 years ago by
Replying to klee:
The pdf doc of the TOC does not still render the maths correctly with this ticket. That might be one of the reasons.
This is fixed now, by somewhat ad-hoc manner.
Along the way, I also resurrected the Sage reference manual website for pdfs, which has been broken (I might be guilty for this).
comment:26 follow-up: 27 Changed 2 years ago by
Would you mind changing :math:`e^\pi+1=0`
to :math:`e^{i\pi}+1=0`
?
comment:27 Changed 2 years ago by
Replying to jhpalmieri:
Would you mind changing
:math:`e^\pi+1=0`
to:math:`e^{i\pi}+1=0`
?
Of course, not. Thank you.
And I think I would call the line
\(s=\frac{1}{2}+it\)
just a "line", not an "imaginary line".
Okay.
comment:28 Changed 2 years ago by
To check the documentation website for pdf docs, run:
sage --docbuild reference pdf sage --docbuild website html
and open local/share/doc/sage/html/en/index.html
.
Running
sage --docbuild website pdf
generates a not-so-useful file local/share/doc/sage/pdf/en/website/sage_documentation.pdf
.
comment:29 Changed 2 years ago by
Commit: | 59761821124227f84cc639a82b55d747f334b151 → 1f116f9f6db3c4540bb9de33af043e0b53859c99 |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
1f116f9 | Fixes for reviewer comments
|
comment:30 Changed 2 years ago by
Commit: | 1f116f9f6db3c4540bb9de33af043e0b53859c99 → 6c881bc53699c7628bc5a5fd8d681ee96c273231 |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
6c881bc | Fixes missed in the previous commit
|
comment:31 Changed 2 years ago by
Summary: | Enable MathJax in the TOC of Sage reference manual and Sage documentation site → Enable MathJax in the TOC of Sage reference manual and documentation website |
---|
comment:32 follow-up: 33 Changed 2 years ago by
The html version looks good, but I'm having problems with the PDF. You should be able to run sage --docbuild all pdf
to have it build the html website file and everything else in PDF format.
- Broken before this ticket: in local/share/doc/sage/html/en/index.html, there are supposed to be PDF icons next to each document, as links leading to the PDF builds. Those are missing, because the file
_static/pdf.png
is missing. For some reason, it is not copied fromsrc/doc/en/website/static
tolocal/share/doc/sage/html/en/_static
.
- If I copy that file by hand, then the links are available, but the one for the reference manual (
local/share/doc/sage/pdf/en/reference/index.html
) is badly formatted. It is an html file with links to the different components in PDF format, but the table of contents basically appear twice, once badly and then once better, but not perfect.
- mathjax is not enabled in that main reference manual html file.
comment:33 follow-up: 34 Changed 2 years ago by
Replying to jhpalmieri:
The html version looks good, but I'm having problems with the PDF. You should be able to run
sage --docbuild all pdf
to have it build the html website file and everything else in PDF format.
- Broken before this ticket: in local/share/doc/sage/html/en/index.html, there are supposed to be PDF icons next to each document, as links leading to the PDF builds. Those are missing, because the file
_static/pdf.png
is missing. For some reason, it is not copied fromsrc/doc/en/website/static
tolocal/share/doc/sage/html/en/_static
.
Did you run sage --docbuild website html
? This copies the PDF icon.
- If I copy that file by hand, then the links are available, but the one for the reference manual (
local/share/doc/sage/pdf/en/reference/index.html
) is badly formatted. It is an html file with links to the different components in PDF format, but the table of contents basically appear twice, once badly and then once better, but not perfect.
I think you are seeing the old version.
comment:34 follow-ups: 35 39 Changed 2 years ago by
Replying to klee:
Replying to jhpalmieri:
The html version looks good, but I'm having problems with the PDF. You should be able to run
sage --docbuild all pdf
to have it build the html website file and everything else in PDF format.
- Broken before this ticket: in local/share/doc/sage/html/en/index.html, there are supposed to be PDF icons next to each document, as links leading to the PDF builds. Those are missing, because the file
_static/pdf.png
is missing. For some reason, it is not copied fromsrc/doc/en/website/static
tolocal/share/doc/sage/html/en/_static
.Did you run
sage --docbuild website html
? This copies the PDF icon.
This works, but it should not be necessary: I ran both sage --docbuild all html
and sage --docbuild all pdf
, and at least one of those should build the website page. See line 582 in src/sage_setup/docbuild/__init__.py
:
if format == 'pdf': # First build the website page. This only takes a few seconds. getattr(get_builder('website'), 'html')()
- If I copy that file by hand, then the links are available, but the one for the reference manual (
local/share/doc/sage/pdf/en/reference/index.html
) is badly formatted. It is an html file with links to the different components in PDF format, but the table of contents basically appear twice, once badly and then once better, but not perfect.I think you are seeing the old version.
The version I see has (for example) the new sentences "Welcome to the Sage reference manual. Here you find documentation for all of Sage <http://www.sagemath.org/>
_'s features, illustrated with lots of examples. A thematic index follows." So it's the new one. (I also ran make doc-clean
before building the documentation.) I'm attaching local/share/doc/sage/pdf/en/reference/index.html
.
Changed 2 years ago by
Attachment: | index.html added |
---|
comment:35 follow-up: 36 Changed 2 years ago by
Replying to jhpalmieri:
Replying to klee:
Replying to jhpalmieri:
The html version looks good, but I'm having problems with the PDF. You should be able to run
sage --docbuild all pdf
to have it build the html website file and everything else in PDF format.
- Broken before this ticket: in local/share/doc/sage/html/en/index.html, there are supposed to be PDF icons next to each document, as links leading to the PDF builds. Those are missing, because the file
_static/pdf.png
is missing. For some reason, it is not copied fromsrc/doc/en/website/static
tolocal/share/doc/sage/html/en/_static
.Did you run
sage --docbuild website html
? This copies the PDF icon.This works, but it should not be necessary: I ran both
sage --docbuild all html
andsage --docbuild all pdf
, and at least one of those should build the website page. See line 582 insrc/sage_setup/docbuild/__init__.py
:if format == 'pdf': # First build the website page. This only takes a few seconds. getattr(get_builder('website'), 'html')()
Strangely sage --docbuild all html
does not copy the PDF icon, but sage --docbuild website html` does. I don't know why. I didn't touch this part.
I think you are seeing the old version.
The version I see has (for example) the new sentences "Welcome to the Sage reference manual. Here you find documentation for all of
Sage <http://www.sagemath.org/>
_'s features, illustrated with lots of examples. A thematic index follows." So it's the new one. (I also ranmake doc-clean
before building the documentation.) I'm attachinglocal/share/doc/sage/pdf/en/reference/index.html
.
Right. It is strange. The file local/share/doc/sage/pdf/en/reference/index.html
is generated using the file local/share/doc/sage/html/en/website/index.html
as a template. Would you upload this file as well so that I can compare it with mine?
comment:36 Changed 2 years ago by
Replying to klee:
Strangely
sage --docbuild all html
does not copy the PDF icon, butsage --docbuild website html` does.
I withdraw this assertion. It is quite confusing...
Changed 2 years ago by
Attachment: | index.2.html added |
---|
local/share/doc/sage/pdf/en/reference/index.html
comment:37 Changed 2 years ago by
I added the file local/share/doc/sage/pdf/en/reference/index.html
, the right one.
comment:38 Changed 2 years ago by
I don't know why, but would you try specifically?
sage --docbuild reference pdf
comment:39 follow-up: 41 Changed 2 years ago by
Replying to jhpalmieri:
I ran both
sage --docbuild all html
andsage --docbuild all pdf
, and at least one of those should build the website page.
I now see what have happened to you. You did not run make build
, but only ran make doc-clean
, sage --docbuild all html
and sage --docbuild all pdf
. Right? Thus you built the new document by old docbuild code.
Please try again. This time you run make; sage --docbuild all pdf
.
Still the PDF icon would not appear. This problem existed before this ticket, I think. Anyway, this copies the PDF icon to the right place:
$ sage --docbuild website html [website ] building [html]: targets for 1 source files that are out of date [website ] Merging environment/index files... [website ] ... done (0 todos, 1 index, 0 citations, 0 modules) [website ] Merging js index files... [website ] ... done (15 js index entries) [website ] copying static files... ... done [website ] dumping search index in English (code: en)... done [website ] The HTML pages are in local/share/doc/sage/html/en/website. Build finished. The built documents can be found in .../local/share/doc/sage/html/en/website
Notice that "copying static files...". Then reload local/share/doc/sage/html/en/index.html
.
comment:40 Changed 2 years ago by
To see clearly the problem of the PDF icon:
Running make doc-clean; sage --docbuild all html
does not install the PDF icon to the right place, that is under local/share/doc/sage/html/en/website/_static
.
Running make doc-clean; sage --docbuild website html
does install the PDF icon to the right place, that is under local/share/doc/sage/html/en/website/_static
.
comment:41 follow-up: 42 Changed 2 years ago by
Replying to klee:
Replying to jhpalmieri:
I ran both
sage --docbuild all html
andsage --docbuild all pdf
, and at least one of those should build the website page.I now see what have happened to you. You did not run
make build
, but only ranmake doc-clean
,sage --docbuild all html
andsage --docbuild all pdf
. Right? Thus you built the new document by old docbuild code.Please try again. This time you run
make; sage --docbuild all pdf
.
You're right, this fixed it.
Still the PDF icon would not appear. This problem existed before this ticket, I think.
Right, that's what I said in comment:32. It would be nice to fix that, too.
comment:42 Changed 2 years ago by
Replying to jhpalmieri:
Still the PDF icon would not appear. This problem existed before this ticket, I think.
Right, that's what I said in comment:32. It would be nice to fix that, too.
I would love to see it fixed. But I have no idea of how to fix it. Do you have?
I suggest to fix it separately, and not to delay this ticket.
comment:44 Changed 2 years ago by
Reviewers: | → John Palmieri |
---|---|
Status: | needs_review → positive_review |
Okay, let's merge it.
comment:45 Changed 2 years ago by
Branch: | u/klee/29993 → 6c881bc53699c7628bc5a5fd8d681ee96c273231 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Branch pushed to git repo; I updated commit sha1. New commits:
Enable MathJax in TOC page