TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 14 down vote accepted

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

share|improve this answer
    
Perfect, thanks a lot. – Eusebius Sep 23 '12 at 7:32
2  
The \null version would be OK after \\ but not at the start of a line that starts a paragraph. – David Carlisle Sep 23 '12 at 8:39
    
@DavidCarlisle: Thanks. Added to the answer. – Harish Kumar Sep 23 '12 at 9:16

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.