In my document I wish to provide example questions with solutions. I am currently doing this using the amsthm package as follows:
\documentclass{article}
\usepackage{lmodern}
\usepackage{amssymb,amsthm}
\newtheoremstyle{examplesty} % Name
{} % Above skip
{} % Below skip
{\upshape} % Body font
{} % Indent
{\bfseries} % Head font
{} % Head body punct
{1em} % Space after head
{} % Heading
% Examples rejig the theorem environment
\theoremstyle{examplesty}
\newtheorem{example}{Example}[section]
% Solutions use a modified proof environment
\newenvironment{solution}
{\let\oldqedsymbol=\qedsymbol
\renewcommand{\qedsymbol}{$\blacktriangleleft$}
\begin{proof}[\bfseries\upshape Solution]}
{\end{proof}
\renewcommand{\qedsymbol}{\oldqedsymbol}}
\begin{document}
\section{Test Section}
\begin{example} This is an example problem \end{example}
\begin{solution} This is a solution to an example problem. \end{solution}
\end{document}
My problem is that the spacing between the headings and bodies is different for examples and solutions. Moreover, solutions have a period after them, which looks odd. Is it possible to rectify these issues or am I guilty of trying to hammer in a nail with an old shoe?