Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Can you use colors? #97

Closed
in3rsha opened this issue Jun 25, 2020 · 2 comments
Closed

Can you use colors? #97

in3rsha opened this issue Jun 25, 2020 · 2 comments

Comments

@in3rsha
Copy link

in3rsha commented Jun 25, 2020

Hello there, thanks for the excellent gem.

This is a question rather than an issue: Is it possible to set the color of math symbols when using this gem? For example, this works perfectly well:

string_with_math = "$$x^8 + x^4 + x^3 + x + 1$$"

But I'm looking to do something like this:

string_with_math = "$$x^8 + {\color{red}x^4} + x^3 + x + 1$$"

Is this possible?

@gjtorikian
Copy link
Owner

Yes! See this doc for a list of everything supported: https://github.com/gjtorikian/mtex2MML/blob/master/SUPPORTED.md#colors

@in3rsha
Copy link
Author

in3rsha commented Jun 26, 2020

Ah yes, thank you. I was using double quotes " and it was treating the backslash as an escape character. Using single quotes ' for the string did the trick.

Sorry for the basic question. Thanks for the help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants