texlive[68794] Master/texmf-dist: piton (3nov23)

commits+karl at tug.org commits+karl at tug.org
Thu Nov 9 23:26:06 CET 2023


Revision: 68794
          https://tug.org/svn/texlive?view=revision&revision=68794
Author:   karl
Date:     2023-11-09 23:26:05 +0100 (Thu, 09 Nov 2023)
Log Message:
-----------
piton (3nov23)

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.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	2023-11-09 22:25:54 UTC (rev 68793)
+++ trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.tex	2023-11-09 22:26:05 UTC (rev 68794)
@@ -1155,7 +1155,7 @@
 \fvset{commandchars=\~\#\+,formatcom=\color{gray}}
 \begin{Verbatim}
 \makeatletter
-~emphase#\let\Jaune\@highLight+
+~emphase#\NewCommandCopy{\Jaune}{\@highLight}+
 \makeatother
 \end{Verbatim}
 \endgroup
@@ -1171,7 +1171,7 @@
 \end{Verbatim}
 
 \makeatletter
-\let\Jaune\@highLight
+\NewCommandCopy{\Jaune}{\@highLight}
 \makeatother
 
 
@@ -1716,6 +1716,11 @@
 \end{Verbatim}
 
 
+Dans ce réglage, de nombreuses valeurs fournies aux clés sont vides, ce qui signifie que le style correspondant
+n'insèrera aucune instruction de formatage (l'élément sera composé dans la couleur standard, le plus souvent, en noir,
+etc.). Ces entrées avec valeurs nulles sont néanmoins nécessaires car la valeur initiale de ces styles dans
+\pkg{piton} n'est \emph{pas} vide.
+
 \begingroup
 
 

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	2023-11-09 22:25:54 UTC (rev 68793)
+++ trunk/Master/texmf-dist/source/lualatex/piton/piton.dtx	2023-11-09 22:26:05 UTC (rev 68794)
@@ -1,6 +1,7 @@
-%  \iffalse -*- coding: utf-8 ; -*- \fi \iffalse meta-comment
+% \iffalse -*- coding: utf-8 ; -*- \fi 
+% \iffalse meta-comment
 %
-% Copyright (C) 2023 by F. Pantigny
+% Copyright (C) 2022-2023 by F. Pantigny
 % -----------------------------------
 %
 % This file may be distributed and/or modified under the
@@ -43,18 +44,18 @@
 %
 %<@@=piton>
 %<*STY>
-\def\myfileversion{2.2a}
-\def\myfiledate{2023/09/17}
+\def\myfileversion{2.2b}
+\def\myfiledate{2023/11/03}
 %</STY>
 %<*driver>
-\def\myfileversion{2.2a}
-\def\myfiledate{2023/09/17}
+\def\myfileversion{2.2b}
+\def\myfiledate{2023/11/03}
 \documentclass{l3doc}
 \usepackage{geometry}
 \geometry{left=2.8cm,right=2.8cm,top=2.5cm,bottom=2.5cm,papersize={21cm,29.7cm}}
 \usepackage{fontspec}
 \usepackage[dvipsnames]{xcolor}
-\usepackage{caption,tabularx,tcolorbox,luacolor,lua-ul}
+\usepackage{caption,tabularx,tcolorbox,luacolor,lua-ul,upquote}
 \def\emphase{\bgroup\color{RoyalPurple}\let\next=}
 \fvset{commandchars=\~\#\@,formatcom=\color{gray}}
 \captionsetup{labelfont = bf}
@@ -1229,7 +1230,7 @@
 % \fvset{commandchars=\~\#\+,formatcom=\color{gray}}
 % \begin{Verbatim}
 % \makeatletter
-% ~emphase#\let\Yellow\@highLight+
+% ~emphase#\NewCommandCopy{\Yellow}{\@highLight}+
 % \makeatother
 % \end{Verbatim}
 % \endgroup
@@ -1245,7 +1246,7 @@
 % \end{Verbatim}
 %
 % \makeatletter
-% \let\Yellow\@highLight
+% \NewCommandCopy{\Yellow}{\@highLight}
 % \makeatother
 %
 %
@@ -1817,6 +1818,11 @@
 %   }
 % \end{Verbatim}
 %
+% In that tuning, many values given to the keys are empty: that means that the
+% corresponding style won't insert any formating instruction (the element will
+% be composed in the standard color, usually in black, etc.). Nevertheless,
+% those entries are mandatory because the initial value of those keys in
+% \pkg{piton} is \emph{not} empty.
 %
 % \begingroup
 %
