Answer

Answer of LaTeX Exercises #

Author: Erhua

Below are the answers to the exercises in the blog.


Exercises:

Answer:

\documentclass[border={30mm 3pt 30mm 3pt}]{standalone}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{diagbox}
\usepackage{ctex}

\begin{document}
\begin{tabular}{|c|cc|c|c|c|c|c|}
\hline
\multirow{2}*{\makecell{Friction\\Pairing Materials}}& \multicolumn{2}{c|}{\multirow{2}*{\diagbox{Locking Structure}{Locking Torque}}}  &\multicolumn{5}{c|}{Lubricating Pressure (MPa)}\\
\cline{4-8}
	&	&	&2&5&7&10&12\\
\hline
\multirow{5}*{Quenched and tempered steel}&\multirow{5}*{Friction Cone}&\multicolumn{1}{|c|}{$\theta = 60^\circ$, Single Slot}&1.3&2.6&2.9&3.5&3.8\\
\cline{3-8}
	&	&\multicolumn{1}{|c|}{$\theta = 60^\circ$, Single Slot}&1.8&2.6&3.9&4.7&5.1\\
\cline{3-8}
	&	&\multicolumn{1}{|c|}{$\theta = 60^\circ$, Single Slot}&1.8&2.6&3.9&4.7&5.1\\
\cline{3-8}
	&	&\multicolumn{1}{|c|}{$\theta = 60^\circ$, Single Slot}&1.8&2.6&3.9&4.7&5.1\\
\cline{3-8}
	&	&\multicolumn{1}{|c|}{$\theta = 60^\circ$, Single Slot}&1.8&2.6&3.9&4.7&5.1\\
\hline
\multirow{2}*{H62}&\multicolumn{2}{c|}{Internal Friction Ring}&1.8&2.6&3.9&4.7&5.1\\
\cline{2-8}
		&\multicolumn{2}{c|}{External Friction Ring}&1.8&2.6&3.9&4.7&5.1\\
\hline
\end{tabular}
\end{document}

Key points: The “multicolumn” command can not only merge cells in rows, but can also be used to redefine the format of a cell, such as adding or modifying borders.