# Where can I find on/off symbol?

Where do I find the on/off symbol of electronics?

-
–  Sigur Feb 2 '14 at 18:21
Is it really still appropriate to always link to ctan.org/tex-archive/info/symbols/comprehensive ? The document is outdated by five years. Nowadays, with unicode, fontspec, and also TikZ we have more options than looking it up there and loading packages. –  Ingo Feb 3 '14 at 7:59
You should accept one of the answer. –  Svend Tveskæg Feb 17 '14 at 20:56
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Jubobs Mar 28 '14 at 12:43
This question is about half an years old and there are 4 good answers, please accept one of them!!! –  Christian Hupfer Jul 31 '14 at 20:19

The package fontawesome provides a lot of useful symbols:

% arara: lualatex
\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\faOff
\end{document}


-
The fontawesome package contains a \faoff or \faicon{off} command for this. It is an OpenType font, so that you need fontspec and xelatex or lualatex to use it. Maybe otftotfm and cfftot1, from the LCDF type tools, might allow to obtain a type 1 version usable with (pdf)latex. –  Bernard Feb 2 '14 at 18:50

And a tikz solution that can also be used as standalone symbol graphics:

\documentclass{standalone}
\usepackage{tikz}

\newlength\unit
\setlength{\unit}{20pt}

\begin{document}
\begin{tikzpicture}[
x=\unit,
y=\unit,
line width=.4\unit,
line cap=round,
]
\draw[overlay]
(0,1.2) -- (0,0)
(130:1) [overlay] arc[start angle=130, delta angle=280]
;
\path[use as bounding box] (-1.2,-1.2) (1.2,1.4);
% arc is is taking the points of the internally used Bézier
% curves into account for the bounding box
\end{tikzpicture}
\end{document}


Remarks:

• The bounding box is specified separately, because arc uses the points of the internally used Bézier curve for the bounding box.
• I have used rounded line caps, they look better for my taste.
-
\documentclass[pstricks,border=12pt]{standalone}

\begin{document}
\begin{pspicture}[linewidth=1,linecap=1](6,6)
\psarc(3,3){2.5}{125}{55}
\psline(3,3)(3,5.5)
\end{pspicture}
\end{document}


-
Nice and short! –  Svend Tveskæg Feb 2 '14 at 18:55
line cap of the arc must be round too. ;) –  percusse Feb 2 '14 at 20:03
@percusse: It is not sharp anymore and becomes safe for children. –  kiss my armpit Feb 5 '14 at 7:19

You can drawing it yourself using PSTricks.

With 'sharp' corners:

\documentclass{article}

\newcommand*\OnOff[1]{%
\begin{pspicture}(6,6.5)
\psset{
dimen = middel,
linecolor = #1,
fillstyle = solid,
fillcolor = #1
}
\psRing(3,3)[125,55]{2}{3}
\psarc(3,3){0.5}{180}{360}
\psframe(2.5,3)(3.5,6)
\psarcn(3,6){0.5}{180}{0}
\end{pspicture}}

\begin{document}

\begin{center}
\OnOff{black}
\OnOff{blue}
\OnOff{red}
\OnOff{yellow}
\end{center}

\end{document}


With 'round' corners:

\documentclass{article}

\newcommand*\OnOff[1]{%
\begin{pspicture}(6,6.5)
\psset{
dimen = middel,
linecolor = #1,
fillstyle = solid,
fillcolor = #1
}
\psarc(!3 2.5 130 cos mul add 3 2.5 130 sin mul add){0.5}{310}{130}
\psRing(3,3)[130,50]{2}{3}
\psarc(!3 2.5  50 cos mul add 3 2.5  50 sin mul add){0.5}{50}{230}
\psarc(3,3){0.5}{180}{360}
\psframe(2.5,3)(3.5,6)
\psarcn(3,6){0.5}{180}{0}
\end{pspicture}}

\begin{document}

\begin{center}
\OnOff{black}
\OnOff{blue}
\OnOff{red}
\OnOff{yellow}
\end{center}

\end{document}


-