diff options
author | Karl Berry <karl@freefriends.org> | 2024-01-07 21:27:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-01-07 21:27:45 +0000 |
commit | c9080f6a818a36fa6d8785a8b208cc808fa9f1a0 (patch) | |
tree | 41d80a54373e7779748df5c72f36f6561918f07a /Master/texmf-dist/tex/latex/tutodoc | |
parent | 79bf9c1d6f9d18bfce7cd0ec366f9029b8afd345 (diff) |
tutodoc (6jan24)
git-svn-id: svn://tug.org/texlive/trunk@69338 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tutodoc')
5 files changed, 101 insertions, 66 deletions
diff --git a/Master/texmf-dist/tex/latex/tutodoc/tdoc-locale-english.cfg.sty b/Master/texmf-dist/tex/latex/tutodoc/tdoc-locale-english.cfg.sty deleted file mode 100644 index 58d8975905a..00000000000 --- a/Master/texmf-dist/tex/latex/tutodoc/tdoc-locale-english.cfg.sty +++ /dev/null @@ -1,17 +0,0 @@ -\NewDocumentCommand{\tdoc@trans@in@EN}{}{in \ english} -\NewDocumentCommand{\tdoc@trans@latex@show@start}{}{Start \ of \ the \ real \ output} -\NewDocumentCommand{\tdoc@trans@latex@show@end}{}{End \ of \ the \ real \ output} -\NewDocumentCommand{\tdoc@trans@this@gives}{}{This \ gives} -\NewDocumentCommand{\tdoc@trans@exa@title}{}{Example} -\NewDocumentCommand{\tdoc@trans@rmk@title}{}{Remark} -\NewDocumentCommand{\tdoc@trans@important@title}{}{Important} -\NewDocumentCommand{\tdoc@trans@warn@title}{}{Warning} -\NewDocumentCommand{\tdoc@trans@caution@title}{}{Caution} -\NewDocumentCommand{\tdoc@trans@note@title}{}{Note} -\NewDocumentCommand{\tdoc@trans@tip@title}{}{Tip} - -\NewDocumentCommand{\tdoc@trans@chges@new}{}{New} -\NewDocumentCommand{\tdoc@trans@chges@update}{}{Update} -\NewDocumentCommand{\tdoc@trans@chges@fix}{}{Fix} - -\NewDocumentCommand{\tdoc@trans@date}{ mmm }{#1-#2-#3} diff --git a/Master/texmf-dist/tex/latex/tutodoc/tdoc-locale-french.cfg.sty b/Master/texmf-dist/tex/latex/tutodoc/tdoc-locale-french.cfg.sty deleted file mode 100644 index 2973757dd89..00000000000 --- a/Master/texmf-dist/tex/latex/tutodoc/tdoc-locale-french.cfg.sty +++ /dev/null @@ -1,17 +0,0 @@ -\NewDocumentCommand{\tdoc@trans@in@EN}{}{en \ anglais} -\NewDocumentCommand{\tdoc@trans@latex@show@start}{}{Début \ du \ rendu \ réel} -\NewDocumentCommand{\tdoc@trans@latex@show@end}{}{Fin \ du \ rendu \ réel} -\NewDocumentCommand{\tdoc@trans@this@gives}{}{Ceci \ donne} -\NewDocumentCommand{\tdoc@trans@exa@title}{}{Exemple} -\NewDocumentCommand{\tdoc@trans@rmk@title}{}{Remarque} -\NewDocumentCommand{\tdoc@trans@important@title}{}{Important} -\NewDocumentCommand{\tdoc@trans@warn@title}{}{Avertissement} -\NewDocumentCommand{\tdoc@trans@caution@title}{}{Prudence} -\NewDocumentCommand{\tdoc@trans@note@title}{}{Note} -\NewDocumentCommand{\tdoc@trans@tip@title}{}{Astuce} - -\NewDocumentCommand{\tdoc@trans@chges@new}{}{Nouveau} -\NewDocumentCommand{\tdoc@trans@chges@update}{}{Mise \ à \ jour} -\NewDocumentCommand{\tdoc@trans@chges@fix}{}{Réparation} - -\NewDocumentCommand{\tdoc@trans@date}{ mmm }{#3/#2/#1} diff --git a/Master/texmf-dist/tex/latex/tutodoc/tutodoc-locale-main-english.cfg.sty b/Master/texmf-dist/tex/latex/tutodoc/tutodoc-locale-main-english.cfg.sty new file mode 100644 index 00000000000..339f10240c6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tutodoc/tutodoc-locale-main-english.cfg.sty @@ -0,0 +1,17 @@ +\NewDocumentCommand{\tutodoc@trans@date}{mmm}{#1-#2-#3} +\NewDocumentCommand{\tutodoc@trans@in@EN}{m}{#1 ~ in ~ english} +\NewDocumentCommand{\tutodoc@trans@this@gives}{m}{This ~ gives ~ #1} +\NewDocumentCommand{\tutodoc@trans@latex@show@start}{}{Start ~ of ~ the ~ real ~ output} +\NewDocumentCommand{\tutodoc@trans@latex@show@end}{}{End ~ of ~ the ~ real ~ output} +\NewDocumentCommand{\tutodoc@trans@exa@title}{}{Example} +\NewDocumentCommand{\tutodoc@trans@rmk@title}{}{Remark} +\NewDocumentCommand{\tutodoc@trans@note@title}{}{Note} +\NewDocumentCommand{\tutodoc@trans@tip@title}{}{Tip} +\NewDocumentCommand{\tutodoc@trans@important@title}{}{Important} +\NewDocumentCommand{\tutodoc@trans@caution@title}{}{Caution} +\NewDocumentCommand{\tutodoc@trans@warn@title}{}{Warning} +\NewDocumentCommand{\tutodoc@trans@chges@pb}{}{Problem} +\NewDocumentCommand{\tutodoc@trans@chges@break}{}{Break} +\NewDocumentCommand{\tutodoc@trans@chges@fix}{}{Fix} +\NewDocumentCommand{\tutodoc@trans@chges@new}{}{New} +\NewDocumentCommand{\tutodoc@trans@chges@update}{}{Update}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tutodoc/tutodoc-locale-main-french.cfg.sty b/Master/texmf-dist/tex/latex/tutodoc/tutodoc-locale-main-french.cfg.sty new file mode 100644 index 00000000000..c639e1e9e03 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tutodoc/tutodoc-locale-main-french.cfg.sty @@ -0,0 +1,17 @@ +\NewDocumentCommand{\tutodoc@trans@date}{mmm}{#3/#2/#1} +\NewDocumentCommand{\tutodoc@trans@in@EN}{m}{#1 ~ en ~ anglais} +\NewDocumentCommand{\tutodoc@trans@this@gives}{m}{Ceci ~ donne ~ #1} +\NewDocumentCommand{\tutodoc@trans@latex@show@start}{}{Début ~ du ~ rendu ~ réel} +\NewDocumentCommand{\tutodoc@trans@latex@show@end}{}{Fin ~ du ~ rendu ~ réel} +\NewDocumentCommand{\tutodoc@trans@exa@title}{}{Exemple} +\NewDocumentCommand{\tutodoc@trans@rmk@title}{}{Remarque} +\NewDocumentCommand{\tutodoc@trans@note@title}{}{Note} +\NewDocumentCommand{\tutodoc@trans@tip@title}{}{Astuce} +\NewDocumentCommand{\tutodoc@trans@important@title}{}{Important} +\NewDocumentCommand{\tutodoc@trans@caution@title}{}{Caution} +\NewDocumentCommand{\tutodoc@trans@warn@title}{}{Danger} +\NewDocumentCommand{\tutodoc@trans@chges@pb}{}{Problème} +\NewDocumentCommand{\tutodoc@trans@chges@break}{}{Bifurcation} +\NewDocumentCommand{\tutodoc@trans@chges@fix}{}{Réparation} +\NewDocumentCommand{\tutodoc@trans@chges@new}{}{Nouveau} +\NewDocumentCommand{\tutodoc@trans@chges@update}{}{Mise ~ à ~ jour}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tutodoc/tutodoc.sty b/Master/texmf-dist/tex/latex/tutodoc/tutodoc.sty index cd4a6aecb39..5e0ea7a0fb4 100644 --- a/Master/texmf-dist/tex/latex/tutodoc/tutodoc.sty +++ b/Master/texmf-dist/tex/latex/tutodoc/tutodoc.sty @@ -1,7 +1,7 @@ % ------------------------------------------------------- % % - This is file `tutodoc.sty' generated automatically. - % % - - % -% - Copyright (C) 2023 by Christophe BAL - % +% - Copyright (C) 2023-2024 by Christophe BAL - % % - - % % - This file may be distributed and/or modified under - % % - the conditions of the GNU 3 License. - % @@ -9,8 +9,8 @@ \ProvidesExplPackage {tutodoc} - {2023-12-08} % Creation: 2023-11-29 - {1.0.1} + {2024-01-06} % Creation: 2023-11-29 + {1.1.0} {This package proposes tools for writing "human friendly" documentations of LaTeX packages.} \RequirePackage[ @@ -88,18 +88,18 @@ % -- LOCALE SETTINGS -- % -\NewDocumentCommand{\tdoc@colon}{}{:} +\NewDocumentCommand{\tutodoc@colon}{}{:} % We must take care of the colons, babel and spacing. \@ifpackageloaded{babel}{ \iflanguage{french}{ - \RenewDocumentCommand{\tdoc@colon}{}{\babelshorthand{:}} + \RenewDocumentCommand{\tutodoc@colon}{}{\babelshorthand{:}} }{} }{} \ExplSyntaxOn -\input{tdoc-locale-\l_tdoc_opt_lang_str.cfg.sty} +\input{tutodoc-locale-main-\l_tdoc_opt_lang_str.cfg.sty} \ExplSyntaxOff @@ -199,7 +199,7 @@ \NewDocumentCommand{\tdocinEN}{s m}{% \tdocquote{#2}% \IfBooleanF{#1}{% No star used. - \ \tdoc@trans@in@EN{}% + \ \tutodoc@trans@in@EN{}% }% } @@ -212,7 +212,7 @@ % See the \doc of the macro ''\newtheorem'' from the package ''amsthm'' % to have \infos about the environment ''@@tdocexa@nb''. %%% -\newtheorem{@@tdocexa@nb}{\tdoc@trans@exa@title}% +\newtheorem{@@tdocexa@nb}{\tutodoc@trans@exa@title}% [subsubsection] %%% @@ -226,7 +226,7 @@ % See the \doc of the macro ''\newtheorem*'' from the package ''amsthm'' % to have \infos about the environment ''@@tdocexa@no@nb''. %%% -\newtheorem*{@@tdocexa@no@nb}{\tdoc@trans@exa@title} +\newtheorem*{@@tdocexa@no@nb}{\tutodoc@trans@exa@title} % :: EXAMPLE - PUBLIC VERSION :: % @@ -268,7 +268,7 @@ % See the \doc of the macro ''\newtheorem*'' from the package ''amsthm'' % to have \infos about the environment ''tdocrem''. %%% -\newtheorem*{tdocrem}{\tdoc@trans@rmk@title} +\newtheorem*{tdocrem}{\tutodoc@trans@rmk@title} % :: IMPORTANT :: % @@ -277,7 +277,7 @@ % See the \doc of the macro ''\newtheorem*'' from the package ''amsthm'' % to have \infos about the environment ''tdocimportant''. %%% -\newtheorem*{tdocimportant}{\tdoc@trans@important@title} +\newtheorem*{tdocimportant}{\tutodoc@trans@important@title} % :: NOTE :: % @@ -286,7 +286,7 @@ % See the \doc of the macro ''\newtheorem*'' from the package ''amsthm'' % to have \infos about the environment ''tdocnote''. %%% -\newtheorem*{tdocnote}{\tdoc@trans@note@title} +\newtheorem*{tdocnote}{\tutodoc@trans@note@title} % :: TIP :: % @@ -295,7 +295,7 @@ % See the \doc of the macro ''\newtheorem*'' from the package ''amsthm'' % to have \infos about the environment ''tdoctip''. %%% -\newtheorem*{tdoctip}{\tdoc@trans@tip@title} +\newtheorem*{tdoctip}{\tutodoc@trans@tip@title} % :: CUATION :: % @@ -304,7 +304,7 @@ % See the \doc of the macro ''\newtheorem*'' from the package ''amsthm'' % to have \infos about the environment ''tdoccaution''. %%% -\newtheorem*{tdoccaution}{\tdoc@trans@caution@title} +\newtheorem*{tdoccaution}{\tutodoc@trans@caution@title} % :: WARNING :: % @@ -313,7 +313,7 @@ % See the \doc of the macro ''\newtheorem*'' from the package ''amsthm'' % to have \infos about the environment ''tdocwarn''. %%% -\newtheorem*{tdocwarn}{\tdoc@trans@warn@title} +\newtheorem*{tdocwarn}{\tutodoc@trans@warn@title} % -- NAMES OF PACKAGES, MACROS & ENVIRONMENTS -- % @@ -563,9 +563,9 @@ \keys_define:nn { tdoc/showcase } { % Texts. before .tl_set:N = \l_tdoc_showcase_before_tl, - before .initial:n = \tdoc@trans@latex@show@start, + before .initial:n = \tutodoc@trans@latex@show@start, after .tl_set:N = \l_tdoc_showcase_after_tl, - after .initial:n = \tdoc@trans@latex@show@end, + after .initial:n = \tutodoc@trans@latex@show@end, % Decorations. color .tl_set:N = \l_tdoc_showcase_color_tl, color .initial:n = cyan, @@ -644,7 +644,7 @@ % See the \doc of the macro ''\newmintinline'' from the package ''minted'' % to have \infos about the macro ''tdocinlatex''. %%% -\newmintinline[tdocinlatex]{latex}{} +\newmintinline[tdocinlatex]{latex}{bgcolor = yellow!4} % :: SHORTCUTS FOR TCOLORBOX LISTING FORMATING :: % @@ -662,7 +662,7 @@ % % See the pgfkeys package documentation for explanation. %%% -\NewExpandableDocumentCommand{\tdoc@latex@listing@formating}{ m }{ +\NewExpandableDocumentCommand{\tutodoc@latex@listing@formating}{ m }{ \str_case:nnF { #1 } { { sbs } { listing ~ side ~ text } { code } { listing ~ only } @@ -721,7 +721,7 @@ % ''tcolorbox'' to have \infos about the environment ''tdoclatex''. %%% \newtcblisting{tdoclatex}[1][std]{% - tdoclatex_tcbstyle = \tdoc@latex@listing@formating{#1} + tdoclatex_tcbstyle = \tutodoc@latex@listing@formating{#1} } @@ -738,7 +738,7 @@ %%% \newtcbinputlisting{\tdoclatexinput}[2][std]{ listing file = {#2}, - tdoclatex_tcbstyle = \tdoc@latex@listing@formating{#1} + tdoclatex_tcbstyle = \tutodoc@latex@listing@formating{#1} } @@ -758,7 +758,7 @@ %%% \keys_define:nn { tdoc/latexshow } { explain .tl_set:N = \l_tdoc_listing_explain_tl, - explain .initial:n = { \tdoc@trans@this@gives \tdoc@colon }, + explain .initial:n = { \tutodoc@trans@this@gives \tutodoc@colon }, } @@ -817,7 +817,7 @@ % % :see: \__tdoc_translate_date:n %%% -\NewDocumentCommand{\tdoc@new@change@margin}{m m m m}{ +\NewDocumentCommand{\tutodoc@new@change@margin}{m m m m}{ \marginnote{ \color{#1} \scriptsize @@ -866,11 +866,11 @@ %%% % prototype:: % :action: this function extracts year, month and day in something -% like ''YYYY-MM-DD'' and then it calls ''\tdoc@trans@date'' +% like ''YYYY-MM-DD'' and then it calls ''\tutodoc@trans@date'' % to use the format expected for a "localised" date. %%% \cs_new:Npn \__tdoc_translate_date_process:w #1 - #2 - #3 \q_stop { - \tdoc@trans@date{#1} + \tutodoc@trans@date{#1} {#2} {#3} } @@ -894,7 +894,7 @@ % of the language chosen when loading the package. %%% \NewDocumentCommand{\tdocversion}{O{blue} m O{}}{ - \tdoc@new@change@margin{#1} % Color + \tutodoc@new@change@margin{#1} % Color {#3} % Date {#2} % Version {-4.25pt} % Last negative vertical spacing @@ -912,7 +912,7 @@ % prints a date. %%% \NewDocumentCommand{\tdocdate}{O{blue} m}{ - \tdoc@new@change@margin{#1} % Color + \tutodoc@new@change@margin{#1} % Color {#2} % Date {} % Version {-5.35pt} % Last negative spacing @@ -962,7 +962,7 @@ % translated into the good language. %%% \NewDocumentEnvironment{tdocnew}{}{ - \begin{tdoctopic}{\tdoc@trans@chges@new} + \begin{tdoctopic}{\tutodoc@trans@chges@new} }{ \end{tdoctopic} } @@ -978,7 +978,39 @@ % translated into the good language. %%% \NewDocumentEnvironment{tdocupdate}{}{ - \begin{tdoctopic}{\tdoc@trans@chges@update} + \begin{tdoctopic}{\tutodoc@trans@chges@update} +}{ + \end{tdoctopic} +} + + +% :: CHANGES - BREAK :: % + +%%% +% prototype:: +% :see: env.tdoctopic +% +% :action: similar to the \env ''tdoctopic'' with the title "Break" +% translated into the good language. +%%% +\NewDocumentEnvironment{tdocbreak}{}{ + \begin{tdoctopic}{\tutodoc@trans@chges@break} +}{ + \end{tdoctopic} +} + + +% :: CHANGES - PROBLEM :: % + +%%% +% prototype:: +% :see: env.tdoctopic +% +% :action: similar to the \env ''tdoctopic'' with the title "Problem" +% translated into the good language. +%%% +\NewDocumentEnvironment{tdocprob}{}{ + \begin{tdoctopic}{\tutodoc@trans@chges@pb} }{ \end{tdoctopic} } @@ -994,7 +1026,7 @@ % translated into the good language. %%% \NewDocumentEnvironment{tdocfix}{}{ - \begin{tdoctopic}{\tdoc@trans@chges@fix} + \begin{tdoctopic}{\tutodoc@trans@chges@fix} }{ \end{tdoctopic} } @@ -1004,6 +1036,9 @@ % -- DECORATIONS -- % +% Source for \addvspace{\medskipamount} instead of \medskip. +% * https://tex.stackexchange.com/a/705938/6880 + %%% % prototype:: % :action: this macro draws a centered horizontal rule with a height @@ -1012,8 +1047,8 @@ % Extra vertical spaces are added above and below the rule. %%% \NewDocumentCommand{\tdocsep}{}{ - \medskip - \hfill\rule{0.5\textwidth}{0.75pt}\hfill + \par\addvspace{\medskipamount} + \hfill\rule{0.5\textwidth}{0.75pt}\hfill\null \medskip \smallskip } |