👾 Exemples
1 Figurine complète 2 Figurine en 'kit' 3 Figurines aléatoires
Figurine complète Figurine complète, personnalisée
📄 tikzbrickfigurines/figurine.tex
% !TEX lualatex
\documentclass[border=5pt]{standalone}
\usepackage{tikzbrickfigurines}

\begin{document}

\minitikzbrickfigurine{1.5in}{1/1/1/0}%default style
\minitikzbrickfigurine{1.5in}{4/7/1/2}%with choosen styles
\minitikzbrickfigurine{1.5in}{3/*/9/*}%with choosen and random styles
\minitikzbrickfigurine{1.5in}{*}%with full random styles
\minitikzbrickfigurine{1.5in}{*}%with other full random styles

\end{document}
Figurine en 'kit' Travailler pièce par pièce
📄 tikzbrickfigurines/pieces.tex
% !TEX lualatex
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage{tikzbrickfigurines}
\usepackage{tabularray}
\setlength\parindent{0pt}

\begin{document}

\begin{tblr}{hlines,vlines,colspec={Q[1.25cm,m,c]*{9}{Q[m,c]}},row{1}={font=\footnotesize\ttfamily}}
	\SetCell[r=2,c=1]{c}{\rotatebox{45}{\textbf{piece}}} & body & legs & head & {left\\arm} & {right\\arm} &{left arm\\wo hand} & {right arm\\wo hand} & {left\\hand} & {righ\\hand} \\
	&\tikzbrickfigurinepiece[vcenter]{body}{0.75in} &
	\tikzbrickfigurinepiece[vcenter]{legs}{0.75in} &
	\tikzbrickfigurinepiece[vcenter]{head}{0.75in} &
	\tikzbrickfigurinepiece[vcenter]{left arm}{0.75in} &
	\tikzbrickfigurinepiece[vcenter]{right arm}{0.75in} &
	\tikzbrickfigurinepiece[vcenter]{left arm wo hand}{0.75in} &
	\tikzbrickfigurinepiece[vcenter]{right arm wo hand}{0.75in} & 
	\tikzbrickfigurinepiece[vcenter]{left hand}{0.75in} &
	\tikzbrickfigurinepiece[vcenter]{right hand}{0.75in} \\
\end{tblr}

\begin{tblr}{hlines,vlines,colspec={Q[1.25cm,m,c]*{10}{Q[0.8cm,m,c]}},row{1}={font=\footnotesize\ttfamily}}
	\SetCell[r=2,c=1]{c}{\rotatebox{45}{\textbf{mouth=}}} & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
	&\tikzbrickfigurinepiece[head=true]{mouth=1}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=2}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=3}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=4}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=5}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=6}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=7}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=8}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=9}{1in} &
	\tikzbrickfigurinepiece[head=true]{mouth=10}{1in}
\end{tblr}

\begin{tblr}{hlines,vlines,colspec={Q[1.25cm,m,c]*{10}{Q[0.8cm,m,c]}},row{1}={font=\footnotesize\ttfamily}}
	\SetCell[r=2,c=1]{c}{\rotatebox{45}{\textbf{eyes=}}} & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
	&\tikzbrickfigurinepiece[head=true]{eyes=1}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=2}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=3}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=4}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=5}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=6}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=7}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=8}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=9}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyes=10}{1in}
\end{tblr}

\begin{tblr}{hlines,vlines,colspec={Q[1.25cm,m,c]*{10}{Q[0.8cm,m,c]}},row{1}={font=\footnotesize\ttfamily}}
	\SetCell[r=2,c=1]{c}{\rotatebox{45}{\textbf{eyebrows=}}} & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
	&\tikzbrickfigurinepiece[head=true]{eyebrows=1}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=2}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=3}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=4}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=5}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=6}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=7}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=8}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=9}{1in} &
	\tikzbrickfigurinepiece[head=true]{eyebrows=10}{1in}
\end{tblr}

\begin{tblr}{hlines,vlines,colspec={Q[1.25cm,m,c]*{11}{Q[0.8cm,m,c]}},row{1}={font=\footnotesize\ttfamily}}
	\SetCell[r=2,c=1]{c}{\rotatebox{45}{\textbf{hair=}}} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
	&\tikzbrickfigurinepiece[head=true]{hair=0}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=1}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=2}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=3}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=4}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=5}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=6}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=7}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=8}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=9}{1in} &
	\tikzbrickfigurinepiece[head=true]{hair=10}{1in}
\end{tblr}

\begin{tblr}{hlines,vlines,colspec={Q[1.25cm,m,c]*{5}{Q[1.6cm,m,c]}},row{1}={font=\footnotesize\ttfamily}}
	\SetCell[r=2,c=1]{c}{\rotatebox{45}{\textbf{head=}}} & * & 4/8/1/6 & 2/*/*/9 & 3/3/3/3 & 10/10/10/2 \\
	&\tikzbrickfigurinepiece{head=*}{2in} &
	\tikzbrickfigurinepiece{head=4/8/1/6}{2in} &
	\tikzbrickfigurinepiece{head=2/*/*/9}{2in} &
	\tikzbrickfigurinepiece{head=3/3/3/3}{2in} &
	\tikzbrickfigurinepiece{head=10/10/10/2}{2in}
\end{tblr}

\end{document}
Figurines aléatoires Aléatoiriser des figurines
📄 tikzbrickfigurines/figurines.tex
% !TEX lualatex
\documentclass[border=5pt]{standalone}
\usepackage{tikzbrickfigurines}
\usepackage{openmoji}
\definecolor{brickskin}{HTML}{FFDFC4}

\begin{document}

\newcommand\randomcolor[1]{%
  \pgfmathsetmacro{\R}{random(0,10000)/10000}%
  \pgfmathsetmacro{\G}{random(0,10000)/10000}%
  \pgfmathsetmacro{\B}{random(0,10000)/10000}%
  \definecolor{#1}{rgb}{\R,\G,\B}%
}
\pgfmathdeclarerandomlist{listsksintones}%
  {{brickskin}{yellow}{pink}{brown}{brown!50!white}}
\pgfmathdeclarerandomlist{listhairtones}%
  {{lightgray!15}{yellow}{orange}{brown}{gray}{black}}
\pgfmathdeclarerandomlist{listlogos}%
  {{unicorn}{alien}{snake}{adhesive bandage}{desert island}{videocassette}{alien monster}}
%five 'random' clothes + face + skin + hair + logo brickfigurines
\foreach \i in {1,...,5}{%
  \randomcolor{randomsweatcolor}%
  \randomcolor{randompantcolor}%
  \randomcolor{randomshoecolor}%
  \pgfmathrandomitem{\skinrandom}{listsksintones}%
  \pgfmathrandomitem{\hairrandom}{listhairtones}%
  \pgfmathrandomitem{\logorandom}{listlogos}%
  \minitikzbrickfigurine%
    [%
      color skin=\skinrandom,%
      color hair=\hairrandom,%
      color sweat=randomsweatcolor,%
      color pant=randompantcolor,%
      color foot=randomshoecolor,%
      display logo,scale logo=0.8,%
      logo={\openmoji{\logorandom}},%
      vcenter
    ]%
    <rotate=\fpeval{randint(-20,20)}>%
    {1.75in}{*}
}

\end{document}
✓ Copié !