2

For a document, I've been preparing a consonant chart:

\documentclass{standalone}
\usepackage{booktabs}
\usepackage{array}
\begin{document}
\begin{tabular}{>{\bfseries}r*{10}{c}}
\toprule

&
\multicolumn{2}{c}{\bfseries Labial} &
\multicolumn{2}{c}{\bfseries Alveolar} &
\multicolumn{2}{c}{\bfseries Palatal} &
\multicolumn{2}{c}{\bfseries Velar} &
\multicolumn{2}{c}{\bfseries Glottal} \\ \midrule

Nasal       & mh & m & nh & n                &     &     &    &   &    &   \\
Stop        & p  & b & t  & d                &     &     & k  & g &    &   \\
Sibilant    &    &   & \multicolumn{2}{c}{s} &     &     &    &   &    &   \\
Fricative   & f  & v & th & dh               & c   &     &    &   & xh & x \\
Approximant &    &   &    &                  &     & j   & wh & w &    &   \\
Lateral     &    &   & lh & l                &     &     &    &   &    &   \\
Trill       &    &   & rh & r                &     &     &    &   &    &   \\
\bottomrule
\end{tabular}
\end{document}

Compiling this code with pdflatex yields the following output (the gray area is just the background of my PDF viewer):

enter image description here

My question is very simple: why is the s off centered?

1
  • 2
    it is perfectly centered, but column have different width, so you have impression, that is not centered ...
    – Zarko
    Mar 19, 2017 at 19:38

3 Answers 3

1

enter image description here

Do you have now impression, that it is centered?

I suggest to use tabularx, which provide equal width columns

\documentclass{standalone}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcommand\mcbf[1]{\multicolumn{2}{c}{\textbf{#1}}}

\begin{document}
\begin{tabularx}{\linewidth}{>{\bfseries}r*{10}{C}}
\toprule
            & \mcbf{Labial} & \mcbf{Alveolar} & \mcbf{Palatal} 
                                        & \mcbf{Velar} & \mcbf{Glottal}    \\
Nasal       & mh & m & nh & n                &     &     &    &   &    &   \\
Stop        & p  & b & t  & d                &     &     & k  & g &    &   \\
Sibilant    &    &   & \multicolumn{2}{c}{s} &     &     &    &   &    &   \\
Fricative   & f  & v & th & dh               & c   &     &    &   & xh & x \\
Approximant &    &   &    &                  &     & j   & wh & w &    &   \\
Lateral     &    &   & lh & l                &     &     &    &   &    &   \\
Trill       &    &   & rh & r                &     &     &    &   &    &   \\
\bottomrule
\end{tabularx}
\end{document}
1

I added |c| to visualize the borders of the cells. I added an invisible space (\hspace{<some length>}) in order to center the s. It's a manual solution and not as good as the solution from Zarko.

\documentclass{standalone}
\usepackage{booktabs}
\usepackage{array}
\usepackage{xcolor}
\begin{document}
\begin{tabular}{>{\bfseries}r*{10}{|c|}}
\toprule

&
\multicolumn{2}{c}{\bfseries Labial} &
\multicolumn{2}{c}{\bfseries Alveolar} &
\multicolumn{2}{c}{\bfseries Palatal} &
\multicolumn{2}{c}{\bfseries Velar} &
\multicolumn{2}{c}{\bfseries Glottal} \\ \midrule

Nasal       & mh & m & nh & n                &     &     &    &   &    &   \\
Stop        & p  & b & t  & d                &     &     & k  & g &    &   \\
Sibilant    &    &   & \multicolumn{2}{c|}{ \textcolor{red}{\bfseries\dotfill}  } &     &     &    &   &    &   \\
Fricative   & f  & v & \multicolumn{2}{c|}{ \textcolor{red}{\bfseries s\hspace{0.4em}}}                & c   &     &    &   & xh & x \\
Approximant &    &   &    &                  &     & j   & wh & w &    &   \\
Lateral     &    &   & lh & l                &     &     &    &   &    &   \\
Trill       &    &   & rh & r                &     &     &    &   &    &   \\
\bottomrule
\end{tabular}
\end{document}

enter image description here

1

With {NiceTabular} of nicematrix (≥ 6.0 of 2021-08-10).

\documentclass{article}
\usepackage{booktabs}
\usepackage{nicematrix}

\begin{document}
\begin{NiceTabular}{>{\bfseries}r*{10}{X[c]}}
\toprule
\RowStyle{\bfseries}
            & \Block{1-2}{Labial} && \Block{1-2}{Alveolar} && \Block{1-2}{Palatal} 
            && \Block{1-2}{Velar} && \Block{1-2}{Glottal} \\
Nasal       & mh & m & nh & n \\
Stop        & p  & b & t  & d            &     &     & k  & g &    &   \\
Sibilant    &    &   & \Block{1-2}{s}    &     &     &    &   &    &   \\
Fricative   & f  & v & th & dh           & c   &     &    &   & xh & x \\
Approximant &    &   &    &              &     & j   & wh & w &    &   \\
Lateral     &    &   & lh & l \\
Trill       &    &   & rh & r \\
\bottomrule
\end{NiceTabular}
\end{document}

Output of the above code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .