1

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?

  • 2
    it is perfectly centered, but column have different width, so you have impression, that is not centered ... – Zarko Mar 19 '17 at 19:38
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.