← 返回目录


Anki 提示 Front template has a problem,怎么办呀?

在Anki制作2.9万张卡片,复习33万次。Anki高考践行者、推广者。

8 👍 / 0 💬

问题描述

更新了最新版的2.1.22版本之后,卡片上是 <%问题%>,

打开牌组

Front template has a problem:

Found '⁨{{=<% %>=}}⁩', but there is no field called '⁨=<% %>=⁩'

怎么办呀!!!!!


这个是历史遗留问题了,修改一下模板即可。

打开模板,你可能会看到

{{=<% %>=}}

<%问题%>

我们只需要把 {{=<% %>=}} 改成 {{问题}},并把 <%问题%> 删掉即可。对于有多个 {{=<% %>=}} 和 <%XX%>,请逐个替换为 {{XX}}。

你问为啥我知道?看 Anki 手册吧:

Template Conflicts

As of Anki 2.1.20 / AnkiMobile 2.0.56, this workaround is no longer required, as {{field}} text inside fields no longer causes problems. If you need to support AnkiDroid or older Anki versions and want to keep using this syntax, please make sure you place the {{=<% %>=}} string at the very top of your front and back template, as recent Anki versions will not recognize it anywhere but the start.

For older versions:

It’s not uncommon for {{ and }} to pop up in LaTeX code when writing mathematical equations. To ensure that your LaTeX equations don’t conflict with Anki’s field replacements, it’s possible to change the separator to something else.

For example, if you have a template:

{{latex field}}

Changing it to the following will make it unlikely that the LaTeX will conflict:

{{=<% %>=}}
<%latex field%>


← 返回目录