表格中多行的连字符

表格中多行的连字符

对于显示的 MWE 中的表,无论显示的各种问题如何,我都无法解决这个特定问题,即连字符对多行/合并行不起作用。有办法解决这个问题吗?如您所见,除使用multirow命令的行外,所有行都正确连字符。

另外,当使用该命令\rule{0pt}{25pt}来修复方程式的间距时:相邻单元格的垂直居中会变得混乱。

最后,有没有办法在景观环境中制作这样的表格,同时保留两件事?

  • 肖像类型的文件。
  • 使用其他软件包(例如lscaperotate ....)时,表格会旋转,但页眉和页脚不会旋转。我需要表格处于横向模式,而页眉和页脚保留在所有页面的顶部和底部,无论它们是横向还是纵向。

3个问题:

  • 多行连字
  • 使用时保持垂直对齐\rule{0pt}{25pt}
  • 无论页面是横向还是纵向,都保持页眉和页脚在页面顶部和底部的位置。
\documentclass[a4paper,12pt,twoside]{book}
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,margin=2.5cm,bindingoffset=0.5cm]{geometry} 

\usepackage[bidi=basic,layout=lists.tabular]{babel}
\babelfont[english]{rm}{Times New Roman}

\usepackage[table]{xcolor}
\usepackage{tabu,multirow} 
\usepackage{array} 
\newcolumntype{?}[1]{!{\vrule width #1}} 
\usepackage{booktabs}
\setlength{\belowrulesep}{0pt}
\setlength{\belowbottomsep}{0pt}
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\setlength{\abovetopsep}{0pt}
\usepackage{longtable}
\usepackage{makecell} 
\usepackage{boldline} 
\usepackage{hhline}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage{amsthm} 
\usepackage{amssymb}
\newtheorem{thm}{Theorem}[chapter]
\newtheorem{lem}[thm]{Lemma}
\theoremstyle{definition}
\newtheorem{dfn}[thm]{Definition} 

\begin{document}



\begin{longtable}{?{1mm}>{\centering\arraybackslash}m{0.2\textwidth}|m{0.2\textwidth}|m{0.1\textwidth}|m{0.1\textwidth}|m{0.2\textwidth}|m{0.1\textwidth}?{1mm}}


\toprule[1mm]


 & \multicolumn{2}{c?{1mm}}{\textbf{U.S. CUSTOMARY UNITS}} & & \multicolumn{2}{c?{1mm}}{\textbf{Equivlent SI Unit}} \\
\cmidrule[1.25pt]{2-3}
\cmidrule[1.25pt]{5-6}
\multirow{-2}{*}{\textbf{Type of quantity}} & \textbf{Unit} & \textbf{Abbreviation} & 
\multirow{-2}{*}{\textbf{Multiplication factor}} & \textbf{Unit} & \textbf{Abbreviation} \\

\Xhline{1.5pt} 
        \endfirsthead

\toprule[1mm]
 & \multicolumn{2}{c?{1mm}}{\textbf{U.S. CUSTOMARY UNITS}} & & \multicolumn{2}{c?{1mm}}{\textbf{Equivlent SI Unit}} \\
\cmidrule[1.25pt]{2-3}
\cmidrule[1.25pt]{5-6}
\multirow{-2}{*}{\textbf{Type of quantity}} & \textbf{Unit} & \textbf{Abbreviation} & 
\multirow{-2}{*}{\textbf{Multiplication factor}} & \textbf{Unit} & \textbf{Abbreviation} \\

\Xhline{1.5pt} 
        \endhead
        %\toprule


\multicolumn{6}{l}{\textbf{*:Exact values}}\\
\Xhline{1pt} %\midrule[1.5pt]
\multicolumn{6}{c}{\textbf{Continued}}\\ 
        \bottomrule
        \endfoot
        \bottomrule[1mm]
        \endlastfoot


\rowcolor{gray!25}
 & pound-foot & Ib-ft & 1.3558 & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{gray!25}
\multirow{-2}{*}{\textbf{Moment of force}}& pound-inch & Ib-in. & 0.1129 8 & \multirow{-2}{*}{newton-meter} &  \multirow{-2}{*}{N . m} \\
\Xhline{1pt} %\midrule[1.5pt]


\rowcolor{white}
\rule{0pt}{25pt} 
 & $\dfrac{foot \- pound}{minute}$ & $\dfrac{ft \- Ib}{min}$ & 2.2597 \ast $\medspace 10^{-2}$  & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{white}
\rule{0pt}{25pt}
\multirow{-2}{*}{\textbf{Power}}& horsepower = $550 \medspace \ast \medspace \dfrac{foot \- pound}{second}$  & $550 \medspace \ast \medspace \dfrac{ft \- Ib}{sec}$ & 7.4570 \ast $10^{-2} 10$ & \multirow{-2}{*}{watt} &  \multirow{-2}{*}{W} \\
\Xhline{1pt} %\midrule[1.5pt]


\rowcolor{white}
 & atmosphere (std)  & std = 1.0133 \ast $\medspace \dfrac{Ib}{in.^{2}}$ & 1.0133 \ast $\medspace 10^{5}$ & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{white}
 & $\dfrac{pound}{foot^{2}}$  & $\dfrac{Ib}{ft^{2}}$ & 4.7880 \ast 10 & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{white}
\multirow{-3}{*}{\textbf{Pressure, stress}}& $\dfrac{pound}{inch^{2}}$ & $\dfrac{Ib}{in.^{2}}$ & 6.8948 \ast $\medspace 10^{3}$ & \multirow{-3}{*}{pascal} &  \multirow{-3}{*}{Pa = $\dfrac{N}{m^{2}}$} \\
\Xhline{1pt} %\midrule[1.5pt]


\rowcolor{gray!25}
\textbf{Spring constant} & $\dfrac{pound}{inch}$  & $\dfrac{Ib}{in.}$ & 1.7513 \ast $\medspace 10^{2}$ & $\dfrac{newton}{meter}$ & $\dfrac{kg \medspace \cdot \medspace m^{2}}{s}$ \\
\Xhline{1pt} %\midrule[1.5pt]


\rowcolor{white}
 & $\dfrac{foot}{second}$  & $\dfrac{ft}{sec}$ & 3.048 \ast $\medspace 10^{-1}$ & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{white}
 & knot ($\dfrac{nautical \medspace mile}{hour}$)  & $\dfrac{nautical \medspace mi}{hr}$ & 5.1444 \ast $\medspace 10^{-1}$ & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{white}
 & &  & 4.4704 \ast $\medspace 10^{-1}$* & \multirow{-3}{*}{$\dfrac{meter}{second}$} &  \multirow{-3}{*}{$\dfrac{m}{s}$} \\
\cmidrule[0.5pt]{4-6} %\Xcline {2-3}{1pt}
\rowcolor{white}
\multirow{-4}{*}{\textbf{Velocity}}& \multirow{-2}{*}{ $\dfrac{mile}{hour}$} & \multirow{-2}{*}{$\dfrac{mi}{hr}$} & 1.6093 &  $\dfrac{kilometer}{hour}$ &  $\dfrac{km}{h}$ \\
\Xhline{1pt} %\midrule[1.5pt]


\rowcolor{white}
 & British thermal unit  & BTU & 1.0551 \ast $\medspace 10^{3}$ & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{white}
 & foot-pound force  & ft-Ib & 1.3558 & & \\
\cmidrule[0.5pt]{2-4} %\Xcline {2-3}{1pt}
\rowcolor{white}
\multirow{-3}{*}{\textbf{Work, Energy}}& kilowatt-hour & kw-h & 3.6 \ast $\medspace 10^{6}$* & \multirow{-3}{*}{joule} &  \multirow{-3}{*}{J} \\
\Xhline{1pt} %\midrule[1.5pt]
\end{longtable}

\end{document}

桌子

相关内容