多行多列的动态间距

多行多列的动态间距

在此处输入图片描述

上面的图片是我试图复制的。下面是我到目前为止成功复制的。我该如何减少辅音元音站点行并连接行半元音通过纯鼻底部的字母表?

\begin{table}[]
  \centering
  % \caption{My caption}
  % \label{my-label}
  \resizebox{\textwidth}{!}{%
    \renewcommand{\arraystretch}{1.2}% Tighter
    \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
      \hline
      \multirow{3}{*}{Place of Articulation} & \multicolumn{11}{c|}{Manner of Articulation} \\ \cline{2-12}
                                             & \multicolumn{7}{c|}{Consonants} & \multicolumn{3}{c|}{Vowels} & \vtop{\hbox{\strut Pure}\hbox{\strut Nasal}} \\ \cline{2-11}

                                             & \multicolumn{5}{c|}{Stops} & \vtop{\hbox{\strut Semi}\hbox{\strut vowel}\hbox{\strut (voiced)}} & \vtop{\hbox{\strut Sibilant}\hbox{\strut (voiceless)}} & \vtop{\hbox{\strut S}\hbox{\strut h}\hbox{\strut o}\hbox{\strut r}\hbox{\strut t}} & \vtop{\hbox{\strut L}\hbox{\strut o}\hbox{\strut n}\hbox{\strut g}} & Compound \\ \cline{2-6}

                                             & \vtop{\hbox{\strut Voiceless}\hbox{\strut non-}\hbox{\strut aspirate}} & \vtop{\hbox{\strut Voiceless}\hbox{\strut aspirate}} & \vtop{\hbox{\strut Voiced}\hbox{\strut non-}\hbox{\strut aspirate}} & \vtop{\hbox{\strut Voiced}\hbox{\strut aspirate}} & \vtop{\hbox{\strut Voiced}\hbox{\strut nasal}} \\ \hline

      Gutturals  & k & kh & g & gh & ṅ & h          &   & a & ā & e &     \\ \cline{1-8} \cline{9-11}
      Palatals   & c & ch & j & jh & ñ & y          &   & i & ī &   &     \\ \cline{1-8} \cline{9-10}
      Cerebrals  & ṭ & ṭh & ḍ & ḍh & ṇ & r / l / ḷh &   &   &   &   & m   \\ \cline{1-8}
      Dentals    & t & th & d & dh & n & l          & s &   &   &   &     \\ \cline{1-11}
      Labials    & p & ph & b & bh & m & v          &   & u & ū & o &     \\ \hline
    \end{tabular}}
\end{table}

答案1

我推荐使用该tabularray软件包来格式化您的表格。它提供了命令\SetCell[r=<nrows>,c=<ncols>],这使得创建多行和多列单元格变得非常容易。第一个表格非常接近您要求的表格。第二个表格是我自己提出的格式化建议。我使用命令booktabs(加载了\UseTblrLibray{booktabs})来设置水平线并删除所有垂直线,因为它们不会提高可读性。我还为空条目添加了破折号,以便为表格提供一些结构。

\documentclass{article}

\usepackage[margin=2.4cm]{geometry}
\usepackage{rotating}
\usepackage{makecell}
\settowidth\rotheadsize{{\small Compound}}
\newcommand{\NA}{---}

\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document}
    
\begin{table}[ht]
    \centering
    \begin{tblr}{
            colspec={l *{11}{c}},
            hlines, vlines,
            row{1-5}={font=\small},
        }
        \SetCell[r=5]{c,h} {Place of \\ Articulation} & \SetCell[c=11]{c} Manner of Articulation \\
        & \SetCell[c=7]{c} Consonants &&&&&&& \SetCell[c=3]{c} Vowels &&& \SetCell[r=4]{c,h} {Pure \\ Nasal} \\
        & \SetCell[c=5]{c} Stops &&&&
        & \SetCell[r=3]{c,h} {Semi \\ vowel \\ (voiced)}
        & \SetCell[r=3]{c,h} {Sibilant \\ (voiceless)}
        & \SetCell[r=3]{c} \rotcell{Short}
        & \SetCell[r=3]{c} \rotcell{Long}
        & \SetCell[r=3]{c} \rotcell{Compound} & \\
        & \SetCell[c=2]{c} Voiceless && \SetCell[c=3]{c} Voiced \\
        & {non- \\ aspirate} & aspirate & {non- \\ aspirate} & aspirate & nasal \\
        Gutturals  & k & kh & g & gh & ṅ & h  &   & a & ā & e & \\
        Palatals   & c & ch & j & jh & ñ & y  &   & i & ī & \SetCell[r=3]{}  & \\
        Cerebrals  & ṭ & ṭh & ḍ & ḍh & ṇ & r\,/\,l\,/\,ḷh & & \SetCell[r=2]{} & \SetCell[r=2]{} & & m \\
        Dentals    & t & th & d & dh & n & l  & s &   &   &   &     \\
        Labials    & p & ph & b & bh & m & v  &   & u & ū & o &     \\
    \end{tblr}
