| 1 |
% !TeX TXS-program:compile = txs:///arara |
| 2 |
% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} |
| 3 |
% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} |
| 4 |
|
| 5 |
\documentclass[11pt,a4paper]{ltxdoc} |
| 6 |
%\usepackage{amsmath} |
| 7 |
%\usepackage{bera} |
| 8 |
%\usepackage{inconsolata} |
| 9 |
%\usepackage[T1]{fontenc} |
| 10 |
%\usepackage[scale=0.875]{cabin} |
| 11 |
\usepackage[T1]{fontenc} |
| 12 |
\usepackage[nott]{kpfonts} |
| 13 |
\usepackage{inconsolata} |
| 14 |
\usepackage{tikz-decofonts} |
| 15 |
\usepackage{enumitem} |
| 16 |
\usepackage{fancyvrb} |
| 17 |
\usepackage{lipsum} |
| 18 |
\usepackage{setspace} |
| 19 |
\usepackage{fancyhdr} |
| 20 |
\usepackage{tabularray} |
| 21 |
\usepackage{fontawesome5} |
| 22 |
\fancyhf{} |
| 23 |
\renewcommand{\headrulewidth}{0pt} |
| 24 |
\lfoot{\sffamily\small [tikz-decofonts]} |
| 25 |
\cfoot{\sffamily\small - \thepage{} -} |
| 26 |
\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}} |
| 27 |
\usepackage{hologo} |
| 28 |
\providecommand\tikzlogo{Ti\textit{k}Z} |
| 29 |
\providecommand\TeXLive{\TeX{}Live\xspace} |
| 30 |
\let\TikZ\tikzlogo |
| 31 |
|
| 32 |
\usepackage{hyperref} |
| 33 |
\urlstyle{same} |
| 34 |
\hypersetup{pdfborder=0 0 0} |
| 35 |
\usepackage[margin=2cm]{geometry} |
| 36 |
\setlength{\parindent}{0pt} |
| 37 |
\def\TPversion{0.1.8} |
| 38 |
\def\TPdate{29/04/2026} |
| 39 |
\usepackage{tcolorbox} |
| 40 |
\tcbuselibrary{breakable,skins,hooks,listingsutf8} |
| 41 |
|
| 42 |
\lstset{ |
| 43 |
language=[LaTeX]TeX,% |
| 44 |
basicstyle=\ttfamily,% |
| 45 |
keywordstyle={\color{blue}},% |
| 46 |
classoffset=0,% |
| 47 |
keywords={},% |
| 48 |
alsoletter={-},% |
| 49 |
keywordstyle={\color{blue}},% |
| 50 |
classoffset=1,% |
| 51 |
alsoletter={-},% |
| 52 |
morekeywords={commalists-tools},% |
| 53 |
keywordstyle={\color{violet}},% |
| 54 |
classoffset=2,% |
| 55 |
alsoletter={-},% |
| 56 |
morekeywords={\tkzbrush,\tkzink,\tkzpixl,\tkzpixletter,\tkzpixlquote,\tkzcomicbubble,\tkzunderline,\tkzsurround,\tkzfittextinarrow,\tkzcircledtxt,\tkzletterblock,\tkzunderlinepen,\phantomulinewithpen},% |
| 57 |
keywordstyle={\color{green!50!black}},% |
| 58 |
classoffset=3,% |
| 59 |
morekeywords={},% |
| 60 |
keywordstyle={\color{orange}} |
| 61 |
} |
| 62 |
|
| 63 |
\newtcblisting{DemoCode}[1]{% |
| 64 |
enhanced,width=\linewidth,% |
| 65 |
bicolor,size=title,% |
| 66 |
colback=cyan!10!white,% |
| 67 |
colbacklower=cyan!5!white,% |
| 68 |
colframe=cyan!75!black,% |
| 69 |
listing options={% |
| 70 |
breaklines=true,% |
| 71 |
breakatwhitespace=true,% |
| 72 |
style=tcblatex,basicstyle=\small\ttfamily,% |
| 73 |
tabsize=4,% |
| 74 |
commentstyle={\itshape\color{gray}}, |
| 75 |
keywordstyle={\color{blue}},% |
| 76 |
classoffset=0,% |
| 77 |
keywords={\usepackage,\includegraphics,xstring,listofitems,\readlist,\showitems,\xintFor,\xintSeq},% |
| 78 |
alsoletter={-},% |
| 79 |
keywordstyle={\color{blue}},% |
| 80 |
classoffset=1,% |
| 81 |
alsoletter={-},% |
| 82 |
morekeywords={euromoney},% |
| 83 |
keywordstyle={\color{violet}},% |
| 84 |
classoffset=2,% |
| 85 |
alsoletter={-},% |
| 86 |
morekeywords={\tkzbrush,\tkzink,\tkzpixl,\tkzpixletter,\tkzpixlquote,\tkzbicolor,\tkzcomicbubble,\tkzunderline,\tkzsurround,\tkzfittextinarrow,\tkzcircledtxt,\tkzletterblock,\tkzunderlinepen,\phantomulinewithpen},% |
| 87 |
keywordstyle={\color{green!50!black}},% |
| 88 |
classoffset=3,% |
| 89 |
morekeywords={color,lines,scale,height,offseth,offsetv,thick,gridcolor,gridafter,nospaceafter,border,colors,style,intdelta,paralcolors,width,node,txtcolor,width,bheight,sheight,hoffset,shadow,shownodes,expand,globalwidth,absolute,thickness,strut,dstrut,hstretch,font,height,spacestretch},% |
| 90 |
keywordstyle={\color{orange}} |
| 91 |
},% |
| 92 |
#1 |
| 93 |
} |
| 94 |
|
| 95 |
\newtcbinputlisting\DemoCodeFile[1]{% |
| 96 |
enhanced,width=\linewidth,% |
| 97 |
bicolor,size=title,% |
| 98 |
colback=lightgray!10!white,% |
| 99 |
colbacklower=lightgray!5!white,% |
| 100 |
colframe=lightgray!75!black,% |
| 101 |
listing options={% |
| 102 |
breaklines=true,% |
| 103 |
breakatwhitespace=true,% |
| 104 |
style=tcblatex, |
| 105 |
basicstyle=\scriptsize\ttfamily,% |
| 106 |
tabsize=4,% |
| 107 |
commentstyle={\itshape\color{gray}},% |
| 108 |
%lastline=148 |
| 109 |
},% |
| 110 |
breakable, |
| 111 |
listing only,% |
| 112 |
listing file={#1} |
| 113 |
} |
| 114 |
|
| 115 |
\NewDocumentCommand\ShowCode{ m }{% |
| 116 |
\lstinline{#1}% |
| 117 |
} |
| 118 |
|
| 119 |
\def\sampleformula{$\displaystyle\int_0^1 \dfrac{1+x}{1+x^2}\,\mathrm{d}x$} |
| 120 |
\def\sampletxt{But I must explain to you how all this mistaken idea of denouncing pleasure.} |
| 121 |
\def\samplenum{1500} |
| 122 |
|
| 123 |
\begin{document} |
| 124 |
|
| 125 |
\thispagestyle{empty} |
| 126 |
|
| 127 |
\begin{center} |
| 128 |
\begin{minipage}{0.88\linewidth} |
| 129 |
\begin{tcolorbox}[colframe=yellow,colback=yellow!15] |
| 130 |
\begin{center} |
| 131 |
\renewcommand{\arraystretch}{1.25}% |
| 132 |
\begin{tabular}{c} |
| 133 |
{\Huge \texttt{tikz-decofonts}}\\ |
| 134 |
\\ |
| 135 |
{\LARGE Simple "decoration" fonts or effects,} \\ |
| 136 |
{\LARGE made with Ti\textit{k}Z, for small texts\ldots} \\ |
| 137 |
\\ |
| 138 |
{\small \texttt{Version \TPversion{} -- \TPdate}} |
| 139 |
\end{tabular} |
| 140 |
\end{center} |
| 141 |
\end{tcolorbox} |
| 142 |
\end{minipage} |
| 143 |
\end{center} |
| 144 |
|
| 145 |
\begin{center} |
| 146 |
\begin{tabular}{c} |
| 147 |
\texttt{Cédric Pierquet}\\ |
| 148 |
{\ttfamily c pierquet -- at -- outlook . fr}\\ |
| 149 |
\texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}} \\ |
| 150 |
\texttt{\url{https://github.com/cpierquet/latex-packages/tree/main/tikz-decofonts}} \\ |
| 151 |
\end{tabular} |
| 152 |
\end{center} |
| 153 |
|
| 154 |
\hrule |
| 155 |
|
| 156 |
\vfill |
| 157 |
|
| 158 |
\begin{tcblisting}{colframe=lightgray,colback=lightgray!5,listing only} |
| 159 |
%paintbrush effect |
| 160 |
\tkzbrush[color=blue]{DECORATION} |
| 161 |
%paintink effect |
| 162 |
\tkzink[color=orange]{DECORATION} |
| 163 |
%pixeletter effect |
| 164 |
\tkzpixl[color=violet]{DECORATION} |
| 165 |
%bicolor effect |
| 166 |
\tkzbicolor[colors=blue/red,style=ndiag]{\Huge\sffamily DECORATION} |
| 167 |
\tkzbicolor[colors=teal/orange,style=ellips]{\Huge\sffamily DECORATION} |
| 168 |
%surround effect |
| 169 |
\tkzsurround[color=orange]{$I= \displaystyle\int_{a}^{b} f(x) \textrm{d}x = F(b)-F(a)$} |
| 170 |
\end{tcblisting} |
| 171 |
|
| 172 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 173 |
\tkzbrush[color=blue]{DECORATION} |
| 174 |
\end{tcolorbox} |
| 175 |
|
| 176 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 177 |
\hfill\tkzink[color=orange]{DECORATION}\hfill~ |
| 178 |
\end{tcolorbox} |
| 179 |
|
| 180 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 181 |
\hfill\tkzpixl[color=violet]{Decoration} |
| 182 |
\end{tcolorbox} |
| 183 |
|
| 184 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 185 |
\hfill\tkzbicolor[colors=blue/red,style=ndiag]{\Huge\sffamily DECORATION}~~\tkzbicolor[colors=teal/orange,style=ellips]{\Huge\sffamily DECORATION}\hfill~ |
| 186 |
\end{tcolorbox} |
| 187 |
|
| 188 |
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5] |
| 189 |
\hfill\tkzsurround[color=orange]{$I= \displaystyle\int_{a}^{b} f(x) \textrm{d}x = F(b)-F(a)$}\hfill~ |
| 190 |
\end{tcolorbox} |
| 191 |
|
| 192 |
\vfill~ |
| 193 |
|
| 194 |
\hrule |
| 195 |
|
| 196 |
\vspace*{5mm} |
| 197 |
|
| 198 |
\textit{Ideas and parts of codes, with \texttt{CC\,BY-SA\,4.0} licenses, come from :} |
| 199 |
|
| 200 |
\begin{itemize} |
| 201 |
\item \href{https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz}{[link on tex.stackexchange]} from \textsf{user121799} for paintbrush; |
| 202 |
\item \href{https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842}{[link on tex.stackexchange]} from \textsf{user121799} for inkbrush. |
| 203 |
\end{itemize} |
| 204 |
|
| 205 |
\pagebreak |
| 206 |
|
| 207 |
\phantomsection |
| 208 |
|
| 209 |
\hypertarget{matoc}{} |
| 210 |
|
| 211 |
\tableofcontents |
| 212 |
|
| 213 |
\vspace*{5mm} |
| 214 |
|
| 215 |
%\hrule |
| 216 |
|
| 217 |
\pagebreak |
| 218 |
|
| 219 |
\section{Loading, useful packages, purposes and acknowledgments} |
| 220 |
|
| 221 |
\subsection{Loading and useful packages} |
| 222 |
|
| 223 |
In order to load \texttt{tikz-decofonts}, simply use: |
| 224 |
|
| 225 |
\begin{DemoCode}{listing only} |
| 226 |
\usepackage{tikz-decofonts} |
| 227 |
\end{DemoCode} |
| 228 |
|
| 229 |
Loaded packages are \texttt{tikz}, \texttt{tikz-3dplot}, \texttt{settobox}, \texttt{xintexpr}, \texttt{simplekv}, \texttt{listofitems}, \texttt{xstring}, \texttt{ifthen} and \texttt{calc}. |
| 230 |
|
| 231 |
Loaded \texttt{tikz.librairies} are \texttt{decorations}, \texttt{decorations.pathreplacing}, \texttt{calc}, \texttt{positioning}, \texttt{bbox}, \texttt{arrows.meta}, \texttt{shapes.callouts} and \texttt{bending}. |
| 232 |
|
| 233 |
\smallskip |
| 234 |
|
| 235 |
Globally, height of rendering is about 1cm, but some customization are available. |
| 236 |
|
| 237 |
\subsection{Purposes and acknowledgments} |
| 238 |
|
| 239 |
The purposes of this small package is not to provide full fonts, with all characters, but give restricted possibility to present \textbf{short} texts of title with \textit{cute} effects. |
| 240 |
|
| 241 |
\smallskip |
| 242 |
|
| 243 |
These decorations are not destined to be use for whole paragraphs or texts, but just for fun for small titles or small texts. |
| 244 |
|
| 245 |
\smallskip |
| 246 |
|
| 247 |
Since many calculations are required internally, compilation time can be increased, so be careful with intensive use! |
| 248 |
|
| 249 |
\smallskip |
| 250 |
|
| 251 |
\textit{Ideas and parts of codes, with \texttt{CC\,BY-SA\,4.0} licenses, come from:} |
| 252 |
|
| 253 |
\begin{itemize} |
| 254 |
\item \href{https://tex.stackexchange.com/questions/475141/simulating-paintbrush-strokes-in-tikz}{[link on tex.stackexchange]} from \textsf{user121799} for paintbrush; |
| 255 |
\item \href{https://tex.stackexchange.com/questions/460836/custom-line-cap-to-simulate-inked-line-in-tikz/460842#460842}{[link on tex.stackexchange]} from \textsf{user121799} for inkbrush. |
| 256 |
\end{itemize} |
| 257 |
|
| 258 |
Some adjustments (keys, paths) are maid from original code, but the global usage is due to the links above! |
| 259 |
|
| 260 |
\pagebreak |
| 261 |
|
| 262 |
\section{The different effects} |
| 263 |
|
| 264 |
\subsection{Paint brush} |
| 265 |
|
| 266 |
{\small\faBomb} The effect is \textbf{very} \textit{time-consuming} to compile!! |
| 267 |
|
| 268 |
\begin{DemoCode}{listing only} |
| 269 |
%only uppercase letters allowed |
| 270 |
\tkzbrush[color=...,lines=...,scale=...]<tikzpicture options>{short text} |
| 271 |
|
| 272 |
%color = black by default |
| 273 |
%lines = 12 by default |
| 274 |
%scale = 1 by default |
| 275 |
\end{DemoCode} |
| 276 |
|
| 277 |
\begin{DemoCode}{listing only} |
| 278 |
%default output |
| 279 |
\tkzbrush{TIKZ DECORATION} |
| 280 |
\end{DemoCode} |
| 281 |
|
| 282 |
\begin{DemoCode}{text only} |
| 283 |
%default output |
| 284 |
\tkzbrush{TIKZ DECORATION} |
| 285 |
|
| 286 |
\end{DemoCode} |
| 287 |
|
| 288 |
\begin{DemoCode}{listing only} |
| 289 |
%customization(s) (external file for speeding rendering ^^) |
| 290 |
\tkzbrush[color=red,lines=20,scale=1.5]{CUSTOM TEXT} |
| 291 |
\end{DemoCode} |
| 292 |
|
| 293 |
\begin{DemoCode}{text only} |
| 294 |
%customization(s) (external file for speeding rendering ^^) |
| 295 |
\includegraphics{tkzbrushA.pdf} |
| 296 |
\end{DemoCode} |
| 297 |
|
| 298 |
\pagebreak |
| 299 |
|
| 300 |
\subsection{Ink brush} |
| 301 |
|
| 302 |
\begin{DemoCode}{listing only} |
| 303 |
%only uppercase letters allowed |
| 304 |
\tkzink[color=...,thick=...,scale=...]<tikzpicture options>{short text} |
| 305 |
|
| 306 |
%color = black by default |
| 307 |
%thick = 3 by default |
| 308 |
%scale = 1 by default |
| 309 |
\end{DemoCode} |
| 310 |
|
| 311 |
\begin{DemoCode}{} |
| 312 |
%default output |
| 313 |
\tkzink{TIKZ DECORATION} |
| 314 |
\end{DemoCode} |
| 315 |
|
| 316 |
\begin{DemoCode}{} |
| 317 |
%customization(s) |
| 318 |
\tkzink[color=olive,thick=5,scale=2]{TIKZ DECORATION} |
| 319 |
\end{DemoCode} |
| 320 |
|
| 321 |
\pagebreak |
| 322 |
|
| 323 |
\subsection{Pixl brush} |
| 324 |
|
| 325 |
\begin{DemoCode}{listing only} |
| 326 |
%regular letters allowed (upper and/or lower), rendered characters are 5 columns x 7 lines |
| 327 |
\tkzpixl% |
| 328 |
[height=...,thick=...,color=...,gridcolor=...,border=..., |
| 329 |
offseth=...,offsetv=...,gridafter=...,nospaceafter=...] |
| 330 |
<tikzpicture options>{short text} |
| 331 |
|
| 332 |
\tkzpixletter% |
| 333 |
[height=...,thick=...,color=...,gridcolor=...,border=..., |
| 334 |
offseth=...,offsetv=...,gridafter=...,nospaceafter=...] |
| 335 |
<tikzpicture options>{letter} |
| 336 |
|
| 337 |
\tkzpixlquote%if problem with '... |
| 338 |
[height=...,thick=...,color=...,gridcolor=..., |
| 339 |
offseth=...,offsetv=...,gridafter=...,nospaceafter=...] |
| 340 |
<tikzpicture options> |
| 341 |
|
| 342 |
%height = 11mm by default, thick = 0.1mm by default |
| 343 |
%color = black by default, gridcolor = gray by default |
| 344 |
%offseth = 1 by default (squares left/right of regular character) |
| 345 |
%offsetv = 2 by default (squares above/below of regular character) |
| 346 |
%boder = false by default (boolean for adding border) |
| 347 |
%gridafter = false by default (boolean for showing grid after pixls) |
| 348 |
%nospaceafter = false by default (boolean for removeing hspace after pixls) |
| 349 |
\end{DemoCode} |
| 350 |
|
| 351 |
\begin{DemoCode}{} |
| 352 |
%default output, comparaison with character w/o offsets (5*7) |
| 353 |
\tkzpixl{And then, 1+1=2 !?!} and \tkzpixletter[offseth=0,offsetv=0]{*} |
| 354 |
\end{DemoCode} |
| 355 |
|
| 356 |
\begin{DemoCode}{} |
| 357 |
%customization(s) |
| 358 |
\tkzpixl[color=violet,height=1.75cm,gridafter,offsetv=3,border]{Small custo'm text} |
| 359 |
\end{DemoCode} |
| 360 |
|
| 361 |
\pagebreak |
| 362 |
|
| 363 |
\subsection{Bicolor effect} |
| 364 |
|
| 365 |
\begin{DemoCode}{listing only} |
| 366 |
%compatible with all fonts and/or sizes |
| 367 |
\tkzbicolor% |
| 368 |
[colors=...,style=...,intdelta=...] |
| 369 |
{text} |
| 370 |
|
| 371 |
\tkzbicolor%with paral style |
| 372 |
[paralcolors=...,style=paral,intdelta=...] |
| 373 |
{text} |
| 374 |
|
| 375 |
%style = midh/midv/rect/ellips/paral (paral by default) |
| 376 |
%colors = red/blue by default, |
| 377 |
%paralcolors = red/blue/orange/gray by default |
| 378 |
%intdelta = 0.66 by default, percentage of int dim for ellips/rect |
| 379 |
\end{DemoCode} |
| 380 |
|
| 381 |
\begin{DemoCode}{listing only} |
| 382 |
\def\sampleformula{$\displaystyle\int_0^1 \dfrac{1+x}{1+x^2}\,\mathrm{d}x$} |
| 383 |
\def\sampletxt{But I must explain to you how all this mistaken idea of denouncing pleasure.} |
| 384 |
\def\samplenum{1500} |
| 385 |
\end{DemoCode} |
| 386 |
|
| 387 |
\begin{DemoCode}{} |
| 388 |
\tkzbicolor[style=midh]{\sampleformula} |
| 389 |
or \tkzbicolor[colors=violet/magenta,style=midv]{\sampleformula} |
| 390 |
or \tkzbicolor[colors=darkgray/olive,style=ndiag]{\sampleformula} |
| 391 |
or \tkzbicolor[colors=orange/teal,style=sdiag]{\sampleformula} |
| 392 |
or \tkzbicolor[colors=orange/teal,style=ellips]{\sampleformula} |
| 393 |
or \tkzbicolor[colors=pink/violet,style=rect]{\sampleformula} |
| 394 |
\end{DemoCode} |
| 395 |
|
| 396 |
\begin{DemoCode}{} |
| 397 |
\tkzbicolor[style=midh]{\sampletxt}\par |
| 398 |
\tkzbicolor[colors=violet/magenta,style=midv]{\sampletxt}\par |
| 399 |
\tkzbicolor[colors=darkgray/olive,style=ndiag]{\sampletxt}\par |
| 400 |
\tkzbicolor[colors=orange/teal,style=sdiag]{\sampletxt}\par |
| 401 |
\tkzbicolor[colors=orange/teal,style=ellips]{\sampletxt}\par |
| 402 |
\tkzbicolor[colors=pink/violet,style=rect]{\sampletxt} |
| 403 |
\end{DemoCode} |
| 404 |
|
| 405 |
\begin{DemoCode}{} |
| 406 |
\tkzbicolor[style=midh]{\parbox{2.5cm}{\sampletxt}} |
| 407 |
\tkzbicolor[colors=violet/gray,style=midv]{\parbox{2.5cm}{\sampletxt}} |
| 408 |
\tkzbicolor[colors=darkgray/olive,style=ndiag]{\parbox{2.5cm}{\sampletxt}} |
| 409 |
\tkzbicolor[colors=orange/cyan,style=sdiag]{\parbox{2.5cm}{\sampletxt}} |
| 410 |
\tkzbicolor[colors=pink/violet,style=ellips]{\parbox{2.5cm}{\sampletxt}} |
| 411 |
\tkzbicolor[colors=pink/violet,style=ellips,intdelta=0.85]{\parbox{2.5cm}{\sampletxt}} |
| 412 |
\tkzbicolor[colors=cyan/darkgray,style=rect]{\parbox{2.5cm}{\sampletxt}} |
| 413 |
\end{DemoCode} |
| 414 |
|
| 415 |
\begin{DemoCode}{} |
| 416 |
\tkzbicolor[style=paral]{\parbox{6cm}{\large\sffamily\sampletxt}} |
| 417 |
\end{DemoCode} |
| 418 |
|
| 419 |
\begin{DemoCode}{} |
| 420 |
\tkzbicolor[style=midh]{\samplenum}\par |
| 421 |
\tkzbicolor[colors=violet/magenta,style=midv]{\samplenum}\par |
| 422 |
\tkzbicolor[colors=darkgray/olive,style=ndiag]{\samplenum}\par |
| 423 |
\tkzbicolor[colors=orange/teal,style=sdiag]{\samplenum}\par |
| 424 |
\tkzbicolor[colors=orange/teal,style=ellips]{\samplenum} |
| 425 |
\end{DemoCode} |
| 426 |
|
| 427 |
\pagebreak |
| 428 |
|
| 429 |
\subsection{Comic bubble} |
| 430 |
|
| 431 |
\begin{DemoCode}{listing only} |
| 432 |
%style tikz |
| 433 |
\tikzset{comicbubble/.style args={#1#2}{% |
| 434 |
inner sep=1mm,line join=round,rectangle callout,draw,very thick, |
| 435 |
text width=#1,align=flush center,callout relative pointer=#2}} |
| 436 |
\end{DemoCode} |
| 437 |
|
| 438 |
\begin{DemoCode}{listing only} |
| 439 |
%independant macro |
| 440 |
\tkzcomicbubble[% |
| 441 |
width=...,coltxt=...,colbg=...,colframe=...,pospointer=(...), |
| 442 |
font=...,rcorners=true/false]% |
| 443 |
<tikz options>{text} |
| 444 |
|
| 445 |
%with tikzpicture environment |
| 446 |
\begin{tikzpicture} |
| 447 |
%... |
| 448 |
\tkzcomicbubble*[% |
| 449 |
width=...,coltxt=...,colbg=...,colframe=...,pospointer=(...), |
| 450 |
font=...,rcorners=true/false]% |
| 451 |
<tikz options>{text} |
| 452 |
\end{tikzpicture} |
| 453 |
\end{DemoCode} |
| 454 |
|
| 455 |
\begin{DemoCode}{} |
| 456 |
\def\mytext{Let's play with Pythagoras !\relax} |
| 457 |
\tkzcomicbubble[font=\large\bfseries\itshape]{\mytext}~~ |
| 458 |
\tkzcomicbubble% |
| 459 |
[width=3cm,coltxt=red,colframe=teal,font=\bfseries, |
| 460 |
colbg=yellow!15,pospointer={(150:1em)},rcorners]% |
| 461 |
<thick>% |
| 462 |
{\mytext} |
| 463 |
\end{DemoCode} |
| 464 |
|
| 465 |
\begin{DemoCode}{} |
| 466 |
%\usepackage{setspace} |
| 467 |
\def\mytext{Let's use Pythagoras !\relax} |
| 468 |
{\tikz[rotate=-15,transform shape]\tkzcomicbubble*[width=2.5cm,font=\large\sffamily]<execute at begin node={\setlength{\baselineskip}{0.75\baselineskip}}>{\mytext};} |
| 469 |
\end{DemoCode} |
| 470 |
|
| 471 |
\pagebreak |
| 472 |
|
| 473 |
\subsection{Surround effect} |
| 474 |
|
| 475 |
\begin{DemoCode}{listing only} |
| 476 |
\tkzsurround[width=...,node=...,color=...]{text} |
| 477 |
|
| 478 |
%width = width of line (1.25pt by default) |
| 479 |
%color = red by default |
| 480 |
%node = name of node (AAAAZ by default) |
| 481 |
\end{DemoCode} |
| 482 |
|
| 483 |
\begin{DemoCode}{} |
| 484 |
\tkzsurround[node=AAA]{This is a sample text} and we're trying to see what it does |
| 485 |
by \tkzsurround[color=blue,width=1.5pt,node=BBB]{surrounding} certain portions of the text! |
| 486 |
|
| 487 |
{\tikz[remember picture,overlay] |
| 488 |
\draw[densely dashed,orange,<->,very thick,>=latex] |
| 489 |
([yshift=-1mm]AAA.south east) to[bend right] ([yshift=-1mm]BBB.south west) ; |
| 490 |
} |
| 491 |
\end{DemoCode} |
| 492 |
|
| 493 |
\subsection{Underline effect} |
| 494 |
|
| 495 |
\begin{DemoCode}{listing only} |
| 496 |
\tkzunderline[width=...,node=...,color=...,height=...]{text} |
| 497 |
|
| 498 |
%width = width of line (1.25pt by default) |
| 499 |
%color = red by default |
| 500 |
%height = global height of underlining (10mm by default) |
| 501 |
%node = name of node (AAAAZ by default) |
| 502 |
\end{DemoCode} |
| 503 |
|
| 504 |
\begin{DemoCode}{} |
| 505 |
\tkzunderline{This is a sample text} with |
| 506 |
\tkzunderline[color=blue,width=1.5pt,height=15mm]{underlining} certain |
| 507 |
\tkzunderline[color=yellow,width=1pt,height=15pt]{portions}! |
| 508 |
\end{DemoCode} |
| 509 |
|
| 510 |
\pagebreak |
| 511 |
|
| 512 |
\subsection{Arrow with fitted text} |
| 513 |
|
| 514 |
\begin{DemoCode}{listing only} |
| 515 |
\tkzbrush[<keys>]<tikzpicture options>{text} |
| 516 |
|
| 517 |
%color = color of arrow (gray) |
| 518 |
%txtcolor = color of text (white) |
| 519 |
%width = width 'with or without ending' width of arrow (2cm) |
| 520 |
%bheight = big height (8mm) |
| 521 |
%sheight = small height (4mm) |
| 522 |
%hoffset = text h offset (0.2mm) |
| 523 |
%shadow = boolean for shadow (true) |
| 524 |
%shownodes = boolean for helping nodes (false) |
| 525 |
%expand = use 'max' width for txt (false) |
| 526 |
%globalwidth = boolean for width including 'ending' (false) |
| 527 |
\end{DemoCode} |
| 528 |
|
| 529 |
Nodes (eg for positionning) are: |
| 530 |
% |
| 531 |
\begin{multicols}{2} |
| 532 |
\begin{itemize} |
| 533 |
\item \texttt{arrow-bottomleft} |
| 534 |
\item \texttt{arrow-topleft} |
| 535 |
\item \texttt{arrow-begin} |
| 536 |
\item \texttt{arrow-end} |
| 537 |
\item \texttt{arrow-textcenter} |
| 538 |
\item \texttt{arrow-bottom} |
| 539 |
\item \texttt{arrow-textright} |
| 540 |
\item \texttt{arrow-top} |
| 541 |
\item \texttt{arrow-smallbottom} |
| 542 |
\item \texttt{arrow-smalltop} |
| 543 |
\end{itemize} |
| 544 |
\end{multicols} |
| 545 |
|
| 546 |
\begin{DemoCode}{} |
| 547 |
\tkzfittextinarrow% |
| 548 |
[bheight=3cm,sheight=1.75cm,width=6cm,color=orange,shownodes]% |
| 549 |
{\vphantom{q}Demo} |
| 550 |
\end{DemoCode} |
| 551 |
|
| 552 |
\begin{DemoCode}{} |
| 553 |
\tkzfittextinarrow% |
| 554 |
[bheight=3cm,sheight=1.75cm,width=6cm,color=teal,globalwidth,expand,txtcolor=yellow]% |
| 555 |
{\vphantom{q}\bfseries\sffamily Demo} |
| 556 |
\end{DemoCode} |
| 557 |
|
| 558 |
\begin{DemoCode}{} |
| 559 |
\tkzfittextinarrow% |
| 560 |
[bheight=2cm,sheight=1cm,width=5cm,color=orange,expand]% |
| 561 |
{\vphantom{q}Démonstration} |
| 562 |
\end{DemoCode} |
| 563 |
|
| 564 |
\begin{DemoCode}{} |
| 565 |
Text before |
| 566 |
\tkzfittextinarrow% |
| 567 |
[bheight=1em,sheight=0.6em,width=3em,color=green!50!black]% |
| 568 |
<rotate=-15,baseline=(arrow-smallbottom)>% |
| 569 |
{\itshape My examples} |
| 570 |
\tkzfittextinarrow% |
| 571 |
[bheight=1em,sheight=0.6em,width=3em,color=green!50!black,expand]% |
| 572 |
<rotate=15,baseline=(arrow-textcenter)>% |
| 573 |
{\ttfamily My examples} |
| 574 |
with text after |
| 575 |
\end{DemoCode} |
| 576 |
|
| 577 |
\pagebreak |
| 578 |
|
| 579 |
\subsection{Freehand circled text} |
| 580 |
|
| 581 |
\begin{DemoCode}{listing only} |
| 582 |
\tkzcircledtxt[<keys>]<tikzpicture options>{text} |
| 583 |
|
| 584 |
%height = height for manual insertion (2em) |
| 585 |
%width = width for manual insertion (2.3em) |
| 586 |
%thickness = thickness, percentage of height (0.05) |
| 587 |
%absolute thickness = absolute thickness, length (-) |
| 588 |
%fill color = bg color (lightgray!30) |
| 589 |
%rule color = boxrule color (black) |
| 590 |
%rotate = optional rotation (0) |
| 591 |
%auto = auto width/height/raise relative to len of inside text (0) |
| 592 |
%fill = boolean for filling (true) |
| 593 |
%font = optional font |
| 594 |
%vstretch = coefficient for vertical stretch, with auto usage (1.5) |
| 595 |
%hoffset = coefficient for horizontal offset with auto usage (0.8) |
| 596 |
%random = boolean for random effect (false) |
| 597 |
%arabic = boolean for arabic version of counter (false) |
| 598 |
%alph = boolean for alph version of counter (false) |
| 599 |
%Alph = boolean for Alpha version of counter (false) |
| 600 |
\end{DemoCode} |
| 601 |
|
| 602 |
\begin{DemoCode}{} |
| 603 |
%manual insertion (height + width + font) |
| 604 |
{q\LARGE\sffamily\bfseries\tkzcircledtxt{99}\tkzcircledtxt[absolute thickness=1pt]{99}H}\\ |
| 605 |
{q\LARGE\sffamily\bfseries\tkzcircledtxt[random]{99}H}\\ |
| 606 |
{q\LARGE\sffamily\bfseries\tkzcircledtxt[random]{text}H} |
| 607 |
\end{DemoCode} |
| 608 |
|
| 609 |
\begin{DemoCode}{} |
| 610 |
%automatic insertion relative to len of small text |
| 611 |
{\Huge q\tkzcircledtxt[auto=1]{7}H or q\tkzcircledtxt[auto=2]{7}H}\\ |
| 612 |
{\Huge q\tkzcircledtxt[auto=2]{99}H or q\tkzcircledtxt[auto=3]{99}H}\\ |
| 613 |
{\Huge q\tkzcircledtxt[auto=2]{154}H or q\tkzcircledtxt[auto=3]{154}H } |
| 614 |
\end{DemoCode} |
| 615 |
|
| 616 |
\begin{DemoCode}{} |
| 617 |
%with custom font |
| 618 |
{\Huge\sffamily q\tkzcircledtxt[font=\small\ttfamily,auto=3]{105}H} |
| 619 |
\end{DemoCode} |
| 620 |
|
| 621 |
\begin{DemoCode}{} |
| 622 |
\tkzcircledtxt[auto=1]{7} Let $f$ defined by $f(x)=x^{2}+5x-3$. |
| 623 |
\end{DemoCode} |
| 624 |
|
| 625 |
\begin{DemoCode}{} |
| 626 |
%with enumitem package |
| 627 |
\begin{enumerate}[label={% |
| 628 |
\color{darkgray}% |
| 629 |
\tkzcircledtxt[thickness=0.075,fill=false,arabic,font=\large\bfseries,auto=1,% |
| 630 |
fill color=teal!25,rule color=orange]{\arabic*}% |
| 631 |
}% |
| 632 |
] |
| 633 |
\item AAF |
| 634 |
\item AAF |
| 635 |
\begin{enumerate}[label={% |
| 636 |
\color{red}% |
| 637 |
\tkzcircledtxt[thickness=0.0375,fill=false,hoffset=0.25,alph,% |
| 638 |
font=\bfseries,auto=1,rule color=teal]{\alph*}% |
| 639 |
}% |
| 640 |
] |
| 641 |
\item AA |
| 642 |
\item BGHMG |
| 643 |
\end{enumerate} |
| 644 |
\item AAF |
| 645 |
\item AAF |
| 646 |
\item AAF |
| 647 |
\item AAF |
| 648 |
\item AAF |
| 649 |
\item AAF |
| 650 |
\item AAF |
| 651 |
\end{enumerate} |
| 652 |
\end{DemoCode} |
| 653 |
|
| 654 |
\pagebreak |
| 655 |
|
| 656 |
\subsection{Block (3D) of letters} |
| 657 |
|
| 658 |
\begin{DemoCode}{listing only} |
| 659 |
\tkzcircledtxt[<keys>]<tikzpicture options>{list of blocks} |
| 660 |
|
| 661 |
%height = height dim or auto/dauto for inline usage (dauto) |
| 662 |
%hstretch = h sep coefficient (1.05) |
| 663 |
%spacestretch = space sep coefficient (0.25) |
| 664 |
%dstrut = characters for dauto usage (qH) |
| 665 |
%strut = characters for auto usage (H) |
| 666 |
%font = font for labels (\huge\bfseries\sffamily) |
| 667 |
|
| 668 |
%list of blocks within letter1/colorblock1/colorletter1,... |
| 669 |
%use * for 'space' |
| 670 |
\end{DemoCode} |
| 671 |
|
| 672 |
\begin{DemoCode}{} |
| 673 |
{\LARGE% |
| 674 |
q% |
| 675 |
\tkzletterblock% |
| 676 |
{% |
| 677 |
C/red/white,H/blue/white,A/violet/white,% |
| 678 |
P/yellow/black,T/white/black,E/orange/black,% |
| 679 |
R/teal/white,*/magenta/white,0/cyan/white,7/pink/white% |
| 680 |
}% |
| 681 |
H% |
| 682 |
} |
| 683 |
\end{DemoCode} |
| 684 |
|
| 685 |
\begin{DemoCode}{} |
| 686 |
\sffamily\bfseries\Huge% |
| 687 |
H% |
| 688 |
\tkzletterblock% |
| 689 |
[height=auto]% |
| 690 |
{% |
| 691 |
L/red/white,A/blue/white,T/violet/white,E/cyan/white,X/pink/white% |
| 692 |
}% |
| 693 |
H |
| 694 |
\end{DemoCode} |
| 695 |
|
| 696 |
\begin{DemoCode}{} |
| 697 |
%green lines for visualizing manual height |
| 698 |
{\tikz\draw[thick,green] (0,0)--(0,1.75cm);}% |
| 699 |
\tkzletterblock% |
| 700 |
[height=1.75cm,hstretch=1.25,font=\Huge\ttfamily,spacestretch=0.5]% |
| 701 |
{% |
| 702 |
D/yellow/black,E/white/black,*//,C/orange/black,O/teal/white% |
| 703 |
}% |
| 704 |
{\tikz\draw[thick,green] (0,0)--(0,1.75cm);}% |
| 705 |
\end{DemoCode} |
| 706 |
|
| 707 |
\pagebreak |
| 708 |
|
| 709 |
\subsection{Underline with pen pictogram} |
| 710 |
|
| 711 |
\begin{DemoCode}{listing only} |
| 712 |
%main macro |
| 713 |
\tkzunderlinepen[keys]{text} |
| 714 |
%macro with hphantom of pen |
| 715 |
\phantomulinewithpen |
| 716 |
|
| 717 |
%thick = thickness (0.8pt) |
| 718 |
%color = color for underling |
| 719 |
%chardepth = characters for depth calculus |
| 720 |
%vstretchoffset = float for raising depth (0.5) |
| 721 |
%scale = scale of pen (1) |
| 722 |
%swap = boolean for 'downside' version (false) |
| 723 |
\end{DemoCode} |
| 724 |
|
| 725 |
\begin{DemoCode}{} |
| 726 |
\tkzunderlinepen{Exercise n°1}\par |
| 727 |
\lipsum[1][1-3] |
| 728 |
|
| 729 |
\tkzunderlinepen[swap]{Exercise n°1}\par |
| 730 |
\phantomulinewithpen\lipsum[1][1-3] |
| 731 |
\end{DemoCode} |
| 732 |
|
| 733 |
\begin{DemoCode}{} |
| 734 |
{\bfseries\sffamily\LARGE\textcolor{blue}{\tkzunderlinepen[thick=1pt]{Exercise n°2}}}\par |
| 735 |
\lipsum[1][1-3] |
| 736 |
|
| 737 |
{\bfseries\sffamily\LARGE\textcolor{violet}{\tkzunderlinepen[color=teal]{Exercise n°3}}}\par |
| 738 |
\lipsum[1][1-3] |
| 739 |
|
| 740 |
{\bfseries\sffamily\LARGE\textcolor{brown}{\tkzunderlinepen[color=orange]{Exercise (important) n°4}}}\par |
| 741 |
\lipsum[1][1-3] |
| 742 |
\end{DemoCode} |
| 743 |
|
| 744 |
\pagebreak |
| 745 |
|
| 746 |
\section{History} |
| 747 |
|
| 748 |
\texttt{0.1.8: Pen-underline} |
| 749 |
|
| 750 |
\texttt{0.1.7: AlphabetCubes} |
| 751 |
|
| 752 |
\texttt{0.1.6: Thickness for 'freehand' circled text} |
| 753 |
|
| 754 |
\texttt{0.1.5: Small 'freehand' circled text} |
| 755 |
|
| 756 |
\texttt{0.1.4: Arrow with fitted text} |
| 757 |
|
| 758 |
\texttt{0.1.3: Underline or surround effect} |
| 759 |
|
| 760 |
\texttt{0.1.2: Comic bubble} |
| 761 |
|
| 762 |
\texttt{0.1.1: Bicolor effect} |
| 763 |
|
| 764 |
\texttt{0.1.0: Initial version} |
| 765 |
|
| 766 |
\end{document} |