
이것은 질문에 대한 후속 조치입니다.항목별 목록의 하위 방정식 번호 매기기.
\documentclass[10pt]{article}
% for fancy math
\usepackage{amsmath}
% rank operator
\DeclareMathOperator*{\rank}{rank}
% Matrix transpose
\newcommand{\trans}[1]{\ensuremath{{#1}^\top}}
% for extra space at the end of abbreviation
\usepackage{xspace}
% positive semi-definite
\newcommand{\psd}{\textsc{psd}\xspace}
% boldface uppercase letters for matrices
\newcommand{\Abf}{\ensuremath{\mathbf A}}
\newcommand{\Bbf}{\ensuremath{\mathbf B}}
% boldface lowercase letters for vectors
\newcommand{\xbf}{\ensuremath{\mathbf x}}
% for math blackboard font
\usepackage{amssymb}
% set of real numbers
\newcommand{\Rbb}{\ensuremath{\mathbb R}}
\usepackage{palatino}
\usepackage[sc]{mathpazo}
\begin{document}
\noindent
For any real symmetric matrcies $\Abf$ such that $\rank(\Abf_{n\times n})=r$,
the following statements are equivalent
and any one of them can serve as the definition of
\emph{positive semi-definite} (\psd) matrices.
\begin{subequations}
\begin{itemize}
\item $\trans\xbf \Abf\xbf \geq 0$ for any non-zero vector
$\xbf\in\Rbb^{n\times 1}$.
\hfill\refstepcounter{equation}\textup{(\theequation)}%
\item All the $n$ eigenvalues of $\Abf$ are non-negative.
\hfill\refstepcounter{equation}\textup{(\theequation)}%
\item $\Abf=\trans\Bbf \Bbf$ for some $\Bbf$ with $\rank(\Bbf)=r$.
\hfill\refstepcounter{equation}\textup{(\theequation)}%
\end{itemize}
\end{subequations}
\end{document}
이제 라벨을 맞춤 설정하고 (1a)
정의 를 다른 일반적인 방정식 번호와 구별하고 싶습니다 .(1b)
(1c)
(def1)
나는 그것들을 ,(def2)
, 그리고 로 라벨링하고 싶습니다(def3)
.subequations
하지만 명령을 통해 방정식으로 참조하고 싶기 때문에 여전히 환경을 사용하고 싶습니다eqref
.
어떻게 해야 하나요?
답변1
새로운 카운터를 소개할 수 있습니다.mysub
\newcounter{mysub}
\setcounter{mysub}{0}
\renewcommand{\themysub}{def\arabic{mysub}}
\theequation
. 내부 대신 이것을 사용하십시오 subequations
.
가 끝난 후에도 이 카운터를 재설정하려면 subequations
다음 줄도 추가하세요.
\usepackage{etoolbox}
\AtEndEnvironment{subequations}{\setcounter{mysub}{0}}
MWE:
\documentclass[10pt]{article}
% for fancy math
\usepackage{amsmath}
% rank operator
\DeclareMathOperator*{\rank}{rank}
% Matrix transpose
\newcommand{\trans}[1]{\ensuremath{{#1}^\top}}
% for extra space at the end of abbreviation
\usepackage{xspace}
% positive semi-definite
\newcommand{\psd}{\textsc{psd}\xspace}
% boldface uppercase letters for matrices
\newcommand{\Abf}{\ensuremath{\mathbf A}}
\newcommand{\Bbf}{\ensuremath{\mathbf B}}
% boldface lowercase letters for vectors
\newcommand{\xbf}{\ensuremath{\mathbf x}}
% for math blackboard font
\usepackage{amssymb}
% set of real numbers
\newcommand{\Rbb}{\ensuremath{\mathbb R}}
\usepackage{palatino}
\usepackage[sc]{mathpazo}
\usepackage{etoolbox}
\AtEndEnvironment{subequations}{\setcounter{mysub}{0}}
\newcounter{mysub}
\setcounter{mysub}{0}
\renewcommand{\themysub}{def\arabic{mysub}}
\begin{document}
\noindent
For any real symmetric matrcies $\Abf$ such that $\rank(\Abf_{n\times n})=r$,
the following statements are equivalent
and any one of them can serve as the definition of
\emph{positive semi-definite} (\psd) matrices.
\begin{subequations}\label{eq:1}
\begin{itemize}
\item $\trans\xbf \Abf\xbf \geq 0$ for any non-zero vector
$\xbf\in\Rbb^{n\times 1}$.
\hfill\refstepcounter{mysub}\textup{(\themysub)}\label{eq:1a}%
\item All the $n$ eigenvalues of $\Abf$ are non-negative.
\hfill\refstepcounter{mysub}\textup{(\themysub)}%
\item $\Abf=\trans\Bbf \Bbf$ for some $\Bbf$ with $\rank(\Bbf)=r$.
\hfill\refstepcounter{mysub}\textup{(\themysub)}%
\end{itemize}
\end{subequations}
\noindent
We refer to the global equation \eqref{eq:1} and to subequation \eqref{eq:1a}
\end{document}
산출:
답변2
이것이 당신이 원하는 것일 수도 있지만 확실하지 않습니다.
\begin{align}
& \hspace*{-3cm} \bullet \;\; \trans\xbf \Abf\xbf \geq 0 \text{ for any non-zero vector } \xbf\in\Rbb^{n\times 1}.\tag{def1} \label{ok} \\
& \hspace*{-3cm} \bullet \;\; \text{ All the } n\text{ eigenvalues of } \Abf \text{are non-negative}.\tag{def2} \label{ok2} \\
& \hspace*{-3cm} \bullet \;\; \Abf=\trans\Bbf \Bbf \text{ for some } \Bbf \text{ with } \rank(\Bbf)=r. \tag{def3} \label{ok3}
\end{align}
This is Eq.\eqref{ok} and not quite Eq.\eqref{ok2}