2

I found that

\center
\begin{tabular}{...}
...
\end{tabular}

and

\centering
\begin{tabular}{...}
...
\end{tabular}

both make the following table centered.

My questions are:

  1. Are \center and \centering the same? What is the difference between them?
  2. Are they both commands? What are the scopes that they apply to? (note that in the examples, there are no table environment.)

Thanks!

marked as duplicate by Martin Scharrer Jan 8 at 20:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    I think \center is what happens "under the hood" when you call begin{center} (and on the other end, \end{center} shows up as \endcenter), while \centering just applies to the entire current scope. Thus, if I'm correct, you should either use \centering or the environment, but never \center. (The reason I'm writing this as a comment and not an answer is that I'm too uncertain, so don't shoot me if I'm wrong :P...) – Tomas Aschan May 18 '12 at 0:22
  • @percusse: Are you sure \center and \begin{center} the same thing? – Tim May 18 '12 at 0:24
  • \begin{center}...\end{center} is more-or-less equivalent to {\center...}, so \center has a global effect whereas \begin{center}...\end{center} has a local effect. – yo' May 18 '12 at 0:32
  • Actually it is a weird artifact since in the plain TeX, you have \command and \endcommand syntax and by skipping lots of details it is the LaTeX version of center environment. See egreg's answer for more details. But I didn't claim it so anyway. There are lots of well-answered similar questions on this site please have a search on this site too and open a new question if they don't address your concerns. – percusse May 18 '12 at 0:40