3

I am using memoir template.

I have a small table (attached is the word version) and I tried to center it against the page. But it becomes left aligned after I added [H] behind \begin{table}.

Here is the link of the template and the code: https://sites.google.com/site/biometricbiometrie/template/monStyle.tex?attredirects=0&d=1

enter image description here

\definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725}
\definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941}

\begin{center}
\setlength{\arrayrulewidth}{1pt}
\setlength{\extrarowheight}{1.2pt}
\color{c1}
\arrayrulecolor{white}  
\begin{table}[H]
\caption{Table}
\label{tb33}
\begin{tabular}{|l|l|c|}    
\rowcolor{c1}
    &   \color{c2}F1A    &   \color{c2}F3A  \\
\hline

\rowcolor{c2}
F2A  &  0.4693 (14.2\%)  &  0.5073 (15.3\%)   \\
\hline

\rowcolor{c2}
F1A  &    &  0.4191 (12.6\%)    \\
\hline
\end{tabular}
\end{table}
\end{center}
user18441
  • 431
  • 4
  • 9

1 Answers1

2

when you use a floating table H is not for centering but for the prefered position of the table in page. To center the tabular environment you must use \centering.

\begin{table}[h]
   \centering
   \begin{tabular}{...}
      […]
   \end{tabular}
\end{table}
Mico
  • 506,678
Penbeuz
  • 1,669
  • Thank you Penbeuz. I have another question. How can I adjust table width and height but do not change font size in the table? – user18441 Dec 18 '13 at 15:24
  • have alook at http://tex.stackexchange.com/questions/70340/increasing-height-of-single-row-in-table – Penbeuz Dec 18 '13 at 15:58