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

Allow unicode cdot to be considered operator alongside * #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

superyuuki
Copy link

Sometimes you want to assign unicode cdot to dot product, etc but latexify will render it like a function. This PR should allow the unicode cdot to be rendered like the asterisk. It is also immune to kwargs cdot = false because sometimes you want to notate the dot in certain circumstance, etc

@gustaphe
Copy link
Collaborator

gustaphe commented Sep 18, 2024

Nice idea! I think it would be better for maintainability to add :⋅ => "\\cdot" to arithmetic_operators in symbol_translations.jl, then the rest should follow automatically.
I should probably document this somewhere.

Could you write some tests? Especially try to catch the "is not affected by cdot=false" behavior, and that it's parenthesized correctly.

@superyuuki
Copy link
Author

That's a good suggestion. I'll try to write some tests as well.

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.

2 participants