Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
Check here ctan.org/tex-archive/info/symbols/comprehensive –  Sigur Feb 2 at 18:21
2  
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 at 7:59
2  
You should accept one of the answer. –  Svend Tveskæg Feb 17 at 20:56
3  
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 at 12:43
1  
This question is about half an years old and there are 4 good answers, please accept one of them!!! –  Christian Hupfer Jul 31 at 20:19

4 Answers 4

The package fontawesome provides a lot of useful symbols:

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

output

share|improve this answer
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 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,
  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.
share|improve this answer
\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

share|improve this answer
1  
Nice and short! –  Svend Tveskæg Feb 2 at 18:55
    
line cap of the arc must be round too. ;) –  percusse Feb 2 at 20:03
3  
@percusse: It is not sharp anymore and becomes safe for children. –  stalking is prohibited Feb 5 at 7:19

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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