Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#11583 closed defect (fixed)

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 Merged in: sage-4.8.alpha3
Authors: Maarten Derickx, Dan Drake Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

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 (2)

example.tex (13.3 KB) - added by mderickx 10 years ago.
dot-sagetex-dot-sage.patch (1.1 KB) - added by pipedream 9 years ago.
Fix instructions in example.tex on new file extension (.sage -> .sagetex.sage)

Download all attachments as: .zip

Change History (12)

Changed 10 years ago by mderickx

comment:1 Changed 10 years ago by vbraun

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

comment:2 Changed 9 years 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 9 years ago by fbissey

  • Cc fbissey added

Changed 9 years ago by pipedream

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

comment:4 Changed 9 years ago by pipedream

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

comment:5 Changed 9 years 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 9 years ago by jhpalmieri

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

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 9 years ago by jdemeyer

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

comment:8 Changed 9 years ago by jhpalmieri

  • Description modified (diff)

comment:9 Changed 9 years ago by jdemeyer

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

comment:10 Changed 9 years ago by jdemeyer

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