6

Is there a CD icon / symbol for LaTeX? I was looking through the whole The Comprehensive LaTeX Symbol List but haven't found any.

I'm after something like this: or this.

Werner
  • 603,163
flor1an
  • 797
  • 2
    If you can't find one in a package, I would just follow my approach here, https://tex.stackexchange.com/questions/224357/create-latex-symbol-from-vector-graphics/224359#224359, scaling a selected image to some convenient measure of text height. – Steven B. Segletes Sep 11 '17 at 12:23
  • fontawesome has added new symbols since the last edition of TCLSL came out, but I couldn't find anything disk related. Try clip art. – John Kormylo Sep 11 '17 at 13:24
  • 1
    What about directly using with a unicode-aware TeX-engine, i.e. LuaTeX or XeTeX, and an appropriate font? – Virgile Sep 12 '17 at 12:49

8 Answers8

10

For simple icons, I would also use TikZ to draw my own icon (e.g. modelled on your link).

enter image description here

\documentclass{article}
\usepackage{tikz}

\newcommand{\disc}{{\tikz[baseline=-.75ex]{%
\draw[line width=.1ex] (0,0) circle(.8ex);
\draw[line width=.2ex] (0,0) circle(.2ex);
\draw[line width=.15ex] ([shift=(270:.5ex)]0,0) arc (270:340:.5ex);
\draw[line width=.15ex] ([shift=(90:.5ex)]0,0) arc (90:160:.5ex);
}}}

\begin{document}

Billie Holiday, {\it Body and Soul}, Verve Records \disc

\Large {\it Body and Soul} (1957) \disc

\footnotesize Billie Holiday, {\it Body and Soul} (1957) \disc

\tiny Billie Holiday, {\it Body and Soul} (1957), Verve Records \disc

\end{document}
Earthliŋ
  • 1,140
8

Completely impractical:

\documentclass[tikz,border=5]{standalone}
\begin{document}
\begin{tikzpicture}[rotate=45]
\begin{scope}
\clip circle [radius=0.25] [rounded corners=1cm] (-1,-1) rectangle (1,1);
\fill [gray!10] circle [radius=1];
\foreach \i in {0,...,20}\foreach \r in {45, 135}
  \fill [white, opacity=0.1, rotate=\r] 
    (-\i:1) arc (-\i:\i:1) -- (180+\i:1) arc (180+\i:180-\i:1) -- cycle;
\end{scope}
\begin{scope}
\clip circle [radius=0.3] [rounded corners=0.95cm] 
  (-.95,-.95) rectangle (.95,.95);
\fill [gray!20] circle [radius=1];
\foreach \i in {0,...,50}
  \fill [white, opacity=0.05, rotate=90] 
    (-\i:1) arc (-\i:\i:1) -- (180+\i:1) arc (180+\i:180-\i:1) -- cycle;
\foreach \i in {0,0.5, ..., 10}
  \foreach \c [count=\j from -4, evaluate={\a=\j*5-\i; \b=\j*5+5+\i;}] in
    {gray!50!white, red, orange, yellow, green, cyan, blue, gray!50!white}
      \fill [fill=\c!50, opacity=0.05] 
        (0:0) -- (\a:1) arc (\a:\b:1) -- (\b+180:1) arc (\b+180:\a+180:1) -- (0:0);
\foreach \i in {0,1, ..., 10}
  \foreach \c [count=\j from 16, evaluate={\a=\j*5-\i; \b=\j*5+5+\i;}] in
    {gray!25, white, white, white, gray!25}
      \fill [fill=\c, opacity=0.1] 
        (0:0) -- (\a:1) arc (\a:\b:1) -- (\b+180:1) arc (\b+180:\a+180:1) -- (0:0);
\fill [white, opacity=0.5] circle [radius=1];
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Mark Wibrow
  • 70,437
6

Edit

Now without packages except for color (obviously optional):

mwe2

