r/Anki•
n3when

Remove repeated title from answer

Question

Hello, I am using Margin note 3, an app for the ipad that lets me create notes for anki pretty easily on mobile.

The biggest issue I am running into is that Margin Note repeats the Question in the answer field they use. There is no way to change this.

I.e Front = Neoclassical growth theory Back = Neoclassical growth theory states that the sustainable growth rate of GDP is a function of population growth, labor’s share of income, and the rate of technological advancement. Growth gains fromr other means such as increased savings are only temporary.

Is there a way to have anki remove the first mention of the front card from the answer card? It could even be CSS to just not show the first hard return but I am not sure how to do this.

Thanks in advanced

Posted Feb 19, 2019, 5:14 AM UTC

27
Blauelflanguages•

Can you post the card template used? Front, Back (preferably as a code block in reddit-style markdown)?

1
n3whenOP•

Front

<div class="section">{{#TextFront}}<div class="mbooks- 
 highlight-txt" >{{TextFront}}</div>{{/TextFront}} 
{{#ClozeFront}}<div class="mbooks-highlight-txt" > 
{{cloze:ClozeFront}}</div>{{/ClozeFront}}{{#Front}}<div> 
{{Front}}</div>{{/Front}}</div>

https://pastebin.com/rKFe2Q6b

Back

<div class="section">{{#TextBack}}<div class="mbooks-highlight-txt" >{{TextBack}}</div>{{/TextBack}} 
 {{#ClozeBack}}<div class="mbooks-highlight-txt"  {{cloze:ClozeBack}}</div>{{/ClozeBack}}{{#Back}} 
<div>{{Back}}</div>{{/Back}}</div>{{#MNLink}}<div class="section">{{MNLink}}</div>{{/MNLink}} 
{{#MNMindMap}}<div class="section">{{MNMindMap}}</div>{{/MNMindMap}}

https://pastebin.com/VZHUUWDA

styles

https://pastebin.com/k2Xq4A9G

1
gurple•

You can do it via JavaScript. Try putting something like this on the back of your card: (make sure to change {{Front}} and {{Back}} with {{Whatever your field is named}}.

<div id="answerField"></div>

<script>
    var question = "{{Front}}";
    var answer = "{{Back}}";
    var answerField = document.getElementById("answerField");
    answerField.innerHTML = answer.Replace(question,"");
<\script>

I wrote this pretty quickly and didn't test it, so it may have typos/bugs. Let me know if there are issues.

1
n3whenOP•

Hmm getting

"Invalid HTML on card: SyntaxError: Unexpected token <" on the preview. Any ideas?

1
gurple•

oops, I mixed up my slashes. The last <\script> should be </script>

1
n3whenOP•

No problem. Any ideas on how to deal with the closes in the template

1
gurple•

Closes? Do you mean cloze deletions? What is the problem with them?

1