% !TeX TXS-program:compile = txs:///pdflatex

\documentclass[11pt,a4paper]{ltxdoc}
\usepackage{TrivialPursuit}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{\sffamily\small [TrivialPursuit]}
\cfoot{\sffamily\small - \thepage{} -}
\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
\usepackage{hologo}
\providecommand\tikzlogo{Ti\textit{k}Z}
\providecommand\TeXLive{\TeX{}Live\xspace}
\providecommand\PSTricks{\textsf{PSTricks}\xspace}
\let\pstricks\PSTricks
\let\TikZ\tikzlogo

\usepackage{hyperref}
\urlstyle{same}
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
\def\TPversion{0.1.7}
\def\TPdate{25/08/2025}
\usepackage{tcolorbox}
\tcbuselibrary{skins,hooks,listingsutf8}
\usepackage{soul}
\usepackage{openmoji}
\sethlcolor{lightgray!25}
\NewDocumentCommand\MontreCode{ m }{%
	\hl{\vphantom{\texttt{pf}}\texttt{#1}}%
}

\begin{document}

\pagestyle{fancy}

\thispagestyle{empty}

\begin{center}
	\begin{minipage}{0.88\linewidth}
	\begin{tcolorbox}[colframe=yellow,colback=yellow!15]
		\begin{center}
			\begin{tabular}{c}
				{\Huge \texttt{TrivialPursuit [en]}}\\
				\\
				{\LARGE Create a '\textit{Trivial Pursuit}' board,} \\
				{\LARGE with customization.} \\
				\\
				{\small \texttt{Version \TPversion{} -- \TPdate}}
		\end{tabular}
		\end{center}
	\end{tcolorbox}
\end{minipage}
\end{center}

\begin{center}
	\begin{tabular}{c}
	\texttt{Cédric Pierquet}\\
	{\ttfamily c pierquet -- at -- outlook . fr}\\
	\texttt{\url{https://github.com/cpierquet/latex-packages/tree/main/trivialpursuit}} \\
	\\
	\texttt{Trivial Pursuit\texttrademark, is a trademark of Hasbro.}
\end{tabular}
\end{center}

\hrule

\vfill

\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
\BoardTrivialPursuit
\end{tcolorbox}

\vfill~

\pagebreak

\phantomsection

\hypertarget{matoc}{}

\tableofcontents

\vspace*{5mm}

\hrule

\vspace*{5mm}

\section{Introduction}

\subsection{Description}

This package provides a command to display a \textsf{Trivial Pursuit} (trademark of Hasbro) board, with some customization:

\begin{itemize}
	\item of lengths (radius + height cells);
	\item of colors;
	\item of logos (with \MontreCode{fontawesome}).
\end{itemize}

Cells and colors are globally fixed, are came from an original board.

\medskip

For the moment, limitations are:

\begin{itemize}
	\item number of categories (6);
	\item logos, given by a character, eg from package \MontreCode{fontawesome}.
\end{itemize}

\subsection{Loading}

To load the package, simply add in the preamble:

\begin{quote}
\begin{verbatim}
\usepackage{TrivialPursuit}                   %with fa5, default
\usepackage[fa6]{TrivialPursuit}              %with fa6 (test)
\usepackage[fa7]{TrivialPursuit}              %with fa7 (test)
\usepackage[nofa]{TrivialPursuit}             %w/o fa (test), loading manually
\end{verbatim}
\end{quote}

Loaded are useful package are:

\begin{itemize}
	\item \MontreCode{tikz} with libraries \MontreCode{calc,positioning};
	\item \MontreCode{calc} and \MontreCode{fontawesome5};
	\item \MontreCode{simplekv}; \MontreCode{xintexpr} and \MontreCode{listofitems}.
\end{itemize}

\pagebreak

\section{History}

\begin{quote}
\begin{verbatim}
0.1.7: Cards
0.1.6: Bugfix + pre-compatibility with fa7
0.1.5: Bugfix (compatibility with twemoji)
0.1.4: Bugfix + pre-compatibility with fa6
0.1.2: Key [ShortVersion] in order to reduce number of border cells
0.1.1: Adding two schemes of colors
0.1.0: Initial version
\end{verbatim}
\end{quote}

\pagebreak

\section{The board macro}

\subsection{General usage}

The code draw the board, with optional logos.

All the available keys are presented in the following paragraph, but concerning the dimensions, \textit{general} are proposed by default, but it is however possible to modify them:

\begin{itemize}
	\item either explicitly by the keys \MontreCode{[Radius=]} and \MontreCode{[BorderHeight=]};
	\item or by specifying a particular unit using the \MontreCode{[Unit=]} key, in which case the general shape of the board will be preserved !
\end{itemize}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\BoardTrivialPursuit[Unit=0.5]
%
\BoardTrivialPursuit[Radius=4,BorderHeight=1.25] %beware of the rendering...

\BoardTrivialPursuit[Unit=0.33]
%
\BoardTrivialPursuit[Unit=0.33,ShortVersion]
\end{tcblisting}

\pagebreak

\subsection{Keys and options}

Available \textsf{keys} are:

\begin{itemize}
	\item \MontreCode{Radius}:= radius of the board (in unit), and \MontreCode{8} by default;
	\item \MontreCode{BorderHeight}:= height of ext cells, and \MontreCode{1.5} by default;
	\item \MontreCode{ListColors}:= colors of the categories,
	
	\hfill{}and \MontreCode{yellow,orange,blue,brown,green,pink} by default;
	\item \MontreCode{ListIcons}:= icons of categories,
	
	\hfill\MontreCode{\textbackslash faArchway,\textbackslash faTableTennis,\textbackslash faUmbrellaBeach,\textbackslash faGuitar,\textbackslash faTree,\textbackslash faMusic} by default;
	\item \MontreCode{Icons}:= boolean for display icons, and \MontreCode{true} by default;
	\item \MontreCode{Center}:= boolean for filling central hexagon, and \MontreCode{true} by default;
	\item \MontreCode{ColorCenter}:= color of central hexagon, and \MontreCode{lightgray!25} by default;
	\item \MontreCode{Colors}:= boolean fot printing colors, and \MontreCode{true} by default;
	\item \MontreCode{Logo}:= boolean for displaying logo at the center, and \MontreCode{true} by default;
	\item \MontreCode{Jokers}:= boolean for printing jokers, and \MontreCode{true} by default;
	\item \MontreCode{IconJoker}:= icon for joker, and \MontreCode{\textbackslash faDice} by default;
	\item \MontreCode{Blank}:= boolean for an empty board, and \MontreCode{false} by default;
	\item \MontreCode{Unit}:= to precis an unit (better than a scale !), and \MontreCode{1} by default;
	\item \MontreCode{Thickness}:= thickness of the borders, and \MontreCode{0.8pt} by default;
	\item \MontreCode{Rotation}:= possible rotation of the board, and \MontreCode{0} by default;
	\item \MontreCode{ShortVersion}:= use 5 cells instead 6 between 'big cells', and \MontreCode{false} by default.
\end{itemize}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\BoardTrivialPursuit[Rotation=35,Unit=0.5]
\BoardTrivialPursuit[Unit=0.5]
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\BoardTrivialPursuit[Unit=0.5,Icons=false]
\BoardTrivialPursuit[Unit=0.5,Colors=false]
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\BoardTrivialPursuit[Unit=0.5,Blank]
\BoardTrivialPursuit[Unit=0.5,Logo=false,Center=false,IconJoker=\faAward]
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\BoardTrivialPursuit[%
	Jokers=false,%
	ListColors={%
		blue!25,red!25,teal!25,orange!25,gray!50,violet!25},%
	ListIcons={
		\faAddressCard,\faAngleDoubleRight,\faAngry[regular],%
		\faAtom,\faBalanceScaleLeft,\faBell}
]
\end{tcblisting}

\pagebreak

\subsection{Schemes of colors, predefined fa icons}

In addition (on a suggestion from \textsf{quark67}), two color styles have been defined internally:

\begin{quote}
\begin{verbatim}
\TPColorsA
\TPColorsB
\end{verbatim}
\end{quote}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\BoardTrivialPursuit[Unit=0.5,ListColors=\TPColorsA]
\BoardTrivialPursuit[Unit=0.5,ListColors=\TPColorsB]
\end{tcblisting}

\begin{quote}
\begin{verbatim}
\categtrivialpursuit
\end{verbatim}
\end{quote}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\BoardTrivialPursuit%
	[ListIcons=\categtrivialpursuit,ListColors=\TPColorsB,IconJoker=\faDice]
\end{tcblisting}

\section{The card macros}

\subsection{Global usage}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\CardTrivialRecto{Q1}{Q2}{Q3}{Q4}{Q5}{Q6}{10}

\CardTrivialVerso{A1}{A2}{A3}{A4}{A5}{A6}{256}

\CardTrivialVerso[scale=-0.5,rotate=15]{A1}{A2}{A3}{A4}{A5}{A6}{256}
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
\CardTrivialRecto%
	[tikzpicture options]%
	{Q1}{Q2}{Q3}{Q4}{Q5}{Q6}%
	{card number}
	
\CardTrivialVerso%
	[tikzpicture options]%
	{A1}{A2}{A3}{A4}{A5}{A6}%
	{card number}
\end{tcblisting}

\subsection{Customization macro}


\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
\SetParamsCardTrivial{%
	QA font=...,                        %font of Q/A
	nb font=...,                        %font of number
	label font=...,                     %font of categories
	categ=...,                          %labels of categories
	border deco color=...,
	alt deco color=...,
	color categ A=...,
	color categ B=...,
	color categ C=...,
	color categ D=...,
	color categ E=...,
	color categ F=...,
	alt deco=TF
}
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
%logo verso
\def\intlogocardversotrivial{%
	\draw[white] (CARD-LOGO) node[rotate=90,text width=3.75cm,font=\Huge\sffamily,align=left] {{\TeX} \\\hfill{\itshape Pursuit}} ;
}
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
%logo recto (bg)
\def\intlogocardrectotrivial{}
\end{tcblisting}

\subsection{Example}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only}
%\usepackage{openmoji}

\SetParamsCardTrivial{%
	border deco color=teal,
	alt deco color=orange,
	QA font={\sffamily\fontsize{8pt}{10pt}\selectfont},%
	label font={\bfseries},
	categ={No,H,Ma,Oo,A,G}
}
\def\intlogocardversotrivial{%
	\draw (CARD-LOGO) node[rotate=90]
	{\openmoji[height=2.25cm]{game die}\openmoji[height=2.25cm]{glowing star}} ;
}
\def\intlogocardrectotrivial{%
	\draw (CARD-LOGO) node[opacity=0.05]
	{\openmoji[height=4.25cm]{green apple}} ;
}
\end{tcblisting}

\SetParamsCardTrivial{%
	border deco color=teal,
	alt deco color=orange,
	QA font={\sffamily\fontsize{8pt}{10pt}\selectfont},%
	label font={\bfseries},
	categ={No,H,Ma,Oo,A,G}
}
\def\intlogocardversotrivial{%
	\draw (CARD-LOGO) node[rotate=90]
	{\openmoji[height=2.25cm]{game die}\openmoji[height=2.25cm]{glowing star}} ;
}
\def\intlogocardrectotrivial{%
	\draw (CARD-LOGO) node[opacity=0.05]
	{\openmoji[height=4.25cm]{green apple}} ;
}
\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\CardTrivialRecto{Q1}{Q2}{Q3}{Q4}{Q5}{Q6}{12}

\CardTrivialVerso[scale=-1]{A1}{A2}{A3}{A4}{A5}{A6}{12}
\end{tcblisting}

\end{document}