表中的软中规

表中的软中规

3个小问题:

1)我想在这个表格中的 Care 类型和标题之间放置一个软 \midrule,但我希望它不要完全到达表格的边缘:(您可以自行决定弄乱表格的布局)

\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
%\usepckage{Something extra}

\begin{document}
\begin{table}[!ht]
 \centering\makebox[\textwidth]
  {\resizebox{1.1\textwidth}{!}{%
\begin{tabularx}{1.2\textwidth}{*6X}
 \toprule
 \multicolumn{6}{c}{Care Type} \\
 \midrule
 \vspace{3pt}
 \textbf{Direct care} & \textbf{Housekeeping} & \textbf{Mealtimes} & \textbf{Medication rounds  } & \textbf{Miscellaneous} & \textbf{Personal care} \\
 \midrule
 Blood pressure measurement & Equipment cleaning& Dispensing meals& Distributing medication&Call requests&Toiletting\\
 & &&&&\\
 Weights & Cleaning patient surfaces& &Injections&Bed making &Changing\\
 & &&&&\\
 SATs~\footnote{Blood sugar saturation}  & &&&&\\
  \bottomrule
 \end{tabularx}}}
\smallskip
 \caption{Activity type and examples of each}
 \label{tab:activities}\end{table}
\end{document}

在此处输入图片描述

\midrule 在 booktabs 中以虚线和彩色显示 - 在一个 booktab 中显示两种 midrule

2)另外,是否有一个开箱即用的功能来获取表格脚注,因为我不知道我的脚注去了哪里? 脚注 tabularx-environment LaTeX

3)如何避免每个单元格中的文本被拉伸以填充它并因此产生奇怪的连字符(例如清洁患者表面)和或(例如卫生产品)?

答案1

我想您正在寻找\cmidrule但我还删除了tabularx比例框命令。

在此处输入图片描述

\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage{graphicx}
%\usepckage{Something extra}

\begin{document}
\begin{table}[htp]
 \centering
\begin{tabular}{{}*6{>{\hspace{0pt}\raggedright\arraybackslash}p{\dimexpr(\textwidth-10\tabcolsep)/6\relax}}@{}}
 \toprule
 \multicolumn{6}{c}{Care Type} \\
 \cmidrule(l{2em}r{2em}){1-6}
\addlinespace[2ex]
 \textbf{Direct care} & \textbf{House\-keeping} & \textbf{Meal\-times} & \textbf{Medi\-cation rounds  } & \textbf{Misc\-ellaneous} & \textbf{Personal care} \\
 \midrule
 Blood pressure measurement & Equipment cleaning& Dispensing meals& Distributing medication&Call requests&Toiletting\\
 & &&&&\\
 Weights & Cleaning patient surfaces& &Injections&Bed making &Changing\\
 & &&&&\\
 SATs~\footnote{Blood sugar saturation}  & &&&&\\
  \bottomrule
 \end{tabular}
\smallskip
 \caption{Activity type and examples of each}
 \label{tab:activities}
\end{table}

\noindent X\dotfill X
\end{document}

相关内容