diff options
author | Norbert Preining <norbert@preining.info> | 2022-03-17 03:00:46 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-03-17 03:00:46 +0000 |
commit | 8208f204439f3a899e43187857e3f9c86d4ebb7c (patch) | |
tree | 70c940f6d7a58f7878aeef16a87a1af85f6f3f69 /macros | |
parent | 725ce6a3e602c7516d471df841ea433b8c5bcd9d (diff) |
CTAN sync 202203170300
Diffstat (limited to 'macros')
-rw-r--r-- | macros/latex/contrib/altsubsup/altsubsup.dtx | 312 | ||||
-rw-r--r-- | macros/latex/contrib/altsubsup/altsubsup.pdf | bin | 331240 -> 356109 bytes | |||
-rw-r--r-- | macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf | bin | 470786 -> 478856 bytes | |||
-rw-r--r-- | macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex | 124 | ||||
-rw-r--r-- | macros/latex/contrib/proflycee/tex/ProfLycee.sty | 18 | ||||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex-interpreter.py | 4 | ||||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.lua | 20 | ||||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.pdf | bin | 81863 -> 81863 bytes | |||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.sty | 2 | ||||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.tex | 2 |
10 files changed, 338 insertions, 144 deletions
diff --git a/macros/latex/contrib/altsubsup/altsubsup.dtx b/macros/latex/contrib/altsubsup/altsubsup.dtx index 537c96056a..856c2cca8c 100644 --- a/macros/latex/contrib/altsubsup/altsubsup.dtx +++ b/macros/latex/contrib/altsubsup/altsubsup.dtx @@ -25,15 +25,16 @@ %<package> \NeedsTeXFormat{LaTeX2e} %<package> \ProvidesPackage{altsubsup} %<*package> -[2022/01/23 v1.0 .dtx altsubsup file] +[2022/03/15 v1.1 .dtx altsubsup file] %</package> % %<*driver> \documentclass{ltxdoc} \usepackage{altsubsup} +\usepackage{spbmark} \usepackage[hidelinks]{hyperref} \usepackage{xcolor} -\EnableCrossrefs +\EnableCrossrefs \CodelineIndex \RecordChanges % \OnlyDescription @@ -45,7 +46,7 @@ %</driver> % \fi % -% \CheckSum{109} +% \CheckSum{147} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -64,7 +65,7 @@ % Right brace \} Tilde \~} % % -% \changes{v1.0}{2022/01/23}{Initial version} +% \changes{v1.0}{2022/01/23}{Initial version.} % % \GetFileInfo{altsubsup.dtx} % @@ -92,83 +93,117 @@ % \begin{tabular}{ccc} % |x_[roman]^{italic}|& $\longrightarrow$ & $x_[roman]^{italic}$ \\[6pt] % |x_{italic}^[roman]|& $\longrightarrow$ & $x_{italic}^[roman]$ -% \end{tabular} -% \end{center} -% \end{abstract} -% -% \tableofcontents{} -% \clearpage -% -% \section{Introduction} -% -% The \textsf{altsubsup} package allows to write alternate subscripts and -% superscripts, in math mode, with square brackets : -% \begin{center} -% |x_[my subscript]| \quad or \quad |x^[my superscript]|. -% \end{center} -% These alternate superscripts and superscripts are formatted by the commands -% set, respectively, with |\SetAltSubscriptCommand| and -% |\SetAltSuperscriptCommand|. By default, the |\text| command, from -% \textsf{amstext} (part of \textsf{amsmath}) is used. This gives: -% \begin{center} -% $x_[my subscript]$ \quad or \quad $x^[my superscript]$. +% \end{tabular} % \end{center} +% \end{abstract} +% +% \tableofcontents{} +% \clearpage +% +% \section{Introduction} +% +% The \textsf{altsubsup} package allows to write alternate subscripts and +% superscripts, in math mode, with square brackets : +% \begin{center} +% |x_[my subscript]| \quad or \quad |x^[my superscript]|. +% \end{center} +% These alternate superscripts and superscripts are formatted by the commands +% set, respectively, with |\SetAltSubscriptCommand| and +% |\SetAltSuperscriptCommand|. By default, the |\text| command, from +% \textsf{amstext} (part of \textsf{amsmath}) is used. This gives: +% \begin{center} +% $x_[my subscript]$ \quad or \quad $x^[my superscript]$. +% \end{center} +% +% This package redefine |_| and |^| symbols. Options allow to redefine both +% (by default), only subscript |_| symbol, or only superscript |^| symbol. +% +% \section{Motivations} +% +% Common typographic conventions\footnotemark{} use italic (sloping) type for +% physical quantities or mathematical variables and roman (upright) type for +% words or fixed numbers. For example, heat capacity at constant pressure should +% be printed $C_P$, but kinetic energy $E_[k]$ (instead of $E_k$) and relative +% permeability $\mu_[r]$ (instead of $\mu_r$). This can be obtainted in \LaTeX{} +% with\footnotemark{} |E_{\mathrm{k}}| and |\mu_{\mathrm{r}}|. This package +% allows to write them simply |E_[k]| and |\mu_[r]|. +% \footnotetext{See, for example: International Organization for +% Standardization. (2009). \emph{Quantities and units -- Part 1: General} (ISO +% Standard No. 80000-1:2009). +% \href{https://www.iso.org/standard/30669.html}{https://www.iso.org/standard/30669.html}.} +% \footnotetext{Instead of \texttt{\textbackslash{}mathrm}, a best choice is +% the \texttt{\textbackslash{}text} macro provided by \textsf{amsmath} +% package, which, for example, handle spaces. It's the formatting macro used +% by default by the \textsf{altsubsup} package.} +% +% \section{User interface} +% +% \subsection{Usage} +% +% \DescribeMacro{\SetAltSubscriptCommand\marg{cmd}} +% +% Set the command \meta{cmd} used to format square brackets subscripts +% |_[...]|. By default, \meta{cmd} is the |\text| command, provided by the +% \textsf{amstext} package (part of \textsf{amsmath} package). +% +% \DescribeMacro{\SetAltSuperscriptCommand\marg{cmd}} +% +% Set the command \meta{cmd} used to format square brackets superscripts +% |^[...]|. By default, \meta{cmd} is the |\text| command, provided by the +% \textsf{amstext} package (part of \textsf{amsmath} package). +% +% \DescribeMacro{\SetAltSubSupCommands\marg{cmd}} +% +% Set both square brackets subscripts and square brackets superscripts, with the +% same command \meta{cmd}. +% +% \pagebreak +% \subsection{Options} +% +% To load the package, add in your preamble: +% \begin{center} +% \begin{minipage}{0.7\linewidth} +% |\usepackage|\oarg{option}|{altsubsup}| +% \end{minipage} +% \end{center} +% Available values for \meta{option}: +% \begin{description} +% \item[|subscript|] redefine only the |_| subscript symbol. +% \item[|superscript|] redefine only the |^| superscript symbol. +% \item[|both|] redefine both |_| and |^| symbols (default). +% \item[|spbmark|] use the \textsf{spbmark} package to handle bracket form of +% superscripts and superscripts (see below). +% \end{description} +% +% \subsubsection*{\texttt{spbmark} option} +% +% The \textsf{spbmark} package +% (\href{https://www.ctan.org/pkg/spbmark}{https://www.ctan.org/pkg/spbmark}), +% by Qu Yi, allows a complete customisation of subscripts and superscripts. +% With the |spbmark| option, the \textsf{altsubsup} package use the |\sub| and +% |\super| macros of the \textsf{spbmark} package to handle subscripts and +% superscripts in place of the standard |_| and |^| commands. +% +% Theses two macros are called with the respective |altsub| and |altsup| styles, +% allowing simple customization (these styles are initially created empty). +% For example, to display subscripts in blue and superscripts in red, use: +% \begin{center}\begin{minipage}{0.7\linewidth} +% \begin{verbatim} +% \defspbstyle{altsub}{cmd=\color{blue}} +% \defspbstyle{altsup}{cmd=\color{red}} +% \end{verbatim} +% \end{minipage}\end{center} % -% This package redefine |_| and |^| symbols. Options allow to redefine both -% (by default), only subscript |_| symbol, or only superscript |^| symbol. -% -% \section{Motivations} -% -% Common typographic conventions\footnotemark{} use italic (sloping) type for -% physical quantities or mathematical variables and roman (upright) type for -% words or fixed numbers. For example, heat capacity at constant pressure should -% be printed $C_P$, but kinetic energy $E_[k]$ (instead of $E_k$) and relative -% permeability $\mu_[r]$ (instead of $\mu_r$). This can be obtainted in \LaTeX{} -% with |E_{\mathrm{k}}| and |\mu_{\mathrm{r}}|. This package allows to write them -% simply |E_[k]| and |\mu_[r]|. -% \footnotetext{See, for example: International Organization for -% Standardization. (2009). \emph{Quantities and units -- Part 1: General} (ISO -% Standard No. 80000-1:2009). -% \href{https://www.iso.org/standard/30669.html}{https://www.iso.org/standard/30669.html}.} -% -% \section{Usage} -% -% \DescribeMacro{\SetAltSubscriptCommand\marg{cmd}} -% -% Set the command \meta{cmd} used to format square brackets subscripts -% |_[...]|. By default, \meta{cmd} is the |\text| command, provided by the -% \textsf{amstext} package (part of \textsf{amsmath} package). -% -% \DescribeMacro{\SetAltSuperscriptCommand\marg{cmd}} -% -% Set the command \meta{cmd} used to format square brackets superscripts -% |^[...]|. By default, \meta{cmd} is the |\text| command, provided by the -% \textsf{amstext} package (part of \textsf{amsmath} package). -% -% \DescribeMacro{\SetAltSubSupCommands\marg{cmd}} -% -% Set both square brackets subscripts and square brackets superscripts, with the -% same command \meta{cmd}. -% -% \section{Options} -% -% To load the package, add in your preamble: -% \begin{center} -% \begin{minipage}{0.7\linewidth} -% |\usepackage|\oarg{option}|{altsubsup}| -% \end{minipage} -% \end{center} -% Available values for \meta{option}: -% \begin{description} -% \item[|subscript|] redefine only the |_| subscript symbol. -% \item[|superscript|] redefine only the |^| superscript symbol. -% \item[|both|] redefine both |_| and |^| symbols (default). -% \end{description} +% A major limitation is that using simultaneously a subscript and a superscript gives +% bad formatting (the \textsf{spbmark} macro for this is |\supersub|). +% For example, |x_[sub]^[super]| gives $x\sub{\text{sub}}\super{\text{super}}$ +% instead of $x_[sub]^[super]$. % -% \section{Example} +% \pagebreak +% \section{Example} % -% The following input: -% \begin{center}\begin{minipage}{0.7\linewidth} +% The following input: +% \begin{center}\begin{minipage}{0.7\linewidth} % \begin{verbatim} % Default: % \begin{displaymath} @@ -204,10 +239,10 @@ % x_[brackets sub]^[brackets sup] % \end{displaymath} % \end{verbatim} -% \end{minipage}\end{center} +% \end{minipage}\end{center} % -% gives: -% \begin{center}\begin{minipage}{0.7\linewidth} +% gives: +% \begin{center}\begin{minipage}{0.7\linewidth} % Default: % \begin{displaymath} % x_a^b \quad @@ -239,63 +274,94 @@ % x_{braces sub}^[brackets sup] \quad % x_[brackets sub]^[brackets sup] % \end{displaymath} -% \end{minipage}\end{center} -% -% \section{Known issues} -% -% The use of the prime symbol |'| can raise the \emph{Double superscript} -% error message. This is normally fixed (|x'^2| gives $x'^2$ correctly). -% If needed, enclose the expression with |{...}|. In particular, |x'^[sup]| -% doesn't work, and should be written: |{x'}^[sup]|. -% -% \section{Alternatives} -% -% Two other packages give similar functionalities: -% \begin{description} -% \item[the \textsf{subtext} package] -% (\href{https://www.ctan.org/pkg/subtext}{https://www.ctan.org/pkg/subtext}), -% by Palle J\o{}rgensen, formats |_[...]| subscripts with |\text| (the -% differences, is that the \textsf{altsubsup} package works both for -% subscripts and superscripts, allows to customise the commands, and -% redefine symbols only in math mode); -% \item[the \textsf{spbmark} package] -% (\href{https://www.ctan.org/pkg/spbmark}{https://www.ctan.org/pkg/spbmark}), -% by Qu Yi, allows a complete customisation of subscripts and superscripts. -% \end{description} -% -% \StopEventually{} -% \section{Implementation} -% -% \subsection*{Package declaration} +% \end{minipage}\end{center} +% +% \section{Complements} +% +% \subsection{Known issue} +% +% The use of the prime symbol |'| can raise the \emph{Double superscript} +% error message. This is normally fixed (|x'^2| gives $x'^2$ correctly). +% If needed, enclose the expression with |{...}|. In particular, |x'^[sup]| +% doesn't work, and should be written: |{x'}^[sup]|. +% +% \subsection{Alternative} +% +% \begin{description} +% \item[the \textsf{subtext} package] +% (\href{https://www.ctan.org/pkg/subtext}{https://www.ctan.org/pkg/subtext}), +% by Palle J\o{}rgensen, formats |_[...]| subscripts with |\text| (the +% differences, is that the \textsf{altsubsup} package works both for +% subscripts and superscripts, allows to customise the commands, and +% redefine symbols only in math mode). +% \end{description} +% +% \subsection{Changelog} +% +% \begin{description} +% \item[v1.1] +% \begin{itemize} +% \item Backup standard subscript |_| and superscript |^| commands to handle +% packages that redefine |\sb| or |\sp| macros, as \textsf{spbmark}. +% \item Add option |spbmark| to format subscripts and superscripts with the +% \textsf{spbmark} package. +% \end{itemize} +% \item[v1.0] Initial version. +% \end{description} + +% \StopEventually{} +% \section{Implementation} +% +% \subsection*{Package declaration} % % \begin{macrocode} -\ProvidesPackage{altsubsup}[2022/01/23, v1.0, Alternative and customisable +\ProvidesPackage{altsubsup}[2022/03/15, v1.1, Alternative and customisable subscripts and superscripts, with square brackets.] % \end{macrocode} % % \subsection*{Flags declaration} % -% Determine the commands that will be redefined. +% \subsubsection*{Determine the commands that will be redefined} % % \begin{macrocode} \newif\ifaltsbsp@subscript \altsbsp@subscripttrue \newif\ifaltsbsp@superscript \altsbsp@superscripttrue % \end{macrocode} % +% \subsubsection*{Use the spbmark mechanism} +% +% \begin{macrocode} +\newif\ifaltsbsp@spbmark \altsbsp@spbmarkfalse +% \end{macrocode} +% % \subsection*{Options declarations and processing} % +% \changes{v1.1}{2022/03/15}{Add sbpmark option} % \begin{macrocode} \DeclareOption{subscript} {\altsbsp@subscripttrue \altsbsp@superscriptfalse} \DeclareOption{superscript} {\altsbsp@subscriptfalse \altsbsp@superscripttrue } \DeclareOption{both} {\altsbsp@subscripttrue \altsbsp@superscripttrue } +\DeclareOption{spbmark} {\altsbsp@spbmarktrue} \DeclareOption*{\PackageWarning{altsubsup}{Unknown option \CurrentOption.}} \ProcessOptions\relax +\ifaltsbsp@spbmark + \RequirePackage{spbmark} +\fi % \end{macrocode} % -% \subsection*{Redefine catcodes and make symbols active in mathmode} +% \subsection*{Backup standard superscript and subscript commands} +% +% \changes{v1.1}{2022/03/15}{Backup standard superscript and superscript commands} % % \begin{macrocode} \AtBeginDocument{% + \begingroup\catcode`\_=8 \global\let\altsbsp@standardsub=_\endgroup + \begingroup\catcode`\^=7 \global\let\altsbsp@standardsup=^\endgroup +% \end{macrocode} +% +% \subsection*{Redefine catcodes and make symbols active in mathmode} +% +% \begin{macrocode} \ifaltsbsp@subscript \catcode`\_=12 \mathcode`\_="8000 \fi% \ifaltsbsp@superscript \catcode`\^=12 \mathcode`\^="8000 \fi% } @@ -308,7 +374,7 @@ subscripts and superscripts, with square brackets.] \begingroup\lccode`\~=`\_\lowercase{\endgroup% \def~}{\@ifnextchar[% dummy bracket ] {\altsbsp@subwrapper}% bracket wrapper - {\sb}% standard form + {\altsbsp@standardsub}% standard form }% \fi % \end{macrocode} @@ -320,7 +386,7 @@ subscripts and superscripts, with square brackets.] \begingroup\lccode`\~=`\^\lowercase{\endgroup% \def~}{\@ifnextchar[% dummy bracket ] {\altsbsp@supwrapper}% bracket wrapper - {\sp}% standard form + {\altsbsp@standardsup}% standard form }% \fi % \end{macrocode} @@ -330,17 +396,33 @@ subscripts and superscripts, with square brackets.] % \begin{macro}{\SetAltSubscriptCommand} % \begin{macrocode} \def\SetAltSubscriptCommand#1{\let\altsbsp@altsubcmd#1}% -\def\altsbsp@subwrapper[#1]{\sb{\altsbsp@altsubcmd{#1}}}% % \end{macrocode} % \end{macro} % +% \begin{macrocode} +\ifaltsbsp@spbmark% + \defspbstyle{altsub}{} + \def\altsbsp@subwrapper[#1]{\sub[style=altsub]{\altsbsp@altsubcmd{#1}}}% +\else + \def\altsbsp@subwrapper[#1]{\altsbsp@standardsub{\altsbsp@altsubcmd{#1}}}% +\fi +% \end{macrocode} +% % \begin{macro}{\SetAltSuperscriptCommand} % \begin{macrocode} \def\SetAltSuperscriptCommand#1{\let\altsbsp@altsupcmd#1}% -\def\altsbsp@supwrapper[#1]{\sp{\altsbsp@altsupcmd{#1}}}% % \end{macrocode} % \end{macro} % +% \begin{macrocode} +\ifaltsbsp@spbmark% + \defspbstyle{altsup}{} + \def\altsbsp@supwrapper[#1]{\super[style=altsup]{\altsbsp@altsupcmd{#1}}}% +\else + \def\altsbsp@supwrapper[#1]{\altsbsp@standardsup{\altsbsp@altsupcmd{#1}}}% +\fi +% \end{macrocode} +% % \begin{macro}{\SetAltSubSupCommands} % \begin{macrocode} \newcommand{\SetAltSubSupCommands}[1]{% diff --git a/macros/latex/contrib/altsubsup/altsubsup.pdf b/macros/latex/contrib/altsubsup/altsubsup.pdf Binary files differindex 94bcb5c1e7..8de9f817b5 100644 --- a/macros/latex/contrib/altsubsup/altsubsup.pdf +++ b/macros/latex/contrib/altsubsup/altsubsup.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf Binary files differindex 44f495b110..96aa6c8b8a 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index 9ba28f0b31..48ef982e3d 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -18,6 +18,7 @@ \usepackage{xintexpr} \usepackage{codehigh} \usepackage{hyperref} +\urlstyle{same} \hypersetup{pdfborder=0 0 0} \sisetup{locale=FR} @@ -152,7 +153,7 @@ {\ttfamily c pierquet -- at -- outlook . fr} \end{tabular} } -\date{Version 1.0.7 -- 21 Février 2022} +\date{Version 1.0.8 -- 16 Mars 2022} \newcommand\Cle[1]{{\bfseries\sffamily\textlangle #1\textrangle}} @@ -176,6 +177,7 @@ Quelques environnements (\textsf{tcbox}) pour présenter du code \textsf{python} Quelques environnements (\textsf{tcbox}) pour présenter des commandes dans un terminal (\textsf{win} ou \textsf{mac} ou \textsf{linux}). +Un cartouche (\textsf{tcbox}) pour présenter des codes de partage \textsf{capytale}. \vfill @@ -1224,18 +1226,47 @@ Peu d'options pour ces commandes : \medskip -\begin{codetex}[listing only] -\begin{PLtermwin}[15cm]{} %largeur 15cm avec titre par défaut -Microsoft Windows [version 10.0.22000.493] -(c) Microsoft Corporation. Tous droits réservés. -C:\Users\test>ping -c 2ctan.org -Envoi d'une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données : -\end{PLtermwin} +\begin{codeinfo} +Le \textsf{code} n'est pas formaté, ni mis en coloration syntaxique. + +De ce fait tout les caractères sont autorisés, même si l'éditeur pourra détecter le \% comme le début d'un commentaire, tout sera intégré dans le code mis en forme ! +\end{codeinfo} + +\medskip +\begin{codetex}[listing only] \begin{PLtermunix}[12cm]{titre=Terminal Ubuntu}[center] %12cm, avec titre modifié et centré test@DESKTOP:~$ ping -c 2 ctan.org PING ctan.org (5.35.249.60) 56(84) bytes of data. \end{PLtermunix} +\end{codetex} + +\medskip + +\begin{codesortie} +\begin{PLtermunix}[12cm]{titre=Terminal Ubuntu}[center] +test@DESKTOP:~$ ping -c 2 ctan.org +PING ctan.org (5.35.249.60) 56(84) bytes of data. +\end{PLtermunix} +\end{codesortie} + +\begin{codetex}[listing only] +\begin{PLtermwin}[15cm]{} %largeur 15cm avec titre par défaut +Microsoft Windows [version 10.0.22000.493] +(c) Microsoft Corporation. Tous droits réservés. +C:\Users\test>ping ctan.org + +Envoi d’une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données : +Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51 +Réponse de 5.35.249.60 : octets=32 temps=37 ms TTL=51 +Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51 +Réponse de 5.35.249.60 : octets=32 temps=39 ms TTL=51 + +Statistiques Ping pour 5.35.249.60: +Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%), +Durée approximative des boucles en millisecondes : +Minimum = 35ms, Maximum = 39ms, Moyenne = 36ms +\end{PLtermwin} \begin{PLtermosx}[0.5\linewidth]{titre=Terminal MacOSX}[flush right] %1/2-largeur et titre modifié et droite [test@server]$ ping -c 2 ctan.org @@ -1247,8 +1278,18 @@ PING ctan.org (5.35.249.60) 56(84) bytes of data. \begin{PLtermwin}[15cm]{} Microsoft Windows [version 10.0.22000.493] (c) Microsoft Corporation. Tous droits réservés. -C:\Users\test>ping -c 2ctan.org -Envoi d'une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données : +C:\Users\test>ping ctan.org + +Envoi d’une requête 'ping' sur ctan.org [5.35.249.60] avec 32 octets de données : +Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51 +Réponse de 5.35.249.60 : octets=32 temps=37 ms TTL=51 +Réponse de 5.35.249.60 : octets=32 temps=35 ms TTL=51 +Réponse de 5.35.249.60 : octets=32 temps=39 ms TTL=51 + +Statistiques Ping pour 5.35.249.60: +Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%), +Durée approximative des boucles en millisecondes : +Minimum = 35ms, Maximum = 39ms, Moyenne = 36ms \end{PLtermwin} \begin{PLtermunix}[12cm]{titre=Terminal Ubuntu}[center] @@ -1264,8 +1305,71 @@ PING ctan.org (5.35.249.60) 56(84) bytes of data. \newpage +\section{Cartouche Capytale} + +\subsection{Introduction} + +\begin{codeidee} +L'idée est d'obtenir des \textsf{cartouches} tels que \textsf{Capytale} les présente, pour partager un code afin d'accéder à une activité \textsf{python}. +\end{codeidee} + +\subsection{Commandes} + +\begin{codetex}[listing only] +\liencapytale(*)[options]{code} +\end{codetex} + +\begin{codecles} +Peu d'options pour ces commandes : + +\begin{itemize} + \item la version \textit{étoilée} qui permet de passer de la police \Cle{sffamily} à la police \Cle{ttfamily}, et donc dépendante des fontes du document ; + \item le deuxième, optionnel, permet de rajouter des caractères après le code (comme un \textsf{espace}) ;\hfill{}défaut \Cle{vide} + \item le troisième, mandataire, est le \textsf{code} à afficher. +\end{itemize} +\end{codecles} + +\begin{codetex}[listing only] +\liencapytale{abcd-12345} #lien simple, en sf + +\liencapytale[~]{abcd-12345} #lien avec ~ à la fin, en sf + +\liencapytale*{abcd-12345} #lien simple, en tt + +\liencapytale*[~]{abcd-12345} #lien avec ~ à la fin, en tt +\end{codetex} + +\begin{codesortie} +\liencapytale{abcd-12345} + +\liencapytale[~]{abcd-12345} + +\liencapytale*{abcd-12345} + +\liencapytale*[~]{abcd-12345} +\end{codesortie} + +\begin{codeinfo} +Le \textsf{cartouche} peut être \og cliquable \fg{} grâce à \ctex{href}. +\end{codeinfo} + +\begin{codetex}[listing only] +\usepackage{hyperref} +\urlstyle{same} +... +\href{https://capytale2.ac-paris.fr/web/c/abcd-12345}{\liencapytale{abcd-12345}} +\end{codetex} + +\begin{codesortie} +\href{https://capytale2.ac-paris.fr/web/c/abcd-12345}{\liencapytale{abcd-12345}} +\end{codesortie} + +\newpage + \section{Historique} +{\small \bverb|v1.0.8| :~~~~Ajout d'une commande \textsf{liencapytale} pour créer des cartouches de lien "comme capytale" + {\small \bverb|v1.0.7| :~~~~Ajout d'une option \textsf{build} pour placer certains fichiers auxiliaires dans un répertoire \textsf{./build} {\small \bverb|v1.0.6| :~~~~Ajout d'une option \textsf{nominted} pour ne pas charger \ctex{minted} (pas besoin de compiler avec \textsf{shell-escape}) diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index 682868f62f..c12aac3e59 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -3,7 +3,8 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2022/02/21 - v1.0.7 - Aide pour l'utilisation de LaTeX en lycée] +\ProvidesPackage{ProfLycee}[2022/03/16 - v1.0.8 - Aide pour l'utilisation de LaTeX en lycée] +% 1.0.8 Ajout d'une commande liencapytale pour créer un cartouche "comme sur capytale" % 1.0.7 Option [build] pour placer les fichiers temporaires dans un répertoire build (désactivée par défaut) % 1.0.6 Option [nominted] pour éviter de charger minted & nettoyage amssymb % 1.0.5 Environnement code python avec minted @@ -24,12 +25,15 @@ %------Packages utiles \RequirePackage[table,svgnames]{xcolor}%Gestion des couleurs \RequirePackage{tikz} +\RequirePackage{tkz-tab} +\RequirePackage{mathtools} \RequirePackage{pgf,pgffor} \RequirePackage{ifthen} \RequirePackage{xparse} \RequirePackage{xkeyval} \RequirePackage{xfp} \RequirePackage{xstring} +\RequirePackage{xintexpr} \RequirePackage{simplekv} \RequirePackage{listofitems} \RequirePackage{xintexpr} @@ -170,7 +174,7 @@ %----------------FENÊTRE CALCUL FORMEL \newcommand\CFchap{\textasciicircum} \newcounter{CFnum} -% ========= DEF DES CLES PARAM FENETRES XCAS +%def des clés \defKV[paramfenxcas]{% larg=\def\CFlarg{#1},% esplg=\def\CFesplg{#1},% @@ -196,7 +200,7 @@ \useKVdefault[paramfenxcas]% \setKV[paramfenxcas]{#1}% on paramètres les nouvelles clés et on les simplifie } -% ========= DEF DES CLES PARAM LIGNES XCAS ========= +%def des clés \defKV[paramlgxcas]{% hc=\def\CFhle{#1},% hr=\def\CFhlr{#1} @@ -520,7 +524,7 @@ } } -%============FakeTerm=========== +%============FakeTerm=========== OK !! %couleurs (inspirées par termsim !) \definecolor{PLmpurple}{RGB}{48,10,36} \definecolor{PLmgray}{RGB}{70,72,67} @@ -664,4 +668,10 @@ width=#1,#3 } +%============CartoucheCapytale========= OK !! +\definecolor{vertcapyt}{HTML}{008000} +\DeclareTotalTCBox{\liencapytale}{ s O{} m } + {enhanced,size=fbox,on line,arc=3pt,colback=vertcapyt,colframe=vertcapyt,fontupper=\IfBooleanTF{#1}{\ttfamily}{\sffamily}\bfseries,colupper=white}% + {#3#2~{\scriptsize\faLink}} + \endinput
\ No newline at end of file diff --git a/macros/luatex/latex/pyluatex/pyluatex-interpreter.py b/macros/luatex/latex/pyluatex/pyluatex-interpreter.py index 77d09bbb64..5a21e6d0f0 100644 --- a/macros/luatex/latex/pyluatex/pyluatex-interpreter.py +++ b/macros/luatex/latex/pyluatex/pyluatex-interpreter.py @@ -107,9 +107,7 @@ class Handler(socketserver.StreamRequestHandler): if __name__ == '__main__': try: - tex_file = sys.argv[1] - tex_file_folder = os.path.normpath(os.path.dirname(tex_file)) - sys.path.insert(0, tex_file_folder) + sys.path.insert(0, os.path.normpath(sys.argv[1])) except: pass diff --git a/macros/luatex/latex/pyluatex/pyluatex.lua b/macros/luatex/latex/pyluatex/pyluatex.lua index 0b785239da..efa80c75f4 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.lua +++ b/macros/luatex/latex/pyluatex/pyluatex.lua @@ -45,16 +45,16 @@ local env_repl_mode = false local last_code = nil local last_output = nil -local function get_tex_file() +local function get_tex_file_folder() for k, v in ipairs(arg) do if not v:find("^%-") then - local path = lfs.currentdir() .. dir_sep .. v - if lfs.attributes(path, "mode") == "file" then - return path + local path = file.collapsepath(v, true) + if lfs.isfile(path) then + return file.pathpart(path) else - path = path .. ".tex" - if lfs.attributes(path, "mode") == "file" then - return path + path = file.addsuffix(path, "tex") + if lfs.isfile(path) then + return file.pathpart(path) end end end @@ -76,9 +76,9 @@ function pyluatex.start(executable, local_imports) local cmd = "" if local_imports then - local tex_file = get_tex_file() - if tex_file ~= nil then - cmd = " \"" .. tex_file .. "\"" + local tex_file_folder = get_tex_file_folder() + if tex_file_folder ~= nil then + cmd = " \"" .. tex_file_folder .. "\"" end end cmd = executable .. " \"" .. script .. "\"" .. cmd diff --git a/macros/luatex/latex/pyluatex/pyluatex.pdf b/macros/luatex/latex/pyluatex/pyluatex.pdf Binary files differindex 62127e2871..82ff4f85bf 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.pdf +++ b/macros/luatex/latex/pyluatex/pyluatex.pdf diff --git a/macros/luatex/latex/pyluatex/pyluatex.sty b/macros/luatex/latex/pyluatex/pyluatex.sty index 3413dba4c3..4d8325c807 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.sty +++ b/macros/luatex/latex/pyluatex/pyluatex.sty @@ -9,7 +9,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{pyluatex}[2022/03/10 v0.4.3 Execute Python code on the fly] +\ProvidesPackage{pyluatex}[2022/03/16 v0.4.4 Execute Python code on the fly] \RequirePackage{expl3} \ExplSyntaxOn diff --git a/macros/luatex/latex/pyluatex/pyluatex.tex b/macros/luatex/latex/pyluatex/pyluatex.tex index eeff387c21..c4a10738ac 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.tex +++ b/macros/luatex/latex/pyluatex/pyluatex.tex @@ -15,7 +15,7 @@ \usepackage{url} \title{The \emph{pyluatex} package} \author{Tobias Enderle\\\url{https://github.com/tndrle/PyLuaTeX}} -\date{v0.4.3 (2022/03/10)} +\date{v0.4.4 (2022/03/16)} \begin{document} \maketitle \raggedright |