summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex
blob: e47d51601c1fed147d80bb92cda2b84f21c151e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
% !TeX TXS-program:compile = txs:///arara
% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')

\documentclass[11pt,a4paper]{ltxdoc}
\usepackage{thematicpuzzle}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage{tcolorbox}
\tcbuselibrary{listings,listingsutf8}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{\sffamily\small [thematicpuzzle]}
\rfoot{\sffamily\small - \thepage{} -}
\usepackage{hologo}
\usepackage{xspace}
\providecommand\tikzlogo{Ti\textit{k}Z}
\providecommand\TeXLive{\TeX{}Live\xspace}
\providecommand\PSTricks{\textsf{PSTricks}\xspace}
\let\pstricks\PSTricks
\let\TikZ\tikzlogo

\urlstyle{same}
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0pt}
\def\TPversion{0.1.0}
\def\TPdate{17/12/2023}
\usepackage{soul}
\usepackage{codehigh}
\usepackage{tabularray}
\sethlcolor{lightgray!25}
\NewDocumentCommand\MontreCode{ m }{%
	\hl{\vphantom{\texttt{pf}}\texttt{#1}}%
}
\usepackage[english]{babel}

\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{thematicpuzzle [en]}}\\
				\\
				{\LARGE Present a horizontal 'puzzle',} \\
				{\LARGE with different themes.} \\
				\\
				{\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/thematicpuzzle}} \\
\end{tabular}
\end{center}

\hrule

\vfill

\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
\ThematicPuzzle{A,B,C,D,E,F,G,H}
\end{tcolorbox}

\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
\ThematicPuzzle[Thickness=1.25pt,Scale=2.75,BgColors={yellow!10,orange!10,green!10,teal!10,purple!10},Labels={Angry,Python,Cool,Apple,Battery},BorderColor=darkgray,IconsColor=teal!50!black]{\faAngry,\faPython,\faAngellist,\faApple*,\faBatteryHalf}
\end{tcolorbox}

\vfill~

\pagebreak

\phantomsection

\hypertarget{matoc}{}

\tableofcontents

\vspace*{5mm}

\hrule

\vspace*{5mm}

\section{Introduction}

\subsection{Description}

With this package, it is possible to create a \textit{horizontal banner}, in the form of a puzzle, with different themes.

The styles are \textit{globally} fixed, but it is possible to configure:

\begin{itemize}
	\item colors;
	\item icons;
	\item labels.
\end{itemize}

The interior \textit{borders} are randomly oriented to the left or to the right, and the code takes care of coloring (if applicable) the parts satisfactorily.

\subsection{Decorations}

For the moment, the \textit{decorations} of the parts must be declared as characters, for example with icons from the \MontreCode{fontawesome5} package (loaded by the package).

\smallskip

Ultimately, it may be possible to insert images or \TikZ\ codes, this is one of the areas for improvement.

\subsection{Loading}

To load the package, simply add in the preamble :

\begin{quote}
\begin{verbatim}
\usepackage{thematicpuzzle}
\end{verbatim}
\end{quote}

The useful and loaded packages are:

\begin{itemize}
	\item \MontreCode{tikz};
	\item \MontreCode{fontawesome5};
	\item \MontreCode{simplekv}, \MontreCode{listofitems} and \MontreCode{xstring}.
\end{itemize}

\vfill

\subsection{History}

\begin{quote}
\begin{verbatim}
0.1.0: Initial release
\end{verbatim}
\end{quote}

\pagebreak

\section{The macro}

\subsection{General usage, keyx and options}

In order to create a \textit{theme puzzle}, the command is:

\begin{quote}
\begin{verbatim}
%----thematic puzzle
\ThematicPuzzle[keys]<tikz options>{decoration list}
\end{verbatim}
\end{quote}

The \textsf{keys}, optional and between \MontreCode{[...]}, are:

\begin{itemize}
	\item \MontreCode{Thickness} := thickness of the lines (\MontreCode{1pt} by default);
	\item \MontreCode{Scale} := global scale of the figure (\MontreCode{1} by default);
	\item \MontreCode{BgColors} := background color (\MontreCode{empty} by default);
	\item \MontreCode{BorderColor} := color(s) (if necessary separated by \MontreCode{,}) of the borders (\MontreCode{black} by default);
	\item \MontreCode{Labels} := (optional) labels of the themes (\MontreCode{empty} by default);
	\item \MontreCode{ScaleLabels} := label scale (\MontreCode{1.15} by default);
	\item \MontreCode{FontLabels} := label font (\MontreCode{\textbackslash tiny\textbackslash sffamily} by default);
	\item \MontreCode{IconsColor} := color of icons and labels (\MontreCode{black} by default).
\end{itemize}

\medskip

The optional argument, between \MontreCode{<...>}, corresponds to specific options (in \TikZ language) to pass to the created environment.

\smallskip

The obligatory argument, between \MontreCode{\{...\}}, corresponds to the list of decorations (in the form of \textit{characters}) of the different puzzle pieces, within form \MontreCode{\{deco<1>,deco<2>,...,deco<n>\}}

\subsection{Examples}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\ThematicPuzzle{\faAngry,\faArchway,\faAtlas,\faAtom}
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\ThematicPuzzle[Labels={Maths,History,Geo,Chemistry}]%
  {\faAngry,\faArchway,\faAtlas,\faAtom}
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\ThematicPuzzle%
  [Scale=2,BgColors=yellow!25,Labels={Maths,History,Geo,Chemistry}]%
  {\faAngry,\faArchway,\faAtlas,\faAtom}
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\ThematicPuzzle%
  [Scale=3,BgColors={yellow!10,orange!10,red!10,teal!10},
  Labels={Maths,History,Geo,Chemistry}]%
  {\faAngry,\faArchway,\faAtlas,\faAtom}
\end{tcblisting}

\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
\ThematicPuzzle%
  [Thickness=2pt,Scale=1.25,
  BgColors={yellow!10,orange!10,red!10,teal!10,purple!10,gray!10},
  IconsColor=teal!50!black]%
  {P,Y,T,H,O,N}
\end{tcblisting}

\end{document}