12

Where do I find the on/off symbol of electronics?enter image description here

16

The package fontawesome provides a lot of useful symbols:

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

output

  • 2
    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
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}

Result

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.
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}

enter image description here

  • 1
    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
  • 3
    @percusse: It is not sharp anymore and becomes safe for children. – kiss my armpit Feb 5 '14 at 7:19
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}

output1

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}

output2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.