# Looking for symbol: Shield

I am looking for a "Shield" symbol:

I already perused the Comprehensive Latex Symbol List, with the closest fit being \dsheraldical from the dictsym package, which is however non-satisfactory because of the diagonal bar - I need both the symbol itself and a strike-through version of the symbol, and that doesn't look good with \dsheraldical.

I also tried Detexify, but either my drawing skills suck or such a symbol simply doesn't exist.

Any suggestions - either for where to find that symbol, or how to "create" it through other ways?

EDIT: Building on Jake's answer, my solution looks like this:

\usepackage{tikz}

% Smaller than Jake's version, which was much larger than other symbols
\newcommand\shield{ \tikz [baseline] \draw (0,1.5ex) -- (0,0.75ex) arc [radius=0.5ex, start angle=-180, end angle=0] -- (1ex,1.5ex) -- cycle; }
% Strikethrough version of the same symbol
\newcommand\struckshield{ \tikz [baseline] \draw (0,1.5ex) -- (0,0.75ex) arc [radius=0.5ex, start angle=-180, end angle=0] -- (1ex,1.5ex) -- cycle (0,0) -- (1.0ex,1.75ex); }


Look, Ma, I can do TikZ! :-)

-
You can draw it using TikZ and define it as a macro. It is also possible to make your own font with it, see Create a symbol font from SVG symbols. –  Martin Scharrer Dec 19 '11 at 8:39

You could, of course, use TikZ for this:

The symbol will scale with your font size, since it uses ex to define the path.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\newcommand\shield{%
\tikz [baseline] \draw (0,1.75ex) -- (0,0.75ex) arc [radius=0.75ex, start angle=-180, end angle=0] -- (1.5ex,1.75ex) -- cycle;%
}

A shield: \shield
\end{document}


If you're feeling fancy, you could parametrise it a bit:

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
\newcommand\shield[1][]{%
\tikzset{
shield width/.store in=\shieldwidth,
shield width=1.5ex,
shield height/.store in=\shieldheight,
shield height=1.75ex
}%
\tikz [baseline,#1] \draw (0,\shieldheight) -- (0,\shieldwidth/2) arc [radius=\shieldwidth/2, start angle=-180, end angle=0] -- (\shieldwidth,\shieldheight) -- cycle;%
}

A shield: \shield

A wide shield: \shield[shield width=2ex]

A tall shield: \shield[shield height=3ex]
\end{document}

-
You could make a new box for the shield, save the tikz shield inside that, and define a new command \shield which just copies that box. I guess it'd be a bit lighter that way if the shield is used frequently. –  morbusg Dec 19 '11 at 8:50
@morbusg: That sounds like a good idea, but I've never done anything with boxes. Would you care to add a new answer or edit this one to show how to do that? –  Jake Dec 19 '11 at 8:54
Jake, @morbusg: Also check out my storebox package which takes care that such repeated content is only stored once in the output PDF. However, for a small drawing like this it might not be that important. –  Martin Scharrer Dec 19 '11 at 9:06
It could just be something like: \newbox\shieldbox\setbox\shieldbox=\hbox{\tikz\draw<...>}\def\shield{\copy\shie‌​ldbox} and after that one could use it with \shield. –  morbusg Dec 19 '11 at 9:50
You should use \usebox instead of \copy to make sure horizontal mode is entered first. –  Martin Scharrer Dec 19 '11 at 9:54

There is another way to do that: in the milstd package there is a symbol (in fact a rotated logical AND gate), which in fact has a completely different signification, but looks like what you need: \ANDd:

-
Ah, nice, that's the way to go. How did you find that? –  Jake Dec 19 '11 at 9:43
@Jake: Got good visual memory. ;) –  Count Zero Dec 19 '11 at 9:45
Bwahahaha... VERY nice. Wouldn't have thought of that. :-D –  DevSolar Dec 19 '11 at 10:32
For the record: It's this milstd package by Rick Simpson, not the other milstd package by Kent McPherson which I tried first and failed :-) –  diabonas Dec 19 '11 at 12:53
@diabonas: Thanks' I wasn't aware there were two of them... I added the link to my answer, hope it's ok. :) –  Count Zero Dec 19 '11 at 21:36

Another Package of use can be: PSTricks -> pst-circ

Logical circuit symbols can be found in Chapter 3 under the Contents.

-