두 개의 인접한 열에 쓰기를 정렬합니다.

두 개의 인접한 열에 쓰기를 정렬합니다.

어떻게 추가하나요?라인2. 3호선. 두 번째 행의 첫 번째 열에 두 번째 열의 해당 항목과 정렬되도록 하시겠습니까? 여기에 이미지 설명을 입력하세요

\documentclass[a4paper,english,12pt,oneside]{book}

\usepackage[left=20mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{refstyle}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{epstopdf}
\usepackage{breqn}
\usepackage{mathtools}
%-------------------------------------------------------------------------------
%\usepackage{a4wide}
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{amsthm}
\usepackage{newlfont}
\usepackage{graphics}
\usepackage{tabularx}
\usepackage{geometry}
\usepackage{lscape}
\usepackage{multirow}
\usepackage{epsfig}
\usepackage{bm,amsmath}

\usepackage{color}
\definecolor{violet}{rgb}{0.7,0.2,0.8}
\definecolor{bluevert}{rgb}{0,0.9,1}
\definecolor{trustcolor}{rgb}{0.71,0.14,0.07}
\definecolor{PinkTriton}{rgb}{.708 ,.055 ,.275}
\definecolor{RedTriton}{rgb}{.491 ,.097 ,.066} % couleur rouge du triton
\definecolor{OrangeTriton}{rgb}{.953 ,.502 ,.04}
%-------------------------------------------------------------------------------




\begin{document}

\begin{table}[ht!]
\centering
  \begin{tabular}{|c|l|}
  \hline
  \textbf{Input} & Given $ A|_{\theta = 0.5} = \begin{bmatrix} -1.0000 & 0.4794\\ 1.0000 & 0.2500\\ 0.2298 & 0.0417\\ 0.5000 & -0.5000\\ 0.7702 & 0.3750\\ 0.1250 & 0.5000 \end{bmatrix}$,
  $ A_{\theta}^{'}|_{\theta = 0.5} = \begin{bmatrix} -2.000 & 0.8776\\ 2.0000 & 1.0000\\ 0.8415 & 0.2500\\ 1.0000 & 2.0000\\ -0.8415 & 1.7500\\ 0.7500 & 1.0000 \end{bmatrix}$\\
  \hline
 \textbf{line1.} & Compute $ M = Q^TA_{\theta}^{'}R^{-1} = \begin{bmatrix} 1.4216  & 1.7145\\ -0.4229 & 0.9862 \end{bmatrix}$.\\
 & Factorize $M L+D+U = \begin{bmatrix} 0  & 0\\ -0.4229 & 0 \end{bmatrix}+\begin{bmatrix} 1.4216  & 0\\ 0 & 0.9862 \end{bmatrix}+\begin{bmatrix} 0  & 1.7145\\ 0 & 0 \end{bmatrix}$.\\
 & Compute $R_{\theta}^{'} = (L^T+D+U)R= \begin{bmatrix}  2.4257   & 1.1468\\ 0 & 0.9510 \end{bmatrix}$ \\
\hline
  \end{tabular}
\caption{IRMf-TEP Comparaison}
\label{tab:dif_irm_tep}
\end{table}\newpage

\end{document}

답변1

관련 항목 앞에 then을 추가하면 됩니다 &.

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{table}[ht!]
\centering
\begin{tabular}{|c|l|}
\hline
  \textbf{Input} & Given $ A|_{\theta = 0.5} = \begin{bmatrix} -1.0000 & 0.4794\\ 1.0000 & 0.2500\\ 0.2298 & 0.0417\\ 0.5000 & -0.5000\\ 0.7702 & 0.3750\\ 0.1250 & 0.5000 \end{bmatrix}$,
  $ A_{\theta}'|_{\theta = 0.5} = \begin{bmatrix} -2.000 & 0.8776\\ 2.0000 & 1.0000\\ 0.8415 & 0.2500\\ 1.0000 & 2.0000\\ -0.8415 & 1.7500\\ 0.7500 & 1.0000 \end{bmatrix}$\\
\hline
  \textbf{line1.} & Compute $ M = Q^TA_{\theta}'R^{-1} = \begin{bmatrix} 1.4216  & 1.7145\\ -0.4229 & 0.9862 \end{bmatrix}$.\\
  \textbf{line2.} & Factorize $M L+D+U = \begin{bmatrix} 0  & 0\\ -0.4229 & 0 \end{bmatrix}+\begin{bmatrix} 1.4216  & 0\\ 0 & 0.9862 \end{bmatrix}+\begin{bmatrix} 0  & 1.7145\\ 0 & 0 \end{bmatrix}$.\\
  \textbf{line3.} & Compute $R_{\theta}' = (L^T+D+U)R= \begin{bmatrix}  2.4257   & 1.1468\\ 0 & 0.9510 \end{bmatrix}$ \\
\hline
\end{tabular}
\caption{IRMf-TEP Comparison}
\label{tab:dif_irm_tep}
\end{table}

\end{document}

여기에 이미지 설명을 입력하세요

더 이상 a4wide사용되지 않으며 버그가 있습니다. 또한 newlfont새 문서에도 사용해서는 안 됩니다. 예제에 불필요한 패키지를 제거했습니다.

또한 ^{'}는 잘못되었으며 정당해야 합니다 '.

나는 또한 테이블에 대한 다른 접근 방식을 제안합니다 booktabs. 수직선은 억제되어 \addlinespace더 많은 공간을 제공하고 행을 더 잘 구분하는 데 사용할 수 있습니다.

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}

\begin{document}

\begin{table}[ht!]
\centering
\begin{tabular}{@{}ll@{}}
\toprule
\addlinespace
  \textbf{Input} & Given $ A|_{\theta = 0.5} = \begin{bmatrix} -1.0000 & 0.4794\\ 1.0000 & 0.2500\\ 0.2298 & 0.0417\\ 0.5000 & -0.5000\\ 0.7702 & 0.3750\\ 0.1250 & 0.5000 \end{bmatrix}$,
  $ A_{\theta}^{'}|_{\theta = 0.5} = \begin{bmatrix} -2.000 & 0.8776\\ 2.0000 & 1.0000\\ 0.8415 & 0.2500\\ 1.0000 & 2.0000\\ -0.8415 & 1.7500\\ 0.7500 & 1.0000 \end{bmatrix}$\\
\addlinespace
\midrule
\addlinespace
  \textbf{line1.} & Compute $ M = Q^TA_{\theta}^{'}R^{-1} = \begin{bmatrix} 1.4216  & 1.7145\\ -0.4229 & 0.9862 \end{bmatrix}$.\\
\addlinespace
  \textbf{line2.} & Factorize $M L+D+U = \begin{bmatrix} 0  & 0\\ -0.4229 & 0 \end{bmatrix}+\begin{bmatrix} 1.4216  & 0\\ 0 & 0.9862 \end{bmatrix}+\begin{bmatrix} 0  & 1.7145\\ 0 & 0 \end{bmatrix}$.\\
\addlinespace
  \textbf{line3.} & Compute $R_{\theta}^{'} = (L^T+D+U)R= \begin{bmatrix}  2.4257   & 1.1468\\ 0 & 0.9510 \end{bmatrix}$ \\
\addlinespace
\bottomrule
\end{tabular}
\caption{IRMf-TEP Comparison}
\label{tab:dif_irm_tep}
\end{table}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보