0

I am trying to user\parnote within the tabularx environment to add table notes, as shown here.

I have noticed, however, that the table notes with \parnotes changes the alignment/ width of the columns specified in my tables.

With the following code, I have two tables. The only difference is the presence of \parnote and we can see that the alignment is different.

\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}

Note that here I am not interested in neither captions nor labels. Please also note that some of the loaded packages might not be necessary for the document compilation - they are just loaded automatically when I create a new document with Texstudio.

3
  • [!] a rather odd float option (and generates a latex warning) Apr 23, 2018 at 16:23
  • It does not have any effect on the alignment/ width of the last columns though
    – BCArg
    Apr 23, 2018 at 16:33
  • the table environment has no effect on the tabular at all, that was just an additional comment. Apr 23, 2018 at 17:32

0

You must log in to answer this question.

Browse other questions tagged .