Whilst I wouldn't go so far as to define completely new symbols, I do occasionally find myself wanting slightly different ones than the standard set. Where I've encountered this is with arrows when lecturing: I find that I want the ⇔ to look a little more important, for example. For those cases, I redraw it using TikZ:
\newcommand{\textIff}{\tikz \draw (-3ex,.25ex) -- (-.25ex,.25ex) (-3ex,-.25ex) -- (-.25ex,-.25ex) (-.5ex,.5ex) -- (0,0) -- (-.5ex,-.5ex) (-2.75ex,.5ex) -- (-3.25ex,0) -- (-2.75ex,-.5ex);\xspace}
\newcommand{\mathIff}{\mathrel{\textIff}}
\newcommand{\Iff}{\ifmmode\mathIff\else\textIff\fi\xspace}
I guess that using TikZ rather than MetaFont for this is that I already know how to use TikZ for my other diagrams.
A tikz
solution is obtained by modifying the answer https://tex.stackexchange.com/a/41628/15925
\documentclass[border=0.5cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes}
\tikzset{
dot hidden/.style={},
line hidden/.style={},
dot colour/.style={dot hidden/.append style={color=#1}},
dot colour/.default=black,
line colour/.style={line hidden/.append style={color=#1}},
line colour/.default=black
}
\usepackage{xparse}
\NewDocumentCommand{\drawdie}{O{}m}{%
\begin{tikzpicture}[x=1em,y=1em,radius=0.1,#1]
\draw[rounded corners=0.5,line hidden] (0,0) rectangle (1,1);
\ifodd#2
\fill[dot hidden] (0.5,0.5) circle;
\fi
\ifnum#2>1
\fill[dot hidden] (0.2,0.2) circle;
\fill[dot hidden] (0.8,0.8) circle;
\ifnum#2>3
\fill[dot hidden] (0.2,0.8) circle;
\fill[dot hidden] (0.8,0.2) circle;
\ifnum#2>5
\fill[dot hidden] (0.8,0.5) circle;
\fill[dot hidden] (0.2,0.5) circle;
\ifnum#2>7
\fill[dot hidden] (0.5,0.8) circle;
\fill[dot hidden] (0.5,0.2) circle;
\fi
\fi
\fi
\fi
\end{tikzpicture}%
}
\begin{document}
\drawdie{0}
\drawdie{1}
\drawdie[radius=0.5pt]{3}
\drawdie{7}
\drawdie[line colour=blue,thick]{8}
\drawdie[scale=0.5,dot colour=green,very thin,line hidden/.append style={fill=red}]{9}
\end{document}
The changes I have made are to add an extra case for numbers >7
(7
worked already) and removed the thick
default for the border, allowing it to be set to other values in smaller sizes. I have also removed the external dotsize variable and given an example of filling.
Best Answer
Unicode with LuaLaTeX/XeLaTeX and Linux Libertine
An example with the OpenType font Linux Libertine, tested with LuaLaTeX and XeLaTeX. The characters can be used inside
\textroman
directly by the right Unicode characters or via macros\textroman...
.(Update: Using
\encodingdefault
instead ofEU2
to support XeLaTeX.)Reversed C with
\reflectbox
Ↄ
can be generated using\reflectbox
of packagegraphics
: