texlive[74437] Master/texmf-dist: piton (4mar25)
commits+karl at tug.org
commits+karl at tug.org
Tue Mar 4 22:08:45 CET 2025
Revision: 74437
https://tug.org/svn/texlive?view=revision&revision=74437
Author: karl
Date: 2025-03-04 22:08:45 +0100 (Tue, 04 Mar 2025)
Log Message:
-----------
piton (4mar25)
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-04 21:08:29 UTC (rev 74436)
+++ trunk/Master/texmf-dist/doc/lualatex/piton/piton-french.tex 2025-03-04 21:08:45 UTC (rev 74437)
@@ -113,10 +113,6 @@
\end{abstract}
-\bigskip
-{\color{red} Depuis la version 4.0, la syntaxe des chemins absolus et relatifs utilisés dans
-|\PitonInputFile| a été changée : cf.~partie~\ref{PitonInputFile}, p.~\pageref{PitonInputFile}.}
-
\section{Présentation}
L'extension \pkg{piton} utilise la librairie Lua nommée LPEG\footnote{LPEG est une
@@ -160,14 +156,11 @@
bien connues \pkg{listings} et \pkg{minted}.
-% \medskip
-% Le nom de cette extension (\pkg{piton}) a été choisi un peu arbitrairement en référence
-% aux pitons d'alpinisme qui servent à gravir les montagnes.
+\medskip
+Le nom de cette extension (\pkg{piton}) a été choisi un peu arbitrairement en référence
+aux pitons d'alpinisme qui servent à gravir les montagnes.
-
-\section{Installation}
-
L'extension \pkg{piton} est composée de deux fichiers : |piton.sty| et |piton.lua| (le
fichier LaTeX |piton.sty| chargé par |\usepackage| va à son tour charger le fichier
|piton.lua|). Les deux fichiers doivent être présents dans un répertoire où LaTeX pourra
@@ -3019,6 +3012,10 @@
\printindex
+\section*{Remerciements}
+
+Remerciements à Yann Salmon pour ses nombreuses suggestions pertinentes.
+
\section*{Autre documentation}
Le document |piton.pdf| (fourni avec l'extension \pkg{piton}) contient une traduction anglaise de la
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-04 21:08:29 UTC (rev 74436)
+++ trunk/Master/texmf-dist/source/lualatex/piton/piton.dtx 2025-03-04 21:08:45 UTC (rev 74437)
@@ -79,12 +79,12 @@
% \iffalse
%<*STY>
% \fi
-\def\PitonFileVersion{4.2b}
-\def\PitonFileDate{2025/01/18}
+\def\PitonFileVersion{4.2c}
+\def\PitonFileDate{2025/03/04}
% \iffalse
%</STY>
%<*LUA>
-piton_version = "4.2b" -- 2025/01/18
+piton_version = "4.2c" -- 2025/03/04
%</LUA>
%\fi
%
@@ -101,11 +101,6 @@
% syntactic highlighting, by using the Lua library LPEG. It requires LuaLaTeX.
% \end{abstract}
%
-% \bigskip
-% {\color{red} Since the version 4.0, the syntax of the absolute and relative
-% paths used in |\PitonInputFile| has been changed:
-% cf.~part~\ref{PitonInputFile}, p.~\pageref{PitonInputFile}.}
-%
%
% \section{Presentation}
%
@@ -4983,12 +4978,12 @@
\bool_if:NTF \l_@@_old_PitonInputFile_bool
{
\bool_set_false:N \l_tmpa_bool
- \seq_map_inline:Nn \l__piton_path_seq
+ \seq_map_inline:Nn \l_@@_path_seq
{
- \str_set:Nn \l__piton_file_name_str { ##1 / #3 }
- \file_if_exist:nT { \l__piton_file_name_str }
+ \str_set:Nn \l_@@_file_name_str { ##1 / #3 }
+ \file_if_exist:nT { \l_@@_file_name_str }
{
- \__piton_input_file:nn { #1 } { #2 }
+ \@@_input_file:nn { #1 } { #2 }
\bool_set_true:N \l_tmpa_bool
\seq_map_break:
}
@@ -5043,6 +5038,11 @@
{ \@@_error_or_warning:n { overlay~without~beamer } }
}
\group_begin:
+% The following line is to allow programs such as |latexmk| to be aware that the
+% file (read by |\PitonInputFile|) is loaded during the compilation of the LaTeX
+% document.
+% \begin{macrocode}
+ \iow_log:e {(\l_@@_file_name_str)}
\int_zero_new:N \l_@@_first_line_int
\int_zero_new:N \l_@@_last_line_int
\int_set_eq:NN \l_@@_last_line_int \c_max_int
@@ -5091,6 +5091,7 @@
\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|.
@@ -5120,12 +5121,6 @@
% \end{macrocode}
%
%
-% The following line is to allow programs such as |latexmk| to be aware that the
-% file (read by |\PitonInputFile|) is loaded during the compilation of the LaTeX
-% document.
-% \begin{macrocode}
- \iow_log:e {(\l_@@_file_name_str)}
-% \end{macrocode}
% We recall that, if we are in Beamer, the command |\PitonInputFile| is
% ``overlay-aware'' and that's why we close now an environment |{uncoverenv}|
% that we have opened at the beginning of the command.
@@ -5330,6 +5325,7 @@
% gobbled in the |\tl_map_inline:Nn|.
% \begin{macrocode}
\regex_replace_all:nnN { \x20 } { \c { space } } \l_tmpa_tl
+ \seq_clear:N \l_tmpa_seq % added 2025/03/03
\tl_map_inline:Nn \l_tmpa_tl
{ \seq_put_right:Nn \l_tmpa_seq { ##1 } }
\seq_use:Nn \l_tmpa_seq { \- }
@@ -5680,6 +5676,19 @@
Your~whole~file~'\l_@@_file_name_str'~will~be~included.
}
% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_nopar:Nn \@@_thepage:
+ {
+ \thepage
+ \cs_if_exist:NT \insertframenumber
+ {
+ ~(frame~\insertframenumber
+ \cs_if_exist:NT \beamer at slidenumber { ,~slide~\insertslidenumber }
+ )
+ }
+ }
+% \end{macrocode}
%
% We don't give the name |syntax error| for the following error because you
% should not give a name with a space because such space could be replaced by
@@ -5687,7 +5696,7 @@
% \begin{macrocode}
\@@_msg_new:nn { SyntaxError }
{
- Syntax~Error.\\
+ Syntax~Error~on~page~\@@_thepage:.\\
Your~code~of~the~language~'\l_piton_language_str'~is~not~
syntactically~correct.\\
It~won't~be~printed~in~the~PDF~file.
@@ -5869,14 +5878,18 @@
piton.BeamerCommands
= piton.BeamerCommands + my_lpeg : match ( key_value )
end
+ for _ , v in ipairs ( { 'uncover', 'only',
+ 'visible', 'invisible', 'alert', 'action' } ) do
+ piton.addBeamerCommands(v)
+ end
% \end{macrocode}
%
% \begin{macrocode}
local insert
- function insert(...)
+ function insert(x)
local s = piton.beamer_environments
- for _ , x in ipairs({...}) do table.insert(s,x) end
- return s
+ table.insert(s,x)
+ return s
end
local my_lpeg_bis =
P { "E" ,
@@ -6533,7 +6546,7 @@
local Keyword =
K ( 'Keyword' ,
- P "as" + "assert" + "break" + "case" + "class" + "continue" + "def" +
+ P "assert" + "as" + "break" + "case" + "class" + "continue" + "def" +
"del" + "elif" + "else" + "except" + "exec" + "finally" + "for" + "from" +
"global" + "if" + "import" + "lambda" + "non local" + "pass" + "return" +
"try" + "while" + "with" + "yield" + "yield from" )
@@ -7080,9 +7093,19 @@
end
DetectedCommands = Compute_DetectedCommands ( 'ocaml' , braces )
local Q
- function Q ( pattern ) return
- Ct ( Cc ( luatexbase.catcodetables.CatcodeTableOther ) * C ( pattern ) )
- + Beamer + DetectedCommands + EscapeMath + Escape
+% \end{macrocode}
+% Usually, the following version of the function |Q| will be used without the
+% second arguemnt (|strict|), that is to say in a loosy way. However, in some
+% circunstancies, we will a need the ``strict'' version, for instance in
+% |DefFunction|.
+% \begin{macrocode}
+ function Q ( pattern, strict )
+ if strict ~= nil then
+ return Ct ( Cc ( luatexbase.catcodetables.CatcodeTableOther ) * C ( pattern ) )
+ else
+ return Ct ( Cc ( luatexbase.catcodetables.CatcodeTableOther ) * C ( pattern ) )
+ + Beamer + DetectedCommands + EscapeMath + Escape
+ end
end
% \end{macrocode}
%
@@ -7089,9 +7112,9 @@
% \bigskip
% \begin{macrocode}
local K
- function K ( style , pattern ) return
- Lc ( [[ {\PitonStyle{ ]] .. style .. "}{" )
- * Q ( pattern )
+ function K ( style , pattern, strict ) return
+ Lc ( [[ {\PitonStyle{ ]] .. style .. "}{" )
+ * Q ( pattern, strict )
* Lc "}}"
end
% \end{macrocode}
@@ -7101,7 +7124,7 @@
local WithStyle
function WithStyle ( style , pattern ) return
Ct ( Cc "Open" * Cc ( [[{\PitonStyle{]] .. style .. "}{" ) * Cc "}}" )
- * ( pattern + Beamer + DetectedCommands + EscapeMath + Escape )
+ * (pattern + Beamer + DetectedCommands + EscapeMath + Escape)
* Ct ( Cc "Close" )
end
% \end{macrocode}
@@ -7196,8 +7219,7 @@
% embed also a treatment for the end of lines (since the comments may be multi-lines).
%
% \begin{macrocode}
- local Comment =
- WithStyle ( 'Comment' ,
+ local comment =
P {
"A" ,
A = Q "(*"
@@ -7208,7 +7230,8 @@
+ EOL
) ^ 0
* Q "*)"
- } )
+ }
+ local Comment = WithStyle ( 'Comment' , comment )
% \end{macrocode}
%
%
@@ -7237,7 +7260,7 @@
% mode of Emacs.
% \begin{macrocode}
+ Q "::"
- + Q "[" * SkipSpace * Q "]" )
+ + Q ( "[" , true ) * SkipSpace * Q ( "]" , true) )
% \end{macrocode}
%
% \bigskip
@@ -7249,7 +7272,7 @@
% \begin{macrocode}
local OperatorWord =
K ( 'Operator.Word' ,
- P "asr" + "land" + "lor" + "lsl" + "lxor" + "mod" + "or" )
+ P "asr" + "land" + "lor" + "lsl" + "lxor" + "mod" + "or" + "not" )
% \end{macrocode}
%
% \bigskip
@@ -7380,16 +7403,12 @@
% \end{macrocode}
%
% \bigskip
-% The \emph{records} may occur in the definitions of type (beginning by |type|)
-% but also when used as values.
+% The \emph{records}.
% \begin{macrocode}
- local Record =
+ local RecordVal =
Q "{" * SkipSpace
*
(
- OneFieldDefinition
- * ( Q ";" * SkipSpace * ( Comment * SkipSpace ) ^ 0 * OneFieldDefinition ) ^ 0
- +
OneField * ( Q ";" * SkipSpace * ( Comment * SkipSpace ) ^ 0 * OneField ) ^ 0
)
* SkipSpace
@@ -7398,6 +7417,20 @@
* Comment ^ -1
* SkipSpace
* Q "}"
+ local RecordType =
+ Q "{" * SkipSpace
+ *
+ (
+ OneFieldDefinition
+ * ( Q ";" * SkipSpace * ( Comment * SkipSpace ) ^ 0 * OneFieldDefinition ) ^ 0
+ )
+ * SkipSpace
+ * Q ";" ^ -1
+ * SkipSpace
+ * Comment ^ -1
+ * SkipSpace
+ * Q "}"
+ local Record = RecordType + RecordVal
% \end{macrocode}
%
% \paragraph{DotNotation}
@@ -7430,7 +7463,7 @@
% \bigskip
% \begin{macrocode}
local Builtin =
- K ( 'Name.Builtin' , P "not" + "incr" + "decr" + "fst" + "snd" + "ref" )
+ K ( 'Name.Builtin' , P "incr" + "decr" + "fst" + "snd" + "ref" )
% \end{macrocode}
%
% \bigskip
@@ -7505,7 +7538,12 @@
* K ( 'Name.Function.Internal' , identifier )
* Space
* (
- Q "=" * SkipSpace * K ( 'Keyword' , "function" )
+% \end{macrocode}
+% You use here the argument |strict| in order to allow a correct analyse of
+% |let x = \uncover<2->{y}| (elsewhere, it's interpreted as a definition of a OCaml
+% function).
+% \begin{macrocode}
+ Q "=" * SkipSpace * K ( 'Keyword' , "function" , true )
+
Argument * ( SkipSpace * Argument ) ^ 0
* (
@@ -7569,19 +7607,34 @@
local DefType =
K ( 'Keyword.Governing' , "type" )
* Space
- * K ( 'TypeExpression' , Q ( 1 - P "=" ) ^ 1 )
- * SkipSpace
- * ( Q "+=" + Q "=" )
+ * K ( 'TypeExpression' , Q ( 1 - P "=" - P "+=" ) ^ 1 )
* SkipSpace
- * (
- Record
+ * ( Q "+=" + Q "=" )
+ * SkipSpace
+ * (
+ RecordType
+
+% \end{macrocode}
+% The following lines are a suggestion of Y. Salmon.
+% \begin{macrocode}
WithStyle
- (
- 'TypeExpression' ,
- (
- ( EOL + Q ( 1 - P ";;" - governing_keyword ) ) ^ 0
- * ( # ( governing_keyword ) + Q ";;" )
+ (
+ 'TypeExpression' ,
+ (
+ (
+ EOL
+ + comment
+ + Q ( 1
+ - P ";;"
+ - ( ( Space + EOL ) * governing_keyword * EndKeyword )
+ )
+ ) ^ 0
+ *
+ (
+ # ( ( Space + EOL ) * governing_keyword * EndKeyword )
+ + Q ";;"
+ + -1
+ )
)
)
)
@@ -8061,7 +8114,7 @@
local TableField =
K ( 'Name.Table' , identifier )
* Q "."
- * ( K ( 'Name.Field' , identifier ) ) ^ 0
+ * ( DetectedCommands + ( K ( 'Name.Field' , identifier ) ) ^ 0 )
local OneField =
(
@@ -9623,7 +9676,10 @@
% The key |escape-inside| is deprecated: use |begin-escape| and |end-escape|.
%
%
+% \section*{Acknowledgments}
%
+% Acknowledgments to Yann Salmon for its numerous suggestions of improvments.
+%
% \tableofcontents
%
% \end{document}
Modified: trunk/Master/texmf-dist/tex/lualatex/piton/piton.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/piton/piton.lua 2025-03-04 21:08:29 UTC (rev 74436)
+++ trunk/Master/texmf-dist/tex/lualatex/piton/piton.lua 2025-03-04 21:08:45 UTC (rev 74437)
@@ -20,7 +20,7 @@
-- -------------------------------------------
--
-- This file is part of the LuaLaTeX package 'piton'.
-piton_version = "4.2b" -- 2025/01/18
+piton_version = "4.2c" -- 2025/03/04
@@ -303,7 +303,7 @@
local Keyword =
K ( 'Keyword' ,
- P "as" + "assert" + "break" + "case" + "class" + "continue" + "def" +
+ P "assert" + "as" + "break" + "case" + "class" + "continue" + "def" +
"del" + "elif" + "else" + "except" + "exec" + "finally" + "for" + "from" +
"global" + "if" + "import" + "lambda" + "non local" + "pass" + "return" +
"try" + "while" + "with" + "yield" + "yield from" )
@@ -591,20 +591,24 @@
end
DetectedCommands = Compute_DetectedCommands ( 'ocaml' , braces )
local Q
- function Q ( pattern ) return
- Ct ( Cc ( luatexbase.catcodetables.CatcodeTableOther ) * C ( pattern ) )
- + Beamer + DetectedCommands + EscapeMath + Escape
+ function Q ( pattern, strict )
+ if strict ~= nil then
+ return Ct ( Cc ( luatexbase.catcodetables.CatcodeTableOther ) * C ( pattern ) )
+ else
+ return Ct ( Cc ( luatexbase.catcodetables.CatcodeTableOther ) * C ( pattern ) )
+ + Beamer + DetectedCommands + EscapeMath + Escape
+ end
end
local K
- function K ( style , pattern ) return
- Lc ( [[ {\PitonStyle{ ]] .. style .. "}{" )
- * Q ( pattern )
+ function K ( style , pattern, strict ) return
+ Lc ( [[ {\PitonStyle{ ]] .. style .. "}{" )
+ * Q ( pattern, strict )
* Lc "}}"
end
local WithStyle
function WithStyle ( style , pattern ) return
Ct ( Cc "Open" * Cc ( [[{\PitonStyle{]] .. style .. "}{" ) * Cc "}}" )
- * ( pattern + Beamer + DetectedCommands + EscapeMath + Escape )
+ * (pattern + Beamer + DetectedCommands + EscapeMath + Escape)
* Ct ( Cc "Close" )
end
local balanced_parens =
@@ -650,8 +654,7 @@
local QuotedString =
C ( open * ( 1 - closeeq ) ^ 0 * close ) /
( function ( s ) return QuotedStringBis : match ( s ) end )
- local Comment =
- WithStyle ( 'Comment' ,
+ local comment =
P {
"A" ,
A = Q "(*"
@@ -662,7 +665,8 @@
+ EOL
) ^ 0
* Q "*)"
- } )
+ }
+ local Comment = WithStyle ( 'Comment' , comment )
local Delim = Q ( P "[|" + "|]" + S "[()]" )
local Punct = Q ( S ",:;!" )
local cap_identifier = R "AZ" * ( R "az" + R "AZ" + S "_'" + digit ) ^ 0
@@ -670,11 +674,11 @@
K ( 'Name.Constructor' ,
Q "`" ^ -1 * cap_identifier
+ Q "::"
- + Q "[" * SkipSpace * Q "]" )
+ + Q ( "[" , true ) * SkipSpace * Q ( "]" , true) )
local ModuleType = K ( 'Name.Type' , cap_identifier )
local OperatorWord =
K ( 'Operator.Word' ,
- P "asr" + "land" + "lor" + "lsl" + "lxor" + "mod" + "or" )
+ P "asr" + "land" + "lor" + "lsl" + "lxor" + "mod" + "or" + "not" )
local governing_keyword = P "and" + "begin" + "class" + "constraint" +
"end" + "external" + "functor" + "include" + "inherit" + "initializer" +
"in" + "let" + "method" + "module" + "object" + "open" + "rec" + "sig" +
@@ -745,14 +749,24 @@
* Q "=" * SkipSpace
* ( C ( expression_for_fields_value ) / ParseAgain )
* SkipSpace
- local Record =
+ local RecordVal =
Q "{" * SkipSpace
*
(
+ OneField * ( Q ";" * SkipSpace * ( Comment * SkipSpace ) ^ 0 * OneField ) ^ 0
+ )
+ * SkipSpace
+ * Q ";" ^ -1
+ * SkipSpace
+ * Comment ^ -1
+ * SkipSpace
+ * Q "}"
+ local RecordType =
+ Q "{" * SkipSpace
+ *
+ (
OneFieldDefinition
* ( Q ";" * SkipSpace * ( Comment * SkipSpace ) ^ 0 * OneFieldDefinition ) ^ 0
- +
- OneField * ( Q ";" * SkipSpace * ( Comment * SkipSpace ) ^ 0 * OneField ) ^ 0
)
* SkipSpace
* Q ";" ^ -1
@@ -760,6 +774,7 @@
* Comment ^ -1
* SkipSpace
* Q "}"
+ local Record = RecordType + RecordVal
local DotNotation =
(
K ( 'Name.Module' , cap_identifier )
@@ -777,7 +792,7 @@
"//" + "**" + ";;" + "->" + "+." + "-." + "*." + "/."
+ S "-~+/*%=<>&@|" )
local Builtin =
- K ( 'Name.Builtin' , P "not" + "incr" + "decr" + "fst" + "snd" + "ref" )
+ K ( 'Name.Builtin' , P "incr" + "decr" + "fst" + "snd" + "ref" )
local Exception =
K ( 'Exception' ,
P "Division_by_zero" + "End_of_File" + "Failure" + "Invalid_argument" +
@@ -808,7 +823,7 @@
* K ( 'Name.Function.Internal' , identifier )
* Space
* (
- Q "=" * SkipSpace * K ( 'Keyword' , "function" )
+ Q "=" * SkipSpace * K ( 'Keyword' , "function" , true )
+
Argument * ( SkipSpace * Argument ) ^ 0
* (
@@ -862,19 +877,31 @@
local DefType =
K ( 'Keyword.Governing' , "type" )
* Space
- * K ( 'TypeExpression' , Q ( 1 - P "=" ) ^ 1 )
+ * K ( 'TypeExpression' , Q ( 1 - P "=" - P "+=" ) ^ 1 )
* SkipSpace
* ( Q "+=" + Q "=" )
* SkipSpace
* (
- Record
+ RecordType
+
WithStyle
(
'TypeExpression' ,
(
- ( EOL + Q ( 1 - P ";;" - governing_keyword ) ) ^ 0
- * ( # ( governing_keyword ) + Q ";;" )
+ (
+ EOL
+ + comment
+ + Q ( 1
+ - P ";;"
+ - ( ( Space + EOL ) * governing_keyword * EndKeyword )
+ )
+ ) ^ 0
+ *
+ (
+ # ( ( Space + EOL ) * governing_keyword * EndKeyword )
+ + Q ";;"
+ + -1
+ )
)
)
)
@@ -1125,7 +1152,7 @@
local TableField =
K ( 'Name.Table' , identifier )
* Q "."
- * ( K ( 'Name.Field' , identifier ) ) ^ 0
+ * ( DetectedCommands + ( K ( 'Name.Field' , identifier ) ) ^ 0 )
local OneField =
(
Modified: trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty 2025-03-04 21:08:29 UTC (rev 74436)
+++ trunk/Master/texmf-dist/tex/lualatex/piton/piton.sty 2025-03-04 21:08:45 UTC (rev 74437)
@@ -19,8 +19,8 @@
%% LaTeX version 2005/12/01 or later.
%% -------------------------------------------
%%
-\def\PitonFileVersion{4.2b}
-\def\PitonFileDate{2025/01/18}
+\def\PitonFileVersion{4.2c}
+\def\PitonFileDate{2025/03/04}
@@ -1111,6 +1111,7 @@
{ \__piton_error_or_warning:n { overlay~without~beamer } }
}
\group_begin:
+ \iow_log:e {(\l__piton_file_name_str)}
\int_zero_new:N \l__piton_first_line_int
\int_zero_new:N \l__piton_last_line_int
\int_set_eq:NN \l__piton_last_line_int \c_max_int
@@ -1155,6 +1156,7 @@
\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:
@@ -1173,7 +1175,6 @@
}
\bool_if:NT \l__piton_width_min_bool \__piton_width_to_aux:
\group_end:
- \iow_log:e {(\l__piton_file_name_str)}
\tl_if_novalue:nF { #1 }
{ \bool_if:NT \g__piton_beamer_bool { \end { uncoverenv } } }
\__piton_write_aux:
@@ -1302,6 +1303,7 @@
{
\tl_set:Nn \l_tmpa_tl { #1 }
\regex_replace_all:nnN { \x20 } { \c { space } } \l_tmpa_tl
+ \seq_clear:N \l_tmpa_seq % added 2025/03/03
\tl_map_inline:Nn \l_tmpa_tl
{ \seq_put_right:Nn \l_tmpa_seq { ##1 } }
\seq_use:Nn \l_tmpa_seq { \- }
@@ -1516,9 +1518,19 @@
markers~and~explicit~number~of~lines.\\
Your~whole~file~'\l__piton_file_name_str'~will~be~included.
}
+\cs_new_nopar:Nn \__piton_thepage:
+ {
+ \thepage
+ \cs_if_exist:NT \insertframenumber
+ {
+ ~(frame~\insertframenumber
+ \cs_if_exist:NT \beamer at slidenumber { ,~slide~\insertslidenumber }
+ )
+ }
+ }
\__piton_msg_new:nn { SyntaxError }
{
- Syntax~Error.\\
+ Syntax~Error~on~page~\__piton_thepage:.\\
Your~code~of~the~language~'\l_piton_language_str'~is~not~
syntactically~correct.\\
It~won't~be~printed~in~the~PDF~file.
@@ -1649,10 +1661,14 @@
piton.BeamerCommands
= piton.BeamerCommands + my_lpeg : match ( key_value )
end
+ for _ , v in ipairs ( { 'uncover', 'only',
+ 'visible', 'invisible', 'alert', 'action' } ) do
+ piton.addBeamerCommands(v)
+ end
local insert
- function insert(...)
+ function insert(x)
local s = piton.beamer_environments
- for _ , x in ipairs({...}) do table.insert(s,x) end
+ table.insert(s,x)
return s
end
local my_lpeg_bis =
More information about the tex-live-commits
mailing list.