表格中横跨两列的对角线

表格中横跨两列的对角线

想要获得红色突出显示的对角线。

在此处输入图片描述

平均能量损失

\documentclass{article}

\usepackage{booktabs}
\usepackage{etex}

\makeatletter%
\setlength\textheight{56\baselineskip}%
\addtolength\textheight{-2pt}%
%
%

\setlength\topmargin{65.2pt}%
\setlength\evensidemargin{105.1pt}%
\setlength\oddsidemargin{72pt}%
%
\setlength\headheight{10\p@}%
\setlength\headsep   {11.2pt}% \typeheight - \textheight - \headheight
\setlength\topskip   {10\p@}
%
\setlength\footskip{0pt}
\setlength\maxdepth{56\baselineskip}
\makeatother%


\begin{document}

\begin{table}
%\centering
\caption{}\label{tab:01}
{\tabcolsep11.6pt\begin{tabular}{@{}lcccccc@{}}
\toprule
Link \textit{j} & ${\theta _{j,i} \left({\rm rad}\right)}$ & ${d_{j,i} \left({\rm mm}\right)}$ & ${a_{j,i} \left({\rm mm}\right)}$ & ${\varphi _{j,i} \left({\rm rad}\right)}$ & ${d_{e} \left({\rm mm}\right)}$ & ${\theta _{e} \left({\rm rad}\right)}$ \\
\midrule
1 & 0 & 0 & ${\alpha b_{i} }$ & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
2 & ${\xi _{1,i} {\rm +}{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & ${\left(1-\alpha \right)b_{i} }$ & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
3 & ${\xi _{2,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
4 & 0 & ${\xi _{3,i} }$ & 0 & 0 &  \\
5 & ${\xi _{4,i} +\left(1-\alpha \right){\rm \pi /2}}$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & \\
6 & ${\xi _{5,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
7 & ${\xi _{6,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & ${e_{i} }$ & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$+${{{\rm \pi }\alpha \mathord{\left/ {\vphantom {{\rm \pi }\alpha  2}} \right. \kern-\nulldelimiterspace} 2} }$ \\
\bottomrule
\end{tabular}}
{Note: (1) if ${i=1}$, ${\alpha =1}$, else ${\alpha =0}$;\\
\noindent (2)${\xi _{j,i} }$ denotes the motion of the \textit{j}th joint in the \textit{i}th limb;\\
\noindent (3)${b_{i} }$ and ${e_{i} }$ denote structure parameters of the base and end-link.
}
\end{table}


\begin{table}
\centering
\caption{}\label{tab:02}
\begin{tabular}{@{}lcccccc@{}}
\toprule
Link \textit{j} & ${\theta _{j,i} \left({\rm rad}\right)}$ & ${d_{j,i} \left({\rm mm}\right)}$ & ${a_{j,i} \left({\rm mm}\right)}$ & ${\varphi _{j,i} \left({\rm rad}\right)}$ & ${d_{e} \left({\rm mm}\right)}$ & ${\theta _{e} \left({\rm rad}\right)}$ \\
\midrule
1 & 0 & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
2 & ${\xi _{1,i} {\rm +}{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
3 & ${\xi _{2,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
4 & 0 & ${\xi _{3,i} }$ & 0 & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ \\
\bottomrule
\end{tabular}
\end{table}

\end{document}

答案1

在此处输入图片描述

\begin{table}
%\centering
\caption{}\label{tab:01}
{\tabcolsep11.6pt\begin{tabular}{@{}lcccccc@{}}
\toprule
Link \textit{j} & ${\theta _{j,i} \left({\rm rad}\right)}$ & ${d_{j,i} \left({\rm mm}\right)}$ & ${a_{j,i} \left({\rm mm}\right)}$ & ${\varphi _{j,i} \left({\rm rad}\right)}$ & ${d_{e} \left({\rm mm}\right)}$ & ${\theta _{e} \left({\rm rad}\right)}$ \\
\midrule
1 & 0 & 0 & ${\alpha b_{i} }$ & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
2 & ${\xi _{1,i} {\rm +}{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & ${\left(1-\alpha \right)b_{i} }$ & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
3 & ${\xi _{2,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
4 & 0 & ${\xi _{3,i} }$ & 0 & 0 &  \\
5 & ${\xi _{4,i} +\left(1-\alpha \right){\rm \pi /2}}$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & \\
6 & ${\xi _{5,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
7 & ${\xi _{6,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & ${e_{i} }$ & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$+${{{\rm \pi }\alpha \mathord{\left/ {\vphantom {{\rm \pi }\alpha  2}} \right. \kern-\nulldelimiterspace} 2} }$ \begin{picture}(0,0)
\put(-110,18.5){\rotatebox{60}{\rule{.5pt}{128pt}}}
\end{picture}\\
\bottomrule
\end{tabular}}
{Note: (1) if ${i=1}$, ${\alpha =1}$, else ${\alpha =0}$;\\
\noindent (2)${\xi _{j,i} }$ denotes the motion of the \textit{j}th joint in the \textit{i}th limb;\\
\noindent (3)${b_{i} }$ and ${e_{i} }$ denote structure parameters of the base and end-link.
}
\end{table}
\vspace*{-65pt}

\begin{table}
\centering
\caption{}\label{tab:02}
\begin{tabular}{@{}lcccccc@{}}
\toprule
Link \textit{j} & ${\theta _{j,i} \left({\rm rad}\right)}$ & ${d_{j,i} \left({\rm mm}\right)}$ & ${a_{j,i} \left({\rm mm}\right)}$ & ${\varphi _{j,i} \left({\rm rad}\right)}$ & ${d_{e} \left({\rm mm}\right)}$ & ${\theta _{e} \left({\rm rad}\right)}$ \\
\midrule
1 & 0 & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
2 & ${\xi _{1,i} {\rm +}{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
3 & ${\xi _{2,i} +{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ &  \\
4 & 0 & ${\xi _{3,i} }$ & 0 & 0 & 0 & ${{{\rm \pi }\mathord{\left/ {\vphantom {{\rm \pi } 2}} \right. \kern-\nulldelimiterspace} 2} }$ \begin{picture}(0,0)
\put(-70,5){\rotatebox{60}{\rule{.5pt}{87pt}}}
\end{picture}\\
\bottomrule
\end{tabular}
\end{table}

我已经利用picture环境来对角线绘制一条规则。

调整命令中的值\put以完美对齐规则。

答案2

使用,您只需在命令(也由 提供)中{NiceTabular}使用nicematrix命令\diagbox(由 提供)。nicematrix\Blocknicematrix

\documentclass{article}
\usepackage{nicematrix}
\usepackage{booktabs}

\begin{document}

\begin{NiceTabular}{@{}lcccccc@{}}
\toprule
Link $j$ & $\theta _{j,i}$ (rad)& $d_{j,i}$ (mm)& 
     $a_{j,i}$ (mm)& $\varphi_{j,i}$ (rad) & $d_{\text{e}}$ (rad) & $\theta_{\text{e}}$ (rad) \\
\midrule
1 & 0 & 0 & 0 & $\pi/2$ &  \Block{3-2}{\diagbox{}{}}\\
2 & $\xi _{1,i}+\pi/2$ & 0 & 0 & $\pi/2$ &  \\
3 & $\xi _{2,i}+\pi/2$ & 0 & 0 & $\pi/2$ &  \\
4 & 0 & $\xi _{3,i}$ & 0 & 0 & 0 & $\pi/2$ \\
\bottomrule
\end{NiceTabular}

\end{document}

上述代码的输出

相关内容