Hiding clozes for specific questions

hi! first time posting.

I’m trying to get the following set up for doing math’s/physics related cards:
it consists of 3 clozes, the first two are the sides of an equation and the third one is the proof of the theorem or equation.
my goal is to get 3 cards, 2 to test the equation itself, so that it asks c1=c2 and one to test my knowledge of the proof. problem is c3 will be displayed whenever i’m on the first 2 clozes, and often demonstrations are too large and i don’t want it to show up when the question is only about the equation itself

my current solution is to have c3 be: {{c3 :: ::proof?}} and then have the proof shown as a hint but I don’t like it since the hint appears on all 3 cards and I feel like there’s a nicer way to do this
any help is appreciated! thanks!

You can make a new note type which works exactly like you want. Just read the key concepts or search online for tutorials about note types.

(post deleted by author)

You might also want to consider doing this based on a regular note type instead of a cloze one. Since you have a fixed amount of card types with strictly defined roles, clozes might not be the best fit for the purpose.

well now i feel dumb lol. spent all night yesterday trying to get it to work and could’t figure it out.
i had a better read at card generation (bottom part on clozes) after you told me and it was very easy so i’ll share in case anyone else has a use for this.

needs 2 fields (i also added one for a question because i might use it)
first one is where you would write the 3 clozes and the second one shows the proof

here’s the code (paste onto a cloze card type)
front:

{{question}} <br> <br>

{{cloze:clozes}}

<! -- next part is just for the tags to show up -->

<br><br><br> <div style='font-family: "Helvetica"; font-size: 10px; color: brown'>{{Tags}}</div>


and back:

{{question}}

<br> <br>

{{cloze:clozes}}

<! -- this following part makes the "proof" field show up only on the 3rd cloze card -->

{{#c3}}

  <div style =' color: cyan' >{{proof}}

{{/c3}}

<br><br><br><br>

<! -- next part is just for the tags to show up -->

<div style='font-family: "Helvetica"; font-size: 10px; color: brown'>{{Tags}}</div>

so here’s how both of the “equation” questions look like (c1 and c2)

and here’s the proof one

oh absolutely, i use regular ones when needed, i just wanted this type of note because about half of my cards are “theorem” and then a separate “proof” one and this just speeds up the proces a bunch. thanks!

That’s not the solution I had in mind (I agree with Eltaurus) which would be much more efficient and cleaner.

i guess i missunderstood Eltarus meant? that i should create a basic note type and edit from there?

i did’t quite get which note type you were refering to. what was it you had in mind?

Any note type that isn’t a copy of cloze or image occlusion would do, but Basic is the easiest to edit.

You can have fields for Question, Left side, Right side, and Proof. Then make 2 additional card types and fill their templates as you like.

You wouldn’t need the cloze brackets anymore, nor would you need to type “proof?”.

Also these two can be merged into a single field for brevity and split with JS on the template itself at the equal sign (or at a specially inserted breaking character).

Since MathJax allows marking elements with custom classes, it can be used for this purpose too:

\(K_e\class{sep}{=}\frac{mv^2}{2}\)

Then either part of a formula can be extracted as:

Full equation:
<p>
    {{Equation}}
</p>

Left-hand side:
<p class="lhs">
    {{Equation}}
</p>

Right-hand side:
<p class="rhs">
    {{Equation}}
</p>

with the following styles:

.lhs .sep,
.lhs .sep ~ * {
    display: none;
}

.rhs .sep,
.rhs :has(> .sep) > *:not(.sep ~ *):not(.sep) {
    display: none;
}