I want to define a new environment that will take a text argument, and use it as a title.
\documentclass{article}
\usepackage{amsthm}
\newenvironment{titleproof}
{\begin{proof} \textbf{Title of the Proof} \newline}
{\vspace*{0.5\baselineskip} \end{proof}}
\begin{document}
\begin{titleproof}
Here is my proof.
I want to be able to write something like ``begin\{titleproof\}\{New Title\}''
to customize the title of each different proof.
\end{titleproof}
\end{document}
CLARIFICATION
I want to be able to do this in general, not just for the proof environment. Here is a more clear MWE:
\documentclass{article}
\newenvironment{titleenv}
{\textbf{Title of the Environment} \newline}
{\vspace*{0.5\baselineskip}}
\begin{document}
\begin{titleenv}
Here is my environment.
I want to be able to write something like ``begin\{titleenv\}[New Title]''
to customize the title of each different proof.
\end{titleenv}
\end{document}


proofas an example... I guess it was a bad choice! Please see the clarification in my question. – jamaicanworm Mar 10 '12 at 22:09\newenvironment{foo}[2]{\textbf{#1} \newline}{}and then do\begin{foo}[This is my title], for some reason it bolds the[then does a new line. (In other words, it is treating[as the argument instead ofThis is my title.) – jamaicanworm Mar 10 '12 at 22:31\begin{foo}to be the name of a command; the[2]means that you're requiring two arguments in braces. – egreg Mar 10 '12 at 22:34