我定义了两种类型的新浮点数,但当我尝试分别列出它们时,它们会折叠到同一个列表中。以下是MWE
:
\documentclass{book}
\usepackage{float}
\usepackage{newfloat}
\DeclareFloatingEnvironment[
fileext=loa,
listname=List of A,
name=FloatA,
placement=tbhp,
within=chapter,
]{floata}
\DeclareFloatingEnvironment[
fileext=loa,
listname=List of B,
name=FloatB,
placement=tbhp,
within=chapter,
]{floatb}
\begin{document}
\listoffloatas
\listoffloatbs
\newpage
\begin{floata}
\caption[float a]{float a example}
\end{floata}
\begin{floatb}
\caption[float b]{float b example}
\end{floatb}
\end{document}
答案1
两个列表定义的文件扩展名相同,这意味着两个浮点类型都将放入列表A
( )。例如,loa
将第二个列表扩展名更改为。lob
\documentclass{book}
\usepackage{float}
\usepackage{newfloat}
\DeclareFloatingEnvironment[
fileext=loa,
listname=List of A,
name=FloatA,
placement=tbhp,
within=chapter,
]{floata}
\DeclareFloatingEnvironment[
fileext=lob,
listname=List of B,
name=FloatB,
placement=tbhp,
within=chapter,
]{floatb}
\begin{document}
\listoffloatas
\listoffloatbs
\newpage
\begin{floata}
\caption[float a]{float a example}
\end{floata}
\begin{floatb}
\caption[float b]{float b example}
\end{floatb}
\end{document}