Skip to content

How can I highlight individual entries in \binom{n}{k} and create an empty binomial coefficient bracket #4249

Answered by uwezi
mrs-isi asked this question in Q&A
Discussion options

You must be logged in to vote

You cannot split an equation like this, because the individual parts must remain valid LaTeX code, which for example \binom on its own is not.

The recommended way to do this is to identify the individual indices of your glyphs:

class binomscene(Scene):
    def construct(self):
        binom1 = MathTex(r"\binom{2}{2}", font_size=32)
        self.add(binom1)
        self.add(index_labels(binom1[0]).set_color(RED))

class binomscene(Scene):
    def construct(self):
        binom1 = MathTex(r"\binom{2}{2}", font_size=32)
        self.add(binom1)
        # uncomment following line for index labels
        #self.add(index_labels(binom1[0]).set_color(RED))
        self.play(
            binom1[0][1

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mrs-isi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants