Solutons Lounge

How to assign common equation numbers for two lines of initial and boundary conditions – TeX


I suggest you use a two-row split environment (provided by the amsmath package, which is loaded automatically by the mathtools package) inside an equation environment.

Depending on your formatting preferences, you may want to align the rows (by inserting & symbols) either on the word “as” (see below) or at the start of each row.

\documentclass[12pt,a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{mathtools,amssymb,amsthm}
\usepackage{hyperref}

\begin{document}

\begin{equation}
\begin{split}
u = u_{w}=ax^n,\ T=T_{w},\ C=C_{w},\ v=0 
  &\quad\text{as}\quad y \to 0 \\
T \to T_{\infty},\ C \to C_{\infty},\ u \to u_{e}=bx 
  &\quad\text{as}\quad y \to \infty
\end{split}
\end{equation}

\end{document}

Addendum to address the OP’s follow-up question: To place just this display-math group at the far-left edge of the text block, I suggest you (a) change the inner split environment to an aligned environment and (b) change the outer equation environment to an flalign environment. (The aligned and flalign environments are also provided by the amsmath package.)

The vertical lines at the edges of the screenshot are there because the geometry package was loaded with the option showframe, to show the edges of the text block You will likely want to omit this option in your real document.

\documentclass[12pt,a4paper]{article}
\usepackage[margin=1in,showframe]{geometry} % remove 'showframe' option in real document
\usepackage{mathtools,amssymb,amsthm}
\usepackage{hyperref}

\begin{document}

\begin{flalign}
\begin{aligned}
u = u_{w}=ax^n,\ T=T_{w},\ C=C_{w},\ v=0 
  &\quad\textup{as}\quad y \to 0 \\
T \to T_{\infty},\ C \to C_{\infty},\ u \to u_{e}=bx 
  &\quad\textup{as}\quad y \to \infty
\end{aligned} && % no need here for anything to the right of '&&'
\end{flalign} 

\end{document}



Source link

Exit mobile version