我正在尝试在环境\parnote
中为用户tabularx
添加表格注释,如下所示这里。
但是,我注意到表格\parnotes
中指定的列的对齐方式/宽度发生了变化。
使用以下代码,我有两个表。唯一的区别是存在\parnote
,我们可以看到对齐方式不同。
\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{lscape}
\usepackage{array, ltablex}
\newcommand{\tempe}[1]{#1\textdegree C}
\usepackage[roman]{parnotes}
%
% Parnotes definitions
%
\makeatletter
\def\parnoteclear{%
\gdef\PN@text{}%
\parnotereset
}
\makeatother
\begin{document}
\begin{landscape}
% the alignment of this table is OK
\begin{table}[!]
\begin{tabularx}{\linewidth}{
@{}
c
c
c
c
c
c
c
>{\raggedright\arraybackslash}X
@{}}
\toprule
\multicolumn{4}{c}{\textbf{Peptide arrays paramters}} & \multicolumn{3}{c}{\textbf{Hybridisation paramters}} & \multicolumn{1}{c}{\multirow{2}{*}{\textbf{Outcome}}} \\ \cmidrule(r){1-7}
\multicolumn{1}{c}{\textbf{\makecell{Array\\[0.5ex] Batch\#}}} & \textbf{\makecell{C.pep\\[0.5ex] {[}mg/ml{]}}} & \textbf{\makecell{C.NLA\\[0.5ex] {[}mg/ml{]}}} & \textbf{Drying} & \multicolumn{1}{c}{\textbf{\makecell{Hybridisation\\[0.5ex] Batch\#}}} & \textbf{\makecell{Dil.\\[0.5ex] 2nd AB}} & \textbf{\makecell{Dil.\\[0.5ex]serum}} & \multicolumn{1}{c}{} \\ \cmidrule(l){8-8}
\multirow{2}{*}{D1727\_D1728} & \multirow{2}{*}{Stock} & \multirow{2}{*}{2.85} & \multirow{3}{*}{\makecell{\tempe{50}\\[0.5ex] for\\[0.5ex] 3h}} & D1727\_D1728\_100 & \multirow{3}{*}{1:1000} & 1:100 & Lack of specificity \\
& & & & D1727\_D1728\_200 & & \multirow{2}{*}{1:200} & Most reactive peptide revealed \\
E1704\_E1705 & variable & 1.0 & & E1704\_E1705\_200 & & & Specificity highly concentration dependent \\ \bottomrule
\end{tabularx}
\end{table}
% We now see that the alignment of this table has changed (width of the last column)
\begin{table}[!]
\begin{tabularx}{\linewidth}{
@{}
c
c
c
c
c
c
c
>{\raggedright\arraybackslash}X
@{}}
\toprule
% \parenoteclear % Don't know why, but this was upseting the compilation of the table, so I commented it
\multicolumn{4}{c}{\textbf{Peptide arrays paramters}} & \multicolumn{3}{c}{\textbf{Hybridisation paramters}} & \multicolumn{1}{c}{\multirow{2}{*}{\textbf{Outcome}}} \\ \cmidrule(r){1-7}
\multicolumn{1}{c}{\textbf{\makecell{Array\\[0.5ex] Batch\#}}} & \textbf{\makecell{C.pep\\[0.5ex] {[}mg/ml{]}}} & \textbf{\makecell{C.NLA\\[0.5ex] {[}mg/ml{]}}} & \textbf{Drying} & \multicolumn{1}{c}{\textbf{\makecell{Hybridisation\\[0.5ex] Batch\#}}} & \textbf{\makecell{Dil.\\[0.5ex] 2nd AB}} & \textbf{\makecell{Dil.\\[0.5ex]serum}} & \multicolumn{1}{c}{} \\ \cmidrule(l){8-8}
\multirow{2}{*}{D1727\_D1728} & \multirow{2}{*}{Stock\parnote{Tablenotes example}} & \multirow{2}{*}{2.85} & \multirow{3}{*}{\makecell{\tempe{50}\\[0.5ex] for\\[0.5ex] 3h}} & D1727\_D1728\_100 & \multirow{3}{*}{1:1000} & 1:100 & Lack of specificity \\
& & & & D1727\_D1728\_200 & & \multirow{2}{*}{1:200} & Most reactive peptide revealed \\
E1704\_E1705 & variable & 1.0 & & E1704\_E1705\_200 & & & Specificity highly concentration dependent \\ \bottomrule
\end{tabularx}
\end{table}
\parnotes
\end{landscape}
\end{document}
请注意,这里我对标题和标签都不感兴趣。还请注意,一些已加载的包可能对文档编译不是必需的 - 它们只是在我使用 Texstudio 创建新文档时自动加载的。