Where do I find the on/off symbol of electronics?
Asked
Active
Viewed 7,300 times
4 Answers
17
The package fontawesome provides a lot of useful symbols:
% arara: lualatex
\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\faOff
\end{document}

Svend Tveskæg
- 31,033
Marco Daniel
- 95,681
-
2The
fontawesomepackage contains a\faoffor\faicon{off}command for this. It is an OpenType font, so that you needfontspecand xelatex or lualatex to use it. Maybeotftotfmandcfftot1, from the LCDF type tools, might allow to obtain a type 1 version usable with (pdf)latex. – Bernard Feb 02 '14 at 18:50
11
\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}

kiss my armpit
- 36,086
-
1
-
-
3@percusse: It is not sharp anymore and becomes safe for children. – kiss my armpit Feb 05 '14 at 07:19
11
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,
radius=\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
arcuses 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.
Heiko Oberdiek
- 271,626
10
You can drawing it yourself using PSTricks.
With 'sharp' corners:
\documentclass{article}
\usepackage{pstricks-add}
\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}
\usepackage{pstricks-add}
\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}

Svend Tveskæg
- 31,033

applekeysprovides\powerwhich is similar. – Werner Feb 02 '14 at 18:35