Debian Codegraph @

texmf-dist/doc/latex/tutodoc/tutodoc-en.tex

raw
1 % ==================== %
2 % == RESOURCES USED == %
3 % ==================== %
4
5
6 \begin{filecontents*}[overwrite]{gallery-showcase-bw.tex}
7 \documentclass[theme = bw]{tutodoc}
8
9 \usepackage{multicol}
10 \usepackage{lastpage}
11
12 \renewcommand*\pagemark{%
13 \usekomafont{pagenumber}{\thepage\kern1pt/\kern1pt\pageref*{LastPage}}%
14 }
15
16
17 \newcommand\thisstyle{bw}
18
19
20 \newcommand\myexrmktext{
21 \tdocversion{1.7.0}[2024-12-04]
22 In the flow of the text, it is always useful to be able to provide examples and comments to supplement the main content.
23 }
24
25
26 \newcommand\myadmotext{
27 Depending on the context of use, it is sometimes necessary to be able to highlight content by indicating its degree of importance.
28 }
29
30 \newcommand\myhighlightedtextnonote{
31 What to say?
32 I don't know, but it's nice. No ?
33 }
34
35 \newcommand\myhighlightedtext{
36 What to say\,%
37 \footnote{
38 Let's not forget the footnotes...
39 }?
40 I don't know, but it's nice. No ?
41 }
42
43
44 \newcommand\mychgestext{
45 In a change log, it is important to visualise the types of changes clearly. This makes it easier for the user to read!
46 }
47
48
49 \ExplSyntaxOn
50
51 \int_new:N \g__tutodoc_for_doc_int
52
53 \ExplSyntaxOff
54
55
56
57 \begin{document}
58
59 \textsf{\Huge\bfseries The \texttt{"\thisstyle"} theme}
60
61 \section{Liens}
62
63 {\Large\bfseries \href{https://github.com/bc-tools/for-latex/tree/main/tutodoc}{A very big link}}, but at least we can see it.
64
65
66
67 \section{\LaTeX\ listings}
68
69 Typing inline code such as \tdoclatexin{E = m c^2 \neq \pi \neq \frac{3}{14}} is useful, as is showing use cases such as the following one.
70
71 \begin{tdoclatex}
72 Formatted \LaTeX\ code is great: $E = m c^2$ or $pi \neq \frac{3}{14}$.
73 \end{tdoclatex}
74
75
76 There's also a less invasive side-by-side mode. Nice! No ?
77
78 \begin{tdoclatex}<\tdoctcb{sbs}>
79 Formatted \LaTeX\ code is great: \\
80 $E = m c^2$ or $\pi \neq \frac{3}{14}$.
81 \end{tdoclatex}
82
83
84
85 \section{Highlighting, versioning and dating}
86
87 \subsection{tdocexa, tdocrem}
88
89 \myexrmktext
90
91 \ExplSyntaxOn
92
93 \seq_map_inline:Nn \g__tutodoc_focus_std_seq {
94 \begin{tdoc#1}
95 \myhighlightedtext
96 \end{tdoc#1}
97 }
98
99 \ExplSyntaxOff
100
101
102
103 \subsection{tdocnote, tdoctip...}
104
105 \myadmotext
106
107 \ExplSyntaxOn
108
109 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
110
111 \ifcsundef{g__tutodoc_focus_color_seq}{
112 \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
113 \int_gincr:N \g__tutodoc_for_doc_int
114
115 \begin{tdoc#1}
116 \int_compare:nTF
117 {\g__tutodoc_for_doc_int = 1 }
118 { \myhighlightedtext }
119 { \myhighlightedtextnonote }
120 \end{tdoc#1}
121 }
122 } {
123 \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
124 \int_gincr:N \g__tutodoc_for_doc_int
125
126 \begin{tdoc#1}
127 \int_compare:nTF
128 {\g__tutodoc_for_doc_int = 1 }
129 { \myhighlightedtext }
130 { \myhighlightedtextnonote }
131 \end{tdoc#1}
132 }
133 }
134
135 \ExplSyntaxOff
136
137
138
139 \subsection{tdocbreak, tdocfix...}
140
141 \tdocstartproj{A new demonstration section...}
142
143 \begin{tdoctodo}
144 \item A gallery would be welcome...
145 \end{tdoctodo}
146
147 \ifcsundef{g__tutodoc_topic_change_seq}{
148 \medskip
149 }{}
150
151 \mychgestext
152
153 \ifcsundef{g__tutodoc_topic_change_seq}{
154 \medskip
155 }{}
156
157 \ExplSyntaxOn
158
159 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
160
161 \begin{tabular}{%
162 @{\hskip 0pt}p{.26\linewidth}%
163 *{3}{@{\hskip 7pt}p{.23\linewidth}}@{\hskip 0pt}%
164 }
165 \ifcsundef{g__tutodoc_topic_change_seq}{
166 \prop_map_inline:Nn \g__tutodoc_topic_change_prop {
167 \int_gincr:N \g__tutodoc_for_doc_int
168
169 \vspace{-12pt}
170
171 \begin{tdoc#1}
172 \item Infos...
173 \end{tdoc#1}
174
175 \int_compare:nTF
176 {\g__tutodoc_for_doc_int = 4 }
177 { \\ }
178 { & }
179 }
180 }{
181 \seq_map_inline:Nn \g__tutodoc_topic_change_seq {
182 \int_gincr:N \g__tutodoc_for_doc_int
183
184 \vspace{-5pt}
185
186 \begin{tdoc#1}
187 \item Infos...
188 \end{tdoc#1}
189
190 \int_compare:nTF
191 {\g__tutodoc_for_doc_int = 4 }
192 { \\ }
193 { & }
194 }
195 }
196 \end{tabular}
197
198 \ExplSyntaxOff
199
200 \end{document}
201
202 \end{filecontents*}
203
204 \begin{filecontents*}[overwrite]{gallery-showcase-color.tex}
205 \documentclass[theme = color]{tutodoc}
206
207 \usepackage{multicol}
208 \usepackage{lastpage}
209
210 \renewcommand*\pagemark{%
211 \usekomafont{pagenumber}{\thepage\kern1pt/\kern1pt\pageref*{LastPage}}%
212 }
213
214
215 \newcommand\thisstyle{color}
216
217
218 \newcommand\myexrmktext{
219 \tdocversion{1.7.0}[2024-12-04]
220 In the flow of the text, it is always useful to be able to provide examples and comments to supplement the main content.
221 }
222
223
224 \newcommand\myadmotext{
225 Depending on the context of use, it is sometimes necessary to be able to highlight content by indicating its degree of importance.
226 }
227
228 \newcommand\myhighlightedtextnonote{
229 What to say?
230 I don't know, but it's nice. No ?
231 }
232
233 \newcommand\myhighlightedtext{
234 What to say\,%
235 \footnote{
236 Let's not forget the footnotes...
237 }?
238 I don't know, but it's nice. No ?
239 }
240
241
242 \newcommand\mychgestext{
243 In a change log, it is important to visualise the types of changes clearly. This makes it easier for the user to read!
244 }
245
246
247 \ExplSyntaxOn
248
249 \int_new:N \g__tutodoc_for_doc_int
250
251 \ExplSyntaxOff
252
253
254
255 \begin{document}
256
257 \textsf{\Huge\bfseries The \texttt{"\thisstyle"} theme}
258
259 \section{Liens}
260
261 {\Large\bfseries \href{https://github.com/bc-tools/for-latex/tree/main/tutodoc}{A very big link}}, but at least we can see it.
262
263
264
265 \section{\LaTeX\ listings}
266
267 Typing inline code such as \tdoclatexin{E = m c^2 \neq \pi \neq \frac{3}{14}} is useful, as is showing use cases such as the following one.
268
269 \begin{tdoclatex}
270 Formatted \LaTeX\ code is great: $E = m c^2$ or $pi \neq \frac{3}{14}$.
271 \end{tdoclatex}
272
273
274 There's also a less invasive side-by-side mode. Nice! No ?
275
276 \begin{tdoclatex}<\tdoctcb{sbs}>
277 Formatted \LaTeX\ code is great: \\
278 $E = m c^2$ or $\pi \neq \frac{3}{14}$.
279 \end{tdoclatex}
280
281
282
283 \section{Highlighting, versioning and dating}
284
285 \subsection{tdocexa, tdocrem}
286
287 \myexrmktext
288
289 \ExplSyntaxOn
290
291 \seq_map_inline:Nn \g__tutodoc_focus_std_seq {
292 \begin{tdoc#1}
293 \myhighlightedtext
294 \end{tdoc#1}
295 }
296
297 \ExplSyntaxOff
298
299
300
301 \subsection{tdocnote, tdoctip...}
302
303 \myadmotext
304
305 \ExplSyntaxOn
306
307 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
308
309 \ifcsundef{g__tutodoc_focus_color_seq}{
310 \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
311 \int_gincr:N \g__tutodoc_for_doc_int
312
313 \begin{tdoc#1}
314 \int_compare:nTF
315 {\g__tutodoc_for_doc_int = 1 }
316 { \myhighlightedtext }
317 { \myhighlightedtextnonote }
318 \end{tdoc#1}
319 }
320 } {
321 \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
322 \int_gincr:N \g__tutodoc_for_doc_int
323
324 \begin{tdoc#1}
325 \int_compare:nTF
326 {\g__tutodoc_for_doc_int = 1 }
327 { \myhighlightedtext }
328 { \myhighlightedtextnonote }
329 \end{tdoc#1}
330 }
331 }
332
333 \ExplSyntaxOff
334
335
336
337 \subsection{tdocbreak, tdocfix...}
338
339 \tdocstartproj{A new demonstration section...}
340
341 \begin{tdoctodo}
342 \item A gallery would be welcome...
343 \end{tdoctodo}
344
345 \ifcsundef{g__tutodoc_topic_change_seq}{
346 \medskip
347 }{}
348
349 \mychgestext
350
351 \ifcsundef{g__tutodoc_topic_change_seq}{
352 \medskip
353 }{}
354
355 \ExplSyntaxOn
356
357 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
358
359 \begin{tabular}{%
360 @{\hskip 0pt}p{.26\linewidth}%
361 *{3}{@{\hskip 7pt}p{.23\linewidth}}@{\hskip 0pt}%
362 }
363 \ifcsundef{g__tutodoc_topic_change_seq}{
364 \prop_map_inline:Nn \g__tutodoc_topic_change_prop {
365 \int_gincr:N \g__tutodoc_for_doc_int
366
367 \vspace{-12pt}
368
369 \begin{tdoc#1}
370 \item Infos...
371 \end{tdoc#1}
372
373 \int_compare:nTF
374 {\g__tutodoc_for_doc_int = 4 }
375 { \\ }
376 { & }
377 }
378 }{
379 \seq_map_inline:Nn \g__tutodoc_topic_change_seq {
380 \int_gincr:N \g__tutodoc_for_doc_int
381
382 \vspace{-5pt}
383
384 \begin{tdoc#1}
385 \item Infos...
386 \end{tdoc#1}
387
388 \int_compare:nTF
389 {\g__tutodoc_for_doc_int = 4 }
390 { \\ }
391 { & }
392 }
393 }
394 \end{tabular}
395
396 \ExplSyntaxOff
397
398 \end{document}
399
400 \end{filecontents*}
401
402 \begin{filecontents*}[overwrite]{gallery-showcase-dark.tex}
403 \documentclass[theme = dark]{tutodoc}
404
405 \usepackage{multicol}
406 \usepackage{lastpage}
407
408 \renewcommand*\pagemark{%
409 \usekomafont{pagenumber}{\thepage\kern1pt/\kern1pt\pageref*{LastPage}}%
410 }
411
412
413 \newcommand\thisstyle{dark}
414
415
416 \newcommand\myexrmktext{
417 \tdocversion{1.7.0}[2024-12-04]
418 In the flow of the text, it is always useful to be able to provide examples and comments to supplement the main content.
419 }
420
421
422 \newcommand\myadmotext{
423 Depending on the context of use, it is sometimes necessary to be able to highlight content by indicating its degree of importance.
424 }
425
426 \newcommand\myhighlightedtextnonote{
427 What to say?
428 I don't know, but it's nice. No ?
429 }
430
431 \newcommand\myhighlightedtext{
432 What to say\,%
433 \footnote{
434 Let's not forget the footnotes...
435 }?
436 I don't know, but it's nice. No ?
437 }
438
439
440 \newcommand\mychgestext{
441 In a change log, it is important to visualise the types of changes clearly. This makes it easier for the user to read!
442 }
443
444
445 \ExplSyntaxOn
446
447 \int_new:N \g__tutodoc_for_doc_int
448
449 \ExplSyntaxOff
450
451
452
453 \begin{document}
454
455 \textsf{\Huge\bfseries The \texttt{"\thisstyle"} theme}
456
457 \section{Liens}
458
459 {\Large\bfseries \href{https://github.com/bc-tools/for-latex/tree/main/tutodoc}{A very big link}}, but at least we can see it.
460
461
462
463 \section{\LaTeX\ listings}
464
465 Typing inline code such as \tdoclatexin{E = m c^2 \neq \pi \neq \frac{3}{14}} is useful, as is showing use cases such as the following one.
466
467 \begin{tdoclatex}
468 Formatted \LaTeX\ code is great: $E = m c^2$ or $pi \neq \frac{3}{14}$.
469 \end{tdoclatex}
470
471
472 There's also a less invasive side-by-side mode. Nice! No ?
473
474 \begin{tdoclatex}<\tdoctcb{sbs}>
475 Formatted \LaTeX\ code is great: \\
476 $E = m c^2$ or $\pi \neq \frac{3}{14}$.
477 \end{tdoclatex}
478
479
480
481 \section{Highlighting, versioning and dating}
482
483 \subsection{tdocexa, tdocrem}
484
485 \myexrmktext
486
487 \ExplSyntaxOn
488
489 \seq_map_inline:Nn \g__tutodoc_focus_std_seq {
490 \begin{tdoc#1}
491 \myhighlightedtext
492 \end{tdoc#1}
493 }
494
495 \ExplSyntaxOff
496
497
498
499 \subsection{tdocnote, tdoctip...}
500
501 \myadmotext
502
503 \ExplSyntaxOn
504
505 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
506
507 \ifcsundef{g__tutodoc_focus_color_seq}{
508 \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
509 \int_gincr:N \g__tutodoc_for_doc_int
510
511 \begin{tdoc#1}
512 \int_compare:nTF
513 {\g__tutodoc_for_doc_int = 1 }
514 { \myhighlightedtext }
515 { \myhighlightedtextnonote }
516 \end{tdoc#1}
517 }
518 } {
519 \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
520 \int_gincr:N \g__tutodoc_for_doc_int
521
522 \begin{tdoc#1}
523 \int_compare:nTF
524 {\g__tutodoc_for_doc_int = 1 }
525 { \myhighlightedtext }
526 { \myhighlightedtextnonote }
527 \end{tdoc#1}
528 }
529 }
530
531 \ExplSyntaxOff
532
533
534
535 \subsection{tdocbreak, tdocfix...}
536
537 \tdocstartproj{A new demonstration section...}
538
539 \begin{tdoctodo}
540 \item A gallery would be welcome...
541 \end{tdoctodo}
542
543 \ifcsundef{g__tutodoc_topic_change_seq}{
544 \medskip
545 }{}
546
547 \mychgestext
548
549 \ifcsundef{g__tutodoc_topic_change_seq}{
550 \medskip
551 }{}
552
553 \ExplSyntaxOn
554
555 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
556
557 \begin{tabular}{%
558 @{\hskip 0pt}p{.26\linewidth}%
559 *{3}{@{\hskip 7pt}p{.23\linewidth}}@{\hskip 0pt}%
560 }
561 \ifcsundef{g__tutodoc_topic_change_seq}{
562 \prop_map_inline:Nn \g__tutodoc_topic_change_prop {
563 \int_gincr:N \g__tutodoc_for_doc_int
564
565 \vspace{-12pt}
566
567 \begin{tdoc#1}
568 \item Infos...
569 \end{tdoc#1}
570
571 \int_compare:nTF
572 {\g__tutodoc_for_doc_int = 4 }
573 { \\ }
574 { & }
575 }
576 }{
577 \seq_map_inline:Nn \g__tutodoc_topic_change_seq {
578 \int_gincr:N \g__tutodoc_for_doc_int
579
580 \vspace{-5pt}
581
582 \begin{tdoc#1}
583 \item Infos...
584 \end{tdoc#1}
585
586 \int_compare:nTF
587 {\g__tutodoc_for_doc_int = 4 }
588 { \\ }
589 { & }
590 }
591 }
592 \end{tabular}
593
594 \ExplSyntaxOff
595
596 \end{document}
597
598 \end{filecontents*}
599
600 \begin{filecontents*}[overwrite]{gallery-showcase-draft.tex}
601 \documentclass[theme = draft]{tutodoc}
602
603 \usepackage{multicol}
604 \usepackage{lastpage}
605
606 \renewcommand*\pagemark{%
607 \usekomafont{pagenumber}{\thepage\kern1pt/\kern1pt\pageref*{LastPage}}%
608 }
609
610
611 \newcommand\thisstyle{draft}
612
613
614 \newcommand\myexrmktext{
615 \tdocversion{1.7.0}[2024-12-04]
616 In the flow of the text, it is always useful to be able to provide examples and comments to supplement the main content.
617 }
618
619
620 \newcommand\myadmotext{
621 Depending on the context of use, it is sometimes necessary to be able to highlight content by indicating its degree of importance.
622 }
623
624 \newcommand\myhighlightedtextnonote{
625 What to say?
626 I don't know, but it's nice. No ?
627 }
628
629 \newcommand\myhighlightedtext{
630 What to say\,%
631 \footnote{
632 Let's not forget the footnotes...
633 }?
634 I don't know, but it's nice. No ?
635 }
636
637
638 \newcommand\mychgestext{
639 In a change log, it is important to visualise the types of changes clearly. This makes it easier for the user to read!
640 }
641
642
643 \ExplSyntaxOn
644
645 \int_new:N \g__tutodoc_for_doc_int
646
647 \ExplSyntaxOff
648
649
650
651 \begin{document}
652
653 \textsf{\Huge\bfseries The \texttt{"\thisstyle"} theme}
654
655 \section{Liens}
656
657 {\Large\bfseries \href{https://github.com/bc-tools/for-latex/tree/main/tutodoc}{A very big link}}, but at least we can see it.
658
659
660
661 \section{\LaTeX\ listings}
662
663 Typing inline code such as \tdoclatexin{E = m c^2 \neq \pi \neq \frac{3}{14}} is useful, as is showing use cases such as the following one.
664
665 \begin{tdoclatex}
666 Formatted \LaTeX\ code is great: $E = m c^2$ or $pi \neq \frac{3}{14}$.
667 \end{tdoclatex}
668
669
670 There's also a less invasive side-by-side mode. Nice! No ?
671
672 \begin{tdoclatex}<\tdoctcb{sbs}>
673 Formatted \LaTeX\ code is great: \\
674 $E = m c^2$ or $\pi \neq \frac{3}{14}$.
675 \end{tdoclatex}
676
677
678
679 \section{Highlighting, versioning and dating}
680
681 \subsection{tdocexa, tdocrem}
682
683 \myexrmktext
684
685 \ExplSyntaxOn
686
687 \seq_map_inline:Nn \g__tutodoc_focus_std_seq {
688 \begin{tdoc#1}
689 \myhighlightedtext
690 \end{tdoc#1}
691 }
692
693 \ExplSyntaxOff
694
695
696
697 \subsection{tdocnote, tdoctip...}
698
699 \myadmotext
700
701 \ExplSyntaxOn
702
703 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
704
705 \ifcsundef{g__tutodoc_focus_color_seq}{
706 \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
707 \int_gincr:N \g__tutodoc_for_doc_int
708
709 \begin{tdoc#1}
710 \int_compare:nTF
711 {\g__tutodoc_for_doc_int = 1 }
712 { \myhighlightedtext }
713 { \myhighlightedtextnonote }
714 \end{tdoc#1}
715 }
716 } {
717 \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
718 \int_gincr:N \g__tutodoc_for_doc_int
719
720 \begin{tdoc#1}
721 \int_compare:nTF
722 {\g__tutodoc_for_doc_int = 1 }
723 { \myhighlightedtext }
724 { \myhighlightedtextnonote }
725 \end{tdoc#1}
726 }
727 }
728
729 \ExplSyntaxOff
730
731
732
733 \subsection{tdocbreak, tdocfix...}
734
735 \tdocstartproj{A new demonstration section...}
736
737 \begin{tdoctodo}
738 \item A gallery would be welcome...
739 \end{tdoctodo}
740
741 \ifcsundef{g__tutodoc_topic_change_seq}{
742 \medskip
743 }{}
744
745 \mychgestext
746
747 \ifcsundef{g__tutodoc_topic_change_seq}{
748 \medskip
749 }{}
750
751 \ExplSyntaxOn
752
753 \int_set:Nn \g__tutodoc_for_doc_int { 0 }
754
755 \begin{tabular}{%
756 @{\hskip 0pt}p{.26\linewidth}%
757 *{3}{@{\hskip 7pt}p{.23\linewidth}}@{\hskip 0pt}%
758 }
759 \ifcsundef{g__tutodoc_topic_change_seq}{
760 \prop_map_inline:Nn \g__tutodoc_topic_change_prop {
761 \int_gincr:N \g__tutodoc_for_doc_int
762
763 \vspace{-12pt}
764
765 \begin{tdoc#1}
766 \item Infos...
767 \end{tdoc#1}
768
769 \int_compare:nTF
770 {\g__tutodoc_for_doc_int = 4 }
771 { \\ }
772 { & }
773 }
774 }{
775 \seq_map_inline:Nn \g__tutodoc_topic_change_seq {
776 \int_gincr:N \g__tutodoc_for_doc_int
777
778 \vspace{-5pt}
779
780 \begin{tdoc#1}
781 \item Infos...
782 \end{tdoc#1}
783
784 \int_compare:nTF
785 {\g__tutodoc_for_doc_int = 4 }
786 { \\ }
787 { & }
788 }
789 }
790 \end{tabular}
791
792 \ExplSyntaxOff
793
794 \end{document}
795
796 \end{filecontents*}
797
798
799 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-tech.tex}
800 \begin{tdoctech}
801 \item Info 1...
802 \item Info 2...
803 \end{tdoctech}
804 \end{filecontents*}
805
806
807 \begin{filecontents*}[overwrite]{examples-version-n-change-para-title.tex}
808 \paragraph{A well-versioned title.}
809 \tdocversion{1.2.3}[2024-11-23]
810 Blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah...
811 Stay, stay, stay, stay, stay, stay, stay, stay, stay, stay, stay, stay, stay, stay...
812
813 Stay, stay, stay, stay, stay, stay, stay, stay, stay, stay, stay, stay, stay...
814 Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
815
816 \tdocdate{2024-11-23}
817 \paragraph{A badly versioned title.}
818 Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu...
819 \end{filecontents*}
820
821
822 \begin{filecontents*}[overwrite]{examples-version-n-change-dating.tex}
823 Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
824
825 \medskip % CAUTION! This prevents overlapping.
826
827 \tdocdate{2023-09-24}
828 Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
829
830 \medskip % CAUTION! This prevents overlapping.
831
832 \tdocdate[gray]{2020-05-08}
833 Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli...
834
835 Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
836
837 Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu...
838 \end{filecontents*}
839
840
841 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-user-choice-icon.tex}
842 \begin{tdoctopic}{To hide}<\faEyeSlash>
843 % An icon from fontawesome5.
844 \item Info 1...
845 \item Info 2...
846 \end{tdoctopic}
847 \end{filecontents*}
848
849
850 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-user-choice.tex}
851 \begin{tdoctopic}{End of icons}
852 \item Info 1...
853 \item Info 2...
854 \end{tdoctopic}
855 \end{filecontents*}
856
857
858 \begin{filecontents*}[overwrite]{examples-version-n-change-versioning.tex}
859 \tdocversion[red]{10.2.0-beta}[2023-12-01]
860 Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
861
862 \smallskip\bigskip % CAUTION! This prevents overlapping.
863
864 \tdocversion{10.2.0-alpha}
865 Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
866 ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
867 ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble,
868 ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
869 \end{filecontents*}
870
871
872 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-pb.tex}
873 \begin{tdocprob}
874 \item Info 1...
875 \item Info 2...
876 \end{tdocprob}
877 \end{filecontents*}
878
879
880 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-todo.tex}
881 \begin{tdoctodo}
882 \item Info 1...
883 \item Info 2...
884 \end{tdoctodo}
885 \end{filecontents*}
886
887
888 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-update.tex}
889 \begin{tdocupdate}
890 \item Info 1...
891 \item Info 2...
892 \end{tdocupdate}
893 \end{filecontents*}
894
895
896 \begin{filecontents*}[overwrite]{examples-version-n-change-what-n-when.tex}
897 \begin{tdoctech}[date = 2024-10-29,
898 col-chges = red]
899 \item Info...
900 \end{tdoctech}
901
902 \begin{tdocupdate}[version = 1.2.3,
903 col-chges = ForestGreen,
904 col = ForestGreen]
905 \item Info...
906 \end{tdocupdate}
907
908 \begin{tdoctopic}{To hide}<\faEyeSlash>%
909 [version = 4.5.6,
910 date = 2025-11-30]
911 \item Info...
912 \end{tdoctopic}
913 \end{filecontents*}
914
915
916 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-new.tex}
917 \begin{tdocnew}
918 \item Info 1...
919 \item Info 2...
920 \end{tdocnew}
921 \end{filecontents*}
922
923
924 \begin{filecontents*}[overwrite]{examples-version-n-change-manual-setting.tex}
925 This is what it looks like without vertical shift.
926
927 \paragraph{A home-made setting.}%
928 \tdocversion{1.2.3}[2024-10-29]<0pt>
929
930 Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
931 \end{filecontents*}
932
933
934 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-first.tex}
935 \tdocstartproj{1st version of the project.}
936 \end{filecontents*}
937
938
939 \begin{filecontents*}[overwrite]{examples-version-n-change-color-chges-first.tex}
940 \tdocstartproj[DarkOrchid]%
941 {Brightly colored version 1.}
942 \end{filecontents*}
943
944
945 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-break.tex}
946 \begin{tdocbreak}
947 \item Info 1...
948 \item Info 2...
949 \end{tdocbreak}
950 \end{filecontents*}
951
952
953 \begin{filecontents*}[overwrite]{examples-version-n-change-color-chges-fix.tex}
954 \begin{tdocfix}[col = CadetBlue]
955 \item Info...
956 \end{tdocfix}
957 \end{filecontents*}
958
959
960 \begin{filecontents*}[overwrite]{examples-version-n-change-chges-fix.tex}
961 \begin{tdocfix}
962 \item Info 1...
963 \item Info 2...
964 \end{tdocfix}
965 \end{filecontents*}
966
967
968 \begin{filecontents*}[overwrite]{examples-admonitions-exa-leavevmode.tex}
969 \begin{tdocexa}
970 \leavevmode
971 \begin{enumerate}
972 \item Point 1.
973
974 \item Point 2.
975 \end{enumerate}
976 \end{tdocexa}
977 \end{filecontents*}
978
979
980 \begin{filecontents*}[overwrite]{examples-admonitions-important.tex}
981 \begin{tdocimp}
982 Important and harmless.
983 \end{tdocimp}
984
985 \begin{tdocimp}[Small title]
986 Useful?
987 \end{tdocimp}
988 \end{filecontents*}
989
990
991 \begin{filecontents*}[overwrite]{examples-admonitions-note.tex}
992 \begin{tdocnote}
993 Something useful to tell you...
994 \end{tdocnote}
995
996 \begin{tdocnote}[Small title]
997 Useful?
998 \end{tdocnote}
999 \end{filecontents*}
1000
1001
1002 \begin{filecontents*}[overwrite]{examples-admonitions-caution.tex}
1003 \begin{tdoccaut}
1004 Caution, caution...
1005 \end{tdoccaut}
1006
1007 \begin{tdoccaut}[Small title]
1008 Useful?
1009 \end{tdoccaut}
1010 \end{filecontents*}
1011
1012
1013 \begin{filecontents*}[overwrite]{examples-admonitions-tip.tex}
1014 \begin{tdoctip}
1015 A tip.
1016 \end{tdoctip}
1017
1018 \begin{tdoctip}[Small title]
1019 Useful?
1020 \end{tdoctip}
1021 \end{filecontents*}
1022
1023
1024 \begin{filecontents*}[overwrite]{examples-admonitions-warn.tex}
1025 \begin{tdocwarn}
1026 Avoid the dangers...
1027 \end{tdocwarn}
1028
1029 \begin{tdocwarn}[Small title]
1030 Useful?
1031 \end{tdocwarn}
1032 \end{filecontents*}
1033
1034
1035 \begin{filecontents*}[overwrite]{examples-admonitions-exa.tex}
1036 \begin{tdocexa}
1037 An example...
1038 \end{tdocexa}
1039
1040 \begin{tdocexa}[Small title]
1041 Useful?
1042 \end{tdocexa}
1043 \end{filecontents*}
1044
1045
1046 \begin{filecontents*}[overwrite]{examples-admonitions-leavevmode-items.tex}
1047 \begin{tdoctip}[Little elegant]
1048 \begin{enumerate}
1049 \item Point 1.
1050 \item Point 2.
1051 \end{enumerate}
1052 \end{tdoctip}
1053 VERSUS.
1054 \begin{tdoctip}[More elegant]
1055 \begin{enumerate}[wide]
1056 \item Point 1.
1057 \item Point 2.
1058 \end{enumerate}
1059 \end{tdoctip}
1060 \end{filecontents*}
1061
1062
1063 \begin{filecontents*}[overwrite]{examples-admonitions-rmk.tex}
1064 \begin{tdocrem}
1065 Just one remark...
1066 \end{tdocrem}
1067
1068 \begin{tdocrem}
1069 Another?
1070 \end{tdocrem}
1071
1072 \begin{tdocrem}[Small title]
1073 Useful?
1074 \end{tdocrem}
1075 \end{filecontents*}
1076
1077
1078 \begin{filecontents*}[overwrite]{examples-listing-full-hello-you.tex}
1079 \NewDocumentCommand{\helloyou}{m}{%
1080 \IfBlankTF{#1}{%
1081 Ah, not very chatty today!
1082 }{%
1083 Hello #1.
1084
1085 Amazing! Actually, not at all...%
1086 }%
1087 }
1088 \end{filecontents*}
1089
1090
1091 \begin{filecontents*}[overwrite]{examples-listing-full-input-hello-you-hs.tex}
1092 \tdoccodeinput{hs}{examples-listing-full-hello-you.hs}
1093 \end{filecontents*}
1094
1095
1096 \begin{filecontents*}[overwrite]{examples-listing-full-hello-you.hs}
1097 main :: IO ()
1098
1099 main = do
1100 putStr "Who are you? "
1101 name <- getLine
1102
1103 if name == ""
1104 then putStrLn "Ah, not very chatty today!"
1105
1106 else do
1107 putStrLn ("Hello " ++ name ++ ".")
1108 putStrLn "Amazing! Actually, not at all..."
1109 \end{filecontents*}
1110
1111
1112 \begin{filecontents*}[overwrite]{examples-listing-full-hello-you-lua.tex}
1113 \begin{tdoccode}[style = solarized-light, linenos]%
1114 <leftrule = 22pt, colback = orange!5, colframe = red!35>%
1115 {lua}
1116 io.write("Who are you?")
1117 local name = io.read()
1118
1119 if name == "" then
1120 print("Ah, not very chatty today!")
1121
1122 else
1123 print("Hello “ .. name .. ”.")
1124 print("Amazing! Actually, not at all...")
1125 end
1126 \end{tdoccode}
1127 \end{filecontents*}
1128
1129
1130 \begin{filecontents*}[overwrite]{examples-listing-full-hello-you-perl.tex}
1131 \begin{tdoccode}{pl}
1132 print "Who are you? ";
1133 my $name = <STDIN>;
1134
1135 chomp($name);
1136
1137 if ($name eq "") {
1138 print "Ah, not very chatty today!";
1139
1140 } else {
1141 print "Hello $name";
1142 print "Amazing! Actually, not at all...";
1143 }
1144 \end{tdoccode}
1145 \end{filecontents*}
1146
1147
1148 \begin{filecontents*}[overwrite]{examples-listing-full-input-hello-you-tex.tex}
1149 \tdoccodeinput[style = solarized-light, linenos]%
1150 <leftrule = 22pt, colback = orange!5, colframe = red!35>%
1151 {tex}{examples-listing-full-hello-you.tex}
1152 \end{filecontents*}
1153
1154
1155 \begin{filecontents*}[overwrite]{examples-showcase-hook.tex}
1156 \begin{tdocshowcase}[]
1157 [This works...]
1158 \end{tdocshowcase}
1159
1160 OR.
1161
1162 \begin{tdocshowcase}
1163 \string[This also works...]
1164 \end{tdocshowcase}
1165 \end{filecontents*}
1166
1167
1168 \begin{filecontents*}[overwrite]{examples-showcase-rule.tex}
1169 \begin{tdocshowcase}[style = rule]
1170 Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
1171 \end{tdocshowcase}
1172 \end{filecontents*}
1173
1174
1175 \begin{filecontents*}[overwrite]{examples-showcase-stripe-custom.tex}
1176 \begin{tdocshowcase}[style = stripe,
1177 col-stripe = green,
1178 col-text = purple,
1179 before = Mon début,
1180 after = Ma fin à moi]
1181 Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
1182 \end{tdocshowcase}
1183 \end{filecontents*}
1184
1185
1186 \begin{filecontents*}[overwrite]{examples-showcase-input-stripe.tex}
1187 \tdocshowcaseinput[style = stripe,
1188 col-stripe = red,
1189 col-text = LightCoral]%
1190 {examples-showcase-external.tex}
1191 \end{filecontents*}
1192
1193
1194 \begin{filecontents*}[overwrite]{examples-showcase-rule-custom.tex}
1195 \begin{tdocshowcase}[style = rule,
1196 col-stripe = red,
1197 col-text = orange!75!black,
1198 before = My beginning,
1199 after = My end]
1200 Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
1201 \end{tdocshowcase}
1202 \end{filecontents*}
1203
1204
1205 \begin{filecontents*}[overwrite]{examples-showcase-external.tex}
1206 Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli...
1207 \end{filecontents*}
1208
1209
1210 \begin{filecontents*}[overwrite]{examples-showcase-default.tex}
1211 \begin{tdocshowcase}
1212 \bfseries A bit of code \LaTeX.
1213
1214 \bigskip
1215
1216 \emph{\large End of the awful demo.}
1217 \end{tdocshowcase}
1218 \end{filecontents*}
1219
1220
1221 \begin{filecontents*}[overwrite]{examples-showcase-stripe.tex}
1222 \begin{tdocshowcase}[style = stripe]
1223 Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
1224 \end{tdocshowcase}
1225 \end{filecontents*}
1226
1227
1228 \begin{filecontents*}[overwrite]{examples-showcase-input-default.tex}
1229 \tdocshowcaseinput{examples-showcase-external.tex}
1230 \end{filecontents*}
1231
1232
1233 \begin{filecontents*}[overwrite]{examples-showcase-input-rule.tex}
1234 \tdocshowcaseinput[style = rule]{examples-showcase-external.tex}
1235 \end{filecontents*}
1236
1237
1238 \begin{filecontents*}[overwrite]{examples-listing-latex-latexshow-options.tex}
1239 \tdoclatexshow[style = stripe,
1240 col-stripe = orange,
1241 col-text = blue!70!black,
1242 before = Rendering hereafter.,
1243 explain = What comes next is coloured...,
1244 after = Finished rendering.,]
1245 {examples-listing-latex-xyz.tex}
1246 \end{filecontents*}
1247
1248
1249 \begin{filecontents*}[overwrite]{examples-listing-latex-ABC.tex}
1250 \begin{tdoclatex}<\tdoctcb{sbs}>
1251 $A = B + C$
1252 \end{tdoclatex}
1253 \end{filecontents*}
1254
1255
1256 \begin{filecontents*}[overwrite]{examples-listing-latex-xyz.tex}
1257 % Just one demo.
1258 $x y z = 1$
1259 \end{filecontents*}
1260
1261
1262 \begin{filecontents*}[overwrite]{examples-listing-latex-latexinput-option-std.tex}
1263 \tdoclatexinput{examples-listing-latex-xyz.tex}
1264 \end{filecontents*}
1265
1266
1267 \begin{filecontents*}[overwrite]{examples-listing-latex-strange.tex}
1268 \begin{tdoclatex}[]
1269 [Strange... Or not!]
1270 \end{tdoclatex}
1271 OR.
1272 \begin{tdoclatex}<>
1273 <Strange... Or not!>
1274 \end{tdoclatex}
1275 \end{filecontents*}
1276
1277
1278 \begin{filecontents*}[overwrite]{examples-listing-latex-ABC-custom.tex}
1279 \begin{tdoclatex}%
1280 [linenos, style = igor, showspaces]%
1281 <\tdoctcb{sbs},
1282 attach boxed title to top left = {yshift = -9pt},
1283 fonttitle = \bfseries,
1284 title = Local modifications,
1285 top = 10pt>
1286 % Sometimes useful, but don't overuse it!
1287 $A = B + C$
1288 % End of this demonstration.
1289 \end{tdoclatex}
1290 \end{filecontents*}
1291
1292
1293 \begin{filecontents*}[overwrite]{examples-listing-latex-latexinput-option-sbs.tex}
1294 \tdoclatexinput<\tdoctcb{sbs}>{examples-listing-latex-xyz.tex}
1295 \end{filecontents*}
1296
1297
1298 \begin{filecontents*}[overwrite]{examples-listing-latex-latexinput-option-code.tex}
1299 \tdoclatexinput<\tdoctcb{code}>{examples-listing-latex-xyz.tex}
1300 \end{filecontents*}
1301
1302
1303 \begin{filecontents*}[overwrite]{examples-listing-latex-latexinput-option-perso.tex}
1304 \tdoclatexinput[style = igor, showspaces]%
1305 <colframe = purple, colback = red!5>%
1306 {examples-listing-latex-xyz.tex}
1307 \end{filecontents*}
1308
1309
1310 \begin{filecontents*}[overwrite]{examples-listing-latex-strange-bis.tex}
1311 \begin{tdoclatex}
1312 \string[Strange... Or not!]
1313 \end{tdoclatex}
1314 OR.
1315 \begin{tdoclatex}
1316 \string<Strange... Or not!>
1317 \end{tdoclatex}
1318 \end{filecontents*}
1319
1320
1321 % ======================== %
1322 % == SOURCE FOR THE DOC == %
1323 % ======================== %
1324
1325 \documentclass{tutodoc}
1326
1327 % Community tools
1328 \usepackage[T1]{fontenc}
1329
1330 \usepackage[english]{babel, varioref}
1331
1332 \usepackage{enumitem}
1333 \usepackage{fmtcount}
1334
1335 \usepackage{multicol}
1336 \usepackage{tasks}
1337
1338 \usepackage{pdfpages}
1339 \includepdfset{
1340 pages=-,
1341 fitpaper=true
1342 }
1343
1344 \setlength{\parindent}{0em}
1345
1346 % Some useful commands.
1347 \newcommand\thisproj{\tdoccls{tutodoc}}
1348 \newcommand\thisrepo{\url{https://github.com/bc-tools/for-latex/tree/tutodoc}}
1349 \newcommand\thismonorepo{\url{https://github.com/bc-tools/for-latex}}
1350
1351 \NewDocumentCommand{\trademark}{m}{\texttt{#1}}
1352
1353 \newcommand\ctan{\href{https://ctan.org/}{\trademark{CTAN}}}
1354 \newcommand\git{\trademark{git}}
1355 \newcommand\pdf{\trademark{PDF}}
1356
1357 \newcommand\brainfuck{\trademark{Brainfuck}}
1358 \newcommand\lua{\trademark{Lua}}
1359 \newcommand\perl{\trademark{Perl}}
1360 \newcommand\python{\trademark{Python}}
1361
1362 \newcommand\pygmentsREF{\href{https://pygments.org/}{\trademark{Pygments}}}
1363
1364
1365 \NewDocumentCommand{\mailsubject}{m}% <-- Translate me!
1366 {subject \tdocquote{\texttt{tutodoc - CONTRIB - #1}}}
1367
1368 % Source: https://tex.stackexchange.com/a/424061/6880
1369
1370 \newcommand{\FTdirO}{}
1371 \def\FTdirO(#1,#2,#3){%
1372 \FTfile(#1,{\color{blue!40!black}\faFolderOpen\hspace{-.35pt}}{\hspace{0.2em}#3})
1373 (tmp.west)++(0.8em,-0.4em)node(#2){}
1374 (tmp.west)++(1.5em,0)
1375 ++(0,-1.3em)
1376 }
1377
1378 \newcommand{\FTdirC}{}
1379 \def\FTdirC(#1,#2,#3){%
1380 \FTfile(#1,{\color{blue!40!black}\faFolder\hspace{.75pt}}{\hspace{0.2em}#3})
1381 (tmp.west)++(0.8em,-0.4em)node(#2){}
1382 (tmp.west)++(1.5em,0)
1383 ++(0,-1.3em)
1384 }
1385
1386 \newcommand{\FTfile}{}
1387 \def\FTfile(#1,#2){%
1388 node(tmp){}
1389 (#1|-tmp)++(0.6em,0)
1390 node(tmp)[anchor=west,black]{\texttt{#2}}
1391 (#1)|-(tmp.west)
1392 ++(0,-1.2em)
1393 }
1394
1395 \newcommand{\FTroot}{}
1396 \def\FTroot{tmp.west}
1397
1398 \newcommand\contribtranslatedirtree{
1399 \begin{tikzpicture}%
1400 \draw[color=black, thick]
1401 % en : parent = \FTroot
1402 % normal dir: (parentID, currentID, label)
1403 % file : (parentID, label)
1404 \FTdirO(\FTroot,root,translate){
1405 \FTdirC(root,changes,changes){
1406 }
1407 \FTdirO(root,en,en) {
1408 \FTdirC(en,api,api) {
1409 }
1410 \FTdirC(en,doc,doc) {
1411 }
1412 }
1413 \FTdirC(root,fr,fr){
1414 }
1415 \FTdirC(root,status,status){
1416 \FTdirO(status,en,en) {
1417 \FTfile(en,api.yaml)
1418 \FTfile(en,manual.yaml)
1419 }
1420 \FTdirC(status,fr,fr){
1421 }
1422 }
1423 \FTfile(root,README.md)
1424 \FTfile(root,LICENSE.txt)
1425 };
1426 \end{tikzpicture}
1427 }
1428
1429
1430 \begin{document}
1431
1432
1433 \title{The \texttt{tutodoc} class \\ Tutorial-style documentation}
1434 \author{Christophe, BAL}
1435 \date{Dec 18, 2024 - Version 1.7.1}
1436
1437 \maketitle
1438
1439 \begin{abstract}
1440 The \thisproj{} class\,%
1441 \footnote{
1442 The name comes from \tdocquote{\tdocprewhy{tuto.rial-type} \tdocprewhy{doc.umentation}}.
1443 }
1444 is used by its author to semantically produce documentation of \LaTeX\ packages and classes in a tutorial style\,%
1445 \footnote{
1446 The idea is to produce an efficient \texttt{PDF} file that can be browsed for one-off needs. This is generally what is expected for a coding documentation.
1447 }
1448 with a sober rendering for reading on screen.
1449
1450 \smallskip
1451
1452 \noindent
1453 \emph{\textbf{Remark :} this documentation is also available in French.}
1454 \end{abstract}
1455
1456 \tdocsep
1457
1458 {
1459 \small
1460
1461 \bgroup
1462 \addtokomafont{subsection}{\centering}
1463 \subsection*{Last changes}
1464 \egroup
1465
1466 \small
1467
1468 \begin{tdocfix}
1469 \item Documentation: references to tools to indicate changes have been incorrectly written as characteristics of highlighted colored content.
1470 \end{tdocfix}
1471
1472
1473 \begin{tdocbreak}
1474 \item The \tdocmacro{tdocenv} macro and its starred version no longer offer an option.
1475
1476 \item \LaTeX\ showcases: the default layout is more sober, and there are options for having just the rulers, or the colored stripe. See just after.
1477 \end{tdocbreak}
1478
1479
1480 \begin{tdocnew}
1481 \item Formatting of computer codes in addition to those specifically in \LaTeX.
1482 %
1483 \begin{enumerate}
1484 \item Creation of \tdocenv{tdoccode} and \tdocmacro{tdoccodein}.
1485
1486 \item For macros for inline code, and environments for blocks of code, \tdocpack{minted} options are indicated inside square brackets in the traditional way: \tdoclatexin{[minted options]}\,.
1487
1488 \item For code block environments, \tdocpack{tcolorbox} options are indicated inside rafters: \tdoclatexin{<tcolorbox options>}\,.
1489
1490 \item The new macro \tdocmacro{tdoctcb} allows to use shortcuts for regularly used \tdocpack{tcolorbox} styles.
1491 \end{enumerate}
1492
1493 \item Documentation: a new section presents tools for formatting computer codes other than those in \LaTeX.
1494 \end{tdocnew}
1495
1496
1497 \begin{tdocupdate}
1498 \item Sub-sub-sections are numbered in lower case.
1499
1500 \item Themes.
1501 %
1502 \begin{enumerate}
1503 \item Less space consumed.
1504
1505 \item Shadows have better coloring.
1506
1507 \item For all themes except the \tdoclatexin{draft} one, the radius of the arcs of the corners of the frames has changed from \tdoclatexin{.75mm} to \tdoclatexin{.2pt},.
1508
1509 \item Use case in \LaTeX: with the theme \tdoclatexin{color}, the background color changes from \tdoclatexin[bgcolor = yellow!4]{yellow!4} to \tdoclatexin{gray!5}.
1510
1511 \item Latest changes: with the \tdoclatexin{dark} theme, the \tdoclatexin{[Init]} text produced by the \tdocmacro{tdocstartproj} macro uses the same font as the environment titles to indicate changes.
1512 \end{enumerate}
1513 \end{tdocupdate}
1514 }
1515
1516
1517 \newpage
1518 \tableofcontents
1519 \newpage
1520
1521
1522 \section{Dependencies}
1523
1524 \thisproj\ admits the following dependencies (the dates in brackets are those of the versions used during the latest tests).
1525 %
1526 \begin{tasks}[style=itemize](2)
1527 \task \texttt{scrartcl.cls}
1528 \hfill {\small (2024/10/24)}\kern10pt
1529
1530 \task \texttt{clrstrip.sty}
1531 \hfill {\small (2021/08/28)}\kern10pt
1532
1533 \task \texttt{csquotes.sty}
1534 \hfill {\small (2024/04/04)}\kern10pt
1535
1536 \task \texttt{fontawesome5.sty}
1537 \hfill {\small (2022/05/02)}\kern10pt
1538
1539 \task \texttt{geometry.sty}
1540 \hfill {\small (2020/01/02)}\kern10pt
1541
1542 \task \texttt{hyperref.sty}
1543 \hfill {\small (2024/11/05)}\kern10pt
1544
1545 \task \texttt{inputenc.sty}
1546 \hfill {\small (2024/02/08)}\kern10pt
1547
1548 \task \texttt{keytheorems.sty}
1549 \hfill {\small (2024/11/11)}\kern10pt
1550
1551 \task \texttt{marginnote.sty}
1552 \hfill {\small (2018/08/09)}\kern10pt
1553
1554 \task \texttt{minted.sty}
1555 \hfill {\small (2024/11/17)}\kern10pt
1556
1557 \task \texttt{tcolorbox.sty}
1558 \hfill {\small (2024/10/22)}\kern10pt
1559 \end{tasks}
1560
1561
1562 \section{General settings}
1563
1564 \subsection{Font size and page geometry}
1565
1566 The \tdoccls{scrartcl} class is loaded via the \tdoclatexin{fontsize = 10pt} option, and the \tdocpack{geometry} package manages the page dimensions.
1567
1568
1569 \begin{tdocwarn}
1570 The macros for dating and versioning presented in the section \ref{tutodoc-changes} on page \pageref{tutodoc-changes} require fixed settings for page geometry and font size.
1571 \end{tdocwarn}
1572
1573
1574 \subsection{Titles and table of contents}
1575
1576 The selected settings are directly visible in this documentation.
1577
1578
1579 \subsection{Dynamic links}
1580
1581 The \tdocpack{hyperref} package is imported, if it hasn't already been, and the settings chosen are just for the colors of links relating to citations, files, internal links, and finally \verb#url# (this colors will depend on the theme chosen).
1582
1583
1584 \section{What language is used by the \thisproj\ class?}
1585
1586 This documentation loads the \tdocpack{babel} package via \tdoclatexin|\usepackage[english]{babel}|\, a package that \thisproj\ does not load.
1587 On the other hand, the \thisproj\ class identifies \tdoclatexin|en| as the main language used by \tdocpack{babel}.%.
1588 \footnote{
1589 Technically, we use \tdoclatexin|\BCPdata{language}| which returns a language in short format.
1590 }
1591 As this language is included in the list of languages taken into account, see below, the \thisproj\ class will produce the expected effects.
1592 \begin{tasks}[label=\small\textbullet](3)
1593 \task \tdoclatexin|en| : English.
1594 \task \tdoclatexin|es| : Spanish.
1595 \task \tdoclatexin|fr| : French.
1596 \end{tasks}
1597
1598
1599 \begin{tdocnote}
1600 Packages \tdocpack{babel} and \tdocpack{polyglossia} are taken into account.
1601 \end{tdocnote}
1602
1603
1604 \begin{tdoccaut}
1605 If the choice of main language is not made in the preamble, the mechanism used will fail with unintended side effects (see warning that follows).
1606 \end{tdoccaut}
1607
1608
1609 \begin{tdocwarn}
1610 When a language is not supported by \thisproj, a warning message is issued, and English is selected as the language for \thisproj.
1611 \end{tdocwarn}
1612
1613
1614 \section{What does that mean in \tdocquote{English}?}
1615
1616 The macro \tdocmacro{tdocinEN} and its starred version are useless for English speakers because they have the following effects.
1617
1618
1619 \begin{tdoclatex}
1620 Cool and top stand for \tdocinEN*{cool} and \tdocinEN{top}.
1621 \end{tdoclatex}
1622
1623
1624 The macro \tdocmacro{tdocinEN} and its starred version are based on \tdocmacro{tdocquote} : for example, \tdocquote{semantic} is obtained via \tdoclatexin|tdocquote{semantic}|\,.
1625
1626
1627 \begin{tdocnote}
1628 As the text \tdocquote{in English} is translated into the language detected by \thisproj, the macro \tdocmacro{tdocinEN} and its starred version become useful for non-English speakers.
1629 \end{tdocnote}
1630
1631
1632 \section{Choose your theme}
1633
1634 To modify the general layout, there is the \thisproj\ class option \tdoclatexin{theme = <choice>} where \tdoclatexin{<choice>} can take the following values.
1635
1636 \begin{tasks}[style=itemize]
1637 \task \tdoclatexin{bw}:
1638 a black-and-white theme with some shades of grey.
1639
1640 \task \tdoclatexin{color}:
1641 a colored theme, this is the default value.
1642
1643 \task \tdoclatexin{dark}:
1644 a dark theme ideal for resting the eyes.
1645
1646 \task \tdoclatexin{draft}:
1647 a theme for a printout such as to look for content errors that aren't necessarily easy to spot in front of a screen.
1648 \end{tasks}
1649
1650
1651 \begin{tdocnote}
1652 At the end of this document, after the change history, you'll find a gallery of use cases for these different themes : go to appendix page \pageref{tutodoc-theme-gallery}.
1653 \end{tdocnote}
1654
1655
1656 % ----------------------------- %
1657 % -- AT END DOCUMENT - START -- %
1658 % ----------------------------- %
1659
1660 % The following AT-END-DOCUMENT lines of codes have been generated
1661 % automatically. Don't judge their relative beauty...
1662
1663 \AtEndDocument{
1664
1665 % An annex page for a pretty doc.
1666 \newpage
1667
1668 % Source.
1669 % + https://tex.stackexchange.com/a/8547/6880
1670 \bgroup
1671 \setkomafont{section}{\Huge\bfseries}
1672 \addtokomafont{section}{\centering}
1673 \phantomsection\section*{Appendix -- Theme gallery}%
1674 \label{tutodoc-theme-gallery}
1675 \addcontentsline{toc}{section}{Appendix -- Theme gallery}%
1676 \egroup
1677
1678 \bigskip\bigskip
1679
1680 \begin{tdocnote}
1681 Each example is a \pdf\ directly inserted into this document (so don't be surprised by the page numbers).
1682 \end{tdocnote}
1683
1684 \newpage
1685
1686 % Let's build the PDFs.
1687 \immediate\write18{SOURCE_DATE_EPOCH=0 FORCE_SOURCE_DATE=1 latexmk -shell-escape -pdflatex gallery-showcase-bw}
1688
1689 \immediate\write18{SOURCE_DATE_EPOCH=0 FORCE_SOURCE_DATE=1 latexmk -shell-escape -pdflatex gallery-showcase-color}
1690
1691 \immediate\write18{SOURCE_DATE_EPOCH=0 FORCE_SOURCE_DATE=1 latexmk -shell-escape -pdflatex gallery-showcase-dark}
1692
1693 \immediate\write18{SOURCE_DATE_EPOCH=0 FORCE_SOURCE_DATE=1 latexmk -shell-escape -pdflatex gallery-showcase-draft}
1694
1695 % The gallery starts here...
1696 \includepdf{gallery-showcase-bw}
1697
1698 \includepdf{gallery-showcase-color}
1699
1700 \includepdf{gallery-showcase-dark}
1701
1702 \includepdf{gallery-showcase-draft}
1703
1704 }
1705
1706 % --------------------------- %
1707 % -- AT END DOCUMENT - END -- %
1708 % --------------------------- %
1709
1710 \section{Highlighting content}
1711
1712 \begin{tdocnote}
1713 The environments presented in this section\,%
1714 \footnote{
1715 The formatting comes from the \tdocpack{keytheorems} package.
1716 }
1717 add a short title indicating the type of information provided.
1718 This short text will always be translated into the language detected by the \thisproj\ class.
1719 \end{tdocnote}
1720
1721
1722 \subsection{Content in the reading flow}
1723
1724
1725 \begin{tdocimp}
1726 All the environments presented in this section share the same counter, which will be reset to zero as soon \tdoclatexin|\section| is used.
1727 \end{tdocimp}
1728
1729
1730 \subsubsection{Examples}
1731
1732 Numbered examples are indicated via \tdocenv{tdocexa}, which offers an optional argument for adding a small title.
1733 Here are two possible uses.
1734
1735 \tdoclatexinput<\tdoctcb{sbs}>{examples-admonitions-exa.tex}
1736
1737
1738 \begin{tdoctip}
1739 It can sometimes be useful to return to the line at the start of the content. The code below shows how to proceed (this trick also applies to the \verb#tdocrem# environment presented next). Note in passing that the numbering follows that of the previous example as desired.
1740 \end{tdoctip}
1741
1742 \tdoclatexinput<\tdoctcb{sbs}>{examples-admonitions-exa-leavevmode.tex}
1743
1744
1745 % \subsection{Content in the reading flow}
1746
1747 \subsubsection{Some remarks}
1748
1749 Everything happens via \tdocenv{tdocrem}, which works identically to the \tdocenv*{tdocexa} environment, as shown in the following example.
1750
1751 \tdoclatexinput<\tdoctcb{sbs}>{examples-admonitions-rmk.tex}
1752
1753
1754 \subsection{Flashy content}
1755 \label{tutodoc-admonitions}
1756
1757 \begin{tdocnote}
1758 The formatting proposed here is the default one, but others are possible by changing the theme: see the gallery of use cases in the appendix page \pageref{tutodoc-theme-gallery}.
1759 As for the icons, they are obtained via the \tdocpack{fontawesome5} package, and the \tdocmacro{tdocicon} macro which manages the spacing relatively to the text.%
1760 \footnote{
1761 For example,
1762 \tdoclatexin|\fbox{tdocicon{faBed}{Fatigued}}|
1763 produces
1764 \fbox{\tdocicon{\faBed}{Fatigued}}\,.
1765 }
1766 \end{tdocnote}
1767
1768
1769 \subsubsection{A tip}
1770
1771 The \tdocenv*{tdoctip} environment is used to give tips. Here's how to use it.
1772
1773 \tdoclatexinput<\tdoctcb{sbs}, bottom = 3pt, top = 3pt>{examples-admonitions-tip.tex}
1774
1775
1776 \smallskip
1777
1778
1779 \begin{tdoctip}
1780 Sometimes, highlighted content can be reduced to a list. In this case, the formatting can be improved as follows where we use the \tdoclatexin{wide} option from the \tdocpack{enumitem} package imported by this documentation.
1781
1782 \tdoclatexinput<\tdoctcb{sbs}, bottom = 3pt, top = 3pt>{examples-admonitions-leavevmode-items.tex}
1783 \end{tdoctip}
1784
1785
1786 \foreach \sectitle/\desc/\filename in {
1787 {Informative note}/%<-- Translate me!
1788 {The \tdocenv*{tdocnote} environment is used to highlight useful information. Here's how to use it.}/%<-- Translate me!
1789 note,
1790 %
1791 {Something important}/%<-- Translate me!
1792 {The \tdocenv*{tdocimp} environment is used to indicate something important but harmless.}/%<-- Translate me!
1793 important,
1794 %
1795 {Caution about a delicate point}/%<-- Translate me!
1796 {The \tdocenv*{tdoccaut} environment is used to indicate a delicate point to the user. Here's how to use it.}/% <-- Translate me!
1797 caution,
1798 %
1799 {Warning of danger}/%<-- Translate me!
1800 {The \tdocenv*{tdocwarn} environment is used to warn the user of a trap to avoid. Here's how to use it.}/%<-- Translate me!
1801 warn%
1802 } {
1803 \subsubsection{\sectitle}
1804
1805 \desc
1806
1807 \tdoclatexinput<\tdoctcb{sbs}, bottom = 3pt, top = 3pt>{examples-admonitions-\filename.tex}
1808 }
1809
1810
1811 \section{Specify packages, classes, macros or environments}
1812
1813 Here's what you can type semantically.
1814
1815
1816 \begin{tdoclatex}<\tdoctcb{sbs}>
1817 \tdoccls{myclass} is for... \\
1818 \tdocpack{mypackage} is for... \\
1819 \tdocmacro{onemacro} is for... \\
1820 \tdocenv{env} produces... \\
1821 Just \tdocenv*{env}...
1822 \end{tdoclatex}
1823
1824
1825 \begin{tdocrem}
1826 Unlike \tdocmacro{tdoclatexin}, the \tdocmacro{tdocmacro}, \tdocmacro{tdocenv} and \tdocmacro{tdocenv*} macros don't color the text they produce.
1827 In addition, \tdoclatexin{\tdocenv{monenv}} produces \tdocenv{monenv} with breakable spaces to allow line breaks if required.
1828 \end{tdocrem}
1829
1830
1831 \section{Origin of a prefix or suffix}
1832
1833 To explain the names chosen, there is nothing like indicating and explaining the short prefixes and suffixes used. This is easily done as follows.
1834
1835
1836 \begin{tdoclatex}<\tdoctcb{sbs}>
1837 \tdocpre{sup} relates to... \\
1838 \tdocprewhy{sup.erbe} means... \\
1839 \emph{\tdocprewhy{sup.er} for...}
1840 \end{tdoclatex}
1841
1842
1843 \begin{tdocrem}
1844 The choice of a full stop to split a word allows words with a hyphen to be used, as in \tdoclatexin+\tdocprewhy{bric.k-breaker}+ which gives \tdocprewhy{bric.k-breaker}.
1845 \end{tdocrem}
1846
1847
1848 \section{A real-life rendering}
1849 \label{tutodoc-showcase}
1850
1851 It is sometimes useful to render code directly in the documentation. This requires the rendering to be dissociable from the explanatory text.
1852
1853
1854
1855 \subsection{A minimalist rendering by default}
1856
1857 \begin{tdocexa}
1858 It can be useful to show a real rendering directly in a document.%
1859 \footnote{
1860 Typically when making a demo.
1861 }
1862 This is typed via the environment \tdocenv*{tdocshowcase} as follows.
1863
1864 \tdoclatexshow[explain = {This results in the following rendering, which is a combination of low vertical spacing and simple import.}]{examples-showcase-default.tex}
1865 \end{tdocexa}
1866
1867
1868 \begin{tdocrem}
1869 The section \ref{tutodoc-listing-latexshow} on page \pageref{tutodoc-listing-latexshow} explains how to obtain, via the macro \tdocmacro{tdoclatexshow}, a code followed by its actual rendering as in the previous example.
1870 \end{tdocrem}
1871
1872
1873 \begin{tdocwarn}
1874 With the default settings, if the code to be formatted begins with an opening bracket, we must use one of the following tricks.
1875
1876 \tdoclatexshow[explain = {This will produce the following.}]{examples-showcase-hook.tex}
1877 \end{tdocwarn}
1878
1879
1880 \subsection{With framing lines}
1881
1882 To make the formatted \LaTeX\ code more visible, you can use the \tdoclatexin{rule} style, as in the following examples.
1883
1884
1885 \begin{tdocexa}
1886 The option \tdoclatexin{style = rule} provides the following where the automatically added texts will adapt to the language found by \thisproj.
1887
1888 \input{examples-showcase-rule.tex}
1889 \end{tdocexa}
1890
1891
1892 \begin{tdocexa}[Editable text and colours]
1893 You can easily obtain the following horror.
1894
1895 \input{examples-showcase-rule-custom.tex}
1896
1897 Here's the code that was used.%
1898 \footnote{
1899 The next section will justify the a priori strange choice of \tdoclatexin{col-stripe} instead of \tdoclatexin{col-rule}\,.
1900 }
1901
1902 \tdoclatexinput<\tdoctcb{code}>{examples-showcase-rule-custom.tex}
1903 \end{tdocexa}
1904
1905
1906 \begin{tdocnote}
1907 In the previous example, the text uses the proposed darkened orange. However, the red is used as a base to obtain the colors used for the framing lines: the transformations used depend on the theme chosen.%
1908 \footnote{
1909 For example, the themes \tdoclatexin{bw} and \tdoclatexin{draft} ignore the key \tdoclatexin{col-stripe}!
1910 }
1911 You should also be aware that behind the scenes, the macro \tdocmacro{tdocruler} is used, it works as follows.
1912
1913 \begin{tdoclatex}<\tdoctcb{std}>
1914 \tdocruler[red]{A decorated pseudo-title}
1915 \end{tdoclatex}
1916 \end{tdocnote}
1917
1918
1919 \subsection{With colored stripe}
1920
1921 There are situations where you need to be able to clearly identify an example of formatted \LaTeX\ code. This can be done, as the following examples show.%
1922 \footnote{
1923 Behind the scenes, the strips are created effortlessly using the \tdocpack{clrstrip} package.
1924 }
1925
1926
1927 \begin{tdocexa}
1928 The \tdoclatexin{style = stripe} option provides the following.
1929
1930 \input{examples-showcase-stripe.tex}
1931 \end{tdocexa}
1932
1933
1934 \begin{tdocexa}[Editable text and colors]
1935 You can easily produce a beautiful horror like the one below.
1936
1937 \input{examples-showcase-stripe-custom.tex}
1938
1939 Here's the code that was used.%
1940 \footnote{
1941 Now we understand why we chose \tdoclatexin{col-stripe} instead of \tdoclatexin{col-rule}\,.
1942 }
1943
1944 \tdoclatexinput<\tdoctcb{code}>{examples-showcase-stripe-custom.tex}
1945 \end{tdocexa}
1946
1947
1948 \subsection{By importing the \LaTeX\ code}
1949
1950 To obtain renderings by importing the code from an external file, instead of typing it, simply use the macro \tdocmacro{tdocshowcaseinput} whose option uses the same syntax as that of the environment \tdocenv*{tdocshowcase}, and the mandatory argument corresponds to the path of the file. Here are some examples of use.
1951
1952
1953 \foreach \exatitle/\style in {
1954 {Standard use}/% <-- Translate me!
1955 {default},
1956 {With framing lines}/% <-- Translate me!
1957 {rule},
1958 {A colored stripe}/% <-- Translate me!
1959 {stripe}%
1960 }{
1961 \begin{tdocexa}[\exatitle]
1962 \leavevmode
1963 \tdoclatexinput<\tdoctcb{code}>{examples-showcase-input-\style.tex}
1964
1965 This gives:
1966
1967 \smallskip
1968
1969 \input{examples-showcase-input-\style.tex}
1970 \end{tdocexa}
1971 }
1972
1973
1974 \section{Use cases in \LaTeX}
1975 \label{tutodoc-listing-latex}
1976
1977 Documenting a package, or class, is best done through use cases showing both the code and the corresponding result.%
1978 \footnote{
1979 Code is formatted using the \tdocpack{minted} and \tdocpack{tcolorbox} packages.
1980 }
1981
1982
1983 \subsection{\tdocquote{Inline} codes}
1984 \label{tutodoc-listing-latex-inline}
1985
1986 \begin{tdocexa}[Standard use]
1987 The \tdocmacro{tdoclatexin} macro\,%
1988 \footnote{
1989 The name of the macro \tdocmacro{tdoclatexin} comes from \tdocquote{\tdocprewhy{in.line} \LaTeX}\,.
1990 }
1991 can be used to type code in line in a similar way to \tdocmacro{verb}, or as a standard macro (see the handling of braces in the latter case below).
1992 Here are some examples of use.%
1993 \footnote{
1994 A background color is deliberately used to subtly highlight the \tdoclatexin{\LaTeX} codes.
1995 }
1996
1997 \begin{tdoclatex}<\tdoctcb{sbs}>
1998 1: \tdoclatexin|$a^b = c$| \\
1999 2: \tdoclatexin+\tdoclatexin|$a^b = c$|+ \\
2000 3: \tdoclatexin{\tdoclatexin{$a^b = c$}}
2001 \end{tdoclatex}
2002 \end{tdocexa}
2003
2004
2005 \begin{tdocexa}[Possible options]
2006 As the \tdocmacro{tdoclatexin} macro is based on \tdocpack{minted}, you can use all the options taken into account by \tdocpack{minted}.
2007 Here are some examples.
2008
2009 \begin{tdoclatex}<\tdoctcb{sbs}>
2010 1: \tdoclatexin[style = bw]{$a^b = c$} \\
2011 2: \tdoclatexin[style = igor,
2012 showspaces]{$a^b = c$}
2013 \end{tdoclatex}
2014 \end{tdocexa}
2015
2016
2017 \begin{tdocnote}
2018 The \tdocmacro{tdoclatexin} macro can be used in a footnote as shown below.%
2019 \footnote{
2020 \tdoclatexin+$minted = TOP$+ has been typed \tdoclatexin|\tdoclatexin+$minted = TOP$+| in this footnote.
2021 }
2022 \end{tdocnote}
2023
2024
2025 \subsection{Directly typed codes}
2026
2027 \begin{tdocexa}[Side by side]
2028 Displaying a code and its rendering side by side is done as follows where the macro \tdocmacro{tdoctcb} allows you to just type \tdoclatexin{tdoctcb{sbs}} instead of \tdoclatexin{listing side text} (\tdoclatexin#sbs# is for \tdocquote{\tdocprewhy{s.ide} \tdocprewhy{b.y} \tdocprewhy{s.ide}}, while \tdoclatexin#tcb# is the standard abbreviation for \texttt{tcolorbox}). Note the use of rafters, not square brackets (more on this later).
2029
2030 \tdoclatexshow{examples-listing-latex-ABC.tex}
2031 \end{tdocexa}
2032
2033
2034 \begin{tdocexa}[Following]
2035 \tdocenv{tdoclatex} produces the following result (this default setting is also obtained by using \tdoclatexin#\tdoctcb{std}#).%
2036 \footnote{
2037 \tdoclatexin{std} refers to the \tdocquote{standard} behaviour of \tdocpack{tcolorbox} in relation to the \tdocpack{minted} library.
2038 }
2039
2040 \begin{tdoclatex}
2041 $A = B + C$
2042 \end{tdoclatex}
2043 \end{tdocexa}
2044
2045
2046 \begin{tdocexa}[Just the code]
2047 Via \tdoclatexin#\tdoctcb{code}#, we'll just get the code as below.
2048
2049 \begin{tdoclatex}<\tdoctcb{code}>
2050 $A = B + C$
2051 \end{tdoclatex}
2052 \end{tdocexa}
2053
2054
2055 \begin{tdocexa}[Customise]
2056 The \tdocenv*{tdoclatex} environment accepts two types of optional argument.
2057 %
2058 \begin{enumerate}
2059 \item Between classic square brackets, you can use any option taken into account by \tdocpack{minted}.
2060
2061 \item Between rafters, you can use any option managed by the environments obtained via \tdocpack{tcolorbox}.
2062 \end{enumerate}
2063
2064 For example, the following modifications can be made if required.%
2065 \footnote{
2066 This documentation uses the options between rafters to obtain correct rendering of code producing shaded frames: see the section \ref{tutodoc-admonitions} on page \pageref{tutodoc-admonitions}.
2067 }
2068
2069 \tdoclatexshow{examples-listing-latex-ABC-custom.tex}
2070 \end{tdocexa}
2071
2072 \medskip
2073
2074 \begin{tdocwarn}
2075 To obtain the default formatting for a code beginning with a bracket or a rafter, you'll need to do a bit of fiddling, as shown below.
2076 \tdoclatexshow{examples-listing-latex-strange.tex}
2077
2078 \smallskip
2079
2080 Another method is to use the \tdocmacro{string} primitive, as shown below.
2081 \tdoclatexshow{examples-listing-latex-strange-bis.tex}
2082 \end{tdocwarn}
2083
2084
2085 \subsection{Imported codes}
2086
2087 For the following codes, consider a file with the relative path \verb+examples-listing-xyz.tex+, and with the following contents.
2088
2089 \tdoclatexinput<\tdoctcb{code}>{examples-listing-latex-xyz.tex}
2090
2091 \medskip
2092
2093 The \tdocmacro{tdoclatexinput} macro, shown below, expects the path of a file and offers the same system of options between square brackets, or rafters, as the environment \tdocenv*{tdoclatex}.
2094
2095 \foreach \title/\extra/\fname in {%
2096 {Side by side}/%
2097 {}/%
2098 sbs,
2099 {Following}/%
2100 {, which also corresponds to the option \tdoclatexin{\tdoctcb{std}}\,}/%
2101 std,%
2102 {Only the code}/%
2103 {}/%
2104 code,%
2105 {Customise}/%
2106 {}/%
2107 perso%
2108 }{
2109 \begin{tdocexa}[\title]
2110 \leavevmode
2111 \tdoclatexshow[explain=This produces the following formatting\extra.]{examples-listing-latex-latexinput-option-\fname.tex}
2112 \end{tdocexa}
2113 }
2114
2115
2116
2117 \subsection{Imported codes put into practice}
2118 \label{tutodoc-listing-latexshow}
2119
2120 \begin{tdocnote}
2121 The default texts take into account the language detected by \thisproj.
2122 \end{tdocnote}
2123
2124
2125 \begin{tdocexa}[Showcase]
2126 The following comes from \tdoclatexin+\tdoclatexshow{examples-listing-xyz.tex}+.
2127
2128 \smallskip
2129
2130 \tdoclatexshow{examples-listing-latex-xyz.tex}
2131 \end{tdocexa}
2132
2133
2134 \begin{tdocexa}[Changing the explanatory text]
2135 Using the key \tdoclatexin|explain|, you can use a custom text. Thus, \tdoclatexin|\tdoclatexshow[explain = Here is the rendering.]{examples-listing-xyz.tex}| will give the following.
2136
2137 \smallskip
2138
2139 \tdoclatexshow[explain = Here is the rendering.]{examples-listing-latex-xyz.tex}
2140 \end{tdocexa}
2141
2142
2143 \begin{tdocexa}[The options available]
2144 In addition to the explanatory text, it is also possible to use all the options of \tdocenv*{tdocshowcase} environment, see \ref{tutodoc-showcase} on page \pageref{tutodoc-showcase}.
2145 Here is an example to illustrate this.
2146
2147 \medskip
2148
2149 \tdoclatexinput<\tdoctcb{code}>{examples-listing-latex-latexshow-options.tex}
2150
2151 \smallskip
2152
2153 This will produce the following.
2154
2155 \smallskip
2156
2157 \input{examples-listing-latex-latexshow-options.tex}
2158 \end{tdocexa}
2159
2160
2161 \section{Presenting computer code}
2162
2163 Some packages offer functions that require to code a little in \lua.%.
2164 \footnote{
2165 For mathematics, these include \tdocpack{luacas} and \tdocpack{tkz-elements}.
2166 }
2167 For these projects, the documentation must be able to present lines of code; this is why \thisproj\ makes it easy to do this, and much more.%
2168 \footnote{
2169 As code formatting is done via the packages \tdocpack{minted} and \tdocpack{tcolorbox}, the macros and environments presented in this section allow code to be formatted in all the languages supported by \pygmentsREF, a \python\ project used behind the scenes by \tdocpack{minted}.
2170 }
2171
2172
2173 \begin{tdocimp}
2174 The tools in this section can also be used to present \LaTeX code, but they should not be used for simple use cases, as the macros and environments presented next are for studying code, not just for using it: see the section \ref{tutodoc-listing-latex} on page \pageref{tutodoc-listing-latex} to use the right tools for formatting \LaTeX\ use cases.
2175 \end{tdocimp}
2176
2177
2178
2179 \subsection{\tdocquote{Inline} codes}
2180
2181 The \tdocmacro{tdoccodein}\,%
2182 \footnote{
2183 The name of the macro \tdocmacro{tdoccodein} comes from \tdocquote{\tdocprewhy{in.line} \tdocpre{code}}\,.
2184 }
2185 macro expects two arguments: the \ordinalnum{1} indicates the programming language, and the \ordinalnum{2} gives the code to be formatted.
2186 It is possible to use an option identical to that proposed by \tdocmacro{tdoclatexin}: see the section \ref{tutodoc-listing-latex-inline} on page \pageref{tutodoc-listing-latex-inline}.
2187 Here are some possible use cases.%
2188 \footnote{
2189 A background color is used to subtly highlight the formatted codes. For example, typing \tdoclatexin{\tdoccodein{py}{funny = "ah"*3}} will produce \tdoccodein{py}{funny = "ah"*3}\,.
2190 }
2191
2192 \begin{tdoclatex}
2193 1: \tdoccodein{py}{print("OK" if i = 0 else "KO")} \\
2194 2: \tdoccodein[style = bw]{py}{print("OK" if i = 0 else "KO")} \\
2195 3: \tdoccodein[style = igor, showspaces]%
2196 {py}{print("OK" if i = 0 else "KO")}
2197 \end{tdoclatex}
2198
2199 \medskip
2200
2201 \begin{tdocnote}
2202 The page \url{https://pygments.org/languages} contains a complete list of supported languages with their short names. For example, it is possible to format \brainfuck\ code like this obscure sequence \tdoccodein{bf}{++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.} which displays \tdoccodein{text}{Hello}\,.
2203 \end{tdocnote}
2204
2205
2206
2207 \subsection{Codes typed directly}
2208
2209 Code can be typed directly into a document via \tdocenv{tdoccode} which expects an argument indicating the programming language, and any options between parenthesis and/or square brackets identical to those proposed by \tdocenv{tdoclatex}: see the section \ref{tutodoc-listing-latex} on page \pageref{tutodoc-listing-latex}.%
2210 \footnote{
2211 Note that the coloring of the \LaTeX\ codes is lexically correct, but semantically wrong.
2212 }
2213
2214
2215 % Strings "..." in the source codes must also be translated.
2216 \foreach \title/\lang in {%
2217 {Standard feature}/%
2218 perl,%
2219 {One-off rendering customization}/%
2220 lua%
2221 }{
2222 \begin{tdocexa}[\title]
2223 \leavevmode
2224 \tdoclatexshow{examples-listing-full-hello-you-\lang}
2225 \end{tdocexa}
2226 }
2227
2228
2229 \subsection{Imported codes}
2230
2231 The \tdoclatexin{tdoccodeinput} macro expects the language and path of a file to be formatted, and possibly options similar to those offered by the \tdocenv*{tdoccode} environment.
2232
2233
2234 % Strings "..." in the source codes must also be translated.
2235 \foreach \title/\lang in {%
2236 {Standard features}/%
2237 hs,%
2238 {Customize rendering on occasion}/%
2239 tex%
2240 }{
2241 \begin{tdocexa}[\title]
2242 \leavevmode
2243 \tdoclatexinput<\tdoctcb{code}>{examples-listing-full-input-hello-you-\lang}
2244
2245 This gives:
2246
2247 \input{examples-listing-full-input-hello-you-\lang}
2248 \end{tdocexa}
2249 }
2250
2251
2252 \section{Indicate changes}
2253 \label{tutodoc-changes}
2254
2255 To make it easier to monitor a project, it is essential to provide a history indicating the changes made when a new version is published.
2256
2257
2258
2259 \subsection{When?}
2260 \label{tutodoc-changes-when}
2261
2262 You can date and/or version something.
2263
2264
2265 \begin{tdocexa}[Dating new features]
2266 The \tdocmacro{tdocdate} macro is used to indicate a date in the margin, as in the following example.
2267
2268 \tdoclatexshow{examples-version-n-change-dating.tex}
2269 \end{tdocexa}
2270
2271
2272 \begin{tdocexa}[Versioning new features, possibly with a date]
2273 Associating a version number with a new feature is done using the \tdocmacro{tdocversion} macro, with the color and date being optional arguments.
2274
2275 \tdoclatexshow{examples-version-n-change-versioning.tex}
2276 \end{tdocexa}
2277
2278
2279 \begin{tdocexa}[Caution with paragraph titles]
2280 The following example shows that a date and/or version must be placed just after a paragraph title, and not before it.
2281
2282 \tdoclatexshow{examples-version-n-change-para-title.tex}
2283 \end{tdocexa}
2284
2285
2286 \begin{tdocexa}[Adjust vertical shift]
2287 If required, you can modify the vertical offset used to place dates and versions in the margin, the default value being $(-8\,\mathit{pt})$.
2288
2289 \tdoclatexshow{examples-version-n-change-manual-setting.tex}
2290 \end{tdocexa}
2291
2292
2293 \begin{tdocimp}
2294 \begin{enumerate}[wide]
2295 \item The \tdocmacro{tdocdate} and \tdocmacro{tdocversion} macros require two compilations.
2296
2297 \item The final rendering of the dates takes into account the language detected by \thisproj{}: for example, if French is selected, the dates will be displayed in the format \texttt{DD/MM/YYYY}.
2298 \end{enumerate}
2299 \end{tdocimp}
2300
2301
2302 \begin{tdoccaut}
2303 Only the use of the digital format \tdoclatexin+YYYY-MM-DD+ is verified,%
2304 \footnote{
2305 Technically, checking the validity of a date using \LaTeX3 presents no difficulty.
2306 }
2307 and this is a choice! Why? Quite simply because dating and versioning explanations should be done semi-automatically to avoid any human bugs.
2308 \end{tdoccaut}
2309
2310
2311 \subsection{What's new?}
2312
2313 \thisproj\ offers the macro \tdocmacro{tdocstartproj} and different environments to indicate quickly and clearly what has been done during the changes made, or to come.%
2314 \footnote{
2315 The user doesn't need all the technical details.
2316 }
2317
2318
2319 \begin{tdocnote}
2320 For icons, see the note at the beginning of the section \ref{tutodoc-admonitions} on page \pageref{tutodoc-admonitions}.
2321 \end{tdocnote}
2322
2323
2324 \subsubsection{Sobriety first}
2325
2326 \foreach \exatitle/\filename in {
2327 % Standard.
2328 {Just for the very first version}/%<-- Translate me!
2329 first,
2330 {For new features}/% <-- Translate me!
2331 new,
2332 {For updates}/% <-- Translate me!
2333 update,
2334 {For breaks}/% <-- Translate me!
2335 break,
2336 {For problems}/% <-- Translate me!
2337 pb,
2338 {For fixes}/% <-- Translate me!
2339 fix,
2340 {Roadmap}/% <-- Translate me!
2341 todo,
2342 {Technical information}/% <-- Translate me!
2343 tech,
2344 % Customized.
2345 {Selectable themes with an icon}/% <-- Translate me!
2346 user-choice-icon,
2347 {Selectable themes without icons}/%<-- Translate me!
2348 user-choice%
2349 } {
2350 \begin{tdocexa}[\exatitle]
2351 \leavevmode
2352
2353 \tdoclatexinput<\tdoctcb{sbs}>{examples-version-n-change-chges-\filename.tex}
2354 \end{tdocexa}
2355 }
2356
2357
2358 \subsubsection{Color if necessary}
2359
2360 It may be useful to highlight some changes: this can only be done by modifying the content color.
2361
2362 \foreach \exatitle/\filename in {
2363 {A flashy first version}/%<-- Translate me!
2364 first,
2365 {Outstanding fixes}/% <-- Translate me!
2366 fix%
2367 } {
2368 \begin{tdocexa}[\exatitle]
2369 \leavevmode
2370
2371 \tdoclatexinput<\tdoctcb{sbs}>{examples-version-n-change-color-chges-\filename.tex}
2372 \end{tdocexa}
2373 }
2374
2375
2376 \subsection{The what and the when}
2377
2378 The optional keys \tdoclatexin{col-chges}\,, \tdoclatexin{date} and \tdoclatexin{version} allow to date and/or version a change of a particular type.
2379 Here are some examples of use.
2380
2381 \tdoclatexshow{examples-version-n-change-what-n-when.tex}
2382
2383
2384 \section{Ornament}
2385
2386 Let's finish this documentation with a small formatting tool that can be very useful.
2387
2388
2389 \begin{tdoclatex}<\tdoctcb{sbs}>
2390 Bla, bla, bla...
2391
2392 \tdocsep % Practical for demarcation.
2393
2394 This works with enumerations.
2395
2396 \begin{itemize}
2397 \item Focus.
2398 \end{itemize}
2399
2400 \tdocsep % Uniform behaviour.
2401
2402 Ble, ble, ble...
2403 \end{tdoclatex}
2404
2405
2406 \section{Contribute}
2407
2408 \begin{tdocnote}
2409 \textbf{You don't need to be a coder to take part in translations}, including those that are useful for the running of \thisproj.
2410 \end{tdocnote}
2411
2412
2413 %\section{Contribute}
2414
2415 \subsection{Complete the translations}
2416
2417 \begin{tdocnote}
2418 The author of \thisproj\ manages the French and English versions of the translations.
2419 \end{tdocnote}
2420
2421
2422 \begin{tdoccaut}
2423 Although we're going to explain how to translate the documentation, it doesn't seem relevant to do so, as English should suffice these days.%
2424 \footnote{
2425 The existence of a French version is simply a consequence of the native language of the author of \thisproj.
2426 }
2427 \end{tdoccaut}
2428
2429
2430 \begin{figure}[ht]
2431 \centering
2432 \contribtranslatedirtree\
2433 \caption{Simplified view of the translation folder}
2434 \label{tutodoc-contrib-translate-dir}
2435 \end{figure}
2436
2437
2438 The translations are roughly organized as in figure \ref{tutodoc-contrib-translate-dir} where just the important folders for the translations have been \tdocquote{opened}\,.%
2439 \footnote{
2440 This was the organization on October 5, 2024.
2441 }
2442 \textbf{A little further down, the section \ref{tutodoc-contrib-translate} explains how to add new translations}.
2443
2444
2445 \subsubsection{The \texttt{fr} and \texttt{en} folders}
2446
2447 These two folders, managed by the author of \thisproj, have the same organization; they contain files that are easy to translate even if you're not a coder.
2448
2449
2450 \subsubsection{The \texttt{changes} folder}
2451
2452 This folder is a communication tool where important changes are indicated without dwelling on minor modifications specific to one or more translations.
2453
2454
2455 \subsubsection{The \texttt{status} folder}
2456
2457 This folder is used to keep track of translations from the project's point of view. Everything is done via well-commented \verb#YAML# files, readable by a non-coder.
2458
2459
2460 \subsubsection{The \texttt{README.md} and \texttt{LICENSE.txt} files}
2461
2462 The \texttt{LICENSE.txt} file is aptly named, while the \texttt{README.md} file takes up in English the important points of what is said in this section about new translations.
2463
2464
2465 \subsubsection{New translations}
2466 \label{tutodoc-contrib-translate}
2467
2468 \begin{tdocimp}
2469 The \verb#api# folder contains translations relating to the functionalities of \thisproj.
2470 Here you'll find \verb#TXT# files for editing with a text or code editor, but not with a document processor.
2471 The content of these files uses commented lines in English to explain what \thisproj\ will do; these lines begin with \verb#//#\,. Here's an extract from such a file, where translations are made after each \,$=$\ sign, without touching the preceding, as this initial piece is used internally by the \thisproj\ code.
2472
2473 \tdocsep
2474 \vspace{-10pt}
2475 \begin{verbatim}
2476 // #1: year in format YYYY like 2023.
2477 // #2: month in format MM like 04.
2478 // #3: day in format DD like 29.
2479 date = #1-#2-#3
2480
2481 // #1: the idea is to produce one text like
2482 // "this word means #1 in English".
2483 in_EN = #1 in english\end{verbatim}
2484 \end{tdocimp}
2485
2486
2487 \begin{tdocnote}
2488 The \verb#doc# folder is reserved for documentation. It contains \verb#TEX# files that can be compiled directly for real-time validation of translations.
2489 \end{tdocnote}
2490
2491
2492 \begin{tdocwarn}
2493 Only start from one of the \verb#fr# and \verb#en# folders, as these are the responsibility of the \thisproj\ author.
2494 \end{tdocwarn}
2495
2496
2497 \medskip
2498
2499
2500 \emph{\textbf{Let's say you want to add support for Italian from files written in English.}}%
2501 \footnote{
2502 As mentioned above, there is no real need for the \texttt{doc} folder.
2503 }
2504
2505
2506 \paragraph{Method 1 : use of \git.}
2507
2508 \begin{enumerate}
2509 \item Recover the entire project folder via \thisrepo\,.
2510 Do not use the \verb#main# branch, which is used to freeze the latest stable versions of projects in the single \thismonorepo\ repository,.
2511
2512 \item In the \verb#tutodoc/contrib/translate# folder, create an \verb#it# copy of the \verb#en# folder, with the short name of the language documented in
2513 \href{https://en.wikipedia.org/wiki/IETF_language_tag#List_of_common_primary_language_subtags}%
2514 {the page \tdocquote{IIETF language tag}}
2515 from \texttt{Wikipedia}.
2516
2517 \item Once the translation is complete in the \verb#it# folder, share it via \thisrepo\ using a classic \verb#git push#\,.
2518 \end{enumerate}
2519
2520
2521 \paragraph{Method 2 : communicate by e-mail.}
2522
2523 \begin{enumerate}
2524 \item By e-mail with the \mailsubject{en FOR italian}, request a version of the English translations (note the use of the English name for the new language).
2525 Be sure to respect the subject of the e-mail, as the author of \thisproj\ automates the pre-processing of this type of e-mail.
2526
2527 \item You will receive a folder named \verb#italian# containing the English version of the latest translations.
2528 This folder will be the place for your contribution.
2529
2530 \item Once the translation is complete, you will need to compress your \verb#italian# file in \verb#zip# or \verb#rar# format before sending it by e-mail with the \mailsubject{italian}\,.
2531 \end{enumerate}
2532
2533
2534 %\section{Contribute}
2535
2536 \subsection{Improving the source code}
2537
2538 \begin{tdocimp}
2539 If you want to participate to \thisproj\,, you'll need to use the \LaTeX3 programming paradigm.
2540 \end{tdocimp}
2541
2542
2543 Participation as a coder is made via the repository \thisrepo\ corresponding to the \verb#tutodoc# development branch.
2544
2545
2546 \begin{tdoccaut}
2547 Do not use the \verb#main# branch, which is used to freeze the latest stable versions of projects in the mono repository \thismonorepo.
2548 \end{tdoccaut}
2549
2550
2551 \section{History}
2552
2553 \small
2554
2555 \begin{tdocfix}[version = 1.7.1, date = 2024-12-18]
2556 \item Documentation: references to tools to indicate changes have been incorrectly written as characteristics of highlighted colored content.
2557 \end{tdocfix}
2558
2559
2560 \begin{tdocbreak}
2561 \item The \tdocmacro{tdocenv} macro and its starred version no longer offer an option.
2562
2563 \item \LaTeX\ showcases: the default layout is more sober, and there are options for having just the rulers, or the colored stripe. See just after.
2564 \end{tdocbreak}
2565
2566
2567 \begin{tdocnew}
2568 \item Formatting of computer codes in addition to those specifically in \LaTeX.
2569 %
2570 \begin{enumerate}
2571 \item Creation of \tdocenv{tdoccode} and \tdocmacro{tdoccodein}.
2572
2573 \item For macros for inline code, and environments for blocks of code, \tdocpack{minted} options are indicated inside square brackets in the traditional way: \tdoclatexin{[minted options]}\,.
2574
2575 \item For code block environments, \tdocpack{tcolorbox} options are indicated inside rafters: \tdoclatexin{<tcolorbox options>}\,.
2576
2577 \item The new macro \tdocmacro{tdoctcb} allows to use shortcuts for regularly used \tdocpack{tcolorbox} styles.
2578 \end{enumerate}
2579
2580 \item Documentation: a new section presents tools for formatting computer codes other than those in \LaTeX.
2581 \end{tdocnew}
2582
2583
2584 \begin{tdocupdate}
2585 \item Sub-sub-sections are numbered in lower case.
2586
2587 \item Themes.
2588 %
2589 \begin{enumerate}
2590 \item Less space consumed.
2591
2592 \item Shadows have better coloring.
2593
2594 \item For all themes except the \tdoclatexin{draft} one, the radius of the arcs of the corners of the frames has changed from \tdoclatexin{.75mm} to \tdoclatexin{.2pt},.
2595
2596 \item Use case in \LaTeX: with the theme \tdoclatexin{color}, the background color changes from \tdoclatexin[bgcolor = yellow!4]{yellow!4} to \tdoclatexin{gray!5}.
2597
2598 \item Latest changes: with the \tdoclatexin{dark} theme, the \tdoclatexin{[Init]} text produced by the \tdocmacro{tdocstartproj} macro uses the same font as the environment titles to indicate changes.
2599 \end{enumerate}
2600 \end{tdocupdate}
2601
2602 \tdocsep
2603
2604
2605 % ------------------ %
2606
2607
2608 \begin{tdocbreak}[version = 1.7.0, date = 2024-12-04]
2609 \item Format: the \tdoccls{scrartcl} class replaces the venerable \tdoccls{article}. This implies better placement of the margin notes with the options retained for loading \tdoccls{scrartcl}.
2610
2611 \item \LaTeX\ code: the macro \tdocmacro{tdocinlatex} has been renamed \tdocmacro{tdoclatexin}.
2612
2613 \item Color key names will be hyphenated where necessary: this implies the following changes.
2614 %
2615 \begin{enumerate}
2616 \item Indicate the latest changes: the \tdoclatexin{colchges} option of the environments has been renamed \tdoclatexin{col-chges}.
2617
2618 \item Showcases: for the environment \tdocenv*{tdocshowcase} and the macro \tdocmacro{tdocshowcaseinput}, the \tdoclatexin{colstripe} and \tdoclatexin{coltext} options have been renamed \tdoclatexin{col-stripe} and \tdoclatexin{col-text}\,.
2619 \end{enumerate}
2620 \end{tdocbreak}
2621
2622
2623 \begin{tdocfix}
2624 \item Admonitions: for the \tdocmacro{newkeytheorem} used with the \tdoclatexin{draft} theme, \tdoclatexin{postheadhook = \leavevmode} has been added (this is necessary because the content can naturally be of the list type).
2625 \end{tdocfix}
2626
2627
2628 \begin{tdocnew}
2629 \item Documentation: addition of a section listing dependencies.
2630
2631 \item Class options.
2632 %
2633 \begin{enumerate}
2634 \item Options not specific to \thisproj\ are passed on to the class in charge of general formatting.
2635
2636 \item The \tdoccls{scrartcl} options \tdoclatexin{fontsize} and \tdoclatexin{DIV} can't be used because their values are fixed by \thisproj.
2637 \end{enumerate}
2638
2639 \item The macro \tdocmacro{tdocinEN} respects the English linguistic rules.
2640
2641 \item Indicate the latest changes.
2642 %
2643 \begin{enumerate}
2644 \item Add the environment \tdocenv{tdoctodo}\,.
2645
2646 \item Each environment has a new option \tdoclatexin{col} for the color of the content indicating changes.
2647 \end{enumerate}
2648 \end{tdocnew}
2649
2650
2651 \begin{tdocupdate}
2652 \item \tdoclatexin{draft} theme and changes: the environments for the latest changes stop to use icons.
2653
2654 \item Documentation: the theme gallery uses a better fake example.
2655 \end{tdocupdate}
2656
2657
2658
2659 \begin{tdoctech}
2660 \item Simplified organisation of configuration files in the final project.
2661 %
2662 \begin{enumerate}
2663 \item Use of one file per theme with a name like \texttt{tutodoc-*.css.cls}\,.
2664
2665 \item Locale: use of names like \texttt{tutodoc-*.loc.cls}\,.
2666 \end{enumerate}
2667 \end{tdoctech}
2668
2669 \tdocsep
2670
2671
2672 % ------------------ %
2673
2674
2675 \begin{tdocnew}[version = 1.6.2, date = 2024-10-30]
2676 \item The macros \tdocmacro{tdocdate} and \tdocmacro{tdocversion} has a new final optional argument \tdoclatexin{<voffset>} to choose a specific vertical offset.
2677
2678 \item Better environments to indicate the changes made.
2679 \begin{enumerate}
2680 \item The new optional keys \tdoclatexin{col}\,, \tdoclatexin{date} and \tdoclatexin{version} allow to date and version a change of a specific topic.
2681
2682 \item Use of \tdocmacro{paragraph} for the title.
2683 \end{enumerate}
2684 \end{tdocnew}
2685
2686
2687 \begin{tdocupdate}
2688 \item Version and changes: the font of the margin notes will always have a normal shape.
2689
2690 \item Ornament: use of a \tdoclatexin{\cleaders} to avoid orphean rules at the bottom of a page.
2691 \end{tdocupdate}
2692
2693 \tdocsep
2694
2695
2696 % ------------------ %
2697
2698
2699 \begin{tdoctech}[version = 1.6.1, date = 2024-10-28]
2700 \item The naming rules of \ctan\ need the use of \trademark{CSS} files named \verb+tutodoc-*.css.cls.sty+\,.
2701 \end{tdoctech}
2702
2703 \tdocsep
2704
2705
2706 % ------------------ %
2707
2708
2709 \begin{tdocbreak}[version = 1.6.0, date = 2024-10-27]
2710 \item The \tdocenv*{showcase} environment and its descendants: the \tdoclatexin{color} key has been renamed \tdoclatexin{colstripe}.
2711
2712 \item The macro \tdocmacro{tdoclinkcolor} becomes the color \tdoclatexin{tutodoc@link@color} for internal use.
2713 \end{tdocbreak}
2714
2715
2716 \begin{tdocnew}
2717 \item The \tdoclatexin{theme} class option allows you to choose different formatting themes.
2718
2719 \item Change log: addition of the \tdocenv*{tdoctech} environment for technical information.
2720
2721 \item The \tdocenv*{showcase} environment and its descendants: the \tdoclatexin{coltext} key can also be used to change the text color.
2722
2723 \item The new functionalities have been documented.
2724 \end{tdocnew}
2725
2726
2727 \begin{tdocupdate}
2728 \item Change log: the \tdocenv*{tdocupdate} environment uses the icon
2729 \raisebox{0pt}[0pt][0pt]{\fbox{\reflectbox{\faHistory}}}
2730 instead of
2731 \raisebox{0pt}[0pt][0pt]{\fbox{\faMagic}}\,.
2732 \end{tdocupdate}
2733
2734
2735 \begin{tdocfix}
2736 \item The Spanish translations were not included in the previous version! Don't laugh too loud...
2737 \end{tdocfix}
2738
2739 \tdocsep
2740
2741
2742 % ------------------ %
2743
2744
2745 \begin{tdoctech}[version = 1.5.0, date = 2024-10-19]
2746 \item Version 3 of \tdocpack{minted} is taken into account.
2747 \end{tdoctech}
2748
2749
2750 \begin{tdocbreak}
2751 \item The \thisproj\ class replaces the now-defunct \thisproj\ package (for the moment, the young class offers no specific options).
2752
2753 \item The \tdocmacro{tdocruler} macro is now used via \tdoclatexin{\tdocruler[<color>]{<text>}} (remember that the old syntax was \tdoclatexin{\tdocruler{<text>}{<color>}}).
2754 \end{tdocbreak}
2755
2756
2757 \begin{tdocnew}
2758 \item The class is usable in Spanish.
2759
2760 \item The documentation contains a new section explaining how to contribute.
2761 \end{tdocnew}
2762
2763
2764 \begin{tdocfix}
2765 \item The \tdocmacro{tdocdate} macro did not handle date format and formatting.
2766
2767 \item Colored frames did not color text after a page break.
2768 \end{tdocfix}
2769
2770 \tdocsep
2771
2772
2773 % ------------------ %
2774
2775
2776 \begin{tdocbreak}[version = 1.4.0, date = 2024-09-28]
2777 \item The \tdocenv*{tdoccaution} environment has been renamed \tdocenv*{tdoccaut} for simplified input.
2778
2779 \item Content highlighting: examples and remarks, indicated via the \tdocenv*{tdocexa} and \tdocenv*{tdocrem} environments, are numbered using a common counter.
2780
2781 \item The unused macro \tdocmacro{tdocxspace} has been deleted.
2782 \end{tdocbreak}
2783
2784
2785 \begin{tdocnew}
2786 \item Change log: the \tdocmacro{tdocstartproj} macro is used to manage the case of the first public version.
2787
2788 \item Code factorization: the \tdocmacro{tdocicon} macro is responsible for adding icons in front of text.
2789 \end{tdocnew}
2790
2791
2792 \begin{tdocupdate}
2793 \item Colors: the \tdocmacro{tdocdarkcolor} and \tdocmacro{tdoclightcolor} macros offer an optional argument.
2794 \begin{enumerate}
2795 \item \tdocmacro{tdocdarkcolor}: the amount of color in relation to black can be optionally defined.
2796
2797 \item \tdocmacro{tdoclightcolor}: the transparency rate can be optionally defined.
2798 \end{enumerate}
2799
2800 \item Content highlighting: reduced space around content in colored frames.
2801
2802 \item Versioning: better vertical spacing thanks to \tdocmacro{vphantom}.
2803 \end{tdocupdate}
2804
2805 \tdocsep
2806
2807
2808 % ------------------ %
2809
2810
2811 \begin{tdocnew}[version = 1.3.1, date = 2024-09-26]
2812 \item Star version of \tdocmacro{tdocenv} to display only the environment name.
2813 \end{tdocnew}
2814
2815 \tdocsep
2816
2817
2818 % ------------------ %
2819
2820
2821 \begin{tdoctech}[version = 1.3.0, date = 2024-09-25]
2822 \item Version 3 of \tdocpack{minted} cannot be used for the moment as it contains bugs: see \url{https://github.com/gpoore/minted/issues/401}. We therefore force temporarily the use of version 2 of \tdocpack{minted}.
2823 \end{tdoctech}
2824
2825
2826 \begin{tdocbreak}
2827 \item The \tdocenv*{tdocimportant} environment has been renamed \tdocenv*{tdocimp} for simplified input.
2828 \end{tdocbreak}
2829
2830
2831 \begin{tdocnew}
2832 \item Change log: proposed environments use icons.
2833
2834
2835 \item Content highlighting: colored frames with icons are proposed for the following environments.
2836 %
2837 \begin{tasks}[label=\arabic*.](3)
2838 \task \tdocenv*{tdoccaution}
2839 \task \tdocenv*{tdocimp}
2840 \task \tdocenv*{tdocnote}
2841 \task \tdocenv*{tdoctip}
2842 \task \tdocenv*{tdocwarn}
2843 \end{tasks}
2844 \end{tdocnew}
2845
2846 \tdocsep
2847
2848
2849 % ------------------ %
2850
2851
2852 \begin{tdocupdate}[version = 1.2.0-a, date = 2024-08-23]
2853 \item \tdocmacro{tdocversion}
2854 \begin{enumerate}
2855 \item The version number is above the date.
2856
2857 \item The spacing is better managed when the date is absent.
2858 \end{enumerate}
2859 \end{tdocupdate}
2860
2861
2862 \begin{tdocfix}
2863 \item Content highlighting: the French translations of \tdocinEN*{caution} and \tdocinEN*{danger} were incorrect.
2864 \end{tdocfix}
2865
2866 \tdocsep
2867
2868
2869 % ------------------ %
2870
2871
2872 \begin{tdocnew}[version = 1.1.0, date = 2024-01-06]
2873 \item Change log: two new environments.
2874 \begin{enumerate}
2875 \item \tdocenv{tdocbreak} for breaking changes which are not backward compatible.
2876
2877 \item \tdocenv{tdocprob} for identified problems.
2878 \end{enumerate}
2879
2880 \item \tdocmacro{tdoclatexin}: a light yellow is used as the background color.
2881 \end{tdocnew}
2882
2883 \tdocsep
2884
2885
2886 % ------------------ %
2887
2888
2889 \begin{tdocfix}[version = 1.0.1, date = 2023-12-08]
2890 \item \tdocmacro{tdocenv}: spacing is now correct, even if the \tdocpack{babel} package is not loaded with the French language.
2891
2892 \item \tdocenv[{[nostripe]}]{tdocshowcase} : page breaks around \tdocquote{framing} lines should be rare from now on.
2893 \end{tdocfix}
2894
2895 \tdocsep
2896
2897
2898 % ------------------ %
2899
2900
2901 \tdocversion{1.0.0}[2023-11-29]
2902 \tdocstartproj{First public version of the project.}
2903
2904 \end{document}