# How to create and use the "for wizards only" symbol as in the TeXbook?

How to create a symbol like the one used in the TeXbook for designating material that is for wizards only, circled in red in the image below, only with an arbitrary English alphabet letter instead of the zigzag (I'd like to be able to determine ad-hoc which letter will be displayed)? And how to insert this symbol at the beginning of paragraphs of my choosing, in a similar fashion as done in the TeX book?

• Seem that this symbol is available through the package manfnt Jul 7 at 11:24
• For reference, this is generally known as the (Bourbaki) dangerous bend symbol. Jul 7 at 11:44
• @vipa I am agree totally with you (the command is \dbend). Jul 7 at 11:55

Nowadays you would make something like that in TikZ. I don't use it on a regular basis so there will surely be better ways, but here is an idea:

\documentclass{article}

\usepackage{tikz}

\newcommand{\mydangersymbol}[1]{%
\begin{tikzpicture}[baseline=(x.base)]
\draw[rounded corners=.01em] (-.05em,-1.3em)rectangle(.05em,.9em);
\draw[fill=white,rounded corners=1] (0,.8em)--(.8em,0)--(0,-.8em)--(-.8em,0)--cycle;
\draw[very thick,line cap=round](-.3em,-1.3em)--(.3em,-1.3em);
\node(x) at (0,0em) {\normalfont\sffamily\small#1};
\end{tikzpicture}%
}

\newenvironment{mydanger}[1]{%
\par\medskip\noindent
\sbox0{\mydangersymbol{#1}\space}%
\hangindent\wd0
\parindent\hangindent
\hangafter=-2
\smash{\llap{\box0}}%
\small
\ignorespaces
}{\par\smallskip}

\begin{document}

The symbol \mydangersymbol{A} is used to indicate an anecdote,
whereas the symbol \mydangersymbol{C} is used to indicate a caveat.
Note that using these symbols inline will cause horrible spacing.
\begin{mydanger}{A}
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
\end{mydanger}
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
\begin{mydanger}{C}
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.
Lorem ipsum dolor sit text to fill the line.

And a new paragraph within this \texttt{mydanger}
environment to show what happens when you have
more than one paragraph.
\end{mydanger}

\end{document}


• Could it be possible that the content of mydanger remains always at the right of the "sign"? Jul 7 at 11:48
• Very nice answer. :-) Jul 7 at 11:56
• @projetmbc Thanks for the edit (copy/paste slip). As far as your question goes, the probably easiest way would be to use a list and put the box with the symbol in the optional argument to \item. Jul 7 at 11:59
• Thanks! But what if I want to use the symbol inline, for instance in order to explain what the symbol is, as in: the symbol \mydanger{A} is used to indicate an anecdote, whereas the symbol \mydanger{C} is used to indicate a caveat? Jul 7 at 12:12
• @EvanAad See edit. However, given the fact that the symbol spans roughly two lines of text, using it inline doesn't look pretty... Jul 7 at 13:35

See page 44 in the texbook: