[Tex/LaTex] No horizontal spacing within minipage

beamerminipagespacing

I do not understand why my attempts to introduce horizontal spacing in beamer (with hspace or typographical spacing) fail when within a minipage:

\documentclass[10pt]{beamer}

\begin{document}
  \frame{
    text \\
    \hspace{1cm} text \\
    \begin{minipage}{5cm}
      text \\
      \hspace{1cm} \quad text
    \end{minipage}
  } 
\end{document}

Why? How can I introduce this spacing? Thanks in advance.

Best Answer

The command \hspace{} won't be effective at the start of a line inside the minipage. You should use \hspace*{1cm} or \null\hspace{1cm}. As David notes the \null version should not be used at the start of the line at paragraph begining.

A MWE:

\documentclass[10pt]{beamer}

\begin{document}
\frame{
    text \\
    \hspace*{1cm} text \\
    \begin{minipage}{5cm}
      text \\
      \hspace*{1cm} \quad text
    \end{minipage}
}
\end{document}

enter image description here