gpt4 book ai didi

latex - 如何将一张图片插入到latex格式的Anki笔记中?

转载 作者:行者123 更新时间:2023-12-02 17:39:06 24 4
gpt4 key购买 nike

我正在尝试创建一个 Anki 牌组,例如,前面有一个词。然后我在背面添加带有定义的单词以及图片。但是当已经有两个字段(前面​​的文本和后面的文本)时,我在包含图形时遇到了麻烦。这是一个示例注释:

\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 不会让我在背面有两个字段。

\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 禁止这样做,但我更改了源代码并使包可以工作)但是在编译时找不到图像。

最佳答案

好吧,那么诀窍是先学习更改 Anki 卡片模板。

前台模板

{{Word}}

返回模板

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

<hr id=answer>

然后,我必须将文件名放在\xplain{} 中(确保将图形包含在用户的媒体文件夹中)。然后便条看起来像这样。

\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}

关于latex - 如何将一张图片插入到latex格式的Anki笔记中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22903732/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com