如何以乳胶格式将图像插入Anki笔记? [英] How to insert an image into Anki notes in latex format?

查看:124
本文介绍了如何以乳胶格式将图像插入Anki笔记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个Anki牌组,例如在前面放一个单词.然后,我在后面加上带有图片的定义的单词.但是当已经有两个字段(前文本和后文本)时,我很难包含图形.这是一个示例注释:

I am trying to create an Anki deck with, for example, a word on the front. Then I add the word with definitions on the back with a picture as well. But I am having trouble including graphics when there are already two fields (front text and back text). Here is an example note:

\begin{note}
\begin{field}
\textbf{\large ruminate}
\end{field}
\begin{field}
\textbf{\large ruminate}
\begin{description}
\item[verb] \hfill \\ 
chew the cuds

\item[verb] \hfill \\ 
reflect deeply on a subject

\end{description}
\end{field}
\end{note}

此注释仅适用于花花公子,但是当我尝试添加图形时(如下所示),Anki不会在我的背面放两个字段.

This note works just dandy, but when I try to include a graphic (as follows) Anki will not let me have two fields on the back.

\begin{note}
\begin{field}
\textbf{\large ruminate}
\end{field}
\begin{field}
\textbf{\large ruminate}
\begin{description}
\item[verb] \hfill \\ 
chew the cuds

\item[verb] \hfill \\ 
reflect deeply on a subject

\end{description}
\end{field}

\xplain(<img src="files/image.jpg" />)

\end{note}

我尝试使用\includegraphics(Anki禁止这样做,但我更改了源代码并使程序包正常工作),但是在编译图像时找不到.

I tried to use \includegraphics (Anki prohibits this, but I changed the source and got the package to work) but then on compiling the image could not be found.

推荐答案

好,所以诀窍是首先学习更改Anki卡模板.

Ok, so what did the trick was learning first to change the Anki card template.

前模板

{{Word}}

返回模板

<img src="{{Picture}}" width="250" /><br>
{{Definition}}

<hr id=answer>

然后,我只需要将文件名放在\ xplain {}中(确保将图形包含在用户的媒体文件夹中).然后,便笺将如下所示.

Then, I had to just put the filename inside \xplain{} (making sure to include the graphic in my user's media folder). Then the note would look like this.

\begin{note}
\begin{field}
\textbf{\large ruminate}
\end{field}
\begin{field}
\textbf{\large ruminate}
\begin{description}
\item[verb] \hfill \\ 
chew the cuds

\item[verb] \hfill \\ 
reflect deeply on a subject

\end{description}
\end{field}

\xplain(<img src="image.jpg" />)

\end{note}

这篇关于如何以乳胶格式将图像插入Anki笔记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