[Tex/LaTex] Where is the code for control buttons in animate or a repository of composite characters

animatesymbols

I am looking for the code for the control buttons of "player" in animate package (for example the button which is a square with a right-pointing triangle is used for PLAY button, as expected).

I did not find this in Detexify or in comprehensive LaTeX Symbol List.

Is there a repository for the code of characters or logos which appear to be made from two or more existing characters: an example is \bigoplus a circle with a plus sign. Some logos, like TeX itself are rather easy to find. Others not so easy.

Here is an attempt for some composite math symbols.

Best Answer

These "player buttons" are unique to the animate package and are constructed from low-level Postscript commands.

The following MWE provides an interface to the symbols, entirely extracted from animate.sty (minus some colour settings). Each of the symbols is 15pt in width. Since the commands are low-level, they produce a zero-width representation within LaTeX, and can therefore be overlaid to make more elaborate constructs (like the construction of the "symbol" <||>).

The interface is provided by \pstverb from the pstricks package. Compile using the sequence latex->dvips->ps2pdf or xelatex:

Animate package "player buttons"

\documentclass[12pt]{article}
\usepackage{pstricks}%
\makeatletter
\def\@anim@btnend{%
%  \@anim@bg\space
%  \@anim@fg\space
  0.25 setlinewidth
  1 setlinecap
  1 setlinejoin
  1 1 moveto
  14 1 lineto
  14 14 lineto
  1 14 lineto
  closepath
  stroke
  1 setlinewidth
  4.5 4 moveto
  9.5 7.5 lineto
  4.5 11 lineto
  stroke
  0 setlinejoin
  10.5 4.4 moveto
  10.5 10.6 lineto
  stroke
}
\def\@anim@btnstep{%
%  \@anim@bg\space
%  \@anim@fg\space
  0.25 setlinewidth
  1 setlinecap
  1 setlinejoin
  1 1 moveto
  14 1 lineto
  14 14 lineto
  1 14 lineto
  closepath
  stroke
  1 setlinewidth
  5 4 moveto
  10 7.5 lineto
  5 11 lineto
  stroke
}
\def\@anim@btnplay{%
%  \@anim@bg\space
%  \@anim@fg\space
  0.25 setlinewidth
  1 setlinecap
  1 setlinejoin
  1 1 moveto
  14 1 lineto
  14 14 lineto
  1 14 lineto
  closepath
  stroke
  1 setlinewidth
  5 4 moveto
  5 11 lineto
  10 7.5 lineto
  closepath
  stroke
}
\def\@anim@btnpause{%
%  \@anim@bg\space
%  \@anim@fg\space
  0.25 setlinewidth
  0 setlinecap
  1 setlinejoin
  0 1 moveto
  14 1 lineto
  14 14 lineto
  0 14 lineto
  stroke
  2 setlinewidth
  2.2 4 moveto
  2.2 11 lineto
  stroke
}
\def\@anim@btnminus{%
%  \@anim@bg\space
%  \@anim@fg\space
  0.25 setlinewidth
  1 setlinecap
  1 setlinejoin
  1 1 moveto
  14 1 lineto
  14 14 lineto
  1 14 lineto
  closepath
  stroke
  1.0 setlinewidth
  0 setlinecap
  4 7.5 moveto
  11 7.5 lineto
  stroke
}
\def\@anim@btnplus{%
%  \@anim@bg\space
%  \@anim@fg\space
  0.25 setlinewidth
  1 setlinecap
  1 setlinejoin
  1 1 moveto
  14 1 lineto
  14 14 lineto
  1 14 lineto
  closepath
  stroke
  1.0 setlinewidth
  0 setlinecap
  4 7.5 moveto
  11 7.5 lineto
  7.5 4  moveto
  7.5 11 lineto
  stroke
}
\def\@anim@btnreset{%
%  \@anim@bg\space
%  \@anim@fg\space
  0.25 setlinewidth
  1 setlinecap
  1 setlinejoin
  1 1 moveto
  14 1 lineto
  14 14 lineto
  1 14 lineto
  closepath
  stroke
  1 setlinewidth
  7.5 4 moveto
  7.5 11 lineto
  stroke
  0 setlinejoin
  3.5 5 moveto
  7 7.5 lineto
  3.5 10 lineto
  closepath
  fill
  11.5 5 moveto
  8 7.5 lineto
  11.5 10 lineto
  closepath
  fill
  1 setlinewidth
  2 setlinecap
  3 7.5 moveto
  3.5 7.5 lineto
  12 7.5 moveto
  11.5 7.5 lineto
  stroke
}

\def\btnendleft{\pstverb{[-1 0 0 1 15 0] concat \@anim@btnend}}%
\def\btnendright{\pstverb{\@anim@btnend}}%
\def\btnminus{\pstverb{\@anim@btnminus}}%
\def\btnpauseleft{\pstverb{[-1 0 0 1 15 0] concat \@anim@btnpause}}%
\def\btnpauseright{\pstverb{\@anim@btnpause}}%
\def\btnplayleft{\pstverb{[-1 0 0 1 15 0] concat \@anim@btnplay}}%
\def\btnplayright{\pstverb{\@anim@btnplay}}%
\def\btnplus{\pstverb{\@anim@btnplus}}%
\def\btnreset{\pstverb{\@anim@btnreset}}%
\def\btnstepleft{\pstverb{[-1 0 0 1 15 0] concat \@anim@btnstep}}%
\def\btnstepright{\pstverb{\@anim@btnstep}}%
\makeatother

\begin{document}

\verb|Left end:   |~\btnendleft \par
\verb|Right end:  |~\btnendright \par
\verb|Minus:      |~\btnminus \par
\verb|Left pause: |~\btnpauseleft \par
\verb|Right pause:|~\btnpauseright \par
\verb|Left play:  |~\btnplayleft \par
\verb|Right play: |~\btnplayright \par
\verb|Plus:       |~\btnplus \par
\verb|Reset:      |~\btnreset \par
\verb|Left step:  |~\btnstepleft \par
\verb|Right step: |~\btnstepright

\bigskip

\verb!<||> :      !~\btnpauseleft\btnplayleft\hspace{15pt}\btnpauseright\btnplayright

\end{document}

marvosym also provides some playback buttons, as shown in Table 209 of Scott Pakin's Comprehensive LaTeX Symbol List:

enter image description here


fontawesome also provides some playback symbols:

enter image description here

Requires the use of Xe(La)TeX or Lua(La)TeX.

Related Question