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 was wondering if there was an easy set of code that allows the standard \begin{example} \end{example} environment in amsthm to have the extra feature that it right-aligns a \clubsuit at the end of the example? Similarly, I would like to perform the exact same modification to the remark environment but with a \diamond instead of a \clubsuit.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You may want to check out the ntheorem package. A couple of examples lifted from page 17 of the documentation that can be customized:

enter image description here

\documentclass{article}
\usepackage[thmmarks]{ntheorem}
\theoremstyle{change}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\clubsuit}}
\theoremseparator{}
\newtheorem{example}{Example}

\theoremstyle{change}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\diamondsuit}}
\theoremseparator{}
\newtheorem{remark}{Remark}

\theoremheaderfont{\scshape}\theorembodyfont{\upshape}
\theoremstyle{nonumberplain}
\theoremseparator{:}
% \theoremsymbol{\rule{1ex}{1ex}}
% for tohecz
\theoremsymbol{\makebox[7.7778pt][c]{\rule{1ex}{1ex}}}
\newtheorem{Proof}{Proof}

\begin{document}

\begin{example}
Here's an example
\end{example}

\begin{remark}
Here's a remark
\end{remark}

\begin{Proof}
Here is a proof
\end{Proof}

\end{document}
share|improve this answer
    
Thank you very much! I am having a little difficulty fixing a problem. I copied and pasted the code into my file and when I tried to compile I got the error "##1\ ##2\ (##3)\theorem@separator]}" and when I click 'go to error' it takes me to a .sty file which is "locked". I apologize for asking what is, perhaps, a very stupid question, I am just absolutely over my head when I get into anything non-superficial with tex. Thank you so much! –  Alex Youcis Feb 23 '13 at 8:05
    
Update: So after looking at the documentation it appears that I have to remove amsthm to apply this package. I did so, but then got errors on all of my \begin{proof}. I don't know how to fix it? Thanks! –  Alex Youcis Feb 23 '13 at 8:09
1  
Hi Alex, I'm sorry but it's hard to tell what might be causing your error. If you could post a Minimal Working Example (MWE) that might help to figure out what is causing the error (although I know very little about the ntheorem package outside of what I posted. –  Scott H. Feb 23 '13 at 8:10
    
I don't think that ntheorem comes with a predefined proof environment, you may need to create one yourself. See the updated code. –  Scott H. Feb 23 '13 at 8:15
2  
+1 I don't like ntheorem but this works pretty good. Just one idea: the black squeare should be centered below the two suits, so that the result is more visually appealing ;) –  tohecz Feb 23 '13 at 9:21
show 1 more 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.