-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Print matrices using unicode large delimiters (on demand) #18270
Comments
Branch: u/gagern/MatrixUnicodeDelimiters |
New commits:
|
Commit: |
comment:3
This banner is already a mess. If I ssh + screen + sage at my laboratory, then I got a ugly
And then I am not able to see anything else (but still inputting Sage commands work). The new matrices look nice though. For the on-demand feature it would be nice to have a global flag allowing (or avoiding) unicode
Vincent |
comment:4
Why not only |
comment:5
Replying to @videlec:
Because in Python 2 |
comment:6
Replying to @videlec:
Perhaps you should file that as a bug, so it can be addressed? Does using
I meant “on-demand” as opposed to “automatic”, with the demand being expressed for each matrix that gets printed, i.e. by using the keyword argument from my commit. I believe you're talking about something far more automatic here.
The canonical way, at least on Linux, would be to inspect
Of course, using |
comment:7
Replying to @gagern:
Indeed,
and on the remote is
I like your suggestion very much. Vincent |
comment:8
review comment:
Vincent |
comment:9
Replying to @videlec:
Indeed when I started this patch, I had a line like
but the long names made things very hard to read. And shorter alternatives, like Keep in mind that the Plugging the delimiting brackets in the right rows is a non-trivial affair, and would therefore in my opinion be far harder to maintain. The possibility of an arbitrary number of horizontal lines at either end complicates things considerably. I haven't been able to come up with a reasonably simple code snippet to achieve correct symbols automatically while building these strings. So unless you absolutely insist on this point, or can give a good reason on why my approach has very undesirable reprecussions, or can suggest some formulation, I'd rather stick with my approach. Or adjust it in such a way that it assembles the matrix body without any brackets, and then adds all the bracket parts in a single loop instead of replacing existing incorrect parts.
Because I don't encounter them in my day-to-day work. Can you give me a hint as to where these might occur? For an even number of rows (except two), big curly brackets would look slightly unsymmetric, but I doubt that should be a concern. |
comment:10
Replying to @gagern:
If there are comments it is fine. For example
or
By "curly", I meant only using ⎧ ⎫ ⎩ ⎭ instead of your more angular version. The term was probably wrong. See
... no angle... |
comment:11
Replying to @videlec:
OK, I can do that. It would be 11 characters: the six you used, plus two for single-row matrices, plus three line-drawing characters. The latter could be a separate string if you prefer. I'd make it one string because I'm lazy, but that's a weak argument.
Ah, round parentheses. Personally, I much prefer these round ones as well. I had the impression that in the USA especially, the square brackets are somewhat more common. But that impression (based mostly on Wikipedia) may be wrong, and in any case the comparison with the LaTeX rendering is a strong motivations to make things consistent and satisfy my personal preference at the same time. We might of course let the user choose between these alternatives, by allowing a string like |
comment:12
I've made #18357: Unicode Art. IMHO its
|
comment:13
Fixed:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Volker Braun |
comment:17
Looks great! I would prefer |
comment:18
PDF docs don't build:
|
comment:19
You just have to add a suitable |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:21
This is my attempt to make things look reasonably useful, even though the vertical spacing and placement is far from optimal. But seeing how many other unicode symbols are represented with crude ASCII work-arounds, I think the amount of effort I put into this should be at least on a similar level. I just filed #18370 about better unicode support by switching to XeTeX or luaTeX. I have no experience with these, but I've read on several occasions that they offer far superior Unicode support. In this sense, I hope that my unicode symbol declarations will be a temporary workaround, although I have no idea just how temporary. |
comment:22
Sounds good. The main point of running latex on the docs is to validate the markup, nobody is going to print out the pdf. |
Changed branch from u/gagern/MatrixUnicodeDelimiters to |
Unicode provides nice symbols which can be combined to form large delimiters. It would be nice if we could print matrices using these, instead of the same ASCII brackets on all the lines. So instead of
I'd like to see one of these:
Perhaps it's best to do this in small increments: start with a keyword argument to the
str
method of matrices, then later on make this the default. So the ticket here is only for on-demand support of this feature, not for its automatic use by default. For later reference, see #14733 which switched the banner to Unicode, and thereby made the choice that Sage may look broken on non-Unicode terminals.Component: user interface
Keywords: unicode matrix
Author: Martin von Gagern
Branch/Commit:
6b6f089
Reviewer: Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/18270
The text was updated successfully, but these errors were encountered: