Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am currently writing up some lecture notes and would like to have therefore a "\solution" environment which should work basically as the amsthm \proof environment, just writing "Solution." instead of "Proof." at the begin of a solution of an exercise. Of course I can achieve this by switching with

\renewcommand{\proofname}{Solution.}

resp.

\renewcommand{\proofname}{Proof.}

at the appropriate places. While this is working, I would find it nice to have a proper \solution environment which just replicates the \proof environment. Is there an easy way to do this?

share|improve this question
1  
Welcome to TeX.SX –  Papiro Jul 12 '13 at 3:23
add comment

1 Answer

up vote 6 down vote accepted

Yes, there's an easy way. You can define your solution environment with "Solution" as the optional argument for proof:

\documentclass{article}
\usepackage{amsthm}

\newenvironment{solution}
  {\begin{proof}[Solution]}
  {\end{proof}}

\begin{document}

\begin{proof}
test.
\end{proof}

\begin{solution}
test.
\end{solution}

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.