summaryrefslogtreecommitdiff
path: root/macros/luatex/latex/piton/piton.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-04 03:02:41 +0000
committerNorbert Preining <norbert@preining.info>2023-11-04 03:02:41 +0000
commit85065bdead032a07c9a7b37784d07bced1f9d9c1 (patch)
treec8bb68803a33de87093e437b7b90cb1f329f6653 /macros/luatex/latex/piton/piton.dtx
parent1e464deefd235880a2fac2390e896bfd2b523151 (diff)
CTAN sync 202311040302
Diffstat (limited to 'macros/luatex/latex/piton/piton.dtx')
-rw-r--r--macros/luatex/latex/piton/piton.dtx61
1 files changed, 33 insertions, 28 deletions
diff --git a/macros/luatex/latex/piton/piton.dtx b/macros/luatex/latex/piton/piton.dtx
index 1e8b212c99..9747b1f5ea 100644
--- a/macros/luatex/latex/piton/piton.dtx
+++ b/macros/luatex/latex/piton/piton.dtx
@@ -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 @@ version 2005/12/01 or later.
%
%<@@=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 @@ version 2005/12/01 or later.
% \fvset{commandchars=\~\#\+,formatcom=\color{gray}}
% \begin{Verbatim}
% \makeatletter
-% ~emphase#\let\Yellow\@highLight+
+% ~emphase#\NewCommandCopy{\Yellow}{\@highLight}+
% \makeatother
% \end{Verbatim}
% \endgroup
@@ -1245,7 +1246,7 @@ version 2005/12/01 or later.
% \end{Verbatim}
%
% \makeatletter
-% \let\Yellow\@highLight
+% \NewCommandCopy{\Yellow}{\@highLight}
% \makeatother
%
%
@@ -1817,6 +1818,11 @@ version 2005/12/01 or later.
% }
% \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 @@ version 2005/12/01 or later.
%
% \medskip
% \begin{macrocode}
-\tl_new:N \l_@@_path_tl
+\str_new:N \l_@@_path_str
% \end{macrocode}
%
%
@@ -2647,7 +2653,7 @@ version 2005/12/01 or later.
% \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 @@ version 2005/12/01 or later.
}
\l_tmpa_tl
}
-\cs_generate_variant:Nn \@@_replace_spaces:n { x }
% \end{macrocode}
%
% \bigskip
@@ -3301,7 +3306,7 @@ version 2005/12/01 or later.
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,21 +3931,21 @@ version 2005/12/01 or later.
\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:
}
% \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 @@ version 2005/12/01 or later.
% 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 @@ version 2005/12/01 or later.
{
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 @@ version 2005/12/01 or later.
\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 @@ version 2005/12/01 or later.
% \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 @@ version 2005/12/01 or later.
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 @@ version 2005/12/01 or later.
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 @@ version 2005/12/01 or later.
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}