1

I want to add some sub-lines in my form; however, the lines generated by \cmidrule are pulling the words around it. The words above the \cmidrule seem higher than they should be, and the words below seem lower. The words at both sides of the \cmidrule, which are generated by \multicolumn, are also been lifted.

If I remove the sub-lines, everything goes fine.

\begin{table}
\TBL{\caption{This is the Caption. \label{Tab:tab4}}}
{\begin{fntable}\centering
        \begin{tabular}{@{\extracolsep{\fill}}ccccccc}
            \hline
            \multirow[c]{2}{*}{$e_{o}=e_{m}$(\%)}&\multicolumn{3}{c}{Standard deviation} & \multicolumn{2}{c}{Reliability(\%)} &\multirow{2}{*}{Unfounded Cases} \\ 
            %           \cmidrule(rl){2-4} \cmidrule(rl){5-6}
            & Correct & Incorrect  & Total & Single & Double & \\
            \hline
            0.1   & 0.0111 & 0.0111 & 0.0111 & 00.00 & 00.00 & 0 \\
            1.1   & 0.0111 & 0.0111& 0.0111& 00.00 & 00.00 & 0 \\
            2.1   & 0.0111 & 0.0111 & 0.0111 & 00.00 & 00.00 & 0 \\
            3.1   & 0.0111 & 0.0111& 0.0111& 00.00 & 00.00 & 0 \\
            4.1   & 0.0111 & 0.0111 & 0.0111 & 00.00 & 00.00 & 0 \\     
            \hline
        \end{tabular}%
\end{fntable}}
\end{table}

enter image description here

If I add them, the form is broken.

\begin{table}
\TBL{\caption{This is the Caption. \label{Tab:tab4}}}
{\begin{fntable}\centering
        \begin{tabular}{@{\extracolsep{\fill}}ccccccc}
            \hline
            \multirow[c]{2}{*}{$e_{o}=e_{m}$(\%)}&\multicolumn{3}{c}{Standard deviation} & \multicolumn{2}{c}{Reliability(\%)} &\multirow{2}{*}{Unfounded Cases} \\ 
                    \cmidrule(rl){2-4} \cmidrule(rl){5-6}
            & Correct & Incorrect  & Total & Single & Double & \\
            \hline
            0.1   & 0.0111 & 0.0111 & 0.0111 & 00.00 & 00.00 & 0 \\
            1.1   & 0.0111 & 0.0111& 0.0111& 00.00 & 00.00 & 0 \\
            2.1   & 0.0111 & 0.0111 & 0.0111 & 00.00 & 00.00 & 0 \\
            3.1   & 0.0111 & 0.0111& 0.0111& 00.00 & 00.00 & 0 \\
            4.1   & 0.0111 & 0.0111 & 0.0111 & 00.00 & 00.00 & 0 \\     
            \hline
        \end{tabular}%
\end{fntable}}
\end{table}

enter image description here

The codes work well with other templates; however, it is not with this one. I have observed that there are a lot of modifications associated with the \cmidrule commands. Is it possible that the template itself contains bugs? The most possible is that I use the template in the wrong way. I passed the codes associated with \cmidrule commands from the template's cls file.

\RequirePackage{booktabs}
\cmidrulewidth=.15pt%

\def@@@cmidrule[#1-#2]#3#4{\global@cmidla#1\relax \global\advance@cmidla\m@ne \ifnum@cmidla>0\global\let@gtempa@cmidrulea\else \global\let@gtempa@cmidruleb\fi \global@cmidlb#2\relax \global\advance@cmidlb-@cmidla \global@thisrulewidth=#3 @setrulekerning{#4} \ifnum@lastruleclass=\z@\vskip 3\p@\fi \ifnum0={\fi}\@gtempa \noalign{\ifnum0=}\fi\futurenonspacelet@tempa@xcmidrule} \def@xcmidrule{% \ifx@tempa\cmidrule \vskip-@thisrulewidth \global@lastruleclass=@ne \else \ifx@tempa\morecmidrules \vskip \cmidrulesep \global@lastruleclass=@ne\else \vskip 5\p@ \global@lastruleclass=\z@ \fi\fi \ifnum0=`{\fi}} %\let\cline\cmidrule

Blue Bird
  • 113
  • Why not use \cline rather than \cmidrule? – Werner Jul 21 '21 at 03:51
  • It is because if two clines are used together, the generated sub-lines will be connected. – Blue Bird Jul 21 '21 at 04:14
  • 1
    How or where are the \TBL macro and the \fntable environment defined. and what's the purpose of @{\extracolsep{\fill}} outside of a tabular* environment? – Mico Jul 21 '21 at 04:15
  • In the template's cls file, which are : \long\def\TBL#1#2{% \renewcommand\arraystretch{1}% %\setbox\tablebox\hbox{\tablebodyfont #2\par} %\tabbodywidth\wd\tablebox% #1\vskip 0pt% {\tablebodyfont #2\par}% } – Blue Bird Jul 21 '21 at 04:18
  • \newenvironment{fntable}[1][\columnwidth]{% \def@makefnmark{\hbox{@textsuperscript{\fontsize{5}{5}\selectfont@thefnmark}}}% \begin{minipage}{#1}% \def\thempfootnote{{@arabic\c@mpfootnote}} %%%%%%%%%% \def@xfootnotemark[##1]{% \begingroup %\c@footnote #1\relax \unrestored@protected@xdef@thefnmark{##1}% \endgroup @footnotemark} %%%%%%%%% \def@xfootnotenext[##1]{% \begingroup %\csname c@@mpfn\endcsname ##1\relax \unrestored@protected@xdef@thefnmark{##1}% ..... – Blue Bird Jul 21 '21 at 04:20
  • @{\extracolsep{\fill}} comes from the example provided by the template. The template is : \begin{table}[h!] \TBL{\caption{Results of Overloading for 3 Experimental Setups\label{sample-table}}} {\begin{fntable}\centering \begin{tabular}{@{\extracolsep{\fill}}lcrrrrr} \hline Program& Expt.&CPU&RelCPU&GC& Mem&RelMem\ \hline 8 Queens& (a)& 2 88& 1 00& 6& 1 7M& 1 00\ & (b)& 32 51& 11 29& 193& 48 9M& 28 76\ & (c)& 7 90& 2 74& 42& 11 3M& 6 65\ \hline \end{tabular} \end{fntable}} \end{table} – Blue Bird Jul 21 '21 at 04:21
  • I have changed '\begin{tabular}{@{\extracolsep{\fill}}ccccccc}' to ' \begin{tabular}{ccccccc}'; however, the problem remains. – Blue Bird Jul 21 '21 at 04:25
  • The @{\extracolsep{\fill}} particle does nothing useful in a tabular environment. More precisely, it does exactly what the far more compact @{} particle does. – Mico Jul 21 '21 at 04:47
  • 2
    You may want to state explicitly that you must adhere to the layout decisions of the template you are forced to use and that you are therefore not willing to accept any layout changes that would violate the template's rigid (and rather questionable) structure. While you're at it, it might be useful if you stated what these mysterious layout decisions are. – Mico Jul 21 '21 at 05:38
  • Thanks @Mico. I have improved my statement. The reason that I cannot show the result of your modification is that adding figures to the comment is not supported. – Blue Bird Jul 21 '21 at 06:18

0 Answers0