これらすべての方程式を 1 つのグループにまとめ、「Missing $ inserted. ...gy」というエラーなしで記述するにはどうすればよいですか。

これらすべての方程式を 1 つのグループにまとめ、「Missing $ inserted. ...gy」というエラーなしで記述するにはどうすればよいですか。

ここに私が書きたい方程式があるのですが、期待通りに動作しません

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

これまで試してみたことは次のとおりです

    \begin{equation} \label{eq:3.2}
     & \[(EQE)= \frac{photons_{out}}{electrons_{in}}\]

     & = \frac{radiant flux / photon energy}{injected current / elementary charge}
        \end{equation}

答え1

\[ \]数式モードを別の数式環境にネストしています{equation}。これは方程式の推奨バージョンです。

いくつかの注意点:

  • 数字は方程式の最後の行に入力する必要があります。
  • テキストを表示するには\textfrom を使用します。amsmath
  • 異なる行に方程式を配置するには、alignfrom を使用します。amsmath
  • ラベルには数字を使用しないでください。 には意味のあるラベルを使用してください\label
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
  \text{EQE}&=\frac{\#\,\text{photons}_{\text{out}}}{\#\,\text{electrons}_\text{in}}\nonumber\\
  &=\frac{\text{radiation flux}/\text{photon energy}}{\text{injected current}/\text{elementary charge}}\nonumber\\
  &=\frac{\Phi_e/E_{\text{ph}}}{I_{\text{in}/e}}=\frac{\Phi_e\times e}{I_{\text{in}\times E_{\text{ph}}}}\nonumber\\
  &=\frac{\pi\times A\times L_{\text{v}}\times e\times \lambda_{\text{average}}}{K_{\text{m}}\times V(\lambda_{\text{peak}})\times I_{\text{in}}\times hc}\label{eq:somename}
\end{align}
\end{document}

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

答え2

aligned環境内では単一の環境を使用します。単語や頭字語にはandequationも使用します。\mathrm\textnormal

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

\documentclass{article}
\usepackage{amsmath} % for 'aligned' environment
\usepackage{newpxtext,newpxmath} % optional
\numberwithin{equation}{section} % optional

\begin{document}
\setcounter{section}{4}  % just for this example
\setcounter{equation}{4}

\begin{equation} \label{eq:EQE}
\begin{aligned}
\mathrm{EQE}
&= \frac{\textnormal{\#photons}_{\textnormal{out}}}{\textnormal{\#electrons}_{\textnormal{in}}}\\
&= \frac{\textnormal{radiant flux}/\textnormal{photon energy}}{\textnormal{injected current}/\textnormal{elementary charge}}
\end{aligned}
\end{equation}
\end{document} 

関連情報