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

Update example.tex #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Update example.tex #43

wants to merge 4 commits into from

Conversation

927589452
Copy link

use the internal \ST command to typeset SageTeX

use the internal `\ST` command to typeset SageTeX
@927589452
Copy link
Author

as the example.tex seems to be the easiest reference for sagetex, extending it to showcase all commands seems useful

@kcrisman
Copy link
Member

kcrisman commented Sep 9, 2019

This is a nice idea. Since there is nice history of Dan documenting the code (and since it's likely people will read it to know how to do things), probably there should be a comment saying what that is for immediately before it. Also, what is your opinion on the later occurrence of Sage\TeX? I notice that one doesn't have the \textsf; I wonder if that was intentional because it was in a section not a title.

Finally, if you would like "official" recognition as a contributor we don't mind real names and do like acknowledging all contributors when possible. Thanks for pointing this change out!

@927589452
Copy link
Author

@kcrisman I just moved them all to ST and added a comment at the first use

@kcrisman
Copy link
Member

kcrisman commented Sep 9, 2019

You have a \textsf{\ST} which I'm not sure how that would look, but at any rate is redundant somehow.

Other than that, once of of us maintainers has a chance to build the file with ST and make sure it still looks good (which I assume is the case) I'm sure we can merge this.

@927589452
Copy link
Author

@kcrisman I prefer attribution to my handle (is the same on SE, trac, etc)

@dimpase
Copy link
Member

dimpase commented Nov 13, 2019

This needs some work in the installation department: the problem is that somehow on the 1st run of make one ends up with

 Undefined control sequence.
\@title ...f embedding Sage in \LaTeX {} with \ST 
                                                  
l.32 

which is due to the package not quite being ready at this point. If I re-run make, without cleaning, then things work.

@kcrisman
Copy link
Member

Is it more of a race condition or more of a structural problem, do you think?

@dimpase
Copy link
Member

dimpase commented Nov 13, 2019

sorry, it's a just the style file problem. There is no \ST macro in sagetex.sty:

I get the same error as in #43 (comment) if I just run latex example.tex (after I ran make enough times so that it completes without an error).

@kcrisman
Copy link
Member

I see the issue now. All the .dtx files use this macro (where it's defined, I don't know), but example.tex is not this format. Maybe the Python preprocessor replaces it?

I could see several outcomes to this ticket - closing it as unneeded, making a new macro, perhaps others. I guess I'm leaning toward the former, since Dan probably would have done so if he had thought it helped. Dima, do you know offhand what the generated .tex files have for the \ST macro?

@dimpase
Copy link
Member

dimpase commented Nov 13, 2019

I see the issue now. All the .dtx files use this macro (where it's defined, I don't know), but example.tex is not this format. Maybe the Python preprocessor replaces it?

I gather Python has nothing to do with it; indeed, one can run

latex sagetex.ins
latex sagetex.dtx

and get something ready to be run through Sage, no errors reported.
No idea why this works with \ST.

@dimpase
Copy link
Member

dimpase commented Nov 13, 2019

No idea why this works with \ST.

in fact, the macro is here:

% \newcommand{\ST}{\textsf{Sage\TeX}\xspace}

to make it go into the style file, one needs to tag it with <latex>.

%<latex> \newcommand{\ST}{\textsf{Sage\TeX}\xspace}

not sure we want such a short named macro to potentially clash with what people might use.
I'd instead have something like

%<latex> \newcommand{\SageTeX}{\textsf{Sage\TeX}\xspace}

for the general public (and, naturally, example.tex)

@kcrisman
Copy link
Member

That seems reasonable, though certainly not a high priority.

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

Successfully merging this pull request may close these issues.

3 participants