我正在尝试添加此表右侧的边框/边界框线,它似乎删除了它,尽管在其他没有旋转文本以适应的表中不会发生这种情况。我想在“行业协会”后面有两行。我的理解是 ||
\begin{tabular}{||p{10cm}cccccccccc||}
应应用边界线。
代码:
\begin{landscape}
\renewcommand*\rot[2]{\multicolumn{1}{R{#1}{#2}}}% no optional argument here, please!
\begin{tabular}{||p{10cm}cccccccccc||}
\hline\hline
NEEDS \& EXPECTATIONS OF INTERESTED PARTIES & \rot{90}{1em}{Employees \& Contractors} & \rot{90}{1em}{Customers, Clients \& Suppliers} & \rot{90}{1em}{Regulators} & \rot{90}{1em}{Registrar} & \rot{90}{1em}{Generators} & \rot{90}{1em}{General Public, Media \& NGOs} & \rot{90}{1em}{Neighboring Businesses} & \rot{90}{1em}{Insurers} & \rot{90}{1em}{Emergency Response Services} & \rot{90}{1em}{Industry Associations} & \\ [0.5ex]
\hline\hline
1. Expect to work in a safe and healthy environment & X & & & & & & & & & \\
\hline\hline
\end{tabular}
\end{landscape}
(其中有更多文字,但出于保密原因我无法显示,表格格式保留。)
我也正在使用这些包:
\usepackage{rotating,graphicx} % allows for landscape tables
\usepackage{adjustbox}
\usepackage{pdflscape} % Used to allow landscape pages
\usepackage{array}
\newcolumntype{R}[2]{%
>{\adjustbox{angle=#1,lap=\width-(#2)}\bgroup}%
l%
<{\egroup}%
}
\newcommand*\rot{\multicolumn{1}{R{45}{1em}}}% no optional argument here, please!
答案1
正如@TeddyvanJerry在评论中指出的那样,问题在于双线的规范,||
,必须在\multicolumn
最后一列的命令中重复,并且在 的定义中隐藏了一个\rot
。我将展示两种解决方案:一种是使用额外的参数来\rot
移交这个额外的规范,另一种是使用 完成框架\fbox
。
第三个参数的解决方案\rot
:该命令的用法分别为\rot{90}{1em}{}
和\rot{90}{1em}{||}
。
\begin{landscape}
\renewcommand*\rot[3]{\multicolumn{1}{R{#1}{#2}#3}}%
%
\begin{tabular}{||p{10cm}cccccccccc||}
\hline\hline
NEEDS \& EXPECTATIONS OF INTERESTED PARTIES &
\rot{90}{1em}{}{Employees \& Contractors} &
\rot{90}{1em}{}{Customers, Clients \& Suppliers} &
\rot{90}{1em}{}{Regulators} &
\rot{90}{1em}{}{Registrar} &
\rot{90}{1em}{}{Generators} &
\rot{90}{1em}{}{General Public, Media \& NGOs} &
\rot{90}{1em}{}{Neighboring Businesses} &
\rot{90}{1em}{}{Insurers} &
\rot{90}{1em}{}{Emergency Response Services} &
\rot{90}{1em}{||}{Industry Associations} \\ [0.5ex]
\hline\hline
1. Expect to work in a safe and healthy environment & X & & & & & & & & & \\
\hline\hline
\end{tabular}
\end{landscape}
解决方案\fbox
:完全删除规范|
以及外部的\hline
s。
\begin{landscape}
\renewcommand*\rot[2]{\multicolumn{1}{R{#1}{#2}}}%
%
\fboxsep2pt%
\fbox{\fbox{%
\begin{tabular}{p{10cm}cccccccccc}
NEEDS \& EXPECTATIONS OF INTERESTED PARTIES &
\rot{90}{1em}{Employees \& Contractors} &
\rot{90}{1em}{Customers, Clients \& Suppliers} &
\rot{90}{1em}{Regulators} &
\rot{90}{1em}{Registrar} &
\rot{90}{1em}{Generators} &
\rot{90}{1em}{General Public, Media \& NGOs} &
\rot{90}{1em}{Neighboring Businesses} &
\rot{90}{1em}{Insurers} &
\rot{90}{1em}{Emergency Response Services} &
\rot{90}{1em}{Industry Associations} \\ [0.5ex]
\hline\hline
1. Expect to work in a safe and healthy environment & X & & & & & & & & &
\end{tabular}%
}}