1

For the table in the shown MWE, regardless of the various issues shown, I cannot resolve this particular issue where hyphenation does not work for multirows / merged rows. Is there a way to resolve this issue? As you can see all rows are hyphenated properly except those with multirow command.

Also when using the command \rule{0pt}{25pt} so as to fix spacing for equations: the vertical centering of the neighbouring cells is messed up.

Finally, is there a way to make such table in landscape environment while maintaining 2 things?

  • A portrait type document.
  • Upon using other packages such as lscape, rotate .... the table is rotated yet the headers and footers are not rotated. I need the table to be in landscape mode while the header and footers remain on the top and the bottom of all pages regardless whether they are landscape or portrait.

3 issues:

  • Multirow hyphenation
  • Maintiaing vertical alignment when using \rule{0pt}{25pt}
  • Maintaingin header and footer position on top and bottom of page regardless where the page is landscape of portrait.
\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}

Table

  • 1
    unrelated to your question but \dfrac{foot \- pound}{minute} never use mathitalic for words, as your mage shows, the font is designed to make adjacent letters not look like a word but like a product of variables, use \mathrm{foot}\text{-}\mathrm{pound} (or \mathit instead of \mathrm if you want multi-letter italic.) – David Carlisle Dec 1 at 23:33
  • also Ib for pounds, don't you want lb ? – David Carlisle Dec 1 at 23:35
  • 1
    Probably use \multirow{-2}{=} since the multirow is inserted in a fixed width column. – Bernard Dec 2 at 0:07
  • @ David, yes i want pounds. I needed italic letters in partial math environment. – Silva Dec 2 at 2:10
  • If you want italic letters in math environments, you should use \textit rather than the default \mathit. – Mico Dec 2 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.