ラテックスでの方程式のラベル付け

ラテックスでの方程式のラベル付け

次のような方程式からの参照が必要です:

\documentclass{article}
\usepackage{amssymb,amsmath}
\begin{document}
\begin{equation} \label{eq:1}
 y+x=3
\end{equation}
 some text \ref{eq:1} some text  
\end{document}

結果は「some text Eq.(1) some text」となります。数字だけではなく、括弧内の数字の前に Eq. または 'Equation' を挿入します。

答え1

使用cleveref

\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{cleveref}
\crefname{equation}{Eq.}{Eqs.}
\begin{document}
\begin{equation} \label{eq:1}
 y+x=3
\end{equation}
 some text \cref{eq:1} some text
\end{document}

ここに画像の説明を入力してください

関連情報