# How do I adjust the placement of descriptions I've made alongside enumerated statements within a boxed theorem environment?

Basically, what I'd like is to have an elegant command that would enable descriptions (commutativity, associativity, etc.) made alongside enumerated statements to be aligned to the far right side of the grey box that is surrounding my theorem environment. I would appreciate any code or suggestions that would resolve this matter.

This is the output I get from the minimal code below the image:

    \documentclass[english,nohyper]{tufte-handout}
\usepackage{amsthm}
\usepackage{amsmath}

\usepackage{enumitem}       % customizable list environments
\newtheorem{thm}{\protect\theoremname}

\usepackage{framed} % responsible for creating gray box around environment
\providecommand{\theoremname}{Theorem}

\begin{document}
\begin{snugshade} % begins gray box around thm
\begin{thm}
let so and so be, then:
\begin{enumerate}[labelindent=0pt,leftmargin=*,widest= a,label=\textup{\textbf{(\alph*)}}]
\item $A+B=B+A\quad\text{commutativity}$
\item $A+\left(B+C\right)=\left(A+B\right)+C\quad\text{associativity}$
\item $O+A=A+O=A\quad\text{identity}$
\item $A+\left(-A\right)=O\quad\text{inverse}$
\end{enumerate}
\end{thm}
\end{snugshade} % ends gray box around thm
\end{document}

-

Instead of \quad, use \hspace{\fill}:

\documentclass[english,nohyper]{tufte-handout}
\usepackage{amsthm}
\usepackage{amsmath}

\usepackage{enumitem}       % customizable list environments
\newtheorem{thm}{\protect\theoremname}

\usepackage{framed} %creates gray box around environment
\providecommand{\theoremname}{Theorem}

\begin{document}
\begin{thm}
let so and so be, then:
\begin{enumerate}[labelindent=0pt,leftmargin=*,widest= a,label=\textup{\textbf{(\alph*)}}]
\item $A+B=B+A \hspace{\fill}\text{commutativity}$
\item $A+\left(B+C\right)=\left(A+B\right)+C \hspace{\fill}\text{associativity}$
\item $O+A=A+O=A \hspace{\fill}\text{identity}$
\item $A+\left(-A\right)=O\hspace{\fill}\text{inverse}$
\end{enumerate}
\end{thm}
\end{document}


Update As suggested by Chris (cmhughes), you can use elegant mdframed package for putting frames etc, and it is highly customizable.. Check out the mdframed manual and some examples by running texdoc mdframed from command prompt. Here is a minimal example using mdframed:

\documentclass[english,nohyper]{tufte-handout}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{enumitem}       % customizable list environments
\newtheorem{thm}{\protect\theoremname}
\usepackage[framemethod=default]{mdframed}
\usepackage{framed} % responsible for creating gray box around environment
\providecommand{\theoremname}{Theorem}
\mdfdefinestyle{theoremstyle}{%
linecolor=red,linewidth=.5pt,%
frametitlerule=true,%
frametitlebackgroundcolor=gray!30,
backgroundcolor=gray!10,
innertopmargin=\topskip,
}
\newenvironment{mdthm}
{\begin{mdframed}[style=theoremstyle]\begin{thm}}
{\end{thm}\end{mdframed}}

\begin{document}
\begin{mdthm}
let so and so be, then:
\begin{enumerate}[labelindent=0pt,leftmargin=*,widest=a,label=\textup{\textbf{(\alph*)}}]
\item $A+B=B+A\hspace{\fill}\text{commutativity}$
\item $A+\left(B+C\right)=\left(A+B\right)+C\hspace{\fill}\text{associativity}$
\item $O+A=A+O=A\hspace{\fill}\text{identity}$
\item $A+\left(-A\right)=O\hspace{\fill}\text{inverse}$
\end{enumerate}
\end{mdthm}

\mdtheorem[style=theoremstyle]{thmm}{Theorem}
Another style with some change:
\begin{thmm}[\normalfont let so and so be, then:]
\begin{enumerate}[labelindent=0pt,leftmargin=*,widest= a,label=\textup{\textbf{(\alph*)}}]
\item $A+B=B+A \hspace{\fill}\text{commutativity}$
\item $A+\left(B+C\right)=\left(A+B\right)+C \hspace{\fill}\text{associativity}$
\item $O+A=A+O=A \hspace{\fill}\text{identity}$
\item $A+\left(-A\right)=O\hspace{\fill}\text{inverse}$
\end{enumerate}
\end{thmm}
\end{document}


-
This is just what I needed. Thank you very much. –  Black Milk Oct 18 '12 at 23:10
@EdwinMontufar Glad it helped. In this site, thanks are better conveyed by upvoting the answers and accepting those answers (by clicking the green check below vote count) which helped you most. This is our tradition here :) –  Harish Kumar Oct 18 '12 at 23:14
+1 I completely misunderstood the question :) could you put a solution using mdframed and ditch the framed package? –  cmhughes Oct 18 '12 at 23:18
@cmhughes: Thank you :) MWE added for mdframed :) –  Harish Kumar Oct 18 '12 at 23:57