@@ -2562,7 +2568,7 @@
 % 
 % \medskip
 %    \begin{macrocode}
-\tl_new:N \l_@@_path_tl
+\str_new:N \l_@@_path_str
 %    \end{macrocode}
 % 
 % 
@@ -2647,7 +2653,7 @@
 % \medskip
 % The argument of |\PitonInputFile|.
 %    \begin{macrocode}
-\tl_new:N \l_@@_file_name_tl 
+\str_new:N \l_@@_file_name_str 
 %    \end{macrocode}
 %
 % \medskip
@@ -2935,7 +2941,6 @@
       }
     \l_tmpa_tl 
   }
-\cs_generate_variant:Nn \@@_replace_spaces:n { x } 
 %    \end{macrocode}
 % 
 % \bigskip
@@ -3301,7 +3306,7 @@
     language         .code:n = 
       \str_set:Nx \l_@@_language_str { \str_lowercase:n { #1 } } , 
     language         .value_required:n  = true ,
-    path             .tl_set:N          = \l_@@_path_tl ,
+    path             .str_set:N         = \l_@@_path_str ,
     path             .value_required:n  = true , 
     gobble           .int_set:N         = \l_@@_gobble_int , 
     gobble           .value_required:n  = true ,
@@ -3926,14 +3931,14 @@
 \NewDocumentCommand { \PitonInputFile } { d < > O { } m }
   {
     \group_begin:
-    \tl_if_empty:NTF \l_@@_path_tl
-      { \tl_set:Nn \l_@@_file_name_tl { #3 } } 
+    \tl_if_empty:NTF \l_@@_path_str
+      { \str_set:Nn \l_@@_file_name_str { #3 } } 
       { 
-        \tl_set_eq:NN \l_@@_file_name_tl \l_@@_path_tl 
-        \tl_put_right:Nn \l_@@_file_name_tl { / }
-        \tl_put_right:Nn \l_@@_file_name_tl { #3 }
+        \str_set_eq:NN \l_@@_file_name_str \l_@@_path_str 
+        \str_put_right:Nn \l_@@_file_name_str { / }
+        \str_put_right:Nn \l_@@_file_name_str { #3 }
       }
-    \exp_args:NV \file_if_exist:nTF \l_@@_file_name_tl 
+    \exp_args:NV \file_if_exist:nTF \l_@@_file_name_str 
       { \@@_input_file:nn { #1 } { #2 } }
       { \msg_error:nnn { piton } { Unknown~file } { #3 } } 
     \group_end:
@@ -3940,7 +3945,7 @@
   }
 %    \end{macrocode}
 %
-% The following command uses as implicit argument the name of the file in |\l_@@_file_name_tl|.
+% The following command uses as implicit argument the name of the file in |\l_@@_file_name_str|.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_input_file:nn #1 #2 
   {
@@ -4009,12 +4014,12 @@
 % stored by Lua in |\l_@@_nb_lines_int|. That information will be used to allow
 % or disallow page breaks.
 %    \begin{macrocode}
-      \lua_now:e { piton.CountLinesFile('\l_@@_file_name_tl') } 
+      \lua_now:e { piton.CountLinesFile('\l_@@_file_name_str') } 
 %    \end{macrocode}
 % The first argument of the following function is the name of the Lua function
 % that will be applied to the second argument in order to count the number of lines.
 %    \begin{macrocode}
-      \@@_compute_left_margin:nV { CountNonEmptyLinesFile } \l_@@_file_name_tl
+      \@@_compute_left_margin:nV { CountNonEmptyLinesFile } \l_@@_file_name_str
       \@@_compute_width:
       \ttfamily
       \bool_if:NT \g_@@_footnote_bool { \begin { savenotes } } 
@@ -4023,7 +4028,7 @@
         { 
           piton.ParseFile(
            '\l_@@_language_str' ,
-           '\l_@@_file_name_tl' ,
+           '\l_@@_file_name_str' ,
            \int_use:N \l_@@_first_line_int , 
            \int_use:N \l_@@_last_line_int ) 
         } 
@@ -4065,7 +4070,7 @@
     \lua_now:e
       { 
         piton.ComputeRange
-          ( '\l_tmpa_str' , '\l_tmpb_str' , '\l_@@_file_name_tl' ) 
+          ( '\l_tmpa_str' , '\l_tmpb_str' , '\l_@@_file_name_str' ) 
       } 
   }
 %    \end{macrocode}
@@ -4353,7 +4358,7 @@
 % \bigskip
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_clear_functions_i:n #1
-  { \exp_args:Nx \@@_clear_functions_ii:n { \str_lowercase:n { #1 } } }
+  { \exp_args:Ne \@@_clear_functions_ii:n { \str_lowercase:n { #1 } } }
 %    \end{macrocode}
 % 
 % The following command clears the list of the user-defined functions for the
@@ -4459,7 +4464,7 @@
     Incompatible~keys.\\
     You~can't~specify~the~range~of~lines~to~include~by~using~both~
     markers~and~explicit~number~of~lines.\\
-    Your~whole~file~'\l_@@_file_name_tl'~will~be~included.
+    Your~whole~file~'\l_@@_file_name_str'~will~be~included.
   }
 %    \end{macrocode}
 % 
@@ -4483,7 +4488,7 @@
     Marker~not~found.\\
     The~range~'\l_@@_begin_range_str'~provided~to~the~  
     command~\token_to_str:N \PitonInputFile\ has~not~been~found.~
-    The~whole~file~'\l_@@_file_name_tl'~will~be~inserted.
+    The~whole~file~'\l_@@_file_name_str'~will~be~inserted.
   }
 %    \end{macrocode}
 %
@@ -4494,7 +4499,7 @@
     Marker~not~found.\\
     The~marker~of~end~of~the~range~'\l_@@_end_range_str'~
     provided~to~the~command~\token_to_str:N \PitonInputFile\ 
-    has~not~been~found.~The~file~'\l_@@_file_name_tl'~will~
+    has~not~been~found.~The~file~'\l_@@_file_name_str'~will~
     be~inserted~till~the~end.
   }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty	2023-11-09 22:25:54 UTC (rev 68793)
+++ trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty	2023-11-09 22:26:05 UTC (rev 68794)
@@ -18,8 +18,8 @@
 %% and version 1.3 or later is part of all distributions of
 %% LaTeX version 2005/12/01 or later.
 %% 
-\def\myfileversion{2.2a}
-\def\myfiledate{2023/09/17}
+\def\myfileversion{2.2b}
+\def\myfiledate{2023/11/03}
 
 
 \NeedsTeXFormat{LaTeX2e}
@@ -153,7 +153,7 @@
 \lua_now:n { piton = piton~or { } }
 \str_new:N \l__piton_language_str
 \str_set:Nn \l__piton_language_str { python }
-\tl_new:N \l__piton_path_tl
+\str_new:N \l__piton_path_str
 \bool_new:N \l__piton_in_PitonOptions_bool
 \bool_new:N \l__piton_in_PitonInputFile_bool
 \bool_new:N \g__piton_in_document_bool
@@ -167,7 +167,7 @@
 \tl_new:N \l__piton_prompt_bg_color_tl
 \str_new:N \l__piton_begin_range_str
 \str_new:N \l__piton_end_range_str
-\tl_new:N \l__piton_file_name_tl
+\str_new:N \l__piton_file_name_str
 \int_new:N \g__piton_env_int
 \bool_new:N \l__piton_show_spaces_bool
 \bool_new:N \l__piton_break_lines_in_Piton_bool
@@ -253,7 +253,6 @@
       }
     \l_tmpa_tl
   }
-\cs_generate_variant:Nn \__piton_replace_spaces:n { x }
 \cs_set_protected:Npn \__piton_begin_line: #1 \__piton_end_line:
   {
     \group_begin:
@@ -501,7 +500,7 @@
     language         .code:n =
       \str_set:Nx \l__piton_language_str { \str_lowercase:n { #1 } } ,
     language         .value_required:n  = true ,
-    path             .tl_set:N          = \l__piton_path_tl ,
+    path             .str_set:N         = \l__piton_path_str ,
     path             .value_required:n  = true ,
     gobble           .int_set:N         = \l__piton_gobble_int ,
     gobble           .value_required:n  = true ,
@@ -911,14 +910,14 @@
 \NewDocumentCommand { \PitonInputFile } { d < > O { } m }
   {
     \group_begin:
-    \tl_if_empty:NTF \l__piton_path_tl
-      { \tl_set:Nn \l__piton_file_name_tl { #3 } }
+    \tl_if_empty:NTF \l__piton_path_str
+      { \str_set:Nn \l__piton_file_name_str { #3 } }
       {
-        \tl_set_eq:NN \l__piton_file_name_tl \l__piton_path_tl
-        \tl_put_right:Nn \l__piton_file_name_tl { / }
-        \tl_put_right:Nn \l__piton_file_name_tl { #3 }
+        \str_set_eq:NN \l__piton_file_name_str \l__piton_path_str
+        \str_put_right:Nn \l__piton_file_name_str { / }
+        \str_put_right:Nn \l__piton_file_name_str { #3 }
       }
-    \exp_args:NV \file_if_exist:nTF \l__piton_file_name_tl
+    \exp_args:NV \file_if_exist:nTF \l__piton_file_name_str
       { \__piton_input_file:nn { #1 } { #2 } }
       { \msg_error:nnn { piton } { Unknown~file } { #3 } }
     \group_end:
@@ -976,8 +975,8 @@
       \int_compare:nNnT \g__piton_visual_line_int < 0
         { \int_gzero:N \g__piton_visual_line_int  }
       \mode_if_vertical:TF \mode_leave_vertical: \newline
-      \lua_now:e { piton.CountLinesFile('\l__piton_file_name_tl') }
-      \__piton_compute_left_margin:nV { CountNonEmptyLinesFile } \l__piton_file_name_tl
+      \lua_now:e { piton.CountLinesFile('\l__piton_file_name_str') }
+      \__piton_compute_left_margin:nV { CountNonEmptyLinesFile } \l__piton_file_name_str
       \__piton_compute_width:
       \ttfamily
       \bool_if:NT \g__piton_footnote_bool { \begin { savenotes } }
@@ -986,7 +985,7 @@
         {
           piton.ParseFile(
            '\l__piton_language_str' ,
-           '\l__piton_file_name_tl' ,
+           '\l__piton_file_name_str' ,
            \int_use:N \l__piton_first_line_int ,
            \int_use:N \l__piton_last_line_int )
         }
@@ -1007,7 +1006,7 @@
     \lua_now:e
       {
         piton.ComputeRange
-          ( '\l_tmpa_str' , '\l_tmpb_str' , '\l__piton_file_name_tl' )
+          ( '\l_tmpa_str' , '\l_tmpb_str' , '\l__piton_file_name_str' )
       }
   }
 \NewDocumentCommand { \PitonStyle } { m }
@@ -1177,7 +1176,7 @@
       { \seq_gremove_all:Nn \g__piton_languages_seq { ##1 } }
   }
 \cs_new_protected:Npn \__piton_clear_functions_i:n #1
-  { \exp_args:Nx \__piton_clear_functions_ii:n { \str_lowercase:n { #1 } } }
+  { \exp_args:Ne \__piton_clear_functions_ii:n { \str_lowercase:n { #1 } } }
 \cs_new_protected:Npn \__piton_clear_functions_ii:n #1
   {
     \seq_if_exist:cT { g__piton_functions _ #1 _ seq }
@@ -1243,7 +1242,7 @@
     Incompatible~keys.\\
     You~can't~specify~the~range~of~lines~to~include~by~using~both~
     markers~and~explicit~number~of~lines.\\
-    Your~whole~file~'\l__piton_file_name_tl'~will~be~included.
+    Your~whole~file~'\l__piton_file_name_str'~will~be~included.
   }
 \__piton_msg_new:nn { syntax~error }
   {
@@ -1257,7 +1256,7 @@
     Marker~not~found.\\
     The~range~'\l__piton_begin_range_str'~provided~to~the~
     command~\token_to_str:N \PitonInputFile\ has~not~been~found.~
-    The~whole~file~'\l__piton_file_name_tl'~will~be~inserted.
+    The~whole~file~'\l__piton_file_name_str'~will~be~inserted.
   }
 \__piton_msg_new:nn { end~marker~not~found }
   {
@@ -1264,7 +1263,7 @@
     Marker~not~found.\\
     The~marker~of~end~of~the~range~'\l__piton_end_range_str'~
     provided~to~the~command~\token_to_str:N \PitonInputFile\
-    has~not~been~found.~The~file~'\l__piton_file_name_tl'~will~
+    has~not~been~found.~The~file~'\l__piton_file_name_str'~will~
     be~inserted~till~the~end.
   }
 \NewDocumentCommand \PitonBeginMarkerNotFound { }



More information about the tex-live-commits mailing list.