Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The below piece of code is not getting center aligned. Kindly help in finding out the solution for the same

\begin{table}[!ht]
\begin{tabular}{|c||c|c|c|c|c|} \hline
\centering
AE mode & 512 Byte & 1KB  & 1 MB & 1 GB & 2048 PetaBytes ($2^{64}$) \\ \hline \hline
%IACBC & BC & & & m + 2 & n & n & n & 2 independent random keys are required  \\ \hline
\end{tabular}
}
\end{table}
share|improve this question
11  
You want to center the tabular itself. Then you should put \centering outside that environment (but still inside table environment). By the way, don't you have an extra }? –  Manuel Jan 22 at 20:48
    
Welcome to TeX.SX! In the future, please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That way, it'll be much easier for other users to see your problem. –  Kevin C Jan 22 at 23:19
    
@Manuel You should make than an answer –  Andrew Swann Apr 9 at 18:39

1 Answer 1

You want to center the tabular itself. Then you should put \centering outside that environment (but still inside table environment). By the way, you have an extra }.

\begin{table}[!ht]
  \centering
  \begin{tabular}{|c||c|c|c|c|c|}
    \hline
    AE mode & 512 Byte & 1KB  & 1 MB & 1 GB & 2048 PetaBytes ($2^{64}$) \\ 
    \hline
    \hline
    %IACBC & BC & & & m + 2 & n & n & n & 2 independent random keys are required  \\
    \hline
  \end{tabular}
\end{table}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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