indenting exercises
You can use an enumerate
environment; the optional argument of \item
allows you to assign the desired label:
\documentclass{article}
\usepackage[nopar]{lipsum}% just to generate text for the example
\begin{document}
\begin{enumerate}
\item This is the question.
And this is where the question goes. \lipsum[2]
\item[11.] This is another question.
And this is where the question goes. \lipsum[4]
\end{enumerate}
\end{document}
There are lots of ways to do this. A simple way using just an enumerate
environment
\begin{enumerate}
\item[5] This is the question.
\item[] This is where the answer goes
\end{enumerate}
or perhaps you want your own environment; I've posted a few different options below- take your pick, or perhaps build one based off one of them.
\documentclass{article}
\usepackage{calc}
\newcommand{\question}[1]{\item[#1]}
\newcommand{\answer}{\item[]}
\newenvironment{questionandanswer}[2]{\enumerate\setcounter{enumi}{#2-1}\item#1\item[]}{\endenumerate}
\newenvironment{anotherapproach}{\enumerate}{\endenumerate}
\begin{document}
\begin{questionandanswer}{This is the question.}{5}
This is where the answer goes
\end{questionandanswer}
\begin{anotherapproach}
\question{5} This is the question.
\answer This is where the answer goes
\end{anotherapproach}
\begin{enumerate}
\item[5] This is the question.
\item[] This is where the answer goes
\end{enumerate}
\end{document}
If you want to change the indentation of the enumerate
environment, then the enumitem
package is the most sensible way to go:
\documentclass{article}
\usepackage{calc}
\usepackage{enumitem}
\setlist[enumerate]{leftmargin=*}
If you're particular about having the spacing between the label, the following code, copied from Gonzalo's answer and modified suitably looks good to me:
\documentclass{article}
\usepackage{enumitem}%provides the key labelsep
\begin{document}
\begin{enumerate}[labelsep=*]
\item[5.] This is the question.
And this is where the question goes. I use \texttt{labelsep}=*
\item[11.] This is another question.
And this is where the question goes. I use \texttt{labelsep}=*
\end{enumerate}
\begin{enumerate}
\item[5.] This is the question.
And this is where the question goes. No \texttt{labelsep}=*
\item[11.] This is another question.
And this is where the question goes. No \texttt{labelsep}=*
\end{enumerate}
\end{document}
An Output: