1
\begin{document}
\begin{table}[ht!]
\centering
\caption{Optimal h}
\resizebox{9cm}{!}{
\begin{tabular}{|*{9}{c|}}
\cline{1-9}
%\cline{1-1} \cline{9-10}
\multicolumn{1}{|c|}{} \multicolumn{5}{|c|} P & \multicolumn{4}{|c|} P \\
\hline
 h & N\textsubscript{total} & Maj & Mean & $h\textsubscript{grid\_{pd}} & Maj & Mean &  $h\textsubscript{line\_{pfa}} & $h1$ \\
\hline
1 & 5 & 2 & 4.75 & 1 & 3 & 4.50 & 1 & 1\\
\hline
2 & 13 & 6 & 12.34 & 2 & 7 & 11.7 & 2 & 2\\
\hline
3 & 25 & 12 & 23.75 & 2 & 13 & 22.50 & 3 & 3\\
\hline
4 & 41 & 20 & 38.95 & 3 & 21 & 36.89 & 3 & 3\\
\hline
5 & 61 & 30 & 57.95 & 4 & 31 & 54.89 & 3 & 4\\
\hline
6 & 85 & 42 & 80.75 & 5 & 43 & 76.50 & 5 & 5\\
\hline
7 & 113 & 56 & 107.34 & 5 & 57 & 101.69 & 5 & 5\\
\hline
8 & 145 & 76 & 137.75 & 6 & 77 & 130.50 & 7 & 7\\
\hline
9 & 181 & 90 & 171.94 & 7 & 91 & 162.89 & 7 & 7\\
\hline
10 & 221 & 110 & 209.9 & 8 & 111 & 198.89 & 8 & 8\\
\hline
\end{tabular}
}
\end{table}
\end{document}

In the code above on line \multicolumn{1}{|c|}{} \multicolumn{5}{|c|} P & \multicolumn{4}{|c|} P \\ i want to write Pod with o as the superscript and d as subscript. But i am not able to do so..please help.

1
  • And never put in '$' in table in this way: $A_i & B^2$ because '&' is the separator and it should not be within '$ $'.
    – Sujatha
    Oct 29, 2016 at 2:53

2 Answers 2

1

You text have more than one character, hence you should write

\multicolumn{1}{|c|}{} \multicolumn{5}{|c|}{$P_d^o$} & \multicolumn{4}{|c|}{$\mathrm{P}_d^o$}  \\

etc. in the line in question. (Alternative variants shown).

1
  • 1
    $ sign italics text, that is undesired.
    – keramat
    Jul 12, 2019 at 13:46
0

This should work inside a table:

P$_{\texrm{d}}^{\textrm{o}}$

\textrm adds normal text in math mode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.