0

I am getting this error in my table, but I don’t know why?

\begin{table*}[htbp]
    \caption{ Average }
    \label{tab_5.1}
    \centering
    \scalebox{0.8}{
        \begin{tabular}{lcccccc}
        \toprule
        Method & DBLP-1 & DBLP-2 & Reddit & Brain & Epinions &Facebook\\
            \midrule
            A-LUSTC$_{1}$ & \textbf{0.9268}\pm {0.0089} & 0.9398\pm{0.0029}  & \textbf{0.9487}\pm{0.0012} & 0.5518\pm{0.0023} & 0.7212\pm{0.0365} &\textbf{0.8525}\pm{0.0165}\\
            %\hline
            A-LUSTC$_{2}$ & 0.8844\pm{0.0139} & \textbf{0.9733}\pm{0.0025} & 0.9383\pm{0.0011} & 0.5361\pm{0.0022} & 0.7181\pm{0.2012} & 0.8365\pm{0.0012}\\
            %\hline
            LUSTC & 0.9149\pm{0.0190}  & 0.9636\pm {0.0001} & 0.9371\pm{0.0110} & 0.5110\pm{0.0170} 
            & \textbf{0.8923}\pm{0.0016}& 0.8231\pm{0.0110}\\
            %\hline
            GG& 0.6520\pm{0.1201}  & 0.8866\pm{0.0045} & 0.9035\pm{0.0030} & 0.5165\pm{0.0025} & 0.6391\pm{0.0034} & 0.6074\pm{0.0023}\\
        %\hline
        MM& 0.5470\pm{0.0056}   & 0.7567\pm{0.0021}  & 0.9018\pm{0.0410} & 0.5210\pm {0.0245}  & 0.6672\pm {0.0320}& 0.5008\pm{0.0235}\\
        %\hline
        RRR& 0.5724\pm{0.1030}  & 0.8542\pm{0.0221} & 0.9085\pm{0.0038} & 0.5173\pm{0.0036}
    & 0.4972\pm{0.0036}&0.5060\pm{0.0016}\\

%\hline TTT& 0.8133\pm{0.0057} & 0.9132\pm{0.0022} & 0.9175\pm{0.0007} &\textbf{0.7809}\pm{0.0019} & 0.8214\pm{0.0041}&0.7840\pm{0.0034}\ % \hline QQQ& 0.8130\pm{0.0043} & 0.8923\pm{0.0191} & 0.8575\pm{0.0055} & 0.7392\pm{0.0043} & 0.7395\pm{0.0005}& 0.7924\pm{0.0012}\ \bottomrule \end{tabular}} \end{table*}

Ingmar
  • 6,690
  • 5
  • 26
  • 47
TinaTz
  • 115
  • 1
    You should provide a minimum working example. – scd Jul 10 '23 at 15:39
  • 3
    You can't use \pm outside of math mode. Maybe have a look at the siunitx package to properly display your values and uncertainties. And please also have a look at https://tex.stackexchange.com/questions/425453/why-not-scale-elements-that-contain-text And maybe you want to read up on significant figures... – samcarter_is_at_topanswers.xyz Jul 10 '23 at 15:41
  • 3
    \pm is a math symbol so has to be in math – David Carlisle Jul 10 '23 at 15:41
  • 1
    Thank you alot, done! you cant imagine how this simple error took my time...Really appreciate – TinaTz Jul 10 '23 at 15:54
  • Mostly off topic, but you shouldn't rescale a table. It makes the fonts different throughout your document. (And if you remove the scalebox, then the error shows up at the correct spot.) – Teepeemm Jul 10 '23 at 16:31

1 Answers1

1

Just change $\pm$. Have a look to the following code:

\documentclass[twocolumn]{article}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{graphicx}

\begin{document}

\begin{table}[htbp] \caption{Average} \label{tab_5.1} \centering \scalebox{0.8}{ \begin{tabular}{lcccccc} \toprule Method & DBLP-1 & DBLP-2 & Reddit & Brain & Epinions & Facebook \ \midrule A-LUSTC${1}$ & \textbf{0.9268}$\pm$0.0089 & 0.9398$\pm$0.0029 & \textbf{0.9487}$\pm$0.0012 & 0.5518$\pm$0.0023 & 0.7212$\pm$0.0365 & \textbf{0.8525}$\pm$0.0165 \ A-LUSTC${2}$ & 0.8844$\pm$0.0139 & \textbf{0.9733}$\pm$0.0025 & 0.9383$\pm$0.0011 & 0.5361$\pm$0.0022 & 0.7181$\pm$0.2012 & 0.8365$\pm$0.0012 \ LUSTC & 0.9149$\pm$0.0190 & 0.9636$\pm$0.0001 & 0.9371$\pm$0.0110 & 0.5110$\pm$0.0170 & \textbf{0.8923}$\pm$0.0016 & 0.8231$\pm$0.0110 \ GG & 0.6520$\pm$0.1201 & 0.8866$\pm$0.0045 & 0.9035$\pm$0.0030 & 0.5165$\pm$0.0025 & 0.6391$\pm$0.0034 & 0.6074$\pm$0.0023 \ MM & 0.5470$\pm$0.0056 & 0.7567$\pm$0.0021 & 0.9018$\pm$0.0410 & 0.5210$\pm$0.0245 & 0.6672$\pm$0.0320 & 0.5008$\pm$0.0235 \ RRR & 0.5724$\pm$0.1030 & 0.8542$\pm$0.0221 & 0.9085$\pm$0.0038 & 0.5173$\pm$0.0036 & 0.4972$\pm$0.0036 & 0.5060$\pm$0.0016 \ TTT & 0.8133$\pm$0.0057 & 0.9132$\pm$0.0022 & 0.9175$\pm$0.0007 & \textbf{0.7809}$\pm$0.0019 & 0.8214$\pm$0.0041 & 0.7840$\pm$0.0034 \ QQQ & 0.8130$\pm$0.0043 & 0.8923$\pm$0.0191 & 0.8575$\pm$0.0055 & 0.7392$\pm$0.0043 & 0.7395$\pm$0.0005 & 0.7924$\pm$0.0012 \ \bottomrule \end{tabular} } \end{table}

\end{document}

Which produces the next output:

enter image description here

scd
  • 774