Symbol at the end of an environment [duplicate]

I'm putting a diamond symbol at the of a remark by use of

\usepackage{amsthm}

...

\newenvironment{rem}{\begin{remark}}{\hfill$\diamond$\end{remark}}

However when the rem environment is finished with a math display mode, the diamond will be placed at the end of a new line. I would prefer that it is placed on the line of the equation.

How is this possible?

marked as duplicate by egreg environments StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 21 '15 at 17:49

• Off topic: usually we use remark as a theorem like environment defined with \newtheorem{remark}{Remark}. – Sigur May 21 '15 at 17:50
• Welcome to TeX.SX! As you see, the question has already been asked before; don't worry, it happens to new users and I knew what to look for. I obviously recommend my solution. ;-) (Use \qedhere in the case you mention.) If you have remarks, please add them as comments here. – egreg May 21 '15 at 17:50
• @Sigur If you use \qedhere in the display. The alternative is ntheorem, which I don't like at all. – egreg May 21 '15 at 17:54
• @egreg: off-topic comment: Why do you not like ntheorem? Any particular issues in setup/typography? (Asking as a non-user of it) – user31729 May 21 '15 at 18:19