Anonymous avatar Anonymous committed 17336e9

Un-spkg-ification; I'm keeping separate this and the spkg stuff.

Comments (0)

Files changed (5)

 include example.pdf
 include example.tex
+include example.sage
 include extractsagecode.py
 include makestatic.py
 include sagetexpackage.dtx
 include sagetexpackage.ins
 include sagetexpackage.pdf
+include sagetexpackage.sage
 include sagetexparse.py
 include sagetex.sty
 include README.spkg

README.spkg

-This is the SageTeX package. It allows you to embed code, results of
-computations, and plots from the Sage mathematics software suite
-(http://sagemath.org) into LaTeX documents.
-====================================================================
-
-If you're reading this, you already have Sage, so if you also have TeX
-installed, you are ready to use SageTeX!
-
-To install SageTeX, you need only make the necessary files available to
-TeX; Sage already has the necessary bits built in. The easiest thing to
-do is copy this directory to a texmf directory in your home directory;
-something like this for Linux/Unix users:
-
-  cp -r $SAGE_ROOT/local/share/texmf/ $HOME/texmf/
-
-For OS X users with TeXLive:
-
-  cp -r $SAGE_ROOT/local/share/texmf/ $HOME/Library/texmf/
-
-I don't use Windows, so I don't know what MiKTeX users should do. Let me
-know and I'll add it here!
-
-After you've copied over the necessary files, you'll need to update
-TeX's database so that it can find them. Run "texhash $HOME/texmf"
-(replace the texmf directory as appropriate) to do this.
-
-Now check out the PDF files in this directory for more information on
-using SageTeX. If you have problems or suggestions see the sage-support
-group (http://groups.google.com/group/sage-support).
-
-Enjoy!
-
-Dan Drake
 * What about graphs and TikZ?
 
-* desagetexparser -- leave Sage commands in as comments? document usage!
-
 * http://groups.google.com/group/sage-devel/browse_thread/thread/f95dfbf6caea17cb/67c77a05bb567940
 
 * UPDATE v2.0 date in .dtx file when it's ready!

sagetexpackage.dtx

 % digits. With this package, you can write something like this:
 % \begin{quote}
 %  |There are $26$ choices for each letter, and $10$ choices for|\\
-%  |each digit, for a total of $26^3*10^3 = \sage{26^3*10^3}$|\\
-%  |license plates.|
+%  |each digit, for a total of $26^3 \cdot 10^3 =|\\
+%  |\sage{26^3*10^3}$ license plates.|
 % \end{quote}
 % and it will produce
 % \begin{quote}
 %   There are $26$ choices for each letter, and $10$ choices for each
-%   digit, for a total of $\sage{26^3 * 10^3}$ license plates.
+%   digit, for a total of $26^3 \cdot 10^3 = \sage{26^3 * 10^3}$ license
+%   plates.
 % \end{quote}
 % The great thing is, you don't have to do the multiplication. Sage does
 % it for you. This process mirrors one of the great aspects of \LTX:
 %
 % \section{Installation}
 %
-% \texttt{NB this is written assuming the \ST spkg is in Sage FIXME}
+% \newcommand{\sageroot}{\$SAGE\_ROOT}
 %
-% In this section, ``\texttt{\$SAGE\_ROOT}'' refers to the root
+% In this section, ``\texttt{\sageroot}'' refers to the root
 % directory of your Sage installation.
 %
 % The simplest way to ``install'' \ST is to copy the file |sagetex.sty|
-% from \texttt{\$SAGE\_ROOT/local/share/texmf} to the same directory as
+% from \texttt{\sageroot/local/share/texmf} to the same directory as
 % your document. This will always work, as \LTX always searches the
 % current directory for files.
 %
 % \href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=what-TDS}
 % {\texttt{www.tex.ac.uk/cgi-bin/texfaq2html?label=what-TDS}} which has
 % some information specific to MiK\TeX. Linux/Unix users can use
-% |$HOME/texmf| and users of Mac\TeX should use |$HOME/Library/texmf|.
+% |$HOME/texmf| and users of Mac\TeX{} should use |$HOME/Library/texmf|.
 %
 % To copy the files that \LTX needs into your |texmf| directory, simply
 % do
 % \begin{quote}
-%   \texttt{cp -r \$SAGE\_ROOT/local/share/texmf/* \$HOMEPREFIX/texmf/}
+%   \texttt{cp -r \sageroot/local/share/texmf/* \$HOMEPREFIX/texmf/}
 % \end{quote}
 % where |$HOMEPREFIX| is the appropriate prefix for your own |texmf|
 % tree. Then you need to make \TeX aware of the new files by running
 % you've written your document. See \autoref{sec:makestatic} and
 % \autoref{sec:extractsagecode} for information on using those scripts.
 % The file |sagetexparse.py| is a module used by both those scripts.
-% These three file are independent of \ST.
+% These three files are independent of \ST.
 %
 % \section{Usage} \label{s:usage}
 % 
 % bit of |makestatic.py| and use |./makestatic.py|.) This script needs
 % the \href{http://pyparsing.wikispaces.com}{pyparsing} module to be
 % installed.\footnote{If you don't have pyparsing installed, you can
-% simply copy the file
-% \texttt{\$SAGE\_ROOT/local/lib/python/matplotlib/pyparsing.py} into
-% your directory.} You may optionally specify |outputfile|; if
-% you do so, the results will be written to that file. If the file
-% exists, it won't be overwritten unless you also specify the |-o|
-% switch.
+%   simply copy the file
+%   \texttt{\sageroot/local/lib/python/matplotlib/pyparsing.py} into
+%   your directory.} You may optionally specify |outputfile|; if you do
+% so, the results will be written to that file. If the file exists, it
+% won't be overwritten unless you also specify the |-o| switch.
 %
 % You will need to run this after you've compiled your document and run
 % Sage on the |.sage| file. The script reads in the |.sout| file and

spkg-install

-#!/usr/bin/env bash
-
-if [ "$SAGE_LOCAL" = "" ]; then
-   echo "SAGE_LOCAL undefined ... exiting";
-   echo "Maybe run 'sage -sh'?"
-   exit 1
-fi
-
-python setup.py install
-
-if [ $? -ne 0 ]; then
-   echo "Error installing SageTeX."
-   exit 1
-fi
-
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.