李代数的交换表

李代数的交换表

您将使用LaTeX(\begin{}等)中的哪个函数来创建李代数的交换表?

我尝试使用发电机http://www.tablesgenerator.com/但它不能正确编译。

编辑:我需要一些简单的东西

在此处输入图片描述

答案1

最快,但不是最好的设置...只是提供一个如何开始的线索...

单元格的高度可以通过改变值来控制\tabularextravskip

\documentclass{article}


\usepackage{mathtools}%
\begin{document}

\newlength{\tabularextravskip}
\setlength{\tabularextravskip}{2ex}

\begin{tabular}{|*{6}{c|}}
\hline
& \(V_{1}\) & \(V_{2}\) & \(V_{3}\) & \(V_{4}\) & \(V_{5}\) \tabularnewline
\hline
\(V_{1}\) & & & & & \tabularnewline[\tabularextravskip]
\hline
\(V_{2}\) & & & & & \tabularnewline[\tabularextravskip]
\hline
\(V_{3}\) & & & & \(-\dfrac{1}{\lambda}V_{4}\) & \(\dfrac{1}{\lambda}V_{5}\) \tabularnewline[\tabularextravskip]
 \hline
\(V_{4}\) & & & \(\dfrac{1}{\lambda}V_{4}\) & & \( V_{3}\) \tabularnewline[\tabularextravskip]
\hline
\(V_{5}\) & & \(-\dfrac{1}{\lambda}V_{5}\) & \(-V_{3}\) & & \tabularnewline[\tabularextravskip]
\hline
\end{tabular}

\end{document}

改进的版本,具有居中数学列和多行使用

\documentclass{article}

\usepackage{multirow}
\usepackage{array}%
\usepackage{mathtools}%
\begin{document}

\newlength{\tabularextravskip}
\setlength{\tabularextravskip}{4ex}


