# Trouble adding a second cloze among many in a latex equation

**URL:** <https://forums.ankiweb.net/t/trouble-adding-a-second-cloze-among-many-in-a-latex-equation/1037>\
**Category:** Help\
**Created:** [July 15, 2020, 9:27pm UTC](https://forums.ankiweb.net/t/trouble-adding-a-second-cloze-among-many-in-a-latex-equation/1037 "2020-07-15T21:27:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erik11](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Erik11](https://forums.ankiweb.net/u/Erik11)\
**Post date:** [July 15, 2020, 9:27pm UTC](https://forums.ankiweb.net/t/trouble-adding-a-second-cloze-among-many-in-a-latex-equation/1037/1 "2020-07-15T21:27:33Z")

</div>

Remark: Don’t be thrown off by the amount of equations, it’s just about where to set the clozing double-braces (“}}”) for a second clozing part ( c2::{{ }} ).

So I built cloze cards with multiple clozing parts, which work very well up to a certain point:  
this:

> Derive the OLS estimate for (\hat{\beta\_1})
> 
> (\begin{align\*} &\Rightarrow \frac{\delta RSS}{{{c1::\delta \beta\_1}}} \sum^n\_{i=1}(y\_i - \hat{\beta\_0} - \hat{\beta\_1}\*x\_i)^2 \ &= {{c1::\sum^n\_{i=1}2(y\_i - \hat{\beta\_0} - \hat{\beta\_1}_x\_i)_(-x\_i)}} \ &= {{c1::-2 \* \sum^n\_{i=1}(y\_i - \hat{\beta\_0} - \hat{\beta\_1}_x\_i)(x\_i)}} &= 0 \ &\Rightarrow {{c1::\sum^n\_{i=1}(y\_i - \hat{\beta\_0} - \hat{\beta\_1}x\_i)(x\_i)}} &= 0 \ &\rightarrow \hat{\beta\_0} = \bar{y} - \hat{\beta\_1}\bar{x} \ &= {{c1::\sum^n\_{i=1}(y\_i - (\bar{y} - \hat{\beta\_1}_\bar{x}) - \hat{\beta\_1}_x\_i)(x\_i)}} &= 0 \ &= {{c1::\sum^n\_{i=1}(y\_i - \bar{y} + \hat{\beta\_1}_\bar{x} - \hat{\beta\_1}_x\_i)(x\_i)}} &= 0 \ &= {{c1::\sum^n\_{i=1}(y\_i - \bar{y}) (x\_i) - \hat{\beta\_1} \sum^n\_{i=1} (x\_i - \bar{x})(x\_i)}} &= 0 \ &= \sum^n\_{i=1}(y\_i - \bar{y}) (x\_i) &= {{c1::\hat{\beta\_1} \sum^n\_{i=1} (x\_i - \bar{x})(x\_i)}} \ &\Rightarrow \hat{\beta\_1} = \frac{\sum^n\_{i=1}(y\_i - \bar{y}) (x\_i)}{\sum^n\_{i=1} (x\_i - \bar{x})(x\_i)} \ &= \frac{\sum^n\_{i=1}(y\_i - \bar{y}) (x\_i - \bar{x})}{\sum^n\_{i=1} (x\_i - \bar{x})^2} \ &= \frac{Cov(X, Y)}{Var(X)}\end{align_})

I wonder however, why when I use another one, it gives me an error and doesn’t properly render the card:

> Derive the OLS estimate for (\hat{\beta\_1})
> 
> (\begin{align\*} &\Rightarrow \frac{\delta RSS}{{{c1::\delta \beta\_1}}} \sum^n\_{i=1}(y\_i - \hat{\beta\_0} - \hat{\beta\_1}\*x\_i)^2 \ &= {{c1::\sum^n\_{i=1}2(y\_i - \hat{\beta\_0} - \hat{\beta\_1}_x\_i)_(-x\_i)}} \ &= {{c1::-2 \* \sum^n\_{i=1}(y\_i - \hat{\beta\_0} - \hat{\beta\_1}_x\_i)(x\_i)}} &= 0 \ &\Rightarrow {{c1::\sum^n\_{i=1}(y\_i - \hat{\beta\_0} - \hat{\beta\_1}x\_i)(x\_i)}} &= 0 \ &\rightarrow \hat{\beta\_0} = \bar{y} - \hat{\beta\_1}\bar{x} \ &= {{c1::\sum^n\_{i=1}(y\_i - (\bar{y} - \hat{\beta\_1}_\bar{x}) - \hat{\beta\_1}_x\_i)(x\_i)}} &= 0 \ &= {{c1::\sum^n\_{i=1}(y\_i - \bar{y} + \hat{\beta\_1}_\bar{x} - \hat{\beta\_1}_x\_i)(x\_i)}} &= 0 \ &= {{c1::\sum^n\_{i=1}(y\_i - \bar{y}) (x\_i) - \hat{\beta\_1} \sum^n\_{i=1} (x\_i - \bar{x})(x\_i)}} &= 0 \ &= \sum^n\_{i=1}(y\_i - \bar{y}) (x\_i) &= {{c1::\hat{\beta\_1} \sum^n\_{i=1} (x\_i - \bar{x})(x\_i)}} \ &\Rightarrow \hat{\beta\_1} = {{c2::\frac{\sum^n\_{i=1}(y\_i - \bar{y}) (x\_i)}{\sum^n\_{i=1} (x\_i - \bar{x})(x\_i)}}} \ &= \frac{\sum^n\_{i=1}(y\_i - \bar{y}) (x\_i - \bar{x})}{\sum^n\_{i=1} (x\_i - \bar{x})^2} \ &= \frac{Cov(X, Y)}{Var(X)}\end{align_})

The c2 closing seems to throw some trouble, what’s the issue?

Edit: Changed formatting.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [July 15, 2020, 10:09pm UTC](https://forums.ankiweb.net/t/trouble-adding-a-second-cloze-among-many-in-a-latex-equation/1037/2 "2020-07-15T22:09:58Z")

</div>

Please see [https://docs.ankiweb.net/#/math?id=cloze-conflicts](https://docs.ankiweb.net/#/math?id=cloze-conflicts)

---

<div class="post-metadata">

**Author:** ![Erik11](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@Erik11](https://forums.ankiweb.net/u/Erik11)\
**Post date:** [July 17, 2020, 8:46am UTC](https://forums.ankiweb.net/t/trouble-adding-a-second-cloze-among-many-in-a-latex-equation/1037/3 "2020-07-17T08:46:22Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 5:40am UTC](https://forums.ankiweb.net/t/trouble-adding-a-second-cloze-among-many-in-a-latex-equation/1037/4 "2023-05-01T05:40:27Z")

</div>

Closed on May 1, 2023, 5:40am UTC


