今天在寫論文時嘗試用了Tikz繪制神經(jīng)網(wǎng)絡示意圖。代碼如下:
\begin{tikzpicture}[scale = 0.6]
\node (v1) at (0,12.3) {};
\node (v2) at (0,14) {};
\draw[->, draw=black, line width=1pt] (v1)
edge node[near start, auto] {}(v2);
\end{tikzpicture}
這里我省略了一部分代碼。
直接添加到原文中顯示結果是這樣的:

image.png
沒有標題無法引用還排在了文本中,可是教我怎么用的教程沒說呀。
方法1(最常規(guī)):
\being{figure}[H]
\begin{tikzpicture}
...
\end{tikzpicture}
\caption{}
\label{}
\end{figure}
加一個浮動體,這是我后來發(fā)現(xiàn),我因為未定義位置就成立一頁。
方法2
用minipage
\begin{minipage}
...
\captionof{}{}
\end{minipage}
在導言欄添加captionof包。
不過這個方法排的辦標題下不會自動空行。