Anonymous avatar Anonymous committed a9c2d85

Fix stupid bug so that \sage actually works; fix percent sign buglet;
update README and Makefile for new CTAN version.

Comments (0)

Files changed (5)

 dest=/home/drake/texmf/tex/latex/sagetex/
 dtxs=$(wildcard *.dtx)
 # the subdir stuff makes the tarball have the directory correct
-srcs=../sagetex/example.tex ../sagetex/README ../sagetex/sagetexpackage.dtx ../sagetex/sagetexpackage.ins
-ver=2.2
+srcs=example.tex README sagetexpackage.ins
+ver=2.2.1
 
 .SUFFIXES:
 
 
 clean: 
 	latexcleanup clean .
-	rm -fr sage-plots-for-* E2.sobj *.pyc sagetex.tar.gz sagetex.py sagetex.pyc sagetex.sty makestatic.py sagetexparse.py extractsagecode.py dist MANIFEST remote-sagetex.py
+	rm -fr sage-plots-for-* E2.sobj *.pyc sagetex.tar.gz sagetex.py sagetex.pyc sagetex.sty makestatic.py sagetexparse.py extractsagecode.py dist MANIFEST remote-sagetex.py auto
 
 # the following bit requires SHELL=bash
 auxclean:
 	@echo
 	@echo Did you turn off Imagemagick in example.tex?
 	@echo
-	tar zcf sagetex.tar.gz $(srcs) ../sagetex/example.pdf ../sagetex/sagetexpackage.pdf
+	tar zcf sagetex.tar.gz --transform "s|^|sagetex/|" $(srcs) $(dtxs) example.pdf sagetexpackage.pdf
 
 # otherwise, make gets confused since there's a file named "test"
 .PHONY: test
 To use the SageTeX package with your own documents, see the
 "Installation" section of the documentation.
 
-This works builds on a lot of work by others; see the "Credits" section
+SageTeX now includes `remote-sagetex.py', a plain Python script that
+allows you to use a remote Sage server instead of a local Sage
+installation, so now you can use SageTeX on any computer with TeX and
+Python 2.6 installed.
+
+This work builds on a lot of work by others; see the "Credits" section
 of the documentation for credits. The source code may be modified and
 distributed under the terms of the GPL, v2 or later; the documentation
 may be modified and distributed under a Creative Commons Attribution -

remote-sagetex.dtx

 % class.
 %
 % \begin{macro}{RemoteSage}
+% \changes{v2.2.1}{2009/06/20}{Fix stupid bug in \texttt{do\_inline()}
+% so that we actually write output to .sout file}
+%
 % This is pretty simple; it's more or less a translation of the examples
 % in \texttt{sage/server/simple/twist.py}.
 %    \begin{macrocode}
         return result
 
     def do_inline(self, code):
-        return self._do_cell(' latex({0})'.format(code))
+        return self._do_cell(' print(latex({0}))'.format(code))
 
     def do_block(self, code):
         result = self._do_cell(code)
         if (not line.startswith(' _st_.goboom') and
             not line.startswith("print 'SageT")):
             h.update(line)
+%    \end{macrocode}
+% Putting the |{1}| in the string, just to replace it with |%|, seems a
+% bit weird, but if I put a single percent sign there, Docstrip won't
+% put that line into the resulting |.py| file---and if I put two percent
+% signs, it replaces them with |\MetaPrefix| which is |##| when this
+% file is generated. This is a quick and easy workaround.
+%    \begin{macrocode}
     sout += """%{0}% md5sum of corresponding .sage file
-% (minus "goboom" and pause/unpause lines)
-""".format(h.hexdigest())
+{1} (minus "goboom" and pause/unpause lines)
+""".format(h.hexdigest(), '%')
 
 printc('Writing .sout file...')
 with open(jobname + '.sout', 'w') as soutf:

sagetexpackage.dtx

 %<latex>\ProvidesPackage{sagetex}
 %<python>__version__ = """
 %<*latex|python>
-  [2009/06/17 v2.2 embedding Sage into LaTeX documents]
+  [2009/06/17 v2.2.1 embedding Sage into LaTeX documents]
 %</latex|python>
 %<python>"""
 %<*driver>
       long_description="""The SageTeX package allows you to embed code,
   results of computations, and plots from the Sage mathematics
   software suite (http://sagemath.org) into LaTeX documents.""",
-      version='2.2',
+      version='2.2.1',
       author='Dan Drake',
       author_email='ddrake@member.ams.org',
       url='http://mathsci.kaist.ac.kr/~drake',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.