summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/source/util/randomid.dtx
blob: be986c8857857d224ac2c23b887cc8ba0db6297d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
% \iffalse
% --------------------------------------------------------------------
% <*utils>
% \fi
% 
% \subsubsection{Random IDs}
%
% This macro sets the macro \cs{wg@uuid} to some random hex number.
% 
%    \begin{macrocode}
\def\wg@r@ndom@id{%
  \def\wg@uuid{}
  \foreach \i in {1,...,8}{%
    \pgfmathparse{Hex(random(0,15))}
    \xdef\wg@uuid{\wg@uuid\pgfmathresult}}}
%    \end{macrocode}
%
% 
% \iffalse
% --------------------------------------------------------------------
% </utils>
% \fi