표를 사용하여 방정식 시스템 표현

표를 사용하여 방정식 시스템 표현

저는 현재 방정식 시스템을 표현하기 위해 표를 사용하고 있습니다.

예는 다음과 같습니다:

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

왼쪽의 행렬만 표현할 수 있지만 변수와 RHS는 표현할 수 없습니다.

내 LHS는 다음과 같습니다

\begin{table}[H]
\centering
\label{augSystem}
 \renewcommand{\arraystretch}{2.2}  
 \begin{tabular}{|>{\centering\arraybackslash}p{1.5cm}:>{\centering\arraybackslash}p{2.4cm}:>{\centering\arraybackslash}p{0.8cm}:>{\centering\arraybackslash}p{0.8cm}:>{\centering\arraybackslash}p{2.4cm}:>{\centering\arraybackslash}p{0.8cm}:>{\centering\arraybackslash}p{0.8cm}| }
                \hline
                    & $A$            & $-b$    & $\bar{b} $    &    &             &                         \\[0.3cm] \hdashline
                    &                &         &               &    &             &                         \\[-0.4cm]
     $-A^{T}$       &                & $c$     & $-\bar{c}$    & I  &             &                         \\[0.7cm]\hdashline
      $b^{T}$       & -c             &         &$-\alpha$      &    & -1          &                         \\[0cm] \hdashline
$-\bar{b}^{T}$      & $\bar{c}^T$    &$\alpha$ &               &    &             & -1                      \\[0cm] \hdashline
                    &                &         &               &    &             &                         \\[-0.4cm]
  $-\bar{b}^{T}$    & $S$            &         &               & I  &             & -1                      \\[0.8cm] \hdashline
                    &                & $\rho$  &               &    & $\kappa$    &                         \\[0cm] \hdashline
                    &                &         & $\nu$         &    &             & $\theta$                \\[0cm] \hline
            \end{tabular}
\end{table}

변수는 y, x, y, v, z, a, b이고 rhs는 r1, r2, r3, r4, r5, r6, r7입니다.

답변1

귀하의 테이블에는 모두 수학 용어가 포함되어 있으므로 일부 를 사용 array하고 이를 tabular.

수직 정렬을 위해 나는 몇 가지 스트럿(= 너비가 없는 규칙)과 다른 트릭(아마도 더 나은 방법이 있을 수 있습니다. 이것이 제가 할 수 있는 최선입니다)을 사용했습니다.

\documentclass{book}
\usepackage{amsmath, amssymb}
\usepackage{float}
\usepackage{array}
\newcolumntype{M}[1]{>{\centering\arraybackslash\rule[-\baselineskip]{0pt}{0pt}$}m{#1}<{$}}

\newcommand{\mystrut}{\rule{0pt}{\baselineskip}}
\newcommand{\myvsp}{\vspace{-7pt}\newline}
\newlength{\mylen}
\setlength{\mylen}{2\baselineskip}
\newlength{\mylens}
\setlength{\mylens}{13pt}

\usepackage{arydshln}
%\usepackage{showframe} % for testing purpose only 

\begin{document}
    \begin{table}[H]% it's better to avoid H positioning
        \centering
        \label{augSystem}
        \renewcommand{\arraystretch}{2.2} 
        %\setlength{\extrarowheight}{20pt}
        \begin{tabular}{@{}ccM{.3cm}c@{}}
            $
            \begin{array}{|M{.8cm}:M{.7cm}:M{.7cm}:M{.7cm}:M{.7cm}:M{.7cm}:M{.7cm}|}
                \hline
                 & A & -b  & \bar{b}  &            &          & \\
                \hdashline\mystrut
                 -A^{T}      &             & c   & -\bar{c} & I      &          & \\[\mylen] 
                \hdashline
                b^{T}        & -c          &            & -\alpha   &          & -1       & \\ 
                \hdashline
                -\bar{b}^{T} & \bar{c}^T & \alpha    &            &                    &&\\ 
                \hdashline\mystrut
                -\bar{b}^{T} & S      &            &            & I       &        &  \\[\mylen]
                \hdashline
                &              & \rho      &            &            & \kappa &          \\ \hdashline
                &              &             & \nu      &            &          & \theta      \\ \hline
            \end{array}
            $
            &
            $
            \begin{array}{|M{.7cm}|}
                \hline
                y \\
                \hdashline
                \myvsp x \\[\mylens]
                \hdashline
                y \\ 
                \hdashline
                v \\ 
                \hdashline
                \myvsp z \\[\mylens] 
                \hdashline
                a \\ 
                \hdashline
                b \\ 
                \hline
            \end{array}
            $
            &
            $=$ 
            &
            $
            \begin{array}{|M{.7cm}|}
                \hline
                r_{1} \\ 
                \hdashline
                \myvsp r_{2} \\[\mylens]
                \hdashline
                r_{3} \\ 
                \hdashline
                r_{4} \\ 
                \hdashline
                \myvsp r_{5} \\[\mylens] 
                \hdashline
                r_{6} \\ 
                \hdashline
                r_{7} \\ 
                \hline
            \end{array}
            $
            \\  
        \end{tabular}
    \end{table} 
\end{document}  

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

관련 정보