Opened 9 years ago

Closed 9 years ago

#15562 closed defect (fixed)

PDF docs breakage in CachedMethod

Reported by: Volker Braun Owned by:
Priority: major Milestone: sage-6.1
Component: documentation Keywords:
Cc: Simon King Merged in:
Authors: Volker Braun Reviewers: Simon King
Report Upstream: N/A Work issues:
Branch: u/vbraun/cached_method_docs (Commits, GitHub, GitLab) Commit: 90c5549704229895b2c24d19ecb908acf4031c53
Dependencies: #14912 Stopgaps:

Status badges

Description


Change History (23)

comment:1 Changed 9 years ago by Volker Braun

Authors: Volker Braun
Component: PLEASE CHANGEdocumentation
Status: newneeds_review
Type: PLEASE CHANGEdefect

comment:2 Changed 9 years ago by Volker Braun

Branch: u/vbraun/cached_method_docs
Cc: Simon King added
Commit: 90c5549704229895b2c24d19ecb908acf4031c53

New commits:

90c5549fix documentation

comment:3 Changed 9 years ago by Simon King

  1. How can one build the pdf documentation?
  2. Does your branch commute with #14912? Or is it on top of #14912?

comment:4 Changed 9 years ago by Volker Braun

Dependencies: #14912

On top of #14912, but then thats already closed...

sage -docbuild all pdf

comment:5 in reply to:  3 Changed 9 years ago by Simon King

Replying to SimonKing:

  1. How can one build the pdf documentation?
  2. Does your branch commute with #14912? Or is it on top of #14912?

Oops, I confused two tickets. #14912 does not change cachefunc.pyx.

Anyway, if you tell me how to build the pdf documentation, I can soon give a positive review (the doc fix is straight forward and of course correct, but nonetheless I should see the actual pdf).

comment:6 in reply to:  4 Changed 9 years ago by Simon King

Replying to vbraun:

On top of #14912, but then thats already closed...

sage -docbuild all pdf

Thanks!

comment:7 Changed 9 years ago by Simon King

sage -docbuild all pdf fails, after numerous warnings naming "combinat". Eventually, I get

