Ticket #11583 (closed defect: fixed)

Opened 23 months ago

Last modified 16 months ago

Sagetex example has some nontrivial dependancy's

Reported by: mderickx Owned by: tbd
Priority: blocker Milestone: sage-4.8
Component: packages: standard Keywords:
Cc: ddrake, fbissey Work issues:
Report Upstream: N/A Reviewers: John Palmieri
Authors: Maarten Derickx, Dan Drake Merged in: sage-4.8.alpha3
Dependencies: Stopgaps:

Description (last modified by jdemeyer) (diff)

As mentioned in  https://groups.google.com/forum/#!topic/sage-devel/6I3BD32YZWI the standard sagetex example included in sage depends on tkz-berge which can be hard to get it working correctly. This might scare of sagetex users while tkz-berge is only needed for the graph (with vertices and edges) part of sage. The new version of the example .tex disables this part of the example by default with some notice on how to enable it.


Merge the new spkg:  http://sage.math.washington.edu/home/jdemeyer/spkg/sagetex-2.3.1.p1.spkg

Attachments

example.tex Download (13.3 KB) - added by mderickx 23 months ago.
dot-sagetex-dot-sage.patch Download (1.1 KB) - added by pipedream 18 months ago.
Fix instructions in example.tex on new file extension (.sage -> .sagetex.sage)

Change History

Changed 23 months ago by mderickx

comment:1 Changed 23 months ago by vbraun

  • Cc ddrake added
  • Type changed from PLEASE CHANGE to defect
  • Authors set to Maarten Derickx

comment:2 Changed 19 months ago by jhpalmieri

  • Priority changed from major to blocker

A related, but not completely identical problem: self-tests fail for the sagetex package. If I set SAGE_CHECK=yes and then do sage -f sagetex..., I get a message like

/Applications/sage_builds/sage/local/bin/sage-preparse: File 'example.sage' is missing
python: can't open file 'example.py': [Errno 2] No such file or directory
Error running Sage on example.sage!

I know how to fix this problem, but self-tests still fail if various .sty files are missing, as they are on sage.math:

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

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

Enter file name: 
! Emergency stop.
<read *> 

I think the following patch fixes the first problem, but not the second:

  • spkg-check

    diff --git a/spkg-check b/spkg-check
    a b fi 
    4646cd src 
    4747 
    4848typeset example.tex 
    49 checkdotsage example 
     49checkdotsage example.sagetex 
    5050 
    51 typeset sagetexpackage.dtx 
    52 checkdotsage sagetexpackage 
     51typeset sagetex.dtx 
     52checkdotsage sagetex.sagetex 
    5353 
    5454# if we get here, we assume the .sage files are good, and exit successfully 
    5555exit 0 

I'm upgrading this to a blocker, since all of our spkg's should pass self-tests. (Well, except for Python...)

comment:3 Changed 19 months ago by fbissey

  • Cc fbissey added

Changed 18 months ago by pipedream

Fix instructions in example.tex on new file extension (.sage -> .sagetex.sage)

comment:4 Changed 18 months ago by pipedream

Above a separate patch to fix example.sage to example.sagetex.sage in the file example.tex.

comment:5 Changed 18 months ago by ddrake

  • Status changed from new to needs_review

I have an updated spkg that should fix both the file extension and tkz-berge/TikZ problems:  http://sage.math.washington.edu/home/drake/code/sage/st/sagetex-2.3.1.p1.spkg.

To fully review, you'll need to look at some revisions to the source code; start with rev 3cc4e629401e "remove \sageplot default of .75\textwidth; make the user decide":  https://bitbucket.org/ddrake/sagetex/changesets and look over all the revs to the tip. (A bunch are simple one-liners; don't be discouraged.)

Then you'll need to look over the most recent two revisions to the spkg repository (inside the spkg).

Finally, install the spkg with SAGE_CHECK=yes and make sure it works.

comment:6 Changed 18 months ago by jhpalmieri

  • Status changed from needs_review to positive_review
  • Reviewers set to John Palmieri
  • Authors changed from Maarten Derickx to Maarten Derickx, Dan Drake

Looks good to me. Passes doctests on several different machines where it failed before, some of which have recent TeX distributions, some of which have old TeX distributions, and some of which are missing TeX altogether.

The only part of the change log that I don't completely understand (because I don't know LaTeX style files very well) is  this one, but I tried putting some Sage code in a labeled math environment, like align, and it worked fine.

comment:7 Changed 18 months ago by jdemeyer

Please give clear instructions in the ticket description of what should be merged.

comment:8 Changed 18 months ago by jhpalmieri

  • Description modified (diff)

comment:9 Changed 18 months ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.8.alpha3

comment:10 Changed 16 months ago by jdemeyer

  • Description modified (diff)
Note: See TracTickets for help on using tickets.