Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a setup where I need, for one instance, to make a caption read Equations rather than Equation. Is there a way to do this The code that I have is below

Cheers

    \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}
share|improve this question
    
Your 'MWE' contains some errors –  Christian Hupfer May 8 at 18:09
add comment

1 Answer 1

Enclose the equations which should be be captioned with 'Equations' with a \begingroup...\endgroup pair and use a \floatname{eqnfloat}{Equations} statement before starting the floating environment. It will change only for this special group of 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}

enter image description here

share|improve this answer
    
Brilliant, Cheers! –  Magiclamarshmallow May 8 at 18:44
    
Sorry Christian, How do it get it to then read "Equations 0.1 & 0.2"? –  Magiclamarshmallow May 8 at 18:58
    
@Magiclamarshmallow: That's a design flaw of your floating equation environment, it has nothing to do with \floatname. –  Christian Hupfer May 8 at 20:36
    
I got a work around \begingroup \floatname{eqnfloat}{Equations \ref{eq:1}\&} \begin{eqnfloat}[!ht] Probably not the best solution, but given its a one off it should be OK I hope –  Magiclamarshmallow May 9 at 8:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.