! LaTeX Error: File `framed.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.19 \RequirePackage
                    {ifthen}^^M
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on combinat.log.
make: *** [combinat.pdf] Fehler 1
Traceback (most recent call last):
  File "/home/king/Sage/git/sage/src/doc/common/builder.py", line 1452, in <module>
    getattr(get_builder(name), type)()
  File "/home/king/Sage/git/sage/src/doc/common/builder.py", line 273, in _wrapper
    getattr(get_builder(document), name)(*args, **kwds)
  File "/home/king/Sage/git/sage/src/doc/common/builder.py", line 472, in _wrapper
    pool.map_async(build_ref_doc, L, 1).get(99999)
  File "/home/king/Sage/git/sage/local/lib/python/multiprocessing/pool.py", line 554, in get
    raise self._value
RuntimeError: failed to run $MAKE all-pdf in /home/king/Sage/git/sage/src/doc/output/latex/en/reference/combinat

So, what to do?

comment:8 Changed 9 years ago by Volker Braun

You need a number of TeX packages...

comment:9 Changed 9 years ago by Simon King

PS: The numerous warnings are

[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/free_module'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/combinatorial_algebra'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/descent_algebra'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/diagram_algebras'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/symmetric_group_algebra'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/symmetric_group_representations'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/schubert_polynomial'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/partition_algebra'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/algebras/iwahori_hecke_algebra'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/algebras/nil_coxeter_algebra'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/algebra.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/algebras/affine_nil_temperley_lieb'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/cluster_algebras.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/cluster_algebra_quiver/quiver_mutation_type'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/cluster_algebras.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/cluster_algebra_quiver/quiver'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/cluster_algebras.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/cluster_algebra_quiver/cluster_seed'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/affine'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/crystals'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/direct_sum'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/letters'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/elementary_crystals'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/fast_crystals'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/highest_weight_crystals'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/kirillov_reshetikhin'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/kyoto_path_model'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/littelmann_path'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/alcove_path'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/spins'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/tensor_product'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/generalized_young_walls'
[combinat ] /home/king/Sage/git/sage/src/doc/en/reference/combinat/crystals.rst:4: WARNING: toctree contains reference to nonexisting document u'sage/combinat/crystals/infinity_crystals'

and a many more errors to come.

comment:10 Changed 9 years ago by Volker Braun

The warnings are normal in the PDF build, we only require a pdf to come out at the end...

comment:11 in reply to:  8 Changed 9 years ago by Simon King

Replying to vbraun:

You need a number of TeX packages...

\RequirePackage{ifthen} does not result in an error when I put it into a TeX file.

Another error:

[schemes  ] Sphinx error:
[schemes  ] 'ascii' codec can't decode byte 0xc3 in position 8736: ordinal not in range(128)

comment:12 Changed 9 years ago by Simon King

I guess \usepackage{framed} is the problem. The question is whether Sage can require the framed package for building the pdf documentation. I simply got LaTeX (apparently without framed) from openSuse, and I don't think that openSuse is an exotic Linux distribution.

comment:13 Changed 9 years ago by Simon King

I installed framed manually. Next, the threeparttable package is missing.

I assume that these packages aren't standard (otherwise they would be part of the texlive package). Shouldn't it be provided by Sage, then?

comment:14 Changed 9 years ago by Simon King

Next: wrapfig. Annoying.

comment:15 Changed 9 years ago by Volker Braun

I don't think anybody prints out the PDF as a reference, but its a reasonable attempt at catching some doc errors.

comment:16 Changed 9 years ago by Volker Braun

PS: You'll probably encounter #15563

comment:17 Changed 9 years ago by Simon King

Now it seems I've got all required packages. But alas:

[610] [611] [612]) [613] (./graphs.aux) )
(see the transcript file for additional information){/usr/share/texmf/fonts/enc
/dvips/base/8r.enc}</usr/share/texmf/fonts/type1/public/amsfonts/cm/cmex10.pfb>
</usr/share/texmf/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texmf/f
onts/type1/public/amsfonts/cm/cmmi5.pfb></usr/share/texmf/fonts/type1/public/am
sfonts/cm/cmmi7.pfb></usr/share/texmf/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</usr/share/texmf/fonts/type1/public/amsfonts/cm/cmr5.pfb></usr/share/texmf/fon
ts/type1/public/amsfonts/cm/cmr7.pfb></usr/share/texmf/fonts/type1/public/amsfo
nts/cm/cmsy10.pfb></usr/share/texmf/fonts/type1/public/amsfonts/cm/cmsy5.pfb></
usr/share/texmf/fonts/type1/public/amsfonts/cm/cmsy7.pfb></usr/share/texmf/font
s/type1/public/amsfonts/symbols/msam10.pfb></usr/share/texmf/fonts/type1/public
/amsfonts/symbols/msbm10.pfb></usr/share/texmf/fonts/type1/urw/courier/ucrb8a.p
fb></usr/share/texmf/fonts/type1/urw/courier/ucrr8a.pfb></usr/share/texmf/fonts
/type1/urw/courier/ucrro8a.pfb></usr/share/texmf/fonts/type1/urw/helvetic/uhvb8
a.pfb></usr/share/texmf/fonts/type1/urw/helvetic/uhvbo8a.pfb></usr/share/texmf/
fonts/type1/urw/helvetic/uhvr8a.pfb></usr/share/texmf/fonts/type1/urw/times/utm
b8a.pfb></usr/share/texmf/fonts/type1/urw/times/utmr8a.pfb></usr/share/texmf/fo
nts/type1/urw/times/utmri8a.pfb>
Output written on graphs.pdf (617 pages, 1845038 bytes).
Transcript written on graphs.log.

and then it hangs.

Advice? Is this what is fixed by #15563?

comment:18 Changed 9 years ago by Simon King

PS: Ctrl-C and then restarting the docbuild had the same result. Transcript written on graphs.log., and the rest is silence. So, how could I possibly test #15562 or #15563?

comment:19 Changed 9 years ago by Volker Braun

It hangs if there was an error. Not particularly user friendly, search for "Error" in your terminal...

comment:20 in reply to:  19 Changed 9 years ago by Simon King

Replying to vbraun:

It hangs if there was an error. Not particularly user friendly, search for "Error" in your terminal...

Ahaaa! It is

! Missing { inserted.
<to be read again> 
                   _
l.2129 ...}, then \code{hash(c)} will access $C.__
                                                  hash__$ and bind
? 
! Emergency stop.
<to be read again> 
                   _
l.2129 ...}, then \code{hash(c)} will access $C.__
                                                  hash__$ and bind
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on misc.log.

This is in cachefunc.pyx without your branch.

comment:21 Changed 9 years ago by Simon King

Meanwhile it worked a lot better (using a merge of this branch with the branch from #15563).

Now, I need to get Cyrillic encoding for my LaTeX installation...

comment:22 Changed 9 years ago by Simon King

Reviewers: Simon King
Status: needs_reviewpositive_review

After installing some LaTeX packages (Cyrillic has been the last missing bit) and merging both this branch and the branch from #15563, the pdf documentation has built, and a quick look at the manual for CachedMethod (searching for __get__) had a good result. The fix is straight forward. Hence: Positive review.

comment:23 Changed 9 years ago by Volker Braun

Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.