\newcolumntype{M}[1]{>{\centering\arraybackslash$}m{#1}<{$}}


\begin{tabular}{|*{6}{M{1cm}|}}
\hline
& & & & & \tabularnewline
& V_{1} & V_{2} & V_{3} & V_{4} & V_{5} \tabularnewline
& & & & & \tabularnewline
\hline
V_{1} & & & & & \tabularnewline[\tabularextravskip]
\hline
V_{2} & & & & & \tabularnewline[\tabularextravskip]
\hline
\multirow{2}{*}{$V_{3}$} & & & & \multirow{1}{*}{$-\dfrac{1}{\lambda}V_{4}$} & \multirow{3}{*}{$\dfrac{1}{\lambda} V_{5}$} \tabularnewline[\tabularextravskip]
& & & & & \tabularnewline
 \hline
V_{4} & & & \dfrac{1}{\lambda}V_{4} & &  \multirow{3}{*}{$V_{3}$} \tabularnewline[\tabularextravskip]
\hline
V_{5} & & & -\dfrac{1}{\lambda}V_{5} & -V_{3} & \tabularnewline[\tabularextravskip]
\hline
\end{tabular}

\end{document}

在此处输入图片描述

答案2

两种变体,通过包获得不同的对齐方式和行距makecell

\documentclass{article}

\usepackage{array}
\usepackage{caption}
\DeclareCaptionLabelSeparator{spacing}{:\quad}
\captionsetup{
  labelsep =spacing,
  figureposition = bottom,
  tableposition = top,
  font =footnotesize,
  labelfont = sc
}
\usepackage{nccmath}
\newcommand*\factor{\mfrac{1}{\lambda}}
\usepackage{makecell}
\setcellgapes{4pt}

\begin{document}

\begin{table}
\centering\setlength\tabcolsep{3pt}
\makegapedcells
 \caption{Commutator table for Lie algebras.}
  \begin{tabular}{@{\hskip 0.8em}>{$}c<{$\enspace}!{\vrule width 0.5pt} *{5}{>{\centering\arraybackslash$}p{1cm}<{$}}!{\vrule width 0.8pt}}
          & V_{1} & V_{2} & V_{3} & V_{4} & V_{5}\\
   \Xhline{0.5pt}
    V_{1} & & & & & \\
    V_{2} & & & & & \\
    V_{3} & & & & -\factor V_{4} & \factor V_{5} \\
    V_{4} & & & \hphantom{-}\factor V_{4} & & \hphantom{\factor} V_{3} \\
    V_{5} & & & -\factor V_{5} & \hphantom{\factor}- V_{3} & \\
 \Xhline{0.8pt}
  \end{tabular}
\end{table}

\mbox{}

\begin{table}[! h]
\centering\setlength\tabcolsep{3pt}
\makegapedcells
 \caption{Commutator table for Lie algebras.}
  \begin{tabular}{@{\hskip 0.8em}>{$}c<{$\enspace}!{\vrule width 1pt} *{5}{>{\centering\arraybackslash$}p{1cm}<{$}}}
          & V_{1} & V_{2} & V_{3} & V_{4} & V_{5}\\
   \Xhline{0.6pt}
    V_{1} & & & & & \\
    V_{2} & & & & & \\
    V_{3} & & & & -\factor V_{4} & \factor V_{5} \\
    V_{4} & & & \hphantom{-}\factor V_{4} & & \hphantom{\factor} V_{3} \\
    V_{5} & & & -\factor V_{5} & \hphantom{\factor}- V_{3} & \\[-2.5ex]

& \结束{表格} \结束{表格}

\end{document} 

在此处输入图片描述

答案3

以下是我的做法:

\documentclass{article}

\usepackage{array,booktabs}
\usepackage{caption}
\DeclareCaptionLabelSeparator{spacing}{:\quad}
\captionsetup{
  labelsep = spacing,
  tableposition = top,
  font = small,
  labelfont = sc
}

\newcommand*\factor{\frac{1}{\lambda}}
\newcommand*\Tstrut{\rule{0pt}{2.6ex}}
\newcommand*\Bstrut{\rule[-0.9ex]{0pt}{0pt}}

\begin{document}

\begin{table}
\centering
 \caption{Commutator table for Lie algebras.}
  \begin{tabular}{>{$}c<{$} | *{5}{>{$}c<{$}}}
   \toprule
          & V_{1} & V_{2} &          V_{3} &          V_{4} &         V_{5}\Bstrut\\
   \hline
    V_{1} &       &       &                &                &              \Tstrut\\[1ex]
    V_{2} &       &       &                &                &                     \\[1ex]
    V_{3} &       &       &                & -\factor V_{4} & \factor V_{5}       \\[1ex]
    V_{4} &       &       &  \factor V_{4} &                &         V_{3}       \\[1ex]
    V_{5} &       &       & -\factor V_{5} & -        V_{3} &                     \\
   \bottomrule
  \end{tabular}
\end{table}

\end{document}

输出1

或者也许以下内容获得相等的列宽

\documentclass{article}

\usepackage{array,booktabs}
\usepackage{caption}
\DeclareCaptionLabelSeparator{spacing}{:\quad}
\captionsetup{
  labelsep = spacing,
  tableposition = top,
  font = small,
  labelfont = sc
}

\newcommand*\factor{\frac{1}{\lambda}}
\newcommand*\Tstrut{\rule{0pt}{2.6ex}}
\newcommand*\Bstrut{\rule[-0.9ex]{0pt}{0pt}}

\begin{document}

\begin{table}
\centering
 \caption{Commutator table for Lie algebras.}
  \begin{tabular}{>{$}c<{$} | *{5}{>{\centering\arraybackslash$}p{1cm}<{$}}}
   \toprule
          & V_{1} & V_{2} &          V_{3} &          V_{4} &         V_{5}\Bstrut\\
   \hline
    V_{1} &       &       &                &                &              \Tstrut\\[2ex]
    V_{2} &       &       &                &                &                     \\[2ex]
    V_{3} &       &       &                & -\factor V_{4} & \factor V_{5}       \\[2ex]
    V_{4} &       &       &  \factor V_{4} &                &         V_{3}       \\[2ex]
    V_{5} &       &       & -\factor V_{5} & -        V_{3} &                     \\
   \bottomrule
  \end{tabular}
\end{table}

\end{document}

输出2

相关内容