Einzelfalländerung der Überschrift

Einzelfalländerung der Überschrift

Ich habe ein Setup, bei dem ich beispielsweise eine Überschrift mit „Gleichungen“ statt „Gleichung“ versehen muss. Gibt es eine Möglichkeit, dies zu tun? Der Code, den ich habe, ist unten

Prost

    \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}

Antwort1

Schließen Sie die Gleichungen, die mit „Gleichungen“ betitelt werden sollen, mit einem \begingroup...\endgroupPaar ein und verwenden Sie eine \floatname{eqnfloat}{Equations}Anweisung, bevor Sie die Floating-Umgebung starten. Sie wird nur für diese spezielle Gruppe von Gleichungen geändert.

\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}

Bildbeschreibung hier eingeben

verwandte Informationen