두 가지 유형의 새 부동 소수점을 정의했지만 각각을 별도로 나열하려고 하면 동일한 목록으로 축소됩니다. 다음은 다음과 같습니다 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
두 목록 정의의 파일 확장자는 동일합니다. 즉, 두 float 유형이 모두 목록 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}