texlive[72719] Master/texmf-dist: tutodoc (31oct24)
commits+karl at tug.org
commits+karl at tug.org
Thu Oct 31 21:33:21 CET 2024
Revision: 72719
https://tug.org/svn/texlive?view=revision&revision=72719
Author: karl
Date: 2024-10-31 21:33:20 +0100 (Thu, 31 Oct 2024)
Log Message:
-----------
tutodoc (31oct24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-en.pdf
trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-en.tex
trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-fr.pdf
trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-fr.tex
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-admonitions.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-listing.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-version-n-change.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-admonitions.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-listing.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-version-n-change.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-admonitions.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-listing.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-version-n-change.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-admonitions.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-listing.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-version-n-change.css.cls.sty
trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc.cls
Modified: trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-en.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-en.tex 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-en.tex 2024-10-31 20:33:20 UTC (rev 72719)
@@ -35,7 +35,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -47,8 +47,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -60,7 +60,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -127,7 +127,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -139,8 +139,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -152,7 +152,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -219,7 +219,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -231,8 +231,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -244,7 +244,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -311,7 +311,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -323,8 +323,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -336,7 +336,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -394,7 +394,7 @@
\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice-icon.tex}
-\begin{tdoctopic}{To hide}[\faEyeSlash]
+\begin{tdoctopic}{To hide}<\faEyeSlash>
% An icon from fontawesome5.
\item Info 1...
\item Info 2...
@@ -434,6 +434,32 @@
\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-version-n-change-side-effect.tex}
+\tdocversion[red]{1.2.3}[2024-10-29]%
+\paragraph{Before it's problematic.}
+Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+
+
+\paragraph{After it's misplaced}%
+\tdocversion[red]{1.2.3}[2024-10-29]
+
+Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
+
+
+\paragraph{No miracle solution.\tdocversion[red]{1.2.3}[2024-10-29]}
+
+Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli,
+bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli,
+bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli,
+bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli...
+
+
+\paragraph{Manual problem management.\tdocversion{1.2.3}[2024-10-29]<-.7cm>}
+
+Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
+\end{filecontents*}
+
+
\begin{filecontents*}[overwrite]{examples-version-n-change-first.tex}
\tdocstartproj{1st version of the project.}
\end{filecontents*}
@@ -447,6 +473,27 @@
\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-version-n-change-what-n-when.tex}
+\begin{tdoctech}[col = red,
+ date = 2024-10-29]
+ \item Info 1...
+ \item Info 2...
+\end{tdoctech}
+
+\begin{tdocupdate}[col = ForestGreen,
+ version = 1.2.3]
+ \item Info 1...
+ \item Info 2...
+\end{tdocupdate}
+
+\begin{tdoctopic}{To hide}<\faEyeSlash>%
+ [version = 4.5.6, date = 2025-11-30]
+ \item Info 1...
+ \item Info 2...
+\end{tdoctopic}
+\end{filecontents*}
+
+
\begin{filecontents*}[overwrite]{examples-version-n-change-break.tex}
\begin{tdocbreak}
\item Info 1...
@@ -845,7 +892,7 @@
\title{The \texttt{tutodoc} class - Tutorial-style documentation}
\author{Christophe, BAL}
-\date{Oct 28, 2024 - Version 1.6.1}
+\date{Oct 30, 2024 - Version 1.6.2}
\maketitle
@@ -874,9 +921,23 @@
\begin{tdocnote}[Last changes]
\small
-\begin{tdoctech}
- \item The naming rules of \ctan\ need the use of \trademark{CSS} files named \verb+tutodoc-*.css.cls.sty+\,.
-\end{tdoctech}
+\begin{tdocnew}
+ \item The macros \tdocmacro{tdocdate} and \tdocmacro{tdocversion} has a new final optional argument \tdocinlatex{<voffset>} to choose a specific vertical offset.
+
+ \item Better environments to indicate the changes made.
+ \begin{enumerate}
+ \item The new optional keys \tdocinlatex{col}\,, \tdocinlatex{date} and \tdocinlatex{version} allow to date and version a change of a specific topic.
+
+ \item Use of \tdocmacro{paragraph} for the title.
+ \end{enumerate}
+\end{tdocnew}
+
+
+\begin{tdocupdate}
+ \item Version and changes: the font of the margin notes will always have a normal shape.
+
+ \item Ornament: use of a \tdocinlatex{\cleaders} to avoid orphean rules at the bottom of a page.
+\end{tdocupdate}
\end{tdocnote}
\end{minipage}
\end{center}
@@ -1091,23 +1152,23 @@
% The gallery starts here...
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-bw}
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-color}
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-dark}
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-draft}
}
@@ -1176,14 +1237,14 @@
\label{tutodoc-admonitions}
\begin{tdocnote}
- 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}.
- As for the icons, they are obtained via the \tdocpack{fontawesome5} package, and the \tdocmacro{tdocicon} macro manages the spacing in relation to the text.
- \footnote{
- For example,
- \tdocinlatex|\fbox{tdocicon{faBed}{Fatigued}}|
- produces
- \fbox{\tdocicon{\faBed}{Fatigued}},.
- }
+ 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}.
+ As for the icons, they are obtained via the \tdocpack{fontawesome5} package, and the \tdocmacro{tdocicon} macro manages the spacing in relation to the text.
+ \footnote{
+ For example,
+ \tdocinlatex|\fbox{tdocicon{faBed}{Fatigued}}|
+ produces
+ \fbox{\tdocicon{\faBed}{Fatigued}}\,.
+ }
\end{tdocnote}
@@ -1201,7 +1262,7 @@
\begin{tdoctip}
Sometimes, highlighted content can be reduced to a list. In this case, the formatting can be improved as follows where we use the \tdocinlatex{wide} option from the \tdocpack{enumitem} package.
- \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex}
+ \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex}
\end{tdoctip}
@@ -1667,6 +1728,7 @@
\subsection{When?}
+\label{tutodoc-changes-when}
You can either date something, or version it, in which case the version number can be dated.
@@ -1702,12 +1764,22 @@
\end{tdocimp}
-\begin{tdocwarn}
+\begin{tdoccaut}
Only the use of the digital format \tdocinlatex+YYYY-MM-DD+ is verified,
\footnote{
Technically, checking the validity of a date using \LaTeX3 presents no difficulty.
}
and this is a choice! Why? Quite simply because dating and versioning explanations should be done semi-automatically to avoid any human bugs.
+\end{tdoccaut}
+
+
+\begin{tdocwarn}
+ Behind the scenes, most of the work is done by the \tdocmacro{marginnote} macro in the eponymous package.
+ The \tdocmacro{tdocdate} and \tdocmacro{tdocversion} macros therefore suffer from the same side effects as in the following example.
+ However, these problems can be solved using an optional argument \tdocinlatex{<vertical-displacement>}, as at the end of the following example. It's ugly, but functional.
+
+ \tdoclatexshow[nostripe, colstripe=red]{examples-version-n-change-side-effect.tex}
+
\end{tdocwarn}
@@ -1726,23 +1798,23 @@
\foreach \exatitle/\filename in {
{Just for the very first version}/%<-- Translate me!
- first,
+ first,
{For new features}/% <-- Translate me!
- new,
+ new,
{For updates}/% <-- Translate me!
- update,
+ update,
{For breaks}/% <-- Translate me!
- break,
+ break,
{For problems}/% <-- Translate me!
- pb,
+ pb,
{For fixes}/% <-- Translate me!
- fix,
+ fix,
{Technical information}/% <-- Translate me!
- tech,
+ tech,
{Selectable themes with an icon}/% <-- Translate me!
- user-choice-icon,
+ user-choice-icon,
{Selectable themes without icons}/%<-- Translate me!
- user-choice%
+ user-choice%
} {
\begin{tdocexa}[\exatitle]
\leavevmode
@@ -1753,8 +1825,20 @@
}
-\section{Ornaments}
+\subsection{The what and the when}
+The optional keys \tdocinlatex{col}\,, \tdocinlatex{date} and \tdocinlatex{version} allow to date and version a change of a particular type.%
+\footnote{
+ The warning at the end of the section \ref{tutodoc-changes-when} gives the technique used behind the scene, while showing the need to offer specialized keys.
+}
+Here are some examples of use.
+
+\tdoclatexshow{examples-version-n-change-what-n-when.tex}
+
+
+
+\section{Ornament}
+
Let's finish this documentation with a small formatting tool that is very useful.
@@ -1800,7 +1884,7 @@
\begin{figure}[ht]
- \centering
+ \centering
\contribtranslatedirtree\
\caption{Simplified view of the translation folder}
\label{tutodoc-contrib-translate-dir}
@@ -1811,7 +1895,7 @@
\footnote{
This was the organization on October 5, 2024, but it's still relevant today.
}
-\textbf{A little further down, the \ref{tutodoc-contrib-translate} section explains how to add new translations}.
+\textbf{A little further down, the section \ref{tutodoc-contrib-translate} explains how to add new translations}.
\subsubsection{The \texttt{fr} and \texttt{en} folders}
@@ -1920,11 +2004,31 @@
\small
-\tdocversion{1.6.1}[2024-10-28]
+\begin{tdocnew}[version = 1.6.2, date = 2024-10-30]
+ \item The macros \tdocmacro{tdocdate} and \tdocmacro{tdocversion} has a new final optional argument \tdocinlatex{<voffset>} to choose a specific vertical offset.
-\small
+ \item Better environments to indicate the changes made.
+ \begin{enumerate}
+ \item The new optional keys \tdocinlatex{col}\,, \tdocinlatex{date} and \tdocinlatex{version} allow to date and version a change of a specific topic.
-\begin{tdoctech}
+ \item Use of \tdocmacro{paragraph} for the title.
+ \end{enumerate}
+\end{tdocnew}
+
+
+\begin{tdocupdate}
+ \item Version and changes: the font of the margin notes will always have a normal shape.
+
+ \item Ornament: use of a \tdocinlatex{\cleaders} to avoid orphean rules at the bottom of a page.
+\end{tdocupdate}
+
+\tdocsep
+
+
+% ------------------ %
+
+
+\begin{tdoctech}[version = 1.6.1, date = 2024-10-28]
\item The naming rules of \ctan\ need the use of \trademark{CSS} files named \verb+tutodoc-*.css.cls.sty+\,.
\end{tdoctech}
@@ -1934,38 +2038,34 @@
% ------------------ %
-\tdocversion{1.6.0}[2024-10-27]
+\begin{tdocbreak}[version = 1.6.0, date = 2024-10-27]
+ \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{color} key has been renamed \tdocinlatex{colstripe}.
-\small
-
-\begin{tdocbreak}
- \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{color} key has been renamed \tdocinlatex{colstripe}.
-
- \item The macro \tdocmacro{tdoclinkcolor} has been renamed \tdocinlatex{tutodoc at link@color} for internal use.
+ \item The macro \tdocmacro{tdoclinkcolor} has been renamed \tdocinlatex{tutodoc at link@color} for internal use.
\end{tdocbreak}
\begin{tdocnew}
- \item The \tdocinlatex{theme} class option allows you to choose different formatting themes.
+ \item The \tdocinlatex{theme} class option allows you to choose different formatting themes.
- \item Change log: addition of the \tdocenv*{tdoctech} environment for technical information.
+ \item Change log: addition of the \tdocenv*{tdoctech} environment for technical information.
- \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{coltext} key can also be used to change the text color.
+ \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{coltext} key can also be used to change the text color.
- \item The new functionalities have been documented.
+ \item The new functionalities have been documented.
\end{tdocnew}
\begin{tdocupdate}
- \item Change log: the \tdocenv*{tdocupdate} environment uses the icon
- \raisebox{0pt}[0pt][0pt]{\fbox{\reflectbox{\faHistory}}}
- instead of
- \raisebox{0pt}[0pt][0pt]{\fbox{\faMagic}}\,.
+ \item Change log: the \tdocenv*{tdocupdate} environment uses the icon
+ \raisebox{0pt}[0pt][0pt]{\fbox{\reflectbox{\faHistory}}}
+ instead of
+ \raisebox{0pt}[0pt][0pt]{\fbox{\faMagic}}\,.
\end{tdocupdate}
\begin{tdocfix}
- \item The Spanish translations were not included in the previous version! Don't laugh too hard...
+ \item The Spanish translations were not included in the previous version! Don't laugh too hard...
\end{tdocfix}
\tdocsep
@@ -1974,11 +2074,7 @@
% ------------------ %
-\tdocversion{1.5.0}[2024-10-19]
-
-\small
-
-\begin{tdoctech}
+\begin{tdoctech}[version = 1.5.0, date = 2024-10-19]
\item Version 3 of \tdocpack{minted} is taken into account.
\end{tdoctech}
@@ -2009,11 +2105,7 @@
% ------------------ %
-\tdocversion{1.4.0}[2024-09-28]
-
-\small
-
-\begin{tdocbreak}
+\begin{tdocbreak}[version = 1.4.0, date = 2024-09-28]
\item The \tdocenv*{tdoccaution} environment has been renamed \tdocenv*{tdoccaut} for simplified input.
\item Content highlighting: examples and remarks, indicated via the \tdocenv*{tdocexa} and \tdocenv*{tdocrem} environments, are always numbered using a common counter.
@@ -2048,11 +2140,7 @@
% ------------------ %
-\tdocversion{1.3.1}[2024-09-26]
-
-\small
-
-\begin{tdocnew}
+\begin{tdocnew}[version = 1.3.1, date = 2024-09-26]
\item Star version of \tdocmacro{tdocenv} to display only the environment name.
\end{tdocnew}
@@ -2062,11 +2150,7 @@
% ------------------ %
-\tdocversion{1.3.0}[2024-09-25]
-
-\small
-
-\begin{tdoctech}
+\begin{tdoctech}[version = 1.3.0, date = 2024-09-25]
\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}.
\end{tdoctech}
@@ -2101,11 +2185,7 @@
% ------------------ %
-\tdocversion{1.2.0-a}[2024-08-23]
-
-\small
-
-\begin{tdocupdate}
+\begin{tdocupdate}[version = 1.2.0-a, date = 2024-08-23]
\item \tdocmacro{tdocversion}
\begin{enumerate}
\item The version number is above the date.
@@ -2125,11 +2205,7 @@
% ------------------ %
-\tdocversion{1.1.0}[2024-01-06]
-
-\small
-
-\begin{tdocnew}
+\begin{tdocnew}[version = 1.1.0, date = 2024-01-06]
\item Change log: two new environments.
\begin{enumerate}
\item \tdocenv{tdocbreak} for breaking changes which are not backward compatible.
@@ -2146,11 +2222,7 @@
% ------------------ %
-\tdocversion{1.0.1}[2023-12-08]
-
-\small
-
-\begin{tdocfix}
+\begin{tdocfix}[version = 1.0.1, date = 2023-12-08]
\item \tdocmacro{tdocenv}: spacing is now correct, even if the \tdocpack{babel} package is not loaded with the French language.
\item \tdocenv[{[nostripe]}]{tdocshowcase} : page breaks around \tdocquote{framing} lines should be rare from now on.
@@ -2163,9 +2235,6 @@
\tdocversion{1.0.0}[2023-11-29]
-
-\small
-
\tdocstartproj{First public version of the project.}
\end{document}
Modified: trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-fr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-fr.tex 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/doc/latex/tutodoc/tutodoc-fr.tex 2024-10-31 20:33:20 UTC (rev 72719)
@@ -37,7 +37,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -49,8 +49,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -62,7 +62,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -132,7 +132,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -144,8 +144,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -157,7 +157,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -227,7 +227,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -239,8 +239,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -252,7 +252,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -322,7 +322,7 @@
\ExplSyntaxOn
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\subsection*{tdoc#1}
\myexrmktext
@@ -334,8 +334,8 @@
\myexrmktext
}
-\ifcsundef{__g_tutodoc_focus_color_seq}{
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+\ifcsundef{g__tutodoc_focus_color_seq}{
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\subsection*{tdoc#1}
\myadmotext
@@ -347,7 +347,7 @@
\myadmotext
}
} {
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\subsection*{tdoc#1}
\myadmotext
@@ -406,7 +406,7 @@
\begin{filecontents*}[overwrite]{examples-version-n-change-user-choice-icon.tex}
-\begin{tdoctopic}{À cacher}[\faEyeSlash]
+\begin{tdoctopic}{À cacher}<\faEyeSlash>
% Une icône venant de fontawesome5.
\item Info 1...
\item Info 2...
@@ -446,6 +446,32 @@
\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-version-n-change-side-effect.tex}
+\tdocversion[red]{1.2.3}[2024-10-29]%
+\paragraph{Avant c'est problématique.}
+Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla...
+
+
+\paragraph{Après c'est mal placé.}%
+\tdocversion[red]{1.2.3}[2024-10-29]
+
+Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble...
+
+
+\paragraph{Pas de solution miracle.\tdocversion[red]{1.2.3}[2024-10-29]}
+
+Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli,
+bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli,
+bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli,
+bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli...
+
+
+\paragraph{Gestion manuelle du problème.\tdocversion{1.2.3}[2024-10-29]<-.745cm>}
+
+Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo...
+\end{filecontents*}
+
+
\begin{filecontents*}[overwrite]{examples-version-n-change-first.tex}
\tdocstartproj{Première version du projet.}
\end{filecontents*}
@@ -459,6 +485,27 @@
\end{filecontents*}
+\begin{filecontents*}[overwrite]{examples-version-n-change-what-n-when.tex}
+\begin{tdoctech}[col = red,
+ date = 2024-10-29]
+ \item Info 1...
+ \item Info 2...
+\end{tdoctech}
+
+\begin{tdocupdate}[col = ForestGreen,
+ version = 1.2.3]
+ \item Info 1...
+ \item Info 2...
+\end{tdocupdate}
+
+\begin{tdoctopic}{À cacher}<\faEyeSlash>%
+ [version = 4.5.6, date = 2025-11-30]
+ \item Info 1...
+ \item Info 2...
+\end{tdoctopic}
+\end{filecontents*}
+
+
\begin{filecontents*}[overwrite]{examples-version-n-change-break.tex}
\begin{tdocbreak}
\item Info 1...
@@ -829,7 +876,7 @@
\title{La classe \texttt{tutodoc} - Documentation de type tutoriel}
\author{Christophe, BAL}
-\date{28 oct. 2024 - Version 1.6.1}
+\date{30 oct. 2024 - Version 1.6.2}
\maketitle
@@ -855,7 +902,7 @@
{\small\itshape
\vspace{-5pt}
\begin{center}
- \textbf{Abstract.}
+ \textbf{Abstract.}
\end{center}
The \thisproj{} class\,%
@@ -881,9 +928,23 @@
\small
\begin{minipage}{.9\textwidth}
\begin{tdocnote}[Derniers changements]
-\begin{tdoctech}
- \item Les règles de nommage de \ctan\ nécessitent l'usage de noms du type \verb+tutodoc-*.css.cls.sty+ pour les fichiers à-la \trademark{CSS}.
-\end{tdoctech}
+\begin{tdocnew}
+ \item Les macros \tdocmacro{tdocdate} et \tdocmacro{tdocversion} ont un nouvel argument final facultatif \tdocinlatex{<voffset>} pour choisir un décalage vertical spécifique.
+
+ \item De meilleurs environnements pour indiquer les modifications apportées.
+ \begin{enumerate}
+ \item Les nouvelles clés facultatives \tdocinlatex{col}\,, \tdocinlatex{date} et \tdocinlatex{version} permettent d'indiquer la date et la version d'une modification apportée à un sujet spécifique.
+
+ \item Utilisation de \tdocmacro{paragraph} pour le titre.
+ \end{enumerate}
+\end{tdocnew}
+
+
+\begin{tdocupdate}
+ \item Changements : la police des notes de marge aura toujours une forme normale.
+
+ \item Ornement : utilisation d'un \tdocinlatex{\cleaders} pour éviter les lignes orphelines en bas de page.
+\end{tdocupdate}
\end{tdocnote}
\end{minipage}
\end{center}
@@ -1098,23 +1159,23 @@
% The gallery starts here...
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-bw}
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-color}
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-dark}
\includepdf[
- pages=1-2,
- fitpaper=true
+ pages=1-2,
+ fitpaper=true
]{gallery-showcase-draft}
}
@@ -1176,7 +1237,7 @@
\label{tutodoc-admonitions}
\begin{tdocnote}
- La mise en forme proposée ici est celle par défaut, mais d'autres sont possible en changeant de thème : voir la galerie de cas d'utilisation dans l'annexe page \pageref{tutodoc-theme-gallery}.
+ La mise en forme proposée ici est celle par défaut, mais d'autres sont possible en changeant de thème : voir la galerie de cas d'utilisation dans l'annexe page \pageref{tutodoc-theme-gallery}.
Quant aux icônes, elles sont obtenues via le package \tdocpack{fontawesome5}, et la macro \tdocmacro{tdocicon} gère l'espacement vis-à-vis du texte.
\footnote{
Par exemple,
@@ -1202,7 +1263,7 @@
\begin{tdoctip}
Quelque fois, un contenu mis en avant peut se réduire à une liste. Dans ce cas, la mise en forme peut être améliorée comme suit où nous utilisons l'option \tdocinlatex{wide} du package \tdocpack{enumitem}.
- \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex}
+ \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex}
\end{tdoctip}
@@ -1634,6 +1695,7 @@
\subsection{À quel moment ?}
+\label{tutodoc-changes-when}
On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas le numéro de version pourra éventuellement être daté.
@@ -1663,7 +1725,7 @@
\end{tdocimp}
-\begin{tdocwarn}
+\begin{tdoccaut}
Seul l'emploi du format numérique \tdocinlatex+YYYY-MM-DD+ est vérifié,
\footnote{
Techniquement, vérifier la validité d'une date, via \LaTeX3, ne présente pas de difficulté.
@@ -1672,6 +1734,16 @@
% \footnote{
% L'auteur de \thispack{} est entrain de mettre en place un ensemble d'outils permettant une telle semi-automatisation.
% }.
+\end{tdoccaut}
+
+
+\begin{tdocwarn}
+ En coulisse, le gros du travail est fait par la macro \tdocmacro{\marginnote} du package éponyme.
+ Les macros \tdocmacro{tdocdate} et \tdocmacro{tdocversion} souffrent donc des même effets de bord comme dans l'exemple suivant.
+ On peut tout de même régler ces problèmes via un argument optionnel \tdocinlatex{<déplacement-vertical>} comme à la fin de l'exemple ci-après. C'est moche, mais fonctionnel.
+
+ \tdoclatexshow[nostripe, colstripe=red]{examples-version-n-change-side-effect.tex}
+
\end{tdocwarn}
@@ -1690,24 +1762,24 @@
\foreach \exatitle/\filename in {
{Juste pour la toute première version}/%<-- Translate me!
- first,
+ first,
{Pour les nouveautés}/% <-- Translate me!
- new,
+ new,
{Pour les mises à jour}/% <-- Translate me!
- update,
+ update,
{Pour les bifurcations}/% <-- Translate me!
- break,
+ break,
{Pour les problèmes}/% <-- Translate me!
- pb,
+ pb,
{Pour les réparations}/% <-- Translate me!
- fix,
+ fix,
{Informations techniques}/% <-- Translate me!
- tech,
+ tech,
%
{Thématiques aux choix avec une icône}/%<-- Translate me!
- user-choice-icon,
+ user-choice-icon,
{Thématiques aux choix sans icône}/% <-- Translate me!
- user-choice%
+ user-choice%
} {
\begin{tdocexa}[\exatitle]
\leavevmode
@@ -1718,8 +1790,20 @@
}
-\section{Décorations}
+\subsection{Le quoi et le quand}
+Les clés optionnelles \tdocinlatex{col}\,, \tdocinlatex{date} et \tdocinlatex{version} permettent de dater et versionner un changement d'un type particulier.%
+\footnote{
+ L'avertissement à la fin de la section \ref{tutodoc-changes-when} donne la technique utilisée en coulisse, tout en montrant la nécessité de proposer des clés spécialisées.
+}
+Voici des exemples d'utilisation.
+
+\tdoclatexshow{examples-version-n-change-what-n-when.tex}
+
+
+
+\section{Décoration}
+
Finissons cette documentation avec un petit outil de mise en forme qui rend de grands services.
@@ -1764,7 +1848,7 @@
\end{tdoccaut}
\begin{figure}[ht]
- \centering
+ \centering
\contribtranslatedirtree\
\caption{Vue simplifiée du dossier des traductions}
\label{tutodoc-contrib-translate-dir}
@@ -1887,9 +1971,31 @@
\small
-\tdocversion{1.6.1}[2024-10-28]
+\begin{tdocnew}[version = 1.6.2, date = 2024-10-30]
+ \item Les macros \tdocmacro{tdocdate} et \tdocmacro{tdocversion} ont un nouvel argument final facultatif \tdocinlatex{<voffset>} pour choisir un décalage vertical spécifique.
-\begin{tdoctech}
+ \item De meilleurs environnements pour indiquer les modifications apportées.
+ \begin{enumerate}
+ \item Les nouvelles clés facultatives \tdocinlatex{col}\,, \tdocinlatex{date} et \tdocinlatex{version} permettent d'indiquer la date et la version d'une modification apportée à un sujet spécifique.
+
+ \item Utilisation de \tdocmacro{paragraph} pour le titre.
+ \end{enumerate}
+\end{tdocnew}
+
+
+\begin{tdocupdate}
+ \item Changements : la police des notes de marge aura toujours une forme normale.
+
+ \item Ornement : utilisation d'un \tdocinlatex{\cleaders} pour éviter les lignes orphelines en bas de page.
+\end{tdocupdate}
+
+\tdocsep
+
+
+% ------------------ %
+
+
+\begin{tdoctech}[version = 1.6.1, date = 2024-10-28]
\item Les règles de nommage de \ctan\ nécessitent l'usage de noms du type \verb+tutodoc-*.css.cls.sty+ pour les fichiers à-la \trademark{CSS}.
\end{tdoctech}
@@ -1899,9 +2005,7 @@
% ------------------ %
-\tdocversion{1.6.0}[2024-10-27]
-
-\begin{tdocbreak}
+\begin{tdocbreak}[version = 1.6.0, date = 2024-10-27]
\item L'environnement \tdocenv*{showcase} et ses descendants : la clé \tdocinlatex{color} a été renommée \tdocinlatex{colstripe}.
\item La macro \tdocmacro{tdoclinkcolor} devient la couleur \tdocinlatex{tutodoc at link@color} destinée à un usage interne.
@@ -1911,7 +2015,7 @@
\begin{tdocnew}
\item L'option de classe \tdocinlatex{theme} permet de choisir différents thèmes de mise en forme.
- \item Journal des modifications : ajout de l'environnement \tdocenv*{tdoctech} pour les informations techniques.
+ \item Journal des modifications : ajout de l'environnement \tdocenv*{tdoctech} pour les informations techniques.
\item L'environnement \tdocenv*{showcase} et ses descendants : la clé \tdocinlatex{coltext} permet de changer aussi la couleur du texte.
@@ -1937,9 +2041,7 @@
% ------------------ %
-\tdocversion{1.5.0}[2024-10-19]
-
-\begin{tdoctech}
+\begin{tdoctech}[version = 1.5.0, date = 2024-10-19]
\item La version 3 de \tdocpack{minted} est prise en compte.
\end{tdoctech}
@@ -1969,9 +2071,7 @@
% ------------------ %
-\tdocversion{1.4.0}[2024-09-28]
-
-\begin{tdocbreak}
+\begin{tdocbreak}[version = 1.4.0, date = 2024-09-28]
\item L'environnement \tdocenv*{tdoccaution} a été renommé \tdocenv*{tdoccaut} pour une saisie simplifiée.
\item Mise en avant de contenus : les exemples et remarques, indiqués via les environnements \tdocenv*{tdocexa} et \tdocenv*{tdocrem}, sont toujours numérotés via un compteur commun.
@@ -2006,9 +2106,7 @@
% ------------------ %
-\tdocversion{1.3.1}[2024-09-26]
-
-\begin{tdocnew}
+\begin{tdocnew}[version = 1.3.1, date = 2024-09-26]
\item Version étoilée de \tdocmacro{tdocenv} pour n'avoir que le nom de l'environnement.
\end{tdocnew}
@@ -2018,9 +2116,7 @@
% ------------------ %
-\tdocversion{1.3.0}[2024-09-25]
-
-\begin{tdoctech}
+\begin{tdoctech}[version = 1.3.0, date = 2024-09-25]
\item La version 3 de \tdocpack{minted} ne peut pas être prise en compte pour le moment car elle comporte des bugs : voir \url{https://github.com/gpoore/minted/issues/401}. On force donc temporairement l'usage de la version 2 de \tdocpack{minted}.
\end{tdoctech}
@@ -2055,9 +2151,7 @@
% ------------------ %
-\tdocversion{1.2.0-a}[2024-08-23]
-
-\begin{tdocupdate}
+\begin{tdocupdate}[version = 1.2.0-a, date = 2024-08-23]
\item \tdocmacro{tdocversion}
\begin{enumerate}
\item Le numéro de version est au-dessus de la date.
@@ -2077,9 +2171,7 @@
% ------------------ %
-\tdocversion{1.1.0}[2024-01-06]
-
-\begin{tdocnew}
+\begin{tdocnew}[version = 1.1.0, date = 2024-01-06]
\item Journal des changements : deux nouveaux environnements.
\begin{enumerate}
\item \tdocenv{tdocbreak} pour les \tdocquote{bifurcations}\,, soit les modifications non rétrocompatibles.
@@ -2096,9 +2188,7 @@
% ------------------ %
-\tdocversion{1.0.1}[2023-12-08]
-
-\begin{tdocfix}
+\begin{tdocfix}[version = 1.0.1, date = 2023-12-08]
\item \tdocmacro{tdocenv}: l'espacement est maintenant correct, même si le paquet \tdocpack{babel} n'est pas chargé avec la langue française.
\item \tdocenv[{[nostripe]}]{tdocshowcase}: les sauts de page autour des lignes \tdocquote{cadrantes} devraient être rares dorénavant.
@@ -2111,7 +2201,6 @@
\tdocversion{1.0.0}[2023-11-29]
-
\tdocstartproj{Première version publique du projet.}
\end{document}
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-admonitions.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-admonitions.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-admonitions.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -24,10 +24,10 @@
%%%
% We use two ''prop'' variables to factorize the code just after.
%%%
-\prop_new:N \__g_tutodoc_focus_color_prop
-\prop_new:N \__g_tutodoc_focus_icon_prop
+\prop_new:N \g__tutodoc_focus_color_prop
+\prop_new:N \g__tutodoc_focus_icon_prop
-\prop_set_from_keyval:Nn \__g_tutodoc_focus_color_prop {
+\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop {
note = DarkGray,
tip = DarkGray,
imp = DarkGray,
@@ -35,7 +35,7 @@
warn = DarkGray,
}
-\prop_set_from_keyval:Nn \__g_tutodoc_focus_icon_prop {
+\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop {
note = \faInfoCircle,
tip = \faLightbulb,
imp = \faHighlighter,
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-listing.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-listing.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-listing.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -10,21 +10,21 @@
\colorlet{tutodoc at latex@frame at color}{darkgray}
-\newcommand{\tutodoc at latex@left}{1mm}
-\newcommand{\tutodoc at latex@right}{1mm}
-\newcommand{\tutodoc at latex@top}{1mm}
-\newcommand{\tutodoc at latex@bottom}{1mm}
+\newcommand{\tutodoc at latex@left at len}{1mm}
+\newcommand{\tutodoc at latex@right at len}{1mm}
+\newcommand{\tutodoc at latex@top at len}{1mm}
+\newcommand{\tutodoc at latex@bottom at len}{1mm}
-\newcommand{\tutodoc at latex@arc}{.75mm}
+\newcommand{\tutodoc at latex@arc at len}{.75mm}
-\newcommand{\tutodoc at latex@left at rule}{1pt}
-\newcommand{\tutodoc at latex@right at rule}{1pt}
-\newcommand{\tutodoc at latex@top at rule}{1pt}
-\newcommand{\tutodoc at latex@bottom at rule}{1pt}
+\newcommand{\tutodoc at latex@left at rule@len}{1pt}
+\newcommand{\tutodoc at latex@right at rule@len}{1pt}
+\newcommand{\tutodoc at latex@top at rule@len}{1pt}
+\newcommand{\tutodoc at latex@bottom at rule@len}{1pt}
\colorlet{tutodoc at latex@shadow at color}{black!30}
-\newcommand{\tutodoc at latex@shadow at xshift}{.75mm}
-\newcommand{\tutodoc at latex@shadow at yshift}{-.75mm}
-\newcommand{\tutodoc at latex@shadow at offset}{0mm}
+\newcommand{\tutodoc at latex@shadow at xshift@len}{.75mm}
+\newcommand{\tutodoc at latex@shadow at yshift@len}{-.75mm}
+\newcommand{\tutodoc at latex@shadow at offset@len}{0mm}
\colorlet{tutodoc at latex@segment at color}{gray}
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-version-n-change.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-version-n-change.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-bw-version-n-change.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -1,9 +1,5 @@
% -- VERSION & CHANGES -- %
-\NewExpandableDocumentCommand{\tutodoc at changes@version at color}{}{%
+\NewExpandableDocumentCommand{\tutodoc at changes@when at color}{}{%
gray%
}
-
-\NewExpandableDocumentCommand{\tutodoc at changes@date at color}{}{%
- gray%
-}
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-admonitions.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-admonitions.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-admonitions.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -28,10 +28,10 @@
%%%
% We use two ''prop'' variables to factorize the code just after.
%%%
-\prop_new:N \__g_tutodoc_focus_color_prop
-\prop_new:N \__g_tutodoc_focus_icon_prop
+\prop_new:N \g__tutodoc_focus_color_prop
+\prop_new:N \g__tutodoc_focus_icon_prop
-\prop_set_from_keyval:Nn \__g_tutodoc_focus_color_prop {
+\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop {
note = cyan,
tip = ForestGreen,
imp = orange,
@@ -39,7 +39,7 @@
warn = red,
}
-\prop_set_from_keyval:Nn \__g_tutodoc_focus_icon_prop {
+\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop {
note = \faInfoCircle,
tip = \faLightbulb,
imp = \faHighlighter,
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-listing.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-listing.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-listing.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -10,21 +10,21 @@
\colorlet{tutodoc at latex@frame at color}{darkgray}
-\newcommand{\tutodoc at latex@left}{1mm}
-\newcommand{\tutodoc at latex@right}{1mm}
-\newcommand{\tutodoc at latex@top}{1mm}
-\newcommand{\tutodoc at latex@bottom}{1mm}
+\newcommand{\tutodoc at latex@left at len}{1mm}
+\newcommand{\tutodoc at latex@right at len}{1mm}
+\newcommand{\tutodoc at latex@top at len}{1mm}
+\newcommand{\tutodoc at latex@bottom at len}{1mm}
-\newcommand{\tutodoc at latex@arc}{.75mm}
+\newcommand{\tutodoc at latex@arc at len}{.75mm}
-\newcommand{\tutodoc at latex@left at rule}{1pt}
-\newcommand{\tutodoc at latex@right at rule}{1pt}
-\newcommand{\tutodoc at latex@top at rule}{1pt}
-\newcommand{\tutodoc at latex@bottom at rule}{1pt}
+\newcommand{\tutodoc at latex@left at rule@len}{1pt}
+\newcommand{\tutodoc at latex@right at rule@len}{1pt}
+\newcommand{\tutodoc at latex@top at rule@len}{1pt}
+\newcommand{\tutodoc at latex@bottom at rule@len}{1pt}
\colorlet{tutodoc at latex@shadow at color}{black!30}
-\newcommand{\tutodoc at latex@shadow at xshift}{.75mm}
-\newcommand{\tutodoc at latex@shadow at yshift}{-.75mm}
-\newcommand{\tutodoc at latex@shadow at offset}{0mm}
+\newcommand{\tutodoc at latex@shadow at xshift@len}{.75mm}
+\newcommand{\tutodoc at latex@shadow at yshift@len}{-.75mm}
+\newcommand{\tutodoc at latex@shadow at offset@len}{0mm}
\colorlet{tutodoc at latex@segment at color}{gray}
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-version-n-change.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-version-n-change.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-color-version-n-change.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -1,9 +1,5 @@
% -- VERSION & CHANGES -- %
-\NewExpandableDocumentCommand{\tutodoc at changes@version at color}{}{%
+\NewExpandableDocumentCommand{\tutodoc at changes@when at color}{}{%
\tdoclightcolor[60]{DarkBlue}%
-}
-
-\NewExpandableDocumentCommand{\tutodoc at changes@date at color}{}{%
- \tdoclightcolor[60]{DarkBlue}%
}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-admonitions.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-admonitions.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-admonitions.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -28,10 +28,10 @@
%%%
% We use two ''prop'' variables to factorize the code just after.
%%%
-\prop_new:N \__g_tutodoc_focus_color_prop
-\prop_new:N \__g_tutodoc_focus_icon_prop
+\prop_new:N \g__tutodoc_focus_color_prop
+\prop_new:N \g__tutodoc_focus_icon_prop
-\prop_set_from_keyval:Nn \__g_tutodoc_focus_color_prop {
+\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop {
note = cyan,
tip = ForestGreen,
imp = orange,
@@ -39,7 +39,7 @@
warn = red,
}
-\prop_set_from_keyval:Nn \__g_tutodoc_focus_icon_prop {
+\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop {
note = \faInfoCircle,
tip = \faLightbulb,
imp = \faHighlighter,
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-listing.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-listing.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-listing.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -10,21 +10,21 @@
\colorlet{tutodoc at latex@frame at color}{darkgray}
-\newcommand{\tutodoc at latex@left}{1mm}
-\newcommand{\tutodoc at latex@right}{1mm}
-\newcommand{\tutodoc at latex@top}{1mm}
-\newcommand{\tutodoc at latex@bottom}{1mm}
+\newcommand{\tutodoc at latex@left at len}{1mm}
+\newcommand{\tutodoc at latex@right at len}{1mm}
+\newcommand{\tutodoc at latex@top at len}{1mm}
+\newcommand{\tutodoc at latex@bottom at len}{1mm}
-\newcommand{\tutodoc at latex@arc}{.75mm}
+\newcommand{\tutodoc at latex@arc at len}{.75mm}
-\newcommand{\tutodoc at latex@left at rule}{1pt}
-\newcommand{\tutodoc at latex@right at rule}{1pt}
-\newcommand{\tutodoc at latex@top at rule}{1pt}
-\newcommand{\tutodoc at latex@bottom at rule}{1pt}
+\newcommand{\tutodoc at latex@left at rule@len}{1pt}
+\newcommand{\tutodoc at latex@right at rule@len}{1pt}
+\newcommand{\tutodoc at latex@top at rule@len}{1pt}
+\newcommand{\tutodoc at latex@bottom at rule@len}{1pt}
\colorlet{tutodoc at latex@shadow at color}{black!30}
-\newcommand{\tutodoc at latex@shadow at xshift}{.75mm}
-\newcommand{\tutodoc at latex@shadow at yshift}{-.75mm}
-\newcommand{\tutodoc at latex@shadow at offset}{0mm}
+\newcommand{\tutodoc at latex@shadow at xshift@len}{.75mm}
+\newcommand{\tutodoc at latex@shadow at yshift@len}{-.75mm}
+\newcommand{\tutodoc at latex@shadow at offset@len}{0mm}
\colorlet{tutodoc at latex@segment at color}{gray}
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-version-n-change.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-version-n-change.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-dark-version-n-change.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -1,9 +1,5 @@
% -- VERSION & CHANGES -- %
-\NewExpandableDocumentCommand{\tutodoc at changes@version at color}{}{%
+\NewExpandableDocumentCommand{\tutodoc at changes@when at color}{}{%
\tdoclightcolor[60]{cyan}%
-}
-
-\NewExpandableDocumentCommand{\tutodoc at changes@date at color}{}{%
- \tdoclightcolor[60]{cyan}%
-}
+}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-admonitions.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-admonitions.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-admonitions.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -5,9 +5,9 @@
%%%
% We use a ''seq'' variable to factorize the code just after.
%%%
-\seq_new:N \__g_tutodoc_focus_color_seq
+\seq_new:N \g__tutodoc_focus_color_seq
-\seq_set_from_clist:Nn \__g_tutodoc_focus_color_seq {
+\seq_set_from_clist:Nn \g__tutodoc_focus_color_seq {
note,
tip,
imp,
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-listing.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-listing.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-listing.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -11,21 +11,21 @@
\colorlet{tutodoc at latex@frame at color}{darkgray}
-\newcommand{\tutodoc at latex@left}{1mm}
-\newcommand{\tutodoc at latex@right}{1mm}
-\newcommand{\tutodoc at latex@top}{1mm}
-\newcommand{\tutodoc at latex@bottom}{1mm}
+\newcommand{\tutodoc at latex@left at len}{1mm}
+\newcommand{\tutodoc at latex@right at len}{1mm}
+\newcommand{\tutodoc at latex@top at len}{1mm}
+\newcommand{\tutodoc at latex@bottom at len}{1mm}
-\newcommand{\tutodoc at latex@arc}{0pt}
+\newcommand{\tutodoc at latex@arc at len}{0pt}
-\newcommand{\tutodoc at latex@left at rule}{1pt}
-\newcommand{\tutodoc at latex@right at rule}{0pt}
-\newcommand{\tutodoc at latex@top at rule}{0pt}
-\newcommand{\tutodoc at latex@bottom at rule}{0pt}
+\newcommand{\tutodoc at latex@left at rule@len}{1pt}
+\newcommand{\tutodoc at latex@right at rule@len}{0pt}
+\newcommand{\tutodoc at latex@top at rule@len}{0pt}
+\newcommand{\tutodoc at latex@bottom at rule@len}{0pt}
\colorlet{tutodoc at latex@shadow at color}{black}
-\newcommand{\tutodoc at latex@shadow at xshift}{0mm}
-\newcommand{\tutodoc at latex@shadow at yshift}{0mm}
-\newcommand{\tutodoc at latex@shadow at offset}{0mm}
+\newcommand{\tutodoc at latex@shadow at xshift@len}{0mm}
+\newcommand{\tutodoc at latex@shadow at yshift@len}{0mm}
+\newcommand{\tutodoc at latex@shadow at offset@len}{0mm}
\colorlet{tutodoc at latex@segment at color}{black}
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-version-n-change.css.cls.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-version-n-change.css.cls.sty 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc-draft-version-n-change.css.cls.sty 2024-10-31 20:33:20 UTC (rev 72719)
@@ -1,9 +1,5 @@
% -- VERSION & CHANGES -- %
-\NewExpandableDocumentCommand{\tutodoc at changes@version at color}{}{%
+\NewExpandableDocumentCommand{\tutodoc at changes@when at color}{}{%
black%
-}
-
-\NewExpandableDocumentCommand{\tutodoc at changes@date at color}{}{%
- black%
-}
+}
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc.cls 2024-10-31 00:41:55 UTC (rev 72718)
+++ trunk/Master/texmf-dist/tex/latex/tutodoc/tutodoc.cls 2024-10-31 20:33:20 UTC (rev 72719)
@@ -9,8 +9,8 @@
\ProvidesExplClass
{tutodoc}
- {2024-10-28} % Creation: 2023-11-29
- {1.6.1}
+ {2024-10-30} % Creation: 2023-11-29
+ {1.6.2}
{This package proposes tools for writing "human friendly" documentations of LaTeX packages.}
@@ -24,7 +24,7 @@
\ExplSyntaxOn
-\tl_new:N \l__tutodoc_remaining_cls_options_tl
+\tl_new:N \l__tutodoc_other_cls_options_tl
\newcommand{ \tutodoc at theme } { color }
@@ -40,13 +40,13 @@
}
},
unknown .code:n = {
- \tl_set:Nn \l__tutodoc_remaining_cls_options_tl { #1 }
+ \tl_set:Nn \l__tutodoc_other_cls_options_tl { #1 }
}
}
\ProcessKeyOptions[tutodoc / main / class / options]
-\LoadClass[ \tl_use:N \l__tutodoc_remaining_cls_options_tl ]%
+\exp_last_unbraced:NNV \LoadClass[ \l__tutodoc_other_cls_options_tl ]%
{ article }%
[ 2022-06-01 ]
@@ -128,7 +128,7 @@
[2022-05-02]
\RequirePackage{marginnote}%
- [2023-09-07]
+ [2018/08/09]
% =============== %
@@ -213,12 +213,12 @@
\makeatletter
\InputIfFileExists{tutodoc-main-locale-\tdoclang.cfg.cls.sty}{}{
- \input{tutodoc-main-locale-en.cfg.cls.sty}
+ \input{tutodoc-main-locale-en.cfg.cls.sty}
- \msg_critical:nnx { tutodoc ~ (main) }
+ \msg_critical:nnx { tutodoc ~ (main) }
{ main : unsupported-lang }
{ \tdoclang }
- }
+ }
\makeatother
}
@@ -314,7 +314,7 @@
%%%
% prototype::
-% #1 : (text-en)
+% #1 : (EN-text)
% an english text that will be explained in another \lang.
%
% :extra: this macro has a star version.
@@ -354,8 +354,8 @@
%%%
% We use a ''seq'' variable to factorize the code just after.
%%%
-\seq_new:N \__g_tutodoc_focus_std_seq
-\seq_set_from_clist:Nn \__g_tutodoc_focus_std_seq {
+\seq_new:N \g__tutodoc_focus_std_seq
+\seq_set_from_clist:Nn \g__tutodoc_focus_std_seq {
exa,
rem
}
@@ -363,12 +363,12 @@
%%%
% prototype::
-% :action: looping over ''\__g_tutodoc_focus_std_seq'' to build new
+% :action: looping over ''\g__tutodoc_focus_std_seq'' to build new
% numbered theorems sharing the same section level counter.
% To achieve that, we use the ''\newkeytheorem'' macro from
% the ''keytheorems'' \pack.
%%%
-\seq_map_inline:Nn \__g_tutodoc_focus_std_seq {
+\seq_map_inline:Nn \g__tutodoc_focus_std_seq {
\str_if_eq:nnTF { #1 } { exa } {
\newkeytheorem{tdoc#1}[
name = \use:c { tutodoc at trans@#1 at title },
@@ -398,22 +398,21 @@
% note::
% We provide two ways to define admonitions.
%
-% 1) ''\__g_tutodoc_focus_color_prop'' and ''__g_tutodoc_focus_icon_prop''
+% 1) ''\g__tutodoc_focus_color_prop'' and ''g__tutodoc_focus_icon_prop''
% are for iconised and colored frames.
%
-% 1) ''\__g_tutodoc_focus_color_seq'' is to use a dedicated basic theorem
+% 1) ''\g__tutodoc_focus_color_seq'' is to use a dedicated basic theorem
% (this should be only useful for the draft theme).
%
% warning::
% The variables should be defined inside the themes!
%%%
-\ifcsundef{__g_tutodoc_focus_color_seq}{
+\ifcsundef{g__tutodoc_focus_color_seq}{
%%%
-% note::
-% The settings used come from the following sources.
-% * https://tex.stackexchange.com/a/727022/6880
-% * https://tex.stackexchange.com/a/682332/6880
-% * https://tex.stackexchange.com/a/623232/6880
+% source::
+% + https://tex.stackexchange.com/a/727022/6880
+% + https://tex.stackexchange.com/a/682332/6880
+% + https://tex.stackexchange.com/a/623232/6880
%%%
\tcbset{
tutodoc-focus-color-style/.style = {
@@ -439,35 +438,35 @@
\ExplSyntaxOn
-\ifcsundef{__g_tutodoc_focus_color_seq}{
+\ifcsundef{g__tutodoc_focus_color_seq}{
%%%
% prototype::
-% :action: ''key/value'' iteration over ''\__g_tutodoc_focus_color_prop''
+% :action: ''key/value'' iteration over ''\g__tutodoc_focus_color_prop''
% to build new colorful unumbered theorems. To achieve that,
% we use a ''tcolorbox'' style given to the ''\newkeytheorem''
% macro from the ''keytheorems'' \pack, and icons from the
% ''fontawesome5'' \pack.
%%%
- \prop_map_inline:Nn \__g_tutodoc_focus_color_prop {
+ \prop_map_inline:Nn \g__tutodoc_focus_color_prop {
\newkeytheorem{tdoc#1}[
numbered = false,
% tcolorbox-no-titlebar can be used.
tcolorbox = {tutodoc-focus-color-style=#2},
name = {
- \tdocicon{ \prop_item:Nn \__g_tutodoc_focus_icon_prop { #1 } }
+ \tdocicon{ \prop_item:Nn \g__tutodoc_focus_icon_prop { #1 } }
\use:c { tutodoc at trans@#1 at title }
- },
+ }
]
}
} {
%%%
% prototype::
-% :action: looping over ''\__g_tutodoc_focus_color_seq'' to build new
+% :action: looping over ''\g__tutodoc_focus_color_seq'' to build new
% numbered theorems sharing the same section level counter.
% To achieve that, we use the ''\newkeytheorem'' macro from
% the ''keytheorems'' \pack.
%%%
- \seq_map_inline:Nn \__g_tutodoc_focus_color_seq {
+ \seq_map_inline:Nn \g__tutodoc_focus_color_seq {
\newkeytheorem{tdoc#1}[
name = \use:c { tutodoc at trans@#1 at title },
numberlike = tdocexa,
@@ -551,7 +550,7 @@
% Cleaner code from https://tex.stackexchange.com/a/703379/6880 .
\NewDocumentCommand{\tdocenv}{s O{} m}{%
\IfBooleanTF{#1}{%
- \texttt{#3}%
+ \texttt{#3}%
}{%
\texttt{\string\begin\string{#3\string}#2 %
\!\!...\@\!\!\! %
@@ -580,6 +579,11 @@
% :: PREFIX FROM... :: %
% :::::::::::::::::::: %
+\seq_new:N \l__tutodoc_prewhy_parts_seq
+\int_new:N \l__tutodoc_prewhy_nbparts_int
+\tl_new:N \l__tutodoc_pretext_tl
+\tl_new:N \l__tutodoc_posttext_tl
+
%%%
% prototype::
% #1 : (pre.fix)
@@ -589,12 +593,12 @@
%%%
\NewDocumentCommand{\tdocprewhy}{m}{%
% Do we have 2 parts?
- \seq_set_split:Nnn \l_tmpa_seq { . } { #1 }
+ \seq_set_split:Nnn \l__tutodoc_prewhy_parts_seq { . } { #1 }
- \int_set:Nn \l_tmpa_int
- {\int_eval:n {\seq_count:N \l_tmpa_seq}}
+ \int_set:Nn \l__tutodoc_prewhy_nbparts_int
+ {\int_eval:n {\seq_count:N \l__tutodoc_prewhy_parts_seq}}
- \if_int_compare:w \l_tmpa_int = 2
+ \if_int_compare:w \l__tutodoc_prewhy_nbparts_int = 2
\else:
\msg_error:nn { tutodoc ~ (macroenv) }
{ macroenv : prefix-why-bad-format }
@@ -601,10 +605,16 @@
\fi:
% Let's go.
- \seq_pop:NN \l_tmpa_seq \l_tmpa_tl
- \seq_pop:NN \l_tmpa_seq \l_tmpb_tl
+ \seq_pop:NN \l__tutodoc_prewhy_parts_seq \l__tutodoc_pretext_tl
+ \seq_pop:NN \l__tutodoc_prewhy_parts_seq \l__tutodoc_posttext_tl
- \textbf{\tdocpre{\tl_use:N \l_tmpa_tl}\kern.5pt\textperiodcentered\kern.5pt{\tl_use:N \l_tmpb_tl}}
+ \textbf{
+ \tdocpre{\tl_use:N \l__tutodoc_pretext_tl}
+ \kern.5pt
+ \textperiodcentered
+ \kern.5pt
+ {\tl_use:N \l__tutodoc_posttext_tl}
+ }
}
\ExplSyntaxOff
@@ -643,6 +653,10 @@
\ExplSyntaxOn
+\box_new:N \l__tutodoc_content_box
+\dim_new:N \l__tutodoc_content_dim
+
+
%%%
% prototype::
% #1 : (color)
@@ -659,7 +673,7 @@
% https://tex.stackexchange.com/a/604708/6880''.
%%%
-\NewDocumentCommand{\tdocruler}{O{\tutodoc at showcase@rule at color} m}{
+\NewDocumentCommand{\tdocruler}{ O{\tutodoc at showcase@rule at color} m }{
\par
{
\centering
@@ -668,15 +682,15 @@
\bfseries
\color{#1}
- \hbox_set:Nn \l_tmpa_box { \,\, #2 \,\, }
- \dim_set:Nn \l_tmpa_dim {
- .35 \linewidth - .5 \box_wd:N \l_tmpa_box
+ \hbox_set:Nn \l__tutodoc_content_box { \,\, #2 \,\, }
+ \dim_set:Nn \l__tutodoc_content_dim {
+ .35 \linewidth - .5 \box_wd:N \l__tutodoc_content_box
}
- \rule[.75pt] { \dim_use:N \l_tmpa_dim }
+ \rule[.75pt] { \dim_use:N \l__tutodoc_content_dim }
{ 2.5pt }
- \box_use:N \l_tmpa_box
- \rule[.75pt] { \dim_use:N \l_tmpa_dim }
+ \box_use:N \l__tutodoc_content_box
+ \rule[.75pt] { \dim_use:N \l__tutodoc_content_dim }
{ 2.5pt }
\par
}
@@ -700,9 +714,9 @@
% This color is used to set the one for the decorated texts printed
% corresponding to the two first arguments.
% #4 : (text color)
-% XXXXX
+% color of the content
% #5 : (rule color builder)
-% YYY
+% the macro used to build the color from the user's rule color
%
% :action: this environment just adds its content processed by \latex
% between centered materials produced by the macro ''\tdocruler''
@@ -766,11 +780,6 @@
% ''tdocshowcase''.
%%%
\keys_define:nn { tutodoc / showcase } {
-% Texts.
- before .tl_set:N = \l_tutodoc_showcase_before_tl,
- before .initial:n = \tutodoc at trans@latex at show@start,
- after .tl_set:N = \l_tutodoc_showcase_after_tl,
- after .initial:n = \tutodoc at trans@latex at show@end,
% Colors.
colstripe .tl_set:N = \l_tutodoc_showcase_stripe_color_tl,
colstripe .initial:n = \tutodoc at showcase@stripe at color,
@@ -779,6 +788,11 @@
% Stripe?
nostripe .bool_set:N = \l_tutodoc_showcase_nostripe_bool,
nostripe .initial:n = false,
+% Texts.
+ before .tl_set:N = \l_tutodoc_showcase_before_tl,
+ before .initial:n = \tutodoc at trans@latex at show@start,
+ after .tl_set:N = \l_tutodoc_showcase_after_tl,
+ after .initial:n = \tutodoc at trans@latex at show@end,
}
@@ -787,7 +801,7 @@
% :::::::::::::::::::::::::::::: %
% prototype::
-% #1 : (key-val)
+% #1 : (key-val options)
% the key-value options (see above).
%
% :action: this \env formats \latex code, given as an argument,
@@ -834,20 +848,23 @@
% :: SHOWCASE FROM FILE :: %
% :::::::::::::::::::::::: %
+\tl_new:N \l__tutodoc_showcase_options_tl
+
+
%%%
% prototype::
-% #1 : (key-val)
+% #1 : (key-val options)
% :see: env.tdocshowcase
-% #2 : (file-path)
+% #2 : (file path)
% the path of a file
%%%
-\NewDocumentCommand{\tdocshowcaseinput}{O{} m}{
+\NewDocumentCommand{\tdocshowcaseinput}{ O{} m }{
\group_begin:
\keys_set_known:nnN { tutodoc / showcase }
{ #1 }
- \l_tmpa_tl
+ \l__tutodoc_showcase_options_tl
- \exp_last_unbraced:NNV \tdocshowcase [\l_tmpa_tl]
+ \exp_last_unbraced:NNV \tdocshowcase [\l__tutodoc_showcase_options_tl]
\input{#2}
\endtdocshowcase
\group_end:
@@ -879,7 +896,7 @@
%%%
\newmintinline[tdocinlatex]{\tutodoc at latex@lexer}{%
bgcolor = tutodoc at latex@back at color,%
- style/.expand once = \tutodoc at latex@style% <-- This needs minted3!
+ style/.expand once = \tutodoc at latex@style % <-- This needs minted3!
}
@@ -907,7 +924,7 @@
%
% See the pgfkeys package documentation for explanation.
%%%
-\NewExpandableDocumentCommand{\tutodoc at latex@listing at formating}{ m }{
+\NewExpandableDocumentCommand{\tutodoc at latex@listing at format@option}{ m }{
\str_case:nnF { #1 } {
{ sbs } { listing ~ side ~ text }
{ code } { listing ~ only }
@@ -935,20 +952,20 @@
colupper = tutodoc at latex@text at color,
collower = tutodoc at latex@text at color,
% Padding.
- left = \tutodoc at latex@left,
- right = \tutodoc at latex@right,
- bottom = \tutodoc at latex@bottom,
- top = \tutodoc at latex@top,
+ left = \tutodoc at latex@left at len,
+ right = \tutodoc at latex@right at len,
+ bottom = \tutodoc at latex@bottom at len,
+ top = \tutodoc at latex@top at len,
% Frame.
- shadow = {\tutodoc at latex@shadow at xshift}%
- {\tutodoc at latex@shadow at yshift}%
- {\tutodoc at latex@shadow at offset}%
+ shadow = {\tutodoc at latex@shadow at xshift@len}%
+ {\tutodoc at latex@shadow at yshift@len}%
+ {\tutodoc at latex@shadow at offset@len}%
{tutodoc at latex@shadow at color},
- arc = \tutodoc at latex@arc,
- leftrule = \tutodoc at latex@left at rule,
- rightrule = \tutodoc at latex@right at rule,
- bottomrule = \tutodoc at latex@bottom at rule,
- toprule = \tutodoc at latex@top at rule,
+ arc = \tutodoc at latex@arc at len,
+ leftrule = \tutodoc at latex@left at rule@len,
+ rightrule = \tutodoc at latex@right at rule@len,
+ bottomrule = \tutodoc at latex@bottom at rule@len,
+ toprule = \tutodoc at latex@top at rule@len,
% Separating line.
segmentation style = {
tutodoc at latex@segment at color,
@@ -973,7 +990,7 @@
% ''tcolorbox'' to have \infos about the environment ''tdoclatex''.
%%%
\newtcblisting{tdoclatex}[1][std]{%
- tutodoc-latex-listing-style = \tutodoc at latex@listing at formating{#1}
+ tutodoc-latex-listing-style = \tutodoc at latex@listing at format@option{#1}
}
@@ -985,7 +1002,7 @@
% prototype::
% #1 : (tdoclatex-style)
% :see: ''\newtcblisting{tdoclatex}''
-% #2 : (file-path)
+% #2 : (file path)
% the path of the file to input and format.
%
% note::
@@ -994,7 +1011,7 @@
%%%
\newtcbinputlisting{\tdoclatexinput}[2][std]{
listing file = {#2},
- tutodoc-latex-listing-style = \tutodoc at latex@listing at formating{#1}
+ tutodoc-latex-listing-style = \tutodoc at latex@listing at format@option{#1}
}
@@ -1027,13 +1044,16 @@
% :: LATEXSHOW MACRO :: %
% ::::::::::::::::::::: %
+\tl_new:N \l__tutodoc_showcase_options_passed_tl
+
+
%%%
% prototype::
-% #1 : (key-val)
+% #1 : (key-val options)
% the key-value options supported by the ''tdocshowcase'' \env,
% plus one allowing you to change the description of a line
% printed between the code and its highlighted output.
-% #2 : (file-path)
+% #2 : (file path)
% the path of a file
%
% :see: env.tdocshowcase ,
@@ -1043,7 +1063,7 @@
\group_begin:
\keys_set_known:nnN { tutodoc / listing / latexshow }
{ #1 }
- \l_tmpa_tl
+ \l__tutodoc_showcase_options_passed_tl
\tdoclatexinput[code]{#2}
@@ -1050,7 +1070,7 @@
\tl_use:N \l_tutodoc_listing_explain_tl
% Source: https://tex.stackexchange.com/a/696700/6880
- \exp_last_unbraced:NNV \tdocshowcaseinput [\l_tmpa_tl] {#2}
+ \exp_last_unbraced:NNV \tdocshowcaseinput [\l__tutodoc_showcase_options_passed_tl] {#2}
\group_end:
}
@@ -1087,6 +1107,8 @@
% the second material (a date or nothing)
% #4 : (spacing)
% the last negative vertical spacing for the 2nd rule
+% #5 : (vertical offset)
+% algebraic distance to move vertically the material
%
% :action: this macro factorizes the printing of the changes
% in the left margin.
@@ -1093,10 +1115,11 @@
%
% :see: \__tutodoc_translate_date:n
%%%
-\NewDocumentCommand{\tutodoc at new@change at margin}{m m m m}{
+\NewDocumentCommand{\tutodoc at new@change at margin}{m m m m m}{
\marginnote{
\color{#1}
\scriptsize
+ \normalfont
\centering
\vspace{0pt}
@@ -1115,13 +1138,14 @@
}
\par
- \__tutodoc_translate_date:n { #3 }\vphantom{Mp}
+ \__tutodoc_translate_date:n { #3 }
+ \vphantom{Mp}
\par
}
\vspace{#4}
\rule{1.65cm}{.95pt}
- }[-.345cm]
+ }[#5]
}
@@ -1151,9 +1175,7 @@
% to use the format expected for a "localised" date.
%%%
\cs_new:Npn \__tutodoc_translate_date_process:w #1 - #2 - #3 \q_stop {
- \tutodoc at trans@date{#1}
- {#2}
- {#3}
+ \tutodoc at trans@date{#1}{#2}{#3}
}
\ExplSyntaxOff
@@ -1165,6 +1187,13 @@
\input{tutodoc-\tutodoc at theme-version-n-change.css.cls.sty}
+\newlength{\tutodoc at version@vertical at sep@len}
+\setlength{\tutodoc at version@vertical at sep@len}{-4.25pt}
+
+\newlength{\tutodoc at version@vertical at offset@len}
+\setlength{\tutodoc at version@vertical at offset@len}{-.345cm}
+
+
%%%
% prototype::
% #1 : (color)
@@ -1173,6 +1202,8 @@
% a version number
% #3 : (date)
% a date ''YYYY-MM-DD''
+% #4 : (vertical offset)
+% algebraic distance to move vertically the material
%
% :action: this macro prints a margin note showing a version number
% below a date, and the optional argument is used to colorize
@@ -1183,11 +1214,13 @@
% to parse the date such as to display it following the standard convention
% of the language chosen when loading the package.
%%%
-\NewDocumentCommand{\tdocversion}{O{\tutodoc at changes@version at color} m O{}}{
- \tutodoc at new@change at margin{#1} % Color
- {#2} % Version
- {#3} % Date
- {-4.25pt} % Last negative vertical spacing
+\NewDocumentCommand{\tdocversion}{ O{\tutodoc at changes@when at color} m O{} D<>{\tutodoc at version@vertical at offset@len} }{
+ \tutodoc at new@change at margin%
+ {#1} % Color
+ {#2} % Version
+ {#3} % Date
+ {\tutodoc at version@vertical at sep@len} % Last negative vertical spacing
+ {#4} % Vertical offset
}
@@ -1195,6 +1228,12 @@
% :: DATE :: %
% :::::::::: %
+\newlength{\tutodoc at date@vertical at sep@len}
+\setlength{\tutodoc at date@vertical at sep@len}{-5.35pt}
+
+\newlength{\tutodoc at date@vertical at offset@len}
+\setlength{\tutodoc at date@vertical at offset@len}{-.345cm}
+
%%%
% prototype::
% #1 : (color)
@@ -1201,15 +1240,19 @@
% the color of the margin note
% #2 : (date)
% a date ''YYYY-MM-DD''
+% #3 : (vertical offset)
+% algebraic distance to move vertically the material
%
% :action: this macro is similar to ''\tdocversion'' except that it just
% prints a date.
%%%
-\NewDocumentCommand{\tdocdate}{O{\tutodoc at changes@date at color} m}{
- \tutodoc at new@change at margin{#1} % Color
- {} % Version
- {#2} % Date
- {-5.35pt} % Last negative spacing
+\NewDocumentCommand{\tdocdate}{ O{\tutodoc at changes@when at color} m D<>{\tutodoc at date@vertical at offset@len} }{
+ \tutodoc at new@change at margin%
+ {#1} % Color
+ {} % Version
+ {#2} % Date
+ {\tutodoc at date@vertical at sep@len} % Last negative spacing
+ {#3} % Vertical offset
}
@@ -1229,10 +1272,34 @@
{ One ~ single ~ title ~ must ~ be ~ indicated. }
-% ::::::::::::::::::::: %
-% :: CHANGES - TOPIC :: %
-% ::::::::::::::::::::: %
+% ::::::::::::::::::: %
+% :: GENERIC TOPIC :: %
+% ::::::::::::::::::: %
+\tl_new:N \l_tutodoc_topic_when_color_tl
+\tl_new:N \l_tutodoc_topic_date_tl
+\tl_new:N \l_tutodoc_topic_version_tl
+
+\keys_define:nn { tutodoc / version-n-change / topic / options } {
+% Colors.
+ col .tl_set:N = \l_tutodoc_topic_when_color_tl,
+ col .initial:n = \tutodoc at changes@when at color,
+% Date.
+ date .tl_set:N = \l_tutodoc_topic_date_tl,
+ date .initial:n = \c_empty_tl,
+% Version.
+ version .tl_set:N = \l_tutodoc_topic_version_tl,
+ version .initial:n = \c_empty_tl,
+}
+
+
+\tl_new:N \l__tutodoc_topic_all_user_options_tl
+
+
+\newlength{\tutodoc at topic@vertical at offset@len}
+\setlength{\tutodoc at topic@vertical at offset@len}{-.745cm}
+
+
%%%
% prototype::
% #1 : (title)
@@ -1239,21 +1306,41 @@
% a title that will be followed by a colon.
% #2 : (aws-icon)
% one material that expects to be an icon command from the
-% ''fontawsome5'' \pack.
+% ''fontawsome5'' \pack
+% #3 : (key-val options)
+% see above
%
% :action: this environment prints some \infos about specific changes
% achieved in a new version (no special formatting is applied).
+% Key-val options allow to add a date \andor a \nbver with
+% a specific color if needed.
%%%
-\NewDocumentEnvironment{tdoctopic}{ m O{} }{
+\NewDocumentEnvironment{tdoctopic}{ m D<>{} O{} }{
\IfBlankT{#1}{
\msg_fatal:nn { tutodoc ~ (version-n-change) }
{ version-n-change : topic-missing-title }
- }%
-% \paragraph{%
- \textbf{%
- \IfBlankF{#2}{\tdocicon{#2}}%
+ }
+
+ \keys_set:nn { tutodoc / version-n-change / topic / options } { #3 }
+
+ \tl_clear:N \l__tutodoc_topic_all_user_options_tl
+ \tl_set_eq:NN \l__tutodoc_topic_all_user_options_tl \l_tutodoc_topic_version_tl
+ \tl_put_right:Nn \l__tutodoc_topic_all_user_options_tl { \l_tutodoc_topic_date_tl }
+
+ \paragraph{%
+ \IfBlankF{#2}{\tdocicon{#2}}
\textsc{#1.}
+ \exp_args:Ne \IfBlankF{\l__tutodoc_topic_all_user_options_tl}{
+% A date and/or a version.
+ \exp_args:NNee \tutodoc at new@change at margin%
+ {\l_tutodoc_topic_when_color_tl}
+ {\l_tutodoc_topic_version_tl}
+ {\l_tutodoc_topic_date_tl}
+ {\tutodoc at version@vertical at sep@len}
+ {\tutodoc at topic@vertical at offset@len}
+ }
}
+
\begin{itemize}
}{
\end{itemize}
@@ -1260,15 +1347,15 @@
}
-% :::::::::::::::::::::::::: %
-% :: CHANGES - NEW THINGS :: %
-% :::::::::::::::::::::::::: %
+% :::::::::::::::::::::: %
+% :: CLASSICAL TOPICS :: %
+% :::::::::::::::::::::: %
%%%
% We use a ''prop'' variable to factorize the code just after.
%%%
-\prop_new:N \__g_tutodoc_topic_change_prop
-\prop_set_from_keyval:Nn \__g_tutodoc_topic_change_prop {
+\prop_new:N \g__tutodoc_topic_change_prop
+\prop_set_from_keyval:Nn \g__tutodoc_topic_change_prop {
break = \faCodeBranch,
fix = \faWrench,
new = \faGem,
@@ -1282,13 +1369,13 @@
% prototype::
% :see: env.tdoctopic
%
-% :action: ''key/value'' iteration over ''\__g_tutodoc_topic_change_prop''
+% :action: ''key/value'' iteration over ''\g__tutodoc_topic_change_prop''
% to build topic-like \envs using the \env ''tdoctopic''
% (the title used is translated into the good language).
%%%
-\prop_map_inline:Nn \__g_tutodoc_topic_change_prop {
- \NewDocumentEnvironment{ tdoc#1 } {} {
- \begin{tdoctopic}{ \use:c { tutodoc at trans@chges@#1 } } [ #2 ]
+\prop_map_inline:Nn \g__tutodoc_topic_change_prop {
+ \NewDocumentEnvironment{ tdoc#1 } { O{} } {
+ \begin{tdoctopic}{ \use:c { tutodoc at trans@chges@#1 } } < #2 > [##1]
}{
\end{tdoctopic}
}
@@ -1298,7 +1385,7 @@
%%%
% prototype::
% #1 : (short-desc)
-% a short text expected t indicate the very first version of a project.
+% a short text expected to indicate the very first version of a project.
%
% :action: the short text printed will be preceded by a pretty anchor icon.
%%%
@@ -1314,19 +1401,29 @@
% ----------------- %
% Source
-% * https://tex.stackexchange.com/a/705938/6880
-% (for \addvspace{\medskipamount} instead of \medskip)
+% + https://tex.stackexchange.com/a/130529/6880
+% (for the leaders trick)
+% + https://tex.stackexchange.com/a/269887/6880
+% (for the \hrule width)
+% + https://tex.stackexchange.com/a/729710/6880
+% (centering the \hrule)
+\newlength{\tutodoc at vertical@space at deco@len}
+\setlength{\tutodoc at vertical@space at deco@len}{\dimeval{2\medskipamount+1.25pt}}
+
%%%
% prototype::
% :action: this macro draws a centered horizontal rule with a height
% of qty::''0.75 pt'', and a width equal to half of the current
-% text width, and extra vertical spaces are added above and
+% text width, and extra vertical spaces are added above and
% below the rule.
+%
+% :see: len.tutodoc at vertical@space at deco@len
%%%
\NewDocumentCommand{\tdocsep}{}{
- \par\addvspace{\medskipamount}
- \hfill\rule{0.5\textwidth}{0.75pt}\hfill\null
- \medskip
- \smallskip
+ \par
+ \cleaders
+ \vbox to \tutodoc at vertical@space at deco@len{
+ \vfill\centerline{\vrule width 0.5\hsize height 0.75pt}\vfill
+ }\vskip\tutodoc at vertical@space at deco@len
}
More information about the tex-live-commits
mailing list.