Two-colum task list with status information
As you wish to have the status aligned at the top, I suggest you put it in to the label of the item. The following increases the right margin of the list by a definable length \statuswidth
and places a box centered in that column with the status:
\documentclass{book}
\usepackage{lipsum}
\usepackage{enumitem}
\newlength{\statuswidth}
\setlength{\statuswidth}{3cm}
\newcommand{\status}[1]{\hfill\hbox to 0pt{\hbox to
\statuswidth{\hss\fbox{\textnormal{\scshape #1}}\hss}\hss}}
\newlist{task}{description}{1}
\setlist[task]{style=nextline, leftmargin=*, labelindent=*,
itemindent=*, itemsep=0pt, topsep=2mm, partopsep=0mm,
before=\setlength{\rightmargin}{\statuswidth}}
\begin{document}
\lipsum[11]
\begin{task}
\item[First Task\status{done}]
\lipsum[13]
\item[Second Task\status{in progress}]
\lipsum[4]
\end{task}
\end{document}
If you wish to have the status flush right, then use the following definition of \status
instead:
\newcommand{\status}[1]{\hfill\hbox to 0pt{\hbox to
\statuswidth{\hss\fbox{\textnormal{\scshape #1}}}\hss}}
i.e. the previous code with the penultimate \hss
removed.
I'm inclined to a simpler approach:
\documentclass{book}
\usepackage{lipsum}
\usepackage{longtable}
\usepackage{calc,array}
\usepackage[pass,showframe]{geometry}
\newcommand{\status}[1]{\fbox{\textsc{#1}}}
\newcommand{\task}[1]{\multicolumn{2}{@{}l}{\textbf{#1}}}
\newlength{\statuslen}
\settowidth{\statuslen}{\fbox{\textsc{in progress}}}
\begin{document}
\lipsum[11]
\begin{longtable}
{@{}>{\hspace*{3em}}l@{}
m{\textwidth-2\tabcolsep-\statuslen-3em}
l@{}}
\task{First Task} \\*
&\lipsum[13]
&\status{done} \\
\task{Second Task} \\*
&\lipsum[4]
&\status{in progress} \\
\task{Third Task} \\*
&\lipsum[10]
&\status{new} \\
\end{longtable}
\end{document}
The geometry
package is used only to frame the page and show the margins.
Another approach would be to just define your own custom environment. So, with the defintion of Task
below you would just use
\begin{Task}{<name>}{status}
text of task
\end{Task}
Code:
\documentclass{book}
\newcommand*{\TextA}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque scelerisque odio nec lorem dignissim ultricies. Quisque tristique turpis consectetur ligula bibendum vestibulum.}
\newcommand*{\TextB}{Aliquam tincidunt sapien vel odio consequat pulvinar. Donec laoreet cursus faucibus. Nam tincidunt malesuada arcu quis viverra. Vivamus eget quam ut justo mattis dignissim. Suspendisse convallis gravida consectetur. Nullam a nulla diam, in fringilla nulla. Sed at justo et lacus dapibus feugiat.}
\newcommand*{\LeftMargin}{0.5cm}%
\newcommand*{\RightMargin}{2.5cm}%
% http://tex.stackexchange.com/questions/588/how-can-i-change-the-margins-for-only-part-of-the-text
\def\ChangeMargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}%
\let\endChangeMargin=\endlist%
\newcommand{\status}[1]{\fbox{\textsc{#1}}}
\newenvironment{Task}[2]{%
\smallskip\par\noindent\textbf{#1}\hfill\status{#2}%
\ChangeMargin{\LeftMargin}{\RightMargin}%
\vspace{\dimexpr-\baselineskip+3pt\relax}%
}{%
\endChangeMargin\ignorespacesafterend%
}
\begin{document}
\noindent\TextB
\begin{Task}{First Task}{in progress}
\TextA
\end{Task}
\begin{Task}{Second Task}{in progress}
\TextB
\end{Task}
\begin{Task}{Third Task}{new}
\TextA
\end{Task}
\end{document}