# font or tikz to draw tally counting symbols (///)

In a book I have the following to illustrate the traditional counting symbols used for hand tallying. They were drawn using PPT and saved in a PNG image, but look ugly and when I try to use one in inline text, I can't get the image properly centered over the baseline.

Is there any font for this, or a way to do this with tikz?

• tex.stackexchange.com/q/102065 has several solutions. – Thérèse Dec 29 '18 at 17:03
• The comprehensive symbols list shows hhcount package to be closest to this, but the package isn't on CTAN any longer, apparently – user31729 Dec 29 '18 at 17:11

Something like this?

\documentclass{article}
\usepackage{tikz}
\newcommand{\TCS}[2][]{\begin{tikzpicture}[baseline,#1]
\foreach \X [evaluate=\X as \Y using {int(mod(\X,5))}]in {1,...,#2}
{\ifnum\Y=0
\draw (\X*0.5ex+0.3ex,0) -- ++(-2.8ex,2ex);
\else
\draw (\X*0.5ex+0.3ex,0) -- ++(-0.3ex,2ex);
\fi}
\end{tikzpicture}}
\begin{document}
abc \TCS{3}\ def \TCS{7}
\end{document}


Or slanted to the right.

\documentclass{article}
\usepackage{tikz}
\newcommand{\TCS}[2][]{\begin{tikzpicture}[baseline,#1]
\foreach \X [evaluate=\X as \Y using {int(mod(\X,5))}]in {1,...,#2}
{\ifnum\Y=0
\draw (\X*0.5ex+0.3ex,0) -- ++(-2.2ex,1.8ex);
\else
\draw (\X*0.5ex+0.3ex,0) -- ++(0.3ex,1.8ex);
\fi}
\end{tikzpicture}}
\begin{document}
abc \TCS{3}\ def \TCS{7}
\end{document}


• The additional optional key is to enable things like abc \TCS[red]{3}\ def \TCS[blue,thick]{7}. – user121799 Dec 29 '18 at 17:40

A different approach with bullcntr, that shows 'unusual' tally symbols: bullets!

But the number of symbols is limited to 9, so the symbols repeat.

\documentclass{article}

\usepackage{bullcntr}

\usepackage{pgffor}

\newcounter{bull}
\newcommand{\showbullcntr}[1]{%
\setcounter{bull}{#1}%
\bullcntr{bull}%
}
\begin{document}

\foreach \x in {1,...,200} {
\pgfmathmod{\x}{5}
\pgfmathint{\pgfmathresult}
\edef\y{\pgfmathresult}
\typeout{Current: \x and \y}
\showbullcntr{\y}\
}

\end{document}


• Try to catch the hidden message in that pattern... – user31729 Dec 29 '18 at 17:24
• It is not so hidden: "2019 will be a good year for being nice to marmots." ;-) – user121799 Dec 29 '18 at 17:25
• @marmot: No, it says: Don't mess up with people from Black Forest ;-) – user31729 Dec 29 '18 at 17:28
• I can't believe it: someone has actually made use of the bullcntr package! I was thinking it was time to withdraw it... – GuM Dec 31 '18 at 21:09
• @GuM: I wanted to transport hidden messages with the bullcntr patterns ;-) – user31729 Dec 31 '18 at 21:43

Using a macro and cancel package to definite a cut symbol. With mskip-4mu you can decrease or increase the space between the \slashs.

\documentclass{article}
\usepackage{mathtools}
\usepackage{cancel}
\newcommand{\thbacks}{\slash\mskip-4mu\slash\mskip-4mu\slash\mskip-4mu\slash}
\begin{document}
$\slash, \quad \slash\slash, \quad \slash\slash\slash, \quad \bcancel{\thbacks}$
\end{document}


Direct from the documentation of gmp:

\documentclass{article}
\usepackage[shellescape]{gmp}

\newcommand{\scratchcount}[1]{%
\begin{mpost}
n:=#1;
height := 3/5\mpdim{\baselineskip} ;
span := 1/3 * height ;
drift := 1/10 * height ;
pickup pencircle scaled (1/12 * height) ;
def d = (uniformdeviate drift) enddef ;
for i := 1 upto n :
draw
if (i mod 5)=0 : ((-d-4.5span,d)--(+d-0.5span,height-d))
else : ((-d,+d)--(+d,height-d)) fi
shifted (span*i,d-drift) ;
endfor;
picture cp ;
cp := currentpicture ; %for readability
setbounds currentpicture to
(llcorner cp shifted (0,-ypart llcorner cp) --
lrcorner cp shifted (0,-ypart lrcorner cp) --
urcorner cp -- ulcorner cp -- cycle) ;
\end{mpost}}
\makeatletter
\newenvironment{scratchenum}
{\begin{enumerate} \@namedef{label\@enumctr}{\scratchcount{\arabic{\@enumctr}}}}
{\end{enumerate}}
\makeatother

\begin{document}

\begin{scratchenum}
\item Cinque \scratchcount{5}
\item Dieci \scratchcount{10}
\item Venti \scratchcount{20}
\item Trenta \scratchcount{30}
\item Trentasei \scratchcount{36}
\item Quarantatré \scratchcount{43}
\end{scratchenum}

\end{document}


The numbers are what Figaro sings at the beginning of Le nozze di Figaro, by Mozart and Da Ponte. Note that the tally marks are drawn with a certain degree of randomness.

The necessary files for the example below are available from http://tug.ctan.org/tex-archive/usergrps/uktug/baskervi/5_5/hhcount.sty and http://tug.ctan.org/tex-archive/usergrps/uktug/baskervi/5_5/hhutils0.sty

\documentclass{article}

\usepackage{hhcount}

\begin{document}
\fcscore{42}
\end{document}