Anonymous avatar Anonymous committed 1975dcf

bugfixes from merging commandline patch; some work to do, but works

Comments (0)

Files changed (4)

 Jason Grout
 Rob Beezer
 Nicolas Thiéry
-Volker Braun
+Volker Braun
 # just depend on the .ind file, since we'll make the .gls and .ind together
 $(pkg).pdf: $(dtxs) $(pkg).ind
 	latex $(pkg).dtx
-	sage $(pkg).sage
+	sage $(pkg).sagetex.sage
 	latex $(pkg).dtx
-	sage $(pkg).sage
+	sage $(pkg).sagetex.sage
 	latex $(pkg).dtx
 	pdflatex $(pkg).dtx
 
 example.pdf: example.tex sagetex.sty sagetex.py
 	pdflatex example.tex
-	sage example.sage
+	sage example.sagetex.sage
 	pdflatex example.tex
 	pdflatex example.tex
 
     self.filename = jobname
     self.name = os.path.splitext(jobname)[0]
     autogenstr = """% This file was *autogenerated* from {0}.sagetex.sage with
- % sagetex.py version {1}\n""".format(self.name, version)"""
+ % sagetex.py version {1}\n""".format(self.name, version)
 %    \end{macrocode}
 % Don't remove the space before the percent sign above!
 %
               escapeoption = ''
 
           begin, end = self.savecmd(counter,current_lines)
-          latex_string += r"\lstinputlisting[firstline={0},lastline={1},firstnumber={2},style=SageInput{3}]{{{4}.scmd}}".format(begin, end, begin-2, escapeoption, self.name)+"\n"
+          latex_string += r"\lstinputlisting[firstline={0},lastline={1},firstnumber={2},style=SageInput{3}]{{{4}.sagetex.scmd}}".format(begin, end, begin-2, escapeoption, self.name)+"\n"
 
           current_statement = preparse(current_statement)
           try:  # is it an expression?
               resultstr = "{0}".format(result)
               begin, end = self.savecmd(counter,resultstr)
               if text_output:
-                latex_string += r"\lstinputlisting[firstline={0},lastline={1},firstnumber={2},style=SageOutput]{{{3}.scmd}}".format(begin, end, begin-2, self.name)+"\n"
+                latex_string += r"\lstinputlisting[firstline={0},lastline={1},firstnumber={2},style=SageOutput]{{{3}.sagetex.scmd}}".format(begin, end, begin-2, self.name)+"\n"
                 bottom_skip = r"\vspace{\sagecommandlineskip}" + "\n"
               else:
                 latex_string += (
 %    \begin{macrocode}
     self.souttmp.close()
     os.rename(self.filename + '.sagetex.sout.tmp', self.filename + '.sagetex.sout')
+    self.scmdtmp.close()
+    os.rename(self.filename + '.sagetex.scmd.tmp', self.filename + '.sagetex.scmd')
     self.progress('Sage processing complete. Run LaTeX on {0}.tex again.'.format(
              self.filename))
 %    \end{macrocode}

sagetexpackage.dtx

 %
 % \noindent\warningbox{\textbf{WARNING!} When you run \LTX on a file
 %   named \texttt{\meta{filename}.tex}, the file
-%   \texttt{\meta{filename}.sage} is created---and will be
+%   \texttt{\meta{filename}.sagetex.sage} is created---and will be
 %   \emph{automatically overwritten} if it already exists. If you keep
 %   Sage scripts in the same directory as your \ST-ified \LTX documents,
 %   use a different file name!}
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.