如何將所有這些方程式分組為一組並編寫它們而不會出現 Missing $ insert 錯誤。 ...吉}

如何將所有這些方程式分組為一組並編寫它們而不會出現 Missing $ insert 錯誤。 ...吉}

這是我想寫的方程,但它沒有按預期工作

在此輸入影像描述

這是我到目前為止所嘗試過的

    \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}。這是您的方程式的建議版本。

一些注意事項:

  • 該數字應位於等式的最後一行。
  • 使用\textfromamsmath顯示文字。
  • 使用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我會在環境中使用單一環境equation。我也會使用\mathrmand\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} 

相關內容