
我有一個設置,例如,我需要將標題設置為“方程式”而不是“方程式”。有沒有辦法做到這一點我的程式碼如下
乾杯
\documentclass{scrreprt}
\usepackage[english]{babel}
\usepackage{aliascnt}%Counter and float caption for Equations
\newaliascnt{eqnfloat}{equation}
\newfloat{eqnfloat}{h}{eqflts}
\floatname{eqnfloat}{Equation}
\newcommand*{\ORGeqnfloat}{}
\let\ORGeqnfloat\eqnfloat
\def\eqnfloat{%
\let\ORIGINALcaption\caption
\def\caption{%
\addtocounter{equation}{-1}%
\ORIGINALcaption
}%
\ORGeqnfloat
}
\begin{document}
{eqnfloat}[!ht]
\begin{eqnarray}
A=B+C \label{eqn:1}\\
B=X+Y \label{eqn:2}
\end{eqnarray}
\caption{Some caption}
\labeL{eqn:1+2}
\end{eqnfloat}
\end{document}
答案1
將應標有「方程式」標題的方程式用一對括起來,並在啟動浮動環境之前\begingroup...\endgroup
使用語句。\floatname{eqnfloat}{Equations}
它只會針對這個特殊的方程組而改變。
\documentclass{scrreprt}
\usepackage{float}
\usepackage[english]{babel}
\usepackage{aliascnt}%Counter and float caption for Equations
\usepackage{caption}
\newaliascnt{eqnfloat}{equation}
\newfloat{eqnfloat}{h}{eqflts}
\floatname{eqnfloat}{Equation}
\newcommand*{\ORGeqnfloat}{}
\let\ORGeqnfloat\eqnfloat
\def\eqnfloat{%
\let\ORIGINALcaption\caption
\def\caption{%
\addtocounter{equation}{-1}%
\ORIGINALcaption
}%
\ORGeqnfloat
}
\begin{document}
\begingroup
\floatname{eqnfloat}{Equations}
\begin{eqnfloat}[!ht]
\begin{eqnarray}
A=B+C \label{eqn:1}\\
B=X+Y \label{eqn:2}
\end{eqnarray}
\caption{Some caption}
\label{eqn:1+2}
\end{eqnfloat}
\endgroup
\begin{eqnfloat}[!ht]
\begin{eqnarray}
A=B+C \label{eqn:3}\\
B=X+Y \label{eqn:4}
\end{eqnarray}
\caption{Some caption}
\label{eqn:3+4}
\end{eqnfloat}
\end{document}