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

Sagetex example has some nontrivial dependancy's #11583

Closed
koffie opened this issue Jul 8, 2011 · 13 comments
Closed

Sagetex example has some nontrivial dependancy's #11583

koffie opened this issue Jul 8, 2011 · 13 comments

Comments

@koffie
Copy link

koffie commented Jul 8, 2011

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

CC: @dandrake @kiwifb

Component: packages: standard

Author: Maarten Derickx, Dan Drake

Reviewer: John Palmieri

Merged: sage-4.8.alpha3

Issue created by migration from https://trac.sagemath.org/ticket/11583

@koffie koffie added this to the sage-4.8 milestone Jul 8, 2011
@vbraun
Copy link
Member

vbraun commented Jul 8, 2011

Author: Maarten Derickx

@vbraun
Copy link
Member

vbraun commented Jul 8, 2011

comment:1

Attachment: example.tex.gz

@vbraun vbraun added the t: bug label Jul 8, 2011
@jhpalmieri
Copy link
Member

comment:2

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:

diff --git a/spkg-check b/spkg-check
--- a/spkg-check
+++ b/spkg-check
@@ -46,10 +46,10 @@ fi
 cd src
 
 typeset example.tex
-checkdotsage example
+checkdotsage example.sagetex
 
-typeset sagetexpackage.dtx
-checkdotsage sagetexpackage
+typeset sagetex.dtx
+checkdotsage sagetex.sagetex
 
 # if we get here, we assume the .sage files are good, and exit successfully
 exit 0

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

@pipedream
Copy link

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

@pipedream
Copy link

comment:4

Attachment: dot-sagetex-dot-sage.patch.gz

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

@dandrake
Copy link
Contributor

comment:5

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.

@jhpalmieri
Copy link
Member

comment:6

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.

@jhpalmieri
Copy link
Member

Changed author from Maarten Derickx to Maarten Derickx, Dan Drake

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@jdemeyer
Copy link

comment:7

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

@jhpalmieri

This comment has been minimized.

@jdemeyer
Copy link

Merged: sage-4.8.alpha3

@jdemeyer

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants