1

I use the \usepackage{rotating}, but it does not work.

The code:

\usepackage{rotating}

\begin{sidewaystable}
\caption{Performance After Post Filtering} % title name of the table
\centering % centering table
\begin{tabular}{l c c rrrrrrr} % creating 10 columns
\hline\hline % inserting double-line
Audio &Audibility & Decision &\multicolumn{7}{c}{Sum of Extracted Bits}
\\ [0.5ex]
\hline % inserts single-line
% Entering 1st row
& &soft &1 & $-1$ & 1 & 1 & $-1$ & $-1$ & 1 \\[-1ex]
\raisebox{1.5ex}{Police} & \raisebox{1.5ex}{5}&hard
& 2 & $-4$ & 4 & 4 & $-2$ & $-4$ & 4 \\[1ex]
% Entering 2nd row
& &soft & 1 & $-1$ & 1 & 1 & $-1$ & $-1$ & 1 \\[-1ex]
\raisebox{1.5ex}{Beethoven} & \raisebox{1.5ex}{5}& hard
&8 & $-8$ & 2 & 8 & $-8$ & $-8$ & 6 \\[1ex]
% Entering 3rd row
& &soft & 1 & $-1$ & 1 & 1 & $-1$ & $-1$ & 1 \\[-1ex]
\raisebox{1.5ex}{Metallica} & \raisebox{1.5ex}{5}& hard
&4 & $-8$ & 8 & 4 & $-8$ & $-8$ & 8 \\[1ex]
% [1ex] adds vertical space
\hline % inserts single-line
\end{tabular}
\label{tab:LPer}
\end{sidewaystable}

The result about the above tex code in acmsmall template: The result about the above tex code in acmsmall template

The exact result that I want to get: The exact result that I want to get

1
  • Welcome to TeX.SE. Please make your code snippet minimally compilable by adding instructions such as \documentclass, \begin{document}, \end{document}, and by telling us which packages are needed to compile your test code.
    – Mico
    Feb 22, 2022 at 13:27

2 Answers 2

2

Using acmart.cls 2022/02/05 v1.82 Typesetting articles for the Association for Computing Machinery from latest version of the Primary Article Template - LaTeX

In the included file sample-acmsmall.tex it was added \usepackage{rotating} before \begin{document} and this code in the section Tables to simulate a large table you have to turn it.

\setlength\rotFPtop{0pt plus 1fil} will center the table laterally.

\setlength\rotFPtop{0pt plus 1fil} % added <<<<<<<<<<<<
\begin{sidewaystable}
    \centering
    \caption{Frequency of Special Characters}
    \label{tab:freq}
    \begin{tabular}{*{14}{c}}
        \toprule
        A &B &C& D &E &F &G &H &I &J &K &L &M   \\
        \midrule
        0.4 &   2.447   &   2.177   &   2.304   &   4.921   &   4.298   &   2.121   &   3.928   &   3.478   &   3.462   &   1.751   &   0.875   &   0.525   \\    
        0.8 &   4.894   &   4.354   &   4.609   &   9.843   &   8.597   &   4.241   &   7.857   &   6.957   &   6.924   &   3.502   &   1.750   &   1.049   \\   
        1.2 &   7.341   &   6.530   &   6.913   &   14.764  &   12.895  &   6.362   &   11.785  &   10.435  &   10.386  &   5.252   &   2.625   &   1.574   \\   
        1.6 &   9.789   &   8.707   &   9.218   &   19.686  &   17.194  &   8.482   &   15.713  &   13.914  &   13.848  &   7.003   &   3.500   &   2.099   \\   
        2   &   12.236  &   10.884  &   11.522  &   24.607  &   21.492  &   10.603  &   19.642  &   17.392  &   17.310  &   8.754   &   4.375   &   2.624   \\  
        2.4 &   14.683  &   13.061  &   13.827  &   29.529  &   25.791  &   12.723  &   23.570  &   20.871  &   20.772  &   10.505  &   5.250   &   3.148   \\   
        2.8 &   17.130  &   15.237  &   16.131  &   34.450  &   30.089  &   14.844  &   27.498  &   24.349  &   24.234  &   12.256  &   6.125   &   3.673   \\   
        3.2 &   19.577  &   17.414  &   18.435  &   39.372  &   34.388  &   16.965  &   31.427  &   27.828  &   27.697  &   14.006  &   7.000   &   4.198   \\   
        3.6 &   22.024  &   19.591  &   20.740  &   44.293  &   38.686  &   19.085  &   35.355  &   31.306  &   31.159  &   15.757  &   7.875   &   4.723   \\   
        4   &   24.471  &   21.768  &   23.044  &   49.215  &   42.984  &   21.206  &   39.283  &   34.784  &   34.621  &   17.508  &   8.750   &   5.247   \\   
        4.4 &   26.919  &   23.945  &   25.349  &   54.136  &   47.283  &   23.326  &   43.212  &   38.263  &   38.083  &   19.259  &   9.625   &   5.772   \\   
        4.8 &   29.366  &   26.121  &   27.653  &   59.058  &   51.581  &   25.447  &   47.140  &   41.741  &   41.545  &   21.009  &   10.500  &   6.297   \\   
        5.2 &   31.813  &   28.298  &   29.957  &   63.979  &   55.880  &   27.567  &   51.068  &   45.220  &   45.007  &   22.760  &   11.375  &   6.821   \\   
        5.6 &   34.260  &   30.475  &   32.262  &   68.900  &   60.178  &   29.688  &   54.996  &   48.698  &   48.469  &   24.511  &   12.250  &   7.346   \\   
        6   &   36.707  &   32.652  &   34.566  &   73.822  &   64.477  &   31.809  &   58.925  &   52.177  &   51.931  &   26.262  &   13.125  &   7.871   \\       
        \bottomrule 
\end{tabular}
\end{sidewaystable}

with this output a

Not related: The acmart document class includes the booktabs package for preparing high-quality tables. It recommends to use \toprule , \midrule and \bottomrule instead of \hline.

1
  • Thank you. it is a good idea. And another question, how can I draw two rotating tables on one page?
    – ZeroorOne
    Feb 23, 2022 at 9:41
0

A bit late and also mostly off-topic, but anyway ...

  • In your table I would use S columns type defined in the siunitx package,
  • in ine sidewaystable environment you can insert two tables, if there is sufficient space for them
\documentclass{acmart}
\usepackage{rotating}
\usepackage{siunitx}

\begin{document}
\begin{sidewaystable}
    \centering
    \caption{Frequency of Special Characters}
    \label{tab:freq}
    \begin{tabular}{*{14}{c}}
        \toprule
        A &B &C& D &E &F &G &H &I &J &K &L &M   \\
        \midrule
        0.4 &   2.447   &   2.177   &   2.304   &   4.921   &   4.298   &   2.121   &   3.928   &   3.478   &   3.462   &   1.751   &   0.875   &   0.525   \\
        0.8 &   4.894   &   4.354   &   4.609   &   9.843   &   8.597   &   4.241   &   7.857   &   6.957   &   6.924   &   3.502   &   1.750   &   1.049   \\
        1.2 &   7.341   &   6.530   &   6.913   &   14.764  &   12.895  &   6.362   &   11.785  &   10.435  &   10.386  &   5.252   &   2.625   &   1.574   \\
        1.6 &   9.789   &   8.707   &   9.218   &   19.686  &   17.194  &   8.482   &   15.713  &   13.914  &   13.848  &   7.003   &   3.500   &   2.099   \\
        2   &   12.236  &   10.884  &   11.522  &   24.607  &   21.492  &   10.603  &   19.642  &   17.392  &   17.310  &   8.754   &   4.375   &   2.624   \\
        2.4 &   14.683  &   13.061  &   13.827  &   29.529  &   25.791  &   12.723  &   23.570  &   20.871  &   20.772  &   10.505  &   5.250   &   3.148   \\
        2.8 &   17.130  &   15.237  &   16.131  &   34.450  &   30.089  &   14.844  &   27.498  &   24.349  &   24.234  &   12.256  &   6.125   &   3.673   \\
        3.2 &   19.577  &   17.414  &   18.435  &   39.372  &   34.388  &   16.965  &   31.427  &   27.828  &   27.697  &   14.006  &   7.000   &   4.198   \\
        3.6 &   22.024  &   19.591  &   20.740  &   44.293  &   38.686  &   19.085  &   35.355  &   31.306  &   31.159  &   15.757  &   7.875   &   4.723   \\
        4   &   24.471  &   21.768  &   23.044  &   49.215  &   42.984  &   21.206  &   39.283  &   34.784  &   34.621  &   17.508  &   8.750   &   5.247   \\
        4.4 &   26.919  &   23.945  &   25.349  &   54.136  &   47.283  &   23.326  &   43.212  &   38.263  &   38.083  &   19.259  &   9.625   &   5.772   \\
        4.8 &   29.366  &   26.121  &   27.653  &   59.058  &   51.581  &   25.447  &   47.140  &   41.741  &   41.545  &   21.009  &   10.500  &   6.297   \\
        5.2 &   31.813  &   28.298  &   29.957  &   63.979  &   55.880  &   27.567  &   51.068  &   45.220  &   45.007  &   22.760  &   11.375  &   6.821   \\
        5.6 &   34.260  &   30.475  &   32.262  &   68.900  &   60.178  &   29.688  &   54.996  &   48.698  &   48.469  &   24.511  &   12.250  &   7.346   \\
        6   &   36.707  &   32.652  &   34.566  &   73.822  &   64.477  &   31.809  &   58.925  &   52.177  &   51.931  &   26.262  &   13.125  &   7.871   \\
        \bottomrule
\end{tabular}
\end{sidewaystable}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .