# Denoting the end of example/remark

What is the etiquette to denote the end of an example or remark? For proofs, it's the QED symbol (white box). I know it's not necessary for everyone, but I would like to use it to break up the text a little. What should I use? A circle or filled box or what?

-
Why not the same QED symbol? –  Emre Apr 23 '11 at 16:18
I already use it for proofs so I don't want to use it for anything else. –  P.A Apr 24 '11 at 10:33

I think this is totally a matter of personal style. If you are using \qed already you could use a similar symbol like \triangle.

Whatever you do, don't just use \hfil$\triangle$ because this does not work when your example fills the last line completely. Here is a definition of \demo that uses the flexible \xqed:

\documentclass{minimal}
\usepackage[utf8]{inputenc}

\newcommand\xqed[1]{%
\leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill
\newcommand\demo{\xqed{$\triangle$}}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
\demo
\end{document}


The manfnt font also provides also a filled triangle pointing to the right. After declaring \font\manual=manfnt you can use \manual\char'170.

-
Thanks, I'll try it out and get back. Maybe I'll use a different shape than a triangle though. –  P.A Apr 24 '11 at 9:17
The triangle pointing the right looks as though it is a link to somewhere else. What specifically is it supposed to denote? –  brannerchinese Apr 24 '11 at 9:34
@brannerchinese I had no specific meaning in mind, it is just one of the lesser known symbols in the standard fonts. I agree that it suggests a continuation and as such is not appropriate for denoting the end of a section. –  Christian Lindig Apr 24 '11 at 9:49
This is perfect. Thank you! –  P.A Apr 24 '11 at 10:40
If I have an equation as the last line in my example, unfortunately the character appears a few lines before my last line. Is there a way to change that? I tried putting the \demo before the end of equation, but that makes the symbol not align properly. –  P.A Apr 24 '11 at 11:01

Try the following indirect method (requires amsthm):

\newtheorem{examplex}{Example}
\newenvironment{example}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\triangle$}\examplex}
{\popQED\endexamplex}


In this way also \qedhere works exactly like in proof.

-
Seems there's a couple of syntax problems here. (Feel free to remove this comment when fixed.) –  badroit Jul 17 '12 at 16:35
@badroit Thanks! A brace too much. Fixed. –  egreg Jul 17 '12 at 18:25

The very useful thmtools package has a key for defining the qed-symbol. For example, I use the following in my documents:

\usepackage{amsthm,thmtools}
\theoremstyle{remark}
\declaretheorem[name=Example,qed={\lower-0.3ex\hbox{$◃$}}]{Ex}

...

\begin{Ex}
The numbers 2, 3 and 5 are all prime.
\end{Ex}


(I use unicode-math to be able to use the ◃ symbol directly. Just replace it by whatever symbol you like, e.g. \triangleleft.)

Everything is set up correctly so that you can use \qedhere like in a standard amsthm proof environment.

-

Maybe you’ll like to use the {leftbar}-environment?

\documentclass{minimal}
\usepackage{framed}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
\begin{leftbar}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
\end{leftbar}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
\end{document}


If you like it I can show an extended example with a colored bar, no indention of first line an support for floating objects in the environment.

-
Thanks very much, I'll try it out and get back. –  P.A Apr 24 '11 at 9:17