| 1 | initial version |
The problem is your definition of the example environment, not sagecommandline itself. In order to correct it, you can use the more standard definition that uses the amsthm package:
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{example}{Example}
However, if you really want to keep your current definition, your can surround any part of the text (the sage output, for example) with \bgroup\normalfont and \egroup; however, this is less elegant.
My suggestion is to use amsthm. You can fine-tune every aspect for your environments, and even define new style for common ones.
I hope this helps!
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.