summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/piton
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-01-07 21:22:46 +0000
committerKarl Berry <karl@freefriends.org>2023-01-07 21:22:46 +0000
commit26381d7329f3482a0bd8295e18cb45f464b72f9b (patch)
tree17edef248b9cec5945687874292f3b77a0d235fe /Master/texmf-dist/tex/lualatex/piton
parent57c965945ac67d2a7c30e571e23323237686c6b6 (diff)
piton (7jan23)
git-svn-id: svn://tug.org/texlive/trunk@65482 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/piton')
-rw-r--r--Master/texmf-dist/tex/lualatex/piton/piton.sty43
1 files changed, 39 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/lualatex/piton/piton.sty b/Master/texmf-dist/tex/lualatex/piton/piton.sty
index 88ae2b21bfb..dd5d94ef6d8 100644
--- a/Master/texmf-dist/tex/lualatex/piton/piton.sty
+++ b/Master/texmf-dist/tex/lualatex/piton/piton.sty
@@ -6,7 +6,7 @@
%%
%% piton.dtx (with options: `package')
%%
-%% Copyright (C) 2022 by F. Pantigny
+%% Copyright (C) 2023 by F. Pantigny
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -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{1.0}
-\def\myfiledate{2022/12/29}
+\def\myfileversion{1.1}
+\def\myfiledate{2023/01/07}
@@ -37,6 +37,7 @@
\bool_new:N \c__piton_footnotehyper_bool
\bool_new:N \c__piton_footnote_bool
\bool_new:N \c__piton_math_comments_bool
+\bool_new:N \c__piton_beamer_bool
\keys_define:nn { piton / package }
{
footnote .bool_set:N = \c__piton_footnote_bool ,
@@ -47,13 +48,15 @@
comment-latex .value_required:n = true ,
math-comments .bool_set:N = \c__piton_math_comments_bool ,
math-comments .default:n = true ,
+ beamer .bool_set:N = \c__piton_beamer_bool ,
+ beamer .default:n = true ,
unknown .code:n = \msg_error:nn { piton } { unknown~key~for~package }
}
\msg_new:nnn { piton } { unknown~key~for~package }
{
Unknown~key.\\
You~have~used~the~key~'\l_keys_key_str'~but~the~only~keys~available~here~
- are~'comment-latex',~'escape-inside',~'footnote',~'footnotehyper'~and~
+ are~'beamer',~'comment-latex',~'escape-inside',~'footnote',~'footnotehyper'~and~
'math-comments'.~Other~keys~are~available~in~\token_to_str:N \PitonOptions.\\
That~key~will~be~ignored.
}
@@ -69,6 +72,8 @@
{ \tl_head:V \c__piton_escape_inside_tl }
{ \tl_tail:V \c__piton_escape_inside_tl }
\endgroup
+\@ifclassloaded { beamer } { \bool_set_true:N \c__piton_beamer_bool } { }
+\bool_if:NT \c__piton_beamer_bool { \lua_now:n { piton_beamer = true } }
\hook_gput_code:nnn { begindocument } { . }
{
\@ifpackageloaded { xcolor }
@@ -605,6 +610,8 @@
Exception .value_required:n = true ,
Comment.LaTeX .tl_set:c = pitonStyle Comment.LaTeX ,
Comment.LaTeX .value_required:n = true ,
+ Beamer .tl_set:c = pitonStyle Beamer ,
+ Beamer .value_required:n = true ,
unknown .code:n =
\msg_error:nn { piton } { Unknown~key~for~SetPitonStyle }
}
@@ -656,6 +663,7 @@
InitialValues = \__piton_piton:n ,
Dict.Value = \__piton_piton:n ,
Interpol.Inside = \color{black}\__piton_piton:n ,
+ Beamer = \__piton_piton:n ,
Post.Function = \__piton_piton:n ,
}
\bool_if:NT \c__piton_math_comments_bool
@@ -1036,6 +1044,32 @@ local Set =
K ( P "{" )
* ItemOfSet * ( K ( P "," ) * ItemOfSet ) ^ 0
* K ( P "}" )
+local Beamer = P ( "blablabla" )
+
+if piton_beamer then
+ Beamer =
+ L (
+ ( P "\\uncover" + P "\\only" + P "\\alert" + P "\\visible"
+ + P "\\invisible" + P "\\action"
+ )
+ * P "<"
+ * (1 - P ">") ^ 0
+ * P ">{"
+ )
+ * K ( Expression , 'Beamer' )
+ * L ( P "}" )
+ +
+ L (
+ ( P "\\alt" )
+ * P "<"
+ * (1 - P ">") ^ 0
+ * P ">{"
+ )
+ * K ( Expression , 'Beamer' )
+ * L ( P "}{" )
+ * K ( Expression , 'Beamer' )
+ * L ( P "}" )
+end
local SyntaxPythonAux =
Lc ( '\\__piton_begin_line:' ) *
( ( space - P "\r" ) ^0 * P "\r" ) ^ -1 *
@@ -1046,6 +1080,7 @@ local SyntaxPythonAux =
+ Space
+ Escape
+ CommentLaTeX
+ + Beamer
+ LongString
+ Comment
+ ExceptionInConsole