Opened 6 months ago

Closed 5 months ago

#32946 closed defect (fixed)

"sage --docbuild DOC html" is broken

Reported by: jhpalmieri Owned by:
Priority: blocker Milestone: sage-9.5
Component: documentation Keywords:
Cc: Merged in:
Authors: Matthias Koeppe Reviewers: John Palmieri, Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: ef2b25b (Commits, GitHub, GitLab) Commit: ef2b25b2ecfa1fd5850087d9c354c404d617efd0
Dependencies: Stopgaps:

Status badges

Description

If I do make doc-clean && make doc and then for example sage --docbuild tutorial html, first it successfully builds the html tutorial, but then it fails because it tries to build the PDF documentation. I also don't know where it is building the PDF docs, because local/share/docs/sage/latex does not exist.

% ./sage --docbuild tutorial html  
[tutorial ] building [html]: targets for 23 source files that are out of date
[tutorial ] updating environment: [extensions changed ('2')] 23 added, 0 changed, 0 removed
[tutorial ] Merging environment/index files...
[tutorial ] ... done (0 todos, 23 index, 17 citations, 0 modules)
[tutorial ] WARNING: display latex 'V=\\QQ^3': latex exited with error
[tutorial ] [stdout]
[tutorial ] This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2022/dev) (preloaded format=latex)
[tutorial ]  restricted \write18 enabled.
[tutorial ] entering extended mode
[tutorial ] (./math.tex
[tutorial ] LaTeX2e <2021-06-01> patch level 1
[tutorial ] L3 programming layer <2021-10-18>
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls
[tutorial ] Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/base/size12.clo))
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty)
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
[tutorial ] For additional information on amsmath, use the `?' option.
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty))
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty)
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty))
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amscls/amsthm.sty)
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/amssymb.sty
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty)
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/tools/bm.sty)
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
[tutorial ] No file math.aux.
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/umsa.fd)
[tutorial ] (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/umsb.fd)
[tutorial ] ! Undefined control sequence.
[tutorial ] l.13 \fontsize{12}{14}\selectfont $V=\QQ
[tutorial ]                                         ^3$
[tutorial ] [1] (./math.aux) )
[tutorial ] (see the transcript file for additional information)
[tutorial ] Output written on math.dvi (1 page, 336 bytes).
[tutorial ] Transcript written on math.log.
[tutorial ] WARNING: display latex '\\QQ^3': latex exited with error
[tutorial ] [stdout]
...

and then it tries to build math.dvi half a dozen times more, failing each time.

Change History (14)

comment:1 Changed 6 months ago by mkoeppe

I think these failures are actually coming from building images for formulas.

comment:2 Changed 6 months ago by mkoeppe

Looks like I broke this in #31356 by removing the setting of SAGE_DOC_MATHJAX from src/bin/sage-env.

comment:3 Changed 6 months ago by mkoeppe

  • Priority changed from major to blocker

comment:4 Changed 6 months ago by mkoeppe

As non-mathjax builds are clearly broken, how about we just remove this whole setting?

comment:5 Changed 6 months ago by mkoeppe

  • Branch set to u/mkoeppe/_sage___docbuild_doc_html__is_broken

comment:6 Changed 6 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to ef2b25b2ecfa1fd5850087d9c354c404d617efd0

New commits:

ef2b25bRemove handling of broken option SAGE_DOC_MATHJAX=no

comment:7 Changed 6 months ago by mkoeppe

  • Status changed from new to needs_review

comment:8 Changed 6 months ago by jhpalmieri

Good diagnosis, this fixes the problem for me. Should there be a deprecation warning for the --mathjax/-j option for docbuilding so that we can eventually delete it?

comment:9 Changed 6 months ago by mkoeppe

I don't think there's a need to deprecate it. At some point we may want to explore using https://pypi.org/project/sphinxcontrib-katex/ instead of mathjax, and then command line options of this type will be needed again

comment:10 follow-up: Changed 6 months ago by egourgoulhon

Thanks for dealing with this. Actually, I was about to post a message on sage-devel for I noticed two days ago that sage -docbuild reference/manifolds html fails with

OSError: WARNING: display latex 'K=\\RR': latex exited with error

while sage -docbuild reference/manifolds pdf succeeds, as well as make in generating the html doc. For the moment I cannot pull the ticket branch (*), but as soon as I can do it, I'll test the fix.

(*) the command git pull trac u/mkoeppe/_sage___docbuild_doc_html__is_broken hangs. Could this be an issue with trac.sagemath.doc this morning?

Last edited 6 months ago by egourgoulhon (previous) (diff)

comment:11 in reply to: ↑ 10 Changed 6 months ago by egourgoulhon

The trac server finally responded (after ~ 10 minutes!) and I confirm that this ticket fixes the issue with sage -docbuild ... html.

comment:12 Changed 6 months ago by jhpalmieri

  • Reviewers set to John Palmieri, Eric Gourgoulhon
  • Status changed from needs_review to positive_review

Great, let's merge it!

comment:13 Changed 6 months ago by mkoeppe

Thanks for reviewing!

comment:14 Changed 5 months ago by vbraun

  • Branch changed from u/mkoeppe/_sage___docbuild_doc_html__is_broken to ef2b25b2ecfa1fd5850087d9c354c404d617efd0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.