As Werner told you, it is not clear if you like to have a problem
environment or only a new environment which substitutes the equation*
and gathered
ones. I've done them both (I called the latter eqga
).
I have also added these lines (credits to Paulo Cereda):
\newtheoremstyle{mystyle}% name
{3pt}% space above
{3pt}% space below
{}% body font
{}% indent amount
{\bfseries}% theorem head font
{)\newline}% punctuation after theorem head
{.5em}% space after theorem head
{}% theorem head spec
\theoremstyle{mystyle}
to have the problem
style as you indicated in your question, but I prefer the classical layout with the dot at the end of the number, just remove the above lines and uncomment this one:
%\theoremstyle{definition}
to look at it.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
% code from: https://tex.stackexchange.com/a/26116/101651 (slightly modified)
\newtheoremstyle{mystyle}% name
{3pt}% space above
{3pt}% space below
{}% body font
{}% indent amount
{\bfseries}% theorem head font
{)\newline}% punctuation after theorem head
{.5em}% space after theorem head
{}% theorem head spec
\theoremstyle{mystyle}
%\theoremstyle{definition}
\newtheorem{problem}{Problem}
\newenvironment{eqga}{%
\begin{equation*}
\begin{gathered}
}{%
\end{gathered}
\end{equation*}
}
\begin{document}
\begin{problem}
Description of the problem
\begin{eqga}
\int_{-\infty}^{\infty} f(x) dx \\
\end{eqga}
\end{problem}
\begin{proof}
A well thought out proof
\end{proof}
\begin{problem}
Description of another problem
\end{problem}
\begin{proof}
Another well thought out proof
\end{proof}
\end{document}
problem
should be automated? For example, if you write\begin{problem}
...\end{problem}
without adding anything inbetween, what should the output look like?