式と式番号の間に\quadスペースを中央揃えで設定する方法

式と式番号の間に\quadスペースを中央揃えで設定する方法

式と式番号の間にスペースを設定し、中央に出力する方法\quad。つまり、式が中央に配置され、出力は以下のようになります。

A + b (1)

A + b (2)

答え1

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

\documentclass{article}
\usepackage{amsmath}
\begin{document}

The usual setting (in \LaTeX\ and generally) is to have the numbers flush to the edge
\begin{align}
    A &+ b \\
    Ax &+ zz
\end{align}

But if you really need this layout you can do the following
(replacing 1em by whatever space you need):

\newcommand\mytag{\hspace*{1em}\refstepcounter{equation}(\theequation)}
\[
\begin{aligned}
    A &+ b &\mytag\\
    Ax &+ zz &\mytag
\end{aligned}
\]

\end{document}

関連情報