6

I'm trying to make that table:

\documentclass[default]{sn-jnl}

\usepackage{verbatim} \usepackage{hyperref}

\usepackage{graphicx}% \usepackage{multirow}% \usepackage{amsmath,amssymb,amsfonts}% \usepackage{amsthm}% \usepackage{mathrsfs}% \usepackage[title]{appendix}% \usepackage{xcolor}% \usepackage{textcomp}% \usepackage{manyfoot}% \usepackage{booktabs}% \usepackage{algorithm}% \usepackage{algorithmicx}% \usepackage{algpseudocode}% \usepackage{listings}% \usepackage{adjustbox}%

\theoremstyle{thmstyleone}% \newtheorem{theorem}{Theorem}% \newtheorem{proposition}[theorem]{Proposition}% \theoremstyle{thmstyletwo}% \newtheorem{example}{Example}% \newtheorem{remark}{Remark}%

\theoremstyle{thmstylethree}% \newtheorem{definition}{Definition}%

\raggedbottom

\begin{document}

\title[Some title]{Some title}

\abstract{Some abstract}

\maketitle

\section{INTRODUCTION} .....

\begin{table}[ht] \centering \caption{Statistical tests.\label{tab:II}} \begin{adjustbox}{max width=1.0\textwidth,center} \begin{tabular}{c c c c c c} \hline \multirow{5}{}{Algorithm} & \multirow{5}{}{No. of streams} \ \multicolumn{5}{l}{$\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad$ Inter-stream correlation} \[6pt] \cline{3-6} & & \multirow{2}{}{NIST} & \multirow{2}{}{Dieharder} & \multirow{2}{}{TestU01} & \multirow{2}{}{PractRand (bytes)} \[11pt] \hline \ \textbf{A} & $2^{127}$ & $>$ min. pass rate &passed & passed & $>2^{43}$, $>2^{43}$ \[7pt] \textbf{B} & $2^{63}$ & $>$ min. pass rate &passed & passed & $>2^{43}$, $>2^{43}$ \[7pt] \textbf{C} & $2^{63}$ & $>$ min. pass rate &passed & passed & $>2^{43}$, $>2^{43}$ \[7pt] CG32 & $2^{31}$ & not applied &not applied & not applied & $> 2^{43}$, $< 2^{34}$ \[7pt] CG64-32 & $2^{31}$ & not applied &not applied & not applied & $> 2^{43}$, $< 2^{35}$ \[7pt] CG16 & $2^{15}$ & not applied &not applied & not applied &$< 2^{24}$, $< 2^{17}$ \[7pt] CG32-16 & $2^{15}$ & not applied &not applied & not applied & $< 2^{20}$, $< 2^{18}$ \[7pt] \hline \end{tabular} \end{adjustbox} \end{table}% \raggedbottom

\bibliography{cg-bibliography}

\end{document}

But I can't use cline, beacuse I get undefined control sequence. How to make that cline?

The full log:

! Undefined control sequence.
l.472 \cline
{3-6}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Tom
  • 175
  • sn-jnl is not a standard class, so I can't compile your example as it is. If I change the class to article, then I don't get an error. Can you trim this down to a minimal example that shows the error you're getting? – Teepeemm Aug 09 '23 at 18:52
  • @Teepeemm What could be minimal example other than one I showed? – Tom Aug 09 '23 at 18:56
  • I get no error, using sn-jnl, show the full log. Your example is far from minimal do you need \usepackage{manyfoot}% to show the error. A minimal example would have much smaller log and be much easier to debug – David Carlisle Aug 09 '23 at 19:01
  • Ok, I added more error informations. – Tom Aug 09 '23 at 19:09
  • 1
    Did you see Q678195? It might be related. – Jasper Habicht Aug 09 '23 at 19:18
  • 2
    @JasperHabicht It was my first thought too but booktabs is loaded here. – campa Aug 09 '23 at 19:21
  • Work through https://tex.meta.stackexchange.com/q/228/107497. Delete the multirow and multicolumn commands. Delete the adjustbox environment (and never use it again). Do you still have the error? Delete the theoremstyles and newtheorems. Do you still have the error? Delete every package (except for booktabs). Do you still have the error? – Teepeemm Aug 09 '23 at 19:24
  • 2
    @JasperHabicht Oooh, now I see. The class does \let\cline\cmirdule but of course at that point \cmidrule is undefined. One should load booktabs before the document class. A very badly written class. – campa Aug 09 '23 at 19:33
  • @Teepeemm yes, I still have that error. – Tom Aug 09 '23 at 19:35
  • I will just delete that clines. By the way do you have any idea what other type of document compatible with \documentclass[acmsmall]{acmart} I could use to send it to International Journal of Information Technology? Beacuse all my questions so far are beacuse I have perfectly fine paper in ACM style and I can't convert it to that Springer requirements. Other types of document also usually are destroying my paper. – Tom Aug 09 '23 at 19:39
  • 2
    @campa Yes, I edited my answer to the other question. The solution is actually to place \RequirePackage{booktabs} before \documentclass. – Jasper Habicht Aug 09 '23 at 19:46
  • 2
    The sn-jnl class exists in two varieties bearing the same version information. One loads several useless packages, the one which you seem to be using got rid of almost all packages, even of those that are essential for it to work. You need to load yourself at least manyfoot and booktabs. – egreg Aug 09 '23 at 19:46
  • @JasperHabicht Upps, I had already written my answer before I read you reply... – campa Aug 09 '23 at 19:51
  • @Teepeemm If I will delete adjustbox my tables won't fit on the page. So what should I do in that case? – Tom Aug 09 '23 at 19:57
  • You can refer to https://tex.stackexchange.com/q/332902/107497. For this table, I think the NIST, Dieharder, and TestU01 columns don't need to be in the table and can be explained elsewhere. Actually, I'm betting that you've already explained them elsewhere, because what you've shown is too terse to really understand. – Teepeemm Aug 09 '23 at 20:07

1 Answers1

8

The class is written quite horribly. If you don't have to use it, then use another one.

Anyway, the problem here is that it defines \toprule and \bottomrule similar to those of booktabs but... no idea what is supposed to happen after that. After these definitions you find

\let\cline\cmidrule

but the trouble is that at this point \cmidrule is not defined, and using it in the document will result in the error.

There are some workarounds but none will result in whatever the class is probably supposed to do.

  1. You can load \RequirePackage{booktabs} before \documentclass. In this way you have a working \cline (which is the same as \cmidrule) but the class will overwrite the definition of \toprule and \bottomrule.
  2. You can add \usepackage{booktabs}\let\cline\cmidrule in the preamble. Everything should then work, but the class' own definitions will be overwritten.
  3. You can copy the original definition of \cline and restore it afterwards \let\LaTeXcline\cline\documentclass{sn-jnl}\let\cline\LaTeXcline. Then you'll have \cline and\cidrule doing different things.

I don't know which one's worse ;-)

campa
  • 31,130
  • Do you know what type of document compatible with \documentclass[acmsmall]{acmart} I could use to send it to International Journal of Information Technology? They suggest that one I'm using now, but maybe they could accept also other type. – Tom Aug 09 '23 at 19:52
  • I used first soultion and it works. – Tom Aug 09 '23 at 19:53