There are three edits that I want for the table the following code gives.
First, I want the column headers left-aligned and the remaining entries in the columns centered.
Second, I would like to put {\centering\arraybackslash}
in the last column header. (I don't have it in this code because with it the code would not be compiled. I have seen from other code that I need newline
or tabularnewline
is needed at some place. I don't know the syntax, apparently.)
Third, I am not getting a double vertical bar along the right edge of the table.
\documentclass{amsart}
\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{makecell}
\usepackage{array}
\begin{document}
\noindent \hspace*{\fill}
\setlength\extrarowheight{2pt}
\begin{tabular}{|| >{\centering\arraybackslash}l | >{\centering\arraybackslash}p{1.5cm} | >{\centering\arraybackslash}p{2.5cm} | >{\centering\arraybackslash}p{2cm} | >{\centering\arraybackslash}p{2cm} | p{3.5cm} ||} \hline
\multicolumn{5}{|| c ||}{\textbf{Inventory of Clocks and Frequency of Chimes}} \\ \Xhline{0.8pt}
& Number of clocks& Chimes $n$ times on the $n^{\mathrm{th}}$ hour & Chimes once on the hour & Chimes once on the half-hour \\ \hline
Type A & 10 & \checkmark & & \checkmark \\ \hline
Type B & 5 & \checkmark & & \\ \hline
Type C & 3 & & \checkmark & \checkmark \\ \hline
\end{tabular}
\hspace{\fill}
\end{document}
||
was explained in your last question: you have specified that to come after the 6th column, but you only have 5 entries in each row.\centering\arraybackslash
then you can use\\
to end the row, as now.\raggedright\arraybackslash
in your headings will make them flush left.