![如何排版扬声器图标?](https://linux22.com/image/346632/%E5%A6%82%E4%BD%95%E6%8E%92%E7%89%88%E6%89%AC%E5%A3%B0%E5%99%A8%E5%9B%BE%E6%A0%87%EF%BC%9F.png)
答案1
fontawesome
提供了许多选项:
\documentclass{article}
\usepackage{fontawesome}
\setlength{\parindent}{0pt}
\begin{document}
\faBullhorn \quad \verb|\faBullhorn| \\
\faVolumeOff \quad \verb|\faVolumeOff| \\
\faVolumeDown \quad \verb|\faVolumeDown| \\
\faVolumeUp \quad \verb|\faVolumeUp|
\end{document}
您可能在寻找\faVolumeUp
。
答案2
在这里,我只是将一些东西串在一起(例如,,\rule
和\blacktriangle
))
...适用于不同的字体大小。已编辑以使用语法提供不同的音量设置\loudspeaker[<volume>]
。
\documentclass{article}
\usepackage{amssymb,graphicx}
\newcommand\vcent[1]{\vcenter{\hbox{#1}}}
\newcommand\loudspeaker[1][3]{\ensuremath{\vcent{\rule{.6ex}{.6ex}}\kern-.5ex%
\vcent{\scalebox{.6}[1]{\rotatebox[origin=center]{90}{$\blacktriangle$}}}%
\ifnum#1>0\relax\kern.1ex\vcent{\scalebox{.3}{)}}\ifnum#1>1\relax\kern-.15ex%
\vcent{\scalebox{.4}{)}}\ifnum#1>2\relax\kern-.23ex\vcent{\scalebox{.5}{)}}%
\fi\fi\fi}%
}
\begin{document}
This is a loudspeaker: \loudspeaker.
This is volume 0: \loudspeaker[0].
This is volume 1: \loudspeaker[1].
This is a volume 2: \loudspeaker[2].
\LARGE LARGE loudspeaker: \loudspeaker.
\end{document}
以下是 tt 字体中声波的变体:
\documentclass{article}
\usepackage{amssymb,graphicx}
\newcommand\vcent[1]{\vcenter{\hbox{#1}}}
\newcommand\loudspeaker[1][3]{\ensuremath{\vcent{\rule{.6ex}{.6ex}}\kern-.5ex%
\vcent{\scalebox{.6}[1]{\rotatebox[origin=center]{90}{$\blacktriangle$}}}%
\ifnum#1>0\relax\kern.05ex\vcent{\scalebox{.4}{\ttfamily)}}%
\ifnum#1>1\relax\kern-.4ex\vcent{\scalebox{.56}{\ttfamily)}}%
\ifnum#1>2\relax\kern-.55ex\vcent{\scalebox{.7}{\ttfamily)}}%
\fi\fi\fi}%
}
\begin{document}
This is a loudspeaker: \loudspeaker.
This is volume 0: \loudspeaker[0].
This is volume 1: \loudspeaker[1].
This is a volume 2: \loudspeaker[2].
\LARGE LARGE: \loudspeaker.
\end{document}
例如,比较一下https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg,由 OP 引用。