-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Refactor show() methods, rename to pretty_print #17821
Comments
Changed dependencies from #/17234 to #17234 |
comment:2
One general question is how to handle multiple arguments: |
comment:3
As long as current behavior for |
comment:4
In addition to |
comment:5
Why not generalize what is currently in the |
comment:6
Whats the expected output? Latex with a tiny picture of the plot inserted? After the rich output hits you'd have to join latex with an animated gif image and a dvi file, that doesn't work. It only makes sense if you get uniform rich output. I think I'll just preserve the current behavior of special-casing certain homogeneous lists (i.e.: only graphs and only 2d plots). |
Branch: u/vbraun/refactor_pretty_print |
Commit: |
comment:9
Refactoring graphics is now #18033, already too much going on here. This basically works now, except that it unearthed various broken stuff elsewhere that wasn't exercised before. New commits:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
Will there be an option for inline/display formulas with this system? Although it seems a little ugly to modify global preferences before output and restoring them afterwards - shouldn't there be some way to pass "current preferences" that take precedence over "default ones"? |
comment:14
Since I had no desire to dig into old show mess, I've merged this into my branch for SageMathCell based on 6.6.rc1 and get
while building documentation. What is the long-term plan for |
comment:15
View does different things in SageNB and elsewhere... I'm in favor of cleaning things up to the effect that:
|
comment:16
Whats the use case for inline equations? In the notebook the cell output is always analogous to displaymath in LaTeX terminology, right? |
comment:17
PS: There is the |
comment:18
To me it sounds a bit strange to Use cases for inline equations:
So I think they definitely should be available as an option. Having |
comment:19
I kind of like I guess we should use inline/text style if and only if there is adjacent stuff. So, for example, |
comment:20
Replying to @vbraun:
How do you decide? If I made some output with suppressed newline in one place and then do extra output in another, it is difficult to detect. Also, if my code outputs two formulas on two lines and one of them is long, it may not be good to use display style since the centered short formula may be off the screen without centering. On the other hand, I dislike inline fractions/sums/limits, so even side-by-side things may be better in displaystyle. It seems to me that its better to have a single default (display is more natural), but have a simple way for the user to tweak things if desired without the need of constructing all LaTeX code manually. |
comment:22
IMHO this is ready for review |
Author: Volker Braun |
comment:23
Right now latex/mathjax support in Sage doesn't even have a concept of multiple display equations. Before we can improve that we would first have to write the necessary tools, i.e. latex strings that also know whether they are in math / inline / display mode. |
comment:24
Two questions about
What is this Why do we need to define the |
comment:25
I don't like the I also don't like the extra \Bold definition but then that should be fixed in the latex generator; It should only emit macro definitions that are actually used. The rich display stuff shouldn't try to fix up the deficiencies of the latex generator. |
Reviewer: Andrey Novoseltsev |
comment:26
OK - I am setting this to positive review on the basis of things looking reasonable and better than they used to. Hopefully with a merge in an early beta we will get enough people to try it and detect corner cases if there are any. |
Changed branch from u/vbraun/refactor_pretty_print to |
comment:28
Okay guys. Now whenever I do Some graphs that I work with are much too large to be plotted. Just typing 'g' in the command line (as I often do to check the number of vertices) now runs an algorithm that I have to kill. Nathann |
Changed commit from |
comment:29
Try it for yourself:
|
comment:31
Followup at #18289 |
comment:32
No Volker. The problem is not the speed. The problem is that this is not the desired behaviour of Please, set it back to its original behaviour. Nathann |
comment:33
This ticket is closed. Any discussion should go to #18289 |
comment:34
Volker, please do not do this again. If you force me to accept this new behaviour for graphs, which is totally unpractical for whoever uses them, I will have to write to sage-devel again and it will be the same, over and over. Please. This change that you made changes the way we work with graphs, it makes our life more complicated and it is not a good thing. Plus you did this for graphs and graphs only, which is totally incoherent with the behaviour of other classes. Let's keep it simple Volker, please set this behaviour back to what it was before, i.e. display the number of points in the graph, and its name. Please. Nathann |
comment:35
(This was resolved at #18289.) |
comment:36
Still not resolved. |
show should be an alias for pretty_print, which should always tries to use a rich output for an object (falling back on the plain text), while the plain print function should always use the plain text for the object
Depends on #17234
Depends on #17980
Depends on #18028
Depends on #18032
CC: @novoselt @ohanar @dcoudert
Component: graphics
Author: Volker Braun
Branch:
41f0a57
Reviewer: Andrey Novoseltsev
Issue created by migration from https://trac.sagemath.org/ticket/17821
The text was updated successfully, but these errors were encountered: