Latex fragments with [ or ] don't get hidden correctly.

Issue #41 resolved
created an issue

The following card shows with the LaTeX always revealed:

**** Mathematical definitions                                      :drill:
:ID:       d9e39753-ae59-49f3-b135-0a681901d499

The variance of a probability distribution is defined mathematically as:

[ $$\text{var}_x = \int dx p(x) (x - E[x])^2$$ ].

If I remove the [ and ] inside the cloze, it works as expected. Is there anyway around this, or should I use different LaTeX characters?

Comments (3)

  1. Paul Sexton repo owner

    I'm not aware of a way to write regular expressions so that they count matching parentheses. There is an option in org drill that lets you change the cloze delimiters from [...] to something else, so you could consider doing that (maybe in a file-local variable).

    Otherwise you will need to change the square brackets in your LaTeX code to something else, sorry.

  2. ocharles reporter

    Can it be set per-topic? I'd be fine if I could just set it on the card. Otherwise I'll try and come up with something suitable for the file, but that will be more work.

  3. Log in to comment