You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose a silent sage command of the form \sageslnt{y(x)=x^2}. This would allow assignments to be done within an equation or align environment enabling assignments and pretty printing on the fly.
This allows one to make changes to a function such as .factor() or f(x)=f(x, 5) without having to recompute or retype each chained modification every time it needs to be referenced.
Otherwise one has to either have duplicate lines of code or several modified function assignments in a previous sage block. ie f_1 = f(x,2), f_2=f_1(3)
I added this code to my .sty file after the sagesilent environment initialization, which did the trick for me. I would have made some sort of pull request but I'm not sure which additional files I would need to modify to make complete change.
The text was updated successfully, but these errors were encountered:
Am I correct in that @sharpTrick wants a silent Sage command rather than just a silent Sage environment? Yes, a more explicit description of how .factor() or f(x)=f(x, 5) would differ under these circumstances would help a lot, thanks!
I propose a silent sage command of the form \sageslnt{y(x)=x^2}. This would allow assignments to be done within an equation or align environment enabling assignments and pretty printing on the fly.
This allows one to make changes to a function such as .factor() or f(x)=f(x, 5) without having to recompute or retype each chained modification every time it needs to be referenced.
Otherwise one has to either have duplicate lines of code or several modified function assignments in a previous sage block. ie f_1 = f(x,2), f_2=f_1(3)
\newcommand{\sageslnt}[1]{%
%\ST@beginsfbl%
@bsphack\ST@wsf{%
st.current_tex_line = \the\inputlineno^^J%
st.blockbegin()^^Jtry:}
\ST@wsf{ #1}%
\ST@endsfbl@esphack%
}
I added this code to my .sty file after the sagesilent environment initialization, which did the trick for me. I would have made some sort of pull request but I'm not sure which additional files I would need to modify to make complete change.
The text was updated successfully, but these errors were encountered: