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.

I looked all over but could not find anything. Is there a package out there that has a symbol/dingbat of a calculator? I know there probably isn't, but I've seen much stranger stuff out there before...

share|improve this question
    
What will be the output size/usage of this? –  Werner Jan 4 '12 at 23:39
    
about 1 cm, doesnt really have to be anything fancy, just wanted to know if one exists. i looked through every list of symbols i know about and didnt find anything. i just need a small calculator on a few pages of a document to be combined with a few other components of tikz and i was trying to avoid something external. –  grizzilus Jan 4 '12 at 23:55
    
I think one might have to resort to "something external". For example, in general, what level of detail in terms of a calculator would one be interested in. Is "something external" an option? –  Werner Jan 5 '12 at 0:40

7 Answers 7

up vote 27 down vote accepted

There are three different calculator symbols available at The Noun Project:


Calculator symbols by The Noun Project and Scott Lewis, from The Noun Project.

The first two are published under Creative Commons - Attribution (CC BY 3.0), the third one under Creative Commons CC0 - No Rights Reserved.

I think Martin Scharrer was at some point thinking about turning this fabulous icon collection into a package, but I don't know what the status on this is; there might have been some licensing issues.

You'll have to convert the SVG files into some format that LaTeX can work with, e.g. with IrfanView. Then I recommend a \newcommand that embeds the images with a height in ex, so that it'll be scaled according to the current font size, something like this:

\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe} % Just for the demo image
\newcommand{\mysymbol}{\protect\includegraphics[height = 1.5ex]{example-image-a}}
\begin{document}
\tableofcontents
\section{Foo \mysymbol\ bar}
{\Huge Bar baz \mysymbol!}

Foo bar baz \mysymbol\ baz bar foo.

{\tiny Baz bar \mysymbol?}
\end{document}

output

share|improve this answer
    
thanks for the link! found something here that worked really well. thank you! –  grizzilus Feb 21 '12 at 21:17
1  
i thought i did it before, definitely did now... –  grizzilus Mar 16 '12 at 6:00
    
@doncherry can you please put the code of calculator svg/converted format image with \newcommand that embeds the images with a height in ex? that would be great. –  doctorate Apr 17 '13 at 17:05
    
@doctorate See my edit. –  doncherry Apr 17 '13 at 17:28
    
@doncherry, +1 for the code, thanks a lot. It worked when converted to pdf not in svg format though, can it be directly from svg format? –  doctorate Apr 17 '13 at 17:53

My calculator :

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc} 
\usepackage[upright]{fourier}
\usepackage[pdftex,usenames,dvipsnames]{xcolor}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{shapes,matrix,backgrounds}%

\begin{document}
\newcommand*{\grbl}{green!30!black}

\tikzstyle{ButtonRect}=[minimum width   = 1.2 cm,
                        minimum height  = 16 pt,
                        rounded corners = 8 pt] 

\tikzstyle{ButtonCircle}=[circle, minimum height   = 20pt]
\tikzstyle{ButtonEllipse}=[ellipse,
                           inner sep        = 0pt,
                           minimum height   = 16pt,
                           minimum width    = 1cm]


\newcommand*{\button}[3]{
\begin{tikzpicture}
\node[line width=.6pt,
      color=black,draw,#2,
      fill=#3,text=white](T){\footnotesize\textsf{#1}};
\end{tikzpicture}}

\tikzstyle{background rectangle}=
[ultra thick,draw=black,fill=SeaGreen!40,rounded corners=12pt]
\begin{tikzpicture}[label distance=-1.5pt,outer sep=0pt,%
  text = white,show background rectangle]%

\matrix [matrix of  nodes](M1)
{\button{F1}{ButtonCircle,label={[red]90:\tiny \textsf{Trace}}}{\grbl}
&\button{F2}{ButtonCircle,label={[red]90:\tiny \textsf{Zoom}}}{\grbl}
&\button{F3}{ButtonCircle,label={[red]90:\tiny \textsf{V-Window}}}{\grbl}
&\button{F4}{ButtonCircle,label={[red]90:\tiny \textsf{Sketch}}}{\grbl}
&\button{F5}{ButtonCircle,label={[red]90:\tiny \textsf{G-Solv}}}{\grbl}
&\button{F6}{ButtonCircle,label={[red]90:\tiny \textsf{G$\leftrightarrow$T}}}{\grbl}%
\\
 \button{\tiny SHIFT}{ButtonEllipse, minimum width = 30pt}{Goldenrod}
&\button{\tiny OPTN}{ButtonEllipse}{RoyalBlue}
&\button{\tiny VARS}{ButtonEllipse,label={[red]90:\tiny \textsf{PRGM}}}{RoyalBlue}
&\button{\tiny MENU}{ButtonEllipse,
   label={[red]90:\tiny \textsf{SET UP}}}{PineGreen!60}
&&&\\

\button{\tiny ALPHA}{ButtonEllipse,
  label={[red]above:\tiny \textsf{\fboxsep 0pt \fbox{A}-LOCK}}}{red!70!black}%
  &\button{$x^2$}{ButtonEllipse,label={[red]60: \textsf{r}},%
label ={[red]120:\tiny \textsf{$\sqrt{\ }$}}}{RoyalBlue}
&\button{$\bigwedge$}{ButtonEllipse,label={[red]60: \textsf{$\scriptstyle{\othertheta}$}},%
label ={[red]120:\tiny \textsf{$\root x \of{\ }$}}}{RoyalBlue}
&\button{\tiny EXIT}{ButtonEllipse,label={[red]90:\tiny \textsf{QUIT}}}{RoyalBlue}
& &\\

 \button{\tiny X,$\othertheta$,T}%
             {ButtonEllipse,label={[red]60:\tiny \textsf{A}}}{RoyalBlue}%
&\button{log}{ButtonEllipse,label={[red]60:\tiny \textsf{B}},%
label ={[red]100:\tiny \textsf{$\text{10}^x$}}}{RoyalBlue}
&\button{ln}{ButtonEllipse,label ={[red]60:\tiny \textsf{C}},%
label ={[red]120:\tiny \textsf{$\text{e}^x$}}}{RoyalBlue}
&\button{sin}{ButtonEllipse,label={[red]60:\tiny \textsf{D}},%
label ={[red]100:\tiny \textsf{Asn}}}{RoyalBlue}
&\button{cos}{ButtonEllipse,label={[red]60:\tiny \textsf{E}},%
label ={[red]100:\tiny \textsf{Acs}}}{RoyalBlue}
&\button{tan}{ButtonEllipse,label={[red]60:\tiny \textsf{F}},%
label ={[red]100:\tiny \textsf{Atn}}}{RoyalBlue}
\\

 \button{a+{\tiny b/c}}{ButtonEllipse,label={[red]60:\tiny \textsf{G}},%
label ={[red]100:\tiny \textsf{d/c}}}{RoyalBlue}
&\button{F$\leftrightarrow$D}{ButtonEllipse,label={[red]60:\tiny \textsf{H}}}{RoyalBlue}
&\button{(}{ButtonEllipse,label={[red]60:\tiny \textsf{I}},%
label ={[red]120:\tiny \textsf{$\root\text{\tiny\textsf{3}} \of{\ }$}}}{RoyalBlue}
&\button{)}{ButtonEllipse,label={[red]60:\tiny \textsf{J}},%
label ={[red]120:\tiny \textsf{$x^{ \text{\tiny\textsf{-1}}}$}}}{RoyalBlue}
&\button{\LARGE,}{ButtonEllipse,label={[red]60:\tiny \textsf{K}}}{RoyalBlue}
&\button{\large$\rightarrow$}{ButtonEllipse,label={[red]60:\tiny \textsf{L}}}{RoyalBlue}%
\\};

\matrix [matrix of  nodes,yshift=-2.5cm] at (M1.south)
{\button{\large 7}{ButtonRect,label={[red]60:\tiny \textsf{M}}}{\grbl}
&\button{\large 8}{ButtonRect,label={[red]60:\tiny \textsf{N}}}{\grbl}
&\button{\large 9}{ButtonRect,label={[red]60:\tiny \textsf{O}}}{\grbl}
&\button{\normalsize DEL}{ButtonRect,label={[red]90:\tiny \textsf{INS}}}{PineGreen!60}
&\button{\normalsize $\text{AC}^\text{\tiny /ON}$}{ButtonRect,label={[red]90:\tiny \textsf{OFF}}}{PineGreen!60}
\\
 \button{\large 4}{ButtonRect,label={[red]60:\tiny \textsf{P}}}{\grbl}
&\button{\large 5}{ButtonRect,label={[red]60:\tiny \textsf{Q}}}{\grbl}
&\button{\large 6}{ButtonRect,label={[red]60:\tiny \textsf{R}}}{\grbl}
&\button{\Large $\times$}{ButtonRect,label={[red]90:\tiny \textsf{\{ \hspace{14pt}S}}}{\grbl}
&\button{\Large $\div$}{ButtonRect,label={[red]90:\tiny \textsf{\} \hspace{14pt}T}}}{\grbl}
\\
 \button{\large 1}{ButtonRect,label={[red]60:\tiny \textsf{U}}}{\grbl}
&\button{\large 2}{ButtonRect,label={[red]60:\tiny \textsf{V}}}{\grbl}
&\button{\large 3}{ButtonRect,label={[red]60:\tiny \textsf{W}}}{\grbl}
&\button{\large $+$}{ButtonRect,label={[red]90:\tiny \textsf{[ \hspace{14pt}X}}}{\grbl}
&\button{\large $-$}{ButtonRect,label={[red]90:\tiny \textsf{] \hspace{14pt}Y}}}{\grbl}
\\
  \button{\large 0}{ButtonRect,label={[red]60:\tiny \textsf{Z}}}{\grbl}
&\button{\Huge .}{ButtonRect,label={[red]90:\tiny \textsf{= \hspace{8pt} SPACE}}}{\grbl}
&\button{\normalsize $\times\text{10}^x$}{ButtonRect,label={[red]90:\normalsize  \textsf{$\pi$}}}{\grbl}
&\button{\large$( - )$}{ButtonRect,label={[red]90:\tiny \textsf{ANS}}}{\grbl}
&\button{\normalsize EXE}{ButtonRect,label={[red]90:\tiny \textsf{$\hookleftarrow$}}}{blue!50!black}
\\
};
\node[fill=lightgray,draw,ultra thick,text width=7cm,yshift=1cm,rounded corners,text=black] at (M1.north) {\(\sin(1)\)\\\hfill \(0.841470984\)};
\end{tikzpicture}
\end{document} 

enter image description here

enter image description here

share|improve this answer
    
Beautiful in a large scale but in the small version the details are not appreciated. :-) –  azetina Jun 30 '12 at 16:01
    
@azetina It's possible because I created this picture without thinking to adapt it to a smaller size –  Alain Matthes Jun 30 '12 at 19:45

There are some awesome tikz calculators. I though I will try something different, a small calculator icon that will fit in text, and rescale with the font size.

\documentclass{article}
\usepackage{tikz}

\newcommand\calculator{\tikz{
\node (c) [inner sep=0pt, draw, fill=black, anchor=south west]{\phantom{N}};
\begin{scope}[x=(c.south east),y=(c.north west)]
   \fill[white] (.1,.7) rectangle (.9,.9);
   \foreach \x in {.1, .33, .55, .79}{
   \foreach \y in {.1, .24, .38, .53}{
   \fill[white] (\x,\y) rectangle +(.11,.07);}}
\end{scope}
}}

\def\calctest#1{\noindent#1 This: \calculator\ is a calculator\par}
\begin{document}
\calctest{\tiny}

\calctest{\normalsize}

\calctest{\large}

\calctest{\Huge}
\end{document}

The result is

Test of calculator icon

share|improve this answer
    
That's a nice calculator icon. For making TikZ drawings scale with the font size, I generally like to just use ex and em units in the drawing. These will automatically scale with the surrounding text.See, for example, tex.stackexchange.com/a/23454/2552 or tex.stackexchange.com/a/38758/2552 –  Jake Jan 12 '12 at 3:35
2  
@Jake: I did consider using ex and em, however, I rejected it for this reason: ex is the height of the lowercase x and em is the width of an uppercase M. There is no way to get the height of an uppercase character. Something like 1.75ex could work well in one font, but will be too tall or too short in another. That is OK for symbols like center of mass, but I wanted the calculator icon to have the same height as some typical uppercase letter, regardless of the font. –  Jan Hlavacek Jan 12 '12 at 3:46
    
Ah yes, that makes perfect sense. –  Jake Jan 12 '12 at 4:02

Since no font symbol of calculators exist (as far as I know), a colourful display is available from OpenClipArt Library:

OpenClipArt calculator OpenClipArt calculator OpenClipArt calculator

All the images, unless stated otherwise, are in the public domain as downloadable SVG or (lossy) PNG images.

For inclusion of SVG images in LaTeX, see How to include SVG diagrams in LaTeX? Alternatively, pdflatex supports native inclusion of PNG images.

share|improve this answer

enter image description here

The code:

\documentclass[a4paper,11pt]{article}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage{adjustbox}

\newcommand\ab[1]{\adjustbox{
padding=0ex 0ex 0ex 0ex,
margin=-.5ex -.5ex -.5ex -.5ex, 
valign=M, 
cfbox=blue!50!black!50 2pt, 
margin=-.7ex -1ex -1ex -.7ex,
cfbox=blue!30!black!70 2.5pt, 
bgcolor=cyan!10!white,
margin=0ex .5ex 0ex .5ex,
}{#1}}


\newcommand\bb[1]{\adjustbox{
padding=0ex 0ex 0ex 0ex,
margin=-.5ex -.5ex -.5ex -.5ex, 
valign=M, 
cfbox=blue!50!black!50 2pt, 
margin=-.7ex -1ex -1ex -.7ex,
cfbox=blue!30!black!70 2.5pt, 
bgcolor=blue!20!black!60,
margin=0ex .5ex 0ex .5ex,
}{#1}}



\newcommand\kb[1]{
\ab{
\begin{minipage}[c][1em][c]{1em}
\centering#1
\end{minipage}
}}


\newcommand\calculator[1]{
\raisebox{.5ex}{\resizebox{#1}{!}{
\fboxrule=1.5pt
\bb{
\sffamily\bfseries
\begin{tabular}{l@{}l@{}l@{}l@{~}l}
\vspace{-.3cm}\\
\multicolumn{3}{l}{\bb{\fcolorbox{black!40!green!60}{black!30!green!30}{\Large ~~~~0.73122}}} & & \kb{\scriptsize ON} \\
\vspace{-.4cm}\\
\kb{1} & \kb{2} & \kb{3} & & \kb{+} \\
\kb{4} & \kb{5} & \kb{6} & & \kb{--}  \\
\kb{7} & \kb{8} & \kb{9} & & \kb{=}  \\
\end{tabular}
}}}}


\newcommand\calicon[1]{
\raisebox{.5ex}{\resizebox{#1}{!}{
\fboxrule=1.5pt

\bb{
\sffamily\bfseries
\begin{tabular}{l@{}l@{}l@{}l@{~}l}
\vspace{-.3cm}\\
\multicolumn{3}{l}{\bb{\fcolorbox{black!40!green!60}{black!30!green!30}{\Large ~~~~~}}} & & \kb{\scriptsize } \\
\vspace{-.4cm}\\
\kb{} & \kb{} & \kb{} & & \kb{} \\
\kb{} & \kb{} & \kb{} & & \kb{}  \\
\kb{} & \kb{} & \kb{} & & \kb{}  \\
\end{tabular}
}}}}



\begin{document}


\noindent Poor man's calculators in poor \LaTeX{} without Ti\emph{k}Z: \\ 
\calicon{1em} \calculator{2em} 
\calicon{2em} \calculator{4em}
\calicon{4em} \calculator{8em}

\end{document}

\begin{minipage}[c]{1cm}
\begin{tabular}{c@{ }c}
$\div$&{--}\\
+&{\footnotesize M}\\
x&=\\
\end{tabular}

\end{minipage}

MWE2

A simpler coding with tcolorbox and menukeys packages:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{menukeys}
\usepackage[skins]{tcolorbox}
% http://tex.stackexchange.com/questions/96300/how-to-change-the-style-of-menukeys
\renewmenumacro{\keys}[>]{shadowedroundedkeys}
\begin{document}
Another poor man's calculator:

\begin{minipage}{14em}
\tcbset{colback=red!5!white,colframe=red!75!black,coltitle=blue!50!black,
fonttitle=\bfseries}
\begin{tcolorbox}
[skin=widget,
boxrule=.3mm,
bottomrule=.75mm,rightrule=.75mm,
coltitle=red,
colframe=black!65!white,
colback=blue!15!white,
width=(.9\linewidth),before=\hfill,after=\hfill,
interior style={left color=gray!40!white,right color=blue!10!white},
adjusted title={
\renewmenumacro{\keys}[>]{roundedkeys}
\sffamily \keys{~~~~~~0.123456}    \hfill
\renewmenumacro{\keys}[>]{typewriterkeys}
  \keys{On}    }]
\keys{1} \keys{2} \keys{3}~~\keys{{+}}\keys{/} \\
\keys{4} \keys{5} \keys{6}~~\keys{--}\keys{{$\times$}} \\
\keys{7} \keys{8} \keys{9}~~\keys{=}\keys{M}
\end{tcolorbox}
\end{minipage}
\end{document}
share|improve this answer

This could be viewed ever so slightly as overkill ...

TikZ calculator

\documentclass{article}
%\url{http://tex.stackexchange.com/q/40095/86}
\usepackage{tikz}
\usetikzlibrary{%
  positioning,
  backgrounds%
}
\colorlet{onepressed}{cyan}
\colorlet{sinpressed}{cyan}

\begin{document}
\begin{tikzpicture}[every node/.style={draw,fill=cyan!50!white,minimum width=2em, minimum height=1.5em, text=red,node distance=5mm},show background rectangle,background rectangle/.style={draw=blue!50,fill=blue!20,rounded corners=2ex}]
\node[fill=onepressed] (1) {\(1\)};
\node[base right=of 1] (2) {\(2\)};
\node[base right=of 2] (3) {\(3\)};
\node[above=of 1] (4) {\(4\)};
\node[base right=of 4] (5) {\(5\)};
\node[base right=of 5] (6) {\(6\)};
\node[above=of 4] (7) {\(7\)};
\node[base right=of 7] (8) {\(8\)};
\node[base right=of 8] (9) {\(9\)};
\node[below=of 1] (0) {\(0\)};
\node[base right=of 9] (div) {\(\div\)};
\node[base right=of 6] (times) {\(\times\)};
\node[base right=of 3] (minus) {\(-\)};
\node[base right=of 0] (dot) {\(\cdot\)};
\node[base right=of dot] (equals) {\(=\)};
\node[base right=of equals] (plus) {\(+\)};
\node[fill=sinpressed,above=of 7] (sin) {\(\scriptstyle\sin\)};
\node[base right=of sin] (cos) {\(\scriptstyle\cos\)};
\node[base right=of cos] (tan) {\(\scriptstyle\tan\)};
\node[base right=of tan] (exp) {\(\scriptstyle\exp\)};
\node[minimum width=11.8em,above=of sin.north west,anchor=south west,fill=white,] (disp) {\(0.841470984807897\)};
\end{tikzpicture}
\end{document}

(Just in case anyone was interested, I happened to have that "lying around". I use it in my lectures for introducing a topic on approximation by getting the students to try to imagine what the calculator is actually doing when one asks it to compute sin(1).)

share|improve this answer
    
@PauloCereda also just happened to have a calculator handy... –  Werner Jan 5 '12 at 8:17
    
@Werner: Andrew's calculator is way better than mine, it support moar digitz! :) Great answer, Andrew! :) –  Paulo Cereda Jan 5 '12 at 9:46
    
@PauloCereda The original was even dynamic: it is in a beamer presentation and as you advance screens, you see that first 1 is pressed and then sin, with the result shown in the display. –  Loop Space Jan 5 '12 at 10:21
    
@AndrewStacey: Awesome! Is it available for a preview? :) –  Paulo Cereda Jan 5 '12 at 10:38
    
@PauloCereda Lecture 3 (Obviously) slides 6,7,8 –  Loop Space Jan 5 '12 at 10:48

A mono-button binary calculator.

enter image description here

\documentclass[pstricks,border=12pt]{standalone}
\psset{fillstyle=solid}
\begin{document}
\begin{pspicture}(3,4)
    \psframe[fillcolor=gray,framearc=0.2](3,4)
    \rput(2.2,3.8){\psscalebox{.4}{\color{white}CASIO fx-666}}
    \rput(2.2,3.65){\psscalebox{.3}{\color{white}\it mono-button}}
    \psframe[fillcolor=lightgray](.5,3)(2.5,3.5)    
    \rput(1.5,3.25){1000010110}
    \pscircle(1.5,1.5){1}
\end{pspicture}
\end{document}
share|improve this answer
    
+1 for the intuitive user interface :) –  Fran Apr 18 '13 at 10:25

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.