\end{table}

\begin{table}[ht]
    \centering
    \begin{tblr}{
            colspec={@{} l *{11}{c} @{}},
            row{1-5}={font=\small},
        }
        \toprule
        \SetCell[r=5]{h} {Place of \\ Articulation} & \SetCell[c=11]{c} Manner of Articulation \\
        \cmidrule[lr]{2-Z}
        & \SetCell[c=7]{c} Consonants &&&&&&& \SetCell[c=3]{c} Vowels &&& \SetCell[r=4]{h} {Pure \\ Nasal} \\
        \cmidrule[lr]{2-8} \cmidrule[lr]{9-11}
        & \SetCell[c=5]{c} Stops &&&&
        & \SetCell[r=3]{c,h} {Semi \\ vowel \\ (voiced)}
        & \SetCell[r=3]{c,h} {Sibilant \\ (voiceless)}
        & \SetCell[r=3]{c} \rotcell{Short}
        & \SetCell[r=3]{c} \rotcell{Long}
        & \SetCell[r=3]{c} \rotcell{Compound} & \\
        \cmidrule[lr]{2-6}
        & \SetCell[c=2]{c} Voiceless && \SetCell[c=3]{c} Voiced \\
        \cmidrule[lr]{2-3} \cmidrule[lr]{4-6}
        & {non- \\ aspirate} & aspirate & {non- \\ aspirate} & aspirate & nasal \\
        \midrule
        Gutturals  & k & kh & g & gh & ṅ & h & \NA & a & ā & e & \NA \\
        Palatals   & c & ch & j & jh & ñ & y & \NA & i & ī & \NA & \NA \\
        Cerebrals  & ṭ & ṭh & ḍ & ḍh & ṇ & r\,/\,l\,/\,ḷh & \NA & \NA & \NA & \NA & m \\
        Dentals    & t & th & d & dh & n & l  & s & \NA & \NA & \NA & \NA \\
        Labials    & p & ph & b & bh & m & v  & \NA & u & ū & o & \NA \\
        \bottomrule
    \end{tblr}
\end{table}

\end{document}

表输出

答案2

以下内容可能相当接近您所寻找的内容。

在此处输入图片描述

\documentclass{article} % or some other suitable document class
\usepackage{geometry} % set page and text block parameters appropriately
\usepackage[T1]{fontenc}
\usepackage{graphicx} % for \rotatebox macro
\usepackage{amsmath}  % for \smash[b] macro
\usepackage{array}    % for \extrarowheight macro
\usepackage{multirow} % for \multirow macro
\newcommand\mytab[1]{\smash[b]{\begin{tabular}[t]{@{}c@{}} #1 \end{tabular}}}
\newcommand\mytabx[1]{\begin{tabular}[t]{@{}c@{}} #1 \end{tabular}}

\begin{document}
\begin{table}[ht]
\setlength\tabcolsep{3.75pt} % default value: 6pt
\setlength\extrarowheight{2pt}
\centering
\begin{tabular}{ | l | *{11}{c|} }
      \hline
      \mytab{Place of\\Articulation} 
      & \multicolumn{11}{c|}{Manner of Articulation} \\ 
      \cline{2-12}
      & \multicolumn{7}{c|}{Consonants} 
      & \multicolumn{3}{c|}{Vowels} 
      & \mytab{Pure\\Nasal} \\ 
      \cline{2-11}
      & \multicolumn{5}{c|}{Stops} 
      & \mytab{Semi\\vowel\\(voiced)} 
      & \mytab{Sibilant\\(voice-\\less)} 
      & \smash{\rotatebox[origin=tr]{90}{Short}}
      & \smash{\rotatebox[origin=tr]{90}{Long}}
      & \smash{\rotatebox[origin=tr]{90}{Compound}} & \\ 
      \cline{2-6}
      & \multicolumn{2}{c|}{Voiceless} 
      & \multicolumn{3}{c|}{Voiced} & & & & & & \\
      \cline{2-6}
      & \mytabx{non-\\aspirate} 
      & aspirate 
      & \mytabx{non-\\aspirate} 
      & aspirate 
      & nasal & & & & & & \\ 
      \hline
      Gutturals  & k & kh & g & gh & ṅ & h  &   & a & ā & e &     \\
      \cline{1-8} \cline{9-11}
      Palatals   & c & ch & j & jh & ñ & y  &   & i & ī &   &     \\
      \cline{1-8} \cline{9-10}
      Cerebrals  & ṭ & ṭh & ḍ & ḍh & ṇ & r\,/\,l\,/\,ḷh & & & & & m \\
      \cline{1-8}
      Dentals    & t & th & d & dh & n & l  & s &   &   &   &     \\
      \cline{1-11}
      Labials    & p & ph & b & bh & m & v  &   & u & ū & o &     \\
      \hline
\end{tabular}
\end{table}
\end{document}

相关内容