texlive[75957] trunk: runtexfile (3aug25)
commits+karl at tug.org
commits+karl at tug.org
Sun Aug 3 21:03:27 CEST 2025
Revision: 75957
https://tug.org/svn/texlive?view=revision&revision=75957
Author: karl
Date: 2025-08-03 21:03:26 +0200 (Sun, 03 Aug 2025)
Log Message:
-----------
runtexfile (3aug25)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/runtexfile/runtexfile.lua
trunk/Master/texmf-dist/doc/support/runtexfile/CHANGELOG
trunk/Master/texmf-dist/doc/support/runtexfile/examples/test2.tex
trunk/Master/texmf-dist/doc/support/runtexfile/runtexfile-doc.pdf
trunk/Master/texmf-dist/doc/support/runtexfile/runtexfile-doc.tex
trunk/Master/texmf-dist/scripts/runtexfile/runtexfile.lua
trunk/Master/tlpkg/libexec/ctan2tds
Added Paths:
-----------
trunk/Master/texmf-dist/doc/support/runtexfile/README.md
trunk/Master/texmf-dist/doc/support/runtexfile/minted-code.sty
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/support/runtexfile/README
trunk/Master/texmf-dist/doc/support/runtexfile/_minted/
Modified: trunk/Build/source/texk/texlive/linked_scripts/runtexfile/runtexfile.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/runtexfile/runtexfile.lua 2025-08-02 23:46:54 UTC (rev 75956)
+++ trunk/Build/source/texk/texlive/linked_scripts/runtexfile/runtexfile.lua 2025-08-03 19:03:26 UTC (rev 75957)
@@ -1,5 +1,6 @@
#!/usr/bin/env texlua
+--%% $Id: runtexfile-doc.tex 1 2025-08-02 16:44:17Z herbert $
-----------------------------------------------------------------------
-- FILE: runtexfile.lua
-- DESCRIPTION: run a latex document with special steps
@@ -7,10 +8,10 @@
-- AUTHOR: Herbert Voß
-- LICENSE: LPPL 1.3
--
--- %% $Id: runtexfile.lua 1146 2025-07-19 07:38:43Z herbert $
+-- %% $Id: runtexfile.lua 1 2025-08-02 16:44:17Z herbert $
-----------------------------------------------------------------------
runtexfile = runtexfile or { }
- local version = 0.03
+ local version = 0.04
runtexfile.version = version
--[[doc--
@@ -35,37 +36,52 @@
require("lualibs") -- all part of LuaTeX
+
+local function isInArray(value,array)
+ for _,v in pairs(array) do
+ if v == value then
+ return true
+ end
+ end
+ return false
+end
+
+args = {}
+for i=1, #arg do
+ args[#args+1] = arg[i]
+-- print(arg[i])
+end
+
+local verbose = isInArray("-V",args) or isInArray("--verbose",args)
+
local function flog(s)
if verbose then tmpfile:write(s.."\n") end
end
-flog("Read parameter ... ")
+if verbose then
+ tmpfile = io.open("runtexfile.log","w")
+ tmpfile:write("Start logfile (verbose)\n")
+end
-local args = require ('xindex-lapp') [[
+if isInArray("-v",args) or isInArray("--version",args) then
+ print("runtexfile version "..runtexfile.version)
+ os.exit()
+end
+
+if isInArray("-h",args) or isInArray("--help",args) then
+ print([[
parameter handling
-h,--help
- -v,--verbose
- -V,--version
- <file> (string) .tex file
-]]
-
---for i=1, #arg do
--- command[#command+1] = arg[i]
---end
-
-if args.version then
- print("runtexfile version "..runtexfile.version)
+ -V,--verbose
+ -v,--version
+ <file> (string) tex file name with or without extension]])
os.exit()
end
-verbose = args.verbose
--- not_quiet = not args["quiet"]
+local luaVersion = _VERSION
if verbose then
- tmpfile = io.open("runtexfile.log","w")
+ flog("Check Lua version: "..luaVersion)
end
-
-local luaVersion = _VERSION
-flog("Check Lua version: "..luaVersion)
if (luaVersion < "Lua 5.3") then
print("=========================================")
print("Sorry. but we need at least LuaTeX 1.09")
@@ -83,28 +99,23 @@
flog("Run wrapperscript in directory "..current_dir)
]]
-local LTXfile = args.file
-print("Main file: "..LTXfile)
-flog("Main file: "..LTXfile)
-
local commands = {"lualatex", "luatex", "luahbtex", "latex", "pdflatex", "xelatex", "xetex" }
-local function isInArray(value,array)
- for _,v in pairs(array) do
- if v == value then
- return true
- end
- end
- return false
+local function removeTeXFileExtension(fname) -- -- from the lines in the TeX file
+ return fname:gsub("%.tex", "")
end
-local function getFileName(s)
--- get different file name: runtexfile ... <filename>
+local function getFileName(s) -- from the commands in the TeX file
+-- get different file name: <command< ... <filename>
local r = s:match "(%b<>)$"
return r and r:sub(2,-2)
-- return string.match(s, "<([^<>]-)>%s*$")
end
+local LTXfile = removeTeXFileExtension(args[#args])
+print("Main file: "..LTXfile)
+flog("Main file: "..LTXfile)
+
local specialFileName
file = io.open(LTXfile,"r")
@@ -114,14 +125,18 @@
print("Fatal error: no file "..LTXfile.." or "..LTXfile..".tex")
print("I will exit ...")
flog("Fatal error: no file "..LTXfile.." or "..LTXfile..".tex")
- if verbose then tmpfile:close() end
- os.exit()
+ if verbose then
+ tmpfile:close()
+ os.exit()
+ end
end
end
+
local step = 1
local saveLTXfile = LTXfile
local commandLineFound = false
+local para = ""
for line in file:lines() do
if line ~= "" then
@@ -171,5 +186,8 @@
os.execute(commands[1].." "..para.." "..LTXfile.." > "..current_dir.."/runtexfile-"..step..".log")
end
file:close()
-if verbose then tmpfile:close() end
--- os.exit()
+if verbose then
+ tmpfile:write("Close logfile (verbose)\n")
+ tmpfile:close()
+end
+
Modified: trunk/Master/texmf-dist/doc/support/runtexfile/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/support/runtexfile/CHANGELOG 2025-08-02 23:46:54 UTC (rev 75956)
+++ trunk/Master/texmf-dist/doc/support/runtexfile/CHANGELOG 2025-08-03 19:03:26 UTC (rev 75957)
@@ -1,3 +1,4 @@
+0.04 2025-08-02 -do not use the lapp module (simplifies code)
0.03 2025-07-19 -rennamed file
- define lualatex as command, if no "%! HV" line exists
0.02 2025-07-18 -Initial version
Deleted: trunk/Master/texmf-dist/doc/support/runtexfile/README
===================================================================
--- trunk/Master/texmf-dist/doc/support/runtexfile/README 2025-08-02 23:46:54 UTC (rev 75956)
+++ trunk/Master/texmf-dist/doc/support/runtexfile/README 2025-08-03 19:03:26 UTC (rev 75957)
@@ -1,50 +0,0 @@
-# runtexfile
-
-Copyright 2025 Herbert Voß <hvoss at tug.org>
-all files are LPPL 1.3
-
-Small script like latexmk to run a LaTeX document controlled
-from within the document itself.
-
-The syntax of `runtexfile`
-
- runtexfile [options] filename
-
-eg
-
- runtexfile test
- runtexfile -v test
-
-possible options are (short,long):
-
- -h,--help
- -v,--verbose
- -V,--version
- <file> .tex file
-
-The TeX or LaTeX document has to define the comamnds at the
-beginning of the document. Only empty lines are possible
-before the command lines:
-
-%! HV runtexfile
-%! HV xindex
-%! HV runtexfile
-
-\documentclass{foo}
-...
-
-In this case the given filename from runtexfile is used.
-Other filenames can be used inside angles:
-
-%! HV lualatex --shell-escape
-%! HV biber
-%! HV lualatex --shell-escape
-%! HV xindex
-%! HV xindex --config DIN2 -l DE -o test2.vwd <test2.vwx>
-%! HV xindex --config DIN2 -l DE -o test2.dbd <test2.dbx>
-%! HV lualatex --shell-escape
-%! HV lualatex --shell-escape
-
-\documentclass{...}
-...
-
Added: trunk/Master/texmf-dist/doc/support/runtexfile/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/support/runtexfile/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/support/runtexfile/README.md 2025-08-03 19:03:26 UTC (rev 75957)
@@ -0,0 +1,53 @@
+# runtexfile
+
+Copyright 2025 Herbert Voß <hvoss at tug.org>
+all files are LPPL 1.3
+
+## Small script like latexmk to run a LaTeX document controlled from within the document itself.
+
+#The syntax of `runtexfile`
+
+ runtexfile [options] filename
+
+eg
+
+ runtexfile test
+ runtexfile -V test
+
+possible options are (short,long):
+
+ -h,--help
+ -V,--verbose
+ -v,--version
+ <file> .tex file
+
+The TeX or LaTeX document has to define the comamnds at the
+beginning of the document. Only empty lines are possible
+before the command lines:
+
+```
+%! HV runtexfile
+%! HV xindex
+%! HV runtexfile
+
+\documentclass{foo}
+...
+```
+
+In this case the given filename from runtexfile is used.
+Other filenames can be used inside angles:
+
+```
+%! HV lualatex --shell-escape
+%! HV biber
+%! HV lualatex --shell-escape
+%! HV xindex
+%! HV xindex --config DIN2 -l DE -o test2.vwd <test2.vwx>
+%! HV xindex --config DIN2 -l DE -o test2.dbd <test2.dbx>
+%! HV lualatex --shell-escape
+%! HV lualatex --shell-escape
+
+\documentclass{...}
+...
+```
+
Property changes on: trunk/Master/texmf-dist/doc/support/runtexfile/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/support/runtexfile/examples/test2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/runtexfile/examples/test2.tex 2025-08-02 23:46:54 UTC (rev 75956)
+++ trunk/Master/texmf-dist/doc/support/runtexfile/examples/test2.tex 2025-08-03 19:03:26 UTC (rev 75957)
@@ -1,4 +1,3 @@
-
%! HV lualatex --shell-escape
%! HV biber
%! HV lualatex --shell-escape
Added: trunk/Master/texmf-dist/doc/support/runtexfile/minted-code.sty
===================================================================
--- trunk/Master/texmf-dist/doc/support/runtexfile/minted-code.sty (rev 0)
+++ trunk/Master/texmf-dist/doc/support/runtexfile/minted-code.sty 2025-08-03 19:03:26 UTC (rev 75957)
@@ -0,0 +1,122 @@
+%%
+%% This is file `minted-code.sty': listings with minted
+%% for unicode
+%%
+%% Copyright (C) 2025 Herbert Voss
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%%
+\ProvidesPackage{minted-code}[2025/08/02 v0.04 for LuaLaTeX]
+
+\PassOptionsToPackage{skins,most}{tcolorbox}
+\RequirePackage{minted}
+\RequirePackage{tcolorbox}
+\tcbuselibrary{hooks,minted}
+\tcbset{
+ Minted at Code/.style={
+ boxsep=0.2em,
+ boxrule=1pt,
+ arc=0.5em,
+ colframe=green!40!black,
+ colback=green!5,
+ listing only,
+ left=0.5em,
+ right=0.5em,
+ top=0em,
+ bottom=0em,
+ fonttitle=\centering,
+ },
+ minted language = latex,
+% engine=minted,
+}
+
+\setminted{breaklines}
+
+\newtcblisting{codeblockA}[1][]{
+ minted options app={breaklines, mathescape, linenos,
+ fontsize=\footnotesize, numbersep=5pt},
+ minted language=latex,
+ #1,
+ listing only,
+ listing engine=minted,
+}
+
+\newtcblisting{codeblock}[1][]{%
+ minted options app={breaklines, mathescape, %linenos, numbersep=5pt,
+ fontsize=\footnotesize },
+ minted language=latex,
+ listing engine=minted,
+ Minted at Code,
+ #1
+}
+
+\newtcblisting{exampleA}[2][]{% inside/outside, code left
+ colframe=red!50!yellow!50!black,
+ colback=red!50!yellow!15!white,
+ coltitle=red!50!yellow!3!white,
+ bicolor,colbacklower=white,
+ fonttitle=\sffamily\bfseries,
+ listing engine=minted,
+ minted language=latex,
+ sidebyside,
+ title=#2,#1}
+
+\newtcblisting{exampleB}[2][]{% inside/outside, code right
+ colframe=red!50!yellow!50!black,
+ colback=white,
+ coltitle=red!50!yellow!13!white,
+ bicolor,colbacklower=red!50!yellow!5!white,
+ fonttitle=\sffamily\bfseries,
+ sidebyside,text and listing,
+ listing engine=minted,
+ minted language=latex,
+ title=#2,#1}
+
+\newtcblisting{exampleC}[2][]{% inside/outside, code left
+ colframe=red!50!yellow!50!black,
+ colback=red!50!yellow!15!white,
+ coltitle=red!50!yellow!13!white,
+ bicolor,colbacklower=white,
+ fonttitle=\sffamily\bfseries,
+% sidebyside,
+ listing engine=minted,
+ minted language=latex,
+ title=#2,#1}
+
+\newtcblisting{exampleM}[2][]{%
+ minted options app={breaklines, mathescape, fontsize=\footnotesize, %numbersep=5pt, linenos
+ },
+ listing engine=minted,
+ minted language=latex,
+ colframe=red!50!yellow!50!black,
+ colback=red!50!yellow!15!white,
+ coltitle=red!50!yellow!13!white,
+ bicolor,colbacklower=white,
+ fonttitle=\sffamily\bfseries,
+% sidebyside,
+ title=#2,
+ #1
+% listing only
+}
+
+\endinput
+
+\setminted[latex]{%
+ breaklines=true,
+ rulecolor=green,
+ frame=leftline,
+ framerule=1pt,
+ framesep=6pt,
+ baselinestretch=1.1,
+ xleftmargin=6pt,
+ breakanywhere,
+ escapeinside=||,
+}%
+
Property changes on: trunk/Master/texmf-dist/doc/support/runtexfile/minted-code.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/support/runtexfile/runtexfile-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/support/runtexfile/runtexfile-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/runtexfile/runtexfile-doc.tex 2025-08-02 23:46:54 UTC (rev 75956)
+++ trunk/Master/texmf-dist/doc/support/runtexfile/runtexfile-doc.tex 2025-08-03 19:03:26 UTC (rev 75957)
@@ -4,7 +4,7 @@
%! HV lualatex
%! HV lualatex
-%% $Id: runtexfile-doc.tex 1146 2025-07-19 07:38:43Z herbert $
+%% $Id: runtexfile-doc.tex 1 2025-08-02 16:44:17Z herbert $
%
\listfiles\setcounter{errorcontextlines}{100}
\documentclass[paper=a4,fontsize=11pt,DIV=14,parskip=half-,
@@ -83,7 +83,7 @@
\newcommand\rD{\texttt{runtexfile}\xspace}
-\title{Script \texttt{runtexfile} \\--\\ \normalsize v. 0.03 (\today)}
+\title{Script \texttt{runtexfile} \\--\\ \normalsize v. 0.04 (\today)}
\author{\shortstack{Herbert Voß\\\small \href{mailto:hvoss at tug.org}{hvoss at tug.org}}}
\date{}
\begin{document}
@@ -172,7 +172,7 @@
%! HV lualatex
%! HV lualatex
-%% $Id: runtexfile-doc.tex 1146 2025-07-19 07:38:43Z herbert $
+%% $Id: runtexfile-doc.tex 1 2025-08-02 16:44:17Z herbert $
%
\listfiles\setcounter{errorcontextlines}{100}
\documentclass[paper=a4,fontsize=11pt,DIV=14,parskip=half-,
Modified: trunk/Master/texmf-dist/scripts/runtexfile/runtexfile.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/runtexfile/runtexfile.lua 2025-08-02 23:46:54 UTC (rev 75956)
+++ trunk/Master/texmf-dist/scripts/runtexfile/runtexfile.lua 2025-08-03 19:03:26 UTC (rev 75957)
@@ -1,5 +1,6 @@
#!/usr/bin/env texlua
+--%% $Id: runtexfile-doc.tex 1 2025-08-02 16:44:17Z herbert $
-----------------------------------------------------------------------
-- FILE: runtexfile.lua
-- DESCRIPTION: run a latex document with special steps
@@ -7,10 +8,10 @@
-- AUTHOR: Herbert Voß
-- LICENSE: LPPL 1.3
--
--- %% $Id: runtexfile.lua 1146 2025-07-19 07:38:43Z herbert $
+-- %% $Id: runtexfile.lua 1 2025-08-02 16:44:17Z herbert $
-----------------------------------------------------------------------
runtexfile = runtexfile or { }
- local version = 0.03
+ local version = 0.04
runtexfile.version = version
--[[doc--
@@ -35,37 +36,52 @@
require("lualibs") -- all part of LuaTeX
+
+local function isInArray(value,array)
+ for _,v in pairs(array) do
+ if v == value then
+ return true
+ end
+ end
+ return false
+end
+
+args = {}
+for i=1, #arg do
+ args[#args+1] = arg[i]
+-- print(arg[i])
+end
+
+local verbose = isInArray("-V",args) or isInArray("--verbose",args)
+
local function flog(s)
if verbose then tmpfile:write(s.."\n") end
end
-flog("Read parameter ... ")
+if verbose then
+ tmpfile = io.open("runtexfile.log","w")
+ tmpfile:write("Start logfile (verbose)\n")
+end
-local args = require ('xindex-lapp') [[
+if isInArray("-v",args) or isInArray("--version",args) then
+ print("runtexfile version "..runtexfile.version)
+ os.exit()
+end
+
+if isInArray("-h",args) or isInArray("--help",args) then
+ print([[
parameter handling
-h,--help
- -v,--verbose
- -V,--version
- <file> (string) .tex file
-]]
-
---for i=1, #arg do
--- command[#command+1] = arg[i]
---end
-
-if args.version then
- print("runtexfile version "..runtexfile.version)
+ -V,--verbose
+ -v,--version
+ <file> (string) tex file name with or without extension]])
os.exit()
end
-verbose = args.verbose
--- not_quiet = not args["quiet"]
+local luaVersion = _VERSION
if verbose then
- tmpfile = io.open("runtexfile.log","w")
+ flog("Check Lua version: "..luaVersion)
end
-
-local luaVersion = _VERSION
-flog("Check Lua version: "..luaVersion)
if (luaVersion < "Lua 5.3") then
print("=========================================")
print("Sorry. but we need at least LuaTeX 1.09")
@@ -83,28 +99,23 @@
flog("Run wrapperscript in directory "..current_dir)
]]
-local LTXfile = args.file
-print("Main file: "..LTXfile)
-flog("Main file: "..LTXfile)
-
local commands = {"lualatex", "luatex", "luahbtex", "latex", "pdflatex", "xelatex", "xetex" }
-local function isInArray(value,array)
- for _,v in pairs(array) do
- if v == value then
- return true
- end
- end
- return false
+local function removeTeXFileExtension(fname) -- -- from the lines in the TeX file
+ return fname:gsub("%.tex", "")
end
-local function getFileName(s)
--- get different file name: runtexfile ... <filename>
+local function getFileName(s) -- from the commands in the TeX file
+-- get different file name: <command< ... <filename>
local r = s:match "(%b<>)$"
return r and r:sub(2,-2)
-- return string.match(s, "<([^<>]-)>%s*$")
end
+local LTXfile = removeTeXFileExtension(args[#args])
+print("Main file: "..LTXfile)
+flog("Main file: "..LTXfile)
+
local specialFileName
file = io.open(LTXfile,"r")
@@ -114,14 +125,18 @@
print("Fatal error: no file "..LTXfile.." or "..LTXfile..".tex")
print("I will exit ...")
flog("Fatal error: no file "..LTXfile.." or "..LTXfile..".tex")
- if verbose then tmpfile:close() end
- os.exit()
+ if verbose then
+ tmpfile:close()
+ os.exit()
+ end
end
end
+
local step = 1
local saveLTXfile = LTXfile
local commandLineFound = false
+local para = ""
for line in file:lines() do
if line ~= "" then
@@ -171,5 +186,8 @@
os.execute(commands[1].." "..para.." "..LTXfile.." > "..current_dir.."/runtexfile-"..step..".log")
end
file:close()
-if verbose then tmpfile:close() end
--- os.exit()
+if verbose then
+ tmpfile:write("Close logfile (verbose)\n")
+ tmpfile:close()
+end
+
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2025-08-02 23:46:54 UTC (rev 75956)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2025-08-03 19:03:26 UTC (rev 75957)
@@ -2590,7 +2590,7 @@
'rsfs', 'scrload\.tex|' . $standardtex,
'ruhyphen', '\.tex',
'ruler', '\.tex',
-# 'rutitlepage', 'rutitlepage-logo.*|' . $standardtex, # .tds.zip
+ 'runtexfile', 'NULL', # not example .sty
'sa-tikz', 'tikzlib.*tex|' . $standardtex,
'sansmath', '^..[^s].*\.sty', # not miscdoc.sty
'sapthesis', 'sapienzalogo.pdf|' . $standardtex,
More information about the tex-live-commits
mailing list.