生活随笔
收集整理的這篇文章主要介紹了
latex在algorithm环境或表格中插入圆圈脚注
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
用的模板默認(rèn)是帶圓圈的腳注,但是在algorithm環(huán)境下直接用\footnote{}則腳注內(nèi)容無(wú)效,解決辦法:
宏包文件中加入以下內(nèi)容:
\usepackage
{pifont
}
% \usepackage
[perpage
]{footmisc
} 每頁(yè)重新編號(hào)用的,但在表或算法框里不起作用
\DefineFNsymbols
{circled
}{{\ding
{192}}{\ding
{193}}{\ding
{194}}
{\ding
{195}}{\ding
{196}}{\ding
{197}}{\ding
{198}}{\ding
{199}}
{\ding
{200}}{\ding
{201}}}
文章中algorithm前加入\renewcommand{\thefootnote}{\ding{\numexpr192+\value{footnote}}},需要腳注的地方加入\footnotemark{},algorithm結(jié)束加入\footnotetext{腳注內(nèi)容}。其中\ding{\numexpr192+\value{footnote}}表示腳注為帶編號(hào)圓圈類(lèi)型,也可以使用其他命令改成不同類(lèi)型的腳注。
\renewcommand
{\thefootnote
}{\ding
{\numexpr192
+\value
{footnote
}}}
\begin
{algorithm
}[h
]
\caption
{求解
(\ref
{eq
:4.3.2})的ADMM算法
}\textbf
{輸入
}:數(shù)據(jù)樣本$\mathbf
{X
}\in\mathbb
{R
}^{d\times N
}$,$K$,
正則化參數(shù)$\lambda_
{1}>0$,最鄰近節(jié)點(diǎn)個(gè)數(shù)$k$\footnotemark
{}。
......
\textbf
{輸出
}:$\mathbf
{P
}$,$\mathbf
{Q
}$和$\mathbf
{S
}$。
\end
{algorithm
}
\footnotetext
{實(shí)際中,$k$取較小值時(shí)往往取得較好的聚類(lèi)效果,
并且可以通過(guò)
(\ref
{eq
:4.2.6})在每次迭代過(guò)程中自適應(yīng)選取最優(yōu)值。
}
由于前文已經(jīng)有一個(gè)腳注,模板中腳注是默認(rèn)每頁(yè)重新編號(hào)的,這里看到無(wú)效。可以通過(guò)自定義方式\footnotemark[1]{}將編號(hào)設(shè)為1。
總結(jié)
以上是生活随笔為你收集整理的latex在algorithm环境或表格中插入圆圈脚注的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。