LaTeX 和表格格式

LaTeX 和表格格式
\documentclass{article}
\usepackage[english]{babel}

\begin{document}

Without specifying width for last column:
\begin{center}
    \begin{tabular}{| l | l | l | l |}
    \hline
    Day & Min Temp & Max Temp & Summary \\ \hline
    Monday & 11C & 22C & A clear day with lots of sunshine. However, the strong breeze will bring down the temperatures. \\ \hline
    Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells
    across most of Scotland and Northern Ireland,
    but rain reaching the far northwest. \\ \hline
    Wednesday & 10C & 21C & Rain will still linger for the morning.
    Conditions will improve by early afternoon and continue
    throughout the evening. \\
    \hline
    \end{tabular}
\end{center}
\end{document}

我想将第一行第一列和最后一行最后一列的线条加粗。 这个怎么做?

答案1

\documentclass{article}
\usepackage[english]{babel}
\usepackage{tabularx}
\begin{document}

Without specifying width for last column:

\noindent
\begin{tabularx}{\linewidth}{| >{\bfseries}l | l | l | X |}\hline
    Day & \bfseries Min Temp & \bfseries Max Temp & \bfseries Summary \\ \hline
    Monday & 11C & 22C & A clear day with lots of sunshine. However, the strong breeze will bring down the temperatures. \\ \hline
    Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells
    across most of Scotland and Northern Ireland,
    but rain reaching the far northwest. \\ \hline
    Wednesday & 10C & 21C & Rain will still linger for the morning.
    Conditions will improve by early afternoon and continue
    throughout the evening. \\
    \hline
\end{tabularx}

\end{document}

在此处输入图片描述

相关内容