texlive[74741] Master/texmf-dist: piton (25mar25)
commits+karl at tug.org
commits+karl at tug.org
Tue Mar 25 20:46:00 CET 2025
Revision: 74741
https://tug.org/svn/texlive?view=revision&revision=74741
Author: karl
Date: 2025-03-25 20:46:00 +0100 (Tue, 25 Mar 2025)
Log Message:
-----------
piton (25mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.pdf
trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.tex
trunk/Master/texmf-dist/doc/lualatex/piton/piton.pdf
trunk/Master/texmf-dist/source/lualatex/piton/piton.dtx
trunk/Master/texmf-dist/tex/lualatex/piton/piton.lua
trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty
Modified: trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.tex 2025-03-25 19:45:50 UTC (rev 74740)
+++ trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.tex 2025-03-25 19:46:00 UTC (rev 74741)
@@ -220,10 +220,8 @@
L'extension \pkg{piton} se charge simplement avec |\usepackage{piton}|.
\smallskip
-Si, à la fin du prambule, l'extension \pkg{xcolor} n'a pas été chargée (par l'utilisateur
-ou par une extension chargée dans le préambule), \pkg{piton} charge l'extension
-\pkg{xcolor} avec |\usepackage{xcolor}|, c'est-à-dire sans aucune option. L'extension
-\pkg{piton} ne charge pas d'autre extension. Elle n'utilise pas de programme extérieur.
+Elle utilise et charge l'extension \pkg{xcolor}. Elle n'utilise pas de programme
+extérieur.
\subsection{Les commandes et environnements à la disposition de l'utilisateur}
@@ -795,6 +793,9 @@
environnements directement au-dessus de l'environnement |{Piton}| avec les commandes
classiques |\newenvironment| (de LaTeX standard) et |\NewDocumentEnvironment| (de LaTeX3).
+Avec un noyau LaTeX postérieur au 2025-06-01, il est possible d'utiliser
+|\NewEnvironmentCopy| sur l'environment |{Piton}| mais l'utilité est limitée.
+
C'est pourquoi \pkg{piton} propose une commande \DefinitionCommand{NewPitonEnvironment}.
Cette commande a la même syntaxe que la commande classique
|\NewDocumentEnvironment|.\footnote{Néanmoins, le spécificateur d'argument~|b|, qui sert à
@@ -1009,20 +1010,8 @@
|F|, arguments qui seront exécutés dans le cas où le fichier a été trouvé (lettre |T|) ou
pas (lettre |F|).
-
-\bigskip
-\colorbox{yellow!50}{\textbf{Modification 4.0}}\par\nobreak
-
\smallskip
-\index{old-PitonInputFile}
-La syntaxe pour les chemins absolus et relatifs a été changée pour être conforme aux
-usages traditionnels. Il est toutefois possible d'utiliser la clé
-\Definition{old-PitonInputFile} au chargement de l'extension (c'est-à-dire avec le
-|\usepackage|) pour avoir l'ancien comportement de |\PitonInputFile| (néanmoins, cette clé
-sera supprimée dans une prochaine version de \pkg{piton} !).
-
-\smallskip
-La syntaxe est maintenant la suivante :
+La syntaxe des chemins (absolus et relatifs) est la suivante :
\begin{itemize}
\item Les chemins commençant par |/| sont des chemins absolus.
@@ -1345,7 +1334,7 @@
à la clé \Definition{split-separation}.
\begin{itemize}
\item Ce paramètre doit contenir du matériel à insérer en \emph{mode vertical} de TeX. On
-peut, par exemple, mettre la primmitive TeX |\hrule|.
+peut, par exemple, mettre la primitive TeX |\hrule|.
\item La valeur initiale de ce paramètre est |\vspace{\baselineskip}\vspace{-1.25pt}|, ce qui,
au final, correspond à une ligne vide dans le \textsc{pdf} produit (cet espace vertical
@@ -1398,9 +1387,9 @@
\bigskip
\textbf{Attention} : Comme chaque morceau est traité de manière indépendante, les
-commandes spécifiées par |detected-commands| et les commandes et environnements de Beamer
-automatiquement détectés par \pkg{piton} ne doivent pas enjamber les lignes vides du
-listing de départ.
+commandes spécifiées par |detected-commands| ou |raw-detected-commands| et les commandes
+et environnements de Beamer automatiquement détectés par \pkg{piton} ne doivent pas
+enjamber les lignes vides du listing de départ.
\bigskip
@@ -1614,10 +1603,12 @@
\end{Piton}
-\subsubsection{La clé «detected-commands»}
+\subsubsection{Les clés «detected-commands» et «raw-detected-commands»}
\index{detected-commands (key)}
+\index{raw-detected-commands (key)}
\label{detected-commands}
+\label{raw-detected-commands}
La clé \Definition{detected-commands} de |\PitonOptions| permet de spécifier une liste de
noms de commandes LaTeX qui seront directement détectées par \pkg{piton}.
@@ -1631,6 +1622,12 @@
\item Ces commandes doivent être des commandes LaTeX à un seul argument obligatoire entre
accolades (et ces accolades doivent apparaître explicitement dans le listing).
+
+\item Ces commandes doivent être \textbf{protégées}\footnote{On rappelle que, par défaut
+ |\NewDocumentCommand| crée des commandes protégées au contraire de la commande
+ historique |\newcommand| de LaTeX (et de |\def| de TeX).} contre le développement au
+sens de TeX (car la commande |\piton| développe son argument avant de le passer à Lua pour
+analyse syntaxique).
\end{itemize}
\medskip
@@ -1665,7 +1662,17 @@
\highLight{return n*fact(n-1)}
\end{Piton}
+\bigskip
+\colorbox{yellow!50}{\textbf{Nouveau 4.3}}\par\nobreak
+
+\smallskip
+La clé |raw-detected-commands| est similaire à la clé |detected-commands| mais \pkg{piton}
+ne fera pas d'analyse syntaxique des arguments des commandes LaTeX ainsi détectées.
+
+
+
+
\subsubsection{Le mécanisme «escape»}
\index{begin-escape}
Modified: trunk/Master/texmf-dist/doc/lualatex/piton/piton.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/lualatex/piton/piton.dtx
===================================================================
--- trunk/Master/texmf-dist/source/lualatex/piton/piton.dtx 2025-03-25 19:45:50 UTC (rev 74740)
+++ trunk/Master/texmf-dist/source/lualatex/piton/piton.dtx 2025-03-25 19:46:00 UTC (rev 74741)
@@ -79,12 +79,12 @@
% \iffalse
%<*STY>
% \fi
-\def\PitonFileVersion{4.2c}
-\def\PitonFileDate{2025/03/04}
+\def\PitonFileVersion{4.3}
+\def\PitonFileDate{2025/03/25}
% \iffalse
%</STY>
%<*LUA>
-piton_version = "4.2c" -- 2025/03/04
+piton_version = "4.3" -- 2025/03/25
%</LUA>
%\fi
%
@@ -170,11 +170,8 @@
% The package \pkg{piton} should be loaded by: |\usepackage{piton}|.
%
% \smallskip
-% If, at the end of the preamble, the package \pkg{xcolor} has not been loaded
-% (by the final user or by another package), \pkg{piton} loads \pkg{xcolor} with
-% the instruction |\usepackage{xcolor}| (that is to say without any option).
-% The package \pkg{piton} doesn't load any other package. It does not any
-% exterior program.
+% The package \pkg{piton} uses and \emph{loads} the package \pkg{xcolor}. It
+% does not use any exterior program.
%
% \subsection{Choice of the computer language}
%
@@ -781,6 +778,9 @@
% |\newenvironment| (of standard LaTeX) or |\NewDocumentEnvironment| (of
% LaTeX3).
%
+% With a LaTeX kernel newer than 2025-06-01, it's possible to use
+% |\NewEnvironmentCopy| on the environment |{Piton}| but it's not very powerful.
+%
% That's why \pkg{piton} provides a command
% \DefinitionCommand{NewPitonEnvironment}. That command takes in three mandatory
% arguments.
@@ -1000,19 +1000,8 @@
% corresponding to the letters~|T| and~|F|. Those arguments will be executed if
% the file to include has been found (letter~|T|) or not found (letter~|F|).
%
-% \bigskip
-% \colorbox{yellow!50}{\textbf{Modification 4.0}}\par\nobreak
-%
-% \index{old-PitonInputFile}
% \smallskip
-% The syntax for the absolute and relative paths has been changed in order to
-% be conform to the traditionnal usages. However, it's possible to use the key
-% \Definition{old-PitonInputFile} at load-time (that is to say with the
-% |\usepackage|) in order to have the old behaviour (though, that key will be
-% deleted in a future version of \pkg{piton}!).
-%
-% \smallskip
-% Now, the syntax is the following one:
+% Now, the syntax for the pathes (absolute or relative) is the following one:
% \begin{itemize}
% \item The paths beginning by |/| are absolute.
%
@@ -1389,9 +1378,9 @@
%
% \bigskip
% \textbf{Caution}: Since each chunk is treated independently of the others, the
-% commands specified by |detected-commands| and the commands and environments
-% of Beamer automatically detected by \pkg{piton} must not cross the enmpty
-% lines of the original listing.
+% commands specified by |detected-commands| or |raw-detected-commands| and the
+% commands and environments of Beamer automatically detected by \pkg{piton} must
+% not cross the empty lines of the original listing.
%
% \subsection{Highlighting some identifiers}
%
@@ -1506,7 +1495,7 @@
% \item It's possible to have the elements between \texttt{\$} in the comments
% composed in LateX mathematical mode.
% \item It's possible to ask \pkg{piton} to detect automatically some LaTeX
-% commands, thanks to the key |detected-commands|.
+% commands, thanks to the keys |detected-commands| and |raw-detected-commands|.
% \item It's also possible to insert LaTeX code almost everywhere in a Python listing.
% \end{itemize}
%
@@ -1593,8 +1582,10 @@
% return x*x # compute $x^2$
% \end{Piton}
%
-% \subsubsection{The key ``detected-commands''}
+% \subsubsection{The keys ``detected-commands'' and ``raw-detected-commands''}
%
+% \index{raw-detected-commands (key)}
+% \label{raw-detected-commands}
% \index{detected-commands (key)}
% \label{detected-commands}
%
@@ -1609,7 +1600,15 @@
% backslash (eg. |detected-commands = { emph, textbf }|).
%
% \item These commands must be LaTeX commands with only one (mandatory) argument
-% between braces (and these braces must appear explicitly in the informatic listing).
+% between braces (and these braces must appear explicitly in the informatic
+% listing).
+%
+% \item These commands must be \textbf{protected}\footnote{We recall that the
+% command \texttt{\textbackslash NewDocumentCommand} creates protected commands,
+% unlike the historical LaTeX command \texttt{\textbackslash newcommand} (and
+% unlike the command \texttt{\textbackslash def} of TeX).} against expansion in
+% the TeX sens (because the command |\piton| expands its arguments before
+% throwing it to Lua for syntactic analysis).
% \end{itemize}
%
% \bigskip
@@ -1643,6 +1642,13 @@
% \highLight{return n*fact(n-1)}
% \end{Piton}
%
+% \bigskip
+% \colorbox{yellow!50}{\textbf{New 4.3}}\par\nobreak
+%
+% \smallskip
+% The key |raw-detected-commands| is similar to the key |detected-commands| but
+% \pkg{piton} won't do any syntactic analysis of the arguments of the LaTeX
+% commands which are detected.
%
% \subsubsection{The mechanism ``escape''}
%
@@ -2913,7 +2919,6 @@
% \begin{macrocode}
%<*STY>
\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{l3keys2e}
\ProvidesExplPackage
{piton}
{\PitonFileDate}
@@ -2921,6 +2926,20 @@
{Highlight informatic listings with LPEG on LuaLaTeX}
% \end{macrocode}
%
+% \begin{macrocode}
+\msg_new:nnn { piton } { latex-too-old }
+ {
+ Your~LaTeX~release~is~too~old. \\
+ You~need~at~least~a~the~version~of~2023-11-01
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\IfFormatAtLeastTF
+ { 2023-11-01 }
+ { }
+ { \msg_fatal:nn { piton } { latex-too-old } }
+% \end{macrocode}
% \bigskip
% The command |\text| provided by the package \pkg{amstext} will be used to
% allow the use of the command |\pion{...}| (with the standard syntax) in
@@ -3050,20 +3069,12 @@
\tl_new:N \g_@@_escape_inside_tl
% \end{macrocode}
%
-% \medskip
-% In version 4.0 of \pkg{piton}, we changed the mechanism used by \pkg{piton}
-% to search the file to load with |\PitonInputFile|. With the key
-% |old-PitonInputFile|, it's possible to keep the old behaviour but it's only
-% for backward compatibility and it will be deleted in a future version.
-% \begin{macrocode}
-\bool_new:N \l_@@_old_PitonInputFile_bool
-% \end{macrocode}
%
%
% \bigskip
% We define a set of keys for the options at load-time.
% \begin{macrocode}
-\keys_define:nn { piton / package }
+\keys_define:nn { piton }
{
footnote .bool_gset:N = \g_@@_footnote_bool ,
footnotehyper .bool_gset:N = \g_@@_footnotehyper_bool ,
@@ -3073,29 +3084,18 @@
beamer .bool_gset:N = \g_@@_beamer_bool ,
beamer .default:n = true ,
beamer .usage:n = load ,
-% \end{macrocode}
-% \medskip
-% In version 4.0 of \pkg{piton}, we changed the mechanism used by \pkg{piton}
-% to search the file to load with |\PitonInputFile|. With the key
-% |old-PitonInputFile|, it's possible to keep the old behaviour but it's only
-% for backward compatibility and it will be deleted in a future version.
-% \begin{macrocode}
- old-PitonInputFile .bool_set:N = \l_@@_old_PitonInputFile_bool ,
- old-PitonInputFile .default:n = true ,
- old-PitonInputFile .usage:n = load ,
unknown .code:n = \@@_error:n { Unknown~key~for~package }
}
% \end{macrocode}
-%
-%
%
% \begin{macrocode}
\@@_msg_new:nn { Unknown~key~for~package }
{
Unknown~key.\\
- You~have~used~the~key~'\l_keys_key_str'~but~the~only~keys~available~here~
- are~'beamer',~'footnote',~'footnotehyper'~and~'old-PitonInputFile'.~
+ You~have~used~the~key~'\l_keys_key_str'~when~loading~piton~
+ but~the~only~keys~available~here~
+ are~'beamer',~'footnote',~and~'footnotehyper'.~
Other~keys~are~available~in~\token_to_str:N \PitonOptions.\\
That~key~will~be~ignored.
}
@@ -3105,23 +3105,12 @@
% \bigskip
% We process the options provided by the user at load-time.
% \begin{macrocode}
-\ProcessKeysOptions { piton / package }
+\ProcessKeyOptions
% \end{macrocode}
%
%
% \bigskip
% \begin{macrocode}
-\msg_new:nnn { piton } { old-PitonInputFile }
- {
- Be~careful:~The~key~'old-PitonInputFile'~will~be~deleted~
- in~a~future~version~of~'piton'.
- }
-\bool_if:NT \l_@@_old_PitonInputFile_bool
- { \msg_warning:nn { piton } { old-PitonInputFile } }
-% \end{macrocode}
-%
-% \bigskip
-% \begin{macrocode}
\IfClassLoadedTF { beamer } { \bool_gset_true:N \g_@@_beamer_bool } { }
\IfPackageLoadedTF { beamerarticle } { \bool_gset_true:N \g_@@_beamer_bool } { }
\lua_now:n { piton = piton~or~{ } }
@@ -3130,8 +3119,7 @@
%
% \bigskip
% \begin{macrocode}
-\hook_gput_code:nnn { begindocument / before } { . }
- { \IfPackageLoadedTF { xcolor } { } { \usepackage { xcolor } } }
+\RequirePackage { xcolor }
% \end{macrocode}
%
%
@@ -3208,6 +3196,7 @@
piton.beamer_environments = { "uncoverenv" , "onlyenv" , "visibleenv" ,
"invisibleenv" , "alertenv" , "actionenv" }
piton.DetectedCommands = lpeg.P ( false )
+ piton.RawDetectedCommands = lpeg.P ( false )
piton.last_code = ''
piton.last_language = ''
}
@@ -4076,6 +4065,10 @@
\lua_now:n { piton.addDetectedCommands('#1') } ,
detected-commands .value_required:n = true ,
detected-commands .usage:n = preamble ,
+ raw-detected-commands .code:n =
+ \lua_now:n { piton.addRawDetectedCommands('#1') } ,
+ raw-detected-commands .value_required:n = true ,
+ raw-detected-commands .usage:n = preamble ,
detected-beamer-commands .code:n =
\lua_now:n { piton.addBeamerCommands('#1') } ,
detected-beamer-commands .value_required:n = true ,
@@ -4673,6 +4666,8 @@
\dim_zero:N \parindent
\dim_zero:N \lineskip
\cs_set_eq:NN \label \@@_label:n
+ \dim_zero:N \parskip
+ \l_@@_font_command_tl
}
% \end{macrocode}
%
@@ -4812,8 +4807,6 @@
% \begin{macrocode}
\@@_compute_left_margin:nn { CountNonEmptyLines } { ##1 }
\@@_compute_width:
- \l_@@_font_command_tl
- \dim_zero:N \parskip
\noindent
% \end{macrocode}
%
@@ -4877,7 +4870,10 @@
\char_set_catcode_other:N
\use:c { _@@_collect_ #1 :w }
}
- { #4 }
+ {
+ #4
+ \ignorespacesafterend
+ }
% \end{macrocode}
%
% \medskip
@@ -4893,6 +4889,65 @@
% \end{macrocode}
% This is the end of the definition of the command |\NewPitonEnvironment|.
%
+%
+%
+% \begin{macrocode}
+\IfFormatAtLeastTF { 2025-06-01 }
+ {
+ \tl_new:N \l_@@_body_tl
+ \cs_new_protected:Npn \@@_store_body:n #1
+ {
+ \tl_set:Nn \l_@@_body_tl { #1 }
+ \tl_set_eq:NN \ProcessedArgument \l_@@_body_tl
+ }
+ \RenewDocumentCommand { \NewPitonEnvironment } { m m m m }
+ {
+ \NewDocumentEnvironment { #1 } { #2 > { \@@_store_body:n } c }
+ {
+ \regex_replace_all:nnN { \c { obeyedline } } { \r } \l_@@_body_tl
+ \cs_set_eq:NN \PitonOptions \@@_fake_PitonOptions
+ #3
+ \@@_pre_env:
+ \int_compare:nNnT \l_@@_number_lines_start_int > \c_zero_int
+ { \int_gset:Nn \g_@@_visual_line_int
+ { \l_@@_number_lines_start_int - 1 }
+ }
+ \mode_if_vertical:TF \noindent \newline
+ \lua_now:e { piton.CountLines ( '\lua_escape:n{\l_@@_body_tl}' ) }
+ \@@_compute_left_margin:no { CountNonEmptyLines } \l_@@_body_tl
+ \@@_compute_width:
+ \noindent
+ \str_if_empty:NTF \l_@@_path_write_str
+ { \lua_now:e { piton.write = "\l_@@_write_str" } }
+ {
+ \lua_now:e
+ { piton.write = "\l_@@_path_write_str / \l_@@_write_str" }
+ }
+ \str_if_empty:NTF \l_@@_write_str
+ { \lua_now:n { piton.write = '' } }
+ {
+ \seq_if_in:NoTF \g_@@_write_seq \l_@@_write_str
+ { \lua_now:n { piton.write_mode = "a" } }
+ {
+ \lua_now:n { piton.write_mode = "w" }
+ \seq_gput_left:No \g_@@_write_seq \l_@@_write_str
+ }
+ }
+ \bool_if:NTF \l_@@_split_on_empty_lines_bool
+ { \@@_retrieve_gobble_split_parse:o }
+ { \@@_retrieve_gobble_parse:o }
+ \l_@@_body_tl
+ \bool_if:NT \l_@@_width_min_bool \@@_width_to_aux:
+ \@@_write_aux:
+ #4
+ }
+ { }
+ }
+ }
+ { }
+% \end{macrocode}
+
+%
% \bigskip
% The following function will be used when the key |split-on-empty-lines| is not
% in force. It will retrieve the first empty line, gobble the spaces at the
@@ -4899,6 +4954,7 @@
% beginning of the lines and parse the code. The argument is provided by
% curryfication.
% \begin{macrocode}
+\cs_generate_variant:Nn \@@_retrieve_gobble_parse:n { o }
\cs_new_protected:Npn \@@_retrieve_gobble_parse:n
{
\lua_now:e
@@ -4922,6 +4978,7 @@
% |gobble| is in force), then split the code at the empty lines and, eventually,
% parse the code. The argument is provided by curryfication.
% \begin{macrocode}
+\cs_generate_variant:Nn \@@_retrieve_gobble_split_parse:n { o }
\cs_new_protected:Npn \@@_retrieve_gobble_split_parse:n
{
\lua_now:e
@@ -4969,39 +5026,16 @@
\NewDocumentCommand { \PitonInputFileTF } { d < > O { } m m m }
{
\group_begin:
-% \end{macrocode}
-% In version 4.0 of \pkg{piton}, we changed the mechanism used by \pkg{piton}
-% to search the file to load with |\PitonInputFile|. With the key
-% |old-PitonInputFile|, it's possible to keep the old behaviour but it's only
-% for backward compatibility and it will be deleted in a future version.
-% \begin{macrocode}
- \bool_if:NTF \l_@@_old_PitonInputFile_bool
- {
- \bool_set_false:N \l_tmpa_bool
- \seq_map_inline:Nn \l_@@_path_seq
- {
- \str_set:Nn \l_@@_file_name_str { ##1 / #3 }
- \file_if_exist:nT { \l_@@_file_name_str }
- {
- \@@_input_file:nn { #1 } { #2 }
- \bool_set_true:N \l_tmpa_bool
- \seq_map_break:
- }
- }
- \bool_if:NTF \l_tmpa_bool { #4 } { #5 }
+ \seq_concat:NNN
+ \l_file_search_path_seq
+ \l_@@_path_seq
+ \l_file_search_path_seq
+ \file_get_full_name:nNTF { #3 } \l_@@_file_name_str
+ {
+ \@@_input_file:nn { #1 } { #2 }
+ #4
}
- {
- \seq_concat:NNN
- \l_file_search_path_seq
- \l_@@_path_seq
- \l_file_search_path_seq
- \file_get_full_name:nNTF { #3 } \l_@@_file_name_str
- {
- \@@_input_file:nn { #1 } { #2 }
- #4
- }
- { #5 }
- }
+ { #5 }
\group_end:
}
% \end{macrocode}
@@ -5091,7 +5125,6 @@
\int_compare:nNnT \g_@@_visual_line_int < \c_zero_int
{ \int_gzero:N \g_@@_visual_line_int }
\mode_if_vertical:TF \mode_leave_vertical: \newline
- \dim_zero:N \parskip % added 2025/03/03
% \end{macrocode}
% We count with Lua the number of lines of the argument. The result will be
% stored by Lua in |\l_@@_nb_lines_int|.
@@ -5103,7 +5136,6 @@
% \begin{macrocode}
\@@_compute_left_margin:no { CountNonEmptyLinesFile } \l_@@_file_name_str
\@@_compute_width:
- \l_@@_font_command_tl
\lua_now:e
{
piton.ParseFile(
@@ -5276,7 +5308,7 @@
{
String .meta:n = { String.Long = #1 , String.Short = #1 } ,
Comment.Math .tl_set:c = pitonStyle _ Comment.Math ,
- unknown .code:n =
+ unknown .code:n =
\@@_error:n { Unknown~key~for~SetPitonStyle }
}
% \end{macrocode}
@@ -5286,7 +5318,7 @@
\SetPitonStyle[OCaml]
{
TypeExpression =
- \SetPitonStyle { Identifier = \PitonStyle { Name.Type } }
+ \SetPitonStyle [ OCaml ] { Identifier = \PitonStyle { Name.Type } }
\@@_piton:n ,
}
% \end{macrocode}
@@ -5783,6 +5815,7 @@
path,~
path-write,~
prompt-background-color,~
+ raw-detected-commands,~
resume,~
show-spaces,~
show-spaces-in-strings,~
@@ -5872,8 +5905,13 @@
F = space ^ 0 * ( ( alpha ^ 1 ) / "\\%0" ) * space ^ 0
}
function piton.addDetectedCommands ( key_value )
- piton.DetectedCommands = piton.DetectedCommands + my_lpeg : match ( key_value )
+ piton.DetectedCommands
+ = piton.DetectedCommands + my_lpeg : match ( key_value )
end
+ function piton.addRawDetectedCommands ( key_value )
+ piton.RawDetectedCommands
+ = piton.RawDetectedCommands + my_lpeg : match ( key_value )
+ end
function piton.addBeamerCommands( key_value )
piton.BeamerCommands
= piton.BeamerCommands + my_lpeg : match ( key_value )
@@ -5926,6 +5964,10 @@
function sprintL3 ( s )
tex.sprint ( luatexbase.catcodetables.expl , s )
end
+local printL3
+function printL3 ( s )
+ tex.print ( luatexbase.catcodetables.expl , s )
+end
% \end{macrocode}
%
% \bigskip
@@ -6229,6 +6271,13 @@
end
% \end{macrocode}
%
+% \begin{macrocode}
+local Compute_RawDetectedCommands
+function Compute_RawDetectedCommands ( lang , braces ) return
+ Ct ( C ( piton.RawDetectedCommands * space ^ 0 * P "{" * braces * P "}" ) )
+end
+% \end{macrocode}
+%
% \bigskip
% \begin{macrocode}
local Compute_LPEG_cleaner
@@ -6796,6 +6845,7 @@
%
% \begin{macrocode}
DetectedCommands = Compute_DetectedCommands ( 'python' , braces )
+ + Compute_RawDetectedCommands ( 'python' , braces )
% \end{macrocode}
%
% \bigskip
@@ -7091,7 +7141,9 @@
if piton.beamer then
Beamer = Compute_Beamer ( 'ocaml' , braces )
end
- DetectedCommands = Compute_DetectedCommands ( 'ocaml' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'ocaml' , braces )
+ + Compute_RawDetectedCommands ( 'ocaml' , braces )
local Q
% \end{macrocode}
% Usually, the following version of the function |Q| will be used without the
@@ -7824,7 +7876,9 @@
% \end{macrocode}
%
% \begin{macrocode}
- DetectedCommands = Compute_DetectedCommands ( 'c' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'c' , braces )
+ + Compute_RawDetectedCommands ( 'c' , braces )
% \end{macrocode}
%
% \begin{macrocode}
@@ -8071,7 +8125,9 @@
% \end{macrocode}
%
% \begin{macrocode}
- DetectedCommands = Compute_DetectedCommands ( 'sql' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'sql' , braces )
+ + Compute_RawDetectedCommands ( 'sql' , braces )
% \end{macrocode}
%
% \begin{macrocode}
@@ -8246,7 +8302,9 @@
if piton.beamer then Beamer = Compute_Beamer ( 'minimal' , braces ) end
- DetectedCommands = Compute_DetectedCommands ( 'minimal' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'minimal' , braces )
+ + Compute_RawDetectedCommands ( 'minimal' , braces )
LPEG_cleaner.minimal = Compute_LPEG_cleaner ( 'minimal' , braces )
@@ -8317,7 +8375,9 @@
if piton.beamer then Beamer = Compute_Beamer ( 'verbatim' , braces ) end
- DetectedCommands = Compute_DetectedCommands ( 'verbatim' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'verbatim' , braces )
+ + Compute_RawDetectedCommands ( 'verbatim' , braces )
LPEG_cleaner.verbatim = Compute_LPEG_cleaner ( 'verbatim' , braces )
% \end{macrocode}
@@ -8696,7 +8756,10 @@
(
P " " ^ 0 * "\r"
+
- C ( ( ( 1 - P "\r" ) ^ 1 * "\r" - ( P " " ^ 0 * "\r" ) ) ^ 1 )
+ C ( ( ( 1 - P "\r" ) ^ 1 * ( P "\r" + -1 )
+ - ( P " " ^ 0 * ( P "\r" + -1 ) )
+ ) ^ 1
+ )
) ^ 0
)
) : match ( gobble ( n , code ) )
@@ -8709,14 +8772,14 @@
)
for k , v in pairs ( chunks ) do
if k > 1 then
- sprintL3 [[ \l_@@_split_separation_tl ]]
+ sprintL3 ( [[ \l_@@_split_separation_tl ]] )
end
- tex.sprint
+ tex.print
(
- [[\begin{]] .. piton.env_used_by_split .. "}\r"
+ [[\begin{]] .. piton.env_used_by_split .. "}\r"
.. v
- .. [[\end{]] .. piton.env_used_by_split .. "}"
- )
+ .. [[\end{]] .. piton.env_used_by_split .. "}%\r"
+ )
end
sprintL3 [[ \endgroup ]]
end
@@ -9344,7 +9407,9 @@
local braces = Compute_braces ( long_string )
if piton.beamer then Beamer = Compute_Beamer ( lang , braces ) end
- DetectedCommands = Compute_DetectedCommands ( lang , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( lang , braces )
+ + Compute_RawDetectedCommands ( lang , braces )
LPEG_cleaner[lang] = Compute_LPEG_cleaner ( lang , braces )
% \end{macrocode}
@@ -9581,6 +9646,13 @@
%
% \verb|https://github.com/fpantigny/piton|
%
+%
+% \subsection*{Changes between versions 4.2 and 4.3}
+%
+% New key |raw-detected-commands|
+%
+% The key |old-PitonInputFile| has been deleted.
+%
% \subsection*{Changes between versions 4.1 and 4.2}
%
% New key |break-numbers-anywhere|.
Modified: trunk/Master/texmf-dist/tex/lualatex/piton/piton.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/piton/piton.lua 2025-03-25 19:45:50 UTC (rev 74740)
+++ trunk/Master/texmf-dist/tex/lualatex/piton/piton.lua 2025-03-25 19:46:00 UTC (rev 74741)
@@ -20,7 +20,7 @@
-- -------------------------------------------
--
-- This file is part of the LuaLaTeX package 'piton'.
-piton_version = "4.2c" -- 2025/03/04
+piton_version = "4.3" -- 2025/03/25
@@ -32,6 +32,10 @@
function sprintL3 ( s )
tex.sprint ( luatexbase.catcodetables.expl , s )
end
+local printL3
+function printL3 ( s )
+ tex.print ( luatexbase.catcodetables.expl , s )
+end
local P, S, V, C, Ct, Cc = lpeg.P, lpeg.S, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Cc
local Cs , Cg , Cmt , Cb = lpeg.Cs, lpeg.Cg , lpeg.Cmt , lpeg.Cb
local B , R = lpeg.B , lpeg.R
@@ -150,6 +154,10 @@
* P "}"
* Ct ( Cc "Close" )
end
+local Compute_RawDetectedCommands
+function Compute_RawDetectedCommands ( lang , braces ) return
+ Ct ( C ( piton.RawDetectedCommands * space ^ 0 * P "{" * braces * P "}" ) )
+end
local Compute_LPEG_cleaner
function Compute_LPEG_cleaner ( lang , braces ) return
Ct ( ( piton.DetectedCommands * "{"
@@ -431,6 +439,7 @@
)
if piton.beamer then Beamer = Compute_Beamer ( 'python' , braces ) end
DetectedCommands = Compute_DetectedCommands ( 'python' , braces )
+ + Compute_RawDetectedCommands ( 'python' , braces )
LPEG_cleaner.python = Compute_LPEG_cleaner ( 'python' , braces )
local SingleLongString =
WithStyle ( 'String.Long.Internal' ,
@@ -589,7 +598,9 @@
if piton.beamer then
Beamer = Compute_Beamer ( 'ocaml' , braces )
end
- DetectedCommands = Compute_DetectedCommands ( 'ocaml' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'ocaml' , braces )
+ + Compute_RawDetectedCommands ( 'ocaml' , braces )
local Q
function Q ( pattern, strict )
if strict ~= nil then
@@ -1006,7 +1017,9 @@
)
local braces = Compute_braces ( "\"" * ( 1 - S "\"" ) ^ 0 * "\"" )
if piton.beamer then Beamer = Compute_Beamer ( 'c' , braces ) end
- DetectedCommands = Compute_DetectedCommands ( 'c' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'c' , braces )
+ + Compute_RawDetectedCommands ( 'c' , braces )
LPEG_cleaner.c = Compute_LPEG_cleaner ( 'c' , braces )
local Preproc = K ( 'Preproc' , "#" * ( 1 - P "\r" ) ^ 0 ) * ( EOL + -1 )
local Comment =
@@ -1132,7 +1145,9 @@
local String = K ( 'String.Long.Internal' , "'" * ( 1 - P "'" ) ^ 1 * "'" )
local braces = Compute_braces ( "'" * ( 1 - P "'" ) ^ 1 * "'" )
if piton.beamer then Beamer = Compute_Beamer ( 'sql' , braces ) end
- DetectedCommands = Compute_DetectedCommands ( 'sql' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'sql' , braces )
+ + Compute_RawDetectedCommands ( 'sql' , braces )
LPEG_cleaner.sql = Compute_LPEG_cleaner ( 'sql' , braces )
local Comment =
WithStyle ( 'Comment' ,
@@ -1241,7 +1256,9 @@
if piton.beamer then Beamer = Compute_Beamer ( 'minimal' , braces ) end
- DetectedCommands = Compute_DetectedCommands ( 'minimal' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'minimal' , braces )
+ + Compute_RawDetectedCommands ( 'minimal' , braces )
LPEG_cleaner.minimal = Compute_LPEG_cleaner ( 'minimal' , braces )
@@ -1288,7 +1305,9 @@
if piton.beamer then Beamer = Compute_Beamer ( 'verbatim' , braces ) end
- DetectedCommands = Compute_DetectedCommands ( 'verbatim' , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( 'verbatim' , braces )
+ + Compute_RawDetectedCommands ( 'verbatim' , braces )
LPEG_cleaner.verbatim = Compute_LPEG_cleaner ( 'verbatim' , braces )
local lpeg_central = 1 - S " \\\r"
@@ -1493,7 +1512,10 @@
(
P " " ^ 0 * "\r"
+
- C ( ( ( 1 - P "\r" ) ^ 1 * "\r" - ( P " " ^ 0 * "\r" ) ) ^ 1 )
+ C ( ( ( 1 - P "\r" ) ^ 1 * ( P "\r" + -1 )
+ - ( P " " ^ 0 * ( P "\r" + -1 ) )
+ ) ^ 1
+ )
) ^ 0
)
) : match ( gobble ( n , code ) )
@@ -1506,13 +1528,13 @@
)
for k , v in pairs ( chunks ) do
if k > 1 then
- sprintL3 [[ \l__piton_split_separation_tl ]]
+ sprintL3 ( [[ \l__piton_split_separation_tl ]] )
end
- tex.sprint
+ tex.print
(
[[\begin{]] .. piton.env_used_by_split .. "}\r"
.. v
- .. [[\end{]] .. piton.env_used_by_split .. "}"
+ .. [[\end{]] .. piton.env_used_by_split .. "}%\r"
)
end
sprintL3 [[ \endgroup ]]
@@ -1861,7 +1883,9 @@
local braces = Compute_braces ( long_string )
if piton.beamer then Beamer = Compute_Beamer ( lang , braces ) end
- DetectedCommands = Compute_DetectedCommands ( lang , braces )
+ DetectedCommands =
+ Compute_DetectedCommands ( lang , braces )
+ + Compute_RawDetectedCommands ( lang , braces )
LPEG_cleaner[lang] = Compute_LPEG_cleaner ( lang , braces )
local CommentDelim = P ( false )
Modified: trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty 2025-03-25 19:45:50 UTC (rev 74740)
+++ trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty 2025-03-25 19:46:00 UTC (rev 74741)
@@ -19,8 +19,8 @@
%% LaTeX version 2005/12/01 or later.
%% -------------------------------------------
%%
-\def\PitonFileVersion{4.2c}
-\def\PitonFileDate{2025/03/04}
+\def\PitonFileVersion{4.3}
+\def\PitonFileDate{2025/03/25}
@@ -27,12 +27,20 @@
\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{l3keys2e}
\ProvidesExplPackage
{piton}
{\PitonFileDate}
{\PitonFileVersion}
{Highlight informatic listings with LPEG on LuaLaTeX}
+\msg_new:nnn { piton } { latex-too-old }
+ {
+ Your~LaTeX~release~is~too~old. \\
+ You~need~at~least~a~the~version~of~2023-11-01
+ }
+\IfFormatAtLeastTF
+ { 2023-11-01 }
+ { }
+ { \msg_fatal:nn { piton } { latex-too-old } }
\RequirePackage { amstext }
\cs_new_protected:Npn \__piton_error:n { \msg_error:nn { piton } }
\cs_new_protected:Npn \__piton_warning:n { \msg_warning:nn { piton } }
@@ -90,8 +98,7 @@
\bool_new:N \g__piton_math_comments_bool
\bool_new:N \g__piton_beamer_bool
\tl_new:N \g__piton_escape_inside_tl
-\bool_new:N \l__piton_old_PitonInputFile_bool
-\keys_define:nn { piton / package }
+\keys_define:nn { piton }
{
footnote .bool_gset:N = \g__piton_footnote_bool ,
footnotehyper .bool_gset:N = \g__piton_footnotehyper_bool ,
@@ -101,9 +108,6 @@
beamer .bool_gset:N = \g__piton_beamer_bool ,
beamer .default:n = true ,
beamer .usage:n = load ,
- old-PitonInputFile .bool_set:N = \l__piton_old_PitonInputFile_bool ,
- old-PitonInputFile .default:n = true ,
- old-PitonInputFile .usage:n = load ,
unknown .code:n = \__piton_error:n { Unknown~key~for~package }
}
@@ -110,25 +114,18 @@
\__piton_msg_new:nn { Unknown~key~for~package }
{
Unknown~key.\\
- You~have~used~the~key~'\l_keys_key_str'~but~the~only~keys~available~here~
- are~'beamer',~'footnote',~'footnotehyper'~and~'old-PitonInputFile'.~
+ You~have~used~the~key~'\l_keys_key_str'~when~loading~piton~
+ but~the~only~keys~available~here~
+ are~'beamer',~'footnote',~and~'footnotehyper'.~
Other~keys~are~available~in~\token_to_str:N \PitonOptions.\\
That~key~will~be~ignored.
}
-\ProcessKeysOptions { piton / package }
-\msg_new:nnn { piton } { old-PitonInputFile }
- {
- Be~careful:~The~key~'old-PitonInputFile'~will~be~deleted~
- in~a~future~version~of~'piton'.
- }
-\bool_if:NT \l__piton_old_PitonInputFile_bool
- { \msg_warning:nn { piton } { old-PitonInputFile } }
+\ProcessKeyOptions
\IfClassLoadedTF { beamer } { \bool_gset_true:N \g__piton_beamer_bool } { }
\IfPackageLoadedTF { beamerarticle } { \bool_gset_true:N \g__piton_beamer_bool } { }
\lua_now:n { piton = piton~or~{ } }
\bool_if:NT \g__piton_beamer_bool { \lua_now:n { piton.beamer = true } }
-\hook_gput_code:nnn { begindocument / before } { . }
- { \IfPackageLoadedTF { xcolor } { } { \usepackage { xcolor } } }
+\RequirePackage { xcolor }
\__piton_msg_new:nn { footnote~with~footnotehyper~package }
{
Footnote~forbidden.\\
@@ -176,6 +173,7 @@
piton.beamer_environments = { "uncoverenv" , "onlyenv" , "visibleenv" ,
"invisibleenv" , "alertenv" , "actionenv" }
piton.DetectedCommands = lpeg.P ( false )
+ piton.RawDetectedCommands = lpeg.P ( false )
piton.last_code = ''
piton.last_language = ''
}
@@ -534,6 +532,10 @@
\lua_now:n { piton.addDetectedCommands('#1') } ,
detected-commands .value_required:n = true ,
detected-commands .usage:n = preamble ,
+ raw-detected-commands .code:n =
+ \lua_now:n { piton.addRawDetectedCommands('#1') } ,
+ raw-detected-commands .value_required:n = true ,
+ raw-detected-commands .usage:n = preamble ,
detected-beamer-commands .code:n =
\lua_now:n { piton.addBeamerCommands('#1') } ,
detected-beamer-commands .value_required:n = true ,
@@ -908,6 +910,8 @@
\dim_zero:N \parindent
\dim_zero:N \lineskip
\cs_set_eq:NN \label \__piton_label:n
+ \dim_zero:N \parskip
+ \l__piton_font_command_tl
}
\cs_generate_variant:Nn \__piton_compute_left_margin:nn { n o }
\cs_new_protected:Npn \__piton_compute_left_margin:nn #1 #2
@@ -975,8 +979,6 @@
\lua_now:e { piton.CountLines ( '\lua_escape:n{##1}' ) }
\__piton_compute_left_margin:nn { CountNonEmptyLines } { ##1 }
\__piton_compute_width:
- \l__piton_font_command_tl
- \dim_zero:N \parskip
\noindent
\str_if_empty:NTF \l__piton_path_write_str
{ \lua_now:e { piton.write = "\l__piton_write_str" } }
@@ -1015,9 +1017,67 @@
\char_set_catcode_other:N
\use:c { __piton_collect_ #1 :w }
}
- { #4 }
+ {
+ #4
+ \ignorespacesafterend
+ }
\AddToHook { env / #1 / begin } { \char_set_catcode_other:N \^^M }
}
+\IfFormatAtLeastTF { 2025-06-01 }
+ {
+ \tl_new:N \l__piton_body_tl
+ \cs_new_protected:Npn \__piton_store_body:n #1
+ {
+ \tl_set:Nn \l__piton_body_tl { #1 }
+ \tl_set_eq:NN \ProcessedArgument \l__piton_body_tl
+ }
+ \RenewDocumentCommand { \NewPitonEnvironment } { m m m m }
+ {
+ \NewDocumentEnvironment { #1 } { #2 > { \__piton_store_body:n } c }
+ {
+ \regex_replace_all:nnN { \c { obeyedline } } { \r } \l__piton_body_tl
+ \cs_set_eq:NN \PitonOptions \__piton_fake_PitonOptions
+ #3
+ \__piton_pre_env:
+ \int_compare:nNnT \l__piton_number_lines_start_int > \c_zero_int
+ { \int_gset:Nn \g__piton_visual_line_int
+ { \l__piton_number_lines_start_int - 1 }
+ }
+ \mode_if_vertical:TF \noindent \newline
+ \lua_now:e { piton.CountLines ( '\lua_escape:n{\l__piton_body_tl}' ) }
+ \__piton_compute_left_margin:no { CountNonEmptyLines } \l__piton_body_tl
+ \__piton_compute_width:
+ \noindent
+ \str_if_empty:NTF \l__piton_path_write_str
+ { \lua_now:e { piton.write = "\l__piton_write_str" } }
+ {
+ \lua_now:e
+ { piton.write = "\l__piton_path_write_str / \l__piton_write_str" }
+ }
+ \str_if_empty:NTF \l__piton_write_str
+ { \lua_now:n { piton.write = '' } }
+ {
+ \seq_if_in:NoTF \g__piton_write_seq \l__piton_write_str
+ { \lua_now:n { piton.write_mode = "a" } }
+ {
+ \lua_now:n { piton.write_mode = "w" }
+ \seq_gput_left:No \g__piton_write_seq \l__piton_write_str
+ }
+ }
+ \bool_if:NTF \l__piton_split_on_empty_lines_bool
+ { \__piton_retrieve_gobble_split_parse:o }
+ { \__piton_retrieve_gobble_parse:o }
+ \l__piton_body_tl
+ \bool_if:NT \l__piton_width_min_bool \__piton_width_to_aux:
+ \__piton_write_aux:
+ #4
+ }
+ { }
+ }
+ }
+ { }
+
+\cs_generate_variant:Nn \__piton_retrieve_gobble_parse:n { o }
\cs_new_protected:Npn \__piton_retrieve_gobble_parse:n
{
\lua_now:e
@@ -1033,6 +1093,7 @@
)
}
}
+\cs_generate_variant:Nn \__piton_retrieve_gobble_split_parse:n { o }
\cs_new_protected:Npn \__piton_retrieve_gobble_split_parse:n
{
\lua_now:e
@@ -1065,33 +1126,16 @@
\NewDocumentCommand { \PitonInputFileTF } { d < > O { } m m m }
{
\group_begin:
- \bool_if:NTF \l__piton_old_PitonInputFile_bool
+ \seq_concat:NNN
+ \l_file_search_path_seq
+ \l__piton_path_seq
+ \l_file_search_path_seq
+ \file_get_full_name:nNTF { #3 } \l__piton_file_name_str
{
- \bool_set_false:N \l_tmpa_bool
- \seq_map_inline:Nn \l__piton_path_seq
- {
- \str_set:Nn \l__piton_file_name_str { ##1 / #3 }
- \file_if_exist:nT { \l__piton_file_name_str }
- {
- \__piton_input_file:nn { #1 } { #2 }
- \bool_set_true:N \l_tmpa_bool
- \seq_map_break:
- }
- }
- \bool_if:NTF \l_tmpa_bool { #4 } { #5 }
+ \__piton_input_file:nn { #1 } { #2 }
+ #4
}
- {
- \seq_concat:NNN
- \l_file_search_path_seq
- \l__piton_path_seq
- \l_file_search_path_seq
- \file_get_full_name:nNTF { #3 } \l__piton_file_name_str
- {
- \__piton_input_file:nn { #1 } { #2 }
- #4
- }
- { #5 }
- }
+ { #5 }
\group_end:
}
\cs_new_protected:Npn \__piton_unknown_file:n #1
@@ -1156,11 +1200,9 @@
\int_compare:nNnT \g__piton_visual_line_int < \c_zero_int
{ \int_gzero:N \g__piton_visual_line_int }
\mode_if_vertical:TF \mode_leave_vertical: \newline
- \dim_zero:N \parskip % added 2025/03/03
\lua_now:e { piton.CountLinesFile ( '\l__piton_file_name_str' ) }
\__piton_compute_left_margin:no { CountNonEmptyLinesFile } \l__piton_file_name_str
\__piton_compute_width:
- \l__piton_font_command_tl
\lua_now:e
{
piton.ParseFile(
@@ -1279,13 +1321,13 @@
{
String .meta:n = { String.Long = #1 , String.Short = #1 } ,
Comment.Math .tl_set:c = pitonStyle _ Comment.Math ,
- unknown .code:n =
+ unknown .code:n =
\__piton_error:n { Unknown~key~for~SetPitonStyle }
}
\SetPitonStyle[OCaml]
{
TypeExpression =
- \SetPitonStyle { Identifier = \PitonStyle { Name.Type } }
+ \SetPitonStyle [ OCaml ] { Identifier = \PitonStyle { Name.Type } }
\__piton_piton:n ,
}
\clist_gput_left:Nn \g__piton_styles_clist { String }
@@ -1600,6 +1642,7 @@
path,~
path-write,~
prompt-background-color,~
+ raw-detected-commands,~
resume,~
show-spaces,~
show-spaces-in-strings,~
@@ -1655,8 +1698,13 @@
F = space ^ 0 * ( ( alpha ^ 1 ) / "\\%0" ) * space ^ 0
}
function piton.addDetectedCommands ( key_value )
- piton.DetectedCommands = piton.DetectedCommands + my_lpeg : match ( key_value )
+ piton.DetectedCommands
+ = piton.DetectedCommands + my_lpeg : match ( key_value )
end
+ function piton.addRawDetectedCommands ( key_value )
+ piton.RawDetectedCommands
+ = piton.RawDetectedCommands + my_lpeg : match ( key_value )
+ end
function piton.addBeamerCommands( key_value )
piton.BeamerCommands
= piton.BeamerCommands + my_lpeg : match ( key_value )
More information about the tex-live-commits
mailing list.