Ticket #5474 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch, positive review] delimiters for LaTeX representation of matrices

Reported by: jhpalmieri Owned by: jhpalmieri
Priority: minor Milestone: sage-3.4
Component: linear algebra Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

There was a request on  sage-support for the option to change how matrices are displayed, from parentheses to square brackets. William made this suggestion:

How about adding a function to matrix0.pyx that sets a global variable
in that file to the left and right delimiters for matrices?

sage.matrix.matrix0.set_latex_delimiters('[',']')

would set them.  That's minimally intrusive.  Later on somebody could
come up with some grand scheme for customizing latex output, but
please don't until there are a few more use cases. 

The attached patch implements "set_matrix_latex_delimiters". (I changed the name slightly.)

Attachments

matrix-latex-delimiters.patch Download (2.6 KB) - added by jhpalmieri 4 years ago.
vector-latex-delimiters.patch Download (2.7 KB) - added by jhpalmieri 4 years ago.

Change History

Changed 4 years ago by jhpalmieri

Changed 4 years ago by jhpalmieri

comment:1 Changed 4 years ago by jhpalmieri

Here's a vector version, too.

comment:2 Changed 4 years ago by was

  • Summary changed from [with patch, needs review] delimiters for LaTeX representation of matrices to [with patch, positive review] delimiters for LaTeX representation of matrices

Frickin' awesome! NIce!

comment:3 Changed 4 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from sage-3.4.1 to sage-3.4

Merged both patches in Sage 3.4.final.

Cheers,

Michael

comment:4 follow-up: ↓ 5 Changed 4 years ago by jason

Thank you! This has been a minor annoyance when using Sage in class, since we use different delimiters than Sage...

comment:5 in reply to: ↑ 4 Changed 4 years ago by jhpalmieri

Replying to jason:

Thank you! This has been a minor annoyance when using Sage in class, since we use different delimiters than Sage...

You're welcome! I hope it works well for you.

Note: See TracTickets for help on using tickets.