texlive[71704] Master/texmf-dist: lt3luabridge (4jul24)

commits+karl at tug.org commits+karl at tug.org
Thu Jul 4 22:27:41 CEST 2024


Revision: 71704
          https://tug.org/svn/texlive?view=revision&revision=71704
Author:   karl
Date:     2024-07-04 22:27:41 +0200 (Thu, 04 Jul 2024)
Log Message:
-----------
lt3luabridge (4jul24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/lt3luabridge/README.md
    trunk/Master/texmf-dist/doc/generic/lt3luabridge/docstrip.cfg
    trunk/Master/texmf-dist/doc/generic/lt3luabridge/lt3luabridge.pdf
    trunk/Master/texmf-dist/source/generic/lt3luabridge/lt3luabridge.dtx
    trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.sty
    trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.tex
    trunk/Master/texmf-dist/tex/generic/lt3luabridge/t-lt3luabridge.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/generic/lt3luabridge/CHANGES.md

Added: trunk/Master/texmf-dist/doc/generic/lt3luabridge/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/lt3luabridge/CHANGES.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/lt3luabridge/CHANGES.md	2024-07-04 20:27:41 UTC (rev 71704)
@@ -0,0 +1,74 @@
+# Changes
+
+## 2.2.0 (2024-07-03)
+
+Development:
+
+- Automatically determine value of `\c_luabridge_default_output_dirname_str`
+  based on the current output directory.
+  (witiko/markdown#457, #26, #27, reported by @hongy19)
+
+Continuous Integration:
+
+- Automatically test the library on both Linux and Windows.
+
+## 2.1.0 (2024-02-14)
+
+Development:
+
+- Define function `\luabridge_tl_set:Nn`.
+
+## 2.0.2 (2022-10-24)
+
+Fixes:
+
+- Fix tokenization in error-reporting code. (#17, #19)
+- Catch compilation errors in TeX engines other than LuaTeX. (#18, #20)
+
+Refactoring:
+
+- Remove useless uses of `\l_tmpb_tl`. (24e116d)
+
+## 2.0.1 (2022-08-16)
+
+Fixes:
+
+- Apply proper error handling when executing Lua via shell escape. (#15)
+
+## 2.0.0 (2022-08-08)
+
+Breaking Changes:
+
+- Use `\sys_get_shell:nnNTF` from l3sys instead of `\immediate\write18` and
+  `os.execute()`. (#13)
+    - Merges `\c_luabridge_method_write_eighteen_int` and
+      `\c_luabridge_method_os_execute_int` into
+      `\c_luabridge_method_shell_int`.
+    - Removes `\g_luabridge_standard_output_filename_str` and
+      `\c_luabridge_default_standard_output_filename_str`.
+
+Fixes:
+
+- Execute chunks that end with `end` or a Lua comment. (#11, #14)
+- Sandbox direct Lua access. (#11, #14)
+- Make nested calls defined behavior. (#8, #13)
+
+Refactoring:
+
+- Remove needless whitespaces in Lua code.
+- Replace (plain) TeX primitives with `\iow_*` l3file functions. (#1, #3,
+  latex3/latex3#1105, latex3/latex3#1114. latex3/latex3#1117)
+    - Many thanks to @josephwright, @u-fischer, and @FrankMittelbach at
+      latex3/latex3#1114, and Hans Hagen, @hmenke, and @mojca at
+      [dev-context][1] for helping to make l3file compatible with ConTeXt MkII.
+
+ [1]: https://mailman.ntg.nl/pipermail/dev-context/2022/003912.html
+      (A robust way of detecting ConTeXt from LaTeX3)
+
+## 1.0.1 (2022-06-27)
+
+This release includes PDF documentation of lt3luabridge.
+
+## 1.0.0 (2022-06-26)
+
+Initial release


Property changes on: trunk/Master/texmf-dist/doc/generic/lt3luabridge/CHANGES.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/generic/lt3luabridge/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/lt3luabridge/README.md	2024-07-04 02:18:48 UTC (rev 71703)
+++ trunk/Master/texmf-dist/doc/generic/lt3luabridge/README.md	2024-07-04 20:27:41 UTC (rev 71704)
@@ -23,3 +23,8 @@
  [2]: https://www.ctan.org/pkg/markdown
  [3]: https://github.com/witiko/markdown/pull/141
  [4]: https://github.com/Witiko/lt3luabridge/actions
+
+## Additional information
+
+- Author: Vít Starý Novotný <witiko at mail.muni.cz>
+- License: LaTeX Project Public License (LPPL) 1.3c

Modified: trunk/Master/texmf-dist/doc/generic/lt3luabridge/docstrip.cfg
===================================================================
--- trunk/Master/texmf-dist/doc/generic/lt3luabridge/docstrip.cfg	2024-07-04 02:18:48 UTC (rev 71703)
+++ trunk/Master/texmf-dist/doc/generic/lt3luabridge/docstrip.cfg	2024-07-04 20:27:41 UTC (rev 71704)
@@ -1,6 +1,6 @@
 \preamble
 
-Copyright (C) 2016-2024 Vít Novotný
+Copyright (C) 2016-2024 Vít Starý Novotný
 
 This work may be distributed and/or modified under the
 conditions of the LaTeX Project Public License, either version 1.3c

Modified: trunk/Master/texmf-dist/doc/generic/lt3luabridge/lt3luabridge.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/generic/lt3luabridge/lt3luabridge.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/lt3luabridge/lt3luabridge.dtx	2024-07-04 02:18:48 UTC (rev 71703)
+++ trunk/Master/texmf-dist/source/generic/lt3luabridge/lt3luabridge.dtx	2024-07-04 20:27:41 UTC (rev 71704)
@@ -47,7 +47,7 @@
 %    }^^A
 % }
 %
-% \date{Released 2024-02-14}
+% \date{Released 2024-07-03}
 %
 % \maketitle
 %
@@ -151,7 +151,7 @@
 %   \texttt{-output-directory} parameter of the \TeX{} engine.
 % \end{variable}
 %
-% \begin{variable}[added = 2022-06-26]{\c_luabridge_default_output_dirname_str}
+% \begin{variable}[added = 2022-06-26, updated = 2024-07-03]{\c_luabridge_default_output_dirname_str}
 %   This constant is the default value of \cs{g_luabridge_output_dirname_str}.
 % \end{variable}
 %
@@ -261,9 +261,42 @@
   =
   { \c_luabridge_method_shell_int }
   {
-    \str_const:Nn
-      \c_luabridge_default_output_dirname_str
-      { . }
+%    \end{macrocode}
+%
+% Instead of assuming the current working directory as the output directory,
+% try to determine the output directory from the environmental variable
+% \texttt{TEXMF_OUTPUT_DIRECTORY}, which is automatically defined by \TeX{}
+% engines and accessible from child processes.
+%
+%    \begin{macrocode}
+    \sys_if_platform_unix:TF
+      {
+        \str_const:Nn
+          \c_luabridge_default_output_dirname_str
+          { $TEXMF_OUTPUT_DIRECTORY }
+      }
+      {
+        \sys_if_platform_windows:TF
+          {
+            \str_set:Nn
+              \l_tmpa_str
+              { TEXMF_OUTPUT_DIRECTORY }
+            \str_put_left:NV
+              \l_tmpa_str
+              \c_percent_str
+            \str_put_right:NV
+              \l_tmpa_str
+              \c_percent_str
+            \str_const:NV
+              \c_luabridge_default_output_dirname_str
+              \l_tmpa_str
+          }
+          {
+            \str_const:Nn
+              \c_luabridge_default_output_dirname_str
+              { . }
+          }
+      }
     \str_const:Nx
       \c_luabridge_default_helper_script_filename_str
       { \jobname.luabridge.lua }
@@ -358,9 +391,43 @@
           \g_luabridge_helper_script_filename_str
         \sys_get_shell:xnNTF
           {
-            texlua~
-              \g_luabridge_output_dirname_str /
-              \g_luabridge_helper_script_filename_str
+%    \end{macrocode}
+%
+% If the environmental variable \texttt{TEXMF_OUTPUT_DIRECTORY} is undefined,
+% use the current working directory (\texttt{.}) instead.
+%
+%    \begin{macrocode}
+            \str_if_eq:NNTF
+              \g_luabridge_output_dirname_str
+              \c_luabridge_default_output_dirname_str
+              {
+                \sys_if_platform_windows:TF
+                  {
+                    if~not~defined~TEXMF_OUTPUT_DIRECTORY~(
+                      texlua~
+                        \g_luabridge_helper_script_filename_str
+                    )~else~(
+                      texlua~
+                        \g_luabridge_output_dirname_str /
+                        \g_luabridge_helper_script_filename_str
+                    )
+                  }
+                  {
+                    \sys_if_platform_unix:T
+                      {
+                        TEXMF_OUTPUT_DIRECTORY =
+                          ${TEXMF_OUTPUT_DIRECTORY:-.} \iow_newline:
+                      }
+                    texlua~
+                      \g_luabridge_output_dirname_str /
+                      \g_luabridge_helper_script_filename_str
+                  }
+              }
+              {
+                texlua~
+                  \g_luabridge_output_dirname_str /
+                  \g_luabridge_helper_script_filename_str
+              }
           }
           { }
           #1
@@ -492,8 +559,8 @@
 \RequirePackage{expl3}
 \ProvidesExplPackage
   {lt3luabridge}%
-  {2024-02-14}%
-  {2.1.0}%
+  {2024-07-03}%
+  {2.2.0}%
   {An expl3 package that allows you to execute Lua code in LuaTeX or any other
    TeX engine that exposes the shell}
 \input lt3luabridge\relax

Modified: trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.sty	2024-07-04 02:18:48 UTC (rev 71703)
+++ trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.sty	2024-07-04 20:27:41 UTC (rev 71704)
@@ -6,7 +6,7 @@
 %%
 %% lt3luabridge.dtx  (with options: `latex-package')
 %% 
-%% Copyright (C) 2016-2024 Vít Novotný
+%% Copyright (C) 2016-2024 Vít Starý Novotný
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3c
@@ -45,8 +45,8 @@
 \RequirePackage{expl3}
 \ProvidesExplPackage
   {lt3luabridge}%
-  {2024-02-14}%
-  {2.1.0}%
+  {2024-07-03}%
+  {2.2.0}%
   {An expl3 package that allows you to execute Lua code in LuaTeX or any other
    TeX engine that exposes the shell}
 \input lt3luabridge\relax

Modified: trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.tex	2024-07-04 02:18:48 UTC (rev 71703)
+++ trunk/Master/texmf-dist/tex/generic/lt3luabridge/lt3luabridge.tex	2024-07-04 20:27:41 UTC (rev 71704)
@@ -6,7 +6,7 @@
 %%
 %% lt3luabridge.dtx  (with options: `generic-package')
 %% 
-%% Copyright (C) 2016-2024 Vít Novotný
+%% Copyright (C) 2016-2024 Vít Starý Novotný
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3c
@@ -117,9 +117,34 @@
   =
   { \c_luabridge_method_shell_int }
   {
-    \str_const:Nn
-      \c_luabridge_default_output_dirname_str
-      { . }
+    \sys_if_platform_unix:TF
+      {
+        \str_const:Nn
+          \c_luabridge_default_output_dirname_str
+          { $TEXMF_OUTPUT_DIRECTORY }
+      }
+      {
+        \sys_if_platform_windows:TF
+          {
+            \str_set:Nn
+              \l_tmpa_str
+              { TEXMF_OUTPUT_DIRECTORY }
+            \str_put_left:NV
+              \l_tmpa_str
+              \c_percent_str
+            \str_put_right:NV
+              \l_tmpa_str
+              \c_percent_str
+            \str_const:NV
+              \c_luabridge_default_output_dirname_str
+              \l_tmpa_str
+          }
+          {
+            \str_const:Nn
+              \c_luabridge_default_output_dirname_str
+              { . }
+          }
+      }
     \str_const:Nx
       \c_luabridge_default_helper_script_filename_str
       { \jobname.luabridge.lua }
@@ -207,9 +232,37 @@
           \g_luabridge_helper_script_filename_str
         \sys_get_shell:xnNTF
           {
-            texlua~
-              \g_luabridge_output_dirname_str /
-              \g_luabridge_helper_script_filename_str
+            \str_if_eq:NNTF
+              \g_luabridge_output_dirname_str
+              \c_luabridge_default_output_dirname_str
+              {
+                \sys_if_platform_windows:TF
+                  {
+                    if~not~defined~TEXMF_OUTPUT_DIRECTORY~(
+                      texlua~
+                        \g_luabridge_helper_script_filename_str
+                    )~else~(
+                      texlua~
+                        \g_luabridge_output_dirname_str /
+                        \g_luabridge_helper_script_filename_str
+                    )
+                  }
+                  {
+                    \sys_if_platform_unix:T
+                      {
+                        TEXMF_OUTPUT_DIRECTORY =
+                          ${TEXMF_OUTPUT_DIRECTORY:-.} \iow_newline:
+                      }
+                    texlua~
+                      \g_luabridge_output_dirname_str /
+                      \g_luabridge_helper_script_filename_str
+                  }
+              }
+              {
+                texlua~
+                  \g_luabridge_output_dirname_str /
+                  \g_luabridge_helper_script_filename_str
+              }
           }
           { }
           #1

Modified: trunk/Master/texmf-dist/tex/generic/lt3luabridge/t-lt3luabridge.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/lt3luabridge/t-lt3luabridge.tex	2024-07-04 02:18:48 UTC (rev 71703)
+++ trunk/Master/texmf-dist/tex/generic/lt3luabridge/t-lt3luabridge.tex	2024-07-04 20:27:41 UTC (rev 71704)
@@ -6,7 +6,7 @@
 %%
 %% lt3luabridge.dtx  (with options: `context-package')
 %% 
-%% Copyright (C) 2016-2024 Vít Novotný
+%% Copyright (C) 2016-2024 Vít Starý Novotný
 %% 
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3c



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