我到处找了找,但什么也没找到。有没有一个包里有计算器的符号/小符号?我知道可能没有,但我以前见过很多奇怪的东西……
答案1
有三种不同的计算器符号可供选择名词项目:
计算器符号由 The Noun Project 和 Scott Lewis 提供,摘自 The Noun Project。
这第一的 二发布在知识共享 - 署名 (CC BY 3.0), 这第三一个之下Creative Commons CC0 - 不保留任何权利。
我认为 Martin Scharrer 曾一度考虑将这个精美的图标集合变成一个包,但我不知道这个包的状态如何;可能存在一些许可问题。
你必须将 SVG 文件转换为 LaTeX 可以使用的格式,例如伊凡视界然后我推荐一个\newcommand
将图像嵌入到中height
,ex
这样它就会根据当前字体大小进行缩放,如下所示:
\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}
答案2
我的计算器:
\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}
答案3
有一些很棒的 tikz 计算器。我想尝试一些不同的东西,一个适合文本并根据字体大小重新缩放的小计算器图标。
\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}
结果是
答案4
代码:
\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}
tcolorbox
使用和包进行更简单的编码menukeys
:
\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}