[Tex/LaTex] the difference between \Centering and \centering

horizontal alignmentragged2e

My question is already written on the title above.


EDIT 1:

I attempted to use \Centering and remove \arraybackslash in my original code below. It cannot be compiled.

\documentclass[dvips,dvipsnames,rgb]{book}

\usepackage[a4paper,margin=10mm,showframe]{geometry}
\usepackage{longtable}
\usepackage{array}
\usepackage{calc}
\usepackage{ragged2e}
\usepackage{lscape}

\newcounter{No}
\renewcommand{\theNo}{\stepcounter{No}\arabic{No}}
\newenvironment{MyTable}[4]%
{%
    \newcolumntype{A}[1]%
    {%
        >{%
            \begin{minipage}%
                {%
                    ##1\linewidth-2\tabcolsep-2\arrayrulewidth%
                }%
                \vspace{\tabcolsep}%
         }%
         c%
        <{\vspace{\tabcolsep}\end{minipage}}%
    }%
    \setcounter{No}{0}%comment out this if you want to continuous numbering for all tables.
    \begin{longtable}%
    {%
            |>{\scriptsize\Centering\theNo}A{#1}<{}%
            |>{}A{#2}<{\Centering\input{\jobname.tmp}}%
            |>{\Centering\lstinputlisting{\jobname.tmp}}A{#3}<{}%
            |>{\scriptsize\arraybackslash}A{#4}<{}%Please try to remove \arraybackslash here.
            |%
    }%
    \hline\ignorespaces%
}%
{%
    \end{longtable}%
}

\newcommand{\Comment}[1]{& & & #1\\\hline}


\usepackage{listings}
\lstset{%
language={PSTricks},
basicstyle=\ttfamily\scriptsize,%
keywordstyle=\color{blue}%,
%backgroundcolor=\color{yellow!30}%
}
\usepackage{fancyvrb}


\def\MyRow{%        
        \VerbatimEnvironment%
        \begin{VerbatimOut}{\jobname.tmp}%
}

\def\endMyRow{%
        \end{VerbatimOut}%      
}



\usepackage{pstricks,pst-node}
\newpsstyle{gridstyle}{%
gridwidth=0.4pt,%default: 0.8pt
gridcolor=Red!20,%default: black
griddots=0,%default: 0 
%
gridlabels=3pt,%default: 10pt
gridlabelcolor=Blue,%default: black
%
subgriddiv=5,%default: 5
subgridwidth=0.2pt,%default: 0.4pt
subgridcolor=Green!20,%default: gray
subgriddots=0%default: 0
}

\usepackage{lipsum}

\begin{document}
\chapter{Introduction to PSTricks}
\lipsum[1]

\section{At a glance galleries}
\lipsum[1-5]

%Landscape starts here.
\pagestyle{empty}
%\begin{landscape}
\begin{MyTable}{0.05}{.25}{0.4}{0.3}%
%=============
\begin{MyRow}
\pspicture*[showgrid](4,4)
\pnode(1,1){A}
\pnode(3,3){B}
\ncline{A}{B}
\endpspicture
\end{MyRow}
\Comment{\lipsum[1]}
%=============
\begin{MyRow}
\begin{pspicture}[showgrid](4,3)
\psframe*[linecolor=red!30](3,2)
\end{pspicture}
\end{MyRow}
\Comment{\lipsum[2]}
%=============
\begin{MyRow}
\pspicture[showgrid](4,3)
\psframe*[linecolor=green!30](3,2)
\endpspicture
\end{MyRow}
\Comment{\lipsum[3]}
%=============
\begin{MyRow}
\pspicture[showgrid](4,3)
\psframe*[linecolor=yellow!30](3,2)
\endpspicture
\end{MyRow}
\Comment{\lipsum[4]}
%=============
\begin{MyRow}
\pspicture[showgrid](4,3)
\psframe*[linecolor=Maroon!30](3,2)
\endpspicture
\end{MyRow}
\Comment{\lipsum[5]}
%=============
\end{MyTable}
%Landscape stops here.
%\end{landscape}
\pagestyle{plain}

\section{Node}
\lipsum[1-5]
\end{document}

Best Answer

\Centering allows hyphenation, \centering not and it also can be used in tabular headings to centering the contents without using the \arraybackslash macro. Same for \RaggedRight and \RaggedLeft

\documentclass[a5paper,english]{article}
\usepackage{babel}
\usepackage[originalcommands]{ragged2e}
\begin{document}

\centering this spaceframeconstruction spaceframe this spaceframeconstruction 
this spaceframeconstruction this spaceframeconstruction this spaceframeconstruction

\Centering this spaceframeconstruction spaceframe this spaceframeconstruction 
this spaceframeconstruction this spaceframeconstruction this spaceframeconstruction

\end{document}