-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add session settings variables like $OutputStyle #3
Comments
According to what I see in main.py,
pygments are called by the variable
and, from inside the command interface, you can deactivate this by calling
and reactivate it with
|
Regarding the Pygment formatting, I would't do in that way, to do not mix the kernel with the user interface. Instead, you can look at the control variables by calling (from Python)
once a suitable context and variables are defined as builtins/user defined variables. This could be done both by something inside mathics builtins, or just in a initialization file defined in mathicsscript. |
@mmatera Thanks! Will do the next time I have some free time to work on this. |
I just tried this and this isn't the same thing as what the option Recall that for parsing things like |
Yes, you are right... I tried to get the same behavior with $Pre, but (even in WM) it always evaluates first and then converts the expression to FullForm. In any case, the idea would be then to check the value of a variable in the definitions object and then apply the format according to its value. |
It would be nice to be able to set/change setting that can right now only be set at the outset inside a REPL session.
In particular options
--style
(set Pygments output style) and--full-form
(show Full form translation of input)@mmatera this is something that I could use help on. See https://github.com/Mathics3/mathicsscript/blob/master/mathicsscript/settings.py for what I have so far.
However when I try to set this inside the REPL, I am not able to. I believe the problem lies in Mathics somehwere.
Also I suspect Mathics might be improved somehow to make writing "builtins" that function as settings to be made simpler.
The text was updated successfully, but these errors were encountered: