Skip to main content
Fixed numbers
Source Link
egreg
  • 1.2m
  • 147
  • 2.8k
  • 4.5k

I'm not sure it's a good idea, particularly if you never refer to a single case. You can just refer to “Equations (1)”, which will give readers the hint that they're more than one.

Anyway, here's an implementation that also allows to refer to a single equation from the bunch.

\documentclass{article} \usepackage{amsmath,xparse} \ExplSyntaxOn \NewDocumentCommand{\multinumber}{mo} { \addtocounter{equation}{-1} \seq_clear:N \l__ignacio_multinumber_seq \int_step_inline:nn { #1 } { \refstepcounter{equation} \IfValueT{#2}{ \use:c{ ltx@label } {#2-##1} } \seq_put_right:Nx \l__ignacio_multinumber_seq { (\theequation) } } \tag* { \seq_use:Nn \l__ignacio_multinumber_seq { ,~ } }   \addtocounter{equation}{1} } \ExplSyntaxOff \begin{document} References: \ref{Einstein} (global), \ref{Einstein-1} (first) \begin{equation} F=ma \end{equation} \begin{equation}\label{Einstein} E=m_{j}c^2 \multinumber{3}[Einstein] \end{equation} \begin{equation} A=B+C \end{equation} \begin{equation} D_{j}= E_{j} + F_{j} \multinumber{3} \end{equation} \end{document} 

enter image description hereenter image description here

I'm not sure it's a good idea, particularly if you never refer to a single case. You can just refer to “Equations (1)”, which will give readers the hint that they're more than one.

Anyway, here's an implementation that also allows to refer to a single equation from the bunch.

\documentclass{article} \usepackage{amsmath,xparse} \ExplSyntaxOn \NewDocumentCommand{\multinumber}{mo} { \seq_clear:N \l__ignacio_multinumber_seq \int_step_inline:nn { #1 } { \refstepcounter{equation} \IfValueT{#2}{ \use:c{ ltx@label } {#2-##1} } \seq_put_right:Nx \l__ignacio_multinumber_seq { (\theequation) } } \tag* { \seq_use:Nn \l__ignacio_multinumber_seq { ,~ } } } \ExplSyntaxOff \begin{document} References: \ref{Einstein} (global), \ref{Einstein-1} (first) \begin{equation} F=ma \end{equation} \begin{equation}\label{Einstein} E=m_{j}c^2 \multinumber{3}[Einstein] \end{equation} \begin{equation} A=B+C \end{equation} \begin{equation} D_{j}= E_{j} + F_{j} \multinumber{3} \end{equation} \end{document} 

enter image description here

I'm not sure it's a good idea, particularly if you never refer to a single case. You can just refer to “Equations (1)”, which will give readers the hint that they're more than one.

Anyway, here's an implementation that also allows to refer to a single equation from the bunch.

\documentclass{article} \usepackage{amsmath,xparse} \ExplSyntaxOn \NewDocumentCommand{\multinumber}{mo} { \addtocounter{equation}{-1} \seq_clear:N \l__ignacio_multinumber_seq \int_step_inline:nn { #1 } { \refstepcounter{equation} \IfValueT{#2}{ \use:c{ ltx@label } {#2-##1} } \seq_put_right:Nx \l__ignacio_multinumber_seq { (\theequation) } } \tag* { \seq_use:Nn \l__ignacio_multinumber_seq { ,~ } }   \addtocounter{equation}{1} } \ExplSyntaxOff \begin{document} References: \ref{Einstein} (global), \ref{Einstein-1} (first) \begin{equation} F=ma \end{equation} \begin{equation}\label{Einstein} E=m_{j}c^2 \multinumber{3}[Einstein] \end{equation} \begin{equation} A=B+C \end{equation} \begin{equation} D_{j}= E_{j} + F_{j} \multinumber{3} \end{equation} \end{document} 

enter image description here

Source Link
egreg
  • 1.2m
  • 147
  • 2.8k
  • 4.5k

I'm not sure it's a good idea, particularly if you never refer to a single case. You can just refer to “Equations (1)”, which will give readers the hint that they're more than one.

Anyway, here's an implementation that also allows to refer to a single equation from the bunch.

\documentclass{article} \usepackage{amsmath,xparse} \ExplSyntaxOn \NewDocumentCommand{\multinumber}{mo} { \seq_clear:N \l__ignacio_multinumber_seq \int_step_inline:nn { #1 } { \refstepcounter{equation} \IfValueT{#2}{ \use:c{ ltx@label } {#2-##1} } \seq_put_right:Nx \l__ignacio_multinumber_seq { (\theequation) } } \tag* { \seq_use:Nn \l__ignacio_multinumber_seq { ,~ } } } \ExplSyntaxOff \begin{document} References: \ref{Einstein} (global), \ref{Einstein-1} (first) \begin{equation} F=ma \end{equation} \begin{equation}\label{Einstein} E=m_{j}c^2 \multinumber{3}[Einstein] \end{equation} \begin{equation} A=B+C \end{equation} \begin{equation} D_{j}= E_{j} + F_{j} \multinumber{3} \end{equation} \end{document} 

enter image description here