\documentclass{article}
\usepackage{xcolor}
\setlength{\unitlength}{1em}
\newcommand\CD[1][black]{{\color{#1!50!black}\begin{picture}(1,1)
\put(.5,.35){\circle{1}}
\put(.5,.35){\circle{.4}}
\put(.5,.35){\circle*{.3}}
\end{picture}}}


\begin{document}
CDROM CDROM CDROM CDROM \par
CDROM CDROM CDROM CDROM \par
CDROM \CD\ CDROM \CD\ CDROM \CD\par 
\CD\ CDROM \CD[white] CDROM \CD[cyan] CDROM\par
\CD[blue] CDROM \CD[orange] CDROM \CD[olive] CDROM\par
CDROM CDROM CDROM CDROM \par
CDROM CDROM CDROM CDROM \par
\end{document}

A more realistic CD with the same approach:

MWE

\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\setlength{\unitlength}{.5mm}
\newcommand\CD[1]{
\scalebox{#1}
{\begin{picture}(6,6)
\color{gray}\put(3.1,2.9){\circle*{6}}
\color{gray!50!cyan!30}\put(3,3){\circle*{6}}
\color{olive!20!cyan!25}\put(3,3){\circle*{5}}
\color{magenta!30!cyan!20!}\put(3,3){\circle*{4.5}}
\color{olive!30!cyan!20}\put(3,3){\circle*{3.7}}
\color{blue!30!cyan!20!}\put(3,3){\circle*{3.1}}
\color{gray!50}\put(3,3){\circle{2}}
\color{gray!30}\put(3,3){\circle*{2}}
\color{gray}\put(3,3){\circle{.7}}
\color{white}\put(3,3){\circle*{.7}}
\end{picture}}}
\begin{document}
\CD{10} 
\end{document}

Old poor-man version (yes, slightly off-center, sharp eyes...)

mwe

\documentclass{article}
\usepackage{graphicx}
\def\CDROM#1{\scalebox{#1}{\Huge\textcircled{\raisebox{-.5pt}%
{\small$^{\textcircled{\ensuremath\circ}}$}}}}
\begin{document}
\CDROM1  \CDROM{.5} CDROM 
\end{document}
Fran
  • 80,769
5

You could built it with TikZ:

\documentclass{article}
\usepackage{tikz}

\newcommand{\mycd}{\tikz{%
\node[circle, inner sep=0pt, text width=.8em, fill=black]{};
\node[circle, inner sep=0pt, text width=.42em, fill=white]{};
\node[circle, inner sep=0pt, text width=.32em, fill=black]{};
\node[circle, inner sep=0pt, text width=.1em, fill=white]{};
}}
\begin{document}

{\LARGE LARGE text: \mycd}

Normal text: \mycd

{\tiny tiny text: \mycd}

\end{document}

enter image description here

CarLaTeX
  • 62,716
3

Just download the image version of the link you and include it using graphicx:

enter image description here

\documentclass{article}

\usepackage{graphicx}

\newcommand{\disc}[1][]{\includegraphics[height=1.1ex,#1]{disc.png}}

\begin{document}

Billie Holiday, {\itshape Body and Soul}, Verve Records \disc

\Large {\itshape Body and Soul} (1957) \disc

\footnotesize Billie Holiday, {\itshape Body and Soul} (1957) \disc

\tiny Billie Holiday, {\itshape Body and Soul} (1957), Verve Records \disc

\end{document}

If you want a higher-quality version (vectorized, like PDF or EPS), you can trace the bitmap using Inkscape. See Creating Logo with Fancy Font.

If you're concerned about material that may be copyrighted, you can search for free alternatives on (say) OpenClipArt.

Werner
  • 603,163
2

As @Virgile (above) pointed out in a comment there is a Unicode character 'OPTICAL DISC' U+1F4BF 💿   Obviously its availability depends on the current font, and requires full Unicode support, such as in XeTeX or LuateX.

\documentclass{article}

\usepackage{fontspec}
\newfontfamily\symbola{Symbola}

\begin{document}

{\symbola\symbol{"1F4BF}}

\end{document}

optical disk icon

Thanks to @Henri_Menke for extending my comment.

Renardo
  • 191
1

Not totally serious.

\documentclass{standalone}
\usepackage{fontawesome}
\begin{document}
Poor Man's Disc Symbol: \faicon{dot-circle-o} or \faDotCircleO 
\end{document}

enter image description here

1

"Any diagram that can be written in PSTricks, will eventually be written in PSTricks."

\documentclass[pstricks,margin=5mm]{standalone}

\begin{document}
\begin{pspicture}(-3,-3)(3,3)
    \pscircle{3}
    \psRing*[linecolor=blue!90](0,0){1}{2.9}
    \psRing*[linecolor=blue!50](0,0)[30,60]{1}{2.9}
    \psRing*[linecolor=blue!50](0,0)[210,240]{1}{2.9}
    \psRing*[linecolor=lightgray]{.9}{.95}
    \psRing*[linecolor=lightgray]{.3}{.35}  
\end{pspicture}
\end{document}

enter image description here

Display Name
  • 46,933