
quiero etiquetar una ecuación
\[ 1 + 2 + \cdots + i = \frac{i(i+1)}{2} \eqname{Inequality(i)} \label{ineq} \]
involucrando la variable "i" como una función de (i) por lo que el resultado esperado se ve así
[Representación LaTeX de la ecuación anterior] (2.4)(i)
(lo que en realidad significa que hay "i" ecuaciones de este tipo). (2.4) podría referirse a la Ecuación 4 de la Sección 2. Cuando acceda a la ecuación más adelante, me gustaría que apareciera como
Dado que la ecuación (2.4)(n+1) se deriva de la ecuación (2.4)(n), utilice la inducción...
(EDITAR: Se mejoró la redacción para aclarar las preguntas en los comentarios).
Respuesta1
Veamos si adiviné correctamente lo que deseas obtener:
Esta salida fue generada por el siguiente código:
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{amsmath}
\numberwithin{equation}{section}
\newcommand*{\myTagFormat}[2]{(\ref{#1})($#2$)}
\begin{document}
\section{First}
Just to include a couple of equations:
\begin{align}
1 &= 1 \label{eq:one} \\
1+2 &= 3 \label{eq:two}
\end{align}
Until now, we have equations \eqref{eq:one} and~\eqref{eq:two}.
\section{Second}
Still another equation of the same form:
\begin{equation}
1+2+3 = 6 \label{eq:three}
\end{equation}
Generalizing equations \eqref{eq:one}, \eqref{eq:two}, and~\eqref{eq:three}, we
claim that
% Little trick:
\refstepcounter{equation}\label{eq:base}% <-- Note!
\begin{equation}
1+2+\dots+n = \frac{n(n+1)}{2}
\tag*{\myTagFormat{eq:base}{n}}\label{eq:base-n}
\end{equation}
Now you can either:
\begin{itemize}
\item
reference equation~\ref{eq:base-n} directly (note that you must use
\verb|\ref| instead of \verb|\eqref|, here), or
\item
say that equation~\myTagFormat{eq:base}{i+1} follows from
equation~\myTagFormat{eq:base}{i} by adding $i+1$ on both sides of the
latter.
\end{itemize}
One more equation to check that we haven't spoiled the numbering:
\begin{equation}
x=y
\end{equation}
\end{document}
Respuesta2
Usando mathtools
el comando del paquete \newtagform
, puede personalizar la numeración de ecuaciones de manera muy detallada. La sintaxis general del comando es:
\newtagform{label}[tag format]{left}{right}
Es label
solo una identificación única para el método de etiquetado que se puede recuperar usando el comando \usetagform{label}
y es lo que debe escribirse a la izquierda y a la derecha de la etiqueta (generalmente entre paréntesis) left
. right
Estos tag format
son los detalles del etiquetado que desea. En tu caso particular, puedes utilizar la siguiente sintaxis:
[\renewcommand{\theequation}{(\arabic{chapter}.\arabic{section})(\roman{equation})}]
Después de configurar el nuevo formato de numeración, también debe cambiar cómo aparecerán las ecuaciones cuando haga referencia a ellas. Para el estilo que deseas, el código debe ser:
\renewcommand{\theequation}{(\arabic{chapter}.\arabic{section})(\roman{equation})}
A continuación se muestra un ejemplo de cómo funciona esta numeración personalizada:
\documentclass[]{report}
\usepackage{amsmath}
\usepackage{amssymb, amsfonts}
\usepackage{gensymb}
\usepackage{mathtools}
\newtagform{Alph}[\renewcommand{\theequation}{(\arabic{chapter}.\arabic{section})(\roman{equation})}]{}{}
\usetagform{Alph}
\renewcommand{\theequation}{(\arabic{chapter}.\arabic{section})(\roman{equation})}
\begin{document}
\chapter{First Chapter}
\section{First Section}
\label{sec:one}
\begin{equation}
I = I_{ ph } -
\overbrace{
I_{ rs }
\biggl[
exp \biggl(
\frac{V + I R_{s}}{a \thinspace V_{t}}
\biggl) - 1
\biggl]
% overbrace title
}^{ I_{d} }
-
\overbrace{
\frac{V + I R_{s}}{R_{p}}
% overbrace title
}^{I_{p}}
%
\label{eq:I_PV_m}
\end{equation}
\begin{equation}
\label{eq:R_p}
%
R_{p} = R_{p,ref} \biggl( \frac{G_{ref}}{G_{op}} \biggl) \biggl( \frac{T_{op}}{T_{ref}} \biggl)^{\delta_{p}}
\end{equation}
\begin{equation}
PMARE = \underset{i}{max}
\biggl| \frac{x_{i}-y_{i}}{y_{i}} \biggl| \times 100\%
\quad i = 1, 2, \cdots , n
%
\label{eq:PMPARE}
\end{equation}
A test for referencing Eqs. \ref{eq:I_PV_m}, \ref{eq:R_p}, and \ref{eq:PMPARE} which belong to Section \ref{sec:one}.
\section{Second Section}
\label{sec:two}
\begin{equation}
\label{eq:R_{s}}
%
R_{s} = R_{s,ref} \biggl( \frac{T_{op}}{T_{ref}} \biggl)^{\delta_{s}}
\end{equation}
\begin{align}
I_{ph} &= I_{sc} \frac{R_{s} + R_{p}}{R_{p}} \notag
\\
&= I_{sc,ref} \bigg[ 1 + \frac{\alpha}{100} (T_{op}-T_{ref}) \biggl]
\frac{G_{op}}{G_{ref}} \frac{R_{s} + R_{p}}{R_{p}}
%
\label{eq:I_ph}
\end{align}
A test for referencing Eqs. \ref{eq:R_{s}} and \ref{eq:I_ph}which belong to Section \ref{sec:two}.
\end{document}
Otros tipos de opciones de numeración incluyen \Roman
(letras romanas en mayúscula) \alph
y \Alph
. Buena suerte
Respuesta3
Realmente no entendí la pregunta en la primera lectura y pensé que querías algo comoeste.
Pero no era exactamente lo que querías porque mi respuesta no puede dar resultados como (n+1)... pero si lo cambiamos un poco podemos tener esto:
\makeatletter
\newcommand*\ifcounter[1]{%
\ifcsname c@#1\endcsname%
\expandafter\@firstoftwo%
\else%
\expandafter\@secondoftwo%
\fi%
}%
\makeatother
\makeatletter
\newcommand\EqFamCustomTag[2]{%
\ifcounter{#1}{%
\expandafter\addtocounter{#1}{1}%
\xdef\temp{\csname #1 Eq\endcsname \space(#2)}%
\global\expandafter\let\csname #1\arabic{#1}\endcsname\temp%
\tag{\temp}%
}{%
\global\expandafter\newcounter{#1}%
\expandafter\addtocounter{#1}{1}%
\xdef\temp{\theequation\space(#2)}%
\xdef\eqonfamily{\theequation}%
\global\expandafter\let\csname #1 Eq\endcsname\eqonfamily%
\global\expandafter\let\csname #1\arabic{#1}\endcsname\temp%
\tag{\temp}%
\expandafter\addtocounter{equation}{1}
}%
}%
\makeatother
que se puede utilizar así:
\begin{equation}
\frac{x^2}{2}+\frac{3\cdot y^2}{10}=2\EqFamCustomTag{Elliptic}{n+1}
\end{equation}
y darte lo que quieres... (espero)... Para la numeración automática en las otras ecuaciones que tienes, puedes usar la de mi pregunta-respuesta referida (Esta pregunta también inició eso...)