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 a \overset as a special string #1783

Merged
merged 1 commit into from
Apr 11, 2022
Merged

Conversation

EbbDrop
Copy link
Contributor

@EbbDrop EbbDrop commented Apr 8, 2022

Motivation

Makes something like Tex("\overset", "{def A}", "{=}") work.

Proposed changes

Added "\\overset" -> "\\overset{\\quad}{\\quad}" and documented why \frac and friends do not work (yet).

Test

Code:

  color = {"isolate": ["{A}", "{B}"], "tex_to_color_map": {"{A}": GREEN, "{B}": BLUE}}
  t = Tex(r"a{B}c", r"\overset", "{A}{=} a{B}c", **color)
  self.play(Write(t))

Result:
Screenshot_2022-04-08_22-58-07

@TonyCrane TonyCrane requested a review from 3b1b April 10, 2022 03:48
@3b1b 3b1b merged commit d26b8a8 into 3b1b:master Apr 11, 2022
@EbbDrop EbbDrop deleted the more-special-string branch April 11, 2022 16:54
TonyCrane added a commit that referenced this pull request Apr 13, 2022
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