How to color elements of latex matrices
See original GitHub issueHi, I wonder how to set a color to individual elements in a matrix.
matrix2 = TexMobject(r"\begin{pmatrix} 4 \\ 3 \end{pmatrix}")
I would like to colour the number 4 in red.
When I break down the TexMobject for the matrix into tuples in order to run
matrix2[x].set_color(COLOR)
I get an error.
Can somebody explain to me how I can split a matrix in Tex format.
Greatly appreciate it!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
color - Matrix change row or column background - TeX
You can use \rowcolor , \columncolor , and \cellcolor from the colortbl package, loaded in my example through the xcolor package:
Read more >Shading entries in matrix - Google Groups
To highlight specific elements or rows or columns in a matrix, I would like to be able to shade them. Is this possible...
Read more >Matrix element coloring/Highlighting - narkive
Is there a trick to play so to be able to color an element in a matrix or highlight it some how (something...
Read more >LaTeX/Mathematics - Wikibooks, open books for an open world
Typesetting mathematics is one of LaTeX's greatest strengths. It is also a large topic due to the existence of so much mathematical notation....
Read more >nicematrix.pdf - CTAN
The LaTeX package nicematrix provides new environments similar to the classical environ- ments {tabular}, {array} and {matrix} of array and amsmath but with ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try
matrix2[0][1]
Don’t forget close the issue