Skip to content
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

Added .text method for the command '*' #578

Merged
merged 2 commits into from
Mar 16, 2016
Merged

Conversation

stufflebear
Copy link
Member

The latex for this is \cdot, which makes less sense for the text output. This change makes typed input using '*' compatible with tools like mathjs.

The latex for this is \cdot, which makes less sense for the text output. This change makes typed input using '*' compatible with tools like mathjs.
@CLAassistant
Copy link

CLA assistant check
All committers have accepted the CLA.

CharCmds['*'] = LatexCmds.sdot = LatexCmds.cdot =
bind(BinaryOperator, '\\cdot ', '·');
bind(Times, '\\cdot ', '·');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like BinaryOperator can just take in/be bound a 3rd argument that'll be the text, like https://github.com/mathquill/mathquill/pull/578/files#diff-50c9fc0c437e0937042e370a2e965768R482 , does that work here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that works for this

laughinghan added a commit that referenced this pull request Mar 16, 2016
Added .text() method for the command '*'
@laughinghan laughinghan merged commit 1251283 into master Mar 16, 2016
@laughinghan laughinghan deleted the fix.text-multiply branch March 16, 2016 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants