
LaTeX에 방정식을 직접 삽입하는 것은 처음이므로 명백한 내용을 놓치고 있다는 것은 의심의 여지가 없습니다.
나는 간단한 2행, 2열 행렬을 가지고 있습니다. 하지만; 행렬의 맨 위 행은 내가 원하는 방식(왼쪽 정렬)으로 정렬되고 두 번째 행은 중앙에 정렬된 것 같습니다. 이 행의 정렬을 지정하는 방법이 있나요?
현재 결과:
목표 결과:
마크업:
\begin{figure}[h]
\Large
\begin{displaymath}
\Delta\tau_{xy}^{k} = \left\{\begin{matrix}
Q/L_k & if\; Agent\; k\; uses\; curve\; xy\; in\; its\; tour\\
0 & otherwise
\end{matrix}\right.
\end{displaymath}
\end{figure}
답변1
dcases*
에서 사용할 수 있습니다 mathtools
. 여기서 첫 번째 열은 수학 모드이고 두 번째 열은 텍스트 모드입니다.
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\Delta\tau_{xy}^{k} =
\begin{dcases*}
Q/L_k & if Agent $k$ uses curve $xy$ in its tour\\
0 & otherwise
\end{dcases*}
\end{equation}
\end{document}
여기에는 동일한 사용 방법이 있습니다.cases
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\Delta\tau_{xy}^{k} =
\begin{cases}
Q/L_k & \text{if Agent $k$ uses curve $xy$ in its tour}\\
0 & \text{otherwise}
\end{cases}
\end{equation}
\end{document}
이 경우 두 번째 열 내용은 \tex{...}
매크로 내에 포함되어야 합니다.
답변2
관련 matrix
명령amsmath
모두 해당 열이 c
입력되어 있습니다. 가장 쉬운 방법은 친구를 사용하는 것입니다 . 또는 원하는 정렬에 따라 cases
수동으로 설정할 수도 있습니다 .array
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\Delta\tau_{xy}^{k} = \left\{\begin{matrix}
Q/L_k & \text{if Agent~$k$ uses curve~$xy$ in its tour} \\
0 & \text{otherwise}
\end{matrix}\right.
\]
\[
\Delta\tau_{xy}^{k} = \left\{\begin{array}{@{}ll@{}}
Q/L_k & \text{if Agent~$k$ uses curve~$xy$ in its tour} \\
0 & \text{otherwise}
\end{array}\right.\kern-\nulldelimiterspace
\]
\end{document}