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

Fix link to tutorial in PDF docs. This fixes #35736. #36066

Merged
merged 3 commits into from
Aug 13, 2023

Conversation

jhpalmieri
Copy link
Member

Fix link to PDF tutorial (English) in docs. This should fix #35736.

The document name for the English tutorial is broken: it doesn't match the name expected in the index.html file for the documentation. So we change the document name.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 10, 2023

There's nothing wrong with src/doc/en/tutorial/conf.py. Instead of that, make this change

--- a/src/doc/en/website/root_index.html
+++ b/src/doc/en/website/root_index.html
@@ -113,7 +113,7 @@ title="SageMath Mathematical Software">
 <div class="cell lang"><a href='html/en/index.html'>English</a></div>
 <div class="cell doc">
 <div class='entry lang-en'><a href='pdf/en/a_tour_of_sage/a_tour_of_sage.pdf'>A Tour of Sage</a></div>
-<div class='entry lang-en'><a href='pdf/en/tutorial/SageTutorial.pdf'>Tutorial</a></div>
+<div class='entry lang-en'><a href='pdf/en/tutorial/sage_tutorial.pdf'>Tutorial</a></div>
 <div class='entry lang-en'><a href='pdf/en/thematic_tutorials/thematic_tutorials.pdf'>Thematic Tutorials</a></div>
 <div class='entry lang-en'><a href='pdf/en/prep/prep_tutorials.pdf'>PREP Tutorials</a></div>
 <div class='entry lang-en'><a href='pdf/en/constructions/constructions.pdf'>Constructions</a></div>

This file is copied to local/share/doc/sage/index.html by

root_index_file = os.path.join(html_output_dir, '../../../index.html')

@jhpalmieri
Copy link
Member Author

Is there a reason to prefer one of these approaches to the other? They both just change a single string. Note that there is no particular consistency for naming conventions for PDF documents; in some languages we use "tutorial.pdf" (or variants) and in others "SageTutorial.pdf" (or variants).

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 11, 2023

As filenames, I think that sage_tutorial.tex and sage_tutorial.pdf are consistent with others, at least with documents in English. See src/doc/en/a_tour_of_sage/conf.py.

It seems that the issue is caused simply by a mistake I made to the file src/doc/en/website/root_index.html, which I created. Hence it is the file to be fixed.

@jhpalmieri
Copy link
Member Author

Seems like bikeshedding — the two changes seem equivalent to me — but here is your proposed version.

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 11, 2023

Thanks.

@github-actions
Copy link

Documentation preview for this PR (built with commit 97c9900; changes) is ready! 🎉

@vbraun vbraun merged commit caf98de into sagemath:develop Aug 13, 2023
@mkoeppe mkoeppe added this to the sage-10.1 milestone Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tutorial link of pdf pointing to wrong document name
